From d474e39f7d577eb509f3f39369fac575c0a04fdc Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Wed, 9 Nov 2022 21:03:59 +0100 Subject: [PATCH] root: fix build on aarch64-darwin --- pkgs/applications/science/misc/root/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/science/misc/root/default.nix b/pkgs/applications/science/misc/root/default.nix index d8788c559e00..e9200c0db324 100644 --- a/pkgs/applications/science/misc/root/default.nix +++ b/pkgs/applications/science/misc/root/default.nix @@ -127,6 +127,8 @@ stdenv.mkDerivation rec { # Eliminate impure reference to /System/Library/PrivateFrameworks substituteInPlace core/CMakeLists.txt \ --replace "-F/System/Library/PrivateFrameworks" "" + '' + lib.optionalString (stdenv.isDarwin && lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") '' + MACOSX_DEPLOYMENT_TARGET=10.16 ''; cmakeFlags = [ @@ -202,6 +204,6 @@ stdenv.mkDerivation rec { # See https://github.com/NixOS/nixpkgs/pull/192581#issuecomment-1256860426 # for some context on issues on aarch64. - broken = stdenv.isAarch64; + broken = stdenv.isAarch64 && stdenv.isLinux; }; }