diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2018-04-17 14:03:07 -0500 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2018-04-17 14:47:32 -0500 |
commit | ddaea6ac77177c91576568af4b6f6d85195559af (patch) | |
tree | 0292a346327a613a52b95492aea9ed76d8c55dfe /pkgs/shells/zsh/zsh-deer | |
parent | d308ac923376b76183a0b4078f808ce40af8f86b (diff) | |
download | nixlib-ddaea6ac77177c91576568af4b6f6d85195559af.tar nixlib-ddaea6ac77177c91576568af4b6f6d85195559af.tar.gz nixlib-ddaea6ac77177c91576568af4b6f6d85195559af.tar.bz2 nixlib-ddaea6ac77177c91576568af4b6f6d85195559af.tar.lz nixlib-ddaea6ac77177c91576568af4b6f6d85195559af.tar.xz nixlib-ddaea6ac77177c91576568af4b6f6d85195559af.tar.zst nixlib-ddaea6ac77177c91576568af4b6f6d85195559af.zip |
pkgs/shells: move extensions to subdirs
These are not reaal shells and should go into their parent shell directory.
Diffstat (limited to 'pkgs/shells/zsh/zsh-deer')
-rw-r--r-- | pkgs/shells/zsh/zsh-deer/default.nix | 35 | ||||
-rw-r--r-- | pkgs/shells/zsh/zsh-deer/realpath.patch | 28 |
2 files changed, 63 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; + }; +} diff --git a/pkgs/shells/zsh/zsh-deer/realpath.patch b/pkgs/shells/zsh/zsh-deer/realpath.patch new file mode 100644 index 000000000000..03850d7e5c12 --- /dev/null +++ b/pkgs/shells/zsh/zsh-deer/realpath.patch @@ -0,0 +1,28 @@ +From ceadb2f11119143af4f590ea6b05a531483219b5 Mon Sep 17 00:00:00 2001 +From: xd1le <elisp.vim@gmail.com> +Date: Wed, 30 Aug 2017 17:27:20 +1000 +Subject: [PATCH] use realpath instead of python to calculate relative path + +--- + deer | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/deer b/deer +index 3d89dea..804a871 100644 +--- a/deer ++++ b/deer +@@ -259,10 +259,7 @@ deer-get-relative() + { + local TMP + TMP=${1:-${DEER_DIRNAME%/}/$DEER_BASENAME[$DEER_DIRNAME]} +- TMP="`python -c ' +-import sys, os +-print(os.path.relpath(sys.argv[1], sys.argv[2])) +-' $TMP ${DEER_STARTDIR:-$PWD}`" ++ TMP="`realpath --relative-to=${DEER_STARTDIR:-$PWD} $TMP`" + print -R $TMP:q + } + +-- +2.14.1 + |