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.
This commit is contained in:
sternenseemann 2021-10-29 12:19:17 +02:00
parent 3090ed3f40
commit b1197ac729
2 changed files with 5 additions and 4 deletions

View File

@ -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}")

View File

@ -330,10 +330,7 @@ let
};
constituents = accumulateDerivations [
# haskell specific tests
#
# TODO: The writers test appears to be failing on darwin for unknown
# reasons. See https://github.com/NixOS/nixpkgs/pull/129606#issuecomment-881307871.
(lib.recursiveUpdate jobs.tests.haskell { writers.x86_64-darwin = null; })
jobs.tests.haskell
# important top-level packages
jobs.cabal-install
jobs.cabal2nix