From 659f75bfcdc8c623b1eabdf55fa2a01cc3f0d79f Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Fri, 2 Dec 2016 00:24:15 +0200 Subject: [PATCH] coreutils-prefixed: Fix build since the single-binary changes With the symlinked build it's only renaming 'coreutils' to 'gcoreutils' and leaving all the actual command symlinks alone. Instead of custom renaming scripts, let's use --program-prefix from the autotools kitchen sink. This has the nice(?) bonus that the manpages also get prefixed with 'g' now. The build system refuses to enable both single-binary build and --program-prefix - but the symlink-based single-binary build couldn't possibly work either (as it will be looking at "$0" for which command to execute). --- pkgs/tools/misc/coreutils/default.nix | 12 +++--------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix index e1d9bb921fd..8f09a677b8e 100644 --- a/pkgs/tools/misc/coreutils/default.nix +++ b/pkgs/tools/misc/coreutils/default.nix @@ -39,7 +39,8 @@ let configureFlags = optional (singleBinary != false) ("--enable-single-binary" + optionalString (isString singleBinary) "=${singleBinary}") - ++ optional stdenv.isSunOS "ac_cv_func_inotify_init=no"; + ++ optional stdenv.isSunOS "ac_cv_func_inotify_init=no" + ++ optional withPrefix "--program-prefix=g"; buildInputs = [ gmp ] ++ optional aclSupport acl @@ -89,14 +90,7 @@ let makeFlags = optionalString stdenv.isDarwin "CFLAGS=-D_FORTIFY_SOURCE=0"; - # e.g. ls -> gls; grep -> ggrep - postFixup = optionalString withPrefix - '' - ( - cd "$out/bin" - find * -type f -executable -exec mv {} g{} \; - ) - ''; + postFixup = ""; # FIXME: remove on next mass rebuild meta = { homepage = http://www.gnu.org/software/coreutils/; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 887a2018e91..78a8c9ac657 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1286,7 +1286,7 @@ in aclSupport = stdenv.isLinux; }; - coreutils-prefixed = coreutils.override { withPrefix = true; }; + coreutils-prefixed = coreutils.override { withPrefix = true; singleBinary = false; }; corkscrew = callPackage ../tools/networking/corkscrew { };