diff options
author | Lassulus <github@lassul.us> | 2021-11-02 20:21:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-02 20:21:00 +0100 |
commit | 33f0c518f706d8985d1cdac7df2aed1d0a6149fc (patch) | |
tree | 4a78314220cc4d970f4d0bc4ed86bce4399b76f6 /pkgs/build-support | |
parent | 50af62eac9882d362afbaa91b4561a453e1b9446 (diff) | |
parent | b1197ac729ad272c7f2c30423cb3057a16bc61c8 (diff) |
Merge pull request #143629 from sternenseemann/writers-fixes
writers: fix writeHaskell* for darwin, bintools-related cleanup
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/writers/default.nix | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pkgs/build-support/writers/default.nix b/pkgs/build-support/writers/default.nix index 111ec68a60214..216e41f6d7ecd 100644 --- a/pkgs/build-support/writers/default.nix +++ b/pkgs/build-support/writers/default.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, gawk, gnused, gixy }: +{ pkgs, buildPackages, lib, gawk, gnused, gixy }: with lib; rec { @@ -77,7 +77,11 @@ rec { }) '' ${compileScript} ${lib.optionalString strip - "${pkgs.binutils-unwrapped}/bin/strip --strip-unneeded $out"} + "${lib.getBin buildPackages.bintools-unwrapped}/bin/${buildPackages.bintools-unwrapped.targetPrefix}strip -S $out"} + # Sometimes binaries produced for darwin (e. g. by GHC) won't be valid + # mach-o executables from the get-go, but need to be corrected somehow + # which is done by fixupPhase. + ${lib.optionalString pkgs.stdenvNoCC.hostPlatform.isDarwin "fixupPhase"} ${optionalString (types.path.check nameOrPath) '' mv $out tmp mkdir -p $out/$(dirname "${nameOrPath}") |