From 67f7f93fd67eb8acf37afe096ad330cbd7f6e505 Mon Sep 17 00:00:00 2001 From: Roman Volosatovs Date: Sun, 5 Apr 2020 20:36:26 +0200 Subject: [PATCH 1/2] gopass: Support passAlias parameter in derivation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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` https://github.com/docker/docker-credential-helpers/blob/f78081d1f7fef6ad74ad6b79368de6348386e591/pass/pass_linux.go#L67. By setting `passAlias` to `true` (e.g. via overlays like so: https://github.com/rvolosatovs/infrastructure/blob/94971f34db9df79b6666e626fa52840eb1fee840/nixpkgs/overlays.nix#L315-L317), secure Docker authentication via `gopass` "just works"™ --- pkgs/tools/security/gopass/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/security/gopass/default.nix b/pkgs/tools/security/gopass/default.nix index 410b63ec7d75..d7db6ea825ca 100644 --- a/pkgs/tools/security/gopass/default.nix +++ b/pkgs/tools/security/gopass/default.nix @@ -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 = '' From ae19e155a5bfae537d8c1e4ca4bd4de82ae3c42a Mon Sep 17 00:00:00 2001 From: Roman Volosatovs Date: Tue, 5 May 2020 20:28:40 +0200 Subject: [PATCH 2/2] gopass: Add myself to maintainers --- pkgs/tools/security/gopass/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/security/gopass/default.nix b/pkgs/tools/security/gopass/default.nix index d7db6ea825ca..8d7cb5810d9f 100644 --- a/pkgs/tools/security/gopass/default.nix +++ b/pkgs/tools/security/gopass/default.nix @@ -48,7 +48,7 @@ buildGoModule rec { description = "The slightly more awesome Standard Unix Password Manager for Teams. Written in Go."; homepage = "https://www.gopass.pw/"; license = licenses.mit; - maintainers = with maintainers; [ andir ]; + maintainers = with maintainers; [ andir rvolosatovs ]; platforms = platforms.unix; longDescription = ''