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";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "3.13.2";
|
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}";
|
2023-01-11 07:51:40 +00:00
|
|
|
hash = "sha256-K9oJvvESHWCJFSgqycA7N4cG7WbTDwXZExnXUs4Qlp8=";
|
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
|
|
|
|
2023-01-11 07:51:40 +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 = {
|
2022-12-28 21:21:41 +00:00
|
|
|
updateScript = nix-update-script { };
|
2021-07-24 12:14:16 +00:00
|
|
|
};
|
|
|
|
|
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";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/VirtusLab/git-machete/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2021-09-23 15:35:13 +00:00
|
|
|
maintainers = with maintainers; [ blitz ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|