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.
This commit is contained in:
Maximilian Bosch
2023-12-26 12:47:34 +01:00
parent 7ea14cb4c3
commit f6dcece2d0
+18 -1
View File
@@ -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 = ''