Skip to content

Commit

Permalink
passage: add additional deps to wrapper
Browse files Browse the repository at this point in the history
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 f6dcece)
  • Loading branch information
Ma27 authored and github-actions[bot] committed Dec 26, 2023
1 parent c2f319b commit ebe521b
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion pkgs/tools/security/passage/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 = ''
Expand Down

0 comments on commit ebe521b

Please sign in to comment.