From 4e3c6fb6746f1a31e479bb7017824b994c405aa6 Mon Sep 17 00:00:00 2001 From: Ross Light Date: Tue, 28 Dec 2021 22:12:01 -0800 Subject: [PATCH] gg-scm: init at 1.1.0 --- .../git-and-tools/gg/default.nix | 55 +++++++++++++++++++ .../gg/skip-broken-revert-tests.patch | 12 ++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 69 insertions(+) create mode 100644 pkgs/applications/version-management/git-and-tools/gg/default.nix create mode 100644 pkgs/applications/version-management/git-and-tools/gg/skip-broken-revert-tests.patch diff --git a/pkgs/applications/version-management/git-and-tools/gg/default.nix b/pkgs/applications/version-management/git-and-tools/gg/default.nix new file mode 100644 index 000000000000..a5ea070ec0f2 --- /dev/null +++ b/pkgs/applications/version-management/git-and-tools/gg/default.nix @@ -0,0 +1,55 @@ +{ lib +, buildGoModule +, fetchFromGitHub +, installShellFiles +, makeWrapper +, git +, pandoc +}: + +buildGoModule rec { + pname = "gg-scm"; + version = "1.1.0"; + + src = fetchFromGitHub { + owner = "gg-scm"; + repo = "gg"; + rev = "v${version}"; + sha256 = "sha256-kLmu4h/EBbSFHrffvusKq38X3/ID9bOlLMvEUtnFGhk="; + }; + patches = [ ./skip-broken-revert-tests.patch ]; + subPackages = [ "cmd/gg" ]; + ldflags = [ + "-s" "-w" + "-X" "main.versionInfo=${version}" + "-X" "main.buildCommit=a0b348c9cef33fa46899f5e55e3316f382a09f6a+" + ]; + + vendorSha256 = "sha256-+ZmNXB+I6vPRbACwEkfl/vVmqoZy67Zn9SBrham5zRk="; + + nativeBuildInputs = [ git pandoc installShellFiles makeWrapper ]; + buildInputs = [ git ]; + + postInstall = '' + wrapProgram $out/bin/gg --suffix PATH : ${git}/bin + pandoc --standalone --to man misc/gg.1.md -o misc/gg.1 + installManPage misc/gg.1 + installShellCompletion --cmd gg \ + --bash misc/gg.bash \ + --zsh misc/_gg.zsh + ''; + + meta = with lib; { + mainProgram = "gg"; + description = "Git with less typing"; + longDescription = '' + gg is an alternative command-line interface for Git heavily inspired by Mercurial. + It's designed for less typing in common workflows, + making Git easier to use for both novices and advanced users alike. + ''; + homepage = "https://gg-scm.io/"; + changelog = "https://github.com/gg-scm/gg/blob/v${version}/CHANGELOG.md"; + license = licenses.asl20; + maintainers = with maintainers; [ zombiezen ]; + }; +} diff --git a/pkgs/applications/version-management/git-and-tools/gg/skip-broken-revert-tests.patch b/pkgs/applications/version-management/git-and-tools/gg/skip-broken-revert-tests.patch new file mode 100644 index 000000000000..f8540952ae7c --- /dev/null +++ b/pkgs/applications/version-management/git-and-tools/gg/skip-broken-revert-tests.patch @@ -0,0 +1,12 @@ +diff --git a/cmd/gg/revert_test.go b/cmd/gg/revert_test.go +index 9420e9b..ff6ca93 100644 +--- a/cmd/gg/revert_test.go ++++ b/cmd/gg/revert_test.go +@@ -592,6 +592,7 @@ func TestRevert_LocalRename(t *testing.T) { + } + + func TestRevert_UnknownFile(t *testing.T) { ++ t.Skip("Broken in 1.1.0") + t.Parallel() + t.Run("EmptyRepo", func(t *testing.T) { + t.Parallel() diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 15186d004ddf..081b3acaa11c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -25112,6 +25112,8 @@ with pkgs; fnott = callPackage ../applications/misc/fnott { }; + gg-scm = callPackage ../applications/version-management/git-and-tools/gg { }; + gigalixir = with python3Packages; toPythonApplication gigalixir; go-libp2p-daemon = callPackage ../servers/go-libp2p-daemon { };