about summary refs log tree commit diff
path: root/pkgs/tools/security/pass
diff options
context:
space:
mode:
authorVonfry <mail@vonfry.name>2020-11-19 17:57:48 +0800
committerVonfry <mail@vonfry.name>2020-11-25 18:44:18 +0800
commit118695a3500a95038eb9e6dcbf2f6bf09845497d (patch)
tree0d535066de5a6e8dc1e7efd0cacb8f00b92906b3 /pkgs/tools/security/pass
parentb3a8771443addf4f746039481da57d9d0a398bfb (diff)
pass: seperate dmenu from x11Support
Diffstat (limited to 'pkgs/tools/security/pass')
-rw-r--r--pkgs/tools/security/pass/default.nix17
1 files changed, 10 insertions, 7 deletions
diff --git a/pkgs/tools/security/pass/default.nix b/pkgs/tools/security/pass/default.nix
index 76b90d5b8858d..9ba03fc74a2f2 100644
--- a/pkgs/tools/security/pass/default.nix
+++ b/pkgs/tools/security/pass/default.nix
@@ -3,7 +3,7 @@
 , qrencode , makeWrapper, pass, symlinkJoin
 
 , xclip ? null, xdotool ? null, dmenu ? null
-, x11Support ? !stdenv.isDarwin
+, x11Support ? !stdenv.isDarwin , dmenuSupport ? x11Support
 , waylandSupport ? false, wl-clipboard ? null
 
 # For backwards-compatibility
@@ -12,9 +12,11 @@
 
 with lib;
 
-assert x11Support -> xclip != null
-                  && xdotool != null
-                  && dmenu != null;
+assert x11Support -> xclip != null;
+
+assert dmenuSupport -> dmenu != null
+                       && xdotool != null
+                       && x11Support;
 
 assert waylandSupport -> wl-clipboard != null;
 
@@ -72,7 +74,7 @@ stdenv.mkDerivation rec {
     # himself.
     mkdir -p "$out/share/emacs/site-lisp"
     cp "contrib/emacs/password-store.el" "$out/share/emacs/site-lisp/"
-  '' + optionalString x11Support ''
+  '' + optionalString dmenuSupport ''
     cp "contrib/dmenu/passmenu" "$out/bin/"
   '';
 
@@ -87,7 +89,8 @@ stdenv.mkDerivation rec {
     qrencode
     procps
   ] ++ optional stdenv.isDarwin openssl
-    ++ ifEnable x11Support [ dmenu xclip xdotool ]
+    ++ optional x11Support xclip
+    ++ optionals dmenuSupport [ xdotool dmenu ]
     ++ optional waylandSupport wl-clipboard);
 
   postFixup = ''
@@ -98,7 +101,7 @@ stdenv.mkDerivation rec {
     # Ensure all dependencies are in PATH
     wrapProgram $out/bin/pass \
       --prefix PATH : "${wrapperPath}"
-  '' + stdenv.lib.optionalString x11Support ''
+  '' + stdenv.lib.optionalString dmenuSupport ''
     # We just wrap passmenu with the same PATH as pass. It doesn't
     # need all the tools in there but it doesn't hurt either.
     wrapProgram $out/bin/passmenu \