2021-03-09 03:18:52 +00:00
|
|
|
{ lib
|
|
|
|
, makeWrapper
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gopass
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "git-credential-gopass";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "1.15.3";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gopasspw";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-01-11 07:51:40 +00:00
|
|
|
hash = "sha256-x8hf1cZw+Hhizp8/vA8qJ+A6ERJUenjMeiuW8IFb/N0=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
vendorHash = "sha256-YZoz7B12/VhWZRTDEVs2P36FrZoZs4OdPJMkR9H7D5I=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|