summary refs log tree commit diff
path: root/pkgs/shells
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/shells')
-rw-r--r--pkgs/shells/bash/default.nix39
-rw-r--r--pkgs/shells/bash/new.nix40
2 files changed, 31 insertions, 48 deletions
diff --git a/pkgs/shells/bash/default.nix b/pkgs/shells/bash/default.nix
index 07d4de24da6f..2d0978abdcab 100644
--- a/pkgs/shells/bash/default.nix
+++ b/pkgs/shells/bash/default.nix
@@ -1,15 +1,24 @@
-{stdenv, fetchurl, bison, interactive ? false, ncurses ? null, texinfo ? null}:
+{stdenv, fetchurl, readline, interactive ? false, ncurses ? null, texinfo ? null}:
 
 assert interactive -> ncurses != null;
 
-stdenv.mkDerivation {
-  name = "bash-3.2-p39";
+stdenv.mkDerivation rec {
+  name = "bash-4.0";
 
   src = fetchurl {
-    url = http://nixos.org/tarballs/bash-3.2-p39.tar.bz2;
-    sha256 = "075qs6nfjql57y8ffg3f4glb3l5yl3xy5hny75x6kpwxkqlcxqfy";
+    url = "mirror://gnu/bash/${name}.tar.gz";
+    sha256 = "0605ql0ih55gpi0vfvcm45likzjafa4wjnkxqwq51aa0ysad74wp";
   };
 
+  NIX_CFLAGS_COMPILE = ''
+    -DSYS_BASHRC="/etc/bashrc"
+    -DSYS_BASH_LOGOUT="/etc/bash_logout"
+    -DDEFAULT_PATH_VALUE="/no-such-path"
+    -DSTANDARD_UTILS_PATH="/no-such-path"
+    -DNON_INTERACTIVE_LOGIN_SHELLS
+    -DSSH_SOURCE_BASHRC
+  '';
+
   postInstall = "ln -s bash $out/bin/sh";
 
   patches = [
@@ -17,15 +26,29 @@ stdenv.mkDerivation {
     ./winsize.patch
   ];
 
-  # !!! Bison is only needed for bash-3.2 (because of bash32-001.patch)
-  buildInputs = [bison]
+  buildInputs = []
     ++ stdenv.lib.optional (texinfo != null) texinfo
-    ++ stdenv.lib.optional interactive ncurses;
+    ++ stdenv.lib.optional interactive readline;
+
+  configureFlags = "--with-installed-readline";
 
   meta = {
     homepage = http://www.gnu.org/software/bash/;
     description =
       "GNU Bourne-Again Shell, the de facto standard shell on Linux" +
         (if interactive then " (for interactive use)" else "");
+
+    longDescription = ''
+      Bash is the shell, or command language interpreter, that will
+      appear in the GNU operating system.  Bash is an sh-compatible
+      shell that incorporates useful features from the Korn shell
+      (ksh) and C shell (csh).  It is intended to conform to the IEEE
+      POSIX P1003.2/ISO 9945.2 Shell and Tools standard.  It offers
+      functional improvements over sh for both programming and
+      interactive use.  In addition, most sh scripts can be run by
+      Bash without modification.
+    '';
+
+    license = "GPLv3+";
   };
 }
diff --git a/pkgs/shells/bash/new.nix b/pkgs/shells/bash/new.nix
deleted file mode 100644
index beaf2f845e75..000000000000
--- a/pkgs/shells/bash/new.nix
+++ /dev/null
@@ -1,40 +0,0 @@
-{stdenv, fetchurl, bison, interactive ? false, ncurses ? null, texinfo ? null}:
-
-assert interactive -> ncurses != null;
-
-stdenv.mkDerivation {
-  name = "bash-3.2-p39";
-
-  src = fetchurl {
-    url = http://nixos.org/tarballs/bash-3.2-p39.tar.bz2;
-    sha256 = "075qs6nfjql57y8ffg3f4glb3l5yl3xy5hny75x6kpwxkqlcxqfy";
-  };
-
-  NIX_CFLAGS_COMPILE = ''
-    -DSYS_BASHRC="/etc/bashrc"
-    -DSYS_BASH_LOGOUT="/etc/bash_logout"
-    -DDEFAULT_PATH_VALUE="/no-such-path"
-    -DSTANDARD_UTILS_PATH="/no-such-path"
-    -DNON_INTERACTIVE_LOGIN_SHELLS
-    -DSSH_SOURCE_BASHRC
-  '';
-
-  postInstall = "ln -s bash $out/bin/sh";
-
-  patches = [
-    # For dietlibc builds.
-    ./winsize.patch
-  ];
-
-  # !!! Bison is only needed for bash-3.2 (because of bash32-001.patch)
-  buildInputs = [bison]
-    ++ stdenv.lib.optional (texinfo != null) texinfo
-    ++ stdenv.lib.optional interactive ncurses;
-
-  meta = {
-    homepage = http://www.gnu.org/software/bash/;
-    description =
-      "GNU Bourne-Again Shell, the de facto standard shell on Linux" +
-        (if interactive then " (for interactive use)" else "");
-  };
-}