about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorDomen Kožar <domen@dev.si>2021-11-09 23:01:29 -0600
committerGitHub <noreply@github.com>2021-11-09 23:01:29 -0600
commitf86959efea52f49260c52a8cb156355a54b560fd (patch)
tree686d26b9fea90ccee1ab7cad6dd0cb2acc704f2e /pkgs
parent99a0d87323e8238ce50648e68b1852cd6f90f873 (diff)
parentb0f20dad57200c86f6b13b7780eedf6196884d42 (diff)
downloadnixlib-f86959efea52f49260c52a8cb156355a54b560fd.tar
nixlib-f86959efea52f49260c52a8cb156355a54b560fd.tar.gz
nixlib-f86959efea52f49260c52a8cb156355a54b560fd.tar.bz2
nixlib-f86959efea52f49260c52a8cb156355a54b560fd.tar.lz
nixlib-f86959efea52f49260c52a8cb156355a54b560fd.tar.xz
nixlib-f86959efea52f49260c52a8cb156355a54b560fd.tar.zst
nixlib-f86959efea52f49260c52a8cb156355a54b560fd.zip
Merge pull request #145020 from risicle/ris-moarvm-darwin
moarvm: fix build for darwin
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/interpreters/rakudo/moarvm.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/rakudo/moarvm.nix b/pkgs/development/interpreters/rakudo/moarvm.nix
index e4c070107bde..b8ed60c69a99 100644
--- a/pkgs/development/interpreters/rakudo/moarvm.nix
+++ b/pkgs/development/interpreters/rakudo/moarvm.nix
@@ -10,6 +10,17 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-fzSHpw6Ld74OTi8SsUxJ9qAdA3jglAyGlYyQFsSVrXU=";
    };
 
+  postPatch = ''
+    patchShebangs .
+  '' + lib.optionalString stdenv.isDarwin ''
+    substituteInPlace Configure.pl \
+      --replace '`/usr/bin/arch`' '"${stdenv.hostPlatform.darwinArch}"' \
+      --replace '/usr/bin/arch' "$(type -P true)" \
+      --replace '/usr/' '/nope/'
+    substituteInPlace 3rdparty/dyncall/configure \
+      --replace '`sw_vers -productVersion`' '"$MACOSX_DEPLOYMENT_TARGET"'
+  '';
+
   buildInputs = [ perl ] ++ lib.optionals stdenv.isDarwin [ CoreServices ApplicationServices ];
   doCheck = false; # MoarVM does not come with its own test suite