depot/third_party/nixpkgs/pkgs/tools/security/gopass/jsonapi.nix
Default email 6d4aeb4377 Project import generated by Copybara.
GitOrigin-RevId: 0f213d0fee84280d8c3a97f7469b988d6fe5fcdf
2023-01-11 08:51:40 +01:00

41 lines
907 B
Nix

{ lib
, makeWrapper
, buildGoModule
, fetchFromGitHub
, installShellFiles
, gopass
}:
buildGoModule rec {
pname = "gopass-jsonapi";
version = "1.15.3";
src = fetchFromGitHub {
owner = "gopasspw";
repo = pname;
rev = "v${version}";
hash = "sha256-5thMhZr/ZlMHMKS2ZOyuua1ZfQ2od7QGSDBQsVsf9Os=";
};
vendorHash = "sha256-Gt5nd+3BkNQrdcq5+a70rdBXvCang/2ayZuyyZWON64=";
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 ];
};
}