1{
2 lib,
3 makeWrapper,
4 buildGoModule,
5 fetchFromGitHub,
6 gopass,
7}:
8
9buildGoModule rec {
10 pname = "git-credential-gopass";
11 version = "1.15.18";
12
13 src = fetchFromGitHub {
14 owner = "gopasspw";
15 repo = "git-credential-gopass";
16 rev = "v${version}";
17 hash = "sha256-tW4tPSZErVGZyPgLyQBbwDqmuYyl4nB/qCdAad+Kro4=";
18 };
19
20 vendorHash = "sha256-Yqhl1e0fFykFv/T3yaRkEyOKWBfaJXVrjrUWTToWd5s=";
21
22 subPackages = [ "." ];
23
24 nativeBuildInputs = [ makeWrapper ];
25
26 ldflags = [
27 "-s"
28 "-w"
29 "-X main.version=${version}"
30 "-X main.commit=${src.rev}"
31 ];
32
33 postFixup = ''
34 wrapProgram $out/bin/git-credential-gopass \
35 --prefix PATH : "${lib.makeBinPath [ gopass ]}"
36 '';
37
38 meta = with lib; {
39 description = "Manage git credentials using gopass";
40 homepage = "https://github.com/gopasspw/git-credential-gopass";
41 changelog = "https://github.com/gopasspw/git-credential-gopass/blob/v${version}/CHANGELOG.md";
42 license = licenses.mit;
43 maintainers = with maintainers; [ benneti ];
44 mainProgram = "git-credential-gopass";
45 };
46}