Merge pull request #283675 from wegank/prusa-slicer-aarch64-darwin

prusa-slicer: fix build on darwin
This commit is contained in:
Maciej Krüger 2024-01-31 23:46:53 +01:00 committed by GitHub
commit 82ee069492
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 1 deletions

View file

@ -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";
};

View file

@ -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 \

View file

@ -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 { };