gopass maintains a ~/.cache/gopass/gpg-binary.loc file
which stores an absolute path to the gpg executable,
overriding (and ignoring) the environment $PATH.
This creates a situation where gopass will work for a period of time
after install, but after gpg is upgraded and a 'nix-store --gc' is
performed, the cached gpg path will throw an error.
A gopass maintainer has declared this a wont-fix in
https://github.com/gopasspw/gopass/issues/1662
As a workaround, add a --run clause in the wrapper script
that removes this cache file.
Once (if) upstream fixes this issue, this cruft can be removed.
Signed-off-by: Sirio Balmelli <sirio@b-ad.ch>
Add a `passAlias` to `gopass` derivation, similarly to how there's `viAlias` parameter supported by vim/neovim derivations.
Apart from convenience this is also necessary for e.g. making `docker-credential-helpers` work without patching the latter - the package uses `pass` executable from `PATH` f78081d1f7/pass/pass_linux.go (L67). By setting `passAlias` to `true` (e.g. via overlays like so: 94971f34db/nixpkgs/overlays.nix (L315-L317)), secure Docker authentication via `gopass` "just works"™
gopass tries to write a version number to it's configuaration, even when
just generating the shell completion scripts. This fails, as
/homeless-shelter is read-only inside the sandbox.
As error messages are printed to stdout instead of stderr
(see https://github.com/gopasspw/gopass/issues/877), the error message
lands inside the completion script, thus breaking it.
Workaround that by setting GOPASS_CONFIG to `/dev/null`
This is another dependency needed when invoked with "gopass -c".
I opted for xclip instead of xsel, because xclip is tried first in
order.
Signed-off-by: aszlig <aszlig@nix.build>
Cc: @andir, @suvash, @mkaito