depot/third_party/nixpkgs/pkgs/tools/security/gopass/jsonapi.nix
Default email 686ce24904 Project import generated by Copybara.
GitOrigin-RevId: ac1f5b72a9e95873d1de0233fddcb56f99884b37
2023-02-16 18:41:37 +01:00

41 lines
918 B
Nix

{ lib
, makeWrapper
, buildGoModule
, fetchFromGitHub
, installShellFiles
, gopass
}:
buildGoModule rec {
pname = "gopass-jsonapi";
version = "1.15.4";
src = fetchFromGitHub {
owner = "gopasspw";
repo = "gopass-jsonapi";
rev = "v${version}";
hash = "sha256-gizUFoe+oAmEKHMlua/zsR+fUltGw2cp98XAgXzCm0U=";
};
vendorHash = "sha256-vMrP6rC0uPsRyFZdU2E9mPp031eob+36NcGueNP1Y7o=";
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 ];
};
}