Skip to content

Commit

Permalink
Merge pull request NixOS#311145 from TomaSajt/odin
Browse files Browse the repository at this point in the history
odin: fix patches for darwin
  • Loading branch information
emilytrau committed May 14, 2024
2 parents e5d9b19 + 228c11d commit 311cd0a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions pkgs/development/compilers/odin/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@ in stdenv.mkDerivation rec {
LLVM_CONFIG = "${llvmPackages.llvm.dev}/bin/llvm-config";

postPatch = lib.optionalString stdenv.isDarwin ''
sed -i src/main.cpp \
-e 's|-syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk|-syslibroot ${MacOSX-SDK}|'
'' + ''
sed -i build_odin.sh \
-e 's/^GIT_SHA=.*$/GIT_SHA=/' \
-e 's/LLVM-C/LLVM/' \
-e 's/framework System/lSystem/'
substituteInPlace src/linker.cpp \
--replace-fail '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' ${MacOSX-SDK}
'' + ''
substituteInPlace build_odin.sh \
--replace-fail '-framework System' '-lSystem'
patchShebangs build_odin.sh
'';

Expand Down

0 comments on commit 311cd0a

Please sign in to comment.