diff options
author | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2009-11-08 00:32:12 +0000 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2009-11-08 00:32:12 +0000 |
commit | 4b27d2870197b26b7c170caa333944231715d4a3 (patch) | |
tree | 6b781861cb96e9ce0660ca0b904ed3dda1cc6905 /pkgs/shells | |
parent | 6e86ca940f9cb7fdbbf8663bc5c19af45fbc1e17 (diff) |
Porting changes from stdenv-updates into this branch.
This comes from:
svn diff ^/nixpkgs/trunk/@18255 ^/nixpkgs/branches/stdenv-updates/ > diff
patch -p0 < diff
and then adding into svn all files new from the patch.
trunk@18255 comes from the last time I updated stdenv-updates from trunk.
svn path=/nixpkgs/stdenv-updates2/; revision=18272
Diffstat (limited to 'pkgs/shells')
-rw-r--r-- | pkgs/shells/bash/bash-patches.nix | 37 | ||||
-rw-r--r-- | pkgs/shells/bash/default.nix | 39 | ||||
-rw-r--r-- | pkgs/shells/bash/update-patch-set.sh | 47 |
3 files changed, 101 insertions, 22 deletions
diff --git a/pkgs/shells/bash/bash-patches.nix b/pkgs/shells/bash/bash-patches.nix new file mode 100644 index 000000000000..93a4f982e172 --- /dev/null +++ b/pkgs/shells/bash/bash-patches.nix @@ -0,0 +1,37 @@ +# Automatically generated by `update-patch-set.sh'; do not edit. + +patch: [ +(patch "001" "06q3y3i2kp09bnjd99lxa95psdmj2haril7pxhdbz9sx9qh19dg3") +(patch "002" "1x2w3mmz1qga30zf95wmnpjsdp8cnd2ljl29mfq9r6q1cvjifla9") +(patch "003" "1n3vg6p4nc7kd896s0fp48y9f6ddf3bkpdqzgmdpgqxi243c8073") +(patch "004" "1bnja962g9isrqhrw8dzxsx7ssvc2ayk1a9vmg2dx6gai8gys0sb") +(patch "005" "0l4l62riap2kqy20789x7f6bfx361yvixds0gnh10rli4v05h1j2") +(patch "006" "1r429n2b5cs2gi5zjv1hlr8k7jplnjg3y563369z799x1x9651y7") +(patch "007" "0vb11vy8r5ayr88hrlli8xj2qcird1qg8l99nknrwnni4jg5b3am") +(patch "008" "1z6q0lq1yxwpf6nf1z39jbyycv6cfv6gwpaqmgg7pnw31z029nw7") +(patch "009" "0avyvz8rkj66x715zf1b3w2pgbwwzaj977v9pcrscjksc50c4iq0") +(patch "010" "05j8xq2s1wnii1za1s6nglzga9xp7q1dmcs1bqqrlggz8mmnyhgj") +(patch "011" "1m2lhfhy6bl3j88qi9kcn6n1qb439n8pmhl4cqsmi2g8xwli9j7z") +(patch "012" "1ww327ga4s7607jgr0xd6nh8bg4xgf2vk63p2yy9b1iaq7lxdi5j") +(patch "013" "0fjc3qj4q6q2zfq1qmiarp6s4hhbh80q47xwws0mvgpks7wwl33n") +(patch "014" "16n3l7627n8b1p9s9ss9fcj7nbn1s6yndwmlh3v751knj73c9v8k") +(patch "015" "0548fm4vd3sv3y4g3csysm1mm7jk5hvyfwglw1c0pj2lvyzf583v") +(patch "016" "06fmf6jmgzl0x1vd7pkyi90sa1wjywkd42gi1phqmrwgj9p96flg") +(patch "017" "08gh63spac39z90n1d8gpx571x7n4bwzp2yqm3ik9c1rcgz2mvib") +(patch "018" "0cg6q3fn0j8kzd9w7plnwrbyxv8hzwx9vjp3ij9vx1p3n26vpcqx") +(patch "019" "0xbl1f5l04pmrs5dsq2nbpcs58zgz0f48nj4hqic143h0y7r8jah") +(patch "020" "11371hsarqc5czij1lmkj79c0h1b7hninkzrzmqpr1hnwgmrm6hw") +(patch "021" "0k8ii0yb4zhxmc90n3y2wpkczrxh7j1avjflnsi42j8hidpjsiq2") +(patch "022" "04lh6n91bif6wbcmizps40yc9qwfw720xq3vmmrkz1m13b3isnh4") +(patch "023" "11nwbnp4gmsjw46gq9gahzlbdagl3r1vdvcxvxfwlqppflim42sq") +(patch "024" "1aqp6z2mlp1m921ckgiiqd42fnvjrhil4bkkw58vjcgygv2bm7m5") +(patch "025" "023aixd4v3adsvnni9jf2qcfgpsza544k76k2ny78d036vb00ygp") +(patch "026" "1jzn8185iw49126mngbz8007dd6ca9m04n5yhhc5c9b6ki0g9gd9") +(patch "027" "1wkp9ci0ccvgmnjyg5z3qkcfh2z7p3rgdm8cc5k8mk5sn5mw4pgn") +(patch "028" "06id09sb9rvlw7phibs6aw7ncjddikia0mjr9jdis75byfx2q8jv") +(patch "029" "0rpsam2m9mxnxcgcdr461sijprqi9wv6i9gg5c7c46gwj4gs5x8m") +(patch "030" "1wwajl7fb5vy25m08fp4jshgqdh02m66zj7yq8i0j65675ldx1bz") +(patch "031" "037viyi9n9hnc5yyfgrr1ssvqr2vkasn08x3qvyxak7f0s4k2gv0") +(patch "032" "1pma7w85vq831izaqc4p9831hfsfl31s4n155azkrxywpqv4fsza") +(patch "033" "1x845nfqg8wr1x4wls9jdrzdq1lbig02w07wpmfr4h4r6bhgd5n4") +] diff --git a/pkgs/shells/bash/default.nix b/pkgs/shells/bash/default.nix index 8a58f7aec00a..02736dec2855 100644 --- a/pkgs/shells/bash/default.nix +++ b/pkgs/shells/bash/default.nix @@ -3,7 +3,7 @@ assert interactive -> readline != null; stdenv.mkDerivation rec { - name = "bash-4.0-p17"; + name = "bash-4.0-p28"; src = fetchurl { url = "mirror://gnu/bash/bash-4.0.tar.gz"; @@ -19,8 +19,6 @@ stdenv.mkDerivation rec { -DSSH_SOURCE_BASHRC ''; - postInstall = "ln -s bash $out/bin/sh"; - patchFlags = "-p0"; patches = @@ -30,25 +28,8 @@ stdenv.mkDerivation rec { url = "mirror://gnu/bash/bash-4.0-patches/bash40-${nr}"; inherit sha256; }; - in [ - (patch "001" "06q3y3i2kp09bnjd99lxa95psdmj2haril7pxhdbz9sx9qh19dg3") - (patch "002" "1x2w3mmz1qga30zf95wmnpjsdp8cnd2ljl29mfq9r6q1cvjifla9") - (patch "003" "1n3vg6p4nc7kd896s0fp48y9f6ddf3bkpdqzgmdpgqxi243c8073") - (patch "004" "1bnja962g9isrqhrw8dzxsx7ssvc2ayk1a9vmg2dx6gai8gys0sb") - (patch "005" "0l4l62riap2kqy20789x7f6bfx361yvixds0gnh10rli4v05h1j2") - (patch "006" "1r429n2b5cs2gi5zjv1hlr8k7jplnjg3y563369z799x1x9651y7") - (patch "007" "0vb11vy8r5ayr88hrlli8xj2qcird1qg8l99nknrwnni4jg5b3am") - (patch "008" "1z6q0lq1yxwpf6nf1z39jbyycv6cfv6gwpaqmgg7pnw31z029nw7") - (patch "009" "0avyvz8rkj66x715zf1b3w2pgbwwzaj977v9pcrscjksc50c4iq0") - (patch "010" "05j8xq2s1wnii1za1s6nglzga9xp7q1dmcs1bqqrlggz8mmnyhgj") - (patch "011" "1m2lhfhy6bl3j88qi9kcn6n1qb439n8pmhl4cqsmi2g8xwli9j7z") - (patch "012" "1ww327ga4s7607jgr0xd6nh8bg4xgf2vk63p2yy9b1iaq7lxdi5j") - (patch "013" "0fjc3qj4q6q2zfq1qmiarp6s4hhbh80q47xwws0mvgpks7wwl33n") - (patch "014" "16n3l7627n8b1p9s9ss9fcj7nbn1s6yndwmlh3v751knj73c9v8k") - (patch "015" "0548fm4vd3sv3y4g3csysm1mm7jk5hvyfwglw1c0pj2lvyzf583v") - (patch "016" "06fmf6jmgzl0x1vd7pkyi90sa1wjywkd42gi1phqmrwgj9p96flg") - (patch "017" "08gh63spac39z90n1d8gpx571x7n4bwzp2yqm3ik9c1rcgz2mvib") - ]; + in + import ./bash-patches.nix patch; # Note: Bison is needed because the patches above modify parse.y. buildInputs = [bison] @@ -57,6 +38,18 @@ stdenv.mkDerivation rec { configureFlags = "--with-installed-readline"; + postInstall = '' + # Add an `sh' -> `bash' symlink. + ln -s bash "$out/bin/sh" + + # Install the completion examples. + ensureDir "$out/etc" + cp -v "examples/complete/bash_completion" "$out/etc" + + ensureDir "$out/etc/bash_completion.d" + cp -v "examples/complete/complete.gnu-longopt" "$out/etc/bash_completion.d" + ''; + meta = { homepage = http://www.gnu.org/software/bash/; description = @@ -75,5 +68,7 @@ stdenv.mkDerivation rec { ''; license = "GPLv3+"; + + maintainers = [ stdenv.lib.maintainers.ludo ]; }; } diff --git a/pkgs/shells/bash/update-patch-set.sh b/pkgs/shells/bash/update-patch-set.sh new file mode 100644 index 000000000000..ded684571b0a --- /dev/null +++ b/pkgs/shells/bash/update-patch-set.sh @@ -0,0 +1,47 @@ +#!/bin/sh + +# Update patch set for GNU Bash or Readline. + +if [ $# -ne 2 ] +then + echo "Usage: $(basename $0) PROJECT VERSION" + echo "" + echo "Update the patch set for PROJECT (one of \`bash' or \`readline') for" + echo "the given version (e.g., \`4.0'). Produce \`PROJECT-patches.nix'." + exit 1 +fi + +PROJECT="$1" +VERSION="$2" +VERSION_CONDENSED="$(echo $VERSION | sed -es/\\.//g)" + +GPG="$(if $(type -P gpg2 > /dev/null); then echo gpg2; else echo gpg; fi)" +PATCH_LIST="$PROJECT-patches.nix" + +set -e + +start=1 +end=100 # must be > 99 for correct padding + +rm -vf "$PATCH_LIST" + +( echo "# Automatically generated by \`$(basename $0)'; do not edit." ; \ + echo "" ; \ + echo "patch: [" ) \ +>> "$PATCH_LIST" + +for i in `seq -w $start $end` +do + wget ftp.gnu.org/gnu/$PROJECT/$PROJECT-$VERSION-patches/$PROJECT$VERSION_CONDENSED-$i || break + wget ftp.gnu.org/gnu/$PROJECT/$PROJECT-$VERSION-patches/$PROJECT$VERSION_CONDENSED-$i.sig + "$GPG" --verify $PROJECT$VERSION_CONDENSED-$i.sig + echo "(patch \"$i\" \"$(nix-hash --flat --type sha256 --base32 $PROJECT$VERSION_CONDENSED-$i)\")" \ + >> "$PATCH_LIST" + + rm -f $PROJECT$VERSION_CONDENSED-$i{,.sig} +done + +echo "]" >> "$PATCH_LIST" + +echo "Got $(expr $i - 1) patches." +echo "Patch list has been written to \`$PATCH_LIST'." |