2021-02-26 16:37:34 +00:00
|
|
|
{ lib
|
|
|
|
, makeWrapper
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gopass
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "git-credential-gopass";
|
2023-11-25 04:20:00 +00:00
|
|
|
version = "1.15.10";
|
2021-02-26 16:37:34 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gopasspw";
|
2023-02-13 19:49:55 +00:00
|
|
|
repo = "git-credential-gopass";
|
2021-02-26 16:37:34 +00:00
|
|
|
rev = "v${version}";
|
2023-11-25 04:20:00 +00:00
|
|
|
hash = "sha256-DQPjnCwpFOKN0ObPXPbwy7GK1VsPSj+pcLKjfSPPPRo=";
|
2021-02-26 16:37:34 +00:00
|
|
|
};
|
|
|
|
|
2023-11-25 04:20:00 +00:00
|
|
|
vendorHash = "sha256-gvnBlf0JfdrHSHTF+OQxBHFER5F910mruzCa/prvIYA=";
|
2021-02-26 16:37:34 +00:00
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
2021-08-26 06:45:51 +00:00
|
|
|
ldflags = [
|
|
|
|
"-s" "-w" "-X main.version=${version}" "-X main.commit=${src.rev}"
|
|
|
|
];
|
2021-02-26 16:37:34 +00:00
|
|
|
|
|
|
|
postFixup = ''
|
2022-09-21 04:23:23 +00:00
|
|
|
wrapProgram $out/bin/git-credential-gopass \
|
|
|
|
--prefix PATH : "${lib.makeBinPath [ gopass ]}"
|
2021-02-26 16:37:34 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Manage git credentials using gopass";
|
|
|
|
homepage = "https://github.com/gopasspw/git-credential-gopass";
|
2023-08-09 22:11:00 +00:00
|
|
|
changelog = "https://github.com/gopasspw/git-credential-gopass/blob/v${version}/CHANGELOG.md";
|
2021-02-26 16:37:34 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ benneti ];
|
2023-09-24 10:39:00 +00:00
|
|
|
mainProgram = "git-credential-gopass";
|
2021-02-26 16:37:34 +00:00
|
|
|
};
|
|
|
|
}
|