From af3d448d335cd22355b6b84857520cfa5cfb380e Mon Sep 17 00:00:00 2001 From: Daniel Bergey Date: Fri, 6 Jun 2014 01:22:24 +0000 Subject: [PATCH] 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). --- pkgs/tools/security/pass/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/security/pass/default.nix b/pkgs/tools/security/pass/default.nix index 505bdd2efc86..d3e2c50991a1 100644 --- a/pkgs/tools/security/pass/default.nix +++ b/pkgs/tools/security/pass/default.nix @@ -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 ""}" ''; }