From 1588d6a549675836c43b0caced47d1778e099236 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 25 Jun 2018 00:52:15 +0200 Subject: [PATCH] gopass: override GOPASS_CONFIG to fix completion generation (#42400) 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` --- pkgs/tools/security/gopass/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/tools/security/gopass/default.nix b/pkgs/tools/security/gopass/default.nix index 2d7f8b86f009..25102fd07303 100644 --- a/pkgs/tools/security/gopass/default.nix +++ b/pkgs/tools/security/gopass/default.nix @@ -26,6 +26,9 @@ buildGoPackage rec { $bin/share/bash-completion/completions \ $bin/share/zsh/site-functions \ $bin/share/fish/vendor_completions.d + # by default, gopass tries to write configuration to /homeless-shelter + # during startup, which lands in stdout + export GOPASS_CONFIG=/dev/null $bin/bin/gopass completion bash > $bin/share/bash-completion/completions/_gopass $bin/bin/gopass completion zsh > $bin/share/zsh/site-functions/_gopass $bin/bin/gopass completion fish > $bin/share/fish/vendor_completions.d/gopass.fish