From dc55be9e050eea7c8ebd59acb7fd8963d7a31f56 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Wed, 28 Sep 2011 14:37:03 +0000 Subject: pkgs/shells/bash: updated "interactive" bash to version 4.2 The non-interactive variant, which is part of stdenv, remains unchanged. svn path=/nixpkgs/trunk/; revision=29523 --- pkgs/shells/bash/4.1.nix | 89 +++++++++++++++++++++++++++++++++++ pkgs/shells/bash/4.2.nix | 81 +++++++++++++++++++++++++++++++ pkgs/shells/bash/bash-4.1-patches.nix | 6 +++ pkgs/shells/bash/bash-4.2-patches.nix | 14 ++++++ pkgs/shells/bash/bash-patches.nix | 6 --- pkgs/shells/bash/default.nix | 89 ----------------------------------- pkgs/shells/bash/update-patch-set.sh | 2 +- pkgs/top-level/all-packages.nix | 4 +- 8 files changed, 193 insertions(+), 98 deletions(-) create mode 100644 pkgs/shells/bash/4.1.nix create mode 100644 pkgs/shells/bash/4.2.nix create mode 100644 pkgs/shells/bash/bash-4.1-patches.nix create mode 100644 pkgs/shells/bash/bash-4.2-patches.nix delete mode 100644 pkgs/shells/bash/bash-patches.nix delete mode 100644 pkgs/shells/bash/default.nix diff --git a/pkgs/shells/bash/4.1.nix b/pkgs/shells/bash/4.1.nix new file mode 100644 index 000000000000..02fb29c5daba --- /dev/null +++ b/pkgs/shells/bash/4.1.nix @@ -0,0 +1,89 @@ +{ stdenv, fetchurl, readline ? null, interactive ? false, texinfo ? null, bison }: + +assert interactive -> readline != null; + +let + realName = "bash-4.1"; + baseConfigureFlags = if interactive then "--with-installed-readline" else "--disable-readline"; +in + +stdenv.mkDerivation rec { + name = "${realName}-p${toString (builtins.length patches)}"; + + src = fetchurl { + url = "mirror://gnu/bash/${realName}.tar.gz"; + sha256 = "1np1ggp1lv8idwfx3mcxl9rhadqdf4h3x4isa3dk8v9wm0j72qiz"; + }; + + 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/bash-4.1-patches/bash41-${nr}"; + inherit sha256; + }; + in + import ./bash-4.1-patches.nix patch; + + crossAttrs = { + configureFlags = baseConfigureFlags + + " bash_cv_job_control_missing=nomissing bash_cv_sys_named_pipes=nomissing"; + }; + + configureFlags = baseConfigureFlags; + + # Note: Bison is needed because the patches above modify parse.y. + buildNativeInputs = [bison] + ++ stdenv.lib.optional (texinfo != null) texinfo + ++ stdenv.lib.optional interactive readline; + + postInstall = '' + # Add an `sh' -> `bash' symlink. + ln -s bash "$out/bin/sh" + + '' + (if interactive then "" else '' + # 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 = + "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 = "GPLv3+"; + + maintainers = [ stdenv.lib.maintainers.ludo stdenv.lib.maintainers.simons ]; + }; + + passthru = { + shellPath = "/bin/bash"; + }; +} diff --git a/pkgs/shells/bash/4.2.nix b/pkgs/shells/bash/4.2.nix new file mode 100644 index 000000000000..98fe43b0122a --- /dev/null +++ b/pkgs/shells/bash/4.2.nix @@ -0,0 +1,81 @@ +{ stdenv, fetchurl, readline ? null, interactive ? false, texinfo ? null, bison }: + +assert interactive -> readline != null; + +let + realName = "bash-4.2"; + baseConfigureFlags = if interactive then "--with-installed-readline" else "--disable-readline"; +in + +stdenv.mkDerivation rec { + name = "${realName}-p${toString (builtins.length patches)}"; + + src = fetchurl { + url = "mirror://gnu/bash/${realName}.tar.gz"; + sha256 = "a27a1179ec9c0830c65c6aa5d7dab60f7ce1a2a608618570f96bfa72e95ab3d8"; + }; + + 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/bash-4.2-patches/bash42-${nr}"; + inherit sha256; + }; + in + import ./bash-4.2-patches.nix patch; + + crossAttrs = { + configureFlags = baseConfigureFlags + + " bash_cv_job_control_missing=nomissing bash_cv_sys_named_pipes=nomissing"; + }; + + configureFlags = baseConfigureFlags; + + # Note: Bison is needed because the patches above modify parse.y. + buildNativeInputs = [bison] + ++ stdenv.lib.optional (texinfo != null) texinfo + ++ stdenv.lib.optional interactive readline; + + postInstall = '' + # Add an `sh' -> `bash' symlink. + ln -s bash "$out/bin/sh" + ''; + + 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 ""); + + 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 = "GPLv3+"; + + maintainers = [ stdenv.lib.maintainers.ludo stdenv.lib.maintainers.simons ]; + }; + + passthru = { + shellPath = "/bin/bash"; + }; +} diff --git a/pkgs/shells/bash/bash-4.1-patches.nix b/pkgs/shells/bash/bash-4.1-patches.nix new file mode 100644 index 000000000000..d22435744ccc --- /dev/null +++ b/pkgs/shells/bash/bash-4.1-patches.nix @@ -0,0 +1,6 @@ +# Automatically generated by `update-patch-set.sh'; do not edit. + +patch: [ +(patch "001" "0y02cbfnc5s3dnwr4fw2nz43f3b826f5084mk7qd0lzq12hpzr56") +(patch "002" "1y3qzw6lx16vnb8hrw3zx01z25k773cbmgysvs3vvcw6w6fj4bij") +] diff --git a/pkgs/shells/bash/bash-4.2-patches.nix b/pkgs/shells/bash/bash-4.2-patches.nix new file mode 100644 index 000000000000..7f4957c500c3 --- /dev/null +++ b/pkgs/shells/bash/bash-4.2-patches.nix @@ -0,0 +1,14 @@ +# Automatically generated by `update-patch-set.sh'; do not edit. + +patch: [ +(patch "001" "0yml2b6yarrr0dzv7h45lz4126i228hvqbqacqzg4jkcawla0v4d") +(patch "002" "1yffzfxryvqns513yv3r46slkysa3nbqv40442xfxb4rw4kwkfpy") +(patch "003" "1kdl9hcpf1m7gz0ja3mvin3syprl2kmbxc3wm27391wc04apq2js") +(patch "004" "1ha0453cjqdgkns2xkdgpd2izj5b6xlsc9a2w5b3sn6j63wb0d2f") +(patch "005" "182r2iyk27l28b8kyppfavvzxhax6vn5n1zyy3yirf0463klj5x8") +(patch "006" "1labcciavnfmn0alncz1x92ydrsriikcimw24rwzmnidbaa4h4f9") +(patch "007" "15byzdqvavc3zg2lbzzdwpdy43kzdnvmr89nya211pa3yjn2cn20") +(patch "008" "0dr4p83m2xpxhvd61yny0gdlasq6r9mpyiz220998y0alq8hs213") +(patch "009" "086b9jkyjgf2zhwln72d7s5x759iskgg3r4hdrw6b5y1ni059vg7") +(patch "010" "1p23m9kssdmpnjfp96bjmmshzf25cdzlyjygdw8j6sayqa159z5c") +] diff --git a/pkgs/shells/bash/bash-patches.nix b/pkgs/shells/bash/bash-patches.nix deleted file mode 100644 index d22435744ccc..000000000000 --- a/pkgs/shells/bash/bash-patches.nix +++ /dev/null @@ -1,6 +0,0 @@ -# Automatically generated by `update-patch-set.sh'; do not edit. - -patch: [ -(patch "001" "0y02cbfnc5s3dnwr4fw2nz43f3b826f5084mk7qd0lzq12hpzr56") -(patch "002" "1y3qzw6lx16vnb8hrw3zx01z25k773cbmgysvs3vvcw6w6fj4bij") -] diff --git a/pkgs/shells/bash/default.nix b/pkgs/shells/bash/default.nix deleted file mode 100644 index 3a0515199b6e..000000000000 --- a/pkgs/shells/bash/default.nix +++ /dev/null @@ -1,89 +0,0 @@ -{ stdenv, fetchurl, readline ? null, interactive ? false, texinfo ? null, bison }: - -assert interactive -> readline != null; - -let - realName = "bash-4.1"; - baseConfigureFlags = if interactive then "--with-installed-readline" else "--disable-readline"; -in - -stdenv.mkDerivation rec { - name = "${realName}-p${toString (builtins.length patches)}"; - - src = fetchurl { - url = "mirror://gnu/bash/${realName}.tar.gz"; - sha256 = "1np1ggp1lv8idwfx3mcxl9rhadqdf4h3x4isa3dk8v9wm0j72qiz"; - }; - - 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/bash-4.1-patches/bash41-${nr}"; - inherit sha256; - }; - in - import ./bash-patches.nix patch; - - crossAttrs = { - configureFlags = baseConfigureFlags + - " bash_cv_job_control_missing=nomissing bash_cv_sys_named_pipes=nomissing"; - }; - - configureFlags = baseConfigureFlags; - - # Note: Bison is needed because the patches above modify parse.y. - buildNativeInputs = [bison] - ++ stdenv.lib.optional (texinfo != null) texinfo - ++ stdenv.lib.optional interactive readline; - - postInstall = '' - # Add an `sh' -> `bash' symlink. - ln -s bash "$out/bin/sh" - - '' + (if interactive then "" else '' - # 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 = - "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 = "GPLv3+"; - - maintainers = [ stdenv.lib.maintainers.ludo stdenv.lib.maintainers.simons ]; - }; - - passthru = { - shellPath = "/bin/bash"; - }; -} diff --git a/pkgs/shells/bash/update-patch-set.sh b/pkgs/shells/bash/update-patch-set.sh index ded684571b0a..003c7a26d201 100755 --- a/pkgs/shells/bash/update-patch-set.sh +++ b/pkgs/shells/bash/update-patch-set.sh @@ -16,7 +16,7 @@ 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" +PATCH_LIST="$PROJECT-$VERSION-patches.nix" set -e diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f544c06b5450..e9a15a343017 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1596,11 +1596,11 @@ let ### SHELLS - bash = lowPrio (callPackage ../shells/bash { + bash = lowPrio (callPackage ../shells/bash/4.1.nix { texinfo = null; }); - bashInteractive = appendToName "interactive" (callPackage ../shells/bash { + bashInteractive = appendToName "interactive" (callPackage ../shells/bash/4.2.nix { interactive = true; }); -- cgit 1.4.1