2021-02-19 19:06:45 +00:00
|
|
|
{ lib
|
|
|
|
, makeWrapper
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, gopass
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "gopass-jsonapi";
|
2022-09-14 18:05:37 +00:00
|
|
|
version = "1.14.6";
|
2021-02-19 19:06:45 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gopasspw";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-09-14 18:05:37 +00:00
|
|
|
sha256 = "sha256-4jpW1XGT3LWucrDYsz30fKTO7v7AxDKhjx4UYE7NnMQ=";
|
2021-02-19 19:06:45 +00:00
|
|
|
};
|
|
|
|
|
2022-09-14 18:05:37 +00:00
|
|
|
vendorSha256 = "sha256-bTZ7fjRCKvp7AJcuNDHnsgB8hQUURPBCISgWtBAO1fI=";
|
2021-02-19 19:06:45 +00:00
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles makeWrapper ];
|
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s" "-w" "-X main.version=${version}" "-X main.commit=${src.rev}"
|
|
|
|
];
|
2021-02-19 19:06:45 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|