diff options
Diffstat (limited to 'pkgs/shells')
-rw-r--r-- | pkgs/shells/bash-completion/default.nix | 2 | ||||
-rw-r--r-- | pkgs/shells/bash/default.nix | 38 | ||||
-rw-r--r-- | pkgs/shells/dash/default.nix | 4 | ||||
-rw-r--r-- | pkgs/shells/es/default.nix | 6 | ||||
-rw-r--r-- | pkgs/shells/fish/builtin_status.patch | 216 | ||||
-rw-r--r-- | pkgs/shells/fish/command-not-found.patch | 13 | ||||
-rw-r--r-- | pkgs/shells/fish/default.nix | 100 | ||||
-rw-r--r-- | pkgs/shells/fish/etc_config.patch | 17 | ||||
-rw-r--r-- | pkgs/shells/mksh/default.nix | 4 | ||||
-rw-r--r-- | pkgs/shells/oh-my-zsh/default.nix | 8 | ||||
-rw-r--r-- | pkgs/shells/oh/default.nix | 17 | ||||
-rw-r--r-- | pkgs/shells/oh/deps.json | 10 | ||||
-rw-r--r-- | pkgs/shells/pash/default.nix | 4 | ||||
-rw-r--r-- | pkgs/shells/rssh/default.nix | 82 | ||||
-rw-r--r-- | pkgs/shells/rssh/fix-config-path.patch | 12 | ||||
-rw-r--r-- | pkgs/shells/rush/default.nix | 4 | ||||
-rw-r--r-- | pkgs/shells/tcsh/default.nix | 4 | ||||
-rw-r--r-- | pkgs/shells/xonsh/default.nix | 47 | ||||
-rw-r--r-- | pkgs/shells/zsh-prezto/default.nix | 45 | ||||
-rw-r--r-- | pkgs/shells/zsh/default.nix | 4 |
20 files changed, 323 insertions, 314 deletions
diff --git a/pkgs/shells/bash-completion/default.nix b/pkgs/shells/bash-completion/default.nix index 6c7051c9c7a2..91d6b3335416 100644 --- a/pkgs/shells/bash-completion/default.nix +++ b/pkgs/shells/bash-completion/default.nix @@ -23,6 +23,6 @@ stdenv.mkDerivation rec { license = "GPL"; platforms = stdenv.lib.platforms.unix; - maintainers = [ stdenv.lib.maintainers.simons ]; + maintainers = [ stdenv.lib.maintainers.peti ]; }; } diff --git a/pkgs/shells/bash/default.nix b/pkgs/shells/bash/default.nix index 60504ecaa9bc..0e3fc1d80690 100644 --- a/pkgs/shells/bash/default.nix +++ b/pkgs/shells/bash/default.nix @@ -9,6 +9,8 @@ let shortName = "bash43"; baseConfigureFlags = if interactive then "--with-installed-readline" else "--disable-readline"; sha256 = "1m14s1f61mf6bijfibcjm9y6pkyvz6gibyl8p4hxq90fisi8gimg"; + + inherit (stdenv.lib) optional optionalString; in stdenv.mkDerivation rec { @@ -19,7 +21,10 @@ stdenv.mkDerivation rec { inherit sha256; }; - outputs = [ "out" "doc" ]; + outputs = [ "out" "doc" "info" ]; + + # the man pages are small and useful enough + outputMan = if interactive then "out" else null; NIX_CFLAGS_COMPILE = '' -DSYS_BASHRC="/etc/bashrc" @@ -41,17 +46,17 @@ stdenv.mkDerivation rec { }; in import ./bash-4.3-patches.nix patch) - ++ stdenv.lib.optional stdenv.isCygwin ./cygwin-bash-4.3.33-1.src.patch; + ++ optional stdenv.isCygwin ./cygwin-bash-4.3.33-1.src.patch; crossAttrs = { configureFlags = baseConfigureFlags + " bash_cv_job_control_missing=nomissing bash_cv_sys_named_pipes=nomissing" + - stdenv.lib.optionalString stdenv.isCygwin '' + optionalString stdenv.isCygwin '' --without-libintl-prefix --without-libiconv-prefix --with-installed-readline bash_cv_dev_stdin=present bash_cv_dev_fd=standard - bash_cv_termcap_lib=libncurses + bash_cv_termcap_lib=libncurses ''; }; @@ -59,20 +64,29 @@ stdenv.mkDerivation rec { # Note: Bison is needed because the patches above modify parse.y. nativeBuildInputs = [bison] - ++ stdenv.lib.optional (texinfo != null) texinfo - ++ stdenv.lib.optional interactive readline - ++ stdenv.lib.optional stdenv.isDarwin binutils; + ++ optional (texinfo != null) texinfo + ++ optional interactive readline + ++ optional stdenv.isDarwin binutils; # Bash randomly fails to build because of a recursive invocation to # build `version.h'. enableParallelBuilding = false; postInstall = '' - # Add an `sh' -> `bash' symlink. ln -s bash "$out/bin/sh" ''; - meta = { + postFixup = if interactive + then '' + substituteInPlace "$out/bin/bashbug" \ + --replace '${stdenv.shell}' "$out/bin/bash" + '' + # most space is taken by locale data + else '' + rm -r "$out/share" "$out/bin/bashbug" + ''; + + meta = with stdenv.lib; { homepage = http://www.gnu.org/software/bash/; description = "GNU Bourne-Again Shell, the de facto standard shell on Linux" + @@ -89,11 +103,11 @@ stdenv.mkDerivation rec { Bash without modification. ''; - license = stdenv.lib.licenses.gpl3Plus; + license = licenses.gpl3Plus; - platforms = stdenv.lib.platforms.all; + platforms = platforms.all; - maintainers = [ stdenv.lib.maintainers.simons ]; + maintainers = [ maintainers.peti ]; }; passthru = { diff --git a/pkgs/shells/dash/default.nix b/pkgs/shells/dash/default.nix index d3104439e578..1a95b4f42e6f 100644 --- a/pkgs/shells/dash/default.nix +++ b/pkgs/shells/dash/default.nix @@ -13,4 +13,8 @@ stdenv.mkDerivation rec { description = "A POSIX-compliant implementation of /bin/sh that aims to be as small as possible"; hydraPlatforms = stdenv.lib.platforms.linux; }; + + passthru = { + shellPath = "/bin/dash"; + }; } diff --git a/pkgs/shells/es/default.nix b/pkgs/shells/es/default.nix index 3a4574fb8e16..037d1e1ec995 100644 --- a/pkgs/shells/es/default.nix +++ b/pkgs/shells/es/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation { src = fetchgit { url = "git://github.com/wryun/es-shell"; rev = "fdf29d5296ce3a0ef96d2b5952cff07878753975"; - sha256 = "1hj0g8r59ry9l50h4gdal38nf8lvb3cgl6c9bx5aabkw5i778dfk"; + sha256 = "12faa9b5ffwydgwyjp57zr19sqap2ma3crj6wd2rx1hv30dkll7p"; }; buildInputs = [ readline yacc libtool autoconf automake ]; @@ -43,4 +43,8 @@ stdenv.mkDerivation { maintainers = [ maintainers.sjmackenzie ]; platforms = platforms.all; }; + + passthru = { + shellPath = "/bin/es"; + }; } diff --git a/pkgs/shells/fish/builtin_status.patch b/pkgs/shells/fish/builtin_status.patch deleted file mode 100644 index dd6d79713b4c..000000000000 --- a/pkgs/shells/fish/builtin_status.patch +++ /dev/null @@ -1,216 +0,0 @@ -commit 5145ca56b0ac1e5e284ab6dfa6fdecc5e86e59b8 -Author: Jakob Gillich <jakob@gillich.me> -Date: Sat Dec 26 04:57:06 2015 +0100 - - prefix status command with builtin - -diff --git a/etc/config.fish b/etc/config.fish -index 0683f40..9297a85 100644 ---- a/etc/config.fish -+++ b/etc/config.fish -@@ -6,7 +6,7 @@ - # Some things should only be done for login terminals - # - --if status --is-login -+if builtin status --is-login - - # - # Set some value for LANG if nothing was set before, and this is a -diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish -index 9b27fb9..d1c704b 100644 ---- a/share/functions/__fish_config_interactive.fish -+++ b/share/functions/__fish_config_interactive.fish -@@ -101,7 +101,7 @@ function __fish_config_interactive -d "Initializations that should be performed - eval "$__fish_bin_dir/fish -c 'fish_update_completions > /dev/null ^/dev/null' &" - end - -- if status -i -+ if builtin status -i - # - # Print a greeting - # -@@ -128,14 +128,14 @@ function __fish_config_interactive -d "Initializations that should be performed - # - - function __fish_repaint --on-variable fish_color_cwd --description "Event handler, repaints the prompt when fish_color_cwd changes" -- if status --is-interactive -+ if builtin status --is-interactive - set -e __fish_prompt_cwd - commandline -f repaint ^/dev/null - end - end - - function __fish_repaint_root --on-variable fish_color_cwd_root --description "Event handler, repaints the prompt when fish_color_cwd_root changes" -- if status --is-interactive -+ if builtin status --is-interactive - set -e __fish_prompt_cwd - commandline -f repaint ^/dev/null - end -@@ -191,7 +191,7 @@ function __fish_config_interactive -d "Initializations that should be performed - # Notify vte-based terminals when $PWD changes (issue #906) - if test "$VTE_VERSION" -ge 3405 -o "$TERM_PROGRAM" = "Apple_Terminal" - function __update_vte_cwd --on-variable PWD --description 'Notify VTE of change to $PWD' -- status --is-command-substitution; and return -+ builtin status --is-command-substitution; and return - printf '\033]7;file://%s%s\a' (hostname) (pwd | __fish_urlencode) - end - end -diff --git a/share/functions/__fish_git_prompt.fish b/share/functions/__fish_git_prompt.fish -index 0117894..4e4b60f 100644 ---- a/share/functions/__fish_git_prompt.fish -+++ b/share/functions/__fish_git_prompt.fish -@@ -728,7 +728,7 @@ for var in repaint describe_style show_informative_status showdirtystate showsta - set varargs $varargs --on-variable __fish_git_prompt_$var - end - function __fish_git_prompt_repaint $varargs --description "Event handler, repaints prompt when functionality changes" -- if status --is-interactive -+ if builtin status --is-interactive - if test $argv[3] = __fish_git_prompt_show_informative_status - # Clear characters that have different defaults with/without informative status - for name in cleanstate dirtystate invalidstate stagedstate stateseparator untrackedfiles upstream_ahead upstream_behind -@@ -746,7 +746,7 @@ for var in '' _prefix _suffix _bare _merging _cleanstate _invalidstate _upstream - end - set varargs $varargs --on-variable __fish_git_prompt_showcolorhints - function __fish_git_prompt_repaint_color $varargs --description "Event handler, repaints prompt when any color changes" -- if status --is-interactive -+ if builtin status --is-interactive - set -l var $argv[3] - set -e _$var - set -e _{$var}_done -@@ -766,7 +766,7 @@ for var in cleanstate dirtystate invalidstate stagedstate stashstate statesepara - set varargs $varargs --on-variable __fish_git_prompt_char_$var - end - function __fish_git_prompt_repaint_char $varargs --description "Event handler, repaints prompt when any char changes" -- if status --is-interactive -+ if builtin status --is-interactive - set -e _$argv[3] - commandline -f repaint ^/dev/null - end -diff --git a/share/functions/cd.fish b/share/functions/cd.fish -index 8faa469..10168d7 100644 ---- a/share/functions/cd.fish -+++ b/share/functions/cd.fish -@@ -5,7 +5,7 @@ - function cd --description "Change directory" - - # Skip history in subshells -- if status --is-command-substitution -+ if builtin status --is-command-substitution - builtin cd $argv - return $status - end -@@ -33,4 +33,3 @@ function cd --description "Change directory" - - return $cd_status - end -- -diff --git a/share/functions/eval.fish b/share/functions/eval.fish -index 052d417..5eeb12a 100644 ---- a/share/functions/eval.fish -+++ b/share/functions/eval.fish -@@ -23,17 +23,17 @@ function eval -S -d "Evaluate parameters as a command" - # used interactively, like less, wont work using eval. - - set -l mode -- if status --is-interactive-job-control -+ if builtin status --is-interactive-job-control - set mode interactive - else -- if status --is-full-job-control -+ if builtin status --is-full-job-control - set mode full - else - set mode none - end - end -- if status --is-interactive -- status --job-control full -+ if builtin status --is-interactive -+ builtin status --job-control full - end - __fish_restore_status $status_copy - -@@ -60,6 +60,6 @@ function eval -S -d "Evaluate parameters as a command" - echo "begin; $argv "\n" ;end <&3 3<&-" | source 3<&0 - set -l res $status - -- status --job-control $mode -+ builtin status --job-control $mode - return $res - end -diff --git a/share/functions/history.fish b/share/functions/history.fish -index fd2b91f..12d28d7 100644 ---- a/share/functions/history.fish -+++ b/share/functions/history.fish -@@ -38,7 +38,7 @@ function history --description "Deletes an item from history" - end - else - #Execute history builtin without any argument -- if status --is-interactive -+ if builtin status --is-interactive - builtin history | eval $pager - else - builtin history -diff --git a/share/functions/psub.fish b/share/functions/psub.fish -index 67863ad..dd0e08b 100644 ---- a/share/functions/psub.fish -+++ b/share/functions/psub.fish -@@ -40,7 +40,7 @@ function psub --description "Read from stdin into a file and output the filename - - end - -- if not status --is-command-substitution -+ if not builtin status --is-command-substitution - echo psub: Not inside of command substitution >&2 - return 1 - end -diff --git a/share/tools/web_config/sample_prompts/classic_git.fish b/share/tools/web_config/sample_prompts/classic_git.fish -index 39f3ab8..601fa19 100644 ---- a/share/tools/web_config/sample_prompts/classic_git.fish -+++ b/share/tools/web_config/sample_prompts/classic_git.fish -@@ -17,25 +17,25 @@ function fish_prompt --description 'Write out the prompt' - set -g __fish_classic_git_functions_defined - - function __fish_repaint_user --on-variable fish_color_user --description "Event handler, repaint when fish_color_user changes" -- if status --is-interactive -+ if builtin status --is-interactive - commandline -f repaint ^/dev/null - end - end -- -+ - function __fish_repaint_host --on-variable fish_color_host --description "Event handler, repaint when fish_color_host changes" -- if status --is-interactive -+ if builtin status --is-interactive - commandline -f repaint ^/dev/null - end - end -- -+ - function __fish_repaint_status --on-variable fish_color_status --description "Event handler; repaint when fish_color_status changes" -- if status --is-interactive -+ if builtin status --is-interactive - commandline -f repaint ^/dev/null - end - end - - function __fish_repaint_bind_mode --on-variable fish_key_bindings --description "Event handler; repaint when fish_key_bindings changes" -- if status --is-interactive -+ if builtin status --is-interactive - commandline -f repaint ^/dev/null - end - end -diff --git a/tests/test_util.fish b/tests/test_util.fish -index 22744b3..576dbc4 100644 ---- a/tests/test_util.fish -+++ b/tests/test_util.fish -@@ -4,7 +4,7 @@ - if test "$argv[1]" = (status -f) - echo 'test_util.fish requires sourcing script as argument to `source`' >&2 - echo 'use `source test_util.fish (status -f); or exit`' >&2 -- status --print-stack-trace >&2 -+ builtin status --print-stack-trace >&2 - exit 1 - end - diff --git a/pkgs/shells/fish/command-not-found.patch b/pkgs/shells/fish/command-not-found.patch deleted file mode 100644 index aaca001dcb67..000000000000 --- a/pkgs/shells/fish/command-not-found.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish -index c3864a8..a12ac4d 100644 ---- a/share/functions/__fish_config_interactive.fish -+++ b/share/functions/__fish_config_interactive.fish -@@ -230,7 +230,7 @@ function __fish_config_interactive -d "Initializations that should be performed - # Check for NixOS handler - else if test -f /run/current-system/sw/bin/command-not-found - function __fish_command_not_found_handler --on-event fish_command_not_found -- /run/current-system/sw/bin/command-not-found $argv[1] -+ /run/current-system/sw/bin/command-not-found $argv - end - # Ubuntu Feisty places this command in the regular path instead - else if type -q -p command-not-found diff --git a/pkgs/shells/fish/default.nix b/pkgs/shells/fish/default.nix index 63f5dbd05ddb..353647f15b30 100644 --- a/pkgs/shells/fish/default.nix +++ b/pkgs/shells/fish/default.nix @@ -1,67 +1,83 @@ -{ stdenv, fetchurl, ncurses, nettools, python, which, groff, gettext, man_db, - bc, libiconv, coreutils, gnused, kbd, utillinux, glibc }: +{ stdenv, fetchurl, coreutils, utillinux, + nettools, kbd, bc, which, gnused, gnugrep, + groff, man-db, glibc, libiconv, pcre2, + gettext, ncurses, python +}: + +with stdenv.lib; stdenv.mkDerivation rec { name = "fish-${version}"; - version = "2.2.0"; + version = "2.3.0"; - patches = [ ./etc_config.patch ./builtin_status.patch ./command-not-found.patch ]; + patches = [ ./etc_config.patch ]; src = fetchurl { url = "http://fishshell.com/files/${version}/${name}.tar.gz"; - sha256 = "0ympqz7llmf0hafxwglykplw6j5cz82yhlrw50lw4bnf2kykjqx7"; + sha256 = "1ralmp7lavdl0plc09ppm232aqsn0crxx6m3hgaa06ibam3sqawi"; }; - buildInputs = [ ncurses libiconv ]; + buildInputs = [ ncurses libiconv pcre2 ]; + configureFlags = [ "--without-included-pcre2" ]; # Required binaries during execution # Python: Autocompletion generated from manpages and config editing - propagatedBuildInputs = [ python which groff gettext ] - ++ stdenv.lib.optional (!stdenv.isDarwin) man_db - ++ [ bc coreutils ]; + propagatedBuildInputs = [ + coreutils gnugrep gnused bc + python which groff gettext + ] ++ optional (!stdenv.isDarwin) man-db; postInstall = '' - sed -e "s|expr|${coreutils}/bin/expr|" \ - '' + stdenv.lib.optionalString (!stdenv.isDarwin) '' - -e "s|if which unicode_start|if true|" \ - -e "s|unicode_start|${kbd}/bin/unicode_start|" \ - '' + '' - -i "$out/etc/fish/config.fish" - sed -e "s|bc|${bc}/bin/bc|" \ - -e "s|/usr/bin/seq|${coreutils}/bin/seq|" \ - -i "$out/share/fish/functions/seq.fish" \ + sed -r "s|command grep|command ${gnugrep}/bin/grep|" \ + -i "$out/share/fish/functions/grep.fish" + sed -e "s|bc|${bc}/bin/bc|" \ + -e "s|/usr/bin/seq|${coreutils}/bin/seq|" \ + -i "$out/share/fish/functions/seq.fish" \ "$out/share/fish/functions/math.fish" - sed -i "s|which |${which}/bin/which |" "$out/share/fish/functions/type.fish" - sed -e "s|\|cut|\|${coreutils}/bin/cut|" -i "$out/share/fish/functions/fish_prompt.fish" - sed -i "s|nroff |${groff}/bin/nroff |" "$out/share/fish/functions/__fish_print_help.fish" - sed -e "s|gettext |${gettext}/bin/gettext |" \ - -e "s|which |${which}/bin/which |" \ + sed -i "s|which |${which}/bin/which |" \ + "$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 |" \ + -e "s|which |${which}/bin/which |" \ -i "$out/share/fish/functions/_.fish" - sed -e "s|uname|${coreutils}/bin/uname|" \ - -i "$out/share/fish/functions/__fish_pwd.fish" \ + sed -e "s|uname|${coreutils}/bin/uname|" \ + -i "$out/share/fish/functions/__fish_pwd.fish" \ "$out/share/fish/functions/prompt_pwd.fish" - sed -e "s|sed |${gnused}/bin/sed |" \ - -i "$out/share/fish/functions/alias.fish" \ + sed -e "s|sed |${gnused}/bin/sed |" \ + -i "$out/share/fish/functions/alias.fish" \ "$out/share/fish/functions/prompt_pwd.fish" - substituteInPlace "$out/share/fish/functions/fish_default_key_bindings.fish" \ - --replace "clear;" "${ncurses}/bin/clear;" - '' + stdenv.lib.optionalString stdenv.isLinux '' - substituteInPlace "$out/share/fish/functions/__fish_print_help.fish" \ - --replace "| ul" "| ${utillinux}/bin/ul" + 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;|${ncurses.out}/bin/clear;|" \ + -i "$out/share/fish/functions/fish_default_key_bindings.fish" \ + '' + optionalString stdenv.isLinux '' + sed -e "s| ul| ${utillinux}/bin/ul|" \ + -i "$out/share/fish/functions/__fish_print_help.fish" for cur in $out/share/fish/functions/*.fish; do - substituteInPlace "$cur" --replace "/usr/bin/getent" "${glibc}/bin/getent" + sed -e "s|/usr/bin/getent|${glibc.bin}/bin/getent|" \ + -i "$cur" done - '' + stdenv.lib.optionalString (!stdenv.isDarwin) '' - sed -i "s|(hostname\||(${nettools}/bin/hostname\||" "$out/share/fish/functions/fish_prompt.fish" - sed -i "s|Popen(\['manpath'|Popen(\['${man_db}/bin/manpath'|" "$out/share/fish/tools/create_manpage_completions.py" - sed -i "s|command manpath|command ${man_db}/bin/manpath|" "$out/share/fish/functions/man.fish" + + '' + optionalString (!stdenv.isDarwin) '' + sed -i "s|(hostname\||(${nettools}/bin/hostname\||" \ + "$out/share/fish/functions/fish_prompt.fish" + sed -i "s|Popen(\['manpath'|Popen(\['${man-db}/bin/manpath'|" \ + "$out/share/fish/tools/create_manpage_completions.py" + sed -i "s|command manpath|command ${man-db}/bin/manpath|" \ + "$out/share/fish/functions/man.fish" '' + '' - sed -i "s|/sbin /usr/sbin||" \ - "$out/share/fish/functions/__fish_complete_subcommand_root.fish" + tee -a $out/share/fish/config.fish << EOF # make fish pick up completions from nix profile - echo "set fish_complete_path (echo \$NIX_PROFILES | tr ' ' '\n')\"/share/fish/vendor_completions.d\" \$fish_complete_path" >> $out/share/fish/config.fish + if status --is-interactive + set -l profiles (echo \$NIX_PROFILES | ${coreutils}/bin/tr ' ' '\n') + set fish_complete_path \$profiles"/share/fish/vendor_completions.d" \$fish_complete_path + end + EOF ''; meta = with stdenv.lib; { @@ -71,4 +87,8 @@ stdenv.mkDerivation rec { platforms = platforms.unix; maintainers = with maintainers; [ ocharles ]; }; + + passthru = { + shellPath = "/bin/fish"; + }; } diff --git a/pkgs/shells/fish/etc_config.patch b/pkgs/shells/fish/etc_config.patch index c48e734cc905..c0098c058124 100644 --- a/pkgs/shells/fish/etc_config.patch +++ b/pkgs/shells/fish/etc_config.patch @@ -1,17 +1,12 @@ -commit 0ec07a7018bd69513b0bca6e2f22dbf8575a5b5e -Author: Jakob Gillich <jakob@gillich.me> -Date: Fri Dec 25 01:59:29 2015 +0100 - - load /etc/fish/config.fish if it exists - diff --git a/etc/config.fish b/etc/config.fish -index 0683f40..33f4da7 100644 +index 9be6f07..61c9ae2 100644 --- a/etc/config.fish +++ b/etc/config.fish -@@ -37,3 +37,6 @@ if status --is-login - end - end - +@@ -12,3 +12,7 @@ + # if status --is-interactiv + # ... + # end ++ +if test -f /etc/fish/config.fish + source /etc/fish/config.fish +end diff --git a/pkgs/shells/mksh/default.nix b/pkgs/shells/mksh/default.nix index 696777c7f1ff..dde890a022db 100644 --- a/pkgs/shells/mksh/default.nix +++ b/pkgs/shells/mksh/default.nix @@ -43,4 +43,8 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ AndersonTorres nckx ]; platforms = platforms.unix; }; + + passthru = { + shellPath = "/bin/mksh"; + }; } diff --git a/pkgs/shells/oh-my-zsh/default.nix b/pkgs/shells/oh-my-zsh/default.nix index 796521b52334..5191e7cd45cb 100644 --- a/pkgs/shells/oh-my-zsh/default.nix +++ b/pkgs/shells/oh-my-zsh/default.nix @@ -7,12 +7,12 @@ stdenv.mkDerivation rec { name = "oh-my-zsh-git-${version}"; - version = "2016-04-06"; + version = "2016-06-18"; src = fetchgit { url = "https://github.com/robbyrussell/oh-my-zsh"; - rev = "d310fac7f65d31f7494532201e02ebf67c9d9555"; - sha256 = "0kx552b0jf5j8qkk1kixdr1z49ly79cvzhdh27848rj3kwb0z8vq"; + rev = "d012402dada1ec7d8796f2f4b04744d817137b4d"; + sha256 = "1965k91jdhjpy2dkklzwcxmq6qqjc7cnwl8x670g51jr4ihawkx1"; }; phases = "installPhase"; @@ -25,7 +25,7 @@ stdenv.mkDerivation rec { cp -r $src/* $outdir cd $outdir - rm MIT-LICENSE.txt + rm LICENSE.txt rm -rf .git* chmod -R +w templates diff --git a/pkgs/shells/oh/default.nix b/pkgs/shells/oh/default.nix new file mode 100644 index 000000000000..c6d3ad06df46 --- /dev/null +++ b/pkgs/shells/oh/default.nix @@ -0,0 +1,17 @@ +{ stdenv, lib, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }: + +buildGoPackage rec { + name = "oh-${version}"; + version = "20160522-${stdenv.lib.strings.substring 0 7 rev}"; + rev = "0daaf4081475fb9d6b3801c85019bdd57b2ee9b4"; + + goPackagePath = "github.com/michaelmacinnis/oh"; + + src = fetchgit { + inherit rev; + url = "https://github.com/michaelmacinnis/oh"; + sha256 = "0ajidzs0aisbw74nri9ks6sx6644nmwkisc9mvxm3f89zmnlsgwr"; + }; + + goDeps = ./deps.json; +} diff --git a/pkgs/shells/oh/deps.json b/pkgs/shells/oh/deps.json new file mode 100644 index 000000000000..a0e67ed42dcc --- /dev/null +++ b/pkgs/shells/oh/deps.json @@ -0,0 +1,10 @@ +[ + { + "include": "../../libs.json", + "packages": [ + "github.com/michaelmacinnis/adapted", + "github.com/peterh/liner", + "golang.org/x/sys" + ] + } +] diff --git a/pkgs/shells/pash/default.nix b/pkgs/shells/pash/default.nix index b9a8397e3ba1..0b424c897771 100644 --- a/pkgs/shells/pash/default.nix +++ b/pkgs/shells/pash/default.nix @@ -22,4 +22,8 @@ buildDotnetPackage rec { platforms = platforms.all; license = with licenses; [ bsd3 gpl3 ]; }; + + passthru = { + shellPath = "/bin/pash"; + }; } diff --git a/pkgs/shells/rssh/default.nix b/pkgs/shells/rssh/default.nix new file mode 100644 index 000000000000..8aa6c2608fa1 --- /dev/null +++ b/pkgs/shells/rssh/default.nix @@ -0,0 +1,82 @@ +# CAVEATS: +# - Have only tested this with rsync, scp, and sftp. cvs support should work, but chroot integration is unlikely to function without further work +# - It is compiled without rdist support because rdist is ludicrously ancient (and not already in nixpkgs) + +{ stdenv, fetchurl, openssh, rsync, cvs }: + +stdenv.mkDerivation rec { + name = "rssh-${version}"; + version = "2.3.4"; + + src = fetchurl { + url = "mirror://sourceforge/rssh/rssh/${version}/${name}.tar.gz"; + sha256 = "f30c6a760918a0ed39cf9e49a49a76cb309d7ef1c25a66e77a41e2b1d0b40cd9"; + }; + + patches = [ + ./fix-config-path.patch + + # Patches from AUR + (fetchurl { + 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; + 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; + name = "0003-man-page-spelling.patch"; + sha256 = "455b3bbccddf1493999d00c2cd46e62930ef4fd8211e0b7d3a89d8010d6a5431"; + }) + (fetchurl { + 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; + name = "0005-mkchroot-arch.patch"; + sha256 = "ac8894c4087a063ae8267d2fdfcde69c2fe6b67a8ff5917e4518b8f73f08ba3f"; + }) + (fetchurl { + 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; + name = "0007-destdir.patch"; + sha256 = "7fa03644f81dc37d77cc7e2cad994f17f91b2b8a49b1a74e41030a4ac764385e"; + }) + (fetchurl { + url = https://aur.archlinux.org/cgit/aur.git/plain/0008-rsync-protocol.patch?h=rssh; + name = "0008-rsync-protocol.patch"; + sha256 = "0c772afe9088eeded129ead86775ef18e58c318bbc58fc3e2585e7ff09cc5e91"; + }) + ]; + + buildInputs = [ openssh rsync cvs ]; + + configureFlags = [ + "--with-sftp-server=${openssh}/libexec/sftp-server" + "--with-scp=${openssh}/bin/scp" + "--with-rsync=${rsync}/bin/rsync" + "--with-cvs=${cvs}/bin/cvs" + ]; + + + meta = with stdenv.lib; { + description = "A restricted shell for use with OpenSSH, allowing only scp and/or sftp"; + 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/"; + license = licenses.bsd2; + platforms = platforms.unix; + maintainers = with maintainers; [ arobyn ]; + }; +} diff --git a/pkgs/shells/rssh/fix-config-path.patch b/pkgs/shells/rssh/fix-config-path.patch new file mode 100644 index 000000000000..eecffb376ab3 --- /dev/null +++ b/pkgs/shells/rssh/fix-config-path.patch @@ -0,0 +1,12 @@ +diff -Naur rssh-2.3.4/Makefile.in rssh-2.3.4-fixed/Makefile.in +--- rssh-2.3.4/Makefile.in 2012-11-27 11:19:34.000000000 +1100 ++++ rssh-2.3.4-fixed/Makefile.in 2015-11-11 21:13:58.516651742 +1100 +@@ -186,7 +186,7 @@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ + AUTOMAKE_OPTIONS = nostdinc +-ourdefs = -DPATH_RSSH_CONFIG=\"@sysconfdir@/rssh.conf\" -DPATH_CHROOT_HELPER=\"@libexecdir@/rssh_chroot_helper\" ++ourdefs = -DPATH_RSSH_CONFIG=\"/etc/rssh.conf\" -DPATH_CHROOT_HELPER=\"@libexecdir@/rssh_chroot_helper\" + ourflags = @defcflags@ @static@ + AM_CFLAGS = $(ourflags) + nodist_rssh_SOURCES = main.c pathnames.h config.h diff --git a/pkgs/shells/rush/default.nix b/pkgs/shells/rush/default.nix index 3232caf5848b..bbad1f8cdf47 100644 --- a/pkgs/shells/rush/default.nix +++ b/pkgs/shells/rush/default.nix @@ -35,4 +35,8 @@ stdenv.mkDerivation rec { maintainers = [ stdenv.lib.maintainers.bjg ]; platforms = stdenv.lib.platforms.all; }; + + passthru = { + shellPath = "/bin/rush"; + }; } diff --git a/pkgs/shells/tcsh/default.nix b/pkgs/shells/tcsh/default.nix index 5a828be81938..52e6299c60c9 100644 --- a/pkgs/shells/tcsh/default.nix +++ b/pkgs/shells/tcsh/default.nix @@ -32,4 +32,8 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ AndersonTorres ]; platforms = platforms.linux; }; + + passthru = { + shellPath = "/bin/tcsh"; + }; } diff --git a/pkgs/shells/xonsh/default.nix b/pkgs/shells/xonsh/default.nix index 4aa65a7d8bde..92f7f20993f7 100644 --- a/pkgs/shells/xonsh/default.nix +++ b/pkgs/shells/xonsh/default.nix @@ -1,33 +1,48 @@ -{stdenv, fetchFromGitHub, python3Packages}: +{ stdenv, fetchFromGitHub, python3Packages, glibcLocales, coreutils }: python3Packages.buildPythonApplication rec { name = "xonsh-${version}"; - version = "0.1.3"; - - # The logo xonsh prints during build contains unicode characters, and this - # fails because locales have not been set up in the build environment. - # We can fix this on Linux by setting: - # export LOCALE_ARCHIVE=${pkgs.glibcLocales}/lib/locale/locale-archive - # but this would not be a cross platform solution, so it's simpler to just - # patch the setup.py script to not print the logo during build. - prePatch = '' - substituteInPlace setup.py --replace "print(logo)" "" - ''; - - propagatedBuildInputs = [ python3Packages.ply ]; + version = "0.3.4"; src = fetchFromGitHub { owner = "scopatz"; repo = "xonsh"; rev = version; - sha256 = "04qnjqpz5y38g22irpph13j2a4hy7mk9pqvqz1mfimaf8zgmyh1n"; + sha256= "13inkj0vs8nqdghp3j19dardawfsdmcsfzsp77hlwavmw7sqjxzi"; }; + ## The logo xonsh prints during build contains unicode characters, and this + ## fails because locales have not been set up in the build environment. + ## We can fix this on Linux by setting: + ## export LOCALE_ARCHIVE=${pkgs.glibcLocales}/lib/locale/locale-archive + ## but this would not be a cross platform solution, so it's simpler to just + ## patch the setup.py script to not print the logo during build. + #prePatch = '' + # substituteInPlace setup.py --replace "print(logo)" "" + #''; + patchPhase = '' + rm xonsh/winutils.py + sed -i -e "s|/bin/ls|${coreutils}/bin/ls|" tests/test_execer.py + rm tests/test_main.py + rm tests/test_man.py + ''; + + checkPhase = '' + HOME=$TMPDIR nosetests -x + ''; + + buildInputs = with python3Packages; [ glibcLocales nose ]; + propagatedBuildInputs = with python3Packages; [ ply prompt_toolkit ]; + meta = with stdenv.lib; { description = "A Python-ish, BASHwards-compatible shell"; homepage = "http://xonsh.org"; license = licenses.bsd3; - maintainers = [ maintainers.spwhitt ]; + maintainers = with maintainers; [ spwhitt garbas ]; platforms = platforms.all; }; + + passthru = { + shellPath = "/bin/xonsh"; + }; } diff --git a/pkgs/shells/zsh-prezto/default.nix b/pkgs/shells/zsh-prezto/default.nix new file mode 100644 index 000000000000..0a2e784b17d6 --- /dev/null +++ b/pkgs/shells/zsh-prezto/default.nix @@ -0,0 +1,45 @@ +{ stdenv, fetchurl, fetchgit, fetchFromGitHub }: + +let + # https://github.com/spwhitt/nix-zsh-completions/pull/2 + nix-zsh-completions = fetchFromGitHub { + owner = "garbas"; + repo = "nix-zsh-completions"; + rev = "9b7d216ec095ccee541ebfa5f04249aa2964d054"; + sha256 = "1pvmfcqdvdi3nc1jm72f54mwf06yrmlq31pqw6b5fczawcz02jrz"; + }; +in stdenv.mkDerivation rec { + rev = "4f19700919c8ebbaf75755fc0d03716d13183f49"; + name = "zsh-prezto-2015-03-03_rev${builtins.substring 0 7 rev}"; + src = fetchgit { + url = "https://github.com/sorin-ionescu/prezto"; + inherit rev; + sha256 = "17mql9mb7zbf8q1nvnci60yrmz5bl9q964i8dv4shz8b42861cdg"; + fetchSubmodules = true; + }; + patches = [ + (fetchurl { + url = "https://github.com/sorin-ionescu/prezto/pull/1028.patch"; + sha256 = "0n2s7kfp9ljrq8lw5iibv0vyv66awrkzkqbyvy7hlcl06d8aykjv"; + }) + ]; + buildPhase = '' + sed -i -e "s|\''${ZDOTDIR:\-\$HOME}/.zpreztorc|/etc/zpreztorc|g" 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 + sed -i -e "s|\''${0:h}/cache.zsh|\''${ZDOTDIR:\-\$HOME}/.zfasd_cache|g" modules/fasd/init.zsh + ''; + installPhase = '' + mkdir -p $out/modules/nix + cp ${nix-zsh-completions}/* $out/modules/nix -R + 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; [ garbas ]; + }; +} diff --git a/pkgs/shells/zsh/default.nix b/pkgs/shells/zsh/default.nix index fda3e77c61f4..261dbf12f8e5 100644 --- a/pkgs/shells/zsh/default.nix +++ b/pkgs/shells/zsh/default.nix @@ -80,4 +80,8 @@ EOF maintainers = with stdenv.lib.maintainers; [ chaoflow pSub ]; platforms = stdenv.lib.platforms.unix; }; + + passthru = { + shellPath = "/bin/zsh"; + }; } |