about summary refs log tree commit diff
path: root/pkgs/development/tools/turbogit
diff options
context:
space:
mode:
authorYusuf Bera Ertan <y.bera003.06@protonmail.com>2021-01-06 20:55:37 +0300
committerYusuf Bera Ertan <y.bera003.06@protonmail.com>2021-01-06 23:48:18 +0300
commitc6ff52406fb0d194ed0f3a09425e683220d6db89 (patch)
tree258e614cbcb2080b0b467b4e379f21583f485c25 /pkgs/development/tools/turbogit
parent44c443a7a602e7752641aac21e4ad17061761290 (diff)
turbogit: init at v1.2.0
Diffstat (limited to 'pkgs/development/tools/turbogit')
-rw-r--r--pkgs/development/tools/turbogit/default.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/development/tools/turbogit/default.nix b/pkgs/development/tools/turbogit/default.nix
new file mode 100644
index 0000000000000..68bd10683547d
--- /dev/null
+++ b/pkgs/development/tools/turbogit/default.nix
@@ -0,0 +1,42 @@
+{ fetchFromGitHub, buildGoModule, lib, installShellFiles }:
+buildGoModule rec {
+  pname = "turbogit";
+  version = "1.2.0";
+
+  src = fetchFromGitHub {
+    owner = "b4nst";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-alVgXnsoC2nmUe6i/l0ttUjoXpKLHr0n/7p6WbIIGBU=";
+  };
+
+  vendorSha256 = "sha256-6fxbxpROYiNw5SYdQAIdy5NfqzOcFfAlJ+vTQyFtink=";
+
+  subPackages = [ "." ];
+
+  nativeBuildInputs = [ installShellFiles ];
+  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;
+    maintainers = [ maintainers.yusdacra ];
+  };
+}