aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/tools/security/pass
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/tools/security/pass')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/security/pass/default.nix33
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/security/pass/extensions/0001-Fix-installation-with-Nix.patch41
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/security/pass/extensions/audit/default.nix3
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/security/pass/extensions/genphrase.nix4
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/security/pass/extensions/import.nix38
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/security/pass/extensions/update.nix2
-rw-r--r--infra/libkookie/nixpkgs/pkgs/tools/security/pass/rofi-pass.nix4
7 files changed, 83 insertions, 42 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/security/pass/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/security/pass/default.nix
index 76b90d5b8858..354437a9bd56 100644
--- a/infra/libkookie/nixpkgs/pkgs/tools/security/pass/default.nix
+++ b/infra/libkookie/nixpkgs/pkgs/tools/security/pass/default.nix
@@ -1,9 +1,9 @@
{ stdenv, lib, pkgs, fetchurl, buildEnv
-, coreutils, gnused, getopt, git, tree, gnupg, openssl, which, procps
-, qrencode , makeWrapper, pass, symlinkJoin
+, coreutils, findutils, gnugrep, gnused, getopt, git, tree, gnupg, openssl
+, which, procps , qrencode , makeWrapper, pass, symlinkJoin
, xclip ? null, xdotool ? null, dmenu ? null
-, x11Support ? !stdenv.isDarwin
+, x11Support ? !stdenv.isDarwin , dmenuSupport ? x11Support
, waylandSupport ? false, wl-clipboard ? null
# For backwards-compatibility
@@ -12,9 +12,11 @@
with lib;
-assert x11Support -> xclip != null
- && xdotool != null
- && dmenu != null;
+assert x11Support -> xclip != null;
+
+assert dmenuSupport -> dmenu != null
+ && xdotool != null
+ && x11Support;
assert waylandSupport -> wl-clipboard != null;
@@ -32,11 +34,15 @@ let
postBuild = ''
files=$(find $out/bin/ -type f -exec readlink -f {} \;)
- rm $out/bin
- mkdir $out/bin
+ if [ -L $out/bin ]; then
+ rm $out/bin
+ mkdir $out/bin
+ fi
for i in $files; do
- ln -sf $i $out/bin/$(basename $i)
+ if ! [ "$(readlink -f "$out/bin/$(basename $i)")" = "$i" ]; then
+ ln -sf $i $out/bin/$(basename $i)
+ fi
done
wrapProgram $out/bin/pass \
@@ -72,14 +78,16 @@ stdenv.mkDerivation rec {
# himself.
mkdir -p "$out/share/emacs/site-lisp"
cp "contrib/emacs/password-store.el" "$out/share/emacs/site-lisp/"
- '' + optionalString x11Support ''
+ '' + optionalString dmenuSupport ''
cp "contrib/dmenu/passmenu" "$out/bin/"
'';
wrapperPath = with stdenv.lib; makeBinPath ([
coreutils
+ findutils
getopt
git
+ gnugrep
gnupg
gnused
tree
@@ -87,7 +95,8 @@ stdenv.mkDerivation rec {
qrencode
procps
] ++ optional stdenv.isDarwin openssl
- ++ ifEnable x11Support [ dmenu xclip xdotool ]
+ ++ optional x11Support xclip
+ ++ optionals dmenuSupport [ xdotool dmenu ]
++ optional waylandSupport wl-clipboard);
postFixup = ''
@@ -98,7 +107,7 @@ stdenv.mkDerivation rec {
# Ensure all dependencies are in PATH
wrapProgram $out/bin/pass \
--prefix PATH : "${wrapperPath}"
- '' + stdenv.lib.optionalString x11Support ''
+ '' + stdenv.lib.optionalString dmenuSupport ''
# 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 \
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/security/pass/extensions/0001-Fix-installation-with-Nix.patch b/infra/libkookie/nixpkgs/pkgs/tools/security/pass/extensions/0001-Fix-installation-with-Nix.patch
new file mode 100644
index 000000000000..55822f170d14
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/tools/security/pass/extensions/0001-Fix-installation-with-Nix.patch
@@ -0,0 +1,41 @@
+From 611cb2de31a460789c44615d3a52b8d24dbd6fdd Mon Sep 17 00:00:00 2001
+From: Maximilian Bosch <maximilian@mbosch.me>
+Date: Fri, 4 Dec 2020 21:53:52 +0100
+Subject: [PATCH] Fix installation with Nix
+
+---
+ Makefile | 2 +-
+ setup.py | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 2febf4e..8feab91 100644
+--- a/Makefile
++++ b/Makefile
+@@ -7,7 +7,7 @@ all:
+ @echo
+
+ install:
+- @python3 setup.py install --root="$(DESTDIR)" --optimize=1 --skip-build
++ @python3 setup.py install --root="$(DESTDIR)" --optimize=1 --skip-build --prefix=
+ @echo
+ @echo "pass-import is installed succesfully"
+ @echo
+diff --git a/setup.py b/setup.py
+index b30870c..d9fedbc 100644
+--- a/setup.py
++++ b/setup.py
+@@ -15,8 +15,8 @@ with Path('pass_import', '__about__.py').open() as file:
+ with open('README.md') as file:
+ long_description = file.read()
+
+-share = Path(sys.prefix, 'share')
+-lib = Path('/usr', 'lib', 'password-store', 'extensions')
++share = Path('/share')
++lib = Path('/lib', 'password-store', 'extensions')
+ if '--user' in sys.argv:
+ lib = Path.home() / '.password-store' / 'extensions'
+ if 'XDG_DATA_HOME' in os.environ:
+--
+2.28.0
+
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/security/pass/extensions/audit/default.nix b/infra/libkookie/nixpkgs/pkgs/tools/security/pass/extensions/audit/default.nix
index 144d13238f26..ec0f23ddc383 100644
--- a/infra/libkookie/nixpkgs/pkgs/tools/security/pass/extensions/audit/default.nix
+++ b/infra/libkookie/nixpkgs/pkgs/tools/security/pass/extensions/audit/default.nix
@@ -30,7 +30,8 @@ in stdenv.mkDerivation rec {
buildInputs = [ pythonEnv ];
nativeBuildInputs = [ makeWrapper ];
- doCheck = true;
+ # Tests freeze on darwin with: pass-audit-1.1 (checkPhase): EOFError
+ doCheck = !stdenv.isDarwin;
checkInputs = [ pythonPackages.green pass gnupg ];
checkPhase = ''
${pythonEnv}/bin/python3 setup.py green -q
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/security/pass/extensions/genphrase.nix b/infra/libkookie/nixpkgs/pkgs/tools/security/pass/extensions/genphrase.nix
index 48db0094db94..d45e35d9bbc0 100644
--- a/infra/libkookie/nixpkgs/pkgs/tools/security/pass/extensions/genphrase.nix
+++ b/infra/libkookie/nixpkgs/pkgs/tools/security/pass/extensions/genphrase.nix
@@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "pass-genphrase";
- version = "0.2";
+ version = "0.3";
src = fetchFromGitHub {
owner = "congma";
repo = "pass-genphrase";
rev = version;
- sha256 = "1sdkmz5s6wdx4vdlgqf5kmyrm17zwzy3n52s13qpx32bnnajap1h";
+ sha256 = "01dff2jlp111y7vlmp1wbgijzphhlzc19m02fs8nzmn5vxyffanx";
};
dontBuild = true;
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/security/pass/extensions/import.nix b/infra/libkookie/nixpkgs/pkgs/tools/security/pass/extensions/import.nix
index cc5f0c94e119..885dd05110f3 100644
--- a/infra/libkookie/nixpkgs/pkgs/tools/security/pass/extensions/import.nix
+++ b/infra/libkookie/nixpkgs/pkgs/tools/security/pass/extensions/import.nix
@@ -5,48 +5,38 @@ let
p.defusedxml
p.setuptools
p.pyaml
+ p.pykeepass
+ p.filemagic
+ p.cryptography
+ p.secretstorage
]);
in stdenv.mkDerivation rec {
pname = "pass-import";
- version = "2.6";
+ version = "3.1";
src = fetchFromGitHub {
owner = "roddhjav";
repo = "pass-import";
rev = "v${version}";
- sha256 = "1q8rln4djh2z8j2ycm654df5y6anm5iv2r19spgy07c3fnisxlac";
+ sha256 = "sha256-nH2xAqWfMT+Brv3z9Aw6nbvYqArEZjpM28rKsRPihqA=";
};
+ patches = [ ./0001-Fix-installation-with-Nix.patch ];
+
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ pythonEnv ];
- patches = [
- # https://github.com/roddhjav/pass-import/pull/91
- (fetchpatch {
- url = "https://github.com/roddhjav/pass-import/commit/6ccaf639e92df45bd400503757ae4aa2c5c030d7.patch";
- sha256 = "0lw9vqvbqcy96s7v7nz0i1bdx93x7qr13azymqypcdhjwmq9i63h";
- })
- ];
-
- postPatch = ''
- sed -i -e 's|$0|${pass}/bin/pass|' import.bash
- '';
-
- dontBuild = true;
-
- installFlags = [
- "PREFIX=$(out)"
- "BASHCOMPDIR=$(out)/etc/bash_completion.d"
- ];
+ makeFlags = [ "DESTDIR=${placeholder "out"}" ];
- postFixup = ''
- install -D pass_import.py $out/${pythonPackages.python.sitePackages}/pass_import.py
+ postInstall = ''
+ wrapProgram $out/bin/pimport \
+ --prefix PATH : "${pythonEnv}/bin" \
+ --prefix PYTHONPATH : "$out/${pythonPackages.python.sitePackages}"
wrapProgram $out/lib/password-store/extensions/import.bash \
--prefix PATH : "${pythonEnv}/bin" \
- --prefix PYTHONPATH : "$out/${pythonPackages.python.sitePackages}" \
- --run "export PREFIX"
+ --prefix PYTHONPATH : "$out/${pythonPackages.python.sitePackages}"
'';
meta = with stdenv.lib; {
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/security/pass/extensions/update.nix b/infra/libkookie/nixpkgs/pkgs/tools/security/pass/extensions/update.nix
index b2f331f13757..c364c341bda5 100644
--- a/infra/libkookie/nixpkgs/pkgs/tools/security/pass/extensions/update.nix
+++ b/infra/libkookie/nixpkgs/pkgs/tools/security/pass/extensions/update.nix
@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
postPatch = ''
substituteInPlace Makefile \
- --replace "BASHCOMPDIR ?= /etc/bash_completion.d" "BASHCOMPDIR ?= $out/etc/bash_completion.d"
+ --replace "BASHCOMPDIR ?= /etc/bash_completion.d" "BASHCOMPDIR ?= $out/share/bash-completion/completions"
'';
dontBuild = true;
diff --git a/infra/libkookie/nixpkgs/pkgs/tools/security/pass/rofi-pass.nix b/infra/libkookie/nixpkgs/pkgs/tools/security/pass/rofi-pass.nix
index b3c086488629..d46aac93e86b 100644
--- a/infra/libkookie/nixpkgs/pkgs/tools/security/pass/rofi-pass.nix
+++ b/infra/libkookie/nixpkgs/pkgs/tools/security/pass/rofi-pass.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, pass, rofi, coreutils, utillinux, xdotool, gnugrep
+{ stdenv, fetchFromGitHub, pass, rofi, coreutils, util-linux, xdotool, gnugrep
, libnotify, pwgen, findutils, gawk, gnused, xclip, makeWrapper
}:
@@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
(pass.withExtensions (ext: [ ext.pass-otp ]))
pwgen
rofi
- utillinux
+ util-linux
xclip
xdotool
];