2021-06-28 23:13:55 +00:00
|
|
|
{ fetchFromGitHub, buildGoModule, lib, installShellFiles, libgit2, pkg-config }:
|
2021-01-09 10:05:03 +00:00
|
|
|
buildGoModule rec {
|
|
|
|
pname = "turbogit";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "3.1.1";
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "b4nst";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "sha256-BHgVJlitRUX/9zYPoK5XfRpzzTZRbLhQVZJcx8KVshk=";
|
2021-01-09 10:05:03 +00:00
|
|
|
};
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
vendorSha256 = "sha256-280OcGXZQJD4G6z0b2WnWAS+v7XVptyf2WnlPjG99/0=";
|
2021-01-09 10:05:03 +00:00
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
buildInputs = [ libgit2 ];
|
|
|
|
nativeBuildInputs = [ installShellFiles pkg-config ];
|
2021-01-09 10:05:03 +00:00
|
|
|
postInstall = ''
|
|
|
|
# Move turbogit binary to tug
|
|
|
|
ln -s $out/bin/turbogit $out/bin/tug
|
|
|
|
|
|
|
|
# Generate completion files
|
|
|
|
mkdir -p share/completions
|
|
|
|
$out/bin/tug completion bash > share/completions/tug.bash
|
|
|
|
$out/bin/tug completion fish > share/completions/tug.fish
|
|
|
|
$out/bin/tug completion zsh > share/completions/tug.zsh
|
|
|
|
|
|
|
|
installShellCompletion share/completions/tug.{bash,fish,zsh}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Keep your git workflow clean without headache.";
|
|
|
|
longDescription = ''
|
|
|
|
turbogit (tug) is a cli tool built to help you deal with your day-to-day git work.
|
|
|
|
turbogit enforces convention (e.g. The Conventional Commits) but tries to keep things simple and invisible for you.
|
|
|
|
turbogit is your friend.
|
|
|
|
'';
|
|
|
|
homepage = "https://b4nst.github.io/turbogit";
|
|
|
|
license = licenses.mit;
|
2021-06-28 23:13:55 +00:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2021-01-09 10:05:03 +00:00
|
|
|
maintainers = [ maintainers.yusdacra ];
|
|
|
|
};
|
|
|
|
}
|