pass: 1.6.5 -> 1.7
This commit is contained in:
parent
6ad3d089f1
commit
edcbb6da11
@ -1,28 +1,27 @@
|
|||||||
{ stdenv, fetchurl
|
{ stdenv, lib, fetchurl
|
||||||
, coreutils, gnused, getopt, pwgen, git, tree, gnupg, which, procps
|
, coreutils, gnused, getopt, git, tree, gnupg, which, procps, qrencode
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
|
|
||||||
, xclip ? null, xdotool ? null, dmenu ? null
|
, xclip ? null, xdotool ? null, dmenu ? null
|
||||||
, x11Support ? !stdenv.isDarwin
|
, x11Support ? !stdenv.isDarwin
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
assert x11Support -> xclip != null
|
assert x11Support -> xclip != null
|
||||||
&& xdotool != null
|
&& xdotool != null
|
||||||
&& dmenu != null;
|
&& dmenu != null;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "1.6.5";
|
version = "1.7";
|
||||||
name = "password-store-${version}";
|
name = "password-store-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "http://git.zx2c4.com/password-store/snapshot/${name}.tar.xz";
|
url = "http://git.zx2c4.com/password-store/snapshot/${name}.tar.xz";
|
||||||
sha256 = "05bk3lrp5jwg0v338lvylp7glpliydzz4jf5pjr6k3kagrv3jyik";
|
sha256 = "002mw7j0m33bw483rllzhcf41wp3ixka8yma6kqrfaj57jyw66hn";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches =
|
patches = stdenv.lib.optional stdenv.isDarwin ./no-darwin-getopt.patch;
|
||||||
[ ./program-name.patch
|
|
||||||
./set-correct-program-name-for-sleep.patch
|
|
||||||
] ++ stdenv.lib.optional stdenv.isDarwin ./no-darwin-getopt.patch;
|
|
||||||
|
|
||||||
buildInputs = [ makeWrapper ];
|
buildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
@ -30,7 +29,7 @@ stdenv.mkDerivation rec {
|
|||||||
description = "Stores, retrieves, generates, and synchronizes passwords securely";
|
description = "Stores, retrieves, generates, and synchronizes passwords securely";
|
||||||
homepage = http://www.passwordstore.org/;
|
homepage = http://www.passwordstore.org/;
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
maintainers = with maintainers; [ lovek323 the-kenny ];
|
maintainers = with maintainers; [ lovek323 the-kenny fpletz ];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
|
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
@ -56,10 +55,8 @@ stdenv.mkDerivation rec {
|
|||||||
# himself.
|
# himself.
|
||||||
mkdir -p "$out/share/emacs/site-lisp"
|
mkdir -p "$out/share/emacs/site-lisp"
|
||||||
cp "contrib/emacs/password-store.el" "$out/share/emacs/site-lisp/"
|
cp "contrib/emacs/password-store.el" "$out/share/emacs/site-lisp/"
|
||||||
|
'' + optionalString x11Support ''
|
||||||
${if x11Support then ''
|
|
||||||
cp "contrib/dmenu/passmenu" "$out/bin/"
|
cp "contrib/dmenu/passmenu" "$out/bin/"
|
||||||
'' else ""}
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
wrapperPath = with stdenv.lib; makeBinPath ([
|
wrapperPath = with stdenv.lib; makeBinPath ([
|
||||||
@ -68,16 +65,16 @@ stdenv.mkDerivation rec {
|
|||||||
git
|
git
|
||||||
gnupg
|
gnupg
|
||||||
gnused
|
gnused
|
||||||
pwgen
|
|
||||||
tree
|
tree
|
||||||
which
|
which
|
||||||
|
qrencode
|
||||||
] ++ stdenv.lib.optional stdenv.isLinux procps
|
] ++ stdenv.lib.optional stdenv.isLinux procps
|
||||||
++ ifEnable x11Support [ dmenu xclip xdotool ]);
|
++ 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 \
|
||||||
--replace "\$program" "pass"
|
--replace 'PROGRAM="''${0##*/}"' "PROGRAM=pass"
|
||||||
|
|
||||||
# Ensure all dependencies are in PATH
|
# Ensure all dependencies are in PATH
|
||||||
wrapProgram $out/bin/pass \
|
wrapProgram $out/bin/pass \
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
diff --git a/src/password-store.sh b/src/password-store.sh
|
|
||||||
index 6313384..6607a98 100755
|
|
||||||
--- a/src/password-store.sh
|
|
||||||
+++ b/src/password-store.sh
|
|
||||||
@@ -573,7 +573,7 @@ cmd_git() {
|
|
||||||
# END subcommand functions
|
|
||||||
#
|
|
||||||
|
|
||||||
-PROGRAM="${0##*/}"
|
|
||||||
+PROGRAM="pass"
|
|
||||||
COMMAND="$1"
|
|
||||||
|
|
||||||
case "$1" in
|
|
@ -1,33 +0,0 @@
|
|||||||
From 6ad29ae97263060c9ec95856e0d8ab18409108c0 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Franz Pletz <fpletz@fnordicwalking.de>
|
|
||||||
Date: Sat, 3 Sep 2016 05:45:36 +0200
|
|
||||||
Subject: [PATCH] Set correct program name for sleep
|
|
||||||
|
|
||||||
---
|
|
||||||
src/password-store.sh | 7 +++++--
|
|
||||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/password-store.sh b/src/password-store.sh
|
|
||||||
index 63be840..ca47df3 100755
|
|
||||||
--- a/src/password-store.sh
|
|
||||||
+++ b/src/password-store.sh
|
|
||||||
@@ -133,11 +133,14 @@ clip() {
|
|
||||||
# variable. Specifically, it cannot store nulls nor (non-trivally) store
|
|
||||||
# trailing new lines.
|
|
||||||
local sleep_argv0="password store sleep on display $DISPLAY"
|
|
||||||
- pkill -f "^$sleep_argv0" 2>/dev/null && sleep 0.5
|
|
||||||
+ pkill -P $(pgrep -f "^$sleep_argv0") 2>/dev/null && sleep 0.5
|
|
||||||
local before="$(xclip -o -selection "$X_SELECTION" 2>/dev/null | base64)"
|
|
||||||
echo -n "$1" | xclip -selection "$X_SELECTION" || die "Error: Could not copy data to the clipboard"
|
|
||||||
(
|
|
||||||
- ( exec -a "$sleep_argv0" sleep "$CLIP_TIME" )
|
|
||||||
+ # Execute sleep as a child process of bash because it may be
|
|
||||||
+ # a symlink to a single binary version of coreutils or busybox
|
|
||||||
+ # which depends on argv0 correctly set to "sleep"
|
|
||||||
+ ( exec -a "$sleep_argv0" bash <(echo sleep "$CLIP_TIME") )
|
|
||||||
local now="$(xclip -o -selection "$X_SELECTION" | base64)"
|
|
||||||
[[ $now != $(echo -n "$1" | base64) ]] && before="$now"
|
|
||||||
|
|
||||||
--
|
|
||||||
2.9.3
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user