diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2018-09-01 17:03:49 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2018-09-01 17:03:49 +0200 |
commit | 2e7cb61cfbe6df23a2e223f98ae61e1a385ea747 (patch) | |
tree | 80c64ebf7aa9b8ee8164fbe47aa27a55c29e8c2e /pkgs/tools/misc/coreutils | |
parent | edc13bae5462f7d088897bf6a268cc12c32f1aaf (diff) | |
parent | fd3927ac29fdae933d3007943ad73a5dc81335dc (diff) | |
download | nixlib-2e7cb61cfbe6df23a2e223f98ae61e1a385ea747.tar nixlib-2e7cb61cfbe6df23a2e223f98ae61e1a385ea747.tar.gz nixlib-2e7cb61cfbe6df23a2e223f98ae61e1a385ea747.tar.bz2 nixlib-2e7cb61cfbe6df23a2e223f98ae61e1a385ea747.tar.lz nixlib-2e7cb61cfbe6df23a2e223f98ae61e1a385ea747.tar.xz nixlib-2e7cb61cfbe6df23a2e223f98ae61e1a385ea747.tar.zst nixlib-2e7cb61cfbe6df23a2e223f98ae61e1a385ea747.zip |
Merge #45720: coreutils: split a coreutils-full version
Diffstat (limited to 'pkgs/tools/misc/coreutils')
-rw-r--r-- | pkgs/tools/misc/coreutils/default.nix | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix index c9af34425719..99a3b922901e 100644 --- a/pkgs/tools/misc/coreutils/default.nix +++ b/pkgs/tools/misc/coreutils/default.nix @@ -1,9 +1,12 @@ { stdenv, lib, buildPackages , autoreconfHook, texinfo, fetchurl, perl, xz, libiconv, gmp ? null , hostPlatform, buildPlatform -, aclSupport ? false, acl ? null -, attrSupport ? false, attr ? null +, aclSupport ? stdenv.isLinux, acl ? null +, attrSupport ? stdenv.isLinux, attr ? null , selinuxSupport? false, libselinux ? null, libsepol ? null +# No openssl in default version, so openssl-induced rebuilds aren't too big. +# It makes *sum functions significantly faster. +, minimal ? true, withOpenssl ? !minimal, openssl ? null , withPrefix ? false , singleBinary ? "symlinks" # you can also pass "shebangs" or false }: @@ -38,9 +41,10 @@ stdenv.mkDerivation rec { outputs = [ "out" "info" ]; nativeBuildInputs = [ perl xz.bin ]; - configureFlags = - optional (singleBinary != false) + configureFlags = [ "--with-packager=https://NixOS.org" ] + ++ optional (singleBinary != false) ("--enable-single-binary" + optionalString (isString singleBinary) "=${singleBinary}") + ++ optional withOpenssl "--with-openssl" ++ optional hostPlatform.isSunOS "ac_cv_func_inotify_init=no" ++ optional withPrefix "--program-prefix=g" ++ optionals (hostPlatform != buildPlatform && hostPlatform.libc == "glibc") [ @@ -53,6 +57,7 @@ stdenv.mkDerivation rec { buildInputs = [ gmp ] ++ optional aclSupport acl ++ optional attrSupport attr + ++ optional withOpenssl openssl ++ optionals hostPlatform.isCygwin [ autoreconfHook texinfo ] # due to patch ++ optionals selinuxSupport [ libselinux libsepol ] # TODO(@Ericson2314): Investigate whether Darwin could benefit too @@ -83,9 +88,13 @@ stdenv.mkDerivation rec { sed -i Makefile -e 's|^INSTALL =.*|INSTALL = ${buildPackages.coreutils}/bin/install -c|' ''; - postInstall = optionalString (hostPlatform != buildPlatform) '' + postInstall = optionalString (hostPlatform != buildPlatform && !minimal) '' rm $out/share/man/man1/* cp ${buildPackages.coreutils}/share/man/man1/* $out/share/man/man1 + '' + # du: 8.7 M locale + 0.4 M man pages + + optionalString minimal '' + rm -r "$out/share" ''; meta = { |