about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2023-12-25 13:50:31 +0100
committerMaximilian Bosch <maximilian@mbosch.me>2023-12-26 12:47:34 +0100
commitf6dcece2d0a0595050a7eb37b0bebc8b49c4515d (patch)
tree147370fe70e51a725e4d79ac84dda5cab3c1c016 /pkgs
parent7ea14cb4c33be896a6bd8ca17cfbd1636aa4e2b5 (diff)
downloadnixlib-f6dcece2d0a0595050a7eb37b0bebc8b49c4515d.tar
nixlib-f6dcece2d0a0595050a7eb37b0bebc8b49c4515d.tar.gz
nixlib-f6dcece2d0a0595050a7eb37b0bebc8b49c4515d.tar.bz2
nixlib-f6dcece2d0a0595050a7eb37b0bebc8b49c4515d.tar.lz
nixlib-f6dcece2d0a0595050a7eb37b0bebc8b49c4515d.tar.xz
nixlib-f6dcece2d0a0595050a7eb37b0bebc8b49c4515d.tar.zst
nixlib-f6dcece2d0a0595050a7eb37b0bebc8b49c4515d.zip
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.
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/tools/security/passage/default.nix19
1 files changed, 18 insertions, 1 deletions
diff --git a/pkgs/tools/security/passage/default.nix b/pkgs/tools/security/passage/default.nix
index ba7717771c00..3fc1c3f918e7 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 = ''