1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/applications/version-management/git-and-tools/git-machete/default.nix

54 lines
1.1 KiB
Nix
Raw Normal View History

{ lib
, buildPythonApplication
, fetchFromGitHub
, installShellFiles
, git
, stestr
, nix-update-script
, testVersion
, git-machete
}:
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
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
};
nativeBuildInputs = [ installShellFiles ];
2019-11-22 09:39:14 +00:00
checkInputs = [ git stestr ];
postCheck = ''
stestr run
'';
2019-11-22 09:39:14 +00:00
postInstall = ''
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}"
'';
passthru = {
updateScript = nix-update-script {
attrPath = pname;
};
};
2019-11-22 09:39:14 +00:00
meta = with lib; {
homepage = "https://github.com/VirtusLab/git-machete";
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
};
}