Pass: Use default gpg(2) & use lib.makeSearchPath.

This commit is contained in:
Moritz Ulrich 2015-04-15 10:45:43 +02:00
parent 272f813ec1
commit 3fa9fe1dd1
2 changed files with 18 additions and 10 deletions

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl
, coreutils, gnused, getopt, pwgen, git, tree, gnupg
, coreutils, gnused, getopt, pwgen, git, tree, gnupg, which
, makeWrapper
, xclip ? null, xdotool ? null, dmenu ? null
@ -59,6 +59,16 @@ stdenv.mkDerivation rec {
'' else ""}
'';
wrapperPath = with stdenv.lib; makeSearchPath "bin/" ([
coreutils
gnused
getopt
git
gnupg
tree
which
] ++ ifEnable x11Support [ dmenu xclip xdotool ]);
postFixup = ''
# Fix program name in --help
substituteInPlace $out/bin/pass \
@ -66,11 +76,11 @@ stdenv.mkDerivation rec {
# Ensure all dependencies are in PATH
wrapProgram $out/bin/pass \
--prefix PATH : "${coreutils}/bin:${gnused}/bin:${getopt}/bin:${gnupg}/bin:${git}/bin:${tree}/bin:${pwgen}/bin${if x11Support then ":${xclip}/bin" else ""}"
${if x11Support then ''
--prefix PATH : "${wrapperPath}"
'' + stdenv.lib.optionalString x11Support ''
# 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 \
--prefix PATH : "$out/bin:${xdotool}/bin:${dmenu}/bin"
'' else ""}
--prefix PATH : "$out/bin:${wrapperPath}"
'';
}

View File

@ -578,9 +578,7 @@ let
otool = callPackage ../os-specific/darwin/otool { };
pass = callPackage ../tools/security/pass {
gnupg = gnupg1compat;
};
pass = callPackage ../tools/security/pass { };
setfile = callPackage ../os-specific/darwin/setfile { };