pass(word-store): add option to include xclip in PATH

xclip is necessary for pass(word-store) to send passwords to the
clipboard / X-selection, rather than echoing to the terminal.

The option currently defaults to false, because someone may not want the
dependency on X libraries and also pass is really quick to build (it's
just a shell script).
This commit is contained in:
Daniel Bergey 2014-06-06 01:22:24 +00:00 committed by Bjørn Forsman
parent 9e46a0d748
commit af3d448d33

View file

@ -1,6 +1,10 @@
{ stdenv, fetchurl
, coreutils, gnused, getopt, pwgen, git, tree, gnupg
, makeWrapper }:
, makeWrapper
, withX ? false, xclip ? null
}:
assert withX -> xclip != null;
stdenv.mkDerivation rec {
version = "1.6.2";
@ -51,6 +55,6 @@ 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"
--prefix PATH : "${coreutils}/bin:${gnused}/bin:${getopt}/bin:${gnupg}/bin:${git}/bin:${tree}/bin:${pwgen}/bin${if withX then ":${xclip}/bin" else ""}"
'';
}