2021-02-19 19:06:45 +00:00
|
|
|
{ lib
|
|
|
|
, makeWrapper
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, gopass
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "gopass-jsonapi";
|
2023-08-10 07:59:29 +00:00
|
|
|
version = "1.15.7";
|
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}";
|
2023-08-10 07:59:29 +00:00
|
|
|
hash = "sha256-lwY5uc6eKqXO8FbvzlrpQY0y5AEcV0RQFvvnE+At6z0=";
|
2021-02-19 19:06:45 +00:00
|
|
|
};
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
vendorHash = "sha256-BKwgP22l4t4jaAHHh+ZD/2nroCtAp/A6DqHt+9HZzKw=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|