about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
author0x4A6F <0x4A6F@users.noreply.github.com>2023-03-16 20:15:30 +0100
committerGitHub <noreply@github.com>2023-03-16 20:15:30 +0100
commitb95de8d7585491e9ddd3e8528c05baba08e430c9 (patch)
treee6093f83820d0e852fa9a00ffe2a2a4a448d6b24 /pkgs
parenta8fa8c2e90e051dc47993f3a91b776e5bf7d9391 (diff)
parent945f15bfd1817682d485ef432ad76c93496f23bd (diff)
Merge pull request #221503 from figsoda/git-dive
git-dive: init at 0.1.3
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/version-management/git-dive/default.nix47
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/applications/version-management/git-dive/default.nix b/pkgs/applications/version-management/git-dive/default.nix
new file mode 100644
index 0000000000000..3c3cb8be70148
--- /dev/null
+++ b/pkgs/applications/version-management/git-dive/default.nix
@@ -0,0 +1,47 @@
+{ lib
+, rustPlatform
+, fetchFromGitHub
+, pkg-config
+  # libgit2-sys doesn't support libgit2 1.6 yet
+, libgit2_1_5
+, zlib
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "git-dive";
+  version = "0.1.3";
+
+  src = fetchFromGitHub {
+    owner = "gitext-rs";
+    repo = "git-dive";
+    rev = "v${version}";
+    hash = "sha256-zq594j/X74qzRSjbkd2lup/WqZXpTOecUYRVQGqpXug=";
+  };
+
+  cargoHash = "sha256-f3hiAVno5BuPgqP1y9XtVQ/TJcnqwUnEOqaU/tTljTQ=";
+
+  nativeBuildInputs = [
+    pkg-config
+  ];
+
+  buildInputs = [
+    libgit2_1_5
+    zlib
+  ];
+
+  checkFlags = [
+    # requires internet access
+    "--skip=screenshot"
+  ];
+
+  # don't use vendored libgit2
+  buildNoDefaultFeatures = true;
+
+  meta = with lib; {
+    description = "Dive into a file's history to find root cause";
+    homepage = "https://github.com/gitext-rs/git-dive";
+    changelog = "https://github.com/gitext-rs/git-dive/blob/${src.rev}/CHANGELOG.md";
+    license = with licenses; [ asl20 mit ];
+    maintainers = with maintainers; [ figsoda ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index d63e6bbfc36ec..0e839976005ae 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1856,6 +1856,8 @@ with pkgs;
 
   git-delete-merged-branches = callPackage ../applications/version-management/git-delete-merged-branches { };
 
+  git-dive = callPackage ../applications/version-management/git-dive { };
+
   git-extras = callPackage ../applications/version-management/git-extras { };
 
   git-fame = callPackage ../applications/version-management/git-fame { };