summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Simons <simons@cryp.to>2011-09-28 14:37:03 +0000
committerPeter Simons <simons@cryp.to>2011-09-28 14:37:03 +0000
commitdc55be9e050eea7c8ebd59acb7fd8963d7a31f56 (patch)
tree8c257220d84244d3e0bab9b8f83e3ce15c02640b
parent790d78fb6f7f68541135f7f95c815189db499162 (diff)
downloadnixlib-dc55be9e050eea7c8ebd59acb7fd8963d7a31f56.tar
nixlib-dc55be9e050eea7c8ebd59acb7fd8963d7a31f56.tar.gz
nixlib-dc55be9e050eea7c8ebd59acb7fd8963d7a31f56.tar.bz2
nixlib-dc55be9e050eea7c8ebd59acb7fd8963d7a31f56.tar.lz
nixlib-dc55be9e050eea7c8ebd59acb7fd8963d7a31f56.tar.xz
nixlib-dc55be9e050eea7c8ebd59acb7fd8963d7a31f56.tar.zst
nixlib-dc55be9e050eea7c8ebd59acb7fd8963d7a31f56.zip
pkgs/shells/bash: updated "interactive" bash to version 4.2
The non-interactive variant, which is part of stdenv, remains unchanged.

svn path=/nixpkgs/trunk/; revision=29523
-rw-r--r--pkgs/shells/bash/4.1.nix (renamed from pkgs/shells/bash/default.nix)2
-rw-r--r--pkgs/shells/bash/4.2.nix81
-rw-r--r--pkgs/shells/bash/bash-4.1-patches.nix (renamed from pkgs/shells/bash/bash-patches.nix)0
-rw-r--r--pkgs/shells/bash/bash-4.2-patches.nix14
-rwxr-xr-xpkgs/shells/bash/update-patch-set.sh2
-rw-r--r--pkgs/top-level/all-packages.nix4
6 files changed, 99 insertions, 4 deletions
diff --git a/pkgs/shells/bash/default.nix b/pkgs/shells/bash/4.1.nix
index 3a0515199b6e..02fb29c5daba 100644
--- a/pkgs/shells/bash/default.nix
+++ b/pkgs/shells/bash/4.1.nix
@@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
           inherit sha256;
         };
     in
-      import ./bash-patches.nix patch;
+      import ./bash-4.1-patches.nix patch;
 
   crossAttrs = {
     configureFlags = baseConfigureFlags +
diff --git a/pkgs/shells/bash/4.2.nix b/pkgs/shells/bash/4.2.nix
new file mode 100644
index 000000000000..98fe43b0122a
--- /dev/null
+++ b/pkgs/shells/bash/4.2.nix
@@ -0,0 +1,81 @@
+{ stdenv, fetchurl, readline ? null, interactive ? false, texinfo ? null, bison }:
+
+assert interactive -> readline != null;
+
+let
+  realName = "bash-4.2";
+  baseConfigureFlags = if interactive then "--with-installed-readline" else "--disable-readline";
+in
+
+stdenv.mkDerivation rec {
+  name = "${realName}-p${toString (builtins.length patches)}";
+
+  src = fetchurl {
+    url = "mirror://gnu/bash/${realName}.tar.gz";
+    sha256 = "a27a1179ec9c0830c65c6aa5d7dab60f7ce1a2a608618570f96bfa72e95ab3d8";
+  };
+
+  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
+  '';
+
+  patchFlags = "-p0";
+
+  patches =
+    let
+      patch = nr: sha256:
+        fetchurl {
+          url = "mirror://gnu/bash/bash-4.2-patches/bash42-${nr}";
+          inherit sha256;
+        };
+    in
+      import ./bash-4.2-patches.nix patch;
+
+  crossAttrs = {
+    configureFlags = baseConfigureFlags +
+      " bash_cv_job_control_missing=nomissing bash_cv_sys_named_pipes=nomissing";
+  };
+
+  configureFlags = baseConfigureFlags;
+
+  # Note: Bison is needed because the patches above modify parse.y.
+  buildNativeInputs = [bison]
+    ++ stdenv.lib.optional (texinfo != null) texinfo
+    ++ stdenv.lib.optional interactive readline;
+
+  postInstall = ''
+    # Add an `sh' -> `bash' symlink.
+    ln -s bash "$out/bin/sh"
+  '';
+
+  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+";
+
+    maintainers = [ stdenv.lib.maintainers.ludo stdenv.lib.maintainers.simons ];
+  };
+
+  passthru = {
+    shellPath = "/bin/bash";
+  };
+}
diff --git a/pkgs/shells/bash/bash-patches.nix b/pkgs/shells/bash/bash-4.1-patches.nix
index d22435744ccc..d22435744ccc 100644
--- a/pkgs/shells/bash/bash-patches.nix
+++ b/pkgs/shells/bash/bash-4.1-patches.nix
diff --git a/pkgs/shells/bash/bash-4.2-patches.nix b/pkgs/shells/bash/bash-4.2-patches.nix
new file mode 100644
index 000000000000..7f4957c500c3
--- /dev/null
+++ b/pkgs/shells/bash/bash-4.2-patches.nix
@@ -0,0 +1,14 @@
+# Automatically generated by `update-patch-set.sh'; do not edit.
+
+patch: [
+(patch "001" "0yml2b6yarrr0dzv7h45lz4126i228hvqbqacqzg4jkcawla0v4d")
+(patch "002" "1yffzfxryvqns513yv3r46slkysa3nbqv40442xfxb4rw4kwkfpy")
+(patch "003" "1kdl9hcpf1m7gz0ja3mvin3syprl2kmbxc3wm27391wc04apq2js")
+(patch "004" "1ha0453cjqdgkns2xkdgpd2izj5b6xlsc9a2w5b3sn6j63wb0d2f")
+(patch "005" "182r2iyk27l28b8kyppfavvzxhax6vn5n1zyy3yirf0463klj5x8")
+(patch "006" "1labcciavnfmn0alncz1x92ydrsriikcimw24rwzmnidbaa4h4f9")
+(patch "007" "15byzdqvavc3zg2lbzzdwpdy43kzdnvmr89nya211pa3yjn2cn20")
+(patch "008" "0dr4p83m2xpxhvd61yny0gdlasq6r9mpyiz220998y0alq8hs213")
+(patch "009" "086b9jkyjgf2zhwln72d7s5x759iskgg3r4hdrw6b5y1ni059vg7")
+(patch "010" "1p23m9kssdmpnjfp96bjmmshzf25cdzlyjygdw8j6sayqa159z5c")
+]
diff --git a/pkgs/shells/bash/update-patch-set.sh b/pkgs/shells/bash/update-patch-set.sh
index ded684571b0a..003c7a26d201 100755
--- a/pkgs/shells/bash/update-patch-set.sh
+++ b/pkgs/shells/bash/update-patch-set.sh
@@ -16,7 +16,7 @@ VERSION="$2"
 VERSION_CONDENSED="$(echo $VERSION | sed -es/\\.//g)"
 
 GPG="$(if $(type -P gpg2 > /dev/null); then echo gpg2; else echo gpg; fi)"
-PATCH_LIST="$PROJECT-patches.nix"
+PATCH_LIST="$PROJECT-$VERSION-patches.nix"
 
 set -e
 
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index f544c06b5450..e9a15a343017 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -1596,11 +1596,11 @@ let
   ### SHELLS
 
 
-  bash = lowPrio (callPackage ../shells/bash {
+  bash = lowPrio (callPackage ../shells/bash/4.1.nix {
     texinfo = null;
   });
 
-  bashInteractive = appendToName "interactive" (callPackage ../shells/bash {
+  bashInteractive = appendToName "interactive" (callPackage ../shells/bash/4.2.nix {
     interactive = true;
   });