Merge #45720: coreutils: split a coreutils-full version
This commit is contained in:
commit
2e7cb61cfb
@ -13,7 +13,7 @@ let
|
|||||||
pkgs.attr
|
pkgs.attr
|
||||||
pkgs.bashInteractive # bash with ncurses support
|
pkgs.bashInteractive # bash with ncurses support
|
||||||
pkgs.bzip2
|
pkgs.bzip2
|
||||||
pkgs.coreutils
|
pkgs.coreutils-full
|
||||||
pkgs.cpio
|
pkgs.cpio
|
||||||
pkgs.curl
|
pkgs.curl
|
||||||
pkgs.diffutils
|
pkgs.diffutils
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
{ stdenv, lib, buildPackages
|
{ stdenv, lib, buildPackages
|
||||||
, autoreconfHook, texinfo, fetchurl, perl, xz, libiconv, gmp ? null
|
, autoreconfHook, texinfo, fetchurl, perl, xz, libiconv, gmp ? null
|
||||||
, hostPlatform, buildPlatform
|
, hostPlatform, buildPlatform
|
||||||
, aclSupport ? false, acl ? null
|
, aclSupport ? stdenv.isLinux, acl ? null
|
||||||
, attrSupport ? false, attr ? null
|
, attrSupport ? stdenv.isLinux, attr ? null
|
||||||
, selinuxSupport? false, libselinux ? null, libsepol ? 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
|
, withPrefix ? false
|
||||||
, singleBinary ? "symlinks" # you can also pass "shebangs" or false
|
, singleBinary ? "symlinks" # you can also pass "shebangs" or false
|
||||||
}:
|
}:
|
||||||
@ -38,9 +41,10 @@ stdenv.mkDerivation rec {
|
|||||||
outputs = [ "out" "info" ];
|
outputs = [ "out" "info" ];
|
||||||
|
|
||||||
nativeBuildInputs = [ perl xz.bin ];
|
nativeBuildInputs = [ perl xz.bin ];
|
||||||
configureFlags =
|
configureFlags = [ "--with-packager=https://NixOS.org" ]
|
||||||
optional (singleBinary != false)
|
++ optional (singleBinary != false)
|
||||||
("--enable-single-binary" + optionalString (isString singleBinary) "=${singleBinary}")
|
("--enable-single-binary" + optionalString (isString singleBinary) "=${singleBinary}")
|
||||||
|
++ optional withOpenssl "--with-openssl"
|
||||||
++ optional hostPlatform.isSunOS "ac_cv_func_inotify_init=no"
|
++ optional hostPlatform.isSunOS "ac_cv_func_inotify_init=no"
|
||||||
++ optional withPrefix "--program-prefix=g"
|
++ optional withPrefix "--program-prefix=g"
|
||||||
++ optionals (hostPlatform != buildPlatform && hostPlatform.libc == "glibc") [
|
++ optionals (hostPlatform != buildPlatform && hostPlatform.libc == "glibc") [
|
||||||
@ -53,6 +57,7 @@ stdenv.mkDerivation rec {
|
|||||||
buildInputs = [ gmp ]
|
buildInputs = [ gmp ]
|
||||||
++ optional aclSupport acl
|
++ optional aclSupport acl
|
||||||
++ optional attrSupport attr
|
++ optional attrSupport attr
|
||||||
|
++ optional withOpenssl openssl
|
||||||
++ optionals hostPlatform.isCygwin [ autoreconfHook texinfo ] # due to patch
|
++ optionals hostPlatform.isCygwin [ autoreconfHook texinfo ] # due to patch
|
||||||
++ optionals selinuxSupport [ libselinux libsepol ]
|
++ optionals selinuxSupport [ libselinux libsepol ]
|
||||||
# TODO(@Ericson2314): Investigate whether Darwin could benefit too
|
# 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|'
|
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/*
|
rm $out/share/man/man1/*
|
||||||
cp ${buildPackages.coreutils}/share/man/man1/* $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 = {
|
meta = {
|
||||||
|
@ -1957,11 +1957,8 @@ with pkgs;
|
|||||||
|
|
||||||
cool-retro-term = libsForQt5.callPackage ../applications/misc/cool-retro-term { };
|
cool-retro-term = libsForQt5.callPackage ../applications/misc/cool-retro-term { };
|
||||||
|
|
||||||
coreutils = callPackage ../tools/misc/coreutils {
|
coreutils = callPackage ../tools/misc/coreutils { };
|
||||||
aclSupport = stdenv.isLinux;
|
coreutils-full = coreutils.override { minimal = false; };
|
||||||
attrSupport = stdenv.isLinux;
|
|
||||||
};
|
|
||||||
|
|
||||||
coreutils-prefixed = coreutils.override { withPrefix = true; singleBinary = false; };
|
coreutils-prefixed = coreutils.override { withPrefix = true; singleBinary = false; };
|
||||||
|
|
||||||
corkscrew = callPackage ../tools/networking/corkscrew { };
|
corkscrew = callPackage ../tools/networking/corkscrew { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user