diff options
author | Tuomas Tynkkynen <tuomas@tuxera.com> | 2016-12-24 22:27:52 +0200 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas@tuxera.com> | 2016-12-24 22:33:05 +0200 |
commit | 30074ddfeac5e165eea32b33829bc2bf4185aace (patch) | |
tree | 4e5db2402aea3a78d824002e225cc425e6a2bbcd /pkgs/tools/misc | |
parent | c38b4da9946b32267301ccf352731ed2d80cc2f6 (diff) | |
download | nixlib-30074ddfeac5e165eea32b33829bc2bf4185aace.tar nixlib-30074ddfeac5e165eea32b33829bc2bf4185aace.tar.gz nixlib-30074ddfeac5e165eea32b33829bc2bf4185aace.tar.bz2 nixlib-30074ddfeac5e165eea32b33829bc2bf4185aace.tar.lz nixlib-30074ddfeac5e165eea32b33829bc2bf4185aace.tar.xz nixlib-30074ddfeac5e165eea32b33829bc2bf4185aace.tar.zst nixlib-30074ddfeac5e165eea32b33829bc2bf4185aace.zip |
coreutils: Fix cross build
`make install` was failing presumably due to an upstream cross-compilation bug: Makefile:3440: *** Recursive variable 'INSTALL' references itself (eventually). Stop. While at it, remove the old ugly cross buildPhase. It was seemingly trying to work around the fact that the man pages are generated by piping each command's --help output to help2man. That obviously doesn't work while cross-compiling. Instead, set PERL=missing in the environment to make the build system think there's no perl available to run help2man. (This approach was stolen from buildroot.)
Diffstat (limited to 'pkgs/tools/misc')
-rw-r--r-- | pkgs/tools/misc/coreutils/default.nix | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix index ec6be06ede37..8b39e3711e11 100644 --- a/pkgs/tools/misc/coreutils/default.nix +++ b/pkgs/tools/misc/coreutils/default.nix @@ -54,13 +54,13 @@ let ++ optional (stdenv.ccCross.libc ? libiconv) stdenv.ccCross.libc.libiconv.crossDrv; - buildPhase = '' - make || ( - pushd man - for a in *.x; do - touch `basename $a .x`.1 - done - popd; make ) + # Prevents attempts of running 'help2man' on cross-built binaries. + PERL = "missing"; + + # Works around a bug with 8.26: + # Makefile:3440: *** Recursive variable 'INSTALL' references itself (eventually). Stop. + preInstall = '' + sed -i Makefile -e 's|^INSTALL =.*|INSTALL = ${self}/bin/install -c|' ''; postInstall = '' |