diff options
Diffstat (limited to 'pkgs/shells')
58 files changed, 881 insertions, 279 deletions
diff --git a/pkgs/shells/any-nix-shell/default.nix b/pkgs/shells/any-nix-shell/default.nix index 21f40858ea2..bab39aef244 100644 --- a/pkgs/shells/any-nix-shell/default.nix +++ b/pkgs/shells/any-nix-shell/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchFromGitHub, makeWrapper }: stdenv.mkDerivation rec { - name = "any-nix-shell-${version}"; + pname = "any-nix-shell"; version = "1.1.0"; src = fetchFromGitHub { @@ -21,7 +21,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "fish and zsh support for nix-shell"; license = licenses.mit; - homepage = https://github.com/haslersn/any-nix-shell; + homepage = "https://github.com/haslersn/any-nix-shell"; maintainers = with maintainers; [ haslersn ]; }; -} \ No newline at end of file +} diff --git a/pkgs/shells/bash/4.4.nix b/pkgs/shells/bash/4.4.nix index e5e33c76d20..4cb3c14a9a0 100644 --- a/pkgs/shells/bash/4.4.nix +++ b/pkgs/shells/bash/4.4.nix @@ -41,9 +41,10 @@ stdenv.mkDerivation rec { -DSSH_SOURCE_BASHRC ''; - patchFlags = "-p0"; + patchFlags = [ "-p0" "-T" ]; patches = upstreamPatches + ++ [ ./pgrp-pipe-4.4.patch ] ++ optional stdenv.hostPlatform.isCygwin ./cygwin-bash-4.4.11-2.src.patch # https://lists.gnu.org/archive/html/bug-bash/2016-10/msg00006.html ++ optional stdenv.hostPlatform.isMusl (fetchurl { @@ -106,7 +107,7 @@ stdenv.mkDerivation rec { ''; meta = with stdenv.lib; { - homepage = https://www.gnu.org/software/bash/; + homepage = "https://www.gnu.org/software/bash/"; description = "GNU Bourne-Again Shell, the de facto standard shell on Linux" + (if interactive then " (for interactive use)" else ""); diff --git a/pkgs/shells/bash/5.0.nix b/pkgs/shells/bash/5.0.nix index b78282ab6e4..09030493fb6 100644 --- a/pkgs/shells/bash/5.0.nix +++ b/pkgs/shells/bash/5.0.nix @@ -41,9 +41,10 @@ stdenv.mkDerivation rec { -DSSH_SOURCE_BASHRC ''; - patchFlags = "-p0"; + patchFlags = [ "-p0" "-T" ]; - patches = upstreamPatches; + patches = upstreamPatches + ++ [ ./pgrp-pipe-5.0.patch ]; configureFlags = [ (if interactive then "--with-installed-readline" else "--disable-readline") @@ -97,7 +98,7 @@ stdenv.mkDerivation rec { ''; meta = with stdenv.lib; { - homepage = https://www.gnu.org/software/bash/; + homepage = "https://www.gnu.org/software/bash/"; description = "GNU Bourne-Again Shell, the de facto standard shell on Linux" + (if interactive then " (for interactive use)" else ""); diff --git a/pkgs/shells/bash/bash-5.0-patches.nix b/pkgs/shells/bash/bash-5.0-patches.nix index 560aef16644..e6481aa4da1 100644 --- a/pkgs/shells/bash/bash-5.0-patches.nix +++ b/pkgs/shells/bash/bash-5.0-patches.nix @@ -8,4 +8,13 @@ patch: [ (patch "005" "0xl2kyzm84nlyklrqzkn73ixabhzfhn9x91lzcmis89cppclvxav") (patch "006" "0844749ixk1z60437nkznzms1f0nzh9an62kj7sny6r0zyk2k1fn") (patch "007" "16xg37gp1b8zlj5969w8mcrparwqlcbj9695vn3qhgb7wdz1xd0p") +(patch "008" "1qyp19krjh8zxvb0jgwmyjz40djslwcf4xi7kc1ab0iaca44bipf") +(patch "009" "00yrjjqd95s81b21qq3ba1y7h879q8jaajlkjggc6grhcwbs4g7d") +(patch "010" "04ca5bjv456v538mkspzvn4xb2zdphh31r4fpvfm9p5my0jw7yyn") +(patch "011" "1sklyixvsv8993kxzs0jigacpdchjrq7jv5xpdx7kbqyp4rf6k9c") +(patch "012" "0cz21qg2gbr40lfgza7g02bqi2qknwqgxnq459pjj640d0cywhr9") +(patch "013" "16h9nwz3yzwj7fnxvlidjymdc4yr30h818433gh9j1x3in6igmzm") +(patch "014" "12gm5bvv2pd3m72z2ilj26pa08c61az253dsgfl24vpf2ijywvjx") +(patch "015" "0pm0px758w4i23s55wajcv6lqfiym7zgxvq0pxf6vclkv8nxy5x5") +(patch "016" "0vdha332km2iwx8g2ld15jy7d24cbplzgr1531dpzylr9ajxglgz") ] diff --git a/pkgs/shells/bash/bash-completion/default.nix b/pkgs/shells/bash/bash-completion/default.nix index b5f600da8f7..e5ef70e43a9 100644 --- a/pkgs/shells/bash/bash-completion/default.nix +++ b/pkgs/shells/bash/bash-completion/default.nix @@ -1,25 +1,73 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchFromGitHub +, fetchpatch +, autoreconfHook +, perl +, ps +, python3Packages +, bashInteractive +}: stdenv.mkDerivation rec { - name = "bash-completion-${version}"; - version = "2.8"; + pname = "bash-completion"; + version = "2.10"; - src = fetchurl { - url = "https://github.com/scop/bash-completion/releases/download/${version}/${name}.tar.xz"; - sha256 = "0kgmflrr1ga9wfk770vmakna3nj46ylb5ky9ipd0v2k9ymq5a7y0"; + src = fetchFromGitHub { + owner = "scop"; + repo = "bash-completion"; + rev = version; + sha256 = "047yjryy9d6hp18wkigbfrw9r0sm31inlsp8l28fhxg8ii032sgq"; }; - doCheck = true; + nativeBuildInputs = [ autoreconfHook ]; + + doCheck = !stdenv.isDarwin; + checkInputs = [ + # perl is assumed by perldoc completion + perl + # ps assumed to exist by gdb, killall, pgrep, pidof, + # pkill, pwdx, renice, and reptyr completions + ps + python3Packages.pexpect + python3Packages.pytest + bashInteractive + + # use xdist to speed up the test run, just like upstream: + # https://github.com/scop/bash-completion/blob/009bf2228c68894629eb6fd17b3dc0f1f6d67615/test/requirements.txt#L4 + python3Packages.pytest_xdist + ]; + + # - ignore test_gcc on ARM because it assumes -march=native + # - ignore test_chsh because it assumes /etc/shells exists + # - ignore test_ether_wake, test_ifdown, test_ifstat, test_ifup, + # test_iperf, test_iperf3, test_nethogs and ip_addresses + # because they try to touch network + # - ignore test_ls because impure logic + # - ignore test_screen because it assumes vt terminals exist + checkPhase = '' + pytest -n $NIX_BUILD_CORES . \ + ${stdenv.lib.optionalString (stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isAarch32) "--ignore=test/t/test_gcc.py"} \ + --ignore=test/t/test_chsh.py \ + --ignore=test/t/test_ether_wake.py \ + --ignore=test/t/test_ifdown.py \ + --ignore=test/t/test_ifstat.py \ + --ignore=test/t/test_ifup.py \ + --ignore=test/t/test_iperf.py \ + --ignore=test/t/test_iperf3.py \ + --ignore=test/t/test_nethogs.py \ + --ignore=test/t/unit/test_unit_ip_addresses.py \ + --ignore=test/t/test_ls.py \ + --ignore=test/t/test_screen.py + ''; prePatch = stdenv.lib.optionalString stdenv.isDarwin '' sed -i -e 's/readlink -f/readlink/g' bash_completion completions/* ''; meta = with stdenv.lib; { - homepage = https://github.com/scop/bash-completion; + homepage = "https://github.com/scop/bash-completion"; description = "Programmable completion for the bash shell"; license = licenses.gpl2Plus; platforms = platforms.unix; - maintainers = [ maintainers.peti ]; + maintainers = [ maintainers.peti maintainers.xfix ]; }; } diff --git a/pkgs/shells/bash/nix-bash-completions/default.nix b/pkgs/shells/bash/nix-bash-completions/default.nix index 5ac117cf1e5..5dfd673a629 100644 --- a/pkgs/shells/bash/nix-bash-completions/default.nix +++ b/pkgs/shells/bash/nix-bash-completions/default.nix @@ -1,14 +1,14 @@ { stdenv, fetchFromGitHub }: stdenv.mkDerivation rec { - version = "0.6.7"; - name = "nix-bash-completions-${version}"; + version = "0.6.8"; + pname = "nix-bash-completions"; src = fetchFromGitHub { owner = "hedning"; repo = "nix-bash-completions"; rev = "v${version}"; - sha256 = "067j1gavpm9zv3vzw9gq0bi3bi0rjrijwprc1j016g44kvpq49qi"; + sha256 = "1n5zs6xcnv4bv1hdaypmz7fv4j7dsr4a0ifah99iyj4p5j85i1bc"; }; # To enable lazy loading via. bash-completion we need a symlink to the script @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { ''; meta = with stdenv.lib; { - homepage = https://github.com/hedning/nix-bash-completions; + homepage = "https://github.com/hedning/nix-bash-completions"; description = "Bash completions for Nix, NixOS, and NixOps"; license = licenses.bsd3; platforms = platforms.all; diff --git a/pkgs/shells/bash/pgrp-pipe-4.4.patch b/pkgs/shells/bash/pgrp-pipe-4.4.patch new file mode 100644 index 00000000000..ea3d7bdf92b --- /dev/null +++ b/pkgs/shells/bash/pgrp-pipe-4.4.patch @@ -0,0 +1,29 @@ +diff -u ./configure ../bash-4.4-fixed/configure +--- ./configure 2016-09-07 22:57:01.000000000 +0200 ++++ ../bash-4.4-fixed/configure 2020-01-08 14:10:26.316858174 +0100 +@@ -16064,10 +16064,7 @@ + solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; + lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; + linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading +- case "`uname -r`" in +- 2.[456789]*|[34]*) $as_echo "#define PGRP_PIPE 1" >>confdefs.h +- ;; +- esac ;; ++ $as_echo "#define PGRP_PIPE 1" >>confdefs.h ;; + *qnx6*) LOCAL_CFLAGS="-Dqnx -Dqnx6" LOCAL_LIBS="-lncurses" ;; + *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; + powerux*) LOCAL_LIBS="-lgen" ;; +diff -u ./configure.ac ../bash-4.4-fixed/configure.ac +--- ./configure.ac 2016-09-07 22:56:28.000000000 +0200 ++++ ../bash-4.4-fixed/configure.ac 2016-09-07 22:56:28.000000000 +0200 +@@ -1092,9 +1092,7 @@ + solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; + lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; + linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading +- case "`uname -r`" in +- 2.[[456789]]*|[[34]]*) AC_DEFINE(PGRP_PIPE) ;; +- esac ;; ++ AC_DEFINE(PGRP_PIPE) ;; + *qnx6*) LOCAL_CFLAGS="-Dqnx -Dqnx6" LOCAL_LIBS="-lncurses" ;; + *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; + powerux*) LOCAL_LIBS="-lgen" ;; diff --git a/pkgs/shells/bash/pgrp-pipe-5.0.patch b/pkgs/shells/bash/pgrp-pipe-5.0.patch new file mode 100644 index 00000000000..2a9fa6f33c3 --- /dev/null +++ b/pkgs/shells/bash/pgrp-pipe-5.0.patch @@ -0,0 +1,31 @@ +diff -u ./configure ../bash-5.0-fixed/configure +--- ./configure 2019-01-02 15:43:31.000000000 +0100 ++++ ../bash-5.0-fixed/configure 2020-01-08 14:18:21.017296179 +0100 +@@ -16312,11 +16312,7 @@ + solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; + lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; + linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading +- case "`uname -r`" in +- 1.*|2.[0123]*) : ;; +- *) $as_echo "#define PGRP_PIPE 1" >>confdefs.h +- ;; +- esac ;; ++ $as_echo "#define PGRP_PIPE 1" >>confdefs.h ;; + netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;; + *qnx[67]*) LOCAL_LIBS="-lncurses" ;; + *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; +diff -u ./configure.ac ../bash-5.0-fixed/configure.ac +--- ./configure.ac 2019-01-02 15:39:11.000000000 +0100 ++++ ../bash-5.0-fixed/configure.ac 2019-01-02 15:39:11.000000000 +0100 +@@ -1108,10 +1108,7 @@ + solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; + lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; + linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading +- case "`uname -r`" in +- 1.*|2.[[0123]]*) : ;; +- *) AC_DEFINE(PGRP_PIPE) ;; +- esac ;; ++ AC_DEFINE(PGRP_PIPE) ;; + netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;; + *qnx[[67]]*) LOCAL_LIBS="-lncurses" ;; + *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; diff --git a/pkgs/shells/dash/default.nix b/pkgs/shells/dash/default.nix index f8d592748b3..7aedd0189e4 100644 --- a/pkgs/shells/dash/default.nix +++ b/pkgs/shells/dash/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { hardeningDisable = [ "format" ]; meta = with stdenv.lib; { - homepage = http://gondor.apana.org.au/~herbert/dash/; + homepage = "http://gondor.apana.org.au/~herbert/dash/"; description = "A POSIX-compliant implementation of /bin/sh that aims to be as small as possible"; platforms = platforms.unix; license = with licenses; [ bsd3 gpl2 ]; diff --git a/pkgs/shells/dgsh/default.nix b/pkgs/shells/dgsh/default.nix index c3c2da329a9..0314180e2d5 100644 --- a/pkgs/shells/dgsh/default.nix +++ b/pkgs/shells/dgsh/default.nix @@ -3,8 +3,8 @@ perl, texinfo, help2man, gettext, ncurses }: -stdenv.mkDerivation rec { - name = "dgsh-unstable-${version}"; +stdenv.mkDerivation { + pname = "dgsh-unstable"; version = "2017-02-05"; src = fetchFromGitHub { @@ -37,7 +37,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "The Directed Graph Shell"; - homepage = http://www.dmst.aueb.gr/dds/sw/dgsh; + homepage = "http://www.dmst.aueb.gr/dds/sw/dgsh"; license = with licenses; asl20; maintainers = with maintainers; [ vrthra ]; platforms = with platforms; all; diff --git a/pkgs/shells/elvish/default.nix b/pkgs/shells/elvish/default.nix index 80b0f386051..2aa23cd063e 100644 --- a/pkgs/shells/elvish/default.nix +++ b/pkgs/shells/elvish/default.nix @@ -1,8 +1,8 @@ -{ stdenv, buildGoPackage, fetchFromGitHub }: +{ stdenv, buildGoModule, fetchFromGitHub }: -buildGoPackage rec { +buildGoModule rec { pname = "elvish"; - version = "0.12"; + version = "0.13.1"; goPackagePath = "github.com/elves/elvish"; excludedPackages = [ "website" ]; @@ -15,9 +15,11 @@ buildGoPackage rec { owner = "elves"; repo = pname; rev = "v${version}"; - sha256 = "1vvbgkpnrnb5aaak4ks45wl0cyp0vbry8bpxl6v2dpmq9x0bscpp"; + sha256 = "0lz9lf1swrn67kymcp2wh67lh3c0ifqm9035gpkd3zynlq3wzqfm"; }; + vendorSha256 = null; + meta = with stdenv.lib; { description = "A friendly and expressive command shell"; longDescription = '' @@ -25,7 +27,7 @@ buildGoPackage rec { language. It runs on Linux, BSDs, macOS and Windows. Despite its pre-1.0 status, it is already suitable for most daily interactive use. ''; - homepage = https://elv.sh/; + homepage = "https://elv.sh/"; license = licenses.bsd2; maintainers = with maintainers; [ vrthra AndersonTorres ]; platforms = with platforms; linux ++ darwin; @@ -34,4 +36,4 @@ buildGoPackage rec { passthru = { shellPath = "/bin/elvish"; }; -} +} \ No newline at end of file diff --git a/pkgs/shells/es/default.nix b/pkgs/shells/es/default.nix index 789ddaf4d9b..761846843fe 100644 --- a/pkgs/shells/es/default.nix +++ b/pkgs/shells/es/default.nix @@ -5,7 +5,8 @@ let in stdenv.mkDerivation { - name = "es-${version}"; + pname = "es"; + inherit version; src = fetchurl { url = "https://github.com/wryun/es-shell/releases/download/v${version}/es-${version}.tar.gz"; @@ -32,7 +33,7 @@ stdenv.mkDerivation { functional programming languages, such as Scheme, and the Tcl embeddable programming language. ''; - homepage = http://wryun.github.io/es-shell/; + homepage = "http://wryun.github.io/es-shell/"; license = licenses.publicDomain; maintainers = with maintainers; [ sjmackenzie ttuegel ]; platforms = platforms.all; diff --git a/pkgs/shells/fish/default.nix b/pkgs/shells/fish/default.nix index df8b5d824f1..11d9e48008f 100644 --- a/pkgs/shells/fish/default.nix +++ b/pkgs/shells/fish/default.nix @@ -1,19 +1,28 @@ -{ stdenv, fetchurl, coreutils, utillinux, - which, gnused, gnugrep, - groff, man-db, getent, libiconv, pcre2, - gettext, ncurses, python3, - cmake - - , writeText - - , useOperatingSystemEtc ? true - +{ stdenv +, lib +, fetchurl +, coreutils +, utillinux +, which +, gnused +, gnugrep +, groff +, man-db +, getent +, libiconv +, pcre2 +, gettext +, ncurses +, python3 +, cmake + +, runCommand +, writeText +, nixosTests +, useOperatingSystemEtc ? true }: - -with stdenv.lib; - let - etcConfigAppendixText = '' + etcConfigAppendix = writeText "config.fish.appendix" '' ############### ↓ Nix hook for sourcing /etc/fish/config.fish ↓ ############### # # # Origin: @@ -45,7 +54,7 @@ let ############### ↑ Nix hook for sourcing /etc/fish/config.fish ↑ ############### ''; - fishPreInitHooks = '' + fishPreInitHooks = writeText "__fish_build_paths_suffix.fish" '' # source nixos environment # note that this is required: # 1. For all shells, not just login shells (mosh needs this as do some other command-line utilities) @@ -88,20 +97,33 @@ let ''; fish = stdenv.mkDerivation rec { - name = "fish-${version}"; - version = "3.0.2"; - - etcConfigAppendix = builtins.toFile "etc-config.appendix.fish" etcConfigAppendixText; + pname = "fish"; + version = "3.1.2"; src = fetchurl { - # There are differences between the release tarball and the tarball github packages from the tag - # Hence we cannot use fetchFromGithub - url = "https://github.com/fish-shell/fish-shell/releases/download/${version}/${name}.tar.gz"; - sha256 = "03j3jl9jzlnhq4p86zj8wqsh5sx45j1d1fvfa80ks1cfdg68qwhl"; + # There are differences between the release tarball and the tarball GitHub + # packages from the tag. Specifically, it comes with a file containing its + # version, which is used in `build_tools/git_version_gen.sh` to determine + # the shell's actual version (and what it displays when running `fish + # --version`), as well as the local documentation for all builtins (and + # maybe other things). + url = "https://github.com/fish-shell/fish-shell/releases/download/${version}/${pname}-${version}.tar.gz"; + sha256 = "1vblmb3x2k2cb0db5jdyflppnlqsm7i6jjaidyhmvaaw7ch2gffm"; }; - nativeBuildInputs = [ cmake ]; - buildInputs = [ ncurses libiconv pcre2 ]; + # We don't have access to the codesign executable, so we patch this out. + # For more information, see: https://github.com/fish-shell/fish-shell/issues/6952 + patches = lib.optional stdenv.isDarwin ./dont-codesign-on-mac.diff; + + nativeBuildInputs = [ + cmake + ]; + + buildInputs = [ + ncurses + libiconv + pcre2 + ]; preConfigure = '' patchShebangs ./build_tools/git_version_gen.sh @@ -110,15 +132,19 @@ let # Required binaries during execution # Python: Autocompletion generated from manpages and config editing propagatedBuildInputs = [ - coreutils gnugrep gnused - python3 groff gettext - ] ++ optional (!stdenv.isDarwin) man-db; - - postInstall = '' + coreutils + gnugrep + gnused + python3 + groff + gettext + ] ++ lib.optional (!stdenv.isDarwin) man-db; + + postInstall = with lib; '' sed -r "s|command grep|command ${gnugrep}/bin/grep|" \ -i "$out/share/fish/functions/grep.fish" sed -i "s|which |${which}/bin/which |" \ - "$out/share/fish/functions/type.fish" + "$out/share/fish/functions/type.fish" sed -e "s|\|cut|\|${coreutils}/bin/cut|" \ -i "$out/share/fish/functions/fish_prompt.fish" sed -e "s|gettext |${gettext}/bin/gettext |" \ @@ -126,18 +152,25 @@ let -i "$out/share/fish/functions/_.fish" sed -e "s|uname|${coreutils}/bin/uname|" \ -i "$out/share/fish/functions/__fish_pwd.fish" \ - "$out/share/fish/functions/prompt_pwd.fish" + "$out/share/fish/functions/prompt_pwd.fish" sed -e "s|sed |${gnused}/bin/sed |" \ -i "$out/share/fish/functions/alias.fish" \ - "$out/share/fish/functions/prompt_pwd.fish" + "$out/share/fish/functions/prompt_pwd.fish" sed -i "s|nroff |${groff}/bin/nroff |" \ - "$out/share/fish/functions/__fish_print_help.fish" - sed -i "s|/sbin /usr/sbin||" \ - "$out/share/fish/functions/__fish_complete_subcommand_root.fish" - sed -e "s|clear;|${getBin ncurses}/bin/clear;|" \ + "$out/share/fish/functions/__fish_print_help.fish" + sed -e "s|clear;|${getBin ncurses}/bin/clear;|" \ -i "$out/share/fish/functions/fish_default_key_bindings.fish" - sed -e "s|python3|${getBin python3}/bin/python3|" \ + sed -e "s|python3|${getBin python3}/bin/python3|" \ -i $out/share/fish/functions/{__fish_config_interactive.fish,fish_config.fish,fish_update_completions.fish} + sed -i "s|/usr/local/sbin /sbin /usr/sbin||" \ + $out/share/fish/completions/{sudo.fish,doas.fish} + + cat > $out/share/fish/functions/__fish_anypython.fish <<EOF + function __fish_anypython + echo ${python3.interpreter} + return 0 + end + EOF '' + optionalString stdenv.isLinux '' sed -e "s| ul| ${utillinux}/bin/ul|" \ @@ -153,53 +186,58 @@ let sed -i "s|command manpath|command ${man-db}/bin/manpath|" \ "$out/share/fish/functions/man.fish" '' + optionalString useOperatingSystemEtc '' - tee -a $out/etc/fish/config.fish < ${(writeText "config.fish.appendix" etcConfigAppendixText)} + tee -a $out/etc/fish/config.fish < ${etcConfigAppendix} '' + '' - tee -a $out/share/fish/__fish_build_paths.fish < ${(writeText "__fish_build_paths_suffix.fish" fishPreInitHooks)} + tee -a $out/share/fish/__fish_build_paths.fish < ${fishPreInitHooks} ''; enableParallelBuilding = true; - meta = with stdenv.lib; { + meta = with lib; { description = "Smart and user-friendly command line shell"; - homepage = http://fishshell.com/; + homepage = "http://fishshell.com/"; license = licenses.gpl2; platforms = platforms.unix; - maintainers = with maintainers; [ ocharles ]; + maintainers = with maintainers; [ ocharles cole-h ]; }; passthru = { shellPath = "/bin/fish"; + tests = { + nixos = nixosTests.fish; + + # Test the fish_config tool by checking the generated splash page. + # Since the webserver requires a port to run, it is not started. + fishConfig = + let fishScript = writeText "test.fish" '' + set -x __fish_bin_dir ${fish}/bin + echo $__fish_bin_dir + cp -r ${fish}/share/fish/tools/web_config/* . + chmod -R +w * + + # if we don't set `delete=False`, the file will get cleaned up + # automatically (leading the test to fail because there's no + # tempfile to check) + sed -e "s@, mode='w'@, mode='w', delete=False@" -i webconfig.py + + # we delete everything after the fileurl is assigned + sed -e '/fileurl =/q' -i webconfig.py + echo "print(fileurl)" >> webconfig.py + + # and check whether the message appears on the page + cat (${python3}/bin/python ./webconfig.py \ + | tail -n1 | sed -ne 's|.*\(/build/.*\)|\1|p' \ + ) | grep 'a href="http://localhost.*Start the Fish Web config' + + # cannot test the http server because it needs a localhost port + ''; + in + runCommand "test-web-config" { } '' + HOME=$(mktemp -d) + ${fish}/bin/fish ${fishScript} && touch $out + ''; + }; }; }; - - tests = { - - # Test the fish_config tool by checking the generated splash page. - # Since the webserver requires a port to run, it is not started. - fishConfig = - let fishScript = writeText "test.fish" '' - set -x __fish_bin_dir ${fish}/bin - echo $__fish_bin_dir - cp -r ${fish}/share/fish/tools/web_config/* . - chmod -R +w * - # we delete everything after the fileurl is assigned - sed -e '/fileurl =/q' -i webconfig.py - echo "print(fileurl)" >> webconfig.py - # and check whether the message appears on the page - cat (${python3}/bin/python ./webconfig.py \ - | tail -n1 | sed -ne 's|.*\(/tmp/.*\)|\1|p' \ - ) | grep 'a href="http://localhost.*Start the Fish Web config' - - # cannot test the http server because it needs a localhost port - ''; - in '' - HOME=$(mktemp -d) - ${fish}/bin/fish ${fishScript} - ''; - }; - - # FIXME(Profpatsch) replace withTests stub - withTests = flip const; - -in withTests tests fish +in +fish diff --git a/pkgs/shells/fish/dont-codesign-on-mac.diff b/pkgs/shells/fish/dont-codesign-on-mac.diff new file mode 100644 index 00000000000..c61350b0549 --- /dev/null +++ b/pkgs/shells/fish/dont-codesign-on-mac.diff @@ -0,0 +1,12 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7d220a032..786b60e6e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -183,7 +183,6 @@ ENDFUNCTION(CODESIGN_ON_MAC target) + # Define a function to link dependencies. + FUNCTION(FISH_LINK_DEPS_AND_SIGN target) + TARGET_LINK_LIBRARIES(${target} fishlib) +- CODESIGN_ON_MAC(${target}) + ENDFUNCTION(FISH_LINK_DEPS_AND_SIGN) + + # Define libfish.a. diff --git a/pkgs/shells/fish/fish-foreign-env/default.nix b/pkgs/shells/fish/fish-foreign-env/default.nix index 445e961c649..ef157f32392 100644 --- a/pkgs/shells/fish/fish-foreign-env/default.nix +++ b/pkgs/shells/fish/fish-foreign-env/default.nix @@ -1,14 +1,14 @@ { stdenv, fetchFromGitHub, gnused, bash, coreutils }: -stdenv.mkDerivation rec { - name = "fish-foreign-env-${version}"; - version = "git-20170324"; +stdenv.mkDerivation { + pname = "fish-foreign-env"; + version = "git-20200209"; src = fetchFromGitHub { owner = "oh-my-fish"; repo = "plugin-foreign-env"; - rev = "baefbd690f0b52cb8746f3e64b326d82834d07c5"; - sha256 = "0lwp6hy3kfk7xfx4xvbk1ir8zkzm7gfjbm4bf6xg1y6iw9jq9dnl"; + rev = "dddd9213272a0ab848d474d0cbde12ad034e65bc"; + sha256 = "00xqlyl3lffc5l0viin1nyp819wf81fncqyz87jx8ljjdhilmgbs"; }; installPhase = '' diff --git a/pkgs/shells/fish/fish-foreign-env/suppress-harmless-warnings.patch b/pkgs/shells/fish/fish-foreign-env/suppress-harmless-warnings.patch index 5e4569f0a15..6eed3515212 100644 --- a/pkgs/shells/fish/fish-foreign-env/suppress-harmless-warnings.patch +++ b/pkgs/shells/fish/fish-foreign-env/suppress-harmless-warnings.patch @@ -14,7 +14,7 @@ index 34a25e3..3d94135 100644 - set -g -x $key $value + if contains $key $ignore -+ set -g -x $key $value ^/dev/null ++ set -g -x $key $value 2>/dev/null + else + set -g -x $key $value + end diff --git a/pkgs/shells/ion/default.nix b/pkgs/shells/ion/default.nix index 383387b4056..ca2f7a6d515 100644 --- a/pkgs/shells/ion/default.nix +++ b/pkgs/shells/ion/default.nix @@ -1,26 +1,27 @@ { stdenv, fetchFromGitHub, rustPlatform }: -with rustPlatform; - -buildRustPackage rec { - name = "ion-${version}"; - version = "1.0.5"; +rustPlatform.buildRustPackage rec { + pname = "ion"; + version = "unstable-2020-03-22"; src = fetchFromGitHub { owner = "redox-os"; repo = "ion"; - rev = version; - sha256 = "0i0acl5nw254mw8dbfmb4792rr71is98a5wg32yylfnlrk7zlf8z"; + rev = "1fbd29a6d539faa6eb0f3186a361e208d0a0bc05"; + sha256 = "0r5c87cs8jlc9kpb6bi2aypldw1lngf6gzjirf13gi7iy4q08ik7"; }; - cargoSha256 = "1hs01b1rhbpafxlhw661k907rznqhcgyng85njkb99bg4lxwxaap"; + cargoSha256 = "1ph3r3vspy700mb8pica8478v9arqz07k2nzpbrdkdkqgfcwlgcg"; meta = with stdenv.lib; { description = "Modern system shell with simple (and powerful) syntax"; - homepage = https://github.com/redox-os/ion; + homepage = "https://gitlab.redox-os.org/redox-os/ion"; license = licenses.mit; maintainers = with maintainers; [ dywedir ]; platforms = platforms.all; - broken = stdenv.isDarwin; + }; + + passthru = { + shellPath = "/bin/ion"; }; } diff --git a/pkgs/shells/jush/default.nix b/pkgs/shells/jush/default.nix index 833947a6ddb..9894c90bb69 100644 --- a/pkgs/shells/jush/default.nix +++ b/pkgs/shells/jush/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "just a useless shell"; - homepage = https://github.com/troglobit/jush; + homepage = "https://github.com/troglobit/jush"; license = licenses.isc; platforms = platforms.all; maintainers = with maintainers; [ dtzWill ]; diff --git a/pkgs/shells/ksh/default.nix b/pkgs/shells/ksh/default.nix index d16704b71d5..e27732226f5 100644 --- a/pkgs/shells/ksh/default.nix +++ b/pkgs/shells/ksh/default.nix @@ -1,16 +1,24 @@ -{ stdenv, meson, ninja, fetchFromGitHub, which, python, libiconv }: +{ stdenv, meson, ninja, fetchFromGitHub, which, python, fetchpatch +, libiconv }: stdenv.mkDerivation rec { - name = "ksh-${version}"; - version = "93v"; + pname = "ksh"; + version = "2020.0.0"; src = fetchFromGitHub { owner = "att"; repo = "ast"; - rev = "b8d88244ae87857e7bbd6da230ffbbc51165df70"; - sha256 = "12kf14n8vz36hnsy3wp6lnyv1841p7hcq25y1d78w532dil69lx9"; + rev = version; + sha256 = "0cdxz0nhpq03gb9rd76fn0x1yzs2c8q289b7vcxnzlsrz1imz65j"; }; + patches = [ + (fetchpatch { + url = "https://github.com/att/ast/commit/11983a71f5e29df578b7e2184400728b4e3f451d.patch"; + sha256 = "1n9558c4v2qpgpjb1vafs29n3qn3z0770wr1ayc0xjf5z5j4g3kv"; + }) + ]; + nativeBuildInputs = [ meson ninja which python ]; buildInputs = [ libiconv ]; @@ -23,7 +31,7 @@ stdenv.mkDerivation rec { provides access to the UNIX system and to many other systems, on the many different computers and workstations on which it is implemented. ''; - homepage = https://github.com/att/ast; + homepage = "https://github.com/att/ast"; license = licenses.cpl10; maintainers = with maintainers; [ ]; platforms = platforms.all; diff --git a/pkgs/shells/liquidprompt/default.nix b/pkgs/shells/liquidprompt/default.nix new file mode 100644 index 00000000000..d6d655d1f17 --- /dev/null +++ b/pkgs/shells/liquidprompt/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + pname = "liquidprompt"; + version = "unstable-2018-05-21"; + + src = fetchFromGitHub { + owner = "nojhan"; + repo = pname; + rev = "eda83efe4e0044f880370ed5e92aa7e3fdbef971"; + sha256 = "1p7ah3x850ajpq07xvxxd7fx2i67cf0n71ww085g32k9fwij4rd4"; + }; + + installPhase = '' + install -D -m 0444 liquidprompt $out/bin/liquidprompt + install -D -m 0444 liquidpromptrc-dist $out/share/doc/liquidprompt/liquidpromptrc-dist + install -D -m 0444 liquid.theme $out/share/doc/liquidprompt/liquid.theme + + install -D -m 0444 liquidprompt.plugin.zsh \ + $out/share/zsh/plugins/liquidprompt/liquidprompt.plugin.zsh + install -D -m 0444 liquidprompt \ + $out/share/zsh/plugins/liquidprompt/liquidprompt + ''; + + meta = with stdenv.lib; { + description = "A full-featured & carefully designed adaptive prompt for Bash & Zsh"; + homepage = "https://github.com/nojhan/liquidprompt"; + license = licenses.agpl3; + platforms = platforms.all; + maintainers = with maintainers; [ gerschtli ]; + }; +} diff --git a/pkgs/shells/mksh/default.nix b/pkgs/shells/mksh/default.nix index 2115e17c332..7abf75c70f4 100644 --- a/pkgs/shells/mksh/default.nix +++ b/pkgs/shells/mksh/default.nix @@ -1,18 +1,20 @@ { stdenv, fetchurl }: stdenv.mkDerivation rec { - name = "mksh-${version}"; - version = "57"; + pname = "mksh"; + version = "59b"; src = fetchurl { urls = [ "https://www.mirbsd.org/MirOS/dist/mir/mksh/mksh-R${version}.tgz" "http://pub.allbsd.org/MirOS/dist/mir/mksh/mksh-R${version}.tgz" ]; - sha256 = "0xdykm1z710wriwd6nc8s8lwk2dwjl63dq96xxaawlid31a1241x"; + sha256 = "1rp0farbylypyiaald2hw5avg5w3m8x7cjnxxyyihzvfb2lx2zlh"; }; - buildPhase = ''sh ./Build.sh -r -c lto''; + dontConfigure = true; + + buildPhase = ''sh ./Build.sh -r''; installPhase = '' install -D -m 755 mksh $out/bin/mksh @@ -29,7 +31,7 @@ stdenv.mkDerivation rec { also to be readily available under other UNIX(R)-like operating systems. ''; - homepage = https://www.mirbsd.org/mksh.htm; + homepage = "https://www.mirbsd.org/mksh.htm"; license = licenses.bsd3; maintainers = with maintainers; [ AndersonTorres joachifm ]; platforms = platforms.unix; diff --git a/pkgs/shells/mrsh/default.nix b/pkgs/shells/mrsh/default.nix new file mode 100644 index 00000000000..bbd56e510b7 --- /dev/null +++ b/pkgs/shells/mrsh/default.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchFromGitHub, meson, ninja, pkgconfig, readline }: + +stdenv.mkDerivation rec { + pname = "mrsh"; + version = "2020-01-08"; + + src = fetchFromGitHub { + owner = "emersion"; + repo = "mrsh"; + rev = "ef21854fc9ce172fb1f7f580b19a89d030d67c65"; + sha256 = "1iyxmwl61p2x9v9b22416n4lnrlwjqyxybq35x8bcbjxkwypp943"; + }; + + nativeBuildInputs = [ meson ninja pkgconfig ]; + buildInputs = [ readline ]; + + meta = with stdenv.lib; { + description = "A minimal POSIX shell"; + homepage = "https://mrsh.sh"; + license = licenses.mit; + maintainers = with maintainers; [ matthiasbeyer ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/shells/nushell/default.nix b/pkgs/shells/nushell/default.nix new file mode 100644 index 00000000000..ecef2fc436e --- /dev/null +++ b/pkgs/shells/nushell/default.nix @@ -0,0 +1,63 @@ +{ stdenv +, lib +, fetchFromGitHub +, rustPlatform +, openssl +, pkg-config +, python3 +, xorg +, libiconv +, AppKit +, Security +, withStableFeatures ? true +, withTestBinaries ? true +}: + +rustPlatform.buildRustPackage rec { + pname = "nushell"; + version = "0.14.0"; + + src = fetchFromGitHub { + owner = pname; + repo = pname; + rev = version; + sha256 = "1g289zma19mh85xl5ffq1f3cv76piqavbhzs9m55mkg9wrhmgljd"; + }; + + cargoSha256 = "16a32q2la7f4628m947dwif3j3wszsy603sj29ch6l2vdab40i3p"; + + nativeBuildInputs = [ pkg-config ] + ++ lib.optionals (withStableFeatures && stdenv.isLinux) [ python3 ]; + + buildInputs = lib.optionals stdenv.isLinux [ openssl ] + ++ lib.optionals stdenv.isDarwin [ libiconv Security ] + ++ lib.optionals (withStableFeatures && stdenv.isLinux) [ xorg.libX11 ] + ++ lib.optionals (withStableFeatures && stdenv.isDarwin) [ AppKit ]; + + cargoBuildFlags = lib.optional withStableFeatures "--features stable"; + + cargoTestFlags = lib.optional withTestBinaries "--features test-bins"; + + preCheck = '' + export HOME=$TMPDIR + ''; + + checkPhase = '' + runHook preCheck + echo "Running cargo cargo test ${lib.strings.concatStringsSep " " cargoTestFlags} -- ''${checkFlags} ''${checkFlagsArray+''${checkFlagsArray[@]}}" + cargo test ${lib.strings.concatStringsSep " " cargoTestFlags} -- ''${checkFlags} ''${checkFlagsArray+"''${checkFlagsArray[@]}"} + runHook postCheck + ''; + + meta = with lib; { + description = "A modern shell written in Rust"; + homepage = "https://www.nushell.sh/"; + license = licenses.mit; + maintainers = with maintainers; [ filalex77 marsam ]; + platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ]; + }; + + passthru = { + shellPath = "/bin/nu"; + }; +} diff --git a/pkgs/shells/oh/default.nix b/pkgs/shells/oh/default.nix index 2e200a74f7b..3ae8a7c600a 100644 --- a/pkgs/shells/oh/default.nix +++ b/pkgs/shells/oh/default.nix @@ -1,7 +1,7 @@ -{ stdenv, buildGoPackage, fetchgit }: +{ stdenv, buildGoPackage, fetchgit, lib }: buildGoPackage rec { - name = "oh-${version}"; + pname = "oh"; version = "20160522-${stdenv.lib.strings.substring 0 7 rev}"; rev = "0daaf4081475fb9d6b3801c85019bdd57b2ee9b4"; @@ -14,4 +14,10 @@ buildGoPackage rec { }; goDeps = ./deps.nix; + + meta = with lib;{ + homepage = "https://github.com/michaelmacinnis/oh"; + description = "A Unix shell"; + license = stdenv.lib.licenses.mit; + }; } diff --git a/pkgs/shells/oil/default.nix b/pkgs/shells/oil/default.nix index 48c8fd0815e..019a66c77eb 100644 --- a/pkgs/shells/oil/default.nix +++ b/pkgs/shells/oil/default.nix @@ -1,13 +1,12 @@ -{ stdenv, lib, fetchurl }: -let - version = "0.6.0"; -in -stdenv.mkDerivation { - name = "oil-${version}"; +{ stdenv, lib, fetchurl, readline }: + +stdenv.mkDerivation rec { + pname = "oil"; + version = "0.8.pre4"; src = fetchurl { url = "https://www.oilshell.org/download/oil-${version}.tar.xz"; - sha256 = "1dw4mgnlmaxlfygasfihgvbj32d3m9w6k5j7azb9d9lp35f3l7hl"; + sha256 = "07kj86hrvlz9f1gh3qv4hdaz3qnb4a2qf0dnxhd2r0qilrkjanxh"; }; postPatch = '' @@ -18,19 +17,25 @@ stdenv.mkDerivation { mkdir -p $out/bin ''; + buildInputs = [ readline ]; + configureFlags = [ "--with-readline" ]; + # Stripping breaks the bundles by removing the zip file from the end. dontStrip = true; meta = { - homepage = https://www.oilshell.org/; - - description = "A new unix shell, still in its early stages"; + description = "A new unix shell"; + homepage = "https://www.oilshell.org/"; license = with lib.licenses; [ psfl # Includes a portion of the python interpreter and standard library asl20 # Licence for Oil itself ]; - maintainers = with lib.maintainers; [ lheckemann ]; + maintainers = with lib.maintainers; [ lheckemann alva ]; + }; + + passthru = { + shellPath = "/bin/osh"; }; } diff --git a/pkgs/shells/pash/default.nix b/pkgs/shells/pash/default.nix index 78d508840ba..c646c1c3f9b 100644 --- a/pkgs/shells/pash/default.nix +++ b/pkgs/shells/pash/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchFromGitHub, buildDotnetPackage }: -buildDotnetPackage rec { +buildDotnetPackage { baseName = "pash"; version = "git-2016-07-06"; @@ -17,7 +17,7 @@ buildDotnetPackage rec { meta = with stdenv.lib; { description = "An open source implementation of Windows PowerShell"; - homepage = https://github.com/Pash-Project/Pash; + homepage = "https://github.com/Pash-Project/Pash"; maintainers = [ maintainers.fornever maintainers.vrthra ]; platforms = platforms.all; license = with licenses; [ bsd3 gpl3 ]; diff --git a/pkgs/shells/powershell/default.nix b/pkgs/shells/powershell/default.nix index a434ef7e4fb..58c18fb695b 100644 --- a/pkgs/shells/powershell/default.nix +++ b/pkgs/shells/powershell/default.nix @@ -1,21 +1,21 @@ -{ stdenv, autoPatchelfHook, fetchzip, libunwind, libuuid, icu, curl -, darwin, makeWrapper, less, openssl, pam, lttng-ust }: +{ stdenv, lib, autoPatchelfHook, fetchzip, libunwind, libuuid, icu, curl +, darwin, makeWrapper, less, openssl_1_1, pam, lttng-ust }: let platformString = if stdenv.isDarwin then "osx" else if stdenv.isLinux then "linux" else throw "unsupported platform"; - platformSha = if stdenv.isDarwin then "005ax54l7752lhrvlpsyn2yywr4zh58psc7sc1qv9p86d414pmkq" - else if stdenv.isLinux then "1b3n6d2xgvqybmh61smyr415sfaymiilixlvs04yxm6ajsbnsm82" + platformSha = if stdenv.isDarwin then "0c71w6z6sc86si07i6vy4w3069jal7476wyiizyr7qjm9m22963f" + else if stdenv.isLinux then "14d6nhv525pa8pi4p1r2mn180isfzgshqrbmql3qd55aksjpq1v0" else throw "unsupported platform"; platformLdLibraryPath = if stdenv.isDarwin then "DYLD_FALLBACK_LIBRARY_PATH" else if stdenv.isLinux then "LD_LIBRARY_PATH" else throw "unsupported platform"; - libraries = [ libunwind libuuid icu curl openssl ] ++ + libraries = [ libunwind libuuid icu curl openssl_1_1 ] ++ (if stdenv.isLinux then [ pam lttng-ust ] else [ darwin.Libsystem ]); in stdenv.mkDerivation rec { - name = "powershell-${version}"; - version = "6.2.2"; + pname = "powershell"; + version = "7.0.1"; src = fetchzip { url = "https://github.com/PowerShell/PowerShell/releases/download/v${version}/powershell-${version}-${platformString}-x64.tar.gz"; @@ -26,22 +26,48 @@ stdenv.mkDerivation rec { buildInputs = [ less ] ++ libraries; nativeBuildInputs = [ autoPatchelfHook makeWrapper ]; - installPhase = '' + installPhase = + let + ext = stdenv.hostPlatform.extensions.sharedLibrary; + in '' + pslibs=$out/share/powershell + mkdir -p $pslibs + + cp -r * $pslibs + + rm -f $pslibs/libcrypto${ext}.1.0.0 + rm -f $pslibs/libssl${ext}.1.0.0 + + ls $pslibs + '' + lib.optionalString (!stdenv.isDarwin) '' + patchelf --replace-needed libcrypto${ext}.1.0.0 libcrypto${ext}.1.1 $pslibs/libmi.so + patchelf --replace-needed libssl${ext}.1.0.0 libssl${ext}.1.1 $pslibs/libmi.so + '' + '' + mkdir -p $out/bin - mkdir -p $out/share/powershell - cp -r * $out/share/powershell - makeWrapper $out/share/powershell/pwsh $out/bin/pwsh --prefix ${platformLdLibraryPath} : "${stdenv.lib.makeLibraryPath libraries}" \ - --set TERM xterm --set POWERSHELL_TELEMETRY_OPTOUT 1 + + makeWrapper $pslibs/pwsh $out/bin/pwsh \ + --prefix ${platformLdLibraryPath} : "${stdenv.lib.makeLibraryPath libraries}" \ + --set TERM xterm --set POWERSHELL_TELEMETRY_OPTOUT 1 --set DOTNET_CLI_TELEMETRY_OPTOUT 1 ''; dontStrip = true; - meta = with stdenv.lib; { - description = "Cross-platform (Windows, Linux, and macOS) automation and configuration tool/framework"; - homepage = https://github.com/PowerShell/PowerShell; - maintainers = [ maintainers.yrashk ]; - platforms = platforms.unix; + doInstallCheck = true; + installCheck = '' + $out/bin/pwsh --help > /dev/null + ''; + + meta = with lib; { + description = "Powerful cross-platform (Windows, Linux, and macOS) shell and scripting language based on .NET"; + homepage = "https://github.com/PowerShell/PowerShell"; + maintainers = with maintainers; [ yrashk srgom ]; + platforms = [ "x86_64-darwin" "x86_64-linux" ]; license = with licenses; [ mit ]; }; + passthru = { + shellPath = "/bin/pwsh"; + }; + } diff --git a/pkgs/shells/rc/default.nix b/pkgs/shells/rc/default.nix index 298c4a1c32f..cd5ed860b2e 100644 --- a/pkgs/shells/rc/default.nix +++ b/pkgs/shells/rc/default.nix @@ -5,7 +5,7 @@ }: stdenv.mkDerivation rec { - name = "rc-${version}"; + pname = "rc"; version = "1.7.4"; src = fetchurl { @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "The Plan 9 shell"; longDescription = "Byron Rakitzis' UNIX reimplementation of Tom Duff's Plan 9 shell."; - homepage = http://tobold.org/article/rc; + homepage = "http://tobold.org/article/rc"; license = with licenses; zlib; maintainers = with maintainers; [ ramkromberg ]; platforms = with platforms; all; diff --git a/pkgs/shells/rssh/default.nix b/pkgs/shells/rssh/default.nix index d061c888f60..b2bec51a95e 100644 --- a/pkgs/shells/rssh/default.nix +++ b/pkgs/shells/rssh/default.nix @@ -5,11 +5,11 @@ { stdenv, fetchurl, openssh, rsync, cvs }: stdenv.mkDerivation rec { - name = "rssh-${version}"; + pname = "rssh"; version = "2.3.4"; src = fetchurl { - url = "mirror://sourceforge/rssh/rssh/${version}/${name}.tar.gz"; + url = "mirror://sourceforge/rssh/rssh/${version}/${pname}-${version}.tar.gz"; sha256 = "f30c6a760918a0ed39cf9e49a49a76cb309d7ef1c25a66e77a41e2b1d0b40cd9"; }; @@ -18,42 +18,42 @@ stdenv.mkDerivation rec { # Patches from AUR (fetchurl { - url = https://aur.archlinux.org/cgit/aur.git/plain/0001-fail-logging.patch?h=rssh; + url = "https://aur.archlinux.org/cgit/aur.git/plain/0001-fail-logging.patch?h=rssh"; name = "0001-fail-logging.patch"; sha256 = "d30f2f4fdb1b57f94773f5b0968a4da3356b14a040efe69ec1e976c615035c65"; }) (fetchurl { - url = https://aur.archlinux.org/cgit/aur.git/plain/0002-info-to-debug.patch?h=rssh; + url = "https://aur.archlinux.org/cgit/aur.git/plain/0002-info-to-debug.patch?h=rssh"; name = "0002-info-to-debug.patch"; sha256 = "86f6ecf34f62415b0d6204d4cbebc47322dc2ec71732d06aa27758e35d688fcd"; }) (fetchurl { - url = https://aur.archlinux.org/cgit/aur.git/plain/0003-man-page-spelling.patch?h=rssh; + url = "https://aur.archlinux.org/cgit/aur.git/plain/0003-man-page-spelling.patch?h=rssh"; name = "0003-man-page-spelling.patch"; sha256 = "455b3bbccddf1493999d00c2cd46e62930ef4fd8211e0b7d3a89d8010d6a5431"; }) (fetchurl { - url = https://aur.archlinux.org/cgit/aur.git/plain/0004-mkchroot.patch?h=rssh; + url = "https://aur.archlinux.org/cgit/aur.git/plain/0004-mkchroot.patch?h=rssh"; name = "0004-mkchroot.patch"; sha256 = "f7fd8723d2aa94e64e037c13c2f263a52104af680ab52bfcaea73dfa836457c2"; }) (fetchurl { - url = https://aur.archlinux.org/cgit/aur.git/plain/0005-mkchroot-arch.patch?h=rssh; + url = "https://aur.archlinux.org/cgit/aur.git/plain/0005-mkchroot-arch.patch?h=rssh"; name = "0005-mkchroot-arch.patch"; sha256 = "ac8894c4087a063ae8267d2fdfcde69c2fe6b67a8ff5917e4518b8f73f08ba3f"; }) (fetchurl { - url = https://aur.archlinux.org/cgit/aur.git/plain/0006-mkchroot-symlink.patch?h=rssh; + url = "https://aur.archlinux.org/cgit/aur.git/plain/0006-mkchroot-symlink.patch?h=rssh"; name = "0006-mkchroot-symlink.patch"; sha256 = "bce98728cb9b55c92182d4901c5f9adf49376a07c5603514b0004e3d1c85e9c7"; }) (fetchurl { - url = https://aur.archlinux.org/cgit/aur.git/plain/0007-destdir.patch?h=rssh; + url = "https://aur.archlinux.org/cgit/aur.git/plain/0007-destdir.patch?h=rssh"; name = "0007-destdir.patch"; sha256 = "7fa03644f81dc37d77cc7e2cad994f17f91b2b8a49b1a74e41030a4ac764385e"; }) (fetchurl { - url = https://aur.archlinux.org/cgit/aur.git/plain/0008-rsync-protocol.patch?h=rssh; + url = "https://aur.archlinux.org/cgit/aur.git/plain/0008-rsync-protocol.patch?h=rssh"; name = "0008-rsync-protocol.patch"; sha256 = "0c772afe9088eeded129ead86775ef18e58c318bbc58fc3e2585e7ff09cc5e91"; }) @@ -80,7 +80,7 @@ stdenv.mkDerivation rec { longDescription = '' rssh also includes support for rsync and cvs. For example, if you have a server which you only want to allow users to copy files off of via scp, without providing shell access, you can use rssh to do that. ''; - homepage = http://www.pizzashack.org/rssh/; + homepage = "http://www.pizzashack.org/rssh/"; license = licenses.bsd2; platforms = platforms.linux; maintainers = with maintainers; [ arobyn ]; diff --git a/pkgs/shells/rush/default.nix b/pkgs/shells/rush/default.nix index 9db36bc85fc..f9e15d4a0b4 100644 --- a/pkgs/shells/rush/default.nix +++ b/pkgs/shells/rush/default.nix @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { sftp-server or scp, that lack this ability. ''; - homepage = https://www.gnu.org/software/rush/; + homepage = "https://www.gnu.org/software/rush/"; license = stdenv.lib.licenses.gpl3Plus; maintainers = [ stdenv.lib.maintainers.bjg ]; diff --git a/pkgs/shells/tcsh/default.nix b/pkgs/shells/tcsh/default.nix index 43dd8a40480..87cbf8c59f3 100644 --- a/pkgs/shells/tcsh/default.nix +++ b/pkgs/shells/tcsh/default.nix @@ -1,17 +1,18 @@ { stdenv, fetchurl, fetchpatch , ncurses }: +with stdenv.lib; stdenv.mkDerivation rec { - name = "tcsh-${version}"; - version = "6.21.00"; + pname = "tcsh"; + version = "6.22.02"; src = fetchurl { urls = [ - "http://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/tcsh/${name}.tar.gz" - "ftp://ftp.astron.com/pub/tcsh/${name}.tar.gz" - "ftp://ftp.funet.fi/pub/unix/shells/tcsh/${name}.tar.gz" + "http://ftp.funet.fi/pub/mirrors/ftp.astron.com/pub/tcsh/${pname}-${version}.tar.gz" + "ftp://ftp.astron.com/pub/tcsh/${pname}-${version}.tar.gz" + "ftp://ftp.funet.fi/pub/unix/shells/tcsh/${pname}-${version}.tar.gz" ]; - sha256 = "0wp9cqkzdj5ahfyg9bn5z1wnyblqyv9vz4sc5aqmj7rp91a34f64"; + sha256 = "0nw8prz1n0lmr82wnpyhrzmki630afn7p9cfgr3vl00vr9c72a7d"; }; buildInputs = [ ncurses ]; @@ -19,11 +20,11 @@ stdenv.mkDerivation rec { patches = stdenv.lib.optional stdenv.hostPlatform.isMusl (fetchpatch { name = "sysmalloc.patch"; - url = "https://git.alpinelinux.org/cgit/aports/plain/community/tcsh/001-sysmalloc.patch?id=184585c046cdd56512f1a76e426dd799b368f8cf"; + url = "https://git.alpinelinux.org/aports/plain/community/tcsh/001-sysmalloc.patch?id=184585c046cdd56512f1a76e426dd799b368f8cf"; sha256 = "1qc6ydxhdfizsbkaxhpn3wib8sfphrw10xnnsxx2prvzg9g2zp67"; }); - meta = with stdenv.lib;{ + meta = { description = "An enhanced version of the Berkeley UNIX C shell (csh)"; longDescription = '' tcsh is an enhanced but completely compatible version of the @@ -37,7 +38,7 @@ stdenv.mkDerivation rec { - history mechanism - job control ''; - homepage = http://www.tcsh.org/; + homepage = "https://www.tcsh.org/"; license = licenses.bsd2; maintainers = with maintainers; [ AndersonTorres ]; platforms = platforms.linux ++ platforms.darwin; diff --git a/pkgs/shells/xonsh/default.nix b/pkgs/shells/xonsh/default.nix index 2c43bb420eb..192e38b963d 100644 --- a/pkgs/shells/xonsh/default.nix +++ b/pkgs/shells/xonsh/default.nix @@ -1,15 +1,21 @@ -{ stdenv, fetchFromGitHub, python3Packages, glibcLocales, coreutils, git }: +{ stdenv +, fetchFromGitHub +, python3Packages +, glibcLocales +, coreutils +, git +}: python3Packages.buildPythonApplication rec { pname = "xonsh"; - version = "0.9.9"; + version = "0.9.18"; # fetch from github because the pypi package ships incomplete tests src = fetchFromGitHub { owner = "xonsh"; repo = "xonsh"; - rev = "refs/tags/${version}"; - sha256 = "0c6ywzn72clcclawgf1khwaaj3snn49fmajz8qfhc5mpbnvdp7q0"; + rev = version; + sha256 = "1zg5dl9qdysbaw2djy9f7f1ydp7vzjv840cjwqxlmg9615lgg7xa"; }; LC_ALL = "en_US.UTF-8"; @@ -19,6 +25,7 @@ python3Packages.buildPythonApplication rec { sed -ie 's|/usr/bin/env|${coreutils}/bin/env|' tests/test_integrations.py sed -ie 's|/usr/bin/env|${coreutils}/bin/env|' scripts/xon.sh + find scripts -name 'xonsh*' -exec sed -i -e "s|env -S|env|" {} \; find -name "*.xsh" | xargs sed -ie 's|/usr/bin/env|${coreutils}/bin/env|' patchShebangs . ''; @@ -26,7 +33,7 @@ python3Packages.buildPythonApplication rec { doCheck = !stdenv.isDarwin; checkPhase = '' - HOME=$TMPDIR pytest -k 'not test_repath_backslash and not test_os and not test_man_completion and not test_builtins and not test_main and not test_ptk_highlight' + HOME=$TMPDIR pytest -k 'not test_repath_backslash and not test_os and not test_man_completion and not test_builtins and not test_main and not test_ptk_highlight and not test_pyghooks' HOME=$TMPDIR pytest -k 'test_builtins or test_main' --reruns 5 HOME=$TMPDIR pytest -k 'test_ptk_highlight' ''; @@ -37,7 +44,8 @@ python3Packages.buildPythonApplication rec { meta = with stdenv.lib; { description = "A Python-ish, BASHwards-compatible shell"; - homepage = http://xon.sh/; + homepage = "https://xon.sh/"; + changelog = "https://github.com/xonsh/xonsh/releases/tag/${version}"; license = licenses.bsd3; maintainers = with maintainers; [ spwhitt vrthra ]; platforms = platforms.all; diff --git a/pkgs/shells/zsh/antibody/default.nix b/pkgs/shells/zsh/antibody/default.nix index 0ea3c8d158d..c0e87cd6021 100644 --- a/pkgs/shells/zsh/antibody/default.nix +++ b/pkgs/shells/zsh/antibody/default.nix @@ -2,23 +2,23 @@ buildGoModule rec { pname = "antibody"; - version = "4.1.2"; - - goPackagePath = "github.com/getantibody/antibody"; + version = "6.0.1"; src = fetchFromGitHub { owner = "getantibody"; repo = "antibody"; rev = "v${version}"; - sha256 = "1csanmvix7b2sa7nsy8nh3jq6gmhp8i51xivsabm1lj2y30c0ly3"; + sha256 = "0ix2liy8h48s3n7ykr85ik03kwj45iqwhwn79ap8y21bar00gybs"; }; - modSha256 = "1p9cw92ivwgpkvjxvwd9anbd1vzhpicm9il4pg37z2kgr2ihhnyh"; + vendorSha256 = "072kxr68p9f58w2q98fjcn4wzd5szy5l5sz8sh4ssapljvic2lam"; + + buildFlagsArray = [ "-ldflags=-s -w -X main.version=${version}" ]; meta = with lib; { description = "The fastest shell plugin manager"; - homepage = https://github.com/getantibody/antibody; + homepage = "https://github.com/getantibody/antibody"; license = licenses.mit; - maintainers = with maintainers; [ worldofpeace ]; + maintainers = with maintainers; [ filalex77 worldofpeace ]; }; -} +} \ No newline at end of file diff --git a/pkgs/shells/zsh/antigen/default.nix b/pkgs/shells/zsh/antigen/default.nix index cf22207ef09..b4812428adf 100644 --- a/pkgs/shells/zsh/antigen/default.nix +++ b/pkgs/shells/zsh/antigen/default.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { version = "2.2.3"; - name = "antigen-${version}"; + pname = "antigen"; src = fetchurl { url = "https://github.com/zsh-users/antigen/releases/download/v${version}/antigen.zsh"; @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { meta = { description = "The plugin manager for zsh."; - homepage = http://antigen.sharats.me; + homepage = "http://antigen.sharats.me"; license = stdenv.lib.licenses.mit; }; } diff --git a/pkgs/shells/zsh/default.nix b/pkgs/shells/zsh/default.nix index b74b2fc43f3..3b346e4e44b 100644 --- a/pkgs/shells/zsh/default.nix +++ b/pkgs/shells/zsh/default.nix @@ -1,21 +1,21 @@ -{ stdenv, fetchurl, ncurses, pcre }: +{ stdenv, fetchurl, ncurses, pcre, buildPackages }: let - version = "5.7.1"; + version = "5.8"; documentation = fetchurl { url = "mirror://sourceforge/zsh/zsh-${version}-doc.tar.xz"; - sha256 = "1d1r88n1gfdavx4zy3svl1gljrvzim17jb2r834hafg2a016flrh"; + sha256 = "1i6wdzq6rfjx5yjrpzan1jf50hk2pfzy5qib9mb7cnnbjfar6klv"; }; - in stdenv.mkDerivation { - name = "zsh-${version}"; + pname = "zsh"; + inherit version; src = fetchurl { url = "mirror://sourceforge/zsh/zsh-${version}.tar.xz"; - sha256 = "1s3yww0mzgvpc48kp0x868mm3gbna42sbgzya0nknj0x5hn2jq3j"; + sha256 = "09yyaadq738zlrnlh1hd3ycj1mv3q5hh4xl1ank70mjnqm6bbi6w"; }; buildInputs = [ ncurses pcre ]; @@ -61,7 +61,11 @@ else fi fi EOF - $out/bin/zsh -c "zcompile $out/etc/zprofile" + ${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_ @@ -77,7 +81,7 @@ EOF a host of other features. ''; license = "MIT-like"; - homepage = http://www.zsh.org/; + homepage = "http://www.zsh.org/"; maintainers = with stdenv.lib.maintainers; [ pSub ]; platforms = stdenv.lib.platforms.unix; }; diff --git a/pkgs/shells/zsh/fzf-zsh/default.nix b/pkgs/shells/zsh/fzf-zsh/default.nix new file mode 100644 index 00000000000..075707f425c --- /dev/null +++ b/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/pkgs/shells/zsh/gradle-completion/default.nix b/pkgs/shells/zsh/gradle-completion/default.nix index b9047a93a41..72667d862a8 100644 --- a/pkgs/shells/zsh/gradle-completion/default.nix +++ b/pkgs/shells/zsh/gradle-completion/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchFromGitHub }: stdenv.mkDerivation rec { - name = "gradle-completion-${version}"; + pname = "gradle-completion"; version = "1.4.1"; src = fetchFromGitHub { @@ -28,8 +28,8 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "Gradle tab completion for bash and zsh"; - homepage = https://github.com/gradle/gradle-completion; + homepage = "https://github.com/gradle/gradle-completion"; license = licenses.mit; - maintainers = with maintainers; [ ma27 ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/shells/zsh/grml-zsh-config/default.nix b/pkgs/shells/zsh/grml-zsh-config/default.nix index 0051df7073b..e76ca684210 100644 --- a/pkgs/shells/zsh/grml-zsh-config/default.nix +++ b/pkgs/shells/zsh/grml-zsh-config/default.nix @@ -4,18 +4,18 @@ with lib; stdenv.mkDerivation rec { - name = "grml-zsh-config-${version}"; - version = "0.16.0"; + pname = "grml-zsh-config"; + version = "0.16.1"; src = fetchFromGitHub { owner = "grml"; repo = "grml-etc-core"; rev = "v${version}"; - sha256 = "1b794c3hfhw51aqp8dg8smxqjv4x518rs1ib4pdglc4d785rlq1k"; + sha256 = "1dmhwgs5v4f1yanbi6dg1lbpzmvq1l3dq7sra811ycsf4f6g0d7f"; }; buildInputs = [ zsh coreutils txt2tags procps ] - ++ optional stdenv.isLinux [ inetutils ]; + ++ optional stdenv.isLinux inetutils; buildPhase = '' cd doc @@ -33,7 +33,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "grml's zsh setup"; - homepage = http://grml.org/zsh/; + homepage = "http://grml.org/zsh/"; license = licenses.gpl2; platforms = platforms.unix; maintainers = with maintainers; [ msteen rvolosatovs ]; diff --git a/pkgs/shells/zsh/lambda-mod-zsh-theme/default.nix b/pkgs/shells/zsh/lambda-mod-zsh-theme/default.nix index 1794979bedf..0f244c4d686 100644 --- a/pkgs/shells/zsh/lambda-mod-zsh-theme/default.nix +++ b/pkgs/shells/zsh/lambda-mod-zsh-theme/default.nix @@ -21,7 +21,7 @@ stdenv.mkDerivation { 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/; + homepage = "https://github.com/halfo/lambda-mod-zsh-theme/"; license = licenses.mit; platforms = platforms.linux; maintainers = with maintainers; [ ma27 ]; diff --git a/pkgs/shells/zsh/nix-zsh-completions/default.nix b/pkgs/shells/zsh/nix-zsh-completions/default.nix index 0a5c3ef666e..623d562b16e 100644 --- a/pkgs/shells/zsh/nix-zsh-completions/default.nix +++ b/pkgs/shells/zsh/nix-zsh-completions/default.nix @@ -1,17 +1,18 @@ { stdenv, fetchFromGitHub }: let - version = "0.4.3"; + version = "0.4.4"; in -stdenv.mkDerivation rec { - name = "nix-zsh-completions-${version}"; +stdenv.mkDerivation { + pname = "nix-zsh-completions"; + inherit version; src = fetchFromGitHub { owner = "spwhitt"; repo = "nix-zsh-completions"; - rev = "${version}"; - sha256 = "0fq1zlnsj1bb7byli7mwlz7nm2yszwmyx43ccczcv51mjjfivyp3"; + rev = version; + sha256 = "1n9whlys95k4wc57cnz3n07p7zpkv796qkmn68a50ygkx6h3afqf"; }; installPhase = '' @@ -21,7 +22,7 @@ stdenv.mkDerivation rec { ''; meta = with stdenv.lib; { - homepage = https://github.com/spwhitt/nix-zsh-completions; + homepage = "https://github.com/spwhitt/nix-zsh-completions"; description = "ZSH completions for Nix, NixOS, and NixOps"; license = licenses.bsd3; platforms = platforms.all; diff --git a/pkgs/shells/zsh/oh-my-zsh/default.nix b/pkgs/shells/zsh/oh-my-zsh/default.nix index 6afe6d286ee..845d0fa4389 100644 --- a/pkgs/shells/zsh/oh-my-zsh/default.nix +++ b/pkgs/shells/zsh/oh-my-zsh/default.nix @@ -4,13 +4,13 @@ { stdenv, fetchgit }: stdenv.mkDerivation rec { - version = "2019-08-07"; - name = "oh-my-zsh-${version}"; - rev = "40fafe0f59371d1a9d83b83c614acfd1d740aabb"; + version = "2020-05-24"; + pname = "oh-my-zsh"; + rev = "5ea25e6736430ab5b8439d11b2e9a837a803771b"; src = fetchgit { inherit rev; - url = "https://github.com/robbyrussell/oh-my-zsh"; - sha256 = "0vk78dkrgbj51jvbpn337d7dnsb3p7cdj4bk92m6xqby5lmk4q01"; + url = "https://github.com/ohmyzsh/ohmyzsh"; + sha256 = "047vdx7c5fsli6yh35kmp25nxs2bgji21837iq5dwq8nvyq42a9i"; }; pathsToLink = [ "/share/oh-my-zsh" ]; @@ -66,7 +66,7 @@ stdenv.mkDerivation rec { $ 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/; + homepage = "https://ohmyz.sh/"; license = licenses.mit; platforms = platforms.all; maintainers = with maintainers; [ scolobb nequissimus ]; diff --git a/pkgs/shells/zsh/oh-my-zsh/update.sh b/pkgs/shells/zsh/oh-my-zsh/update.sh index 08b0daa4387..0146cac8496 100755 --- a/pkgs/shells/zsh/oh-my-zsh/update.sh +++ b/pkgs/shells/zsh/oh-my-zsh/update.sh @@ -3,12 +3,12 @@ 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')" +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')" 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')" + 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)" diff --git a/pkgs/shells/zsh/spaceship-prompt/default.nix b/pkgs/shells/zsh/spaceship-prompt/default.nix index 28b116523ac..e1839d5dd07 100644 --- a/pkgs/shells/zsh/spaceship-prompt/default.nix +++ b/pkgs/shells/zsh/spaceship-prompt/default.nix @@ -1,14 +1,14 @@ { stdenv, fetchFromGitHub }: -stdenv.mkDerivation rec{ - name = "spaceship-prompt-${version}"; - version = "3.7.1"; +stdenv.mkDerivation rec { + pname = "spaceship-prompt"; + version = "3.11.2"; src = fetchFromGitHub { owner = "denysdovhan"; repo = "spaceship-prompt"; - sha256 = "0laihax18bs254rm2sww5wkjbmkp4m5c8aicgqpi4diz7difxk6z"; - rev = "aaa34aeab9ba0a99416788f627ec9aeffba392f0"; + sha256 = "1q7m9mmg82n4fddfz01y95d5n34xnzhrnn1lli0vih39sgmzim9b"; + rev = "v${version}"; }; installPhase = '' @@ -25,7 +25,7 @@ stdenv.mkDerivation rec{ meta = with stdenv.lib; { description = "Zsh prompt for Astronauts"; - homepage = https://github.com/denysdovhan/spaceship-prompt/; + homepage = "https://github.com/denysdovhan/spaceship-prompt/"; license = licenses.mit; platforms = platforms.linux; maintainers = with maintainers; [ nyanloutre ]; diff --git a/pkgs/shells/zsh/zplug/default.nix b/pkgs/shells/zsh/zplug/default.nix new file mode 100644 index 00000000000..d35eb345dda --- /dev/null +++ b/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/pkgs/shells/zsh/zsh-autosuggestions/default.nix b/pkgs/shells/zsh/zsh-autosuggestions/default.nix index 6af1869da7e..58e560d2fa4 100644 --- a/pkgs/shells/zsh/zsh-autosuggestions/default.nix +++ b/pkgs/shells/zsh/zsh-autosuggestions/default.nix @@ -3,14 +3,14 @@ # To make use of this derivation, use the `programs.zsh.enableAutoSuggestions` option stdenv.mkDerivation rec { - name = "zsh-autosuggestions-${version}"; - version = "0.6.3"; + pname = "zsh-autosuggestions"; + version = "0.6.4"; src = fetchFromGitHub { owner = "zsh-users"; repo = "zsh-autosuggestions"; rev = "v${version}"; - sha256 = "1h8h2mz9wpjpymgl2p7pc146c1jgb3dggpvzwm9ln3in336wl95c"; + sha256 = "0h52p2waggzfshvy1wvhj4hf06fmzd44bv6j18k3l9rcx6aixzn6"; }; buildInputs = [ zsh ]; @@ -22,7 +22,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "Fish shell autosuggestions for Zsh"; - homepage = https://github.com/zsh-users/zsh-autosuggestions; + homepage = "https://github.com/zsh-users/zsh-autosuggestions"; license = licenses.mit; platforms = platforms.unix; maintainers = [ maintainers.loskutov ]; diff --git a/pkgs/shells/zsh/zsh-bd/default.nix b/pkgs/shells/zsh/zsh-bd/default.nix new file mode 100644 index 00000000000..b5b66af6ca3 --- /dev/null +++ b/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/pkgs/shells/zsh/zsh-command-time/default.nix b/pkgs/shells/zsh/zsh-command-time/default.nix index c81c1ea46c5..3ef210a0281 100644 --- a/pkgs/shells/zsh/zsh-command-time/default.nix +++ b/pkgs/shells/zsh/zsh-command-time/default.nix @@ -8,9 +8,9 @@ # ZSH_COMMAND_TIME_ECHO=1 # ''; -stdenv.mkDerivation rec { +stdenv.mkDerivation { version = "2018-04-30"; - name = "zsh-command-time-${version}"; + pname = "zsh-command-time"; src = fetchFromGitHub { owner = "popstas"; @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "Plugin that output time: xx after long commands"; - homepage = https://github.com/popstas/zsh-command-time; + homepage = "https://github.com/popstas/zsh-command-time"; license = licenses.mit; platforms = platforms.unix; }; diff --git a/pkgs/shells/zsh/zsh-completions/default.nix b/pkgs/shells/zsh/zsh-completions/default.nix index 726f2b7ad73..03f6146df7c 100644 --- a/pkgs/shells/zsh/zsh-completions/default.nix +++ b/pkgs/shells/zsh/zsh-completions/default.nix @@ -1,14 +1,14 @@ { stdenv, fetchFromGitHub}: stdenv.mkDerivation rec { - name = "zsh-completions-${version}"; - version = "0.30.0"; + pname = "zsh-completions"; + version = "0.31.0"; src = fetchFromGitHub { owner = "zsh-users"; - repo = "zsh-completions"; - rev = "${version}"; - sha256 = "1yf4rz99acdsiy0y1v3bm65xvs2m0sl92ysz0rnnrlbd5amn283l"; + repo = pname; + rev = version; + sha256 = "0rw23m8cqxhcb4yjhbzb9lir60zn1xjy7hn3zv1fzz700f0i6fyk"; }; installPhase= '' @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { meta = { description = "Additional completion definitions for zsh"; - homepage = https://github.com/zsh-users/zsh-completions; + homepage = "https://github.com/zsh-users/zsh-completions"; license = stdenv.lib.licenses.free; platforms = stdenv.lib.platforms.unix; diff --git a/pkgs/shells/zsh/zsh-fast-syntax-highlighting/default.nix b/pkgs/shells/zsh/zsh-fast-syntax-highlighting/default.nix new file mode 100644 index 00000000000..452419bf8b0 --- /dev/null +++ b/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/pkgs/shells/zsh/zsh-history-substring-search/default.nix b/pkgs/shells/zsh/zsh-history-substring-search/default.nix index 42de7d48d83..9890993eed6 100644 --- a/pkgs/shells/zsh/zsh-history-substring-search/default.nix +++ b/pkgs/shells/zsh/zsh-history-substring-search/default.nix @@ -1,14 +1,14 @@ { stdenv, lib, fetchFromGitHub }: stdenv.mkDerivation rec { - name = "zsh-history-substring-search-${version}"; - version = "1.0.1"; + pname = "zsh-history-substring-search"; + version = "1.0.2"; src = fetchFromGitHub { owner = "zsh-users"; repo = "zsh-history-substring-search"; rev = "v${version}"; - sha256 = "0lgmq1xcccnz5cf7vl0r0qj351hwclx9p80cl0qczxry4r2g5qaz"; + sha256 = "0y8va5kc2ram38hbk2cibkk64ffrabfv1sh4xm7pjspsba9n5p1y"; }; installPhase = '' @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { meta = with lib; { description = "Fish shell history-substring-search for Zsh"; - homepage = https://github.com/zsh-users/zsh-history-substring-search; + homepage = "https://github.com/zsh-users/zsh-history-substring-search"; license = licenses.bsd3; maintainers = with maintainers; [ qyliss ]; platforms = platforms.unix; diff --git a/pkgs/shells/zsh/zsh-history/default.nix b/pkgs/shells/zsh/zsh-history/default.nix new file mode 100644 index 00000000000..47f590a78f2 --- /dev/null +++ b/pkgs/shells/zsh/zsh-history/default.nix @@ -0,0 +1,36 @@ +{ 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"; + goPackagePath = "github.com/b4b4r07/history"; + + 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; + }; +} \ No newline at end of file diff --git a/pkgs/shells/zsh/zsh-nix-shell/default.nix b/pkgs/shells/zsh/zsh-nix-shell/default.nix new file mode 100644 index 00000000000..c424cc33483 --- /dev/null +++ b/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-unstable"; + version = "2019-12-20"; + + src = fetchFromGitHub { + owner = "chisui"; + repo = "zsh-nix-shell"; + rev = "a65382a353eaee5a98f068c330947c032a1263bb"; + sha256 = "0l41ac5b7p8yyjvpfp438kw7zl9dblrpd7icjg1v3ig3xy87zv0n"; + }; + + 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/pkgs/shells/zsh/zsh-powerlevel10k/default.nix b/pkgs/shells/zsh/zsh-powerlevel10k/default.nix new file mode 100644 index 00000000000..169173a42e8 --- /dev/null +++ b/pkgs/shells/zsh/zsh-powerlevel10k/default.nix @@ -0,0 +1,40 @@ +{ 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.7.0"; + + src = fetchFromGitHub { + owner = "romkatv"; + repo = "powerlevel10k"; + rev = "v${version}"; + sha256 = "04j37qmgzj62gixysj3di9dccfib4hx1c4ld9kcms3ag7k403bgj"; + }; + + 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 + rm -r gitstatus/bin + install -D gitstatus/* --target-directory=$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/pkgs/shells/zsh/zsh-powerlevel10k/gitstatusd.patch b/pkgs/shells/zsh/zsh-powerlevel10k/gitstatusd.patch new file mode 100644 index 00000000000..a4440079e4b --- /dev/null +++ b/pkgs/shells/zsh/zsh-powerlevel10k/gitstatusd.patch @@ -0,0 +1,14 @@ +diff --git a/gitstatus/gitstatus.plugin.zsh b/gitstatus/gitstatus.plugin.zsh +index 46d0b3c..b082e24 100644 +--- a/gitstatus/gitstatus.plugin.zsh ++++ b/gitstatus/gitstatus.plugin.zsh +@@ -53,6 +53,8 @@ + + [[ -o 'interactive' ]] || 'return' + ++GITSTATUS_DAEMON=@gitstatusdPath@ ++ + # Temporarily change options. + 'builtin' 'local' '-a' '_gitstatus_opts' + [[ ! -o 'aliases' ]] || _gitstatus_opts+=('aliases') + diff --git a/pkgs/shells/zsh/zsh-powerlevel9k/default.nix b/pkgs/shells/zsh/zsh-powerlevel9k/default.nix index 30c45ea3c9b..676f9458675 100644 --- a/pkgs/shells/zsh/zsh-powerlevel9k/default.nix +++ b/pkgs/shells/zsh/zsh-powerlevel9k/default.nix @@ -3,8 +3,8 @@ # To make use of this derivation, use # `programs.zsh.promptInit = "source ${pkgs.zsh-powerlevel9k}/share/zsh-powerlevel9k/powerlevel9k.zsh-theme";` -stdenv.mkDerivation rec { - name = "powerlevel9k-${version}"; +stdenv.mkDerivation { + pname = "powerlevel9k"; version = "2017-11-10"; src = fetchFromGitHub { owner = "bhilburn"; @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { meta = { description = "A beautiful theme for zsh"; - homepage = https://github.com/bhilburn/powerlevel9k; + homepage = "https://github.com/bhilburn/powerlevel9k"; license = stdenv.lib.licenses.mit; platforms = stdenv.lib.platforms.unix; diff --git a/pkgs/shells/zsh/zsh-prezto/default.nix b/pkgs/shells/zsh/zsh-prezto/default.nix index efb62c2a0fd..9f7a7f18704 100644 --- a/pkgs/shells/zsh/zsh-prezto/default.nix +++ b/pkgs/shells/zsh/zsh-prezto/default.nix @@ -1,11 +1,13 @@ -{ stdenv, fetchgit }: +{ stdenv, fetchFromGitHub }: stdenv.mkDerivation rec { - name = "zsh-prezto-2019-03-18"; - src = fetchgit { - url = "https://github.com/sorin-ionescu/prezto"; - rev = "1f4601e44c989b90dc7314b151891fa60a101251"; - sha256 = "1dcd5r7pc4biiplm0lh7yca0h6hs0xpaq9dwaarmfsh9wrd68350"; + pname = "zsh-prezto"; + version = "2020-05-20"; + src = fetchFromGitHub { + owner = "sorin-ionescu"; + repo = "prezto"; + rev = "793f239a5e38ef2c4b76a4955bb734520303e8c4"; + sha256 = "0xhdl1g0rvlikq6qxh6cwp6wsrgmw4l1rmmq5xpc7wl6dyh35yri"; fetchSubmodules = true; }; buildPhase = '' @@ -24,7 +26,7 @@ stdenv.mkDerivation rec { ''; 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; + homepage = "https://github.com/sorin-ionescu/prezto"; license = licenses.mit; maintainers = with maintainers; [ ]; platforms = with platforms; unix; diff --git a/pkgs/shells/zsh/zsh-syntax-highlighting/default.nix b/pkgs/shells/zsh/zsh-syntax-highlighting/default.nix index b7b44098fd7..906352b8b3e 100644 --- a/pkgs/shells/zsh/zsh-syntax-highlighting/default.nix +++ b/pkgs/shells/zsh/zsh-syntax-highlighting/default.nix @@ -3,23 +3,23 @@ # To make use of this derivation, use the `programs.zsh.enableSyntaxHighlighting` option stdenv.mkDerivation rec { - version = "0.6.0"; - name = "zsh-syntax-highlighting-${version}"; + version = "0.7.1"; + pname = "zsh-syntax-highlighting"; src = fetchFromGitHub { owner = "zsh-users"; repo = "zsh-syntax-highlighting"; rev = version; - sha256 = "0zmq66dzasmr5pwribyh4kbkk23jxbpdw4rjxx0i7dx8jjp2lzl4"; + sha256 = "03r6hpb5fy4yaakqm3lbf4xcvd408r44jgpv4lnzl9asp4sb9qc0"; }; buildInputs = [ zsh ]; - installFlags = "PREFIX=$(out)"; + installFlags = [ "PREFIX=$(out)" ]; meta = with stdenv.lib; { description = "Fish shell like syntax highlighting for Zsh"; - homepage = https://github.com/zsh-users/zsh-syntax-highlighting; + homepage = "https://github.com/zsh-users/zsh-syntax-highlighting"; license = licenses.bsd3; platforms = platforms.unix; maintainers = [ maintainers.loskutov ]; diff --git a/pkgs/shells/zsh/zsh-you-should-use/default.nix b/pkgs/shells/zsh/zsh-you-should-use/default.nix index c44483d3744..13e3bbdc038 100644 --- a/pkgs/shells/zsh/zsh-you-should-use/default.nix +++ b/pkgs/shells/zsh/zsh-you-should-use/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "zsh-you-should-use"; - version = "1.1.0"; + version = "1.7.0"; src = fetchFromGitHub { owner = "MichaelAquilina"; repo = pname; rev = version; - sha256 = "0fig5ralagi5jajk7gdm52jvwql17qk9cd6j98qsndvckb26a753"; + sha256 = "1gcxm08ragwrh242ahlq3bpfg5yma2cshwdlj8nrwnd4qwrsflgq"; }; dontBuild = true; @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { ''; meta = with stdenv.lib; { - homepage = https://github.com/MichaelAquilina/zsh-you-should-use; + 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 ]; |