* Bash on dietlibc.
* Pass -D_BSD_SOURCE=1 by default in the dietlibc stdenv. svn path=/nixpkgs/trunk/; revision=6768
This commit is contained in:
parent
f3619824a9
commit
ce22859f8a
@ -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
|
|
@ -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";
|
|
||||||
}
|
|
@ -1,6 +1,6 @@
|
|||||||
{stdenv, fetchurl}:
|
{stdenv, fetchurl}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation ({
|
||||||
name = "bash-3.1";
|
name = "bash-3.1";
|
||||||
builder = ./builder.sh;
|
builder = ./builder.sh;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
@ -12,3 +12,11 @@ stdenv.mkDerivation {
|
|||||||
description = "GNU Bourne-Again Shell, the de facto standard shell on Linux";
|
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 {})
|
||||||
|
|
||||||
|
)
|
||||||
|
14
pkgs/shells/bash/winsize.patch
Normal file
14
pkgs/shells/bash/winsize.patch
Normal file
@ -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 */
|
@ -7,6 +7,5 @@ stdenv.mkDerivation ({
|
|||||||
md5 = "bdec4b75c76ac9bf51b6dd1747d3b06e";
|
md5 = "bdec4b75c76ac9bf51b6dd1747d3b06e";
|
||||||
};
|
};
|
||||||
} // (if stdenv ? isDietLibC then {
|
} // (if stdenv ? isDietLibC then {
|
||||||
NIX_CFLAGS_COMPILE="-D_BSD_SOURCE=1";
|
|
||||||
patches = [./uclibc.patch];
|
patches = [./uclibc.patch];
|
||||||
} else {}))
|
} else {}))
|
||||||
|
@ -84,7 +84,7 @@ rec {
|
|||||||
# always optimise for size.
|
# always optimise for size.
|
||||||
NIX_CFLAGS_COMPILE =
|
NIX_CFLAGS_COMPILE =
|
||||||
(if args ? NIX_CFLAGS_COMPILE then args.NIX_CFLAGS_COMPILE else "")
|
(if args ? NIX_CFLAGS_COMPILE then args.NIX_CFLAGS_COMPILE else "")
|
||||||
+ " -Os -s";
|
+ " -Os -s -D_BSD_SOURCE=1";
|
||||||
|
|
||||||
configureFlags =
|
configureFlags =
|
||||||
(if args ? configureFlags then args.configureFlags else "")
|
(if args ? configureFlags then args.configureFlags else "")
|
||||||
@ -510,8 +510,9 @@ rec {
|
|||||||
inherit fetchurl stdenv;
|
inherit fetchurl stdenv;
|
||||||
});
|
});
|
||||||
|
|
||||||
bashStatic = import ../shells/bash-static {
|
bashDiet = import ../shells/bash {
|
||||||
inherit fetchurl stdenv;
|
inherit fetchurl;
|
||||||
|
stdenv = useDietLibC stdenv;
|
||||||
};
|
};
|
||||||
|
|
||||||
tcsh = import ../shells/tcsh {
|
tcsh = import ../shells/tcsh {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user