Unverified Commit 82ee0694 authored by Maciej Krüger's avatar Maciej Krüger Committed by GitHub
Browse files

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

prusa-slicer: fix build on darwin
parents 939e432e 477ad870
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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";
  };
+5 −0
Original line number Diff line number Diff line
@@ -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 \
+3 −1
Original line number Diff line number Diff line
@@ -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 { };