bash: bring back 4.3 for the non-interactive version

... until someone looks better at the outputs. The size has grown in 4.4,
and it seems like installing binary plugins, headers, etc.
This commit is contained in:
Vladimír Čunát 2016-09-17 10:30:48 +02:00
parent 06839f5a40
commit 40a6918af3
4 changed files with 170 additions and 2 deletions

118
pkgs/shells/bash/4.3.nix Normal file
View File

@ -0,0 +1,118 @@
{ stdenv, fetchurl, readline ? null, interactive ? false, texinfo ? null, binutils ? null, bison }:
assert interactive -> readline != null;
assert stdenv.isDarwin -> binutils != null;
let
version = "4.3";
realName = "bash-${version}";
shortName = "bash43";
baseConfigureFlags = if interactive then "--with-installed-readline" else "--disable-readline";
sha256 = "1m14s1f61mf6bijfibcjm9y6pkyvz6gibyl8p4hxq90fisi8gimg";
inherit (stdenv.lib) optional optionalString;
in
stdenv.mkDerivation rec {
name = "${realName}-p${toString (builtins.length patches)}";
src = fetchurl {
url = "mirror://gnu/bash/${realName}.tar.gz";
inherit sha256;
};
hardeningDisable = [ "format" ];
outputs = [ "out" "doc" "info" ];
# the man pages are small and useful enough
outputMan = if interactive then "out" else null;
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
'';
patchFlags = "-p0";
patches =
(let
patch = nr: sha256:
fetchurl {
url = "mirror://gnu/bash/${realName}-patches/${shortName}-${nr}";
inherit sha256;
};
in
import ./bash-4.3-patches.nix patch)
++ optional stdenv.isCygwin ./cygwin-bash-4.3.33-1.src.patch;
crossAttrs = {
configureFlags = baseConfigureFlags +
" bash_cv_job_control_missing=nomissing bash_cv_sys_named_pipes=nomissing" +
optionalString stdenv.isCygwin ''
--without-libintl-prefix --without-libiconv-prefix
--with-installed-readline
bash_cv_dev_stdin=present
bash_cv_dev_fd=standard
bash_cv_termcap_lib=libncurses
'';
};
configureFlags = baseConfigureFlags;
# Note: Bison is needed because the patches above modify parse.y.
nativeBuildInputs = [bison]
++ optional (texinfo != null) texinfo
++ optional interactive readline
++ optional stdenv.isDarwin binutils;
# Bash randomly fails to build because of a recursive invocation to
# build `version.h'.
enableParallelBuilding = false;
postInstall = ''
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
else ''
rm -r "$out/share" "$out/bin/bashbug"
'';
meta = with stdenv.lib; {
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 "");
longDescription = ''
Bash is the shell, or command language interpreter, that will
appear in the GNU operating system. Bash is an sh-compatible
shell that incorporates useful features from the Korn shell
(ksh) and C shell (csh). It is intended to conform to the IEEE
POSIX P1003.2/ISO 9945.2 Shell and Tools standard. It offers
functional improvements over sh for both programming and
interactive use. In addition, most sh scripts can be run by
Bash without modification.
'';
license = licenses.gpl3Plus;
platforms = platforms.all;
maintainers = [ maintainers.peti ];
};
passthru = {
shellPath = "/bin/bash";
};
}

View File

@ -0,0 +1,50 @@
# Automatically generated by `update-patch-set.sh'; do not edit.
patch: [
(patch "001" "0hip2n2s5hws8p4nfcz37379zn6cak83ljsm64z52rw6ckrdzczc")
(patch "002" "0ashj5d1g3zbyr7zf0r72s5wnk96cz1xj919y3jajadbc9qcvrzf")
(patch "003" "0z88q4daq7dmw93iqd9c5i5d1sndklih3nrh0v75746da2n6w3h0")
(patch "004" "0f0kh9j5k4ym6knshscx31przm50x5cc7ifkwqk0swh6clna982y")
(patch "005" "1ym3b8b7lgmdp3dklp8qaqhyq965wd5392namq8mz7rb0d231j0s")
(patch "006" "04q20igq49py49ynb0f83f6f52cdkyqwd9bpic6akr0m5pkqwr50")
(patch "007" "18zkz23d9myshrwfcwcdjk7qmkqp8az5n91ni9jaixlwqlhy64qi")
(patch "008" "0pprcwvh7ngdli0x95pc1cpssg4qg7layi9xrv2jq6c7965ajhcr")
(patch "009" "19a0pf0alp30d1bjj0zf3zq2f5n0s6y91w7brm9jyswl51kns8n0")
(patch "010" "1dzhr5ammyijisz48cqi5vaw26hfr5vh9smnqxq4qc9p06f7j1ff")
(patch "011" "0fvzdzzi142a8rf3v965r6gbpn0k7fv2gif1yq8a4160vcn40qvw")
(patch "012" "04lcgfcyz7p3zagb4hkia3hkpd7lii9m8ycy9qqwzyrm1c1pj4ry")
(patch "013" "0y9cqi378z6flapkd5k5lfl4lq3ivzg4njj3i3wmw7xb6r9wma5z")
(patch "014" "04xcb0k9fxxq4vashgzb98567xzdnm4655nlm4jvfvjv6si6ykas")
(patch "015" "13ay6lldy1p00xj41nfjpq8lai3vw2qwca79gx6s80z04j53wa8k")
(patch "016" "0wq7bvx3pfw90pnfb86yg5nr9jgjsvm2nq5rrkqxf6zn977hpmlj")
(patch "017" "103p7sibihv6cshqj12k546zsbz0dnd5cv5vlx1719avddfc4rqj")
(patch "018" "0n1x3812y1brb9xbabaj3fvr4cpvm2225iwckmqk2fcpkq5b9a3s")
(patch "019" "08rd1p7zpzgbpmmmnj2im8wj2pcwmbbx51psr9vdc5c049si9ad7")
(patch "020" "163c6g05qpag2plx5q795pmw3f3m904jy7z93xj2i08pgzc8cpna")
(patch "021" "1a90cl3h10dh8k9f2ddrsjmw5ywaw2d5x78xb4fd2sryi039yhs1")
(patch "022" "120s0s4qcqd0q12j1iv0hkpf9fp3w5jnqw646kv66n66jnxlfkgx")
(patch "023" "1m00sfi88p2akgiyrg4hw0gvz3s1586pkzjdr3dm73vs773m1hls")
(patch "024" "0v0gjqzjsqjfgj5x17fq7g649k94jn8zq92qsxkhc2d6l215hl1v")
(patch "025" "0lcj96i659q35f1jcmwwbnw3p7w7vvlxjxqi989vn6d6qksqcl8y")
(patch "026" "0k919ir0inwn4wai2vdzpbwqq5h54fnrlkmgccxjg91v3ch15k1f")
(patch "027" "1gnsfvq6bhb3srlbh0cannj2hackdsipcg7z0ds7zlk1hp96mdqy")
(patch "028" "17a65c4fn4c5rgsiw9gqqnzhznh3gwnd2xzzv2dppyi48znxpc78")
(patch "029" "14k27p28r5l2fz3r03kd0x72vvsq8bja8c6hjz5kxikbzsbs7i2c")
(patch "030" "0nrqb0m7s89qsrbfaffpilc5gcf82bx9yvgzld4hr79p5y54yhw5")
(patch "031" "07d62bl3z7qa8v6kgk47vzzazw563mlk9zhrsr4xsbqgvmcrylnd")
(patch "032" "0jjgapfq4qhmndfrw8c3q3lva8xjdhlbd9cc631v41b0kb95g4w8")
(patch "033" "05ma5rlxiadnfh925p4y7s0vvk917kmsdb1mfdx05gizl63pfapv")
(patch "034" "12gq9whkq3naa3iy7c7x5pfpvrg7d0kwqld8609zxphhy424ysgi")
(patch "035" "1qy1jflmbazjykq766gwabkaiswnx7pwa66whqiny0w02zjqa39p")
(patch "036" "0z6jbyy70lfdm6d3x0sbazbqdxb3xnpn9bmz7madpvrnbd284pxc")
(patch "037" "04sqr8zkl6s5fccfvb775ppn3ldij5imria9swc39aq0fkfp1w9k")
(patch "038" "0rv3g14mpgv8br267bf7rmgqlgwnc4v6g3g8y0sjba571i8amgmd")
(patch "039" "1v3l3vkc3g2b6fjycqwlakr8xhiw6bmw6q0zd6bi0m0m4bnxr55b")
(patch "040" "0sypv66vsldmc95gwvf7ylz1k7y37vnvdsjg8ajjr6b2j9mkkfw4")
(patch "041" "06ic2gdpbi1afik3wqf9d4vh95if4bz8bmhcgr555621dsb35i2f")
(patch "042" "06a90k0p6bqc4wk2dsmapna69124an76xvlnlj3xm497vci968dc")
(patch "043" "1031g97w8gamimb41jr9r2qm7mn10k5mr3sd3y12avml0p0a7a27")
(patch "044" "16bzaq9fs2kaw2n2k6vvljkjw5k5kx06isnq8hxkfrxz60384f4k")
(patch "045" "08q02mj9imp2njpgm6f5q5m61i7qzp33rbxxzarixalyisbw6vms")
(patch "046" "13v8dymwj83wcvrfayjqrs5kqar05bcj4zpiacrjkkchnsk5dd5k")
]

View File

@ -4314,12 +4314,12 @@ in
### SHELLS
bash = lowPrio (callPackage ../shells/bash {
bash = lowPrio (callPackage ../shells/bash/4.3.nix {
texinfo = null;
interactive = stdenv.isCygwin; # patch for cygwin requires readline support
});
bashInteractive = appendToName "interactive" (callPackage ../shells/bash {
bashInteractive = appendToName "interactive" (callPackage ../shells/bash/4.4.nix {
interactive = true;
});