summary refs log tree commit diff
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2019-11-15 11:32:45 +0100
committerJan Tojnar <jtojnar@gmail.com>2019-12-31 01:31:52 +0100
commit91a1f2043f4b3df24c37e88ee5840499f9258462 (patch)
tree9277d3896a1467b0bbadc252a2d3cbcb52f8f4ba
parent15468f9a4b2a6cf31618d52561f202dbbc1fd2d9 (diff)
downloadnixpkgs-91a1f2043f4b3df24c37e88ee5840499f9258462.tar
nixpkgs-91a1f2043f4b3df24c37e88ee5840499f9258462.tar.gz
nixpkgs-91a1f2043f4b3df24c37e88ee5840499f9258462.tar.bz2
nixpkgs-91a1f2043f4b3df24c37e88ee5840499f9258462.tar.lz
nixpkgs-91a1f2043f4b3df24c37e88ee5840499f9258462.tar.xz
nixpkgs-91a1f2043f4b3df24c37e88ee5840499f9258462.tar.zst
nixpkgs-91a1f2043f4b3df24c37e88ee5840499f9258462.zip
sudo: fix for structured attrs
-rw-r--r--pkgs/tools/security/sudo/default.nix10
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgs/tools/security/sudo/default.nix b/pkgs/tools/security/sudo/default.nix
index a0922f4df73..d2877a1ff1b 100644
--- a/pkgs/tools/security/sudo/default.nix
+++ b/pkgs/tools/security/sudo/default.nix
@@ -41,6 +41,15 @@ stdenv.mkDerivation rec {
     "--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 =
     ''
     cat >> pathnames.h <<'EOF'
@@ -48,7 +57,6 @@ stdenv.mkDerivation rec {
       #define _PATH_MV "${coreutils}/bin/mv"
     EOF
     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 ];