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).
This commit is contained in:
Tuomas Tynkkynen 2016-12-02 00:24:15 +02:00
parent 9ccc14b1bc
commit 659f75bfcd
2 changed files with 4 additions and 10 deletions

View file

@ -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/;

View file

@ -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 { };