1{
2 lib,
3 buildGoModule,
4 fetchFromGitHub,
5 git,
6 makeWrapper,
7}:
8
9buildGoModule rec {
10 pname = "ghbackup";
11 version = "1.13.0";
12
13 src = fetchFromGitHub {
14 owner = "qvl";
15 repo = "ghbackup";
16 rev = "v${version}";
17 hash = "sha256-3LSe805VrbUGjqjnhTJD2KBVZ4rq+4Z3l4d0I1MrBMA=";
18 };
19
20 patches = [ ./patches/fix-next-page-logic.patch ];
21
22 postPatch = ''
23 go mod init qvl.io/ghbackup
24 '';
25
26 nativeBuildInputs = [ makeWrapper ];
27
28 vendorHash = null;
29
30 postFixup = ''
31 wrapProgram $out/bin/${meta.mainProgram} \
32 --prefix PATH : "${lib.makeBinPath [ git ]}"
33 '';
34
35 doCheck = false; # tests want to actually download from github
36
37 meta = with lib; {
38 description = "Backup your GitHub repositories with a simple command-line application written in Go";
39 homepage = "https://github.com/qvl/ghbackup";
40 license = licenses.mit;
41 mainProgram = "ghbackup";
42 maintainers = with maintainers; [ lenny ];
43 };
44}