forked from mirrors/nixpkgs
40 lines
891 B
Nix
40 lines
891 B
Nix
{ lib
|
|
, makeWrapper
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, gopass
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "git-credential-gopass";
|
|
version = "1.14.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "gopasspw";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-ggdQL8BU56zE5figmbfHKlZ7WGZ7z5nKunXTy3kn170=";
|
|
};
|
|
|
|
vendorSha256 = "sha256-fwqkiPzrfo83NweuGONRx8+MOE4wQxg2Xk4/1kZwnCM=";
|
|
|
|
subPackages = [ "." ];
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
ldflags = [
|
|
"-s" "-w" "-X main.version=${version}" "-X main.commit=${src.rev}"
|
|
];
|
|
|
|
postFixup = ''
|
|
wrapProgram $out/bin/git-credential-gopass --prefix PATH : "${lib.makeBinPath [ gopass ]}"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Manage git credentials using gopass";
|
|
homepage = "https://github.com/gopasspw/git-credential-gopass";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ benneti ];
|
|
};
|
|
}
|