Merge pull request #161015 from a-m-joseph/util-linux-honor-systemdSupport

This commit is contained in:
Sandro
2022-04-12 16:10:33 +02:00
committed by GitHub
3 changed files with 14 additions and 12 deletions
+11 -8
View File
@@ -1,10 +1,13 @@
{ lib, stdenv, fetchurl, pkg-config, zlib, shadow, libcap_ng
, ncurses ? null, pam, systemd ? null
, ncursesSupport ? true
, ncurses, pam
, systemdSupport ? stdenv.isLinux
, systemd
, nlsSupport ? true
}:
stdenv.mkDerivation rec {
pname = "util-linux" + lib.optionalString ( !nlsSupport && ncurses == null && systemd == null ) "-minimal";
pname = "util-linux" + lib.optionalString (!nlsSupport && !ncursesSupport && !systemdSupport) "-minimal";
version = "2.37.4";
src = fetchurl {
@@ -40,9 +43,9 @@ stdenv.mkDerivation rec {
"--disable-makeinstall-setuid" "--disable-makeinstall-chown"
"--disable-su" # provided by shadow
(lib.enableFeature nlsSupport "nls")
(lib.withFeature (ncurses != null) "ncursesw")
(lib.withFeature (systemd != null) "systemd")
(lib.withFeatureAs (systemd != null)
(lib.withFeature ncursesSupport "ncursesw")
(lib.withFeature systemdSupport "systemd")
(lib.withFeatureAs systemdSupport
"systemdsystemunitdir" "${placeholder "bin"}/lib/systemd/system/")
"SYSCONFSTATICDIR=${placeholder "lib"}/lib"
] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
@@ -56,9 +59,9 @@ stdenv.mkDerivation rec {
];
nativeBuildInputs = [ pkg-config ];
buildInputs =
[ zlib pam libcap_ng ]
++ lib.filter (p: p != null) [ ncurses systemd ];
buildInputs = [ zlib pam libcap_ng ]
++ lib.optionals ncursesSupport [ ncurses ]
++ lib.optionals systemdSupport [ systemd ];
doCheck = false; # "For development purpose only. Don't execute on production system!"
+1
View File
@@ -1297,6 +1297,7 @@ mapAliases ({
urxvt_vtwheel = rxvt-unicode-plugins.vtwheel; # Added 2020-02-02
usb_modeswitch = throw "'usb_modeswitch' has been renamed to/replaced by 'usb-modeswitch'"; # Converted to throw 2022-02-22
usbguard-nox = usbguard; # Added 2019-09-04
util-linuxCurses = util-linux; # Added 2022-04-12
utillinux = util-linux; # Added 2020-11-24
### V ###
+2 -4
View File
@@ -23477,12 +23477,10 @@ with pkgs;
util-linux = if stdenv.isLinux then callPackage ../os-specific/linux/util-linux { }
else unixtools.util-linux;
util-linuxCurses = util-linux;
util-linuxMinimal = if stdenv.isLinux then util-linux.override {
nlsSupport = false;
ncurses = null;
systemd = null;
ncursesSupport = false;
systemdSupport = false;
} else util-linux;
v4l-utils = qt5.callPackage ../os-specific/linux/v4l-utils { };