2021-03-09 03:18:52 +00:00
|
|
|
{ lib
|
|
|
|
, makeWrapper
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
|
|
|
, gopass
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "git-credential-gopass";
|
2022-09-14 18:05:37 +00:00
|
|
|
version = "1.14.6";
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gopasspw";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-09-14 18:05:37 +00:00
|
|
|
sha256 = "sha256-sguhKK3YBVitv4/tFLZtto2ZgUXWDdCKMksKC3zVgrY=";
|
2021-03-09 03:18:52 +00:00
|
|
|
};
|
|
|
|
|
2022-09-14 18:05:37 +00:00
|
|
|
vendorSha256 = "sha256-OADJVtnggv3y5tjyiJxhKQsWs0svLN63M1wCOqBEKpU=";
|
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 = ''
|
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|