From 3fa9fe1dd1f57d0178292133ec794e0108893ceb Mon Sep 17 00:00:00 2001 From: Moritz Ulrich Date: Wed, 15 Apr 2015 10:45:43 +0200 Subject: Pass: Use default gpg(2) & use lib.makeSearchPath. --- pkgs/tools/security/pass/default.nix | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'pkgs/tools/security/pass') diff --git a/pkgs/tools/security/pass/default.nix b/pkgs/tools/security/pass/default.nix index 1aa5e0b51f1b..c03029232ac0 100644 --- a/pkgs/tools/security/pass/default.nix +++ b/pkgs/tools/security/pass/default.nix @@ -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 '' - wrapProgram $out/bin/passmenu \ - --prefix PATH : "$out/bin:${xdotool}/bin:${dmenu}/bin" - '' else ""} + --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:${wrapperPath}" ''; } -- cgit 1.4.1