utillinux: placeholder, touchup how su is disabled

This commit is contained in:
Will Dietz 2019-05-05 22:37:28 -05:00 committed by Frederik Rietdijk
parent 1800e3ca5c
commit 3b7ea8a7b9

View file

@ -41,15 +41,19 @@ in stdenv.mkDerivation rec {
"--disable-use-tty-group"
"--enable-fs-paths-default=/run/wrappers/bin:/run/current-system/sw/bin:/sbin"
"--disable-makeinstall-setuid" "--disable-makeinstall-chown"
"--disable-su" # provided by shadow
(lib.withFeature (ncurses != null) "ncursesw")
(lib.withFeature (systemd != null) "systemd")
(lib.withFeatureAs (systemd != null)
"systemdsystemunitdir" "$(bin)/lib/systemd/system/")
"systemdsystemunitdir" "${placeholder "bin"}/lib/systemd/system/")
] ++ lib.optional (stdenv.hostPlatform != stdenv.buildPlatform)
"scanf_cv_type_modifier=ms"
;
makeFlags = "usrbin_execdir=$(bin)/bin usrsbin_execdir=$(bin)/sbin";
makeFlags = [
"usrbin_execdir=${placeholder "bin"}/bin"
"usrsbin_execdir=${placeholder "bin"}/sbin"
];
nativeBuildInputs = [ pkgconfig ];
buildInputs =
@ -58,9 +62,7 @@ in stdenv.mkDerivation rec {
doCheck = false; # "For development purpose only. Don't execute on production system!"
postInstall = ''
rm "$bin/bin/su" # su should be supplied by the su package (shadow)
'' + lib.optionalString minimal ''
postInstall = lib.optionalString minimal ''
rm -rf $out/share/{locale,doc,bash-completion}
'';