From 6b05ff00e95fc7eb446952468c3c0e677eea73c3 Mon Sep 17 00:00:00 2001 From: xd1le Date: Thu, 31 Aug 2017 12:33:12 +1000 Subject: 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. --- pkgs/shells/zsh-deer/default.nix | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 pkgs/shells/zsh-deer/default.nix (limited to 'pkgs/shells/zsh-deer/default.nix') 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; + }; +} -- cgit 1.4.1