about summary refs log tree commit diff
path: root/pkgs/shells/zsh
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2022-11-24 21:33:57 +0000
committerDavid Morgan <djm_uk@protonmail.com>2022-11-24 21:33:57 +0000
commitb40da0c8f5cfdda145e3957199a43ea7f8cd36ac (patch)
treeb6f7a44814f5ddb1bb9796a00c710fb574197210 /pkgs/shells/zsh
parent4682f63a73d0e4666a65c0ec03dc62a58328cfac (diff)
zsh-forgit: init at 22.11.0
Diffstat (limited to 'pkgs/shells/zsh')
-rw-r--r--pkgs/shells/zsh/zsh-forgit/default.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/pkgs/shells/zsh/zsh-forgit/default.nix b/pkgs/shells/zsh/zsh-forgit/default.nix
new file mode 100644
index 0000000000000..01dc6874cc463
--- /dev/null
+++ b/pkgs/shells/zsh/zsh-forgit/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, lib, fetchFromGitHub, git, fzf }:
+
+stdenv.mkDerivation rec {
+  pname = "zsh-forgit";
+  version = "22.11.0";
+
+  src = fetchFromGitHub {
+    owner = "wfxr";
+    repo = "forgit";
+    rev = version;
+    sha256 = "ca7EM/F0Spsdr3MbjIVwbjLVXg6/qWGczBQHLCcpU5A=";
+  };
+
+  strictDeps = true;
+
+  postPatch = ''
+    substituteInPlace forgit.plugin.zsh \
+      --replace "fzf " "${fzf}/bin/fzf " \
+      --replace "git " "${git}/bin/git "
+  '';
+
+  dontBuild = true;
+
+  installPhase = ''
+    install -D forgit.plugin.zsh $out/share/zsh/${pname}/forgit.plugin.zsh
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/wfxr/forgit";
+    description = "A utility tool powered by fzf for using git interactively";
+    license = licenses.mit;
+    maintainers = with maintainers; [ deejayem ];
+    platforms = platforms.all;
+  };
+}