libfive: unstable-2022-05-19 -> unstable-2023-06-07
This commit is contained in:
parent
a634d19ba4
commit
5925e79d83
|
@ -1,5 +1,5 @@
|
||||||
{ lib
|
{ lib
|
||||||
, mkDerivation
|
, stdenv
|
||||||
, wrapQtAppsHook
|
, wrapQtAppsHook
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, cmake
|
, cmake
|
||||||
|
@ -10,27 +10,31 @@
|
||||||
, libpng
|
, libpng
|
||||||
, boost
|
, boost
|
||||||
, guile
|
, guile
|
||||||
, stdenv
|
, qtbase
|
||||||
|
, darwin
|
||||||
}:
|
}:
|
||||||
|
|
||||||
mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "libfive-unstable";
|
pname = "libfive";
|
||||||
version = "2022-05-19";
|
version = "unstable-2023-06-07";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "libfive";
|
owner = "libfive";
|
||||||
repo = "libfive";
|
repo = "libfive";
|
||||||
rev = "d83cc22709ff1f7c478be07ff2419e30e024834e";
|
rev = "c85ffe1ba1570c2551434c5bad731884aaf80598";
|
||||||
sha256 = "lNJg2LCpFcTewSA00s7omUtzhVxycAXvo6wEM/JjrN0=";
|
hash = "sha256-OITy3fJx+Z6856V3D/KpSQRJztvOdJdqUv1c65wNgCc=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ wrapQtAppsHook cmake ninja pkg-config ];
|
nativeBuildInputs = [ wrapQtAppsHook cmake ninja pkg-config ];
|
||||||
buildInputs = [ eigen zlib libpng boost guile ];
|
buildInputs = [ eigen zlib libpng boost guile qtbase ]
|
||||||
|
++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk_11_0.frameworks.Cocoa ];
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
substituteInPlace studio/src/guile/interpreter.cpp \
|
substituteInPlace studio/src/guile/interpreter.cpp \
|
||||||
--replace "qputenv(\"GUILE_LOAD_COMPILED_PATH\", \"libfive/bind/guile\");" \
|
--replace '"libfive/bind/guile"' \
|
||||||
"qputenv(\"GUILE_LOAD_COMPILED_PATH\", \"libfive/bind/guile:$out/${guile.siteCcacheDir}\");"
|
'"libfive/bind/guile:${placeholder "out"}/${guile.siteCcacheDir}"' \
|
||||||
|
--replace '(app_resource_dir + ":" + finder_build_dir).toLocal8Bit()' \
|
||||||
|
'"libfive/bind/guile:${placeholder "out"}/${guile.siteCcacheDir}"'
|
||||||
|
|
||||||
substituteInPlace libfive/bind/guile/CMakeLists.txt \
|
substituteInPlace libfive/bind/guile/CMakeLists.txt \
|
||||||
--replace "LIBFIVE_FRAMEWORK_DIR=$<TARGET_FILE_DIR:libfive>" \
|
--replace "LIBFIVE_FRAMEWORK_DIR=$<TARGET_FILE_DIR:libfive>" \
|
||||||
|
@ -43,18 +47,20 @@ mkDerivation {
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DGUILE_CCACHE_DIR=${placeholder "out"}/${guile.siteCcacheDir}"
|
"-DGUILE_CCACHE_DIR=${placeholder "out"}/${guile.siteCcacheDir}"
|
||||||
|
] ++ lib.optionals (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "11") [
|
||||||
|
# warning: 'aligned_alloc' is only available on macOS 10.15 or newer
|
||||||
|
"-DCMAKE_OSX_DEPLOYMENT_TARGET=10.15"
|
||||||
];
|
];
|
||||||
|
|
||||||
postInstall = if stdenv.isDarwin then ''
|
postInstall = lib.optionalString stdenv.isDarwin ''
|
||||||
# No rules to install the mac app, so do it manually.
|
# No rules to install the mac app, so do it manually.
|
||||||
mkdir -p $out/Applications
|
mkdir -p $out/Applications
|
||||||
cp -r studio/Studio.app $out/Applications/Studio.app
|
cp -r studio/Studio.app $out/Applications/Studio.app
|
||||||
|
|
||||||
install_name_tool \
|
install_name_tool -add_rpath $out/lib $out/Applications/Studio.app/Contents/MacOS/Studio
|
||||||
-change libfive.dylib $out/lib/libfive.dylib \
|
|
||||||
-change libfive-guile.dylib $out/lib/libfive-guile.dylib \
|
makeWrapper $out/Applications/Studio.app/Contents/MacOS/Studio $out/bin/Studio
|
||||||
$out/Applications/Studio.app/Contents/MacOS/Studio
|
'' + ''
|
||||||
'' else ''
|
|
||||||
# Link "Studio" binary to "libfive-studio" to be more obvious:
|
# Link "Studio" binary to "libfive-studio" to be more obvious:
|
||||||
ln -s "$out/bin/Studio" "$out/bin/libfive-studio"
|
ln -s "$out/bin/Studio" "$out/bin/libfive-studio"
|
||||||
'';
|
'';
|
||||||
|
@ -64,6 +70,6 @@ mkDerivation {
|
||||||
homepage = "https://libfive.com/";
|
homepage = "https://libfive.com/";
|
||||||
maintainers = with maintainers; [ hodapp kovirobi ];
|
maintainers = with maintainers; [ hodapp kovirobi ];
|
||||||
license = with licenses; [ mpl20 gpl2Plus ];
|
license = with licenses; [ mpl20 gpl2Plus ];
|
||||||
platforms = with platforms; linux ++ darwin;
|
platforms = with platforms; all;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -22590,7 +22590,7 @@ with pkgs;
|
||||||
|
|
||||||
libfabric = callPackage ../development/libraries/libfabric { };
|
libfabric = callPackage ../development/libraries/libfabric { };
|
||||||
|
|
||||||
libfive = libsForQt5.callPackage ../development/libraries/libfive { };
|
libfive = qt6Packages.callPackage ../development/libraries/libfive { };
|
||||||
|
|
||||||
libfixposix = callPackage ../development/libraries/libfixposix { };
|
libfixposix = callPackage ../development/libraries/libfixposix { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue