diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2006-10-18 16:16:07 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2006-10-18 16:16:07 +0000 |
commit | ce22859f8aa3b06dc8277376916c619a34030310 (patch) | |
tree | 70db57959bf759bede29a0e22e1341fd573f2dab /pkgs/shells | |
parent | f3619824a9fe8bc6650ded1827846b76865c86a8 (diff) | |
download | nixpkgs-ce22859f8aa3b06dc8277376916c619a34030310.tar nixpkgs-ce22859f8aa3b06dc8277376916c619a34030310.tar.gz nixpkgs-ce22859f8aa3b06dc8277376916c619a34030310.tar.bz2 nixpkgs-ce22859f8aa3b06dc8277376916c619a34030310.tar.lz nixpkgs-ce22859f8aa3b06dc8277376916c619a34030310.tar.xz nixpkgs-ce22859f8aa3b06dc8277376916c619a34030310.tar.zst nixpkgs-ce22859f8aa3b06dc8277376916c619a34030310.zip |
* Bash on dietlibc.
* Pass -D_BSD_SOURCE=1 by default in the dietlibc stdenv. svn path=/nixpkgs/trunk/; revision=6768
Diffstat (limited to 'pkgs/shells')
-rw-r--r-- | pkgs/shells/bash-static/builder.sh | 12 | ||||
-rw-r--r-- | pkgs/shells/bash-static/default.nix | 13 | ||||
-rw-r--r-- | pkgs/shells/bash/default.nix | 10 | ||||
-rw-r--r-- | pkgs/shells/bash/winsize.patch | 14 |
4 files changed, 23 insertions, 26 deletions
diff --git a/pkgs/shells/bash-static/builder.sh b/pkgs/shells/bash-static/builder.sh deleted file mode 100644 index b8c3a401022..00000000000 --- a/pkgs/shells/bash-static/builder.sh +++ /dev/null @@ -1,12 +0,0 @@ -source $stdenv/setup -genericBuild -cd $out/bin - -find . -type f | while read fn; do - cat $fn | sed "s|/nix/store/[a-z0-9]*-|/nix/store/ffffffffffffffffffffffffffffffff-|g" > $fn.tmp - if test -x $fn; then chmod +x $fn.tmp; fi - mv $fn.tmp $fn -done - -strip $out/bin/bash -ln -s bash sh diff --git a/pkgs/shells/bash-static/default.nix b/pkgs/shells/bash-static/default.nix deleted file mode 100644 index d276468ca3a..00000000000 --- a/pkgs/shells/bash-static/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{stdenv, fetchurl}: - -stdenv.mkDerivation { - name = "bash-3.1"; - builder = ./builder.sh; - src = fetchurl { - #url = http://nix.cs.uu.nl/dist/tarballs/bash-3.0.tar.gz; - #md5 = "26c4d642e29b3533d8d754995bc277b3"; - url = http://nix.cs.uu.nl/dist/tarballs/bash-3.1.tar.gz; - md5 = "ef5304c4b22aaa5088972c792ed45d72"; - }; - configureFlags = "--enable-static-link --without-bash-malloc"; -} diff --git a/pkgs/shells/bash/default.nix b/pkgs/shells/bash/default.nix index 82f204bd52c..a8dd2e3dd63 100644 --- a/pkgs/shells/bash/default.nix +++ b/pkgs/shells/bash/default.nix @@ -1,6 +1,6 @@ {stdenv, fetchurl}: -stdenv.mkDerivation { +stdenv.mkDerivation ({ name = "bash-3.1"; builder = ./builder.sh; src = fetchurl { @@ -12,3 +12,11 @@ stdenv.mkDerivation { description = "GNU Bourne-Again Shell, the de facto standard shell on Linux"; }; } + +# libcompat.a is needed on dietlibc for stpcpy(). +// (if stdenv ? isDietLibC then { + NIX_LDFLAGS = "-lcompat"; + patches = [./winsize.patch]; +} else {}) + +) diff --git a/pkgs/shells/bash/winsize.patch b/pkgs/shells/bash/winsize.patch new file mode 100644 index 00000000000..bbe4151e0cc --- /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 */ |