diff options
author | sternenseemann <sternenseemann@systemli.org> | 2021-10-29 12:19:17 +0200 |
---|---|---|
committer | sternenseemann <sternenseemann@systemli.org> | 2021-10-29 12:34:48 +0200 |
commit | b1197ac729ad272c7f2c30423cb3057a16bc61c8 (patch) | |
tree | 7d806bc1d021e4486e8f4525aadf43995797b947 /pkgs/build-support | |
parent | 3090ed3f403cae8ec297aa8cbe8f7f7114c4dc75 (diff) |
writers: run fixupPhase for darwin bin writers
mach-o executables we produce in writers are not always fully valid for some reason. In normal derivation this is fixed in fixupPhase and we can replicate this behavior here easily. Resolves #132660.
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/writers/default.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/build-support/writers/default.nix b/pkgs/build-support/writers/default.nix index 09ee7d738658f..216e41f6d7ecd 100644 --- a/pkgs/build-support/writers/default.nix +++ b/pkgs/build-support/writers/default.nix @@ -78,6 +78,10 @@ rec { ${compileScript} ${lib.optionalString strip "${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}") |