summary refs log tree commit diff
path: root/pkgs/tools/security/pass
diff options
context:
space:
mode:
authorzimbatm <zimbatm@zimbatm.com>2016-01-29 17:50:18 +0000
committerzimbatm <zimbatm@zimbatm.com>2016-01-30 01:59:12 +0000
commit53f7baa6b8cfcf4812fb2182fa7864c780d10dcf (patch)
treeea0aff10df148864e59b040931463fa78f0f1431 /pkgs/tools/security/pass
parent77f8f35d57618c1ba456d968524f2fb2c3448295 (diff)
downloadnixpkgs-53f7baa6b8cfcf4812fb2182fa7864c780d10dcf.tar
nixpkgs-53f7baa6b8cfcf4812fb2182fa7864c780d10dcf.tar.gz
nixpkgs-53f7baa6b8cfcf4812fb2182fa7864c780d10dcf.tar.bz2
nixpkgs-53f7baa6b8cfcf4812fb2182fa7864c780d10dcf.tar.lz
nixpkgs-53f7baa6b8cfcf4812fb2182fa7864c780d10dcf.tar.xz
nixpkgs-53f7baa6b8cfcf4812fb2182fa7864c780d10dcf.tar.zst
nixpkgs-53f7baa6b8cfcf4812fb2182fa7864c780d10dcf.zip
pass: fixes .wrapped-pass in usage
When using `pass --help` for example the PROGRAM name is ".wrapped-pass"
instead of "pass".
Diffstat (limited to 'pkgs/tools/security/pass')
-rw-r--r--pkgs/tools/security/pass/default.nix4
-rw-r--r--pkgs/tools/security/pass/program-name.patch13
2 files changed, 16 insertions, 1 deletions
diff --git a/pkgs/tools/security/pass/default.nix b/pkgs/tools/security/pass/default.nix
index 03720d6abe1..56e20726793 100644
--- a/pkgs/tools/security/pass/default.nix
+++ b/pkgs/tools/security/pass/default.nix
@@ -19,7 +19,9 @@ stdenv.mkDerivation rec {
     sha256 = "05bk3lrp5jwg0v338lvylp7glpliydzz4jf5pjr6k3kagrv3jyik";
   };
 
-  patches = if stdenv.isDarwin then [ ./no-darwin-getopt.patch ] else null;
+  patches =
+    [ ./program-name.patch ] ++
+    stdenv.lib.optional stdenv.isDarwin ./no-darwin-getopt.patch;
 
   buildInputs = [ makeWrapper ];
 
diff --git a/pkgs/tools/security/pass/program-name.patch b/pkgs/tools/security/pass/program-name.patch
new file mode 100644
index 00000000000..db01942f638
--- /dev/null
+++ b/pkgs/tools/security/pass/program-name.patch
@@ -0,0 +1,13 @@
+diff --git a/src/password-store.sh b/src/password-store.sh
+index 6313384..6607a98 100755
+--- a/src/password-store.sh
++++ b/src/password-store.sh
+@@ -573,7 +573,7 @@ cmd_git() {
+ # END subcommand functions
+ #
+ 
+-PROGRAM="${0##*/}"
++PROGRAM="pass"
+ COMMAND="$1"
+ 
+ case "$1" in