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/writers | |
parent | 3090ed3f403cae8ec297aa8cbe8f7f7114c4dc75 (diff) | |
download | nixpkgs-b1197ac729ad272c7f2c30423cb3057a16bc61c8.tar nixpkgs-b1197ac729ad272c7f2c30423cb3057a16bc61c8.tar.gz nixpkgs-b1197ac729ad272c7f2c30423cb3057a16bc61c8.tar.bz2 nixpkgs-b1197ac729ad272c7f2c30423cb3057a16bc61c8.tar.lz nixpkgs-b1197ac729ad272c7f2c30423cb3057a16bc61c8.tar.xz nixpkgs-b1197ac729ad272c7f2c30423cb3057a16bc61c8.tar.zst nixpkgs-b1197ac729ad272c7f2c30423cb3057a16bc61c8.zip |
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/writers')
-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 09ee7d73865..216e41f6d7e 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}") |