aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/pkgs/shells/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/shells/zsh')
-rw-r--r--nixpkgs/pkgs/shells/zsh/antibody/default.nix24
-rw-r--r--nixpkgs/pkgs/shells/zsh/antigen/default.nix25
-rw-r--r--nixpkgs/pkgs/shells/zsh/default.nix92
-rw-r--r--nixpkgs/pkgs/shells/zsh/gradle-completion/default.nix35
-rw-r--r--nixpkgs/pkgs/shells/zsh/grml-zsh-config/default.nix41
-rw-r--r--nixpkgs/pkgs/shells/zsh/lambda-mod-zsh-theme/default.nix29
-rw-r--r--nixpkgs/pkgs/shells/zsh/nix-zsh-completions/default.nix31
-rw-r--r--nixpkgs/pkgs/shells/zsh/oh-my-zsh/default.nix74
-rwxr-xr-xnixpkgs/pkgs/shells/zsh/oh-my-zsh/update.sh20
-rw-r--r--nixpkgs/pkgs/shells/zsh/spaceship-prompt/default.nix33
-rw-r--r--nixpkgs/pkgs/shells/zsh/zsh-autosuggestions/default.nix30
-rw-r--r--nixpkgs/pkgs/shells/zsh/zsh-command-time/default.nix34
-rw-r--r--nixpkgs/pkgs/shells/zsh/zsh-completions/default.nix26
-rw-r--r--nixpkgs/pkgs/shells/zsh/zsh-deer/default.nix35
-rw-r--r--nixpkgs/pkgs/shells/zsh/zsh-deer/realpath.patch28
-rw-r--r--nixpkgs/pkgs/shells/zsh/zsh-git-prompt/default.nix70
-rw-r--r--nixpkgs/pkgs/shells/zsh/zsh-history-substring-search/default.nix26
-rw-r--r--nixpkgs/pkgs/shells/zsh/zsh-powerlevel9k/default.nix29
-rw-r--r--nixpkgs/pkgs/shells/zsh/zsh-prezto/default.nix32
-rw-r--r--nixpkgs/pkgs/shells/zsh/zsh-syntax-highlighting/default.nix27
-rw-r--r--nixpkgs/pkgs/shells/zsh/zsh-you-should-use/default.nix26
21 files changed, 767 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/shells/zsh/antibody/default.nix b/nixpkgs/pkgs/shells/zsh/antibody/default.nix
new file mode 100644
index 00000000000..0ea3c8d158d
--- /dev/null
+++ b/nixpkgs/pkgs/shells/zsh/antibody/default.nix
@@ -0,0 +1,24 @@
+{ lib, buildGoModule, fetchFromGitHub }:
+
+buildGoModule rec {
+ pname = "antibody";
+ version = "4.1.2";
+
+ goPackagePath = "github.com/getantibody/antibody";
+
+ src = fetchFromGitHub {
+ owner = "getantibody";
+ repo = "antibody";
+ rev = "v${version}";
+ sha256 = "1csanmvix7b2sa7nsy8nh3jq6gmhp8i51xivsabm1lj2y30c0ly3";
+ };
+
+ modSha256 = "1p9cw92ivwgpkvjxvwd9anbd1vzhpicm9il4pg37z2kgr2ihhnyh";
+
+ meta = with lib; {
+ description = "The fastest shell plugin manager";
+ homepage = https://github.com/getantibody/antibody;
+ license = licenses.mit;
+ maintainers = with maintainers; [ worldofpeace ];
+ };
+}
diff --git a/nixpkgs/pkgs/shells/zsh/antigen/default.nix b/nixpkgs/pkgs/shells/zsh/antigen/default.nix
new file mode 100644
index 00000000000..c754d7bbe58
--- /dev/null
+++ b/nixpkgs/pkgs/shells/zsh/antigen/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+ version = "2.2.3";
+ pname = "antigen";
+
+ src = fetchurl {
+ url = "https://github.com/zsh-users/antigen/releases/download/v${version}/antigen.zsh";
+ sha256 = "1bmp3qf14509swpxin4j9f98n05pdilzapjm0jdzbv0dy3hn20ix";
+ };
+
+ phases = "installPhase";
+
+ installPhase = ''
+ outdir=$out/share/antigen
+ mkdir -p $outdir
+ cp $src $outdir/antigen.zsh
+ '';
+
+ meta = {
+ description = "The plugin manager for zsh.";
+ homepage = http://antigen.sharats.me;
+ license = stdenv.lib.licenses.mit;
+ };
+}
diff --git a/nixpkgs/pkgs/shells/zsh/default.nix b/nixpkgs/pkgs/shells/zsh/default.nix
new file mode 100644
index 00000000000..0a26b8a7821
--- /dev/null
+++ b/nixpkgs/pkgs/shells/zsh/default.nix
@@ -0,0 +1,92 @@
+{ stdenv, fetchurl, ncurses, pcre, buildPackages }:
+
+let
+ version = "5.7.1";
+
+ documentation = fetchurl {
+ url = "mirror://sourceforge/zsh/zsh-${version}-doc.tar.xz";
+ sha256 = "1d1r88n1gfdavx4zy3svl1gljrvzim17jb2r834hafg2a016flrh";
+ };
+in
+
+stdenv.mkDerivation {
+ pname = "zsh";
+ inherit version;
+
+ src = fetchurl {
+ url = "mirror://sourceforge/zsh/zsh-${version}.tar.xz";
+ sha256 = "1s3yww0mzgvpc48kp0x868mm3gbna42sbgzya0nknj0x5hn2jq3j";
+ };
+
+ buildInputs = [ ncurses pcre ];
+
+ configureFlags = [
+ "--enable-maildir-support"
+ "--enable-multibyte"
+ "--with-tcsetpgrp"
+ "--enable-pcre"
+ "--enable-zprofile=${placeholder "out"}/etc/zprofile"
+ ];
+
+ # the zsh/zpty module is not available on hydra
+ # so skip groups Y Z
+ checkFlags = map (T: "TESTNUM=${T}") (stdenv.lib.stringToCharacters "ABCDEVW");
+
+ # XXX: think/discuss about this, also with respect to nixos vs nix-on-X
+ postInstall = ''
+ mkdir -p $out/share/info
+ tar xf ${documentation} -C $out/share
+ ln -s $out/share/zsh-*/Doc/zsh.info* $out/share/info/
+
+ mkdir -p $out/etc/
+ cat > $out/etc/zprofile <<EOF
+if test -e /etc/NIXOS; then
+ if test -r /etc/zprofile; then
+ . /etc/zprofile
+ else
+ emulate bash
+ alias shopt=false
+ . /etc/profile
+ unalias shopt
+ emulate zsh
+ fi
+ if test -r /etc/zprofile.local; then
+ . /etc/zprofile.local
+ fi
+else
+ # on non-nixos we just source the global /etc/zprofile as if we did
+ # not use the configure flag
+ if test -r /etc/zprofile; then
+ . /etc/zprofile
+ fi
+fi
+EOF
+ ${if stdenv.hostPlatform == stdenv.buildPlatform then ''
+ $out/bin/zsh -c "zcompile $out/etc/zprofile"
+ '' else ''
+ ${stdenv.lib.getBin buildPackages.zsh}/bin/zsh -c "zcompile $out/etc/zprofile"
+ ''}
+ mv $out/etc/zprofile $out/etc/zprofile_zwc_is_used
+ '';
+ # XXX: patch zsh to take zwc if newer _or equal_
+
+ meta = {
+ description = "The Z shell";
+ longDescription = ''
+ Zsh is a UNIX command interpreter (shell) usable as an interactive login
+ shell and as a shell script command processor. Of the standard shells,
+ zsh most closely resembles ksh but includes many enhancements. Zsh has
+ command line editing, builtin spelling correction, programmable command
+ completion, shell functions (with autoloading), a history mechanism, and
+ a host of other features.
+ '';
+ license = "MIT-like";
+ homepage = http://www.zsh.org/;
+ maintainers = with stdenv.lib.maintainers; [ pSub ];
+ platforms = stdenv.lib.platforms.unix;
+ };
+
+ passthru = {
+ shellPath = "/bin/zsh";
+ };
+}
diff --git a/nixpkgs/pkgs/shells/zsh/gradle-completion/default.nix b/nixpkgs/pkgs/shells/zsh/gradle-completion/default.nix
new file mode 100644
index 00000000000..ed46a21325c
--- /dev/null
+++ b/nixpkgs/pkgs/shells/zsh/gradle-completion/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+ pname = "gradle-completion";
+ version = "1.4.1";
+
+ src = fetchFromGitHub {
+ owner = "gradle";
+ repo = "gradle-completion";
+ rev = "v${version}";
+ sha256 = "15b0692i3h8h7b95465b2aw9qf5qjmjag5n62347l8yl7zbhv3l2";
+ };
+
+ # we just move two files into $out,
+ # this shouldn't bother Hydra.
+ preferLocalBuild = true;
+
+ dontBuild = true;
+ installPhase = ''
+ runHook preInstall
+
+ mkdir -p $out
+ install -Dm0644 ./_gradle $out/share/zsh/site-functions/_gradle
+ install -Dm0644 ./gradle-completion.bash $out/share/bash-completion/completions/gradle
+
+ runHook postInstall
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Gradle tab completion for bash and zsh";
+ homepage = https://github.com/gradle/gradle-completion;
+ license = licenses.mit;
+ maintainers = with maintainers; [ ma27 ];
+ };
+}
diff --git a/nixpkgs/pkgs/shells/zsh/grml-zsh-config/default.nix b/nixpkgs/pkgs/shells/zsh/grml-zsh-config/default.nix
new file mode 100644
index 00000000000..2d7dd4f24aa
--- /dev/null
+++ b/nixpkgs/pkgs/shells/zsh/grml-zsh-config/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchFromGitHub, lib
+, zsh, coreutils, inetutils, procps, txt2tags }:
+
+with lib;
+
+stdenv.mkDerivation rec {
+ pname = "grml-zsh-config";
+ version = "0.16.0";
+
+ src = fetchFromGitHub {
+ owner = "grml";
+ repo = "grml-etc-core";
+ rev = "v${version}";
+ sha256 = "1b794c3hfhw51aqp8dg8smxqjv4x518rs1ib4pdglc4d785rlq1k";
+ };
+
+ buildInputs = [ zsh coreutils txt2tags procps ]
+ ++ optional stdenv.isLinux [ inetutils ];
+
+ buildPhase = ''
+ cd doc
+ make
+ cd ..
+ '';
+
+ installPhase = ''
+ install -D -m644 etc/zsh/keephack $out/etc/zsh/keephack
+ install -D -m644 etc/zsh/zshrc $out/etc/zsh/zshrc
+
+ install -D -m644 doc/grmlzshrc.5 $out/share/man/man5/grmlzshrc.5
+ ln -s grmlzshrc.5.gz $out/share/man/man5/grml-zsh-config.5.gz
+ '';
+
+ meta = with stdenv.lib; {
+ description = "grml's zsh setup";
+ homepage = http://grml.org/zsh/;
+ license = licenses.gpl2;
+ platforms = platforms.unix;
+ maintainers = with maintainers; [ msteen rvolosatovs ];
+ };
+}
diff --git a/nixpkgs/pkgs/shells/zsh/lambda-mod-zsh-theme/default.nix b/nixpkgs/pkgs/shells/zsh/lambda-mod-zsh-theme/default.nix
new file mode 100644
index 00000000000..1794979bedf
--- /dev/null
+++ b/nixpkgs/pkgs/shells/zsh/lambda-mod-zsh-theme/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchFromGitHub, zsh }:
+
+stdenv.mkDerivation {
+ name = "lambda-mod-zsh-theme-unstable-2019-04-17";
+
+ src = fetchFromGitHub {
+ owner = "halfo";
+ repo = "lambda-mod-zsh-theme";
+ rev = "6b83aedf9de41ea4e226cdbc78af1b7b92beb6ac";
+ sha256 = "1xf451c349fxnqbvsb07y9r1iqrwslx6x4b6drmnqqqy4yx1r5dj";
+ };
+
+ buildInputs = [ zsh ];
+
+ installPhase = ''
+ chmod +x lambda-mod.zsh-theme # only executable scripts are found by `patchShebangs`
+ patchShebangs .
+
+ install -Dm0644 lambda-mod.zsh-theme $out/share/zsh/themes/lambda-mod.zsh-theme
+ '';
+
+ meta = with stdenv.lib; {
+ description = "A ZSH theme optimized for people who use Git & Unicode-compatible fonts and terminals";
+ homepage = https://github.com/halfo/lambda-mod-zsh-theme/;
+ license = licenses.mit;
+ platforms = platforms.linux;
+ maintainers = with maintainers; [ ma27 ];
+ };
+}
diff --git a/nixpkgs/pkgs/shells/zsh/nix-zsh-completions/default.nix b/nixpkgs/pkgs/shells/zsh/nix-zsh-completions/default.nix
new file mode 100644
index 00000000000..036c388fbda
--- /dev/null
+++ b/nixpkgs/pkgs/shells/zsh/nix-zsh-completions/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchFromGitHub }:
+
+let
+ version = "0.4.3";
+in
+
+stdenv.mkDerivation {
+ pname = "nix-zsh-completions";
+ inherit version;
+
+ src = fetchFromGitHub {
+ owner = "spwhitt";
+ repo = "nix-zsh-completions";
+ rev = version;
+ sha256 = "0fq1zlnsj1bb7byli7mwlz7nm2yszwmyx43ccczcv51mjjfivyp3";
+ };
+
+ installPhase = ''
+ mkdir -p $out/share/zsh/{site-functions,plugins/nix}
+ cp _* $out/share/zsh/site-functions
+ cp *.zsh $out/share/zsh/plugins/nix
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = https://github.com/spwhitt/nix-zsh-completions;
+ description = "ZSH completions for Nix, NixOS, and NixOps";
+ license = licenses.bsd3;
+ platforms = platforms.all;
+ maintainers = with maintainers; [ spwhitt olejorgenb hedning ma27 ];
+ };
+}
diff --git a/nixpkgs/pkgs/shells/zsh/oh-my-zsh/default.nix b/nixpkgs/pkgs/shells/zsh/oh-my-zsh/default.nix
new file mode 100644
index 00000000000..7df43f7dab4
--- /dev/null
+++ b/nixpkgs/pkgs/shells/zsh/oh-my-zsh/default.nix
@@ -0,0 +1,74 @@
+# This script was inspired by the ArchLinux User Repository package:
+#
+# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=oh-my-zsh-git
+{ stdenv, fetchgit }:
+
+stdenv.mkDerivation rec {
+ version = "2019-09-20";
+ pname = "oh-my-zsh";
+ rev = "6cfaa076272e08b6a81b6358b78d020e48f8a4a6";
+
+ src = fetchgit { inherit rev;
+ url = "https://github.com/robbyrussell/oh-my-zsh";
+ sha256 = "0i1mlw42g2w5pbg6zsl48pdwv1hy5zrwx9kq4w04mynwg7mc9hs5";
+ };
+
+ pathsToLink = [ "/share/oh-my-zsh" ];
+
+ phases = "installPhase";
+
+ installPhase = ''
+ outdir=$out/share/oh-my-zsh
+ template=templates/zshrc.zsh-template
+
+ mkdir -p $outdir
+ cp -r $src/* $outdir
+ cd $outdir
+
+ rm LICENSE.txt
+ rm -rf .git*
+
+ chmod -R +w templates
+
+ # Change the path to oh-my-zsh dir and disable auto-updating.
+ sed -i -e "s#ZSH=\$HOME/.oh-my-zsh#ZSH=$outdir#" \
+ -e 's/\# \(DISABLE_AUTO_UPDATE="true"\)/\1/' \
+ $template
+
+ # Look for .zsh_variables, .zsh_aliases, and .zsh_funcs, and source
+ # them, if found.
+ cat >> $template <<- EOF
+
+ # Load the variables.
+ if [ -f ~/.zsh_variables ]; then
+ . ~/.zsh_variables
+ fi
+
+ # Load the functions.
+ if [ -f ~/.zsh_funcs ]; then
+ . ~/.zsh_funcs
+ fi
+
+ # Load the aliases.
+ if [ -f ~/.zsh_aliases ]; then
+ . ~/.zsh_aliases
+ fi
+ EOF
+ '';
+
+ meta = with stdenv.lib; {
+ description = "A framework for managing your zsh configuration";
+ longDescription = ''
+ Oh My Zsh is a framework for managing your zsh configuration.
+
+ To copy the Oh My Zsh configuration file to your home directory, run
+ the following command:
+
+ $ cp -v $(nix-env -q --out-path oh-my-zsh | cut -d' ' -f3)/share/oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
+ '';
+ homepage = https://ohmyz.sh/;
+ license = licenses.mit;
+ platforms = platforms.all;
+ maintainers = with maintainers; [ scolobb nequissimus ];
+ };
+}
diff --git a/nixpkgs/pkgs/shells/zsh/oh-my-zsh/update.sh b/nixpkgs/pkgs/shells/zsh/oh-my-zsh/update.sh
new file mode 100755
index 00000000000..08b0daa4387
--- /dev/null
+++ b/nixpkgs/pkgs/shells/zsh/oh-my-zsh/update.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p curl common-updater-scripts jq
+
+set -eu -o pipefail
+
+oldVersion="$(nix-instantiate --eval -E "with import ./. {}; oh-my-zsh.version or (builtins.parseDrvName oh-my-zsh.name).version" | tr -d '"')"
+latestSha="$(curl -L -s https://api.github.com/repos/robbyrussell/oh-my-zsh/commits\?sha\=master\&since\=${oldVersion} | jq -r '.[0].sha')"
+url="$(nix-instantiate --eval -E "with import ./. {}; oh-my-zsh.src.url" | tr -d '"')"
+
+if [ ! "null" = "${latestSha}" ]; then
+ latestDate="$(curl -L -s https://api.github.com/repos/robbyrussell/oh-my-zsh/commits/${latestSha} | jq '.commit.author.date' | sed 's|"\(.*\)T.*|\1|g')"
+ update-source-version oh-my-zsh "${latestSha}" --version-key=rev
+ update-source-version oh-my-zsh "${latestDate}" --ignore-same-hash
+ nixpkgs="$(git rev-parse --show-toplevel)"
+ default_nix="$nixpkgs/pkgs/shells/zsh/oh-my-zsh/default.nix"
+ git add "${default_nix}"
+ git commit -m "oh-my-zsh: ${oldVersion} -> ${latestDate}"
+else
+ echo "oh-my-zsh is already up-to-date"
+fi
diff --git a/nixpkgs/pkgs/shells/zsh/spaceship-prompt/default.nix b/nixpkgs/pkgs/shells/zsh/spaceship-prompt/default.nix
new file mode 100644
index 00000000000..0e7536b4fa1
--- /dev/null
+++ b/nixpkgs/pkgs/shells/zsh/spaceship-prompt/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+ pname = "spaceship-prompt";
+ version = "3.11.2";
+
+ src = fetchFromGitHub {
+ owner = "denysdovhan";
+ repo = "spaceship-prompt";
+ sha256 = "1q7m9mmg82n4fddfz01y95d5n34xnzhrnn1lli0vih39sgmzim9b";
+ rev = "v${version}";
+ };
+
+ installPhase = ''
+ install -D -m644 LICENSE.md "$out/share/licenses/spaceship-prompt/LICENSE"
+ install -D -m644 README.md "$out/share/doc/spaceship-prompt/README.md"
+ find docs -type f -exec install -D -m644 {} "$out/share/doc/spaceship-prompt/{}" \;
+ find lib -type f -exec install -D -m644 {} "$out/lib/spaceship-prompt/{}" \;
+ find scripts -type f -exec install -D -m644 {} "$out/lib/spaceship-prompt/{}" \;
+ find sections -type f -exec install -D -m644 {} "$out/lib/spaceship-prompt/{}" \;
+ install -D -m644 spaceship.zsh "$out/lib/spaceship-prompt/spaceship.zsh"
+ install -d "$out/share/zsh/themes/"
+ ln -s "$out/lib/spaceship-prompt/spaceship.zsh" "$out/share/zsh/themes/spaceship.zsh-theme"
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Zsh prompt for Astronauts";
+ homepage = https://github.com/denysdovhan/spaceship-prompt/;
+ license = licenses.mit;
+ platforms = platforms.linux;
+ maintainers = with maintainers; [ nyanloutre ];
+ };
+}
diff --git a/nixpkgs/pkgs/shells/zsh/zsh-autosuggestions/default.nix b/nixpkgs/pkgs/shells/zsh/zsh-autosuggestions/default.nix
new file mode 100644
index 00000000000..4e00fee3d27
--- /dev/null
+++ b/nixpkgs/pkgs/shells/zsh/zsh-autosuggestions/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchFromGitHub, zsh }:
+
+# To make use of this derivation, use the `programs.zsh.enableAutoSuggestions` option
+
+stdenv.mkDerivation rec {
+ pname = "zsh-autosuggestions";
+ version = "0.6.3";
+
+ src = fetchFromGitHub {
+ owner = "zsh-users";
+ repo = "zsh-autosuggestions";
+ rev = "v${version}";
+ sha256 = "1h8h2mz9wpjpymgl2p7pc146c1jgb3dggpvzwm9ln3in336wl95c";
+ };
+
+ buildInputs = [ zsh ];
+
+ installPhase = ''
+ install -D zsh-autosuggestions.zsh \
+ $out/share/zsh-autosuggestions/zsh-autosuggestions.zsh
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Fish shell autosuggestions for Zsh";
+ homepage = https://github.com/zsh-users/zsh-autosuggestions;
+ license = licenses.mit;
+ platforms = platforms.unix;
+ maintainers = [ maintainers.loskutov ];
+ };
+}
diff --git a/nixpkgs/pkgs/shells/zsh/zsh-command-time/default.nix b/nixpkgs/pkgs/shells/zsh/zsh-command-time/default.nix
new file mode 100644
index 00000000000..6228b97685a
--- /dev/null
+++ b/nixpkgs/pkgs/shells/zsh/zsh-command-time/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchFromGitHub }:
+
+# To make use of this plugin, need to add
+# programs.zsh.interactiveShellInit = ''
+# source ${pkgs.zsh-command-time}/share/zsh/plugins/command-time/command-time.plugin.zsh
+# ZSH_COMMAND_TIME_COLOR="yellow"
+# ZSH_COMMAND_TIME_MIN_SECONDS=3
+# ZSH_COMMAND_TIME_ECHO=1
+# '';
+
+stdenv.mkDerivation {
+ version = "2018-04-30";
+ pname = "zsh-command-time";
+
+ src = fetchFromGitHub {
+ owner = "popstas";
+ repo = "zsh-command-time";
+ rev = "afb4a4c9ae7ce64ca9d4f334a79a25e46daad0aa";
+ sha256 = "1bvyjgz6bhgg1nwr56r50p6fblgah6yiql55pgm5abnn2h876fjq";
+ };
+
+ phases = [ "installPhase" ];
+
+ installPhase = ''
+ install -Dm0444 $src/command-time.plugin.zsh --target-directory=$out/share/zsh/plugins/command-time
+ '';
+
+ meta = with stdenv.lib; {
+ description = "Plugin that output time: xx after long commands";
+ homepage = https://github.com/popstas/zsh-command-time;
+ license = licenses.mit;
+ platforms = platforms.unix;
+ };
+}
diff --git a/nixpkgs/pkgs/shells/zsh/zsh-completions/default.nix b/nixpkgs/pkgs/shells/zsh/zsh-completions/default.nix
new file mode 100644
index 00000000000..35355fe374d
--- /dev/null
+++ b/nixpkgs/pkgs/shells/zsh/zsh-completions/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchFromGitHub}:
+
+stdenv.mkDerivation rec {
+ pname = "zsh-completions";
+ version = "0.31.0";
+
+ src = fetchFromGitHub {
+ owner = "zsh-users";
+ repo = pname;
+ rev = version;
+ sha256 = "0rw23m8cqxhcb4yjhbzb9lir60zn1xjy7hn3zv1fzz700f0i6fyk";
+ };
+
+ installPhase= ''
+ install -D --target-directory=$out/share/zsh/site-functions src/*
+ '';
+
+ meta = {
+ description = "Additional completion definitions for zsh";
+ homepage = https://github.com/zsh-users/zsh-completions;
+ license = stdenv.lib.licenses.free;
+
+ platforms = stdenv.lib.platforms.unix;
+ maintainers = [ stdenv.lib.maintainers.olejorgenb ];
+ };
+}
diff --git a/nixpkgs/pkgs/shells/zsh/zsh-deer/default.nix b/nixpkgs/pkgs/shells/zsh/zsh-deer/default.nix
new file mode 100644
index 00000000000..735d6a2b761
--- /dev/null
+++ b/nixpkgs/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/nixpkgs/pkgs/shells/zsh/zsh-deer/realpath.patch b/nixpkgs/pkgs/shells/zsh/zsh-deer/realpath.patch
new file mode 100644
index 00000000000..03850d7e5c1
--- /dev/null
+++ b/nixpkgs/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
+
diff --git a/nixpkgs/pkgs/shells/zsh/zsh-git-prompt/default.nix b/nixpkgs/pkgs/shells/zsh/zsh-git-prompt/default.nix
new file mode 100644
index 00000000000..6aadf3163d3
--- /dev/null
+++ b/nixpkgs/pkgs/shells/zsh/zsh-git-prompt/default.nix
@@ -0,0 +1,70 @@
+# zsh-git-prompt -- Informative git prompt for zsh
+#
+# Usage: to enable this plugin for all users, you could
+# add it to configuration.nix like this:
+#
+# programs.zsh.interactiveShellInit = ''
+# source ${pkgs.zsh-git-prompt}/share/zsh-git-prompt/zshrc.sh
+# '';
+#
+# Or you can install it globally but only enable it in individual
+# users' ~/.zshrc files:
+#
+# source /run/current-system/sw/share/zsh-git-prompt/zshrc.sh
+#
+# Or if installed locally:
+#
+# source ~/.nix-profile/share/zsh-git-prompt/zshrc.sh
+#
+# Either way, you then have to set a prompt that incorporates
+# git_super_status, for example:
+#
+# PROMPT='%B%m%~%b$(git_super_status) %# '
+#
+# More details are in share/doc/zsh-git-prompt/README.md, once
+# installed.
+#
+{ fetchFromGitHub
+, python
+, git
+, lib
+, haskellPackages
+}:
+
+haskellPackages.callPackage
+ ({ mkDerivation, base, HUnit, parsec, process, QuickCheck, stdenv }:
+ mkDerivation rec {
+ pname = "zsh-git-prompt";
+ version = "0.4z"; # While we await a real 0.5 release.
+ src = fetchFromGitHub {
+ owner = "starcraftman";
+ repo = "zsh-git-prompt";
+ rev = "11b83ba3b85d14c66cf2ab79faefab6d838da28e";
+ sha256 = "04aylsjfb03ckw219plkzpyiq4j9g66bjxa5pa56h1p7df6pjssb";
+ };
+ prePatch = ''
+ substituteInPlace zshrc.sh \
+ --replace ':-"python"' ':-"haskell"' \
+ --replace 'python ' '${python.interpreter} ' \
+ --replace 'git ' '${git}/bin/git '
+ '';
+ preCompileBuildDriver = "cd src";
+ postInstall = ''
+ cd ..
+ gpshare=$out/share/${pname}
+ gpdoc=$out/share/doc/${pname}
+ mkdir -p $gpshare/src $gpdoc
+ cp README.md $gpdoc
+ cp zshrc.sh gitstatus.py $gpshare
+ mv $out/bin $gpshare/src/.bin
+ '';
+ isLibrary = false;
+ isExecutable = true;
+ libraryHaskellDepends = [ base parsec process QuickCheck ];
+ executableHaskellDepends = libraryHaskellDepends;
+ testHaskellDepends = [HUnit] ++ libraryHaskellDepends;
+ homepage = "https://github.com/olivierverdier/zsh-git-prompt#readme";
+ description = "Informative git prompt for zsh";
+ license = stdenv.lib.licenses.mit;
+ maintainers = [lib.maintainers.league];
+ }) {}
diff --git a/nixpkgs/pkgs/shells/zsh/zsh-history-substring-search/default.nix b/nixpkgs/pkgs/shells/zsh/zsh-history-substring-search/default.nix
new file mode 100644
index 00000000000..b7521654667
--- /dev/null
+++ b/nixpkgs/pkgs/shells/zsh/zsh-history-substring-search/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, lib, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+ pname = "zsh-history-substring-search";
+ version = "1.0.1";
+
+ src = fetchFromGitHub {
+ owner = "zsh-users";
+ repo = "zsh-history-substring-search";
+ rev = "v${version}";
+ sha256 = "0lgmq1xcccnz5cf7vl0r0qj351hwclx9p80cl0qczxry4r2g5qaz";
+ };
+
+ installPhase = ''
+ install -D zsh-history-substring-search.zsh \
+ "$out/share/zsh-history-substring-search/zsh-history-substring-search.zsh"
+ '';
+
+ meta = with lib; {
+ description = "Fish shell history-substring-search for Zsh";
+ homepage = https://github.com/zsh-users/zsh-history-substring-search;
+ license = licenses.bsd3;
+ maintainers = with maintainers; [ qyliss ];
+ platforms = platforms.unix;
+ };
+}
diff --git a/nixpkgs/pkgs/shells/zsh/zsh-powerlevel9k/default.nix b/nixpkgs/pkgs/shells/zsh/zsh-powerlevel9k/default.nix
new file mode 100644
index 00000000000..c80ff0da60a
--- /dev/null
+++ b/nixpkgs/pkgs/shells/zsh/zsh-powerlevel9k/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchFromGitHub }:
+
+# To make use of this derivation, use
+# `programs.zsh.promptInit = "source ${pkgs.zsh-powerlevel9k}/share/zsh-powerlevel9k/powerlevel9k.zsh-theme";`
+
+stdenv.mkDerivation {
+ pname = "powerlevel9k";
+ version = "2017-11-10";
+ src = fetchFromGitHub {
+ owner = "bhilburn";
+ repo = "powerlevel9k";
+ rev = "87acc51acab3ed4fd33cda2386abed6f98c80720";
+ sha256 = "0v1dqg9hvycdkcvklg2njff97xwr8rah0nyldv4xm39r77f4yfvq";
+ };
+
+ installPhase= ''
+ install -D powerlevel9k.zsh-theme --target-directory=$out/share/zsh-powerlevel9k
+ install -D functions/* --target-directory=$out/share/zsh-powerlevel9k/functions
+ '';
+
+ meta = {
+ description = "A beautiful theme for zsh";
+ homepage = https://github.com/bhilburn/powerlevel9k;
+ license = stdenv.lib.licenses.mit;
+
+ platforms = stdenv.lib.platforms.unix;
+ maintainers = [ stdenv.lib.maintainers.pierrechevalier83 ];
+ };
+}
diff --git a/nixpkgs/pkgs/shells/zsh/zsh-prezto/default.nix b/nixpkgs/pkgs/shells/zsh/zsh-prezto/default.nix
new file mode 100644
index 00000000000..383d1967531
--- /dev/null
+++ b/nixpkgs/pkgs/shells/zsh/zsh-prezto/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchgit }:
+
+stdenv.mkDerivation {
+ name = "zsh-prezto-2019-03-18";
+ src = fetchgit {
+ url = "https://github.com/sorin-ionescu/prezto";
+ rev = "1f4601e44c989b90dc7314b151891fa60a101251";
+ sha256 = "1dcd5r7pc4biiplm0lh7yca0h6hs0xpaq9dwaarmfsh9wrd68350";
+ fetchSubmodules = true;
+ };
+ buildPhase = ''
+ sed -i '/\''${ZDOTDIR:\-\$HOME}\/.zpreztorc" ]]/i\
+ if [[ -s "/etc/zpreztorc" ]]; then\
+ source "/etc/zpreztorc"\
+ fi' init.zsh
+ sed -i -e "s|\''${ZDOTDIR:\-\$HOME}/.zprezto/|$out/|g" init.zsh
+ for i in runcoms/*; do
+ sed -i -e "s|\''${ZDOTDIR:\-\$HOME}/.zprezto/|$out/|g" $i
+ done
+ '';
+ installPhase = ''
+ mkdir -p $out
+ cp ./* $out/ -R
+ '';
+ meta = with stdenv.lib; {
+ description = "Prezto is the configuration framework for Zsh; it enriches the command line interface environment with sane defaults, aliases, functions, auto completion, and prompt themes.";
+ homepage = https://github.com/sorin-ionescu/prezto;
+ license = licenses.mit;
+ maintainers = with maintainers; [ ];
+ platforms = with platforms; unix;
+ };
+}
diff --git a/nixpkgs/pkgs/shells/zsh/zsh-syntax-highlighting/default.nix b/nixpkgs/pkgs/shells/zsh/zsh-syntax-highlighting/default.nix
new file mode 100644
index 00000000000..741587ef960
--- /dev/null
+++ b/nixpkgs/pkgs/shells/zsh/zsh-syntax-highlighting/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchFromGitHub, zsh }:
+
+# To make use of this derivation, use the `programs.zsh.enableSyntaxHighlighting` option
+
+stdenv.mkDerivation rec {
+ version = "0.6.0";
+ pname = "zsh-syntax-highlighting";
+
+ src = fetchFromGitHub {
+ owner = "zsh-users";
+ repo = "zsh-syntax-highlighting";
+ rev = version;
+ sha256 = "0zmq66dzasmr5pwribyh4kbkk23jxbpdw4rjxx0i7dx8jjp2lzl4";
+ };
+
+ buildInputs = [ zsh ];
+
+ installFlags = "PREFIX=$(out)";
+
+ meta = with stdenv.lib; {
+ description = "Fish shell like syntax highlighting for Zsh";
+ homepage = https://github.com/zsh-users/zsh-syntax-highlighting;
+ license = licenses.bsd3;
+ platforms = platforms.unix;
+ maintainers = [ maintainers.loskutov ];
+ };
+}
diff --git a/nixpkgs/pkgs/shells/zsh/zsh-you-should-use/default.nix b/nixpkgs/pkgs/shells/zsh/zsh-you-should-use/default.nix
new file mode 100644
index 00000000000..39e1cedc7d0
--- /dev/null
+++ b/nixpkgs/pkgs/shells/zsh/zsh-you-should-use/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+ pname = "zsh-you-should-use";
+ version = "1.4.0";
+
+ src = fetchFromGitHub {
+ owner = "MichaelAquilina";
+ repo = pname;
+ rev = version;
+ sha256 = "1n0mcgahx40acqjj617k0rhqpzjqjaa9xfs4b1xrjp3qdy9s0ns0";
+ };
+
+ dontBuild = true;
+
+ installPhase = ''
+ install -D you-should-use.plugin.zsh $out/share/zsh/plugins/you-should-use/you-should-use.plugin.zsh
+ '';
+
+ meta = with stdenv.lib; {
+ homepage = https://github.com/MichaelAquilina/zsh-you-should-use;
+ license = licenses.gpl3;
+ description = "ZSH plugin that reminds you to use existing aliases for commands you just typed";
+ maintainers = with maintainers; [ ma27 ];
+ };
+}