diff options
author | Sandro <sandro.jaeckel@gmail.com> | 2021-02-18 12:27:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-18 12:27:32 +0100 |
commit | a56d4ff21c1ee0a699121b7985843971281e3990 (patch) | |
tree | fedfa90ca346fda088c89d9075612e070cfda4a7 /pkgs/tools/security | |
parent | 6c004c3c8258cd23b0d77301b39c1180033813d4 (diff) | |
parent | 64db5303827ffbfadd4ebe7a02366cb7c1f92da1 (diff) |
Merge pull request #113273 from maxhbr/add-gopass-jsonapi
Diffstat (limited to 'pkgs/tools/security')
-rw-r--r-- | pkgs/tools/security/gopass/jsonapi.nix | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/tools/security/gopass/jsonapi.nix b/pkgs/tools/security/gopass/jsonapi.nix new file mode 100644 index 0000000000000..5070cbe3f0d9e --- /dev/null +++ b/pkgs/tools/security/gopass/jsonapi.nix @@ -0,0 +1,43 @@ +{ lib +, makeWrapper +, buildGoModule +, fetchFromGitHub +, installShellFiles +, gopass +}: + +buildGoModule rec { + pname = "gopass-jsonapi"; + version = "1.11.1"; + + src = fetchFromGitHub { + owner = "gopasspw"; + repo = pname; + rev = "v${version}"; + sha256 = "03xhza7n92xg12z83as9qdvvc0yx1qy6q0c7i4njvng594f9a8x2"; + }; + + vendorSha256 = "0d4fyppsdfzvmjb0qvpnfnw0vl6z256bly7hfb0whk6rldks60wr"; + + subPackages = [ "." ]; + + nativeBuildInputs = [ installShellFiles makeWrapper ]; + + preBuild = '' + buildFlagsArray+=( + "-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/"; + license = licenses.mit; + maintainers = with maintainers; [ maxhbr ]; + platforms = platforms.unix; + }; +} |