nixpkgs/pkgs/tools/security/gopass/jsonapi.nix
2022-09-12 15:35:11 +08:00

41 lines
903 B
Nix

{ lib
, makeWrapper
, buildGoModule
, fetchFromGitHub
, installShellFiles
, gopass
}:
buildGoModule rec {
pname = "gopass-jsonapi";
version = "1.14.6";
src = fetchFromGitHub {
owner = "gopasspw";
repo = pname;
rev = "v${version}";
sha256 = "sha256-4jpW1XGT3LWucrDYsz30fKTO7v7AxDKhjx4UYE7NnMQ=";
};
vendorSha256 = "sha256-bTZ7fjRCKvp7AJcuNDHnsgB8hQUURPBCISgWtBAO1fI=";
subPackages = [ "." ];
nativeBuildInputs = [ installShellFiles makeWrapper ];
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 ];
};
}