anvil-editor: init at 0.4
[NixPkgs.git] / pkgs / applications / version-management / git-machete / default.nix
bloba8dc37f177efbe313658ed3ff9e09be54a0e6ecf
1 { lib
2 , buildPythonApplication
3 , pytest-mock
4 , pytestCheckHook
5 , fetchFromGitHub
6 , installShellFiles
7 , git
8 , nix-update-script
9 }:
11 buildPythonApplication rec {
12   pname = "git-machete";
13   version = "3.29.3";
15   src = fetchFromGitHub {
16     owner = "virtuslab";
17     repo = pname;
18     rev = "v${version}";
19     hash = "sha256-3GXTdIXITZeDqe6gxwOCaFXwITYYfXTy57H2AHA5Zyc=";
20   };
22   nativeBuildInputs = [ installShellFiles ];
24   nativeCheckInputs = [
25     git
26     pytest-mock
27     pytestCheckHook
28   ];
30   disabledTests = [
31     # Requires fully functioning shells including zsh modules and bash
32     # completion.
33     "completion_e2e"
34   ];
36   postInstall = ''
37     installShellCompletion --bash --name git-machete completion/git-machete.completion.bash
38     installShellCompletion --zsh --name _git-machete completion/git-machete.completion.zsh
39     installShellCompletion --fish completion/git-machete.fish
40   '';
42   postInstallCheck = ''
43     test "$($out/bin/git-machete version)" = "git-machete version ${version}"
44   '';
46   passthru = {
47     updateScript = nix-update-script { };
48   };
50   meta = with lib; {
51     homepage = "https://github.com/VirtusLab/git-machete";
52     description = "Git repository organizer and rebase/merge workflow automation tool";
53     changelog = "https://github.com/VirtusLab/git-machete/releases/tag/v${version}";
54     license = licenses.mit;
55     maintainers = with maintainers; [ blitz ];
56     mainProgram = "git-machete";
57   };