about summary refs log tree commit diff
path: root/pkgs/tools/misc/coreutils
diff options
context:
space:
mode:
authorBurke Libbey <burke@libbey.me>2015-12-02 17:18:35 -0500
committerVladimír Čunát <vcunat@gmail.com>2015-12-03 20:08:37 +0100
commit211c9ab28b72b56b6e6ec06236bb31f6b4c45273 (patch)
treeab3c79880da2094d937788ab7488f8f640ce9e61 /pkgs/tools/misc/coreutils
parentdc6b4e7fdd64d1f964c3968257cb49644fa8d5b5 (diff)
downloadnixlib-211c9ab28b72b56b6e6ec06236bb31f6b4c45273.tar
nixlib-211c9ab28b72b56b6e6ec06236bb31f6b4c45273.tar.gz
nixlib-211c9ab28b72b56b6e6ec06236bb31f6b4c45273.tar.bz2
nixlib-211c9ab28b72b56b6e6ec06236bb31f6b4c45273.tar.lz
nixlib-211c9ab28b72b56b6e6ec06236bb31f6b4c45273.tar.xz
nixlib-211c9ab28b72b56b6e6ec06236bb31f6b4c45273.tar.zst
nixlib-211c9ab28b72b56b6e6ec06236bb31f6b4c45273.zip
Add coreutils-prefixed to install coreutils as gls, ggrep, etc.
Close #11421. Amended by vcunat not to cause a stdenv rebuild.
Diffstat (limited to 'pkgs/tools/misc/coreutils')
-rw-r--r--pkgs/tools/misc/coreutils/default.nix12
1 files changed, 12 insertions, 0 deletions
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";