Skip to content

Commit

Permalink
pass: 1.6.5 -> 1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
fpletz committed Feb 26, 2017
1 parent 6ad3d08 commit edcbb6d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 61 deletions.
27 changes: 12 additions & 15 deletions pkgs/tools/security/pass/default.nix
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
{ stdenv, fetchurl
, coreutils, gnused, getopt, pwgen, git, tree, gnupg, which, procps
{ stdenv, lib, fetchurl
, coreutils, gnused, getopt, git, tree, gnupg, which, procps, qrencode
, makeWrapper

, xclip ? null, xdotool ? null, dmenu ? null
, x11Support ? !stdenv.isDarwin
}:

with lib;

assert x11Support -> xclip != null
&& xdotool != null
&& dmenu != null;

stdenv.mkDerivation rec {
version = "1.6.5";
version = "1.7";
name = "password-store-${version}";

src = fetchurl {
url = "http://git.zx2c4.com/password-store/snapshot/${name}.tar.xz";
sha256 = "05bk3lrp5jwg0v338lvylp7glpliydzz4jf5pjr6k3kagrv3jyik";
sha256 = "002mw7j0m33bw483rllzhcf41wp3ixka8yma6kqrfaj57jyw66hn";
};

patches =
[ ./program-name.patch
./set-correct-program-name-for-sleep.patch
] ++ stdenv.lib.optional stdenv.isDarwin ./no-darwin-getopt.patch;
patches = stdenv.lib.optional stdenv.isDarwin ./no-darwin-getopt.patch;

buildInputs = [ makeWrapper ];

meta = with stdenv.lib; {
description = "Stores, retrieves, generates, and synchronizes passwords securely";
homepage = http://www.passwordstore.org/;
license = licenses.gpl2Plus;
maintainers = with maintainers; [ lovek323 the-kenny ];
maintainers = with maintainers; [ lovek323 the-kenny fpletz ];
platforms = platforms.unix;

longDescription = ''
Expand All @@ -56,10 +55,8 @@ stdenv.mkDerivation rec {
# himself.
mkdir -p "$out/share/emacs/site-lisp"
cp "contrib/emacs/password-store.el" "$out/share/emacs/site-lisp/"
${if x11Support then ''
cp "contrib/dmenu/passmenu" "$out/bin/"
'' else ""}
'' + optionalString x11Support ''
cp "contrib/dmenu/passmenu" "$out/bin/"
'';

wrapperPath = with stdenv.lib; makeBinPath ([
Expand All @@ -68,16 +65,16 @@ stdenv.mkDerivation rec {
git
gnupg
gnused
pwgen
tree
which
qrencode
] ++ stdenv.lib.optional stdenv.isLinux procps
++ ifEnable x11Support [ dmenu xclip xdotool ]);

postFixup = ''
# Fix program name in --help
substituteInPlace $out/bin/pass \
--replace "\$program" "pass"
--replace 'PROGRAM="''${0##*/}"' "PROGRAM=pass"
# Ensure all dependencies are in PATH
wrapProgram $out/bin/pass \
Expand Down
13 changes: 0 additions & 13 deletions pkgs/tools/security/pass/program-name.patch

This file was deleted.

33 changes: 0 additions & 33 deletions pkgs/tools/security/pass/set-correct-program-name-for-sleep.patch

This file was deleted.

0 comments on commit edcbb6d

Please sign in to comment.