gopass: Support passAlias parameter in derivation
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"™
This commit is contained in:
parent
d9f4f0645c
commit
67f7f93fd6
@ -1,4 +1,11 @@
|
||||
{ stdenv, buildGoModule, fetchFromGitHub, git, gnupg, xclip, wl-clipboard, installShellFiles, makeWrapper }:
|
||||
{ stdenv, makeWrapper
|
||||
, buildGoModule, fetchFromGitHub, installShellFiles
|
||||
, git
|
||||
, gnupg
|
||||
, xclip
|
||||
, wl-clipboard
|
||||
, passAlias ? false
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "gopass";
|
||||
@ -28,6 +35,8 @@ buildGoModule rec {
|
||||
$out/bin/gopass completion $shell > gopass.$shell
|
||||
installShellCompletion gopass.$shell
|
||||
done
|
||||
'' + stdenv.lib.optionalString passAlias ''
|
||||
ln -s $bin/bin/gopass $bin/bin/pass
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
|
Loading…
x
Reference in New Issue
Block a user