util-linux: fixup setuid/setgid build problems
... hopefully. Also refactor some nix code a little.
This commit is contained in:
parent
833bc78dcf
commit
1aac1fe5dd
@ -37,23 +37,22 @@ stdenv.mkDerivation rec {
|
|||||||
# (/sbin/mount.*) through an environment variable, but that's
|
# (/sbin/mount.*) through an environment variable, but that's
|
||||||
# somewhat risky because we have to consider that mount can setuid
|
# somewhat risky because we have to consider that mount can setuid
|
||||||
# root...
|
# root...
|
||||||
configureFlags = ''
|
configureFlags = [
|
||||||
--enable-write
|
"--enable-write"
|
||||||
--enable-last
|
"--enable-last"
|
||||||
--enable-mesg
|
"--enable-mesg"
|
||||||
--disable-use-tty-group
|
"--disable-use-tty-group"
|
||||||
--enable-fs-paths-default=/run/wrappers/bin:/var/run/current-system/sw/bin:/sbin
|
"--enable-fs-paths-default=/run/wrappers/bin:/var/run/current-system/sw/bin:/sbin"
|
||||||
${if ncurses == null then "--without-ncurses" else ""}
|
"--disable-makeinstall-setuid" "--disable-makeinstall-chown"
|
||||||
'';
|
]
|
||||||
|
++ lib.optional (ncurses == null) "--without-ncurses";
|
||||||
|
|
||||||
makeFlags = "usrbin_execdir=$(bin)/bin usrsbin_execdir=$(bin)/sbin";
|
makeFlags = "usrbin_execdir=$(bin)/bin usrsbin_execdir=$(bin)/sbin";
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[ zlib pam ]
|
[ zlib pam ]
|
||||||
++ lib.optional (ncurses != null) ncurses
|
++ lib.filter (p: p != null) [ ncurses systemd perl ];
|
||||||
++ lib.optional (systemd != null) systemd
|
|
||||||
++ lib.optional (perl != null) perl;
|
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
rm "$bin/bin/su" # su should be supplied by the su package (shadow)
|
rm "$bin/bin/su" # su should be supplied by the su package (shadow)
|
||||||
|
Loading…
Reference in New Issue
Block a user