summary refs log tree commit diff
path: root/pkgs/applications/version-management/git-machete/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/version-management/git-machete/default.nix')
-rw-r--r--pkgs/applications/version-management/git-machete/default.nix50
1 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/applications/version-management/git-machete/default.nix b/pkgs/applications/version-management/git-machete/default.nix
new file mode 100644
index 00000000000..a41380380bc
--- /dev/null
+++ b/pkgs/applications/version-management/git-machete/default.nix
@@ -0,0 +1,50 @@
+{ lib
+, buildPythonApplication
+, pytest-mock
+, pytestCheckHook
+, fetchFromGitHub
+, installShellFiles
+, git
+, nix-update-script
+, testers
+, git-machete
+}:
+
+buildPythonApplication rec {
+  pname = "git-machete";
+  version = "3.13.0";
+
+  src = fetchFromGitHub {
+    owner = "virtuslab";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-Ku142NjiDTxiZ50Sm6vZs5ZHJ25oALnLQw8ThWqQ2rE=";
+  };
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  checkInputs = [ git pytest-mock pytestCheckHook ];
+
+  postInstall = ''
+    installShellCompletion --bash --name git-machete completion/git-machete.completion.bash
+    installShellCompletion --zsh --name _git-machete completion/git-machete.completion.zsh
+    installShellCompletion --fish completion/git-machete.fish
+  '';
+
+  postInstallCheck = ''
+    test "$($out/bin/git-machete version)" = "git-machete version ${version}"
+  '';
+
+  passthru = {
+    updateScript = nix-update-script {
+      attrPath = pname;
+    };
+  };
+
+  meta = with lib; {
+    homepage = "https://github.com/VirtusLab/git-machete";
+    description = "Git repository organizer and rebase/merge workflow automation tool";
+    license = licenses.mit;
+    maintainers = with maintainers; [ blitz ];
+  };
+}