From 84859c0d088b6344835e1cd4eccfd3120b86c28f Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Thu, 28 Mar 2024 14:14:45 +0100 Subject: [PATCH 1/3] git-repo-go: init at 0.7.8 --- pkgs/git-repo-go/default.nix | 52 ++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 pkgs/git-repo-go/default.nix diff --git a/pkgs/git-repo-go/default.nix b/pkgs/git-repo-go/default.nix new file mode 100644 index 0000000..4a29123 --- /dev/null +++ b/pkgs/git-repo-go/default.nix @@ -0,0 +1,52 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, +}: +buildGoModule rec { + pname = "git-repo-go"; + version = "0.7.8"; + + src = fetchFromGitHub { + owner = "alibaba"; + repo = "git-repo-go"; + rev = "v${version}"; + hash = "sha256-DOsi7JHDobtGLE/nKntm7vE9QrTdzPnO1EnxG7WB2dA="; + }; + + vendorHash = "sha256-rIk6qPJ3XSMgroHaMyxpjjUrejG/jlvNL7MwW/V2HzQ="; + + ldflags = [ + "-s" + "-w" + ]; + + # doCheck = false; + + checkFlags = + let + skipTests = [ + "Test_InstallRepoConfig" + "TestRepositoryInit" + "TestRepositoryFetch" + "TestRepositoryIsUnborn" + "TestFindGitWorkSpace" + "TestProjectGitInit" + "TestLoadRepoWorkSpace" + ]; + in + [ "-skip=^${builtins.concatStringsSep "$|^" skipTests}$" ]; + + postInstall = '' + mv $out/bin/git-repo-go $out/bin/git-repo + ''; + + meta = with lib; { + description = "Git-repo is a command-line tool for centralized workflow, can work with Gerrit, AGit-Flow compatible servers. It is written in Golang, and it can be installed easily without further dependency. It provides an easy-to-use solution for multiple repositories which is introduced by Android repo first, and it can also work with a single repository"; + homepage = "https://github.com/alibaba/git-repo-go"; + changelog = "https://github.com/alibaba/git-repo-go/blob/${src.rev}/CHANGELOG.md"; + license = licenses.asl20; + maintainers = with maintainers; [ ]; + mainProgram = "git-repo-go"; + }; +} -- 2.47.0 From a322c9daad1be3b8a2fb9bd614c082f33531a3f0 Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Thu, 28 Mar 2024 14:15:12 +0100 Subject: [PATCH 2/3] git-repo-go: Add to overlay --- overlays/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/overlays/default.nix b/overlays/default.nix index 951353a..33f2363 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -46,4 +46,5 @@ _final: prev: { openfga = prev.pkgs.callPackage ../pkgs/openfga { }; gitu = prev.pkgs.callPackage ../pkgs/gitu { }; zed = prev.pkgs.callPackage ../pkgs/zed { }; + git-repo-go = prev.pkgs.callPackage ../pkgs/git-repo-go { }; } -- 2.47.0 From eddb85da99e8031389246b4a6326b10635c1007e Mon Sep 17 00:00:00 2001 From: Erwin Boskma Date: Thu, 28 Mar 2024 14:15:52 +0100 Subject: [PATCH 3/3] git-repo-go: Add to flake packages and devshell --- flake.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flake.nix b/flake.nix index ab2dcba..ddd0676 100644 --- a/flake.nix +++ b/flake.nix @@ -234,6 +234,7 @@ }; packages = { + git-repo-go = pkgs.callPackage ./pkgs/git-repo-go { }; incus-ui = pkgs.callPackage ./pkgs/incus-ui { }; openfga = pkgs.callPackage ./pkgs/openfga { }; gitu = pkgs.callPackage ./pkgs/gitu { }; @@ -253,6 +254,7 @@ name = "dotfiles"; packages = [ age + config.packages.git-repo-go inputs'.colmena.packages.colmena just nodejs -- 2.47.0