2021-09-23 15:35:13 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonApplication
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, git
|
|
|
|
, stestr
|
2021-07-24 12:14:16 +00:00
|
|
|
, nix-update-script
|
2021-09-23 15:35:13 +00:00
|
|
|
, testVersion
|
|
|
|
, git-machete
|
2021-07-24 12:14:16 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "git-machete";
|
2021-07-24 12:14:16 +00:00
|
|
|
version = "3.3.0";
|
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}";
|
|
|
|
sha256 = "0sx45y1d1v6y66msjc1lw9jhjppgbxqj145kivmd7lr6ccw68kav";
|
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
|
|
|
|
2021-09-23 15:35:13 +00:00
|
|
|
checkInputs = [ git stestr ];
|
|
|
|
|
|
|
|
postCheck = ''
|
|
|
|
stestr run
|
|
|
|
'';
|
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
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-07-24 12:14:16 +00:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script {
|
|
|
|
attrPath = pname;
|
|
|
|
};
|
|
|
|
|
|
|
|
tests = {
|
|
|
|
version = testVersion {
|
|
|
|
package = git-machete;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|