diff options
author | Sirio Balmelli <sirio@b-ad.ch> | 2020-12-14 08:29:41 +0100 |
---|---|---|
committer | Sirio Balmelli <sirio@b-ad.ch> | 2020-12-14 08:59:23 +0100 |
commit | dda50e73481c2db4af0c9cf783cd3b49e0cf95dd (patch) | |
tree | e7f96c2bf575df8b039382c175334a2546055c0b /pkgs/tools | |
parent | 1e8ca69151d384b17c3e4490ae2dc1e06b50bae3 (diff) |
gopass: fix impurity which breaks gopass after 'nix-store --gc'
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>
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/security/gopass/default.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkgs/tools/security/gopass/default.nix b/pkgs/tools/security/gopass/default.nix index 80a9c40ebc2e..ff855cce240c 100644 --- a/pkgs/tools/security/gopass/default.nix +++ b/pkgs/tools/security/gopass/default.nix @@ -46,10 +46,12 @@ buildGoModule rec { ln -s $out/bin/gopass $out/bin/pass ''; + # --run to work around WONTFIX in https://github.com/gopasspw/gopass/issues/1662 postFixup = '' for bin in $out/bin/*; do wrapProgram $bin \ - --prefix PATH : "${wrapperPath}" + --prefix PATH : "${wrapperPath}" \ + --run 'rm -f "''${XDG_CONFIG_HOME:-~/.config}/gopass/gpg-binary.loc"' done ''; |