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.
Not entirely sure what was wrong about the former approach tbh, but
the difference is that this patch actually replaces the placeholder
in the patch and builds a working executable on my m2 macbook air.
* passage: use getopt from nix on darwin
This removes an ugly hack from upstream which hard-codes a bunch of
paths to find gnu-getopt (as opposed to darwins getopt in
/usr/bin/getopt).
This lets nix-built passage fail on systems which don't have one of
those already installed (i.e. from homebrew).
As upstream seemingly doesn't provide a way to override this easily yet,
we do it ourselves.
---------
Co-authored-by: Weijia Wang <9713184+wegank@users.noreply.github.com>
Dependency on tree(1) is used to pretty-print list of all stored passwords.
Techically, is not needed to fetch or store password by its name, but without
it "passage" without arguments would print error.