2021-03-09 03:18:52 +00:00
|
|
|
{ lib
|
|
|
|
, makeWrapper
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gopass
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "git-credential-gopass";
|
2023-02-16 17:41:37 +00:00
|
|
|
version = "1.15.4";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gopasspw";
|
2023-02-16 17:41:37 +00:00
|
|
|
repo = "git-credential-gopass";
|
2021-03-09 03:18:52 +00:00
|
|
|
rev = "v${version}";
|
2023-02-16 17:41:37 +00:00
|
|
|
hash = "sha256-S97KQ/yCyE1wBDao5KBKWPvoH+DmwpEJRiB6uJCGyFA=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2023-02-16 17:41:37 +00:00
|
|
|
vendorHash = "sha256-MLnfTdYR4/1qtnNCUs0TwGf5wMqE+V8jNCefeClQKfw=";
|
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 ];
|
|
|
|
};
|
|
|
|
}
|