about summary refs log tree commit diff
path: root/pkgs/shells/bash
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2007-05-24 15:44:03 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2007-05-24 15:44:03 +0000
commitd384ef5673815a12f95086dff48d82b630dd7013 (patch)
tree627fd5196b8225948bd572c70f29008192da591a /pkgs/shells/bash
parent5021babc2074ee7f09e0bb052a1b052a3a0068d3 (diff)
downloadnixlib-d384ef5673815a12f95086dff48d82b630dd7013.tar
nixlib-d384ef5673815a12f95086dff48d82b630dd7013.tar.gz
nixlib-d384ef5673815a12f95086dff48d82b630dd7013.tar.bz2
nixlib-d384ef5673815a12f95086dff48d82b630dd7013.tar.lz
nixlib-d384ef5673815a12f95086dff48d82b630dd7013.tar.xz
nixlib-d384ef5673815a12f95086dff48d82b630dd7013.tar.zst
nixlib-d384ef5673815a12f95086dff48d82b630dd7013.zip
* Replace bash with bash-interactive.
svn path=/nixpkgs/trunk/; revision=8761
Diffstat (limited to 'pkgs/shells/bash')
-rw-r--r--pkgs/shells/bash/default.nix28
-rw-r--r--pkgs/shells/bash/winsize.patch14
2 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/shells/bash/default.nix b/pkgs/shells/bash/default.nix
new file mode 100644
index 000000000000..1877080049b3
--- /dev/null
+++ b/pkgs/shells/bash/default.nix
@@ -0,0 +1,28 @@
+{stdenv, fetchurl, bison, interactive ? false, ncurses ? null}:
+
+assert interactive -> ncurses != null;
+
+stdenv.mkDerivation {
+  name = "bash-3.2-p17";
+
+  src = fetchurl {
+    url = http://losser.st-lab.cs.uu.nl/~eelco/dist/bash-3.2-p17.tar.bz2;
+    sha256 = "153gg2z2s3ar7vni3345nnmdisha4b8cxzsj79d8ap6m6i4c35f5";
+  };
+
+  postInstall = "ln -s bash $out/bin/sh";
+
+  patches = [
+    # For dietlibc builds.
+    ./winsize.patch
+  ];
+
+  # !!! only needed for bash-3.2 (because of bash32-001.patch)
+  buildInputs = [bison] ++ stdenv.lib.optional interactive ncurses;
+
+  meta = {
+    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/winsize.patch b/pkgs/shells/bash/winsize.patch
new file mode 100644
index 000000000000..bbe4151e0cc7
--- /dev/null
+++ b/pkgs/shells/bash/winsize.patch
@@ -0,0 +1,14 @@
+diff -rc bash-3.1-orig/lib/sh/winsize.c bash-3.1/lib/sh/winsize.c
+*** bash-3.1-orig/lib/sh/winsize.c	2006-10-18 18:08:25.000000000 +0200
+--- bash-3.1/lib/sh/winsize.c	2006-10-18 18:10:00.000000000 +0200
+***************
+*** 30,35 ****
+--- 30,37 ----
+  
+  #include <sys/ioctl.h>
+  
++ #include <termios.h>
++ 
+  #if !defined (STRUCT_WINSIZE_IN_SYS_IOCTL)
+  /* For struct winsize on SCO */
+  /*   sys/ptem.h has winsize but needs mblk_t from sys/stream.h */