1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 installShellFiles,
6}:
7
8buildGoModule rec {
9 pname = "git-credential-oauth";
10 version = "0.15.1";
11
12 src = fetchFromGitHub {
13 owner = "hickford";
14 repo = "git-credential-oauth";
15 rev = "v${version}";
16 hash = "sha256-9AoIyQ05Y/usG0Tlehn7U8zjBxC1BYNjNVRtgWgzLbo=";
17 };
18
19 nativeBuildInputs = [ installShellFiles ];
20
21 ldflags = [
22 "-s"
23 "-w"
24 "-X main.version=${version}"
25 ];
26
27 vendorHash = "sha256-g6HT0hmY2RQceSOigH2bVj1jXYhXq95xL0Qak7TMx0o=";
28
29 postInstall = ''
30 installManPage $src/git-credential-oauth.1
31 '';
32
33 meta = {
34 description = "Git credential helper that securely authenticates to GitHub, GitLab and BitBucket using OAuth";
35 homepage = "https://github.com/hickford/git-credential-oauth";
36 changelog = "https://github.com/hickford/git-credential-oauth/releases/tag/${src.rev}";
37 license = lib.licenses.asl20;
38 maintainers = with lib.maintainers; [ shyim ];
39 mainProgram = "git-credential-oauth";
40 };
41}