diff options
author | Robert Kovacsics <robert.kovacsics@cambridgeconsultants.com> | 2022-10-14 23:58:58 +0100 |
---|---|---|
committer | Robert Kovacsics <robert.kovacsics@cambridgeconsultants.com> | 2022-10-19 23:37:34 +0100 |
commit | 84e819cece99df59d45fdb96bd19bd85cd121c56 (patch) | |
tree | 5c63d0a5e68f15ba6a1317ec1a8da8f6afeb2a48 /pkgs/development/libraries/libfive | |
parent | 31d567846255e122846548255101980162bbf641 (diff) |
libfive-unstable: 2020-02-15 -> 2022-05-19
Diffstat (limited to 'pkgs/development/libraries/libfive')
-rw-r--r-- | pkgs/development/libraries/libfive/default.nix | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/pkgs/development/libraries/libfive/default.nix b/pkgs/development/libraries/libfive/default.nix index 00031e66bf506..37eaed3ac6506 100644 --- a/pkgs/development/libraries/libfive/default.nix +++ b/pkgs/development/libraries/libfive/default.nix @@ -9,23 +9,41 @@ , zlib , libpng , boost -, guile +, guile_3_0 , stdenv }: mkDerivation { pname = "libfive-unstable"; - version = "2020-02-15"; + version = "2022-05-19"; src = fetchFromGitHub { owner = "libfive"; repo = "libfive"; - rev = "5b7717a25064478cd6bdb190683566eaf4c7afdd"; - sha256 = "102zw2n3vzv84i323is4qrwwqqha8v1cniw54ss8f4bq6dmic0bg"; + rev = "d83cc22709ff1f7c478be07ff2419e30e024834e"; + sha256 = "lNJg2LCpFcTewSA00s7omUtzhVxycAXvo6wEM/JjrN0="; }; nativeBuildInputs = [ wrapQtAppsHook cmake ninja pkg-config ]; - buildInputs = [ eigen zlib libpng boost guile ]; + buildInputs = [ eigen zlib libpng boost guile_3_0 ]; + + 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\");" + + substituteInPlace libfive/bind/guile/CMakeLists.txt \ + --replace "LIBFIVE_FRAMEWORK_DIR=$<TARGET_FILE_DIR:libfive>" \ + "LIBFIVE_FRAMEWORK_DIR=$out/lib" \ + --replace "LIBFIVE_STDLIB_DIR=$<TARGET_FILE_DIR:libfive-stdlib>" \ + "LIBFIVE_STDLIB_DIR=$out/lib" + + export XDG_CACHE_HOME=$(mktemp -d)/.cache + ''; + + cmakeFlags = [ + "-DGUILE_CCACHE_DIR=${placeholder "out"}/lib/guile/3.0/ccache" + ]; postInstall = if stdenv.isDarwin then '' # No rules to install the mac app, so do it manually. @@ -47,6 +65,5 @@ mkDerivation { maintainers = with maintainers; [ hodapp kovirobi ]; license = with licenses; [ mpl20 gpl2Plus ]; platforms = with platforms; linux ++ darwin; - broken = true; }; } |