From a80835a2b0618a635e10712f7036ef0223a16fd7 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Thu, 23 Mar 2023 11:38:40 +0200 Subject: [PATCH 1/2] gopass-jsonapi: Don't wrap with gopass gopass-jsonapi uses gopass' Golang API now, no need for this wrapping. --- pkgs/tools/security/gopass/jsonapi.nix | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/pkgs/tools/security/gopass/jsonapi.nix b/pkgs/tools/security/gopass/jsonapi.nix index 7ce9c4cc8709..f77c54530116 100644 --- a/pkgs/tools/security/gopass/jsonapi.nix +++ b/pkgs/tools/security/gopass/jsonapi.nix @@ -1,9 +1,7 @@ { lib -, makeWrapper , buildGoModule , fetchFromGitHub , installShellFiles -, gopass }: buildGoModule rec { @@ -21,17 +19,12 @@ buildGoModule rec { subPackages = [ "." ]; - nativeBuildInputs = [ installShellFiles makeWrapper ]; + nativeBuildInputs = [ installShellFiles ]; ldflags = [ "-s" "-w" "-X main.version=${version}" "-X main.commit=${src.rev}" ]; - postFixup = '' - wrapProgram $out/bin/gopass-jsonapi \ - --prefix PATH : "${lib.makeBinPath [ gopass ]}" - ''; - meta = with lib; { description = "Enables communication with gopass via JSON messages"; homepage = "https://www.gopass.pw/"; From 0fd8c4fc72b6910092e3fc123d985d755cccbfe9 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Thu, 23 Mar 2023 11:52:10 +0200 Subject: [PATCH 2/2] gopass-jsonapi: Use the same gopass' wrapper dependencies --- pkgs/tools/security/gopass/default.nix | 3 +++ pkgs/tools/security/gopass/jsonapi.nix | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) 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/";