2021-09-22 21:45:01 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonApplication
|
2022-05-04 13:16:26 +00:00
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
2021-09-22 21:45:01 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, git
|
2021-07-22 21:49:33 +00:00
|
|
|
, nix-update-script
|
2022-04-20 14:40:48 +00:00
|
|
|
, testers
|
2021-09-22 21:45:01 +00:00
|
|
|
, git-machete
|
2021-07-22 21:49:33 +00:00
|
|
|
}:
|
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
|
|
|
|
2021-09-22 21:45:01 +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
|
|
|
};
|
|
|
|
|
2021-09-22 21:45:01 +00:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2019-11-22 09:39:14 +00:00
|
|
|
|
2022-05-04 13:16:26 +00:00
|
|
|
checkInputs = [ git pytest-mock pytestCheckHook ];
|
2019-11-22 09:39:14 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2021-09-22 21:45:01 +00:00
|
|
|
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}"
|
|
|
|
'';
|
|
|
|
|
2021-07-22 21:49:33 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script {
|
|
|
|
attrPath = pname;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2019-11-22 09:39:14 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/VirtusLab/git-machete";
|
2020-03-22 16:48:01 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|