diff options
author | Mx Kookie <kookie@spacekookie.de> | 2020-10-31 19:35:09 +0100 |
---|---|---|
committer | Mx Kookie <kookie@spacekookie.de> | 2020-10-31 19:35:09 +0100 |
commit | c4625b175f8200f643fd6e11010932ea44c78433 (patch) | |
tree | bce3f89888c8ac3991fa5569a878a9eab6801ccc /infra/libkookie/nixpkgs/pkgs/shells/zsh | |
parent | 49f735974dd103039ddc4cb576bb76555164a9e7 (diff) | |
parent | d661aa56a8843e991261510c1bb28fdc2f6975ae (diff) |
Add 'infra/libkookie/' from commit 'd661aa56a8843e991261510c1bb28fdc2f6975ae'
git-subtree-dir: infra/libkookie
git-subtree-mainline: 49f735974dd103039ddc4cb576bb76555164a9e7
git-subtree-split: d661aa56a8843e991261510c1bb28fdc2f6975ae
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/shells/zsh')
30 files changed, 1053 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/shells/zsh/antibody/default.nix b/infra/libkookie/nixpkgs/pkgs/shells/zsh/antibody/default.nix new file mode 100644 index 000000000000..325bae4f9cce --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/shells/zsh/antibody/default.nix @@ -0,0 +1,26 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "antibody"; + version = "6.1.1"; + + src = fetchFromGitHub { + owner = "getantibody"; + repo = "antibody"; + rev = "v${version}"; + sha256 = "0icag53svzdm7yvzp855fp0f7q0g0jkfmjaa1sj6mmb01c1xgzi1"; + }; + + vendorSha256 = "0z8fma3v2dph8nv3q4lmv43s6p5sc338xb7kcmnpwcc0iw7b4vyj"; + + doCheck = false; + + buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ]; + + meta = with lib; { + description = "The fastest shell plugin manager"; + homepage = "https://github.com/getantibody/antibody"; + license = licenses.mit; + maintainers = with maintainers; [ filalex77 worldofpeace ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/shells/zsh/antigen/default.nix b/infra/libkookie/nixpkgs/pkgs/shells/zsh/antigen/default.nix new file mode 100644 index 000000000000..5603e5edf598 --- /dev/null +++ b/infra/libkookie/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/infra/libkookie/nixpkgs/pkgs/shells/zsh/default.nix b/infra/libkookie/nixpkgs/pkgs/shells/zsh/default.nix new file mode 100644 index 000000000000..56c76289e857 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/shells/zsh/default.nix @@ -0,0 +1,92 @@ +{ stdenv, fetchurl, ncurses, pcre, buildPackages }: + +let + version = "5.8"; + + documentation = fetchurl { + url = "mirror://sourceforge/zsh/zsh-${version}-doc.tar.xz"; + sha256 = "1i6wdzq6rfjx5yjrpzan1jf50hk2pfzy5qib9mb7cnnbjfar6klv"; + }; +in + +stdenv.mkDerivation { + pname = "zsh"; + inherit version; + + src = fetchurl { + url = "mirror://sourceforge/zsh/zsh-${version}.tar.xz"; + sha256 = "09yyaadq738zlrnlh1hd3ycj1mv3q5hh4xl1ank70mjnqm6bbi6w"; + }; + + 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 = "https://www.zsh.org/"; + maintainers = with stdenv.lib.maintainers; [ pSub ]; + platforms = stdenv.lib.platforms.unix; + }; + + passthru = { + shellPath = "/bin/zsh"; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/shells/zsh/fzf-zsh/default.nix b/infra/libkookie/nixpkgs/pkgs/shells/zsh/fzf-zsh/default.nix new file mode 100644 index 000000000000..075707f425c4 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/shells/zsh/fzf-zsh/default.nix @@ -0,0 +1,37 @@ +{ stdenv, fetchFromGitHub, fzf }: + +stdenv.mkDerivation rec { + pname = "fzf-zsh-unstable"; + version = "2019-09-09"; + + src = fetchFromGitHub { + owner = "Wyntau"; + repo = "fzf-zsh"; + rev = "829d7e40cc437dce8a6e234e259bbd4065e87124"; + sha256 = "1irjmxhcg1fm4g8p3psjqk7sz5qhj5kw73pyhv91njvpdhn9l26z"; + }; + + postPatch = '' + substituteInPlace fzf-zsh.plugin.zsh \ + --replace \ + 'fzf_path="$( cd "$fzf_zsh_path/../fzf/" && pwd )"' \ + "fzf_path=${fzf}" \ + --replace \ + '$fzf_path/shell' \ + '${fzf}/share/fzf' + ''; + + dontBuild = true; + + installPhase = '' + install -Dm0644 fzf-zsh.plugin.zsh $out/share/zsh/plugins/fzf-zsh/fzf-zsh.plugin.zsh + ''; + + meta = with stdenv.lib; { + homepage = "https://github.com/wyntau/fzf-zsh"; + description = "wrap fzf to use in oh-my-zsh"; + license = licenses.mit; + maintainers = with maintainers; [ ma27 ]; + platforms = platforms.unix; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/shells/zsh/gradle-completion/default.nix b/infra/libkookie/nixpkgs/pkgs/shells/zsh/gradle-completion/default.nix new file mode 100644 index 000000000000..72667d862a89 --- /dev/null +++ b/infra/libkookie/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; [ ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/shells/zsh/grml-zsh-config/default.nix b/infra/libkookie/nixpkgs/pkgs/shells/zsh/grml-zsh-config/default.nix new file mode 100644 index 000000000000..756c01d6e346 --- /dev/null +++ b/infra/libkookie/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.17.4"; + + src = fetchFromGitHub { + owner = "grml"; + repo = "grml-etc-core"; + rev = "v${version}"; + sha256 = "09c3f7s2r0cb8g9kgh3xhc8dhr1656g1q9s9i3s5imvknwqii6as"; + }; + + 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 = "https://grml.org/zsh/"; + license = licenses.gpl2; + platforms = platforms.unix; + maintainers = with maintainers; [ msteen rvolosatovs ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/shells/zsh/lambda-mod-zsh-theme/default.nix b/infra/libkookie/nixpkgs/pkgs/shells/zsh/lambda-mod-zsh-theme/default.nix new file mode 100644 index 000000000000..37614dac0a32 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/shells/zsh/lambda-mod-zsh-theme/default.nix @@ -0,0 +1,25 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation { + pname = "lambda-mod-zsh-theme-unstable"; + version = "2020-10-03"; + + src = fetchFromGitHub { + owner = "halfo"; + repo = "lambda-mod-zsh-theme"; + rev = "78347ea9709935f265e558b6345919d12323fbff"; + sha256 = "0fvxnvgbcvwii7ghvpj5l43frllq71wwjvfg7cqfmic727z001dh"; + }; + + installPhase = '' + 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/infra/libkookie/nixpkgs/pkgs/shells/zsh/nix-zsh-completions/default.nix b/infra/libkookie/nixpkgs/pkgs/shells/zsh/nix-zsh-completions/default.nix new file mode 100644 index 000000000000..623d562b16e0 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/shells/zsh/nix-zsh-completions/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchFromGitHub }: + +let + version = "0.4.4"; +in + +stdenv.mkDerivation { + pname = "nix-zsh-completions"; + inherit version; + + src = fetchFromGitHub { + owner = "spwhitt"; + repo = "nix-zsh-completions"; + rev = version; + sha256 = "1n9whlys95k4wc57cnz3n07p7zpkv796qkmn68a50ygkx6h3afqf"; + }; + + 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/infra/libkookie/nixpkgs/pkgs/shells/zsh/oh-my-zsh/default.nix b/infra/libkookie/nixpkgs/pkgs/shells/zsh/oh-my-zsh/default.nix new file mode 100644 index 000000000000..73fd6ceeb061 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/shells/zsh/oh-my-zsh/default.nix @@ -0,0 +1,83 @@ +# 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, fetchFromGitHub }: + +stdenv.mkDerivation rec { + version = "2020-10-15"; + pname = "oh-my-zsh"; + rev = "5b717ab3e4bfb627a936d7c04367a39867734d63"; + + src = fetchFromGitHub { + inherit rev; + owner = "ohmyzsh"; + repo = "ohmyzsh"; + sha256 = "0qm0mdvcvf5s6ypbq7z1x286sdv6ii2yfqvv1dss7zqjbg5j08gz"; + }; + + installPhase = '' + outdir=$out/share/oh-my-zsh + template=templates/zshrc.zsh-template + + mkdir -p $outdir + cp -r * $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 + + chmod +w oh-my-zsh.sh + + # Both functions expect oh-my-zsh to be in ~/.oh-my-zsh and try to + # modify the directory. + cat >> oh-my-zsh.sh <<- EOF + + # Undefine functions that don't work on Nix. + unfunction uninstall_oh_my_zsh + unfunction upgrade_oh_my_zsh + EOF + + # 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/infra/libkookie/nixpkgs/pkgs/shells/zsh/oh-my-zsh/update.sh b/infra/libkookie/nixpkgs/pkgs/shells/zsh/oh-my-zsh/update.sh new file mode 100755 index 000000000000..738c0810737a --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/shells/zsh/oh-my-zsh/update.sh @@ -0,0 +1,19 @@ +#!/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 ./. {}; lib.getVersion oh-my-zsh" | tr -d '"')" +latestSha="$(curl -L -s https://api.github.com/repos/ohmyzsh/ohmyzsh/commits\?sha\=master\&since\=${oldVersion} | jq -r '.[0].sha')" + +if [ ! "null" = "${latestSha}" ]; then + latestDate="$(curl -L -s https://api.github.com/repos/ohmyzsh/ohmyzsh/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/infra/libkookie/nixpkgs/pkgs/shells/zsh/pure-prompt/default.nix b/infra/libkookie/nixpkgs/pkgs/shells/zsh/pure-prompt/default.nix new file mode 100644 index 000000000000..bfcd3be5e9cf --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/shells/zsh/pure-prompt/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchFromGitHub }: + +with stdenv.lib; + +stdenv.mkDerivation rec { + pname = "pure-prompt"; + version = "1.13.0"; + + src = fetchFromGitHub { + owner = "sindresorhus"; + repo = "pure"; + rev = "v${version}"; + sha256 = "16q9v4c8lagp4vxm7qhagilqnwf1g4pbds56x5wfj4cwc0x2gclw"; + }; + + installPhase = '' + OUTDIR="$out/share/zsh/site-functions" + mkdir -p "$OUTDIR" + cp pure.zsh "$OUTDIR/prompt_pure_setup" + cp async.zsh "$OUTDIR/async" + ''; + + meta = { + description = "Pretty, minimal and fast ZSH prompt"; + homepage = "https://github.com/sindresorhus/pure"; + license = licenses.mit; + platforms = platforms.all; + maintainers = with maintainers; [ pacien pablovsky ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/shells/zsh/spaceship-prompt/default.nix b/infra/libkookie/nixpkgs/pkgs/shells/zsh/spaceship-prompt/default.nix new file mode 100644 index 000000000000..7db8cdb33492 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/shells/zsh/spaceship-prompt/default.nix @@ -0,0 +1,35 @@ +{ 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" + install -d "$out/share/zsh/site-functions/" + ln -s "$out/lib/spaceship-prompt/spaceship.zsh" "$out/share/zsh/site-functions/prompt_spaceship_setup" + ''; + + meta = with stdenv.lib; { + description = "Zsh prompt for Astronauts"; + homepage = "https://github.com/denysdovhan/spaceship-prompt/"; + license = licenses.mit; + platforms = platforms.linux ++ platforms.darwin; + maintainers = with maintainers; [ nyanloutre ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/shells/zsh/zplug/default.nix b/infra/libkookie/nixpkgs/pkgs/shells/zsh/zplug/default.nix new file mode 100644 index 000000000000..d35eb345dda9 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/shells/zsh/zplug/default.nix @@ -0,0 +1,30 @@ +{ stdenv, lib, fetchFromGitHub }: + +stdenv.mkDerivation rec { + pname = "zplug"; + version = "2.4.2"; + + src = fetchFromGitHub { + owner = "zplug"; + repo = pname; + rev = version; + sha256 = "0hci1pbs3k5icwfyfw5pzcgigbh9vavprxxvakg1xm19n8zb61b3"; + }; + + dontConfigure = true; + dontBuild = true; + dontPatch = true; + + installPhase = '' + mkdir -p $out + cp -r $src/* $out/ + ''; + + meta = with lib; { + description = "A next-generation plugin manager for zsh"; + homepage = "https://github.com/zplug/zplug"; + license = licenses.mit; + platforms = platforms.all; + maintainers = [ maintainers.s1341 ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-autosuggestions/default.nix b/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-autosuggestions/default.nix new file mode 100644 index 000000000000..58e560d2fa4d --- /dev/null +++ b/infra/libkookie/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.4"; + + src = fetchFromGitHub { + owner = "zsh-users"; + repo = "zsh-autosuggestions"; + rev = "v${version}"; + sha256 = "0h52p2waggzfshvy1wvhj4hf06fmzd44bv6j18k3l9rcx6aixzn6"; + }; + + 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/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-bd/default.nix b/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-bd/default.nix new file mode 100644 index 000000000000..b5b66af6ca38 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-bd/default.nix @@ -0,0 +1,31 @@ +{ stdenv, fetchFromGitHub}: + +stdenv.mkDerivation rec { + pname = "zsh-bd"; + version = "2018-07-04"; + + src = fetchFromGitHub { + owner = "Tarrasch"; + repo = pname; + rev = "d4a55e661b4c9ef6ae4568c6abeff48bdf1b1af7"; + sha256 = "020f8nq86g96cps64hwrskppbh2dapfw2m9np1qbs5pgh16z4fcb"; + }; + + dontBuild = true; + + installPhase = '' + mkdir -p $out/share/zsh-bd + cp {.,$out/share/zsh-bd}/bd.zsh + cd $out/share/zsh-bd + ln -s bd{,.plugin}.zsh + ''; + + meta = { + description = "Jump back to a specific directory, without doing `cd ../../..` "; + homepage = "https://github.com/Tarrasch/zsh-bd"; + license = stdenv.lib.licenses.free; + + platforms = stdenv.lib.platforms.unix; + maintainers = [ stdenv.lib.maintainers.olejorgenb ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-command-time/default.nix b/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-command-time/default.nix new file mode 100644 index 000000000000..3ef210a02818 --- /dev/null +++ b/infra/libkookie/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/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-completions/default.nix b/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-completions/default.nix new file mode 100644 index 000000000000..89a91ad0508e --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-completions/default.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchFromGitHub}: + +stdenv.mkDerivation rec { + pname = "zsh-completions"; + version = "0.32.0"; + + src = fetchFromGitHub { + owner = "zsh-users"; + repo = pname; + rev = version; + sha256 = "12l9wrx0aysyj62kgp5limglz0nq73w8c415wcshxnxmhyk6sw6d"; + }; + + 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/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-deer/default.nix b/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-deer/default.nix new file mode 100644 index 000000000000..735d6a2b7619 --- /dev/null +++ b/infra/libkookie/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/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-deer/realpath.patch b/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-deer/realpath.patch new file mode 100644 index 000000000000..03850d7e5c12 --- /dev/null +++ b/infra/libkookie/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/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-fast-syntax-highlighting/default.nix b/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-fast-syntax-highlighting/default.nix new file mode 100644 index 000000000000..452419bf8b09 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-fast-syntax-highlighting/default.nix @@ -0,0 +1,30 @@ +{ stdenvNoCC, lib, fetchFromGitHub }: + +stdenvNoCC.mkDerivation rec { + pname = "zsh-fast-syntax-highlighting"; + version = "1.54"; + + src = fetchFromGitHub { + owner = "zdharma"; + repo = "fast-syntax-highlighting"; + rev = "v${version}"; + sha256 = "019hda2pj8lf7px4h1z07b9l6icxx4b2a072jw36lz9bh6jahp32"; + }; + + dontConfigure = true; + dontBuild = true; + + installPhase = '' + plugindir="$out/share/zsh/site-functions" + + mkdir -p "$plugindir" + cp -r -- {,_,-}fast-* chroma themes "$plugindir"/ + ''; + + meta = with lib; { + description = "Syntax-highlighting for Zshell"; + homepage = "https://github.com/zdharma/fast-syntax-highlighting"; + license = licenses.bsd3; + platforms = platforms.unix; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-git-prompt/default.nix b/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-git-prompt/default.nix new file mode 100644 index 000000000000..6aadf3163d34 --- /dev/null +++ b/infra/libkookie/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/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-history-substring-search/default.nix b/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-history-substring-search/default.nix new file mode 100644 index 000000000000..9890993eed64 --- /dev/null +++ b/infra/libkookie/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.2"; + + src = fetchFromGitHub { + owner = "zsh-users"; + repo = "zsh-history-substring-search"; + rev = "v${version}"; + sha256 = "0y8va5kc2ram38hbk2cibkk64ffrabfv1sh4xm7pjspsba9n5p1y"; + }; + + 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/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-history/default.nix b/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-history/default.nix new file mode 100644 index 000000000000..3d48467a2465 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-history/default.nix @@ -0,0 +1,37 @@ +{ lib, fetchFromGitHub, buildGoModule, installShellFiles, nixosTests }: + +buildGoModule rec { + pname = "zsh-history"; + version = "2019-12-10"; + + src = fetchFromGitHub { + owner = "b4b4r07"; + repo = "history"; + rev = "8da016bd91b0c2eb53c9980f00eee6abdbb097e2"; + sha256 = "13n643ik1zjvpk8h9458yd9ffahhbdnigmbrbmpn7b7g23wqqsi3"; + }; + + nativeBuildInputs = [ installShellFiles ]; + + vendorSha256 = "13rc1afds5xg30faqz35haha4kxg73b5nvjirbrkc6kna0vhb54z"; + + doCheck = false; + + postInstall = '' + install -d $out/share + cp -r "$NIX_BUILD_TOP/source/misc/"* "$out/share" + installShellCompletion --zsh --name _history $out/share/zsh/completions/_history + ''; + + meta = with lib; { + description = "A CLI to provide enhanced history for your ZSH shell"; + license = licenses.mit; + homepage = "https://github.com/b4b4r07/history"; + platforms = platforms.unix; + maintainers = with maintainers; [ kampka ]; + }; + + passthru.tests = { + zsh-history-shell-integration = nixosTests.zsh-history; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-nix-shell/default.nix b/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-nix-shell/default.nix new file mode 100644 index 000000000000..6db78f1c0f56 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-nix-shell/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchFromGitHub, pkgs }: + +# To make use of this derivation, use +# `programs.zsh.interactiveShellInit = "source ${pkgs.zsh-nix-shell}/share/zsh-nix-shell/nix-shell.plugin.zsh";` + +stdenv.mkDerivation rec { + pname = "zsh-nix-shell"; + version = "0.1.0"; + + src = fetchFromGitHub { + owner = "chisui"; + repo = "zsh-nix-shell"; + rev = "v${version}"; + sha256 = "0snhch9hfy83d4amkyxx33izvkhbwmindy0zjjk28hih1a9l2jmx"; + }; + + installPhase = '' + install -D nix-shell.plugin.zsh --target-directory=$out/share/zsh-nix-shell + install -D scripts/* --target-directory=$out/share/zsh-nix-shell/scripts + ''; + + meta = with stdenv.lib; { + description = "zsh plugin that lets you use zsh in nix-shell shell"; + homepage = src.meta.homepage; + license = licenses.bsd3; + platforms = platforms.unix; + maintainers = with maintainers; [ aw ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-powerlevel10k/default.nix b/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-powerlevel10k/default.nix new file mode 100644 index 000000000000..5d81ceaba1b2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-powerlevel10k/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchFromGitHub, substituteAll, pkgs }: + +# To make use of this derivation, use +# `programs.zsh.promptInit = "source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme";` + +stdenv.mkDerivation rec { + pname = "powerlevel10k"; + version = "1.12.0"; + + src = fetchFromGitHub { + owner = "romkatv"; + repo = "powerlevel10k"; + rev = "v${version}"; + sha256 = "08zg4in70h3kray6lazszzy26gvil9w2cr6xmkbgjsv3k6w3k0jg"; + }; + + patches = [ + (substituteAll { + src = ./gitstatusd.patch; + gitstatusdPath = "${pkgs.gitAndTools.gitstatus}/bin/gitstatusd"; + }) + ]; + + installPhase = '' + install -D powerlevel10k.zsh-theme --target-directory=$out/share/zsh-powerlevel10k + install -D config/* --target-directory=$out/share/zsh-powerlevel10k/config + install -D internal/* --target-directory=$out/share/zsh-powerlevel10k/internal + cp -R gitstatus $out/share/zsh-powerlevel10k/gitstatus + ''; + + meta = { + description = "A fast reimplementation of Powerlevel9k ZSH theme"; + homepage = "https://github.com/romkatv/powerlevel10k"; + license = stdenv.lib.licenses.mit; + + platforms = stdenv.lib.platforms.unix; + maintainers = [ stdenv.lib.maintainers.hexa ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-powerlevel10k/gitstatusd.patch b/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-powerlevel10k/gitstatusd.patch new file mode 100644 index 000000000000..3d1c1eaa36d4 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-powerlevel10k/gitstatusd.patch @@ -0,0 +1,13 @@ +diff --git a/gitstatus/gitstatus.plugin.zsh b/gitstatus/gitstatus.plugin.zsh +index b469072..eb1e3be 100644 +--- a/gitstatus/gitstatus.plugin.zsh ++++ b/gitstatus/gitstatus.plugin.zsh +@@ -44,6 +44,8 @@ + + [[ -o 'interactive' ]] || 'return' + ++GITSTATUS_DAEMON=@gitstatusdPath@ ++ + # Temporarily change options. + 'builtin' 'local' '-a' '_gitstatus_opts' + [[ ! -o 'aliases' ]] || _gitstatus_opts+=('aliases') diff --git a/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-powerlevel9k/default.nix b/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-powerlevel9k/default.nix new file mode 100644 index 000000000000..676f9458675b --- /dev/null +++ b/infra/libkookie/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/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-prezto/default.nix b/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-prezto/default.nix new file mode 100644 index 000000000000..dffecf617b17 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-prezto/default.nix @@ -0,0 +1,34 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + pname = "zsh-prezto"; + version = "2020-05-20"; + src = fetchFromGitHub { + owner = "sorin-ionescu"; + repo = "prezto"; + rev = "793f239a5e38ef2c4b76a4955bb734520303e8c4"; + sha256 = "0xhdl1g0rvlikq6qxh6cwp6wsrgmw4l1rmmq5xpc7wl6dyh35yri"; + 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/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-syntax-highlighting/default.nix b/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-syntax-highlighting/default.nix new file mode 100644 index 000000000000..906352b8b3e0 --- /dev/null +++ b/infra/libkookie/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.7.1"; + pname = "zsh-syntax-highlighting"; + + src = fetchFromGitHub { + owner = "zsh-users"; + repo = "zsh-syntax-highlighting"; + rev = version; + sha256 = "03r6hpb5fy4yaakqm3lbf4xcvd408r44jgpv4lnzl9asp4sb9qc0"; + }; + + 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/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-you-should-use/default.nix b/infra/libkookie/nixpkgs/pkgs/shells/zsh/zsh-you-should-use/default.nix new file mode 100644 index 000000000000..603757c3332b --- /dev/null +++ b/infra/libkookie/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.7.3"; + + src = fetchFromGitHub { + owner = "MichaelAquilina"; + repo = pname; + rev = version; + sha256 = "1dz48rd66priqhxx7byndqhbmlwxi1nfw8ik25k0z5k7k754brgy"; + }; + + 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 ]; + }; +} |