depot/third_party/nixpkgs/pkgs/tools/security/gopass/jsonapi.nix
Default email b450903751 Project import generated by Copybara.
GitOrigin-RevId: 74a1793c659d09d7cf738005308b1f86c90cb59b
2022-09-09 16:08:57 +02:00

40 lines
903 B
Nix

{ lib
, makeWrapper
, buildGoModule
, fetchFromGitHub
, installShellFiles
, gopass
}:
buildGoModule rec {
pname = "gopass-jsonapi";
version = "1.14.5";
src = fetchFromGitHub {
owner = "gopasspw";
repo = pname;
rev = "v${version}";
sha256 = "sha256-zEyzoIl5LiVbNSRebbcE70HxhOGYaZvArdHQqgvi1ns=";
};
vendorSha256 = "sha256-mcI8ys+Vs46BEaETzsf0f1f2CgjEIV4iwSF4FWgNjUY=";
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 ];
};
}