nixpkgs/pkgs/applications/version-management/git-and-tools/git-machete/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
1.2 KiB
Nix
Raw Normal View History

{ lib
, buildPythonApplication
, pytest-mock
, pytestCheckHook
, fetchFromGitHub
, installShellFiles
, git
, nix-update-script
, testers
, git-machete
}:
2019-11-22 09:39:14 +00:00
buildPythonApplication rec {
pname = "git-machete";
2022-05-12 17:27:13 +00:00
version = "3.9.1";
2019-11-22 09:39:14 +00:00
src = fetchFromGitHub {
owner = "virtuslab";
repo = pname;
rev = "v${version}";
2022-05-12 17:27:13 +00:00
sha256 = "sha256-/oX3x5F5/gV8YuRLzAviE7RM+Gen0gIypHs34iUnVOM=";
2019-11-22 09:39:14 +00:00
};
nativeBuildInputs = [ installShellFiles ];
2019-11-22 09:39:14 +00:00
checkInputs = [ git pytest-mock pytestCheckHook ];
2019-11-22 09:39:14 +00:00
postInstall = ''
installShellCompletion --bash --name git-machete completion/git-machete.completion.bash
installShellCompletion --zsh --name _git-machete completion/git-machete.completion.zsh
2022-02-15 21:43:39 +00:00
installShellCompletion --fish completion/git-machete.fish
2019-11-22 09:39:14 +00:00
'';
2021-10-13 02:33:23 +00:00
postInstallCheck = ''
test "$($out/bin/git-machete version)" = "git-machete version ${version}"
'';
passthru = {
updateScript = nix-update-script {
attrPath = pname;
};
};
2019-11-22 09:39:14 +00:00
meta = with lib; {
homepage = "https://github.com/VirtusLab/git-machete";
description = "Git repository organizer and rebase/merge workflow automation tool";
2019-11-22 09:39:14 +00:00
license = licenses.mit;
2021-09-02 13:02:08 +00:00
maintainers = with maintainers; [ blitz ];
2019-11-22 09:39:14 +00:00
};
}