diff options
author | Maciej Krüger <mkg20001@gmail.com> | 2024-01-31 23:46:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-31 23:46:53 +0100 |
commit | 82ee069492ce894f02a2c6a9df42986269b428b9 (patch) | |
tree | 0510fe1e2b7e54bdba06242c3e75c6b6be7c86df | |
parent | 939e432e4650d94bd5a179cad13f2ebcf7fc3c57 (diff) | |
parent | 477ad870d3c16a53370b4b53bb895469e01265bf (diff) |
Merge pull request #283675 from wegank/prusa-slicer-aarch64-darwin
prusa-slicer: fix build on darwin
-rw-r--r-- | pkgs/applications/misc/prusa-slicer/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/libraries/openvdb/default.nix | 5 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 4 |
3 files changed, 12 insertions, 1 deletions
diff --git a/pkgs/applications/misc/prusa-slicer/default.nix b/pkgs/applications/misc/prusa-slicer/default.nix index ab13a68d60e58..724bfcc4ecced 100644 --- a/pkgs/applications/misc/prusa-slicer/default.nix +++ b/pkgs/applications/misc/prusa-slicer/default.nix @@ -9,6 +9,7 @@ , cereal , cgal , curl +, darwin , dbus , eigen , expat @@ -111,6 +112,8 @@ stdenv.mkDerivation (finalAttrs: { catch2 ] ++ lib.optionals withSystemd [ systemd + ] ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk_11_0.frameworks.CoreWLAN ]; separateDebugInfo = true; @@ -190,6 +193,7 @@ stdenv.mkDerivation (finalAttrs: { homepage = "https://github.com/prusa3d/PrusaSlicer"; license = licenses.agpl3; maintainers = with maintainers; [ moredread tweber tmarkus ]; + platforms = platforms.unix; } // lib.optionalAttrs (stdenv.isDarwin) { mainProgram = "PrusaSlicer"; }; diff --git a/pkgs/development/libraries/openvdb/default.nix b/pkgs/development/libraries/openvdb/default.nix index 530c57877cf82..c5397b259a30a 100644 --- a/pkgs/development/libraries/openvdb/default.nix +++ b/pkgs/development/libraries/openvdb/default.nix @@ -20,6 +20,11 @@ stdenv.mkDerivation rec cmakeFlags = [ "-DOPENVDB_CORE_STATIC=OFF" ]; + # error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.13 or newer + env = lib.optionalAttrs (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13" && lib.versionAtLeast tbb.version "2021.8.0") { + NIX_CFLAGS_COMPILE = "-faligned-allocation"; + }; + postFixup = '' substituteInPlace $dev/lib/cmake/OpenVDB/FindOpenVDB.cmake \ --replace \''${OPENVDB_LIBRARYDIR} $out/lib \ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c9eec87f62cbd..2de3b5d49b3e1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -35320,7 +35320,9 @@ with pkgs; printrun = callPackage ../applications/misc/printrun { }; - prusa-slicer = darwin.apple_sdk_11_0.callPackage ../applications/misc/prusa-slicer { }; + prusa-slicer = darwin.apple_sdk_11_0.callPackage ../applications/misc/prusa-slicer { + stdenv = if stdenv.isDarwin then overrideLibcxx darwin.apple_sdk_11_0.llvmPackages_14.stdenv else stdenv; + }; super-slicer = darwin.apple_sdk_11_0.callPackage ../applications/misc/prusa-slicer/super-slicer.nix { }; |