1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

sudo: fix for structured attrs

This commit is contained in:
Maximilian Bosch 2019-11-15 11:32:45 +01:00 committed by Jan Tojnar
parent 15468f9a4b
commit 91a1f2043f
No known key found for this signature in database
GPG key ID: 7FAB2A15F7A607A4

View file

@ -41,6 +41,15 @@ stdenv.mkDerivation rec {
"--with-passprompt=[sudo] password for %p: " # intentional trailing space "--with-passprompt=[sudo] password for %p: " # intentional trailing space
]; ];
installFlags = [
"sudoers_uid=$(shell id -u)"
"sudoers_gid=$(shell id -g)"
"sysconfdir=${placeholder ''out''}/etc"
"rundir=$(TMPDIR)/dummy"
"vardir=$(TMPDIR)/dummy"
"DESTDIR=/"
];
postConfigure = postConfigure =
'' ''
cat >> pathnames.h <<'EOF' cat >> pathnames.h <<'EOF'
@ -48,7 +57,6 @@ stdenv.mkDerivation rec {
#define _PATH_MV "${coreutils}/bin/mv" #define _PATH_MV "${coreutils}/bin/mv"
EOF EOF
makeFlags="install_uid=$(id -u) install_gid=$(id -g)" makeFlags="install_uid=$(id -u) install_gid=$(id -g)"
installFlags="sudoers_uid=$(id -u) sudoers_gid=$(id -g) sysconfdir=$out/etc rundir=$TMPDIR/dummy vardir=$TMPDIR/dummy DESTDIR=/"
''; '';
nativeBuildInputs = [ groff ]; nativeBuildInputs = [ groff ];