2021-02-19 19:06:45 +00:00
|
|
|
{ lib
|
|
|
|
, makeWrapper
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, gopass
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "gopass-jsonapi";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.15.8";
|
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-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-CL9PcztiFCCy1T7w0v2SzLmwkA6z8aPUx65ye5AJDr4=";
|
2021-02-19 19:06:45 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
vendorHash = "sha256-Czlp3MyxRGcIV5uFZzF8t0JrucLzPzxyCUCtjICjPM0=";
|
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
|
|
|
};
|
|
|
|
}
|