2021-09-22 22:45:01 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonApplication
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, git
|
|
|
|
, stestr
|
2021-07-22 22:49:33 +01:00
|
|
|
, nix-update-script
|
2021-09-22 22:45:01 +01:00
|
|
|
, testVersion
|
|
|
|
, git-machete
|
2021-07-22 22:49:33 +01:00
|
|
|
}:
|
2019-11-22 09:39:14 +00:00
|
|
|
|
|
|
|
buildPythonApplication rec {
|
|
|
|
pname = "git-machete";
|
2021-10-12 01:47:44 +01:00
|
|
|
version = "3.4.1";
|
2019-11-22 09:39:14 +00:00
|
|
|
|
2021-09-22 22:45:01 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "virtuslab";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-10-12 01:47:44 +01:00
|
|
|
sha256 = "sha256-drfMD9tQe1dc61MH3Cxu9oin137f4FsZJY3X2kDHdh4=";
|
2019-11-22 09:39:14 +00:00
|
|
|
};
|
|
|
|
|
2021-09-22 22:45:01 +01:00
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
2019-11-22 09:39:14 +00:00
|
|
|
|
2021-09-22 22:45:01 +01:00
|
|
|
checkInputs = [ git stestr ];
|
|
|
|
|
|
|
|
postCheck = ''
|
|
|
|
stestr run
|
|
|
|
'';
|
2019-11-22 09:39:14 +00:00
|
|
|
|
|
|
|
postInstall = ''
|
2021-09-22 22:45:01 +01:00
|
|
|
installShellCompletion --bash --name git-machete completion/git-machete.completion.bash
|
|
|
|
installShellCompletion --zsh --name _git-machete completion/git-machete.completion.zsh
|
2019-11-22 09:39:14 +00:00
|
|
|
'';
|
|
|
|
|
2021-10-13 03:33:23 +01:00
|
|
|
postInstallCheck = ''
|
|
|
|
git init
|
|
|
|
test "$($out/bin/git-machete version)" = "git-machete version ${version}"
|
|
|
|
'';
|
|
|
|
|
2021-07-22 22:49:33 +01:00
|
|
|
passthru = {
|
|
|
|
updateScript = nix-update-script {
|
|
|
|
attrPath = pname;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2019-11-22 09:39:14 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01: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 14:02:08 +01:00
|
|
|
maintainers = with maintainers; [ blitz ];
|
2019-11-22 09:39:14 +00:00
|
|
|
};
|
|
|
|
}
|