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>
This commit is contained in:
parent
1e8ca69151
commit
dda50e7348
@ -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
|
||||
'';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user