diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-08-08 16:04:42 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-08-13 06:35:37 +0000 |
commit | 12aaa58dac35800b5b7d77f81cf2a87c21ee55da (patch) | |
tree | be0add9e5c22a85d20b5d78206aa74f956eb2a1b /nixpkgs/pkgs/development/libraries/libfive | |
parent | 45892a5591202f75a1c2f1ca7c62a92c7566e3c5 (diff) | |
parent | 5a8e9243812ba528000995b294292d3b5e120947 (diff) | |
download | nixlib-12aaa58dac35800b5b7d77f81cf2a87c21ee55da.tar nixlib-12aaa58dac35800b5b7d77f81cf2a87c21ee55da.tar.gz nixlib-12aaa58dac35800b5b7d77f81cf2a87c21ee55da.tar.bz2 nixlib-12aaa58dac35800b5b7d77f81cf2a87c21ee55da.tar.lz nixlib-12aaa58dac35800b5b7d77f81cf2a87c21ee55da.tar.xz nixlib-12aaa58dac35800b5b7d77f81cf2a87c21ee55da.tar.zst nixlib-12aaa58dac35800b5b7d77f81cf2a87c21ee55da.zip |
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Conflicts: nixpkgs/pkgs/applications/window-managers/sway/default.nix nixpkgs/pkgs/build-support/go/module.nix nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix nixpkgs/pkgs/development/libraries/mesa/default.nix nixpkgs/pkgs/servers/dict/dictd-db.nix Link: https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/issues/391
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libfive')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libfive/default.nix | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libfive/default.nix b/nixpkgs/pkgs/development/libraries/libfive/default.nix index 37eaed3ac650..d789aafbcb4e 100644 --- a/nixpkgs/pkgs/development/libraries/libfive/default.nix +++ b/nixpkgs/pkgs/development/libraries/libfive/default.nix @@ -1,5 +1,5 @@ { lib -, mkDerivation +, stdenv , wrapQtAppsHook , fetchFromGitHub , cmake @@ -9,28 +9,32 @@ , zlib , libpng , boost -, guile_3_0 -, stdenv +, guile +, qtbase +, darwin }: -mkDerivation { - pname = "libfive-unstable"; - version = "2022-05-19"; +stdenv.mkDerivation { + pname = "libfive"; + version = "unstable-2023-06-07"; src = fetchFromGitHub { owner = "libfive"; repo = "libfive"; - rev = "d83cc22709ff1f7c478be07ff2419e30e024834e"; - sha256 = "lNJg2LCpFcTewSA00s7omUtzhVxycAXvo6wEM/JjrN0="; + rev = "c85ffe1ba1570c2551434c5bad731884aaf80598"; + hash = "sha256-OITy3fJx+Z6856V3D/KpSQRJztvOdJdqUv1c65wNgCc="; }; nativeBuildInputs = [ wrapQtAppsHook cmake ninja pkg-config ]; - buildInputs = [ eigen zlib libpng boost guile_3_0 ]; + buildInputs = [ eigen zlib libpng boost guile qtbase ] + ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk_11_0.frameworks.Cocoa ]; preConfigure = '' substituteInPlace studio/src/guile/interpreter.cpp \ - --replace "qputenv(\"GUILE_LOAD_COMPILED_PATH\", \"libfive/bind/guile\");" \ - "qputenv(\"GUILE_LOAD_COMPILED_PATH\", \"libfive/bind/guile:$out/lib/guile/3.0/ccache\");" + --replace '"libfive/bind/guile"' \ + '"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 \ --replace "LIBFIVE_FRAMEWORK_DIR=$<TARGET_FILE_DIR:libfive>" \ @@ -42,19 +46,21 @@ mkDerivation { ''; cmakeFlags = [ - "-DGUILE_CCACHE_DIR=${placeholder "out"}/lib/guile/3.0/ccache" + "-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. mkdir -p $out/Applications cp -r studio/Studio.app $out/Applications/Studio.app - install_name_tool \ - -change libfive.dylib $out/lib/libfive.dylib \ - -change libfive-guile.dylib $out/lib/libfive-guile.dylib \ - $out/Applications/Studio.app/Contents/MacOS/Studio - '' else '' + install_name_tool -add_rpath $out/lib $out/Applications/Studio.app/Contents/MacOS/Studio + + makeWrapper $out/Applications/Studio.app/Contents/MacOS/Studio $out/bin/Studio + '' + '' # Link "Studio" binary to "libfive-studio" to be more obvious: ln -s "$out/bin/Studio" "$out/bin/libfive-studio" ''; @@ -64,6 +70,6 @@ mkDerivation { homepage = "https://libfive.com/"; maintainers = with maintainers; [ hodapp kovirobi ]; license = with licenses; [ mpl20 gpl2Plus ]; - platforms = with platforms; linux ++ darwin; + platforms = with platforms; all; }; } |