summaryrefslogtreecommitdiff
path: root/pkgs/forgit.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/forgit.nix')
-rw-r--r--pkgs/forgit.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/forgit.nix b/pkgs/forgit.nix
new file mode 100644
index 0000000..07cad43
--- /dev/null
+++ b/pkgs/forgit.nix
@@ -0,0 +1,36 @@
+{ lib, stdenv, fetchFromGitHub, bash, fzf, git }:
+
+stdenv.mkDerivation rec {
+ pname = "forgit";
+ version = "unstable-2022-4-20";
+
+ src = fetchFromGitHub {
+ owner = "wfxr";
+ repo = "forgit";
+ rev = "fa9fd624398643d53ea9cea61d66eca77ca7c46c";
+ sha256 = "sha256:1hq1qbpfj0kfld8rvqf7mhh83mll6baq26p1cp0sr68cf66nl51q";
+ };
+
+ buildInputs = [ bash fzf ];
+ dontBuild = true;
+
+ installPhase = ''
+ runHook preInstall
+
+ substituteInPlace forgit.plugin.zsh \
+ --replace \$FORGIT_INSTALL_DIR $out/share/bash
+
+ install -Dt "$out/bin/" -m744 bin/git-forgit
+ install -Dt "$out/share/bash/" -m444 forgit.plugin.zsh
+
+ runHook postInstall
+ '';
+
+ meta = with lib; {
+ description = "A utility tool powered by fzf for using git interactively";
+ homepage = "https://github.com/wfxr/forgit";
+ license = licenses.mit;
+ platforms = platforms.all;
+ maintainers = with maintainers; [ bsima ];
+ };
+}