From 211c9ab28b72b56b6e6ec06236bb31f6b4c45273 Mon Sep 17 00:00:00 2001 From: Burke Libbey Date: Wed, 2 Dec 2015 17:18:35 -0500 Subject: [PATCH] Add coreutils-prefixed to install coreutils as gls, ggrep, etc. Close #11421. Amended by vcunat not to cause a stdenv rebuild. --- pkgs/tools/misc/coreutils/default.nix | 12 ++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 14 insertions(+) diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix index 35e9e3828d93..6463d8f89440 100644 --- a/pkgs/tools/misc/coreutils/default.nix +++ b/pkgs/tools/misc/coreutils/default.nix @@ -2,6 +2,7 @@ , aclSupport ? false, acl ? null , selinuxSupport? false, libselinux ? null, libsepol ? null , autoconf, automake114x, texinfo +, withPrefix ? false }: assert aclSupport -> acl != null; @@ -83,6 +84,17 @@ let makeFlags = optionalString stdenv.isDarwin "CFLAGS=-D_FORTIFY_SOURCE=0"; + # e.g. ls -> gls; grep -> ggrep + postFixup = # feel free to simplify on a mass rebuild + if withPrefix then + '' + ( + cd "$out/bin" + find * -type f -executable -exec mv {} g{} \; + ) + '' + else null; + meta = { homepage = http://www.gnu.org/software/coreutils/; description = "The basic file, shell and text manipulation utilities of the GNU operating system"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 569a2751868b..f87a0c340a6b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1151,6 +1151,8 @@ let aclSupport = stdenv.isLinux; }; + coreutils-prefixed = coreutils.override { withPrefix = true; }; + cpio = callPackage ../tools/archivers/cpio { }; crackxls = callPackage ../tools/security/crackxls { };