From ebe521b001d549012086b0e898af4e5482524da1 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 25 Dec 2023 13:50:31 +0100 Subject: [PATCH 1/2] passage: add additional deps to wrapper I realized that passage won't work properly in e.g. systemd units as these don't have `/run/current-system/sw/bin` inside their `PATH` and thus globally installed things like `coreutils` are not available there. Added the following tools now: * `coreutils` for `base64` & `shred` (most notably `passage show`). * `wl-clipboard` for copying things to the clipboard on Wayland (most notable `passage show -c`). * `gnused` for `sed` (most notably `passage show`). * `gnugrep` for `grep` (for `passage grep`). * `findutils` for `find` (most notably `mv`/`cp` - used in `reencrypt_path()`). Decided against adding stuff like `feh`/`gm` for showing a QR code. These are optional and the script falls back to printing the QR code on CLI. (cherry picked from commit f6dcece2d0a0595050a7eb37b0bebc8b49c4515d) --- pkgs/tools/security/passage/default.nix | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/security/passage/default.nix b/pkgs/tools/security/passage/default.nix index ba7717771c004..3fc1c3f918e77 100644 --- a/pkgs/tools/security/passage/default.nix +++ b/pkgs/tools/security/passage/default.nix @@ -5,6 +5,12 @@ , substituteAll , age , getopt +, coreutils +, findutils +, gnugrep +, gnused +, qrencode ? null +, wl-clipboard ? null , git ? null , xclip ? null # Used to pretty-print list of all stored passwords, but is not needed to fetch @@ -32,7 +38,18 @@ stdenv.mkDerivation { nativeBuildInputs = [ makeBinaryWrapper ]; - extraPath = lib.makeBinPath [ age git xclip tree ]; + extraPath = lib.makeBinPath [ + age + coreutils + findutils + git + gnugrep + gnused + qrencode + tree + wl-clipboard + xclip + ]; # Using $0 is bad, it causes --help to mention ".passage-wrapped". postInstall = '' From 59118171493a4a142fee8bc741819ba4c5b832c4 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 25 Dec 2023 13:57:36 +0100 Subject: [PATCH 2/2] passage: add ma27 as maintainer I've been a long-time `pass(1)` user, but I'm trying to get rid of GPG personally, so this seems to be the way to go. (cherry picked from commit e663cbe65d0161e7c74919831c77313cb81b5911) --- pkgs/tools/security/passage/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/security/passage/default.nix b/pkgs/tools/security/passage/default.nix index 3fc1c3f918e77..1d6bdfa225aab 100644 --- a/pkgs/tools/security/passage/default.nix +++ b/pkgs/tools/security/passage/default.nix @@ -63,7 +63,7 @@ stdenv.mkDerivation { description = "Stores, retrieves, generates, and synchronizes passwords securely"; homepage = "https://github.com/FiloSottile/passage"; license = licenses.gpl2Plus; - maintainers = with maintainers; [ kaction ]; + maintainers = with maintainers; [ kaction ma27 ]; platforms = platforms.unix; mainProgram = "passage";