nixpkgs/pkgs/tools/security/gopass/summon.nix
2022-09-21 09:27:05 +03:00

41 lines
856 B
Nix

{ lib
, makeWrapper
, buildGoModule
, fetchFromGitHub
, gopass
}:
buildGoModule rec {
pname = "gopass-summon-provider";
version = "1.14.7";
src = fetchFromGitHub {
owner = "gopasspw";
repo = pname;
rev = "v${version}";
hash = "sha256-fIj28f+uqMdEzD5d0Zn0VF3jeVS4Ixs5WE+GLzTAD+A=";
};
vendorHash = "sha256-K6nYgy+fLvMQCse3CN8sGBkTW6fw1eSN5TjEOzzOToY=";
subPackages = [ "." ];
nativeBuildInputs = [ makeWrapper ];
ldflags = [
"-s" "-w" "-X main.version=${version}" "-X main.commit=${src.rev}"
];
postFixup = ''
wrapProgram $out/bin/gopass-summon-provider \
--prefix PATH : "${lib.makeBinPath [ gopass ]}"
'';
meta = with lib; {
description = "Gopass Summon Provider";
homepage = "https://www.gopass.pw/";
license = licenses.mit;
maintainers = with maintainers; [ sikmir ];
};
}