bash: remove bashbug for non-interactive, refactor
This commit is contained in:
parent
daa543a455
commit
6d6f8282f4
@ -9,6 +9,8 @@ let
|
|||||||
shortName = "bash43";
|
shortName = "bash43";
|
||||||
baseConfigureFlags = if interactive then "--with-installed-readline" else "--disable-readline";
|
baseConfigureFlags = if interactive then "--with-installed-readline" else "--disable-readline";
|
||||||
sha256 = "1m14s1f61mf6bijfibcjm9y6pkyvz6gibyl8p4hxq90fisi8gimg";
|
sha256 = "1m14s1f61mf6bijfibcjm9y6pkyvz6gibyl8p4hxq90fisi8gimg";
|
||||||
|
|
||||||
|
inherit (stdenv.lib) optional optionalString;
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@ -41,17 +43,17 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
import ./bash-4.3-patches.nix patch)
|
import ./bash-4.3-patches.nix patch)
|
||||||
++ stdenv.lib.optional stdenv.isCygwin ./cygwin-bash-4.3.33-1.src.patch;
|
++ optional stdenv.isCygwin ./cygwin-bash-4.3.33-1.src.patch;
|
||||||
|
|
||||||
crossAttrs = {
|
crossAttrs = {
|
||||||
configureFlags = baseConfigureFlags +
|
configureFlags = baseConfigureFlags +
|
||||||
" bash_cv_job_control_missing=nomissing bash_cv_sys_named_pipes=nomissing" +
|
" bash_cv_job_control_missing=nomissing bash_cv_sys_named_pipes=nomissing" +
|
||||||
stdenv.lib.optionalString stdenv.isCygwin ''
|
optionalString stdenv.isCygwin ''
|
||||||
--without-libintl-prefix --without-libiconv-prefix
|
--without-libintl-prefix --without-libiconv-prefix
|
||||||
--with-installed-readline
|
--with-installed-readline
|
||||||
bash_cv_dev_stdin=present
|
bash_cv_dev_stdin=present
|
||||||
bash_cv_dev_fd=standard
|
bash_cv_dev_fd=standard
|
||||||
bash_cv_termcap_lib=libncurses
|
bash_cv_termcap_lib=libncurses
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -59,24 +61,29 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
# Note: Bison is needed because the patches above modify parse.y.
|
# Note: Bison is needed because the patches above modify parse.y.
|
||||||
nativeBuildInputs = [bison]
|
nativeBuildInputs = [bison]
|
||||||
++ stdenv.lib.optional (texinfo != null) texinfo
|
++ optional (texinfo != null) texinfo
|
||||||
++ stdenv.lib.optional interactive readline
|
++ optional interactive readline
|
||||||
++ stdenv.lib.optional stdenv.isDarwin binutils;
|
++ optional stdenv.isDarwin binutils;
|
||||||
|
|
||||||
# Bash randomly fails to build because of a recursive invocation to
|
# Bash randomly fails to build because of a recursive invocation to
|
||||||
# build `version.h'.
|
# build `version.h'.
|
||||||
enableParallelBuilding = false;
|
enableParallelBuilding = false;
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
# Add an `sh' -> `bash' symlink.
|
|
||||||
ln -s bash "$out/bin/sh"
|
ln -s bash "$out/bin/sh"
|
||||||
''
|
'';
|
||||||
|
|
||||||
|
postFixup = if interactive
|
||||||
|
then ''
|
||||||
|
substituteInPlace "$out/bin/bashbug" \
|
||||||
|
--replace '${stdenv.shell}' "$out/bin/bash"
|
||||||
|
''
|
||||||
# most space is taken by locale data
|
# most space is taken by locale data
|
||||||
+ stdenv.lib.optionalString (!interactive) ''
|
else ''
|
||||||
rm -r "$out/share"
|
rm -r "$out/share" "$out/bin/bashbug"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
homepage = http://www.gnu.org/software/bash/;
|
homepage = http://www.gnu.org/software/bash/;
|
||||||
description =
|
description =
|
||||||
"GNU Bourne-Again Shell, the de facto standard shell on Linux" +
|
"GNU Bourne-Again Shell, the de facto standard shell on Linux" +
|
||||||
@ -93,11 +100,11 @@ stdenv.mkDerivation rec {
|
|||||||
Bash without modification.
|
Bash without modification.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
license = stdenv.lib.licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
|
|
||||||
platforms = stdenv.lib.platforms.all;
|
platforms = platforms.all;
|
||||||
|
|
||||||
maintainers = [ stdenv.lib.maintainers.simons ];
|
maintainers = [ maintainers.simons ];
|
||||||
};
|
};
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user