summary refs log tree commit diff
path: root/pkgs/applications/version-management/git-branchless/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/version-management/git-branchless/default.nix')
-rw-r--r--pkgs/applications/version-management/git-branchless/default.nix57
1 files changed, 57 insertions, 0 deletions
diff --git a/pkgs/applications/version-management/git-branchless/default.nix b/pkgs/applications/version-management/git-branchless/default.nix
new file mode 100644
index 00000000000..1a961b422b2
--- /dev/null
+++ b/pkgs/applications/version-management/git-branchless/default.nix
@@ -0,0 +1,57 @@
+{ lib
+, fetchFromGitHub
+, git
+, libiconv
+, ncurses
+, openssl
+, pkg-config
+, rustPlatform
+, sqlite
+, stdenv
+, Security
+, SystemConfiguration
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "git-branchless";
+  version = "0.6.0";
+
+  src = fetchFromGitHub {
+    owner = "arxanas";
+    repo = "git-branchless";
+    rev = "v${version}";
+    sha256 = "sha256-Rf7ai+s2Fp/RFA4on9YBoTjFpvzSZtAHf0rytfZf0rc=";
+  };
+
+  cargoSha256 = "sha256-GVo0t2dJ6R+1UJf/NlKd5QLIQfDdFEHa+FSeW/Hk/4c=";
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [
+    ncurses
+    openssl
+    sqlite
+  ] ++ lib.optionals stdenv.isDarwin [
+    Security
+    SystemConfiguration
+    libiconv
+  ];
+
+  preCheck = ''
+    export TEST_GIT=${git}/bin/git
+    export TEST_GIT_EXEC_PATH=$(${git}/bin/git --exec-path)
+  '';
+  # FIXME: these tests deadlock when run in the Nix sandbox
+  checkFlags = [
+    "--skip=test_switch_pty"
+    "--skip=test_next_ambiguous_interactive"
+    "--skip=test_switch_auto_switch_interactive"
+  ];
+
+  meta = with lib; {
+    description = "A suite of tools to help you visualize, navigate, manipulate, and repair your commit history";
+    homepage = "https://github.com/arxanas/git-branchless";
+    license = licenses.gpl2Only;
+    maintainers = with maintainers; [ msfjarvis nh2 hmenke ];
+  };
+}