* Yes! Finally! Bash built with ncurses support! This fixes the annoying problem with lines longer than 80 (?) characters.

svn path=/nixpkgs/trunk/; revision=8248

+96
+47
pkgs/shells/bash-interactive/bash32-001.patch
··· 1 + BASH PATCH REPORT 2 + ================= 3 + 4 + Bash-Release: 3.2 5 + Patch-ID: bash32-001 6 + 7 + Bug-Reported-by: Greg Schafer <gschafer@zip.com.au> 8 + Bug-Reference-ID: <20061012084940.GA15768@tigers.local> 9 + Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2006-10/msg00046.html 10 + 11 + Bug-Description: 12 + 13 + When using historical ``-style command substitution, bash incorrectly attempts 14 + to interpret shell comments while scanning for the closing backquote. 15 + 16 + Patch: 17 + 18 + *** bash-3.2/parse.y Tue Sep 19 16:37:21 2006 19 + --- new-bash/parse.y Thu Oct 12 10:30:57 2006 20 + *************** 21 + *** 2736,2740 **** 22 + count = 1; 23 + pass_next_character = backq_backslash = was_dollar = in_comment = 0; 24 + ! check_comment = (flags & P_COMMAND) && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0; 25 + 26 + /* RFLAGS is the set of flags we want to pass to recursive calls. */ 27 + --- 2736,2740 ---- 28 + count = 1; 29 + pass_next_character = backq_backslash = was_dollar = in_comment = 0; 30 + ! check_comment = (flags & P_COMMAND) && qc != '`' && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0; 31 + 32 + /* RFLAGS is the set of flags we want to pass to recursive calls. */ 33 + *** bash-3.2/patchlevel.h Thu Apr 13 08:31:04 2006 34 + --- new-bash/patchlevel.h Mon Oct 16 14:22:54 2006 35 + *************** 36 + *** 26,30 **** 37 + looks for to find the patch level (for the sccs version string). */ 38 + 39 + ! #define PATCHLEVEL 0 40 + 41 + #endif /* _PATCHLEVEL_H_ */ 42 + --- 26,30 ---- 43 + looks for to find the patch level (for the sccs version string). */ 44 + 45 + ! #define PATCHLEVEL 1 46 + 47 + #endif /* _PATCHLEVEL_H_ */
+29
pkgs/shells/bash-interactive/default.nix
··· 1 + {stdenv, fetchurl, bison, interactive ? false, ncurses ? null}: 2 + 3 + assert interactive -> ncurses != null; 4 + 5 + stdenv.mkDerivation { 6 + name = "bash-3.2"; 7 + 8 + src = fetchurl { 9 + url = ftp://ftp.nluug.nl/pub/gnu/bash/bash-3.2.tar.gz; 10 + md5 = "00bfa16d58e034e3c2aa27f390390d30"; 11 + }; 12 + 13 + postInstall = "ln -s bash $out/bin/sh"; 14 + 15 + patches = [ 16 + # Fix a nasty bug in bash-3.2. 17 + ./bash32-001.patch 18 + 19 + # For dietlibc builds. 20 + ./winsize.patch 21 + ]; 22 + 23 + # !!! only needed for bash-3.2 (because of bash32-001.patch) 24 + buildInputs = [bison] ++ (if interactive then [ncurses] else []); 25 + 26 + meta = { 27 + description = "GNU Bourne-Again Shell, the de facto standard shell on Linux"; 28 + }; 29 + }
+14
pkgs/shells/bash-interactive/winsize.patch
··· 1 + diff -rc bash-3.1-orig/lib/sh/winsize.c bash-3.1/lib/sh/winsize.c 2 + *** bash-3.1-orig/lib/sh/winsize.c 2006-10-18 18:08:25.000000000 +0200 3 + --- bash-3.1/lib/sh/winsize.c 2006-10-18 18:10:00.000000000 +0200 4 + *************** 5 + *** 30,35 **** 6 + --- 30,37 ---- 7 + 8 + #include <sys/ioctl.h> 9 + 10 + + #include <termios.h> 11 + + 12 + #if !defined (STRUCT_WINSIZE_IN_SYS_IOCTL) 13 + /* For struct winsize on SCO */ 14 + /* sys/ptem.h has winsize but needs mblk_t from sys/stream.h */
+6
pkgs/top-level/all-packages.nix
··· 567 567 bison = bison23; 568 568 }); 569 569 570 + bashInteractive = import ../shells/bash-interactive { 571 + inherit fetchurl stdenv ncurses; 572 + bison = bison23; 573 + interactive = true; 574 + }; 575 + 570 576 tcsh = import ../shells/tcsh { 571 577 inherit fetchurl stdenv ncurses; 572 578 };