diff --git a/pkgs/tools/security/gopass/default.nix b/pkgs/tools/security/gopass/default.nix index 7f7a18534734..30cc99a05925 100644 --- a/pkgs/tools/security/gopass/default.nix +++ b/pkgs/tools/security/gopass/default.nix @@ -53,6 +53,9 @@ buildGoModule rec { --prefix PATH : "${wrapperPath}" \ --set GOPASS_NO_REMINDER true ''; + passthru = { + inherit wrapperPath; + }; meta = with lib; { description = "The slightly more awesome Standard Unix Password Manager for Teams. Written in Go"; diff --git a/pkgs/tools/security/gopass/jsonapi.nix b/pkgs/tools/security/gopass/jsonapi.nix index f77c54530116..febe9abf0ea7 100644 --- a/pkgs/tools/security/gopass/jsonapi.nix +++ b/pkgs/tools/security/gopass/jsonapi.nix @@ -1,7 +1,9 @@ { lib +, makeWrapper , buildGoModule , fetchFromGitHub , installShellFiles +, gopass }: buildGoModule rec { @@ -19,12 +21,17 @@ buildGoModule rec { subPackages = [ "." ]; - nativeBuildInputs = [ installShellFiles ]; + nativeBuildInputs = [ installShellFiles makeWrapper ]; ldflags = [ "-s" "-w" "-X main.version=${version}" "-X main.commit=${src.rev}" ]; + postFixup = '' + wrapProgram $out/bin/gopass-jsonapi \ + --prefix PATH : "${gopass.wrapperPath}" + ''; + meta = with lib; { description = "Enables communication with gopass via JSON messages"; homepage = "https://www.gopass.pw/";