Merge pull request #143629 from sternenseemann/writers-fixes

writers: fix writeHaskell* for darwin, bintools-related cleanup
This commit is contained in:
Lassulus 2021-11-02 20:21:00 +01:00 committed by GitHub
commit 33f0c518f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View file

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

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