depot/third_party/nixpkgs/pkgs/tools/security/gopass/jsonapi.nix

41 lines
903 B
Nix
Raw Normal View History

{ lib
, makeWrapper
, buildGoModule
, fetchFromGitHub
, installShellFiles
, gopass
}:
buildGoModule rec {
pname = "gopass-jsonapi";
version = "1.14.3";
src = fetchFromGitHub {
owner = "gopasspw";
repo = pname;
rev = "v${version}";
sha256 = "sha256-uLsKxx2Yr0g3vf2AQqRqRzNsBX2D4+6wwxM+czthL+I=";
};
vendorSha256 = "sha256-QEqtyHb+/tpbbHLCSBw7uafAtKzKkmxoFGqFVHSR03I=";
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 ];
};
}