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

View File

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