about summary refs log tree commit diff
path: root/pkgs/shells/zsh/zsh-deer/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/shells/zsh/zsh-deer/default.nix')
-rw-r--r--pkgs/shells/zsh/zsh-deer/default.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/pkgs/shells/zsh/zsh-deer/default.nix b/pkgs/shells/zsh/zsh-deer/default.nix
new file mode 100644
index 000000000000..735d6a2b7619
--- /dev/null
+++ b/pkgs/shells/zsh/zsh-deer/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchFromGitHub, perl }:
+
+let
+  version = "1.4";
+  name = "deer-${version}";
+in stdenv.mkDerivation {
+  inherit name;
+
+  src = fetchFromGitHub {
+    owner = "Vifon";
+    repo = "deer";
+    rev = "v${version}";
+    sha256 = "1xnbnbi0zk2xsyn8dqsmyxqlfnl36pb1wwibnlp0dxixw6sfymyl";
+  };
+
+  prePatch = ''
+    substituteInPlace deer \
+      --replace " perl " " ${perl}/bin/perl "
+  '';
+
+  patches = [ ./realpath.patch ];
+
+  installPhase = ''
+    mkdir -p $out/share/zsh/site-functions/
+    cp deer $out/share/zsh/site-functions/
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Ranger-like file navigation for zsh";
+    homepage = "https://github.com/Vifon/deer";
+    license = licenses.gpl3Plus;
+    maintainers = [ maintainers.vyp ];
+    platforms = platforms.unix;
+  };
+}