2021-03-09 03:18:52 +00:00
|
|
|
{ lib
|
|
|
|
, makeWrapper
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gopass
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "git-credential-gopass";
|
2022-12-28 21:21:41 +00:00
|
|
|
version = "1.15.2";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gopasspw";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-12-28 21:21:41 +00:00
|
|
|
hash = "sha256-HuqN/hl4weUr/PLyCE9dyrXADPHJW2XryQWWCMwgJ8k=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
vendorHash = "sha256-1pQ+f+m+cff6M0sfydaqGyvXqS6lyi9mfi9Pl4tynhU=";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s" "-w" "-X main.version=${version}" "-X main.commit=${src.rev}"
|
|
|
|
];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
postFixup = ''
|
2022-09-22 12:36:57 +00:00
|
|
|
wrapProgram $out/bin/git-credential-gopass \
|
|
|
|
--prefix PATH : "${lib.makeBinPath [ gopass ]}"
|
2021-03-09 03:18:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Manage git credentials using gopass";
|
|
|
|
homepage = "https://github.com/gopasspw/git-credential-gopass";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ benneti ];
|
|
|
|
};
|
|
|
|
}
|