Added bash 4.0 (and readline 6.0, which is required by bash).

svn path=/nixpkgs/trunk/; revision=14573
This commit is contained in:
Peter Simons 2009-03-17 14:03:03 +00:00
parent 3a59128510
commit ae474690ea
3 changed files with 69 additions and 3 deletions

View File

@ -0,0 +1,12 @@
args: with args;
stdenv.mkDerivation {
name = "readline-6.0";
src = fetchurl {
url = mirror://gnu/readline/readline-6.0.tar.gz;
sha256 = "1pn13j6f9376kwki69050x3zh62yb1w31l37rws5nwr5q02xk68i";
};
propagatedBuildInputs = [ncurses];
configureFlags = "--enable-shared --disable-static";
patches = stdenv.lib.optional stdenv.isDarwin ./shobj-darwin.patch;
}

44
pkgs/shells/bash/4.0.nix Normal file
View File

@ -0,0 +1,44 @@
{stdenv, fetchurl, bison, interactive ? false, ncurses ? null, texinfo ? null, readline ? null}:
assert interactive -> ncurses != null;
assert interactive -> readline != null;
stdenv.mkDerivation {
name = "bash-4.0";
src = fetchurl {
url = mirror://gnu/bash/bash-4.0.tar.gz;
sha256 = "9793d394f640a95030c77d5ac989724afe196921956db741bcaf141801c50518";
};
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
];
configureFlags = if interactive then "--enable-readline --with-installed-readline" else "";
# !!! 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 readline
++ 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 "");
};
}

View File

@ -1381,6 +1381,12 @@ let
interactive = true;
});
bash4 = appendToName "interactive" (import ../shells/bash/4.0.nix {
inherit fetchurl stdenv ncurses texinfo bison;
readline = readline6;
interactive = true;
});
tcsh = import ../shells/tcsh {
inherit fetchurl stdenv ncurses;
};
@ -2782,7 +2788,7 @@ let
inherit (gtkLibs) glib;
inherit (xlibs) libX11;
};
coredumper = import ../development/libraries/coredumper {
inherit fetchurl stdenv;
};
@ -3781,6 +3787,10 @@ let
inherit fetchurl stdenv ncurses;
};
readline6 = import ../development/libraries/readline/6.0.nix {
inherit fetchurl stdenv ncurses;
};
# Also known as librdf, includes raptor and rasqal
redland = import ../development/libraries/redland {
inherit fetchurl stdenv openssl libxml2 pkgconfig perl postgresql sqlite
@ -5700,7 +5710,7 @@ let
};
propagatedBuildInputs = [
perlTestDeep perlTestException perlTestWarn
];
];
};
perlSQLAbstractLimit = buildPerlPackage rec {
@ -9291,7 +9301,7 @@ let
kdelibs = kde3.kdelibs;
kdebase = kde3.kdebase;
### SCIENCE/GEOMETRY
drgeo = builderDefsPackage (import ../applications/science/geometry/drgeo) {