summary refs log tree commit diff
path: root/pkgs/tools/security/doas
diff options
context:
space:
mode:
authorCole Helbling <cole.e.helbling@outlook.com>2020-05-17 11:25:04 -0700
committerCole Helbling <cole.e.helbling@outlook.com>2020-05-17 11:42:50 -0700
commit0f8e972f019a92f3670af5eb7ca3eb3c928330bb (patch)
tree6e57a58e57a0ff934466da531f7c2c6bea3a8931 /pkgs/tools/security/doas
parent01b645e872107806e61cf54cc1415a843f3af795 (diff)
downloadnixpkgs-0f8e972f019a92f3670af5eb7ca3eb3c928330bb.tar
nixpkgs-0f8e972f019a92f3670af5eb7ca3eb3c928330bb.tar.gz
nixpkgs-0f8e972f019a92f3670af5eb7ca3eb3c928330bb.tar.bz2
nixpkgs-0f8e972f019a92f3670af5eb7ca3eb3c928330bb.tar.lz
nixpkgs-0f8e972f019a92f3670af5eb7ca3eb3c928330bb.tar.xz
nixpkgs-0f8e972f019a92f3670af5eb7ca3eb3c928330bb.tar.zst
nixpkgs-0f8e972f019a92f3670af5eb7ca3eb3c928330bb.zip
doas: enable timestamp by default and set pamdir
* `--with-timestamp` enables the usage of the `persist` setting in
`doas.conf`. It is possible some people might not want this, so the flag
`withTimestamp` was added to control this.
* `--pamdir` copies the PAM files to `$out/etc/pam.d`. This may or may
not have a use in the future, but it removes a some errors from the
build (when it tries to copy these files to /etc/pam.d).
Diffstat (limited to 'pkgs/tools/security/doas')
-rw-r--r--pkgs/tools/security/doas/default.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkgs/tools/security/doas/default.nix b/pkgs/tools/security/doas/default.nix
index 58ada1086bc..8cc9017a8fe 100644
--- a/pkgs/tools/security/doas/default.nix
+++ b/pkgs/tools/security/doas/default.nix
@@ -3,6 +3,8 @@
 , fetchFromGitHub
 , bison
 , pam
+
+, withTimestamp ? true
 }:
 
 stdenv.mkDerivation rec {
@@ -19,6 +21,11 @@ stdenv.mkDerivation rec {
   # otherwise confuses ./configure
   dontDisableStatic = true;
 
+  configureFlags = [
+    (lib.optionalString withTimestamp "--with-timestamp") # to allow the "persist" setting
+    "--pamdir=${placeholder "out"}/etc/pam.d"
+  ];
+
   postPatch = ''
     sed -i '/\(chown\|chmod\)/d' bsd.prog.mk
   '';