2021-09-23 15:35:13 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonApplication
|
2022-05-18 14:49:53 +00:00
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
2021-09-23 15:35:13 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, git
|
2021-07-24 12:14:16 +00:00
|
|
|
, nix-update-script
|
2022-04-27 09:35:20 +00:00
|
|
|
, testers
|
2021-09-23 15:35:13 +00:00
|
|
|
, git-machete
|
2021-07-24 12:14:16 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "git-machete";
|
2022-06-26 10:26:21 +00:00
|
|
|
version = "3.11.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-23 15:35:13 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "virtuslab";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-06-26 10:26:21 +00:00
|
|
|
sha256 = "sha256-BhR1dE6+K7UKaCbLmWPtLMyq0oIj/xYenXp5s7kRINc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-09-23 15:35:13 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
checkInputs = [ git pytest-mock pytestCheckHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2021-09-23 15:35:13 +00:00
|
|
|
installShellCompletion --bash --name git-machete completion/git-machete.completion.bash
|
|
|
|
installShellCompletion --zsh --name _git-machete completion/git-machete.completion.zsh
|
2022-03-10 19:12:11 +00:00
|
|
|
installShellCompletion --fish completion/git-machete.fish
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-10-17 02:12:59 +00:00
|
|
|
postInstallCheck = ''
|
|
|
|
test "$($out/bin/git-machete version)" = "git-machete version ${version}"
|
|
|
|
'';
|
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script {
|
|
|
|
attrPath = pname;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/VirtusLab/git-machete";
|
|
|
|
description = "Git repository organizer and rebase/merge workflow automation tool";
|
|
|
|
license = licenses.mit;
|
2021-09-23 15:35:13 +00:00
|
|
|
maintainers = with maintainers; [ blitz ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|