summary refs log tree commit diff
path: root/pkgs/shells/zsh-deer/default.nix
diff options
context:
space:
mode:
authorxd1le <elisp.vim@gmail.com>2017-08-31 12:33:12 +1000
committerxd1le <elisp.vim@gmail.com>2017-08-31 12:33:12 +1000
commit6b05ff00e95fc7eb446952468c3c0e677eea73c3 (patch)
tree84c5fa6ccccd63a581c3ecb6972b0a2f04726bae /pkgs/shells/zsh-deer/default.nix
parent96457d26dded05bcba8e9fbb9bf0255596654aab (diff)
downloadnixpkgs-6b05ff00e95fc7eb446952468c3c0e677eea73c3.tar
nixpkgs-6b05ff00e95fc7eb446952468c3c0e677eea73c3.tar.gz
nixpkgs-6b05ff00e95fc7eb446952468c3c0e677eea73c3.tar.bz2
nixpkgs-6b05ff00e95fc7eb446952468c3c0e677eea73c3.tar.lz
nixpkgs-6b05ff00e95fc7eb446952468c3c0e677eea73c3.tar.xz
nixpkgs-6b05ff00e95fc7eb446952468c3c0e677eea73c3.tar.zst
nixpkgs-6b05ff00e95fc7eb446952468c3c0e677eea73c3.zip
deer: init at 1.4
I wrote the patch. Unfortunately it's Nix specific because upstream
rejected it because Ubuntu Trusty's version of realpath doesn't seem to
have the `--relative-to` option. (Upstream used to use realpath before).
But for Nix, our version of realpath is recent enough. Also, upstream
will probably use realpath again anyway in May 2019 when Ubuntu Trusty
becomes unsupported, so this patch should probably be used.
Diffstat (limited to 'pkgs/shells/zsh-deer/default.nix')
-rw-r--r--pkgs/shells/zsh-deer/default.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/shells/zsh-deer/default.nix b/pkgs/shells/zsh-deer/default.nix
new file mode 100644
index 00000000000..3f39edfd963
--- /dev/null
+++ b/pkgs/shells/zsh-deer/default.nix
@@ -0,0 +1,36 @@
+{ 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 = ''
+    sed -i '157s/perl/'\
+    "$(echo ${perl}/bin/perl | sed 's/\//\\\//g')"'/' \
+    deer
+  '';
+
+  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;
+  };
+}