2008-07-16 13:36:41 +00:00
|
|
|
{stdenv, fetchurl, bison, interactive ? false, ncurses ? null, texinfo ? null}:
|
2007-03-06 22:46:03 +00:00
|
|
|
|
|
|
|
assert interactive -> ncurses != null;
|
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2009-01-27 11:03:41 +00:00
|
|
|
name = "bash-3.2.48";
|
2007-03-06 22:46:03 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2009-01-27 11:03:41 +00:00
|
|
|
url = mirror://gnu/bash/bash-3.2.48.tar.gz;
|
|
|
|
sha256 = "1i81scw3mnfjbmsn3cjfdancyx3d0rg8gd9hpdfng9j83dbdrs98";
|
2007-03-06 22:46:03 +00:00
|
|
|
};
|
|
|
|
|
2009-01-27 11:03:41 +00:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2007-03-06 22:46:03 +00:00
|
|
|
postInstall = "ln -s bash $out/bin/sh";
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
# For dietlibc builds.
|
|
|
|
./winsize.patch
|
|
|
|
];
|
|
|
|
|
2008-07-16 13:36:41 +00:00
|
|
|
# !!! 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 ncurses;
|
2007-03-06 22:46:03 +00:00
|
|
|
|
|
|
|
meta = {
|
2008-02-06 13:18:50 +00:00
|
|
|
homepage = http://www.gnu.org/software/bash/;
|
2007-04-04 10:31:09 +00:00
|
|
|
description =
|
|
|
|
"GNU Bourne-Again Shell, the de facto standard shell on Linux" +
|
|
|
|
(if interactive then " (for interactive use)" else "");
|
2007-03-06 22:46:03 +00:00
|
|
|
};
|
|
|
|
}
|