2021-02-19 19:06:45 +00:00
|
|
|
{ lib
|
|
|
|
, makeWrapper
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, gopass
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "gopass-jsonapi";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "1.15.11";
|
2021-02-19 19:06:45 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gopasspw";
|
2023-02-16 17:41:37 +00:00
|
|
|
repo = "gopass-jsonapi";
|
2021-02-19 19:06:45 +00:00
|
|
|
rev = "v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-wJlnm+sgFg55LW4RWGjcT538DgNhJtFjwgwgqwLWH50=";
|
2021-02-19 19:06:45 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
vendorHash = "sha256-qRmPO2WM9RD43twl5a47IT3xC1LGFwNF99ojIU2xg6A=";
|
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 = ''
|
2022-09-22 12:36:57 +00:00
|
|
|
wrapProgram $out/bin/gopass-jsonapi \
|
2023-03-27 19:17:25 +00:00
|
|
|
--prefix PATH : "${gopass.wrapperPath}"
|
2021-02-19 19:06:45 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Enables communication with gopass via JSON messages";
|
2023-08-10 07:59:29 +00:00
|
|
|
homepage = "https://github.com/gopasspw/gopass-jsonapi";
|
|
|
|
changelog = "https://github.com/gopasspw/gopass-jsonapi/blob/v${version}/CHANGELOG.md";
|
2021-02-19 19:06:45 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ maxhbr ];
|
2023-10-09 19:29:22 +00:00
|
|
|
mainProgram = "gopass-jsonapi";
|
2021-02-19 19:06:45 +00:00
|
|
|
};
|
|
|
|
}
|