diff options
103 files changed, 1987 insertions, 618 deletions
diff --git a/doc/stdenv.xml b/doc/stdenv.xml index d8d106e54ad4..5c77b416cc0a 100644 --- a/doc/stdenv.xml +++ b/doc/stdenv.xml @@ -1062,7 +1062,16 @@ echo @foo@ That is, no substitution is performed for undefined variables.</para></listitem> </varlistentry> - + + <varlistentry xml:id='fun-substituteAllInPlace'> + <term><function>substituteAllInPlace</function> + <replaceable>file</replaceable></term> + <listitem><para>Like <function>substituteAll</function>, but performs + the substitutions in place on the file + <replaceable>file</replaceable>.</para></listitem> + </varlistentry> + + <varlistentry xml:id='fun-stripHash'> <term><function>stripHash</function> <replaceable>path</replaceable></term> diff --git a/maintainers/scripts/eval-release.nix b/maintainers/scripts/eval-release.nix index 3d4458699c74..57395f8cc680 100644 --- a/maintainers/scripts/eval-release.nix +++ b/maintainers/scripts/eval-release.nix @@ -16,7 +16,7 @@ let call = attrs: lib.flip lib.mapAttrs attrs (n: v: builtins.trace n ( - if builtins.isFunction v then maybe (v { system = "i686-linux"; }) + if builtins.isFunction v then maybe (v { system = "x86_64-linux"; }) else if builtins.isAttrs v then call v else null )); diff --git a/pkgs/applications/networking/p2p/mldonkey/default.nix b/pkgs/applications/networking/p2p/mldonkey/default.nix index 16ce0d3504d4..98abc0a3db7a 100644 --- a/pkgs/applications/networking/p2p/mldonkey/default.nix +++ b/pkgs/applications/networking/p2p/mldonkey/default.nix @@ -13,6 +13,8 @@ stdenv.mkDerivation (rec { homepage = http://mldonkey.sourceforge.net/; }; + patches = [ ./gcc44mips64.patch ]; + buildInputs = [ ocaml zlib ncurses bzip2 file gd libpng ]; configureFlags = [ "--disable-gui" ]; } // (if (stdenv.system != "i686-linux" && stdenv.system != "x86_64-linux") then diff --git a/pkgs/applications/networking/p2p/mldonkey/gcc44mips64.patch b/pkgs/applications/networking/p2p/mldonkey/gcc44mips64.patch new file mode 100644 index 000000000000..41449dcdd05c --- /dev/null +++ b/pkgs/applications/networking/p2p/mldonkey/gcc44mips64.patch @@ -0,0 +1,103 @@ +Patch fixing CryptoPP so: +- it builds properly in mips64 with gcc 4.4 (gcc 4.4 does not have the 'h' asm constraint) +- it runs properly in mips64 (where lack of templated *Precision functions gave wrong numbers). + An assertion check failed without this. + +diff --git a/src/utils/lib/CryptoPP.cc b/src/utils/lib/CryptoPP.cc +index 9208e1c..6b12b0a 100644 +--- a/src/utils/lib/CryptoPP.cc ++++ b/src/utils/lib/CryptoPP.cc +@@ -890,35 +890,6 @@ unsigned int Parity(unsigned long value) + return (unsigned int)value&1; + } + +-unsigned int BytePrecision(unsigned long value) +-{ +- unsigned int i; +- for (i=sizeof(value); i; --i) +- if (value >> (i-1)*8) +- break; +- +- return i; +-} +- +-unsigned int BitPrecision(unsigned long value) +-{ +- if (!value) +- return 0; +- +- unsigned int l=0, h=8*sizeof(value); +- +- while (h-l > 1) +- { +- unsigned int t = (l+h)/2; +- if (value >> t) +- l = t; +- else +- h = t; +- } +- +- return h; +-} +- + unsigned long Crop(unsigned long value, unsigned int size) + { + if (size < 8*sizeof(value)) +@@ -1880,7 +1851,10 @@ public: + #elif defined(__x86_64__) + __asm__("mulq %3" : "=d" (r.m_halfs.high), "=a" (r.m_halfs.low) : "a" (a), "rm" (b) : "cc"); + #elif defined(__mips64) +- __asm__("dmultu %2,%3" : "=h" (r.m_halfs.high), "=l" (r.m_halfs.low) : "r" (a), "r" (b)); ++ //typedef unsigned int uint128_t __attribute__((mode(TI))); ++ __uint128_t tmp = (__uint128_t) a * b; ++ r.m_halfs.high = tmp >> 64; ++ r.m_halfs.low = tmp; + #elif defined(_M_IX86) + // for testing + word64 t = (word64)a * b; +diff --git a/src/utils/lib/CryptoPP.h b/src/utils/lib/CryptoPP.h +index d2ec1b2..775a898 100644 +--- a/src/utils/lib/CryptoPP.h ++++ b/src/utils/lib/CryptoPP.h +@@ -1869,10 +1869,39 @@ template <class T> inline const T& STDMAX(const T& a, const T& b) + // #define GETBYTE(x, y) (((byte *)&(x))[y]) + + CRYPTOPP_DLL unsigned int Parity(unsigned long); +-CRYPTOPP_DLL unsigned int BytePrecision(unsigned long); +-CRYPTOPP_DLL unsigned int BitPrecision(unsigned long); + CRYPTOPP_DLL unsigned long Crop(unsigned long, unsigned int size); + ++template <typename T> ++unsigned int BitPrecision(const T &value) ++{ ++ if (!value) ++ return 0; ++ ++ unsigned int l=0, h=8*sizeof(value); ++ ++ while (h-l > 1) ++ { ++ unsigned int t = (l+h)/2; ++ if (value >> t) ++ l = t; ++ else ++ h = t; ++ } ++ ++ return h; ++} ++ ++template <typename T> ++unsigned int BytePrecision(const T &value) ++{ ++ unsigned int i; ++ for (i=sizeof(value); i; --i) ++ if (value >> (i-1)*8) ++ break; ++ ++ return i; ++} ++ + inline unsigned int BitsToBytes(unsigned int bitCount) + { + return ((bitCount+7)/(8)); diff --git a/pkgs/applications/science/logic/coq/default.nix b/pkgs/applications/science/logic/coq/default.nix index fcd342e0b594..35395bd25d1e 100644 --- a/pkgs/applications/science/logic/coq/default.nix +++ b/pkgs/applications/science/logic/coq/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation { buildFlags = "world"; # Debug with "world VERBOSE=1"; - patches = [ ./configure.patch ]; + patches = [ ./configure.patch ./coq-8.3-make-3.82-compat.patch ]; postPatch = '' UNAME=$(type -tp uname) diff --git a/pkgs/build-support/clang-wrapper/clang-wrapper.sh b/pkgs/build-support/clang-wrapper/clang-wrapper.sh index 473adba86271..2052d2c2eb4c 100644 --- a/pkgs/build-support/clang-wrapper/clang-wrapper.sh +++ b/pkgs/build-support/clang-wrapper/clang-wrapper.sh @@ -103,11 +103,6 @@ if test "$dontLink" != "1"; then fi done export NIX_LDFLAGS_SET=1 - - if test "$NIX_STRIP_DEBUG" = "1"; then - # Add executable-stripping flags. - extraAfter=(${extraAfter[@]} $NIX_CFLAGS_STRIP) - fi fi # As a very special hack, if the arguments are just `-v', then don't diff --git a/pkgs/build-support/gcc-cross-wrapper/gcc-wrapper.sh b/pkgs/build-support/gcc-cross-wrapper/gcc-wrapper.sh index 98baafb4878d..f954cae05d86 100644 --- a/pkgs/build-support/gcc-cross-wrapper/gcc-wrapper.sh +++ b/pkgs/build-support/gcc-cross-wrapper/gcc-wrapper.sh @@ -89,11 +89,6 @@ if test "$dontLink" != "1"; then fi done export NIX_CROSS_LDFLAGS_SET=1 - - if test "$NIX_STRIP_DEBUG" = "1"; then - # Add executable-stripping flags. - extraAfter=(${extraAfter[@]} $NIX_CFLAGS_STRIP) - fi fi # Optionally print debug info. diff --git a/pkgs/build-support/gcc-upc-wrapper/gcc-wrapper.sh b/pkgs/build-support/gcc-upc-wrapper/gcc-wrapper.sh index a76684806b88..23117694767d 100644 --- a/pkgs/build-support/gcc-upc-wrapper/gcc-wrapper.sh +++ b/pkgs/build-support/gcc-upc-wrapper/gcc-wrapper.sh @@ -95,11 +95,6 @@ if test "$dontLink" != "1"; then fi done export NIX_LDFLAGS_SET=1 - - if test "$NIX_STRIP_DEBUG" = "1"; then - # Add executable-stripping flags. - extraAfter=(${extraAfter[@]} $NIX_CFLAGS_STRIP) - fi fi # As a very special hack, if the arguments are just `-v', then don't diff --git a/pkgs/build-support/gcc-wrapper/gcc-wrapper.sh b/pkgs/build-support/gcc-wrapper/gcc-wrapper.sh index f1b394a1f540..2ad7783a442c 100644 --- a/pkgs/build-support/gcc-wrapper/gcc-wrapper.sh +++ b/pkgs/build-support/gcc-wrapper/gcc-wrapper.sh @@ -103,11 +103,6 @@ if test "$dontLink" != "1"; then fi done export NIX_LDFLAGS_SET=1 - - if test "$NIX_STRIP_DEBUG" = "1"; then - # Add executable-stripping flags. - extraAfter=(${extraAfter[@]} $NIX_CFLAGS_STRIP) - fi fi # As a very special hack, if the arguments are just `-v', then don't diff --git a/pkgs/build-support/kernel/modules-closure.sh b/pkgs/build-support/kernel/modules-closure.sh index 7faaa0122cd2..faf6e92fdff1 100644 --- a/pkgs/build-support/kernel/modules-closure.sh +++ b/pkgs/build-support/kernel/modules-closure.sh @@ -29,6 +29,7 @@ ensureDir $out/lib/modules/"$version" for module in $closure; do target=$(echo $module | sed "s^$NIX_STORE.*/lib/modules/^$out/lib/modules/^") if test -e "$target"; then continue; fi + if test \! -e "$module"; then continue; fi # XXX: to avoid error with "cp builtin builtin" mkdir -p $(dirname $target) echo $module cp $module $target diff --git a/pkgs/development/compilers/gcc-4.4/default.nix b/pkgs/development/compilers/gcc-4.4/default.nix index fa34364912e9..d962d4ac3471 100644 --- a/pkgs/development/compilers/gcc-4.4/default.nix +++ b/pkgs/development/compilers/gcc-4.4/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, noSysDirs -, langC ? true, langCC ? true, langFortran ? false, langTreelang ? false +, langC ? true, langCC ? true, langFortran ? false , langJava ? false , langAda ? false , langVhdl ? false @@ -9,7 +9,6 @@ , texinfo ? null , gmp, mpfr, gettext, which , ppl ? null, cloogppl ? null # used by the Graphite optimization framework -, bison ? null, flex ? null , zlib ? null, boehmgc ? null , zip ? null, unzip ? null, pkgconfig ? null, gtk ? null, libart_lgpl ? null , libX11 ? null, libXt ? null, libSM ? null, libICE ? null, libXtst ? null @@ -25,7 +24,6 @@ , gnat ? null }: -assert langTreelang -> bison != null && flex != null; assert langJava -> zip != null && unzip != null && zlib != null && boehmgc != null; assert langAda -> gnatboot != null; @@ -131,11 +129,10 @@ stdenv.mkDerivation ({ buildInputs = [ gmp mpfr gettext ] ++ (optional (ppl != null) ppl) ++ (optional (cloogppl != null) cloogppl) - ++ (optionals langTreelang [bison flex]) ++ (optional (zlib != null) zlib) ++ (optional (boehmgc != null) boehmgc) ++ (optionals langJava [zip unzip]) - ++ (optionals javaAwtGtk [gtk pkgconfig libart_lgpl] ++ xlibs) + ++ (optionals javaAwtGtk ([gtk pkgconfig libart_lgpl] ++ xlibs)) ++ (optionals (cross != null) [binutilsCross]) ++ (optionals langAda [gnatboot]) ++ (optionals langVhdl [gnat]) @@ -160,7 +157,6 @@ stdenv.mkDerivation ({ ++ optional langCC "c++" ++ optional langFortran "fortran" ++ optional langJava "java" - ++ optional langTreelang "treelang" ++ optional langAda "ada" ++ optional langVhdl "vhdl" ) @@ -209,7 +205,6 @@ stdenv.mkDerivation ({ ++ optional langCC "c++" ++ optional langFortran "fortran" ++ optional langJava "java" - ++ optional langTreelang "treelang" ++ optional langAda "ada" ++ optional langVhdl "vhdl" ) @@ -244,7 +239,7 @@ stdenv.mkDerivation ({ ++ optionals javaAwtGtk [ gmp mpfr ]))); - passthru = { inherit langC langCC langAda langFortran langTreelang langVhdl + passthru = { inherit langC langCC langAda langFortran langVhdl enableMultilib version; }; # ghdl does not build fine with parallel building diff --git a/pkgs/development/compilers/gcc-4.5/builder.sh b/pkgs/development/compilers/gcc-4.5/builder.sh index aedd5b46b121..e1e56c8574ac 100644 --- a/pkgs/development/compilers/gcc-4.5/builder.sh +++ b/pkgs/development/compilers/gcc-4.5/builder.sh @@ -46,8 +46,8 @@ if test "$noSysDirs" = "1"; then export NIX_FIXINC_DUMMY=/usr/include fi - extraFlags="-g0 -O2 -I$NIX_FIXINC_DUMMY $extraFlags" - extraLDFlags="--strip-debug -L$glibc_libdir -rpath $glibc_libdir $extraLDFlags" + extraFlags="-I$NIX_FIXINC_DUMMY $extraFlags" + extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags" EXTRA_FLAGS="$extraFlags" for i in $extraLDFlags; do @@ -63,7 +63,7 @@ if test "$noSysDirs" = "1"; then unset LIBRARY_PATH unset CPATH if test -z "$crossStageStatic"; then - EXTRA_TARGET_CFLAGS="-g0 -O2 -B${libcCross}/lib -idirafter ${libcCross}/include" + EXTRA_TARGET_CFLAGS="-B${libcCross}/lib -idirafter ${libcCross}/include" EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib" fi else @@ -89,8 +89,8 @@ if test "$noSysDirs" = "1"; then # The path to the Glibc binaries such as `crti.o'. glibc_libdir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/lib" - extraFlags="-g0 -O2 -I$NIX_FIXINC_DUMMY_CROSS $extraFlags" - extraLDFlags="--strip-debug -L$glibc_libdir -rpath $glibc_libdir $extraLDFlags" + extraFlags="-I$NIX_FIXINC_DUMMY_CROSS $extraFlags" + extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags" EXTRA_TARGET_CFLAGS="$extraFlags" for i in $extraLDFlags; do diff --git a/pkgs/development/compilers/gcc-4.5/default.nix b/pkgs/development/compilers/gcc-4.5/default.nix index 0948e94702e2..0e0029f9f94d 100644 --- a/pkgs/development/compilers/gcc-4.5/default.nix +++ b/pkgs/development/compilers/gcc-4.5/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, noSysDirs -, langC ? true, langCC ? true, langFortran ? false, langTreelang ? false +, langC ? true, langCC ? true, langFortran ? false , langJava ? false , langAda ? false , langVhdl ? false @@ -11,7 +11,6 @@ , gmp, mpfr, mpc, gettext, which , libelf # optional, for link-time optimizations (LTO) , ppl ? null, cloogppl ? null # optional, for the Graphite optimization framework -, bison ? null, flex ? null , zlib ? null, boehmgc ? null , zip ? null, unzip ? null, pkgconfig ? null, gtk ? null, libart_lgpl ? null , libX11 ? null, libXt ? null, libSM ? null, libICE ? null, libXtst ? null @@ -26,9 +25,9 @@ , crossStageStatic ? true , gnat ? null , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd +, stripped ? true }: -assert langTreelang -> bison != null && flex != null; assert langJava -> zip != null && unzip != null && zlib != null && boehmgc != null && perl != null; # for `--enable-java-home' @@ -41,7 +40,7 @@ assert libelf != null -> zlib != null; with stdenv.lib; with builtins; -let version = "4.5.1"; +let version = "4.5.2"; javaEcj = fetchurl { # The `$(top_srcdir)/ecj.jar' file is automatically picked up at # `configure' time. @@ -212,11 +211,10 @@ stdenv.mkDerivation ({ buildInputs = [ gmp mpfr mpc libelf gettext ] ++ (optional (ppl != null) ppl) ++ (optional (cloogppl != null) cloogppl) - ++ (optionals langTreelang [bison flex]) ++ (optional (zlib != null) zlib) ++ (optional (boehmgc != null) boehmgc) ++ (optionals langJava [zip unzip]) - ++ (optionals javaAwtGtk [gtk pkgconfig libart_lgpl] ++ xlibs) + ++ (optionals javaAwtGtk ([gtk pkgconfig libart_lgpl] ++ xlibs)) ++ (optionals (cross != null) [binutilsCross]) ++ (optionals langAda [gnatboot]) ++ (optionals langVhdl [gnat]) @@ -254,7 +252,6 @@ stdenv.mkDerivation ({ ++ optional langCC "c++" ++ optional langFortran "fortran" ++ optional langJava "java" - ++ optional langTreelang "treelang" ++ optional langAda "ada" ++ optional langVhdl "vhdl" ) @@ -301,7 +298,6 @@ stdenv.mkDerivation ({ ++ optional langCC "c++" ++ optional langFortran "fortran" ++ optional langJava "java" - ++ optional langTreelang "treelang" ++ optional langAda "ada" ++ optional langVhdl "vhdl" ) @@ -356,7 +352,7 @@ stdenv.mkDerivation ({ EXTRA_TARGET_CFLAGS = if cross != null && libcCross != null - then "-g0 -O2 -idirafter ${libcCross}/include" + then "-idirafter ${libcCross}/include" else null; EXTRA_TARGET_LDFLAGS = @@ -366,7 +362,7 @@ stdenv.mkDerivation ({ " -L${libpthreadCross}/lib -Wl,${libpthreadCross.TARGET_LDFLAGS}") else null; - passthru = { inherit langC langCC langAda langFortran langTreelang langVhdl + passthru = { inherit langC langCC langAda langFortran langVhdl enableMultilib version; }; enableParallelBuilding = true; @@ -374,7 +370,8 @@ stdenv.mkDerivation ({ meta = { homepage = http://gcc.gnu.org/; license = "GPLv3+"; # runtime support libraries are typically LGPLv3+ - description = "GNU Compiler Collection, version ${version}"; + description = "GNU Compiler Collection, version ${version}" + + (if stripped then "" else " (with debugging info)"); longDescription = '' The GNU Compiler Collection includes compiler front ends for C, C++, @@ -409,6 +406,10 @@ stdenv.mkDerivation ({ installTargets = "install-gcc install-target-libgcc"; } +# GCC 4.5.2 doesn't support the `install-strip' target, so let `stdenv' do +# the stripping by default. +// optionalAttrs (!stripped) { dontStrip = true; } + // optionalAttrs langVhdl rec { name = "ghdl-0.29"; diff --git a/pkgs/development/compilers/gcc-4.5/sources.nix b/pkgs/development/compilers/gcc-4.5/sources.nix index 6059e03880b3..6e702f79ed01 100644 --- a/pkgs/development/compilers/gcc-4.5/sources.nix +++ b/pkgs/development/compilers/gcc-4.5/sources.nix @@ -1,26 +1,26 @@ /* Automatically generated by `update-gcc.sh', do not edit. - For GCC 4.5.1. */ + For GCC 4.5.2. */ { fetchurl, optional, version, langC, langCC, langFortran, langJava, langAda }: -assert version == "4.5.1"; +assert version == "4.5.2"; optional /* langC */ true (fetchurl { url = "mirror://gcc/releases/gcc-${version}/gcc-core-${version}.tar.bz2"; - sha256 = "0sjjw3qfcpdk0fs5d2rhl0xqcaclg86ifbq45dbk9ca072l3fyxm"; + sha256 = "d1099165702ccdfd65f2411ed8d1015452190fe6bc7b87baf124794e5c8e7464"; }) ++ optional langCC (fetchurl { url = "mirror://gcc/releases/gcc-${version}/gcc-g++-${version}.tar.bz2"; - sha256 = "0j6ffb96b3r75hrjshg52llv21ax7r8jdx44hhj0maiisnl9wd55"; + sha256 = "fdd45dc9158d1d5a1c2ef0054b353d5f403e29ec360c1f8e058dc7e4531fe83b"; }) ++ optional langFortran (fetchurl { url = "mirror://gcc/releases/gcc-${version}/gcc-fortran-${version}.tar.bz2"; - sha256 = "0xgwjc3h5fc5c100bnw24c35255il33lj5qbgpxf0zl8di2q13aw"; + sha256 = "19c3c8a4b23c880a369d3229ef65406fde6af47f5127d494a87f19e1de3d9a13"; }) ++ optional langJava (fetchurl { url = "mirror://gcc/releases/gcc-${version}/gcc-java-${version}.tar.bz2"; - sha256 = "0mh37q4ibg05h1hdh39pkj1hycvdg6i79m4698knw7pppm14ax8q"; + sha256 = "c120e2dc39dd707a3d5461744b879e41f5e642661d7b8a023fc620b24bb7a2ab"; }) ++ optional langAda (fetchurl { url = "mirror://gcc/releases/gcc-${version}/gcc-ada-${version}.tar.bz2"; - sha256 = "11chdbl7h046lnl83k79vj7dvgxz6kq7cnmwx94z644vaiflg153"; + sha256 = "7ed5bb26b72dfbfaf533d09e3d34df96305c09f57f5da67939087fb2726cc771"; }) ++ [] diff --git a/pkgs/development/compilers/gcc-4.6/default.nix b/pkgs/development/compilers/gcc-4.6/default.nix index 5fdb61576faa..4faa531f10d5 100644 --- a/pkgs/development/compilers/gcc-4.6/default.nix +++ b/pkgs/development/compilers/gcc-4.6/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, noSysDirs -, langC ? true, langCC ? true, langFortran ? false, langTreelang ? false +, langC ? true, langCC ? true, langFortran ? false , langJava ? false , langAda ? false , langVhdl ? false @@ -12,7 +12,6 @@ , gmp, mpfr, mpc, gettext, which , libelf # optional, for link-time optimizations (LTO) , ppl ? null, cloogppl ? null, cloog ? null # optional, for the Graphite optimization framework. Cannot pass both cloog and cloogppl -, bison ? null, flex ? null , zlib ? null, boehmgc ? null , zip ? null, unzip ? null, pkgconfig ? null, gtk ? null, libart_lgpl ? null , libX11 ? null, libXt ? null, libSM ? null, libICE ? null, libXtst ? null @@ -30,7 +29,6 @@ , stripped ? true }: -assert langTreelang -> bison != null && flex != null; assert langJava -> zip != null && unzip != null && zlib != null && boehmgc != null && perl != null; # for `--enable-java-home' @@ -214,8 +212,7 @@ stdenv.mkDerivation ({ buildNativeInputs = [ texinfo which gettext ] ++ (optional (perl != null) perl) - ++ (optional javaAwtGtk pkgconfig) - ++ (optionals langTreelang [bison flex]); + ++ (optional javaAwtGtk pkgconfig); buildInputs = [ gmp mpfr mpc libelf ] ++ (optional (ppl != null) ppl) @@ -223,7 +220,7 @@ stdenv.mkDerivation ({ ++ (optional (cloog != null) cloog) ++ (optional (zlib != null) zlib) ++ (optionals langJava [ boehmgc zip unzip ]) - ++ (optionals javaAwtGtk [ gtk libart_lgpl ] ++ xlibs) + ++ (optionals javaAwtGtk ([ gtk libart_lgpl ] ++ xlibs)) ++ (optionals (cross != null) [binutilsCross]) ++ (optionals langAda [gnatboot]) ++ (optionals langVhdl [gnat]) @@ -263,7 +260,6 @@ stdenv.mkDerivation ({ ++ optional langCC "c++" ++ optional langFortran "fortran" ++ optional langJava "java" - ++ optional langTreelang "treelang" ++ optional langAda "ada" ++ optional langVhdl "vhdl" ++ optional langGo "go" @@ -317,7 +313,6 @@ stdenv.mkDerivation ({ ++ optional langCC "c++" ++ optional langFortran "fortran" ++ optional langJava "java" - ++ optional langTreelang "treelang" ++ optional langAda "ada" ++ optional langVhdl "vhdl" ++ optional langGo "go" @@ -383,7 +378,7 @@ stdenv.mkDerivation ({ " -L${libpthreadCross}/lib -Wl,${libpthreadCross.TARGET_LDFLAGS}") else null; - passthru = { inherit langC langCC langAda langFortran langTreelang langVhdl + passthru = { inherit langC langCC langAda langFortran langVhdl langGo enableMultilib version; }; enableParallelBuilding = true; @@ -421,7 +416,7 @@ stdenv.mkDerivation ({ installTargets = "install-gcc install-target-libgcc"; } -// optionalAttrs (!stripped) { dontStrip = true; NIX_STRIP_DEBUG = false; } +// optionalAttrs (!stripped) { dontStrip = true; } // optionalAttrs langVhdl rec { name = "ghdl-0.29"; diff --git a/pkgs/development/interpreters/perl-5.10/default.nix b/pkgs/development/interpreters/perl/5.10/default.nix index 76928d104481..76928d104481 100644 --- a/pkgs/development/interpreters/perl-5.10/default.nix +++ b/pkgs/development/interpreters/perl/5.10/default.nix diff --git a/pkgs/development/interpreters/perl-5.10/no-sys-dirs.patch b/pkgs/development/interpreters/perl/5.10/no-sys-dirs.patch index 29edf68bb647..29edf68bb647 100644 --- a/pkgs/development/interpreters/perl-5.10/no-sys-dirs.patch +++ b/pkgs/development/interpreters/perl/5.10/no-sys-dirs.patch diff --git a/pkgs/development/interpreters/perl-5.10/setup-hook.sh b/pkgs/development/interpreters/perl/5.10/setup-hook.sh index 6a144a7f7804..6a144a7f7804 100644 --- a/pkgs/development/interpreters/perl-5.10/setup-hook.sh +++ b/pkgs/development/interpreters/perl/5.10/setup-hook.sh diff --git a/pkgs/development/interpreters/perl/5.14/default.nix b/pkgs/development/interpreters/perl/5.14/default.nix new file mode 100644 index 000000000000..bdd3365b8b04 --- /dev/null +++ b/pkgs/development/interpreters/perl/5.14/default.nix @@ -0,0 +1,60 @@ +{ stdenv, fetchurl }: + +let + + libc = if stdenv ? gcc && stdenv.gcc.libc != null then stdenv.gcc.libc else "/usr"; + +in + +stdenv.mkDerivation rec { + name = "perl-5.14.2"; + + src = fetchurl { + url = "mirror://cpan/src/${name}.tar.gz"; + sha256 = "1ls8cpbgnlaxfydyyqgr7pxj1hkxh9pzcdgr3dv42zdxffakb234"; + }; + + patches = + [ # Do not look in /usr etc. for dependencies. + ./no-sys-dirs.patch + ]; + + # Build a thread-safe Perl with a dynamic libperls.o. We need the + # "installstyle" option to ensure that modules are put under + # $out/lib/perl5 - this is the general default, but because $out + # contains the string "perl", Configure would select $out/lib. + # Miniperl needs -lm. perl needs -lrt. + configureFlags = + [ "-de" + "-Dcc=gcc" + "-Uinstallusrbinperl" + "-Dinstallstyle=lib/perl5" + "-Duseshrplib" + "-Dlocincpth=${libc}/include" + "-Dloclibpth=${libc}/lib" + ] + ++ stdenv.lib.optional (stdenv ? glibc) "-Dusethreads"; + + configureScript = "${stdenv.shell} ./Configure"; + + dontAddPrefix = true; + + enableParallelBuilding = true; + + preConfigure = + '' + configureFlags="$configureFlags -Dprefix=$out -Dman1dir=$out/share/man/man1 -Dman3dir=$out/share/man/man3" + + ${stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") '' + configureFlagsArray=(-Dldflags="-lm -lrt") + ''} + ''; + + preBuild = stdenv.lib.optionalString (!(stdenv ? gcc && stdenv.gcc.nativeTools)) + '' + # Make Cwd work on NixOS (where we don't have a /bin/pwd). + substituteInPlace dist/Cwd/Cwd.pm --replace "'/bin/pwd'" "'$(type -tP pwd)'" + ''; + + setupHook = ./setup-hook.sh; +} diff --git a/pkgs/development/interpreters/perl/5.14/no-sys-dirs.patch b/pkgs/development/interpreters/perl/5.14/no-sys-dirs.patch new file mode 100644 index 000000000000..a7fa7725c891 --- /dev/null +++ b/pkgs/development/interpreters/perl/5.14/no-sys-dirs.patch @@ -0,0 +1,134 @@ +diff -ru perl-5.14.2-orig/Configure perl-5.14.2/Configure +--- perl-5.14.2-orig/Configure 2011-09-26 11:44:34.000000000 +0200 ++++ perl-5.14.2/Configure 2011-10-27 17:42:26.791103662 +0200 +@@ -106,15 +106,7 @@ + fi + + : Proper PATH setting +-paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin' +-paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin" +-paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin" +-paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin" +-paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb" +-paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /opt/ansic/bin /usr/ccs/bin" +-paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib" +-paths="$paths /sbin /usr/sbin /usr/libexec" +-paths="$paths /system/gnu_library/bin" ++paths='' + + for p in $paths + do +@@ -1311,8 +1303,7 @@ + archname='' + : Possible local include directories to search. + : Set locincpth to "" in a hint file to defeat local include searches. +-locincpth="/usr/local/include /opt/local/include /usr/gnu/include" +-locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include" ++locincpth="" + : + : no include file wanted by default + inclwanted='' +@@ -1328,17 +1319,12 @@ + archobjs='' + libnames='' + : change the next line if compiling for Xenix/286 on Xenix/386 +-xlibpth='/usr/lib/386 /lib/386' ++xlibpth='' + : Possible local library directories to search. +-loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib" +-loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib" ++loclibpth="" + + : general looking path for locating libraries +-glibpth="/lib /usr/lib $xlibpth" +-glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib" +-test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth" +-test -f /shlib/libc.so && glibpth="/shlib $glibpth" +-test -d /usr/lib64 && glibpth="$glibpth /lib64 /usr/lib64 /usr/local/lib64" ++glibpth="" + + : Private path used by Configure to find libraries. Its value + : is prepended to libpth. This variable takes care of special +@@ -1371,8 +1357,6 @@ + libswanted="$libswanted m crypt sec util c cposix posix ucb bsd BSD" + : We probably want to search /usr/shlib before most other libraries. + : This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist. +-glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'` +-glibpth="/usr/shlib $glibpth" + : Do not use vfork unless overridden by a hint file. + usevfork=false + +@@ -2380,7 +2364,6 @@ + zip + " + pth=`echo $PATH | sed -e "s/$p_/ /g"` +-pth="$pth /lib /usr/lib" + for file in $loclist; do + eval xxx=\$$file + case "$xxx" in +@@ -8390,13 +8373,8 @@ + echo " " + case "$sysman" in + '') +- syspath='/usr/share/man/man1 /usr/man/man1' +- syspath="$syspath /usr/man/mann /usr/man/manl /usr/man/local/man1" +- syspath="$syspath /usr/man/u_man/man1" +- syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1" +- syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1" +- syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1" +- sysman=`./loc . /usr/man/man1 $syspath` ++ syspath='' ++ sysman='' + ;; + esac + if $test -d "$sysman"; then +@@ -19721,9 +19699,10 @@ + case "$full_ar" in + '') full_ar=$ar ;; + esac ++full_ar=ar + + : Store the full pathname to the sed program for use in the C program +-full_sed=$sed ++full_sed=sed + + : see what type gids are declared as in the kernel + echo " " +Only in perl-5.14.2-orig/cpan/Module-Pluggable/t/lib/EditorJunk/Plugin: Bar.pm~ +diff -ru perl-5.14.2-orig/ext/Errno/Errno_pm.PL perl-5.14.2/ext/Errno/Errno_pm.PL +--- perl-5.14.2-orig/ext/Errno/Errno_pm.PL 2011-09-26 11:44:34.000000000 +0200 ++++ perl-5.14.2/ext/Errno/Errno_pm.PL 2011-10-27 17:40:13.083352010 +0200 +@@ -137,11 +137,7 @@ + if ($dep =~ /(\S+errno\.h)/) { + $file{$1} = 1; + } +- } elsif ($^O eq 'linux' && +- $Config{gccversion} ne '' && +- $Config{gccversion} !~ /intel/i +- # might be using, say, Intel's icc +- ) { ++ } elsif (0) { + # Some Linuxes have weird errno.hs which generate + # no #file or #line directives + my $linux_errno_h = -e '/usr/include/errno.h' ? +diff -ru perl-5.14.2-orig/hints/freebsd.sh perl-5.14.2/hints/freebsd.sh +--- perl-5.14.2-orig/hints/freebsd.sh 2011-09-19 15:18:22.000000000 +0200 ++++ perl-5.14.2/hints/freebsd.sh 2011-10-27 17:40:13.083352010 +0200 +@@ -118,13 +118,13 @@ + objformat=`/usr/bin/objformat` + if [ x$objformat = xaout ]; then + if [ -e /usr/lib/aout ]; then +- libpth="/usr/lib/aout /usr/local/lib /usr/lib" +- glibpth="/usr/lib/aout /usr/local/lib /usr/lib" ++ libpth="" ++ glibpth="" + fi + lddlflags='-Bshareable' + else +- libpth="/usr/lib /usr/local/lib" +- glibpth="/usr/lib /usr/local/lib" ++ libpth="" ++ glibpth="" + ldflags="-Wl,-E " + lddlflags="-shared " + fi diff --git a/pkgs/development/interpreters/perl/5.14/setup-hook.sh b/pkgs/development/interpreters/perl/5.14/setup-hook.sh new file mode 100644 index 000000000000..6a144a7f7804 --- /dev/null +++ b/pkgs/development/interpreters/perl/5.14/setup-hook.sh @@ -0,0 +1,5 @@ +addPerlLibPath () { + addToSearchPath PERL5LIB $1/lib/perl5/site_perl +} + +envHooks=(${envHooks[@]} addPerlLibPath) diff --git a/pkgs/development/interpreters/perl-5.8/default.nix b/pkgs/development/interpreters/perl/5.8/default.nix index 4b965999910c..4b965999910c 100644 --- a/pkgs/development/interpreters/perl-5.8/default.nix +++ b/pkgs/development/interpreters/perl/5.8/default.nix diff --git a/pkgs/development/interpreters/perl-5.8/gcc-4.2.patch b/pkgs/development/interpreters/perl/5.8/gcc-4.2.patch index 679a7abde3b6..679a7abde3b6 100644 --- a/pkgs/development/interpreters/perl-5.8/gcc-4.2.patch +++ b/pkgs/development/interpreters/perl/5.8/gcc-4.2.patch diff --git a/pkgs/development/interpreters/perl-5.8/no-sys-dirs.patch b/pkgs/development/interpreters/perl/5.8/no-sys-dirs.patch index 48588d5a4291..48588d5a4291 100644 --- a/pkgs/development/interpreters/perl-5.8/no-sys-dirs.patch +++ b/pkgs/development/interpreters/perl/5.8/no-sys-dirs.patch diff --git a/pkgs/development/interpreters/perl-5.8/setup-hook.sh b/pkgs/development/interpreters/perl/5.8/setup-hook.sh index d61ec82f4f08..d61ec82f4f08 100644 --- a/pkgs/development/interpreters/perl-5.8/setup-hook.sh +++ b/pkgs/development/interpreters/perl/5.8/setup-hook.sh diff --git a/pkgs/development/libraries/cloog-ppl/default.nix b/pkgs/development/libraries/cloog-ppl/default.nix index ca662d30eb0f..d0e4083788ba 100644 --- a/pkgs/development/libraries/cloog-ppl/default.nix +++ b/pkgs/development/libraries/cloog-ppl/default.nix @@ -12,11 +12,11 @@ let in stdenv.mkDerivation rec { - name = "cloog-ppl-0.15.9"; + name = "cloog-ppl-0.15.11"; src = fetchurl { url = "mirror://gcc/infrastructure/${name}.tar.gz"; - sha256 = "19a2n75k3d3n8llng25f2g88lpvd4zn0lm073rkndjw6l6yd8m4c"; + sha256 = "0psdm0bn5gx60glfh955x5b3b23zqrd92idmjr0b00dlnb839mkw"; }; propagatedBuildInputs = [ ppl ]; diff --git a/pkgs/development/libraries/glibc-2.12/builder.sh b/pkgs/development/libraries/glibc-2.13/builder.sh index 9a1c1490019a..9a1c1490019a 100644 --- a/pkgs/development/libraries/glibc-2.12/builder.sh +++ b/pkgs/development/libraries/glibc-2.13/builder.sh diff --git a/pkgs/development/libraries/glibc-2.13/common.nix b/pkgs/development/libraries/glibc-2.13/common.nix new file mode 100644 index 000000000000..d63e7e99e480 --- /dev/null +++ b/pkgs/development/libraries/glibc-2.13/common.nix @@ -0,0 +1,213 @@ +/* Build configuration used to build glibc, Info files, and locale + information. */ + +cross : + +{ name, fetchurl, stdenv, installLocales ? false +, gccCross ? null, kernelHeaders ? null +, machHeaders ? null, hurdHeaders ? null, mig ? null, fetchgit ? null +, profilingLibraries ? false, meta +, preConfigure ? "", ... }@args : + +let + # For GNU/Hurd, see below. + version = if hurdHeaders != null then "20100512" else "2.13"; + + needsPortsNative = stdenv.isMips || stdenv.isArm; + needsPortsCross = cross.arch == "mips" || cross.arch == "arm"; + needsPorts = if (stdenv ? cross) && stdenv.cross != null then true + else if cross == null then needsPortsNative + else needsPortsCross; + + srcPorts = fetchurl { + url = "mirror://gnu/glibc/glibc-ports-2.13.tar.bz2"; + sha256 = "0npffql62m1xba15l1wkaqf2p0l2bvb33720gx28764jmq0la75i"; + }; + +in + +assert (cross != null) -> (gccCross != null); + +assert (mig != null) -> (machHeaders != null); +assert (machHeaders != null) -> (hurdHeaders != null); +assert (hurdHeaders != null) -> (fetchgit != null); + +stdenv.mkDerivation ({ + inherit kernelHeaders installLocales; + + # The host/target system. + crossConfig = if (cross != null) then cross.config else null; + + inherit (stdenv) is64bit; + + enableParallelBuilding = true; + + patches = + stdenv.lib.optional (fetchgit == null) + /* Fix for NIXPKGS-79: when doing host name lookups, when + nsswitch.conf contains a line like + + hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 + + don't return an error when mdns4_minimal can't be found. This + is a bug in Glibc: when a service can't be found, NSS should + continue to the next service unless "UNAVAIL=return" is set. + ("NOTFOUND=return" refers to the service returning a NOTFOUND + error, not the service itself not being found.) The reason is + that the "status" variable (while initialised to UNAVAIL) is + outside of the loop that iterates over the services, the + "files" service sets status to NOTFOUND. So when the call to + find "mdns4_minimal" fails, "status" will still be NOTFOUND, + and it will return instead of continuing to "dns". Thus, the + line + + hosts: mdns4_minimal [NOTFOUND=return] dns mdns4 + + does work because "status" will contain UNAVAIL after the + failure to find mdns4_minimal. */ + ./nss-skip-unavail.patch + ++ [ + /* Have rpcgen(1) look for cpp(1) in $PATH. */ + ./rpcgen-path.patch + + /* Allow nixos and nix handle the locale-archive. */ + ./nix-locale-archive.patch + + /* Without this patch many KDE binaries crash. */ + ./glibc-elf-localscope.patch + ]; + + postPatch = '' + # Needed for glibc to build with the gnumake 3.82 + # http://comments.gmane.org/gmane.linux.lfs.support/31227 + sed -i 's/ot \$/ot:\n\ttouch $@\n$/' manual/Makefile + + # nscd needs libgcc, and we don't want it dynamically linked + # because we don't want it to depend on bootstrap-tools libs. + echo "LDFLAGS-nscd += -static-libgcc" >> nscd/Makefile + ''; + + configureFlags = [ + "-C" + "--enable-add-ons" + "--sysconfdir=/etc" + "--localedir=/var/run/current-system/sw/lib/locale" + (if kernelHeaders != null + then "--with-headers=${kernelHeaders}/include" + else "--without-headers") + (if profilingLibraries + then "--enable-profile" + else "--disable-profile") + ] ++ stdenv.lib.optionals (cross != null) [ + (if cross.withTLS then "--with-tls" else "--without-tls") + (if cross.float == "soft" then "--without-fp" else "--with-fp") + "--enable-kernel=2.6.0" + "--with-__thread" + ] ++ stdenv.lib.optionals (stdenv.system == "armv5tel-linux") [ + "--host=arm-linux-gnueabi" + "--build=arm-linux-gnueabi" + "--without-fp" + + # To avoid linking with -lgcc_s (dynamic link) + # so the glibc does not depend on its compiler store path + "libc_cv_as_needed=no" + ]; + + installFlags = [ "sysconfdir=$(out)/etc" ]; + + buildInputs = stdenv.lib.optionals (cross != null) [ gccCross ] + ++ stdenv.lib.optional (mig != null) mig; + + # Needed to install share/zoneinfo/zone.tab. Set to impure /bin/sh to + # prevent a retained dependency on the bootstrap tools in the stdenv-linux + # bootstrap. + BASH_SHELL = "/bin/sh"; + + # Workaround for this bug: + # http://sourceware.org/bugzilla/show_bug.cgi?id=411 + # I.e. when gcc is compiled with --with-arch=i686, then the + # preprocessor symbol `__i686' will be defined to `1'. This causes + # the symbol __i686.get_pc_thunk.dx to be mangled. + NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (stdenv.system == "i686-linux") "-U__i686"; +} + +# Remove the `gccCross' attribute so that the *native* glibc store path +# doesn't depend on whether `gccCross' is null or not. +// (removeAttrs args [ "gccCross" ]) // + +{ + name = name + "-${version}" + + stdenv.lib.optionalString (cross != null) "-${cross.config}"; + + src = + if hurdHeaders != null + then fetchgit { + # Shamefully the "official" glibc won't build on GNU, so use the one + # maintained by the Hurd folks, `tschwinge/Roger_Whittaker' branch. + # See <http://www.gnu.org/software/hurd/source_repositories/glibc.html>. + url = "git://git.sv.gnu.org/hurd/glibc.git"; + sha256 = "f3590a54a9d897d121f91113949edbaaf3e30cdeacbb8d0a44de7b6564f6643e"; + rev = "df4c3faf0ccc848b5a8086c222bdb42679a9798f"; + } + else fetchurl { + url = "mirror://gnu/glibc/glibc-${version}.tar.bz2"; + sha256 = "1cnv319ysc8nkwpqw6f6ymb6b8hbl0nyvyx48sddkrj50lmcjwq1"; + }; + + # `fetchurl' is a function and thus should not be passed to the + # `derivation' primitive. + fetchurl = null; + + # Remove absolute paths from `configure' & co.; build out-of-tree. + preConfigure = '' + export PWD_P=$(type -tP pwd) + for i in configure io/ftwtest-sh; do + # Can't use substituteInPlace here because replace hasn't been + # built yet in the bootstrap. + sed -i "$i" -e "s^/bin/pwd^$PWD_P^g" + done + + ${if needsPorts then "tar xvf ${srcPorts}" else ""} + + mkdir ../build + cd ../build + + configureScript="`pwd`/../$sourceRoot/configure" + + ${preConfigure} + ''; + + meta = { + homepage = http://www.gnu.org/software/libc/; + description = "The GNU C Library"; + + longDescription = + '' Any Unix-like operating system needs a C library: the library which + defines the "system calls" and other basic facilities such as + open, malloc, printf, exit... + + The GNU C library is used as the C library in the GNU system and + most systems with the Linux kernel. + ''; + + license = "LGPLv2+"; + + maintainers = [ stdenv.lib.maintainers.ludo ]; + platforms = stdenv.lib.platforms.linux; + } // meta; +} + +// + +(if hurdHeaders != null + then { + # Work around the fact that the configure snippet that looks for + # <hurd/version.h> does not honor `--with-headers=$sysheaders' and that + # glibc expects both Mach and Hurd headers to be in the same place. + CPATH = "${hurdHeaders}/include:${machHeaders}/include"; + + # `fetchgit' is a function and thus should not be passed to the + # `derivation' primitive. + fetchgit = null; + } + else { })) diff --git a/pkgs/development/libraries/glibc-2.12/default.nix b/pkgs/development/libraries/glibc-2.13/default.nix index 89e8c60b7dad..31a8ef13a4fe 100644 --- a/pkgs/development/libraries/glibc-2.12/default.nix +++ b/pkgs/development/libraries/glibc-2.13/default.nix @@ -1,10 +1,8 @@ { stdenv, fetchurl, kernelHeaders -, machHeaders ? null, hurdHeaders ? null, libpthreadHeaders ? null -, mig ? null, fetchgit ? null +, machHeaders ? null, hurdHeaders ? null, mig ? null, fetchgit ? null , installLocales ? true , profilingLibraries ? false , gccCross ? null -, debugSymbols ? false }: assert stdenv.gcc.gcc != null; @@ -14,7 +12,7 @@ let cross = if gccCross != null then gccCross.target else null; in build cross ({ - name = "glibc${if debugSymbols then "-debug" else ""}"; + name = "glibc"; inherit fetchurl stdenv kernelHeaders installLocales profilingLibraries gccCross; @@ -40,23 +38,11 @@ in // - (if debugSymbols - then { - # Build with debugging symbols, but leave optimizations on and don't - # attempt to keep the build tree. - dontStrip = true; - dontCrossStrip = true; - NIX_STRIP_DEBUG = 0; - } - else {}) - - // - (if hurdHeaders != null then rec { - inherit machHeaders hurdHeaders libpthreadHeaders mig fetchgit; + inherit machHeaders hurdHeaders mig fetchgit; - propagatedBuildInputs = [ machHeaders hurdHeaders libpthreadHeaders ]; + propagatedBuildInputs = [ machHeaders hurdHeaders ]; passthru = { # When building GCC itself `propagatedBuildInputs' above is not diff --git a/pkgs/development/libraries/glibc-2.13/glibc-elf-localscope.patch b/pkgs/development/libraries/glibc-2.13/glibc-elf-localscope.patch new file mode 100644 index 000000000000..98f7f81087bb --- /dev/null +++ b/pkgs/development/libraries/glibc-2.13/glibc-elf-localscope.patch @@ -0,0 +1,82 @@ +diff -ru a/elf/dl-close.c b/elf/dl-close.c +--- a/elf/dl-close.c 2011-02-04 00:35:03.000000000 +0100 ++++ b/elf/dl-close.c 2011-02-22 02:16:12.367883000 +0100 +@@ -180,24 +186,28 @@ + /* Signal the object is still needed. */ + l->l_idx = IDX_STILL_USED; + ++#define mark_used(dmap) \ ++ do { \ ++ if ((dmap)->l_idx != IDX_STILL_USED) \ ++ { \ ++ assert ((dmap)->l_idx >= 0 && (dmap)->l_idx < nloaded); \ ++ \ ++ if (!used[(dmap)->l_idx]) \ ++ { \ ++ used[(dmap)->l_idx] = 1; \ ++ if ((dmap)->l_idx - 1 < done_index) \ ++ done_index = (dmap)->l_idx - 1; \ ++ } \ ++ } \ ++ } while (0) ++ + /* Mark all dependencies as used. */ + if (l->l_initfini != NULL) + { + struct link_map **lp = &l->l_initfini[1]; + while (*lp != NULL) + { +- if ((*lp)->l_idx != IDX_STILL_USED) +- { +- assert ((*lp)->l_idx >= 0 && (*lp)->l_idx < nloaded); +- +- if (!used[(*lp)->l_idx]) +- { +- used[(*lp)->l_idx] = 1; +- if ((*lp)->l_idx - 1 < done_index) +- done_index = (*lp)->l_idx - 1; +- } +- } +- ++ mark_used(*lp); + ++lp; + } + } +@@ -206,19 +216,25 @@ + for (unsigned int j = 0; j < l->l_reldeps->act; ++j) + { + struct link_map *jmap = l->l_reldeps->list[j]; +- +- if (jmap->l_idx != IDX_STILL_USED) +- { +- assert (jmap->l_idx >= 0 && jmap->l_idx < nloaded); +- +- if (!used[jmap->l_idx]) +- { +- used[jmap->l_idx] = 1; +- if (jmap->l_idx - 1 < done_index) +- done_index = jmap->l_idx - 1; +- } +- } ++ mark_used(jmap); + } ++ /* And the same for owners of our scopes; normally, our last ++ scope provider would render us unused, but this can be ++ prevented by the NODELETE flag. */ ++ if (__builtin_expect(l->l_type == lt_loaded ++ && (l->l_flags_1 & DF_1_NODELETE), 0)) ++ for (size_t cnt = 0; l->l_scope[cnt] != NULL; ++cnt) ++ /* This relies on l_scope[] entries being always set either ++ to its own l_symbolic_searchlist address, or some map's ++ l_searchlist address. */ ++ if (l->l_scope[cnt] != &l->l_symbolic_searchlist) ++ { ++ struct link_map *ls = (struct link_map *) ++ ((char *) l->l_scope[cnt] ++ - offsetof (struct link_map, l_searchlist)); ++ assert (ls->l_ns == nsid); ++ mark_used(ls); ++ } + } + + /* Sort the entries. */ diff --git a/pkgs/development/libraries/glibc-2.12/info.nix b/pkgs/development/libraries/glibc-2.13/info.nix index 84a16fefce9d..84a16fefce9d 100644 --- a/pkgs/development/libraries/glibc-2.12/info.nix +++ b/pkgs/development/libraries/glibc-2.13/info.nix diff --git a/pkgs/development/libraries/glibc-2.12/locales-builder.sh b/pkgs/development/libraries/glibc-2.13/locales-builder.sh index d732e208fa22..d732e208fa22 100644 --- a/pkgs/development/libraries/glibc-2.12/locales-builder.sh +++ b/pkgs/development/libraries/glibc-2.13/locales-builder.sh diff --git a/pkgs/development/libraries/glibc-2.12/locales.nix b/pkgs/development/libraries/glibc-2.13/locales.nix index 31a03c48d856..d598e0e094dc 100644 --- a/pkgs/development/libraries/glibc-2.12/locales.nix +++ b/pkgs/development/libraries/glibc-2.13/locales.nix @@ -40,7 +40,7 @@ in installPhase = '' ensureDir "$out/lib/locale" - cp -v "$TMPDIR/$NIX_STORE/"*"/lib/locale/locale-archive" "$out/lib/locale" + cp -v "$TMPDIR/nix/store/"*"/lib/locale/locale-archive" "$out/lib/locale" ''; meta.description = "Locale information for the GNU C Library"; diff --git a/pkgs/development/libraries/glibc-2.12/nix-locale-archive.patch b/pkgs/development/libraries/glibc-2.13/nix-locale-archive.patch index aca904f7ff44..aca904f7ff44 100644 --- a/pkgs/development/libraries/glibc-2.12/nix-locale-archive.patch +++ b/pkgs/development/libraries/glibc-2.13/nix-locale-archive.patch diff --git a/pkgs/development/libraries/glibc-2.12/nss-skip-unavail.patch b/pkgs/development/libraries/glibc-2.13/nss-skip-unavail.patch index e48dc2bc0a6e..e48dc2bc0a6e 100644 --- a/pkgs/development/libraries/glibc-2.12/nss-skip-unavail.patch +++ b/pkgs/development/libraries/glibc-2.13/nss-skip-unavail.patch diff --git a/pkgs/development/libraries/glibc-2.12/rpcgen-path.patch b/pkgs/development/libraries/glibc-2.13/rpcgen-path.patch index fbb03dd5fade..fbb03dd5fade 100644 --- a/pkgs/development/libraries/glibc-2.12/rpcgen-path.patch +++ b/pkgs/development/libraries/glibc-2.13/rpcgen-path.patch diff --git a/pkgs/development/libraries/glibc-2.14/builder.sh b/pkgs/development/libraries/glibc-2.14/builder.sh new file mode 100644 index 000000000000..9a1c1490019a --- /dev/null +++ b/pkgs/development/libraries/glibc-2.14/builder.sh @@ -0,0 +1,55 @@ +# Glibc cannot have itself in its RPATH. +export NIX_NO_SELF_RPATH=1 + +source $stdenv/setup + +postConfigure() { + # Hack: get rid of the `-static' flag set by the bootstrap stdenv. + # This has to be done *after* `configure' because it builds some + # test binaries. + export NIX_CFLAGS_LINK= + export NIX_LDFLAGS_BEFORE= + + export NIX_DONT_SET_RPATH=1 + unset CFLAGS +} + + +postInstall() { + if test -n "$installLocales"; then + make -j${NIX_BUILD_CORES:-1} -l${NIX_BUILD_CORES:-1} localedata/install-locales + fi + + test -f $out/etc/ld.so.cache && rm $out/etc/ld.so.cache + + # FIXME: Use `test -n $linuxHeaders' when `kernelHeaders' has been + # renamed. + if test -z "$hurdHeaders"; then + # Include the Linux kernel headers in Glibc, except the `scsi' + # subdirectory, which Glibc provides itself. + (cd $out/include && \ + ln -sv $(ls -d $kernelHeaders/include/* | grep -v 'scsi$') .) + fi + + if test -f "$out/lib/libhurduser.so"; then + # libc.so, libhurduser.so, and libmachuser.so depend on each + # other, so add them to libc.so (a RUNPATH on libc.so.0.3 + # would be ignored by the cross-linker.) + echo "adding \`libhurduser.so' and \`libmachuser.so' to the \`libc.so' linker script..." + sed -i "$out/lib/libc.so" \ + -e"s|\(libc\.so\.[^ ]\+\>\)|\1 $out/lib/libhurduser.so $out/lib/libmachuser.so|g" + fi + + # Fix for NIXOS-54 (ldd not working on x86_64). Make a symlink + # "lib64" to "lib". + if test -n "$is64bit"; then + ln -s lib $out/lib64 + fi + + # This file, that should not remain in the glibc derivation, + # may have not been created during the preInstall + rm -f $out/lib/libgcc_s.so.1 +} + + +genericBuild diff --git a/pkgs/development/libraries/glibc-2.12/common.nix b/pkgs/development/libraries/glibc-2.14/common.nix index 0d56d8770189..e24089fd1920 100644 --- a/pkgs/development/libraries/glibc-2.12/common.nix +++ b/pkgs/development/libraries/glibc-2.14/common.nix @@ -5,14 +5,13 @@ cross : { name, fetchurl, stdenv, installLocales ? false , gccCross ? null, kernelHeaders ? null -, machHeaders ? null, hurdHeaders ? null, libpthreadHeaders ? null -, mig ? null, fetchgit ? null +, machHeaders ? null, hurdHeaders ? null, mig ? null, fetchgit ? null , profilingLibraries ? false, meta , preConfigure ? "", ... }@args : let # For GNU/Hurd, see below. - version = if hurdHeaders != null then "20111025" else "2.12.2"; + version = if hurdHeaders != null then "20100512" else "2.14.1"; needsPortsNative = stdenv.isMips || stdenv.isArm; needsPortsCross = cross.arch == "mips" || cross.arch == "arm"; @@ -21,9 +20,8 @@ let else needsPortsCross; srcPorts = fetchurl { - # These should work equally well for 2.12.2 - url = "mirror://gnu/glibc/glibc-ports-2.12.1.tar.bz2"; - sha256 = "041ix0nq7nc5r7jf80jsdlw4idah2mjp5nf7khybhc4cs1kc31ir"; + url = "mirror://gnu/glibc/glibc-ports-2.14.1.tar.bz2"; + sha256 = "1acs4sd5mjzmssmd0md6dfqwnziph2am7v09mbnnd8aadpxhm0qw"; }; in @@ -32,7 +30,6 @@ assert (cross != null) -> (gccCross != null); assert (mig != null) -> (machHeaders != null); assert (machHeaders != null) -> (hurdHeaders != null); -assert (hurdHeaders != null) -> (libpthreadHeaders != null); assert (hurdHeaders != null) -> (fetchgit != null); stdenv.mkDerivation ({ @@ -75,6 +72,9 @@ stdenv.mkDerivation ({ /* Allow nixos and nix handle the locale-archive. */ ./nix-locale-archive.patch + + /* Without this patch many KDE binaries crash. */ + ./glibc-elf-localscope.patch ]; postPatch = '' @@ -90,6 +90,7 @@ stdenv.mkDerivation ({ configureFlags = [ "-C" "--enable-add-ons" + "--sysconfdir=/etc" "--localedir=/var/run/current-system/sw/lib/locale" (if kernelHeaders != null then "--with-headers=${kernelHeaders}/include" @@ -111,6 +112,8 @@ stdenv.mkDerivation ({ # so the glibc does not depend on its compiler store path "libc_cv_as_needed=no" ]; + + installFlags = [ "sysconfdir=$(out)/etc" ]; buildInputs = stdenv.lib.optionals (cross != null) [ gccCross ] ++ stdenv.lib.optional (mig != null) mig; @@ -143,12 +146,12 @@ stdenv.mkDerivation ({ # maintained by the Hurd folks, `tschwinge/Roger_Whittaker' branch. # See <http://www.gnu.org/software/hurd/source_repositories/glibc.html>. url = "git://git.sv.gnu.org/hurd/glibc.git"; - sha256 = "3fb3dd7030a4b6d3e144fa94c32a0c4f46f17f94e2dfbc6bef41cfc3198725ca"; - rev = "d740cf9d201dc9ecb0335b0a585828dea9cce793"; + sha256 = "f3590a54a9d897d121f91113949edbaaf3e30cdeacbb8d0a44de7b6564f6643e"; + rev = "df4c3faf0ccc848b5a8086c222bdb42679a9798f"; } else fetchurl { url = "mirror://gnu/glibc/glibc-${version}.tar.bz2"; - sha256 = "05hjz816a2hmzc44gxxi9vrdx6l9f23az794zj45xsxr94yfpy12"; + sha256 = "0fsvf5d6sib483rp7asdy8hs0dysxqkrvw316c82hsxy7vxa51bf"; }; # `fetchurl' is a function and thus should not be passed to the @@ -200,15 +203,11 @@ stdenv.mkDerivation ({ then { # Work around the fact that the configure snippet that looks for # <hurd/version.h> does not honor `--with-headers=$sysheaders' and that - # glibc expects Mach, Hurd, and pthread headers to be in the same place. - CPATH = "${hurdHeaders}/include:${machHeaders}/include:${libpthreadHeaders}/include"; + # glibc expects both Mach and Hurd headers to be in the same place. + CPATH = "${hurdHeaders}/include:${machHeaders}/include"; # `fetchgit' is a function and thus should not be passed to the # `derivation' primitive. fetchgit = null; - - # Install NSS stuff in the right place. - # XXX: This will be needed for all new glibcs and isn't Hurd-specific. - makeFlags = ''vardbdir="$out/var/db"''; } else { })) diff --git a/pkgs/development/libraries/glibc-2.14/default.nix b/pkgs/development/libraries/glibc-2.14/default.nix new file mode 100644 index 000000000000..31a8ef13a4fe --- /dev/null +++ b/pkgs/development/libraries/glibc-2.14/default.nix @@ -0,0 +1,83 @@ +{ stdenv, fetchurl, kernelHeaders +, machHeaders ? null, hurdHeaders ? null, mig ? null, fetchgit ? null +, installLocales ? true +, profilingLibraries ? false +, gccCross ? null +}: + +assert stdenv.gcc.gcc != null; + +let + build = import ./common.nix; + cross = if gccCross != null then gccCross.target else null; +in + build cross ({ + name = "glibc"; + + inherit fetchurl stdenv kernelHeaders installLocales profilingLibraries + gccCross; + + builder = ./builder.sh; + + # When building glibc from bootstrap-tools, we need libgcc_s at RPATH for + # any program we run, because the gcc will have been placed at a new + # store path than that determined when built (as a source for the + # bootstrap-tools tarball) + # Building from a proper gcc staying in the path where it was installed, + # libgcc_s will not be at {gcc}/lib, and gcc's libgcc will be found without + # any special hack. + preInstall = '' + if [ -f ${stdenv.gcc.gcc}/lib/libgcc_s.so.1 ]; then + ensureDir $out/lib + ln -s ${stdenv.gcc.gcc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1 + fi + ''; + + meta.description = "The GNU C Library"; + } + + // + + (if hurdHeaders != null + then rec { + inherit machHeaders hurdHeaders mig fetchgit; + + propagatedBuildInputs = [ machHeaders hurdHeaders ]; + + passthru = { + # When building GCC itself `propagatedBuildInputs' above is not + # honored, so we pass it here so that the GCC builder can do the right + # thing. + inherit propagatedBuildInputs; + }; + } + else { }) + + // + + (if cross != null + then { + preConfigure = '' + sed -i s/-lgcc_eh//g "../$sourceRoot/Makeconfig" + + cat > config.cache << "EOF" + libc_cv_forced_unwind=yes + libc_cv_c_cleanup=yes + libc_cv_gnu89_inline=yes + # Only due to a problem in gcc configure scripts: + libc_cv_sparc64_tls=${if cross.withTLS then "yes" else "no"} + EOF + export BUILD_CC=gcc + export CC="$crossConfig-gcc" + export AR="$crossConfig-ar" + export RANLIB="$crossConfig-ranlib" + + dontStrip=1 + ''; + + # To avoid a dependency on the build system 'bash'. + preFixup = '' + rm $out/bin/{ldd,tzselect,catchsegv,xtrace} + ''; + } + else {})) diff --git a/pkgs/development/libraries/glibc-2.14/glibc-elf-localscope.patch b/pkgs/development/libraries/glibc-2.14/glibc-elf-localscope.patch new file mode 100644 index 000000000000..98f7f81087bb --- /dev/null +++ b/pkgs/development/libraries/glibc-2.14/glibc-elf-localscope.patch @@ -0,0 +1,82 @@ +diff -ru a/elf/dl-close.c b/elf/dl-close.c +--- a/elf/dl-close.c 2011-02-04 00:35:03.000000000 +0100 ++++ b/elf/dl-close.c 2011-02-22 02:16:12.367883000 +0100 +@@ -180,24 +186,28 @@ + /* Signal the object is still needed. */ + l->l_idx = IDX_STILL_USED; + ++#define mark_used(dmap) \ ++ do { \ ++ if ((dmap)->l_idx != IDX_STILL_USED) \ ++ { \ ++ assert ((dmap)->l_idx >= 0 && (dmap)->l_idx < nloaded); \ ++ \ ++ if (!used[(dmap)->l_idx]) \ ++ { \ ++ used[(dmap)->l_idx] = 1; \ ++ if ((dmap)->l_idx - 1 < done_index) \ ++ done_index = (dmap)->l_idx - 1; \ ++ } \ ++ } \ ++ } while (0) ++ + /* Mark all dependencies as used. */ + if (l->l_initfini != NULL) + { + struct link_map **lp = &l->l_initfini[1]; + while (*lp != NULL) + { +- if ((*lp)->l_idx != IDX_STILL_USED) +- { +- assert ((*lp)->l_idx >= 0 && (*lp)->l_idx < nloaded); +- +- if (!used[(*lp)->l_idx]) +- { +- used[(*lp)->l_idx] = 1; +- if ((*lp)->l_idx - 1 < done_index) +- done_index = (*lp)->l_idx - 1; +- } +- } +- ++ mark_used(*lp); + ++lp; + } + } +@@ -206,19 +216,25 @@ + for (unsigned int j = 0; j < l->l_reldeps->act; ++j) + { + struct link_map *jmap = l->l_reldeps->list[j]; +- +- if (jmap->l_idx != IDX_STILL_USED) +- { +- assert (jmap->l_idx >= 0 && jmap->l_idx < nloaded); +- +- if (!used[jmap->l_idx]) +- { +- used[jmap->l_idx] = 1; +- if (jmap->l_idx - 1 < done_index) +- done_index = jmap->l_idx - 1; +- } +- } ++ mark_used(jmap); + } ++ /* And the same for owners of our scopes; normally, our last ++ scope provider would render us unused, but this can be ++ prevented by the NODELETE flag. */ ++ if (__builtin_expect(l->l_type == lt_loaded ++ && (l->l_flags_1 & DF_1_NODELETE), 0)) ++ for (size_t cnt = 0; l->l_scope[cnt] != NULL; ++cnt) ++ /* This relies on l_scope[] entries being always set either ++ to its own l_symbolic_searchlist address, or some map's ++ l_searchlist address. */ ++ if (l->l_scope[cnt] != &l->l_symbolic_searchlist) ++ { ++ struct link_map *ls = (struct link_map *) ++ ((char *) l->l_scope[cnt] ++ - offsetof (struct link_map, l_searchlist)); ++ assert (ls->l_ns == nsid); ++ mark_used(ls); ++ } + } + + /* Sort the entries. */ diff --git a/pkgs/development/libraries/glibc-2.14/info.nix b/pkgs/development/libraries/glibc-2.14/info.nix new file mode 100644 index 000000000000..84a16fefce9d --- /dev/null +++ b/pkgs/development/libraries/glibc-2.14/info.nix @@ -0,0 +1,26 @@ +{ stdenv, fetchurl, texinfo, perl }: + +let build = import ./common.nix; +in + /* null cross builder */ + build null { + name = "glibc-info"; + + inherit fetchurl stdenv; + + configureFlags = [ "--enable-add-ons" ]; + + buildInputs = [ texinfo perl ]; + + buildPhase = "make info"; + + # I don't know why the info is not generated in 'build' + # Somehow building the info still does not work, because the final + # libc.info hasn't a Top node. + installPhase = '' + ensureDir "$out/share/info" + cp -v "../$sourceRoot/manual/"*.info* "$out/share/info" + ''; + + meta.description = "GNU Info manual of the GNU C Library"; + } diff --git a/pkgs/development/libraries/glibc-2.14/locales-builder.sh b/pkgs/development/libraries/glibc-2.14/locales-builder.sh new file mode 100644 index 000000000000..d732e208fa22 --- /dev/null +++ b/pkgs/development/libraries/glibc-2.14/locales-builder.sh @@ -0,0 +1,17 @@ +# Glibc cannot have itself in its RPATH. +export NIX_NO_SELF_RPATH=1 + +source $stdenv/setup + +postConfigure() { + # Hack: get rid of the `-static' flag set by the bootstrap stdenv. + # This has to be done *after* `configure' because it builds some + # test binaries. + export NIX_CFLAGS_LINK= + export NIX_LDFLAGS_BEFORE= + + export NIX_DONT_SET_RPATH=1 + unset CFLAGS +} + +genericBuild diff --git a/pkgs/development/libraries/glibc-2.14/locales.nix b/pkgs/development/libraries/glibc-2.14/locales.nix new file mode 100644 index 000000000000..d598e0e094dc --- /dev/null +++ b/pkgs/development/libraries/glibc-2.14/locales.nix @@ -0,0 +1,47 @@ +/* This function builds just the `lib/locale/locale-archive' file from + Glibc and nothing else. If `allLocales' is true, all supported + locales are included; otherwise, just the locales listed in + `locales'. See localedata/SUPPORTED in the Glibc source tree for + the list of all supported locales: + http://sourceware.org/cgi-bin/cvsweb.cgi/libc/localedata/SUPPORTED?cvsroot=glibc +*/ + +{ stdenv, fetchurl, allLocales ? true, locales ? ["en_US.UTF-8/UTF-8"] }: + +let build = import ./common.nix; +in + build null { + name = "glibc-locales"; + + inherit fetchurl stdenv; + installLocales = true; + + builder = ./locales-builder.sh; + + # Awful hack: `localedef' doesn't allow the path to `locale-archive' + # to be overriden, but you *can* specify a prefix, i.e. it will use + # <prefix>/<path-to-glibc>/lib/locale/locale-archive. So we use + # $TMPDIR as a prefix, meaning that the locale-archive is placed in + # $TMPDIR/nix/store/...-glibc-.../lib/locale/locale-archive. + buildPhase = + '' + mkdir -p $TMPDIR/"$(dirname $(readlink -f $(type -p localedef)))/../lib/locale" + + # Hack to allow building of the locales (needed since glibc-2.12) + sed -i -e "s,^LOCALEDEF=.*,LOCALEDEF=localedef --prefix=$TMPDIR," -e \ + /library-path/d ../glibc-2*/localedata/Makefile + ${if allLocales then "" else + "echo SUPPORTED-LOCALES=\"${toString locales}\" > ../glibc-2*/localedata/SUPPORTED"} + + make localedata/install-locales \ + localedir=$out/lib/locale \ + ''; + + installPhase = + '' + ensureDir "$out/lib/locale" + cp -v "$TMPDIR/nix/store/"*"/lib/locale/locale-archive" "$out/lib/locale" + ''; + + meta.description = "Locale information for the GNU C Library"; + } diff --git a/pkgs/development/libraries/glibc-2.14/nix-locale-archive.patch b/pkgs/development/libraries/glibc-2.14/nix-locale-archive.patch new file mode 100644 index 000000000000..aca904f7ff44 --- /dev/null +++ b/pkgs/development/libraries/glibc-2.14/nix-locale-archive.patch @@ -0,0 +1,116 @@ +diff --git a/locale/loadarchive.c b/locale/loadarchive.c +index d545f17..0d8638a 100644 +--- a/locale/loadarchive.c ++++ b/locale/loadarchive.c +@@ -124,6 +124,25 @@ calculate_head_size (const struct locarhead *h) + } + + ++static int ++open_locale_archive () ++{ ++ int fd = -1; ++ char *path = getenv ("LOCALE_ARCHIVE_2_11"); ++ char *path2 = getenv ("LOCALE_ARCHIVE"); ++ const char *usualpath = "/usr/lib/locale/locale-archive"; ++ if (path) ++ fd = open_not_cancel_2 (path, O_RDONLY|O_LARGEFILE); ++ if (path2 && fd < 0) ++ fd = open_not_cancel_2 (path2, O_RDONLY|O_LARGEFILE); ++ if (fd < 0) ++ fd = open_not_cancel_2 (archfname, O_RDONLY|O_LARGEFILE); ++ if (fd < 0) ++ fd = open_not_cancel_2 (usualpath, O_RDONLY|O_LARGEFILE); ++ return fd; ++} ++ ++ + /* Find the locale *NAMEP in the locale archive, and return the + internalized data structure for its CATEGORY data. If this locale has + already been loaded from the archive, just returns the existing data +@@ -203,7 +222,7 @@ _nl_load_locale_from_archive (int category, const char **namep) + archmapped = &headmap; + + /* The archive has never been opened. */ +- fd = open_not_cancel_2 (archfname, O_RDONLY|O_LARGEFILE); ++ fd = open_locale_archive (); + if (fd < 0) + /* Cannot open the archive, for whatever reason. */ + return NULL; +@@ -394,7 +413,7 @@ _nl_load_locale_from_archive (int category, const char **namep) + if (fd == -1) + { + struct stat64 st; +- fd = open_not_cancel_2 (archfname, O_RDONLY|O_LARGEFILE); ++ fd = open_locale_archive (); + if (fd == -1) + /* Cannot open the archive, for whatever reason. */ + return NULL; +diff --git a/locale/programs/locale.c b/locale/programs/locale.c +index 77262b7..fddc00d 100644 +--- a/locale/programs/locale.c ++++ b/locale/programs/locale.c +@@ -628,6 +628,20 @@ nameentcmp (const void *a, const void *b) + ((const struct nameent *) b)->name); + } + ++static int ++open_nix_locale_archive (const char * fname, int access) ++{ ++ int fd = -1; ++ char *path = getenv ("LOCALE_ARCHIVE_2_11"); ++ char *path2 = getenv ("LOCALE_ARCHIVE"); ++ if (path) ++ fd = open64 (path, access); ++ if (path2 && fd < 0) ++ fd = open64 (path2, access); ++ if (fd < 0) ++ fd = open64 (fname, access); ++ return fd; ++} + + static int + write_archive_locales (void **all_datap, char *linebuf) +@@ -641,7 +658,7 @@ write_archive_locales (void **all_datap, char *linebuf) + int fd, ret = 0; + uint32_t cnt; + +- fd = open64 (ARCHIVE_NAME, O_RDONLY); ++ fd = open_nix_locale_archive (ARCHIVE_NAME, O_RDONLY); + if (fd < 0) + return 0; + +diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c +index 85ba77d..3ad2af8 100644 +--- a/locale/programs/locarchive.c ++++ b/locale/programs/locarchive.c +@@ -512,6 +512,20 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head) + *ah = new_ah; + } + ++static int ++open_nix_locale_archive (const char * fname, int access) ++{ ++ int fd = -1; ++ char *path = getenv ("LOCALE_ARCHIVE_2_11"); ++ char *path2 = getenv ("LOCALE_ARCHIVE"); ++ if (path) ++ fd = open64 (path, access); ++ if (path2 && fd < 0) ++ fd = open64 (path2, access); ++ if (fd < 0) ++ fd = open64 (fname, access); ++ return fd; ++} + + void + open_archive (struct locarhandle *ah, bool readonly) +@@ -531,7 +548,7 @@ open_archive (struct locarhandle *ah, bool readonly) + while (1) + { + /* Open the archive. We must have exclusive write access. */ +- fd = open64 (archivefname, readonly ? O_RDONLY : O_RDWR); ++ fd = open_nix_locale_archive (archivefname, readonly ? O_RDONLY : O_RDWR); + if (fd == -1) + { + /* Maybe the file does not yet exist. */ diff --git a/pkgs/development/libraries/glibc-2.14/nss-skip-unavail.patch b/pkgs/development/libraries/glibc-2.14/nss-skip-unavail.patch new file mode 100644 index 000000000000..e48dc2bc0a6e --- /dev/null +++ b/pkgs/development/libraries/glibc-2.14/nss-skip-unavail.patch @@ -0,0 +1,21 @@ +diff -ru glibc-2.11.2-orig/sysdeps/posix/getaddrinfo.c glibc-2.11.2/sysdeps/posix/getaddrinfo.c +--- glibc-2.11.2-orig/sysdeps/posix/getaddrinfo.c 2010-05-19 22:38:20.000000000 +0200 ++++ glibc-2.11.2/sysdeps/posix/getaddrinfo.c 2010-08-05 18:39:54.259556327 +0200 +@@ -505,8 +505,6 @@ + int no_data = 0; + int no_inet6_data = 0; + service_user *nip = NULL; +- enum nss_status inet6_status = NSS_STATUS_UNAVAIL; +- enum nss_status status = NSS_STATUS_UNAVAIL; + int no_more; + int old_res_options; + +@@ -702,6 +700,8 @@ + + while (!no_more) + { ++ enum nss_status inet6_status = NSS_STATUS_UNAVAIL; ++ enum nss_status status = NSS_STATUS_UNAVAIL; + no_data = 0; + nss_gethostbyname4_r fct4 + = __nss_lookup_function (nip, "gethostbyname4_r"); diff --git a/pkgs/development/libraries/glibc-2.14/rpcgen-path.patch b/pkgs/development/libraries/glibc-2.14/rpcgen-path.patch new file mode 100644 index 000000000000..fbb03dd5fade --- /dev/null +++ b/pkgs/development/libraries/glibc-2.14/rpcgen-path.patch @@ -0,0 +1,72 @@ +By default, rpcgen(1) looks for cpp(1) from a list of fixed absolute paths +(`/lib/cpp', etc.), which may only be overrided with the `-Y' option. This +patch makes it run any `cpp' command found in $PATH. + +--- glibc-2.7/sunrpc/rpc_main.c 2006-11-10 21:54:46.000000000 +0100 ++++ glibc-2.7/sunrpc/rpc_main.c 2009-04-22 14:32:10.000000000 +0200 +@@ -79,7 +79,7 @@ static const char *cmdname; + + static const char *svcclosetime = "120"; + static int cppDefined; /* explicit path for C preprocessor */ +-static const char *CPP = SUNOS_CPP; ++static const char *CPP = "cpp"; + static const char CPPFLAGS[] = "-C"; + static char *pathbuf; + static int cpp_pid; +@@ -108,7 +108,6 @@ static char *extendfile (const char *fil + static void open_output (const char *infile, const char *outfile); + static void add_warning (void); + static void clear_args (void); +-static void find_cpp (void); + static void open_input (const char *infile, const char *define); + static int check_nettype (const char *name, const char *list_to_check[]); + static void c_output (const char *infile, const char *define, +@@ -327,31 +326,6 @@ clear_args (void) + argcount = FIXEDARGS; + } + +-/* make sure that a CPP exists */ +-static void +-find_cpp (void) +-{ +- struct stat buf; +- +- if (stat (CPP, &buf) < 0) +- { /* /lib/cpp or explicit cpp does not exist */ +- if (cppDefined) +- { +- fprintf (stderr, _ ("cannot find C preprocessor: %s \n"), CPP); +- crash (); +- } +- else +- { /* try the other one */ +- CPP = SVR4_CPP; +- if (stat (CPP, &buf) < 0) +- { /* can't find any cpp */ +- fputs (_ ("cannot find any C preprocessor (cpp)\n"), stdout); +- crash (); +- } +- } +- } +-} +- + /* + * Open input file with given define for C-preprocessor + */ +@@ -370,7 +344,6 @@ open_input (const char *infile, const ch + switch (cpp_pid) + { + case 0: +- find_cpp (); + putarg (0, CPP); + putarg (1, CPPFLAGS); + addarg (define); +@@ -380,7 +353,7 @@ open_input (const char *infile, const ch + close (1); + dup2 (pd[1], 1); + close (pd[0]); +- execv (arglist[0], (char **) arglist); ++ execvp (arglist[0], (char **) arglist); + perror ("execv"); + exit (1); + case -1: diff --git a/pkgs/development/libraries/gmp/default.nix b/pkgs/development/libraries/gmp/default.nix index 338debaa81e7..1b079c051584 100644 --- a/pkgs/development/libraries/gmp/default.nix +++ b/pkgs/development/libraries/gmp/default.nix @@ -1,7 +1,8 @@ {stdenv, fetchurl, m4, cxx ? true, static ? false}: let - staticFlags = if static then " --enable-static --disable-shared" else ""; + staticFlags = stdenv.lib.optionals static + [ "--enable-static" "--disable-shared" ]; in stdenv.mkDerivation rec { @@ -14,12 +15,12 @@ stdenv.mkDerivation rec { buildNativeInputs = [m4]; - # Prevent the build system from using sub-architecture-specific - # instructions (e.g., SSE2 on i686). - preConfigure = "ln -sf configfsf.guess config.guess"; + configureFlags = + # Build a "fat binary", with routines for several sub-architectures (x86). + [ "--enable-fat" ] - configureFlags = if cxx then "--enable-cxx" else "--disable-cxx" + - staticFlags; + ++ (if cxx then [ "--enable-cxx" ] else [ "--disable-cxx" ]) + ++ staticFlags; dontDisableStatic = if static then true else false; diff --git a/pkgs/development/libraries/libtirpc/default.nix b/pkgs/development/libraries/libtirpc/default.nix new file mode 100644 index 000000000000..d9678f646b8c --- /dev/null +++ b/pkgs/development/libraries/libtirpc/default.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchurl }: + +let + version = "0.2.2"; +in +stdenv.mkDerivation { + name = "libtirpc-${version}"; + + src = fetchurl { + url = "mirror://sourceforge/libtirpc/libtirpc-${version}.tar.bz2"; + sha256 = "f05eb17c85d62423858b8f74512cfe66a9ae1cedf93f03c2a0a32e04f0a33705"; + }; + + meta = { + homepage = "http://sourceforge.net/projects/libtirpc/"; + description = "a port of Suns Transport-Independent RPC library to Linux"; + license = stdenv.lib.licenses.bsd3; + + platforms = stdenv.lib.platforms.linux; + maintainers = [ stdenv.lib.maintainers.simons ]; + }; +} diff --git a/pkgs/development/libraries/libxcrypt/default.nix b/pkgs/development/libraries/libxcrypt/default.nix index aea9e53eef6e..b2c9a2c9cf5b 100644 --- a/pkgs/development/libraries/libxcrypt/default.nix +++ b/pkgs/development/libraries/libxcrypt/default.nix @@ -11,4 +11,7 @@ stdenv.mkDerivation { url = ftp://ftp.suse.com/pub/people/kukuk/libxcrypt/libxcrypt-3.0.2.tar.bz2; sha256 = "15l2xvhi3r3b40x4665c101ikylh5xsbpw03gnszypfjgn1jkcii"; }; + + patches = [ ./gcc46.patch ]; + } diff --git a/pkgs/development/libraries/libxcrypt/gcc46.patch b/pkgs/development/libraries/libxcrypt/gcc46.patch new file mode 100644 index 000000000000..0664f96aa688 --- /dev/null +++ b/pkgs/development/libraries/libxcrypt/gcc46.patch @@ -0,0 +1,18 @@ +For gcc 4.6 to build this. Otherwise it says 's unused variable', and it's built +with -Werror. + +diff --git a/src/cert.c b/src/cert.c +index 28c7b11..34570a4 100644 +--- a/src/cert.c ++++ b/src/cert.c +@@ -87,9 +87,7 @@ char *cp; + int i,j,t; + + for(i=0;i<8;i++){ +- int s; +- +- s = scanf("%2x",&t); ++ scanf("%2x",&t); + if(feof(stdin)) + good_bye(); + for(j=0; j<8 ; j++) { diff --git a/pkgs/development/libraries/mpfr/default.nix b/pkgs/development/libraries/mpfr/default.nix index 51d33f9593c7..0ab745879aca 100644 --- a/pkgs/development/libraries/mpfr/default.nix +++ b/pkgs/development/libraries/mpfr/default.nix @@ -1,11 +1,11 @@ {stdenv, fetchurl, gmp}: stdenv.mkDerivation rec { - name = "mpfr-3.0.0"; + name = "mpfr-3.1.0"; src = fetchurl { url = "mirror://gnu/mpfr/${name}.tar.bz2"; - sha256 = "07w24h8by7n319p2vwwa1xdcg7qzkd1aqm84lfcbfv2kaff5yklg"; + sha256 = "105nx8qqx5x8f4rlplr2wk4cyv61iw5j3jgi2k21rpb8s6xbp9vl"; }; buildInputs = [ gmp ]; diff --git a/pkgs/development/libraries/ncurses/default.nix b/pkgs/development/libraries/ncurses/default.nix index b503493ac88e..93126d511356 100644 --- a/pkgs/development/libraries/ncurses/default.nix +++ b/pkgs/development/libraries/ncurses/default.nix @@ -11,11 +11,11 @@ let cxx = stdenv.system != "i686-solaris"; in stdenv.mkDerivation (rec { - name = "ncurses-5.7"; + name = "ncurses-5.9"; src = fetchurl { url = "mirror://gnu/ncurses/${name}.tar.gz"; - sha256 = "1x4q6kma6zgg438llbgiac3kik7j2lln9v97jdffv3fyqyjxx6qa"; + sha256 = "0fsn7xis81za62afan0vvm38bvgzg5wfmv1m86flqcj0nj7jjilh"; }; crossAttrs = { diff --git a/pkgs/development/libraries/opencv/changeset_r3190.diff b/pkgs/development/libraries/opencv/changeset_r3190.diff new file mode 100644 index 000000000000..4a614659e723 --- /dev/null +++ b/pkgs/development/libraries/opencv/changeset_r3190.diff @@ -0,0 +1,20 @@ +--- opencv/src/highgui/cvcap_ffmpeg.cpp ++++ opencv/src/highgui/cvcap_ffmpeg.cpp +@@ -49,6 +49,15 @@ + #if !defined(WIN32) || defined(__MINGW32__) + // some versions of FFMPEG assume a C99 compiler, and don't define INT64_C +-#ifndef INT64_C +-#define INT64_C ++#if !defined INT64_C || !defined UINT64_C ++# if __WORDSIZE == 64 ++# define INT64_C(c) c ## UL ++# else ++# define INT64_C(c) c ## ULL ++# endif ++# if __WORDSIZE == 64 ++# define UINT64_C(c) c ## UL ++# else ++# define UINT64_C(c) c ## ULL ++# endif + #define __STDC_CONSTANT_MACROS + // force re-inclusion of stdint.h to get INT64_C macro diff --git a/pkgs/development/libraries/opencv/default.nix b/pkgs/development/libraries/opencv/default.nix index 05db48095c3c..46c170d33f99 100644 --- a/pkgs/development/libraries/opencv/default.nix +++ b/pkgs/development/libraries/opencv/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, cmake, gtk, libjpeg, libpng, libtiff, jasper, ffmpeg -, pkgconfig, gstreamer }: +, pkgconfig, gstreamer, xineLib, glib }: let v = "2.3.1a"; in @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "0325s7pa2npcw2gc06pr6q5ik4xdyf08rvkfc0myn10w20lzb8m9"; }; - buildInputs = [ gtk libjpeg libpng libtiff jasper ffmpeg gstreamer ]; + buildInputs = [ gtk glib libjpeg libpng libtiff jasper ffmpeg xineLib gstreamer ]; buildNativeInputs = [ cmake pkgconfig ]; diff --git a/pkgs/development/libraries/opencv/default.nix.edited b/pkgs/development/libraries/opencv/default.nix.edited new file mode 100644 index 000000000000..05db48095c3c --- /dev/null +++ b/pkgs/development/libraries/opencv/default.nix.edited @@ -0,0 +1,27 @@ +{ stdenv, fetchurl, cmake, gtk, libjpeg, libpng, libtiff, jasper, ffmpeg +, pkgconfig, gstreamer }: + +let v = "2.3.1a"; in + +stdenv.mkDerivation rec { + name = "opencv-${v}"; + + src = fetchurl { + url = "mirror://sourceforge/opencvlibrary/OpenCV-${v}.tar.bz2"; + sha256 = "0325s7pa2npcw2gc06pr6q5ik4xdyf08rvkfc0myn10w20lzb8m9"; + }; + + buildInputs = [ gtk libjpeg libpng libtiff jasper ffmpeg gstreamer ]; + + buildNativeInputs = [ cmake pkgconfig ]; + + enableParallelBuilding = true; + + meta = { + description = "Open Computer Vision Library with more than 500 algorithms"; + homepage = http://opencv.willowgarage.com/; + license = "BSD"; + maintainers = with stdenv.lib.maintainers; [viric]; + platforms = with stdenv.lib.platforms; linux; + }; +} diff --git a/pkgs/development/libraries/openssl/1.0.0e.nix b/pkgs/development/libraries/openssl/1.0.0e.nix deleted file mode 100644 index 01f9eca15bb9..000000000000 --- a/pkgs/development/libraries/openssl/1.0.0e.nix +++ /dev/null @@ -1,74 +0,0 @@ -{ stdenv, fetchurl, perl }: - -let - name = "openssl-1.0.0e"; - - opensslCrossSystem = stdenv.lib.attrByPath [ "openssl" "system" ] - (throw "openssl needs its platform name cross building" null) - stdenv.cross; -in - -stdenv.mkDerivation { - inherit name; - - src = fetchurl { - url = "http://www.openssl.org/source/${name}.tar.gz"; - sha256 = "1xw0ffzmr4wbnb0glywgks375dvq8x87pgxmwx6vhgvkflkxqqg3"; - }; - - patches = - [ # Allow the location of the X509 certificate file (the CA - # bundle) to be set through the environment variable - # ‘OPENSSL_X509_CERT_FILE’. This is necessary because the - # default location ($out/ssl/cert.pem) doesn't exist, and - # hardcoding something like /etc/ssl/cert.pem is impure and - # cannot be overriden per-process. For security, the - # environment variable is ignored for setuid binaries. - ./cert-file.patch - ] - ++ stdenv.lib.optional stdenv.isDarwin ./darwin-arch.patch; - - buildNativeInputs = [ perl ]; - - # On x86_64-darwin, "./config" misdetects the system as - # "darwin-i386-cc". So specify the system type explicitly. - configureScript = - if stdenv.system == "x86_64-darwin" then "./Configure darwin64-x86_64-cc" else "./config"; - - configureFlags = "shared --libdir=lib"; - - makeFlags = "MANDIR=$(out)/share/man"; - - postInstall = - '' - # If we're building dynamic libraries, then don't install static - # libraries. - if [ -n "$(echo $out/lib/*.so)" ]; then - rm $out/lib/*.a - fi - ''; # */ - - crossAttrs = { - preConfigure='' - # It's configure does not like --build or --host - export configureFlags="--libdir=lib --cross-compile-prefix=${stdenv.cross.config}- shared ${opensslCrossSystem}" - ''; - - postInstall = '' - # Openssl installs readonly files, which otherwise we can't strip. - # This could at some stdenv hash change be put out of crossAttrs, too - chmod -R +w $out - - # Remove references to perl, to avoid depending on it at runtime - rm $out/bin/c_rehash $out/ssl/misc/CA.pl $out/ssl/misc/tsget - ''; - configureScript = "./Configure"; - }; - - meta = { - homepage = http://www.openssl.org/; - description = "A cryptographic library that implements the SSL and TLS protocols"; - platforms = stdenv.lib.platforms.all; - maintainers = [ stdenv.lib.maintainers.simons ]; - }; -} diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index 45d269a918b3..52fd0cc6b05e 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, perl }: let - name = "openssl-1.0.0d"; + name = "openssl-1.0.0e"; opensslCrossSystem = stdenv.lib.attrByPath [ "openssl" "system" ] (throw "openssl needs its platform name cross building" null) @@ -18,11 +18,20 @@ stdenv.mkDerivation { src = fetchurl { url = "http://www.openssl.org/source/${name}.tar.gz"; - sha256 = "1nr0cf6pf8i4qsnx31kqhiqv402xgn76yhjhlbdri8ma1hgislcj"; + sha256 = "1xw0ffzmr4wbnb0glywgks375dvq8x87pgxmwx6vhgvkflkxqqg3"; }; patches = - stdenv.lib.optional stdenv.isDarwin ./darwin-arch.patch + [ # Allow the location of the X509 certificate file (the CA + # bundle) to be set through the environment variable + # ‘OPENSSL_X509_CERT_FILE’. This is necessary because the + # default location ($out/ssl/cert.pem) doesn't exist, and + # hardcoding something like /etc/ssl/cert.pem is impure and + # cannot be overriden per-process. For security, the + # environment variable is ignored for setuid binaries. + ./cert-file.patch + ] + ++ stdenv.lib.optional stdenv.isDarwin ./darwin-arch.patch ++ stdenv.lib.optional (stdenv.system == "x86_64-freebsd") ./freebsd-x86_64-asm.patch; buildNativeInputs = [ perl ]; @@ -34,6 +43,8 @@ stdenv.mkDerivation { configureFlags = "shared --libdir=lib"; + makeFlags = "MANDIR=$(out)/share/man"; + postInstall = '' # If we're building dynamic libraries, then don't install static diff --git a/pkgs/development/libraries/ppl/default.nix b/pkgs/development/libraries/ppl/default.nix index 677d578e2425..d8ffde644de1 100644 --- a/pkgs/development/libraries/ppl/default.nix +++ b/pkgs/development/libraries/ppl/default.nix @@ -1,15 +1,15 @@ { fetchurl, stdenv, gmpxx, perl, gnum4, static ? false }: let - version = "0.10.2"; - staticFlags = if static then " --enable-static --disable-shared" else ""; + version = "0.11"; + staticFlags = if static then " --enable-static --disable-shared --disable-watchdog" else ""; in stdenv.mkDerivation rec { name = "ppl-${version}"; src = fetchurl { url = "mirror://gcc/infrastructure/ppl-${version}.tar.gz"; - sha256 = "0lly44sac4jd72klnhhil3wha15vak76r6gy88sh0zjsaww9hf6h"; + sha256 = "0xqwyaj232gi0pgm6z2rihk6p8l1rngbbibnhmcrbq4jq550clrl"; }; buildNativeInputs = [ perl gnum4 ]; diff --git a/pkgs/development/libraries/readline/readline-patches.nix b/pkgs/development/libraries/readline/readline-6.2-patches.nix index b8019fb33502..ae1e67224af5 100644 --- a/pkgs/development/libraries/readline/readline-patches.nix +++ b/pkgs/development/libraries/readline/readline-6.2-patches.nix @@ -1,4 +1,5 @@ # Automatically generated by `update-patch-set.sh'; do not edit. patch: [ +(patch "001" "1qxl74f4n0hv4a807byrgbk4ixd8m50apj3922q2ss9pfi0nra1q") ] diff --git a/pkgs/development/libraries/readline/readline6.nix b/pkgs/development/libraries/readline/readline6.nix index 1bd88069127f..0826e6c5f7cb 100644 --- a/pkgs/development/libraries/readline/readline6.nix +++ b/pkgs/development/libraries/readline/readline6.nix @@ -1,11 +1,11 @@ { fetchurl, stdenv, ncurses }: stdenv.mkDerivation (rec { - name = "readline-6.1"; + name = "readline-6.2"; src = fetchurl { url = "mirror://gnu/readline/${name}.tar.gz"; - sha256 = "0sd97zqdh4fc0zzgzpskkczwa2fmb0s89qdyndb6vkbcq04gdjph"; + sha256 = "10ckm2bd2rkxhvdmj7nmbsylmihw0abwcsnxf8y27305183rd9kr"; }; propagatedBuildInputs = [ncurses]; @@ -17,11 +17,11 @@ stdenv.mkDerivation (rec { (let patch = nr: sha256: fetchurl { - url = "mirror://gnu/readline/${name}-patches/readline61-${nr}"; + url = "mirror://gnu/readline/${name}-patches/readline62-${nr}"; inherit sha256; }; in - import ./readline-patches.nix patch); + import ./readline-6.2-patches.nix patch); meta = { description = "GNU Readline, a library for interactive line editing"; diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index f1b8a006ecfd..a2f11bca87d4 100644 --- a/pkgs/development/libraries/zlib/default.nix +++ b/pkgs/development/libraries/zlib/default.nix @@ -1,6 +1,6 @@ -{stdenv, fetchurl, static ? false}: +{ stdenv, fetchurl, static ? false }: -stdenv.mkDerivation (rec { +stdenv.mkDerivation rec { name = "zlib-1.2.5"; src = fetchurl { @@ -8,6 +8,10 @@ stdenv.mkDerivation (rec { sha256 = "0n7rlgvjn73pyil3s1l6p77m7wkc809n934rnzxv1b1za4pfar30"; }; + patches = + [ ./zlib-LARGEFILE64_SOURCE.patch ] + ++ stdenv.lib.optional (stdenv.system == "i686-cygwin") [ ./no-shared.patch ]; + configureFlags = if static then "" else "--shared"; preConfigure = '' @@ -17,6 +21,10 @@ stdenv.mkDerivation (rec { fi ''; + # As zlib takes part in the stdenv building, we don't want references + # to the bootstrap-tools libgcc (as uses to happen on arm/mips) + NIX_CFLAGS_COMPILE = "-static-libgcc"; + crossAttrs = { dontStrip = if static then true else false; } // (if stdenv.cross.libc == "msvcrt" then { @@ -31,7 +39,4 @@ stdenv.mkDerivation (rec { # zlib doesn't like the automatic --disable-shared from the Cygwin stdenv. cygwinConfigureEnableShared = true; - -} // stdenv.lib.optionalAttrs (stdenv.system == "i686-cygwin") { - patches = [ ./no-shared.patch ]; -}) +} diff --git a/pkgs/development/libraries/zlib/zlib-LARGEFILE64_SOURCE.patch b/pkgs/development/libraries/zlib/zlib-LARGEFILE64_SOURCE.patch new file mode 100644 index 000000000000..6ddb0ad70666 --- /dev/null +++ b/pkgs/development/libraries/zlib/zlib-LARGEFILE64_SOURCE.patch @@ -0,0 +1,69 @@ +http://mail.madler.net/pipermail/zlib-devel_madler.net/2011-June/002583.html + +[Zlib-devel] Possible typo in zlib.h + +Mark Adler madler at madler.net + +*** a/zlib.h 2010-04-19 21:12:48.000000000 -0700 +--- b/zlib.h 2011-02-26 21:23:30.000000000 -0800 +*************** +*** 1572,1584 **** + #endif + + #if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0 +! # define gzopen gzopen64 +! # define gzseek gzseek64 +! # define gztell gztell64 +! # define gzoffset gzoffset64 +! # define adler32_combine adler32_combine64 +! # define crc32_combine crc32_combine64 +! # ifdef _LARGEFILE64_SOURCE + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); + ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); +--- 1580,1601 ---- + #endif + + #if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0 +! # ifdef Z_PREFIX_SET +! # define z_gzopen z_gzopen64 +! # define z_gzseek z_gzseek64 +! # define z_gztell z_gztell64 +! # define z_gzoffset z_gzoffset64 +! # define z_adler32_combine z_adler32_combine64 +! # define z_crc32_combine z_crc32_combine64 +! # else +! # define gzopen gzopen64 +! # define gzseek gzseek64 +! # define gztell gztell64 +! # define gzoffset gzoffset64 +! # define adler32_combine adler32_combine64 +! # define crc32_combine crc32_combine64 +! # endif +! # ifndef _LARGEFILE64_SOURCE + ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *)); + ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int)); + ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile)); +*** a/zconf.h.in 2010-04-18 10:58:06.000000000 -0700 +--- b/zconf.h.in 2010-07-18 09:05:49.000000000 -0700 +*************** +*** 374,380 **** + # undef _LARGEFILE64_SOURCE + #endif + +! #if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE) + # include <unistd.h> /* for SEEK_* and off_t */ + # ifdef VMS + # include <unixio.h> /* for off_t */ +--- 375,385 ---- + # undef _LARGEFILE64_SOURCE + #endif + +! #if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0 +! # define Z_LARGE +! #endif +! +! #if defined(Z_HAVE_UNISTD_H) || defined(Z_LARGE) + # include <unistd.h> /* for SEEK_* and off_t */ + # ifdef VMS + # include <unixio.h> /* for off_t */ diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix index c7484ee6e84b..249e441be5db 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -7,7 +7,7 @@ with stdenv.lib; let os = stdenv.lib.optionalString; majorVersion = "2.8"; - minorVersion = "4"; + minorVersion = "6"; version = "${majorVersion}.${minorVersion}"; in @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "${meta.homepage}files/v${majorVersion}/cmake-${version}.tar.gz"; - sha256 = "1k2kjaj3vfifb329ff7fr4hcbpbaqb66l97pshq70h7m0zwajznr"; + sha256 = "13kjfpgsrsygz693bzaf2pf9avzr1r56r6znn3zqaz9nmj0rp6g6"; }; patches = diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index 4ccaa550313b..2eb9d43bcbec 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, noSysDirs, zlib, cross ? null, gold ? false, bison ? null, flex2535 ? null, bc ? null, dejagnu ? null }: let - basename = "binutils-2.21"; + basename = "binutils-2.21.1a"; in stdenv.mkDerivation rec { name = basename + stdenv.lib.optionalString (cross != null) "-${cross.config}"; @@ -23,8 +23,8 @@ stdenv.mkDerivation rec { # {enter "anoncvs" as the password} # cvs -z 9 -d :pserver:anoncvs@sourceware.org:/cvs/src co cgen src = fetchurl { - url = "http://nixos.org/tarballs/${basename}.tar.bz2"; - sha256 = "1iyhc42zfa0j2gaxy4zvpk47sdqj4rqvib0mb8597ss8yidyrav0"; + url = "mirror://gnu/binutils/${basename}.tar.bz2"; + sha256 = "0m7nmd7gc9d9md43wbrv65hz6lbi2crqwryzpigv19ray1lzmv6d"; }; patches = [ @@ -53,6 +53,10 @@ stdenv.mkDerivation rec { done ''; + # As binutils takes part in the stdenv building, we don't want references + # to the bootstrap-tools libgcc (as uses to happen on arm/mips) + NIX_CFLAGS_COMPILE = "-static-libgcc"; + configureFlags = "--disable-werror" # needed for dietlibc build + stdenv.lib.optionalString (stdenv.system == "mips64-linux") " --enable-fix-loongson2f-nop" diff --git a/pkgs/development/tools/misc/gnum4/default.nix b/pkgs/development/tools/misc/gnum4/default.nix index df417c3e55e8..12cc50a37a00 100644 --- a/pkgs/development/tools/misc/gnum4/default.nix +++ b/pkgs/development/tools/misc/gnum4/default.nix @@ -1,17 +1,17 @@ {stdenv, fetchurl}: stdenv.mkDerivation { - name = "gnum4-1.4.15"; + name = "gnum4-1.4.16"; src = fetchurl { - url = mirror://gnu/m4/m4-1.4.15.tar.bz2; - sha256 = "1ygzshj4h6l6wh52vjqczkyahmv67r3yzi1m6nkh94qgndffmbqa"; + url = mirror://gnu/m4/m4-1.4.16.tar.bz2; + sha256 = "035r7ma272j2cwni2961jp22k6bn3n9xwn3b3qbcn2yrvlghql22"; }; doCheck = !stdenv.isDarwin; # Upstream is aware of it; it may be in the next release. - patches = [ ./s_isdir.patch ]; + patches = [ ./s_isdir.patch ./readlink-EINVAL.patch ]; meta = { homepage = http://www.gnu.org/software/m4/; diff --git a/pkgs/development/tools/misc/gnum4/readlink-EINVAL.patch b/pkgs/development/tools/misc/gnum4/readlink-EINVAL.patch new file mode 100644 index 000000000000..dd371584a798 --- /dev/null +++ b/pkgs/development/tools/misc/gnum4/readlink-EINVAL.patch @@ -0,0 +1,18 @@ +Newer Linux kernels would return EINVAL instead of ENOENT. +The patch below, taken from Gnulib, allows the test to pass when +these Linux versions are in use: +https://lists.gnu.org/archive/html/bug-gnulib/2011-03/msg00308.html . + +diff --git a/tests/test-readlink.h b/tests/test-readlink.h +index 08d5662..7247fc4 100644 +--- a/tests/test-readlink.h ++++ b/tests/test-readlink.h +@@ -38,7 +38,7 @@ test_readlink (ssize_t (*func) (char const *, char *, size_t), bool print) + ASSERT (errno == ENOENT); + errno = 0; + ASSERT (func ("", buf, sizeof buf) == -1); +- ASSERT (errno == ENOENT); ++ ASSERT (errno == ENOENT || errno == EINVAL); + errno = 0; + ASSERT (func (".", buf, sizeof buf) == -1); + ASSERT (errno == EINVAL); diff --git a/pkgs/development/tools/misc/patchelf/0.6.nix b/pkgs/development/tools/misc/patchelf/0.6.nix deleted file mode 100644 index 857aa1cabcf9..000000000000 --- a/pkgs/development/tools/misc/patchelf/0.6.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ stdenv, fetchurl }: - -stdenv.mkDerivation rec { - name = "patchelf-0.6"; - - src = fetchurl { - url = "http://nixos.org/releases/patchelf/${name}/${name}.tar.bz2"; - sha256 = "fc7e7fa95f282fc37a591a802629e0e1ed07bc2a8bf162228d9a69dd76127c01"; - }; - - meta = { - homepage = http://nixos.org/patchelf.html; - license = "GPL"; - description = "A small utility to modify the dynamic linker and RPATH of ELF executables"; - }; -} diff --git a/pkgs/development/tools/misc/patchelf/default.nix b/pkgs/development/tools/misc/patchelf/default.nix index 43944ca9acd3..857aa1cabcf9 100644 --- a/pkgs/development/tools/misc/patchelf/default.nix +++ b/pkgs/development/tools/misc/patchelf/default.nix @@ -1,11 +1,11 @@ -{stdenv, fetchurl}: +{ stdenv, fetchurl }: stdenv.mkDerivation rec { - name = "patchelf-0.5"; - + name = "patchelf-0.6"; + src = fetchurl { url = "http://nixos.org/releases/patchelf/${name}/${name}.tar.bz2"; - sha256 = "24b9a850af45e1a277e234b9eb090b52305a2e1c6b02addeb3ae98b4b49d37ce"; + sha256 = "fc7e7fa95f282fc37a591a802629e0e1ed07bc2a8bf162228d9a69dd76127c01"; }; meta = { diff --git a/pkgs/development/tools/parsing/bison/bison-2.5.nix b/pkgs/development/tools/parsing/bison/bison-2.5.nix index 24fc0d1bbb35..98c465a185cf 100644 --- a/pkgs/development/tools/parsing/bison/bison-2.5.nix +++ b/pkgs/development/tools/parsing/bison/bison-2.5.nix @@ -10,6 +10,9 @@ stdenv.mkDerivation rec { buildNativeInputs = [ m4 ] ++ stdenv.lib.optional doCheck perl; + propagatedBuildInputs = [ m4 ]; + + M4 = "m4"; doCheck = true; diff --git a/pkgs/games/trackballs/default.nix b/pkgs/games/trackballs/default.nix index bdac6cddf2d2..f945e99c071b 100644 --- a/pkgs/games/trackballs/default.nix +++ b/pkgs/games/trackballs/default.nix @@ -1,8 +1,11 @@ -{stdenv, fetchurl, SDL, mesa, SDL_ttf, gettext, zlib, SDL_mixer, SDL_image, guile, - debug ? false } : +{ stdenv, fetchurl, SDL, mesa, SDL_ttf, gettext, zlib, SDL_mixer, SDL_image, guile +, debug ? false }: + +with stdenv.lib; stdenv.mkDerivation rec { name = "trackballs-1.1.4"; + src = fetchurl { url = mirror://sourceforge/trackballs/trackballs-1.1.4.tar.gz; sha256 = "19ilnif59sxa8xmfisk90wngrd11pj8s86ixzypv8krm4znbm7a5"; @@ -10,16 +13,14 @@ stdenv.mkDerivation rec { buildInputs = [ zlib mesa SDL SDL_ttf SDL_mixer SDL_image guile gettext ]; - CFLAGS = if debug then "-g -O0" else null; + CFLAGS = optionalString debug "-g -O0"; CXXFLAGS = CFLAGS; - NIX_STRIP_DEBUG = if debug then "0" else "1"; - dontStrip = if debug then true else false; - postUnpack = if debug then - "ensureDir $out/src; cp -R * $out/src ; cd $out/src" - else null; + dontStrip = debug; + postUnpack = optionalString debug + "ensureDir $out/src; cp -R * $out/src ; cd $out/src"; - NIX_CFLAGS_COMPILE="-iquote ${SDL}/include/SDL"; - configureFlags = if debug then "--enable-debug" else null; + NIX_CFLAGS_COMPILE = "-iquote ${SDL}/include/SDL"; + configureFlags = optionalString debug "--enable-debug"; patchPhase = '' sed -i -e 's/images icons music/images music/' share/Makefile.in diff --git a/pkgs/lib/lists.nix b/pkgs/lib/lists.nix index 6adda85a087e..e5b47f0d9ce7 100644 --- a/pkgs/lib/lists.nix +++ b/pkgs/lib/lists.nix @@ -54,6 +54,11 @@ rec { filter = pred: list: fold (x: y: if pred x then [x] ++ y else y) [] list; + # Remove elements 'e' from a list. Useful for buildInputs + remove = e: filter (x: x != e); + + # Given two lists, removes all elements of the first list from the second list + removeList = l: filter (x: elem x l); # Return true if `list' has an element `x': elem = x: list: fold (a: bs: x == a || bs) false list; diff --git a/pkgs/misc/cups/default.nix b/pkgs/misc/cups/default.nix index 8a9efdedcf97..56461f2e8588 100644 --- a/pkgs/misc/cups/default.nix +++ b/pkgs/misc/cups/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, pkgconfig, zlib, libjpeg, libpng, libtiff, pam, openssl , dbus, libusb, acl }: -let version = "1.4.7"; in +let version = "1.5.0"; in stdenv.mkDerivation { name = "cups-${version}"; @@ -10,7 +10,7 @@ stdenv.mkDerivation { src = fetchurl { url = "http://ftp.easysw.com/pub/cups/${version}/cups-${version}-source.tar.bz2"; - sha256 = "1xlnkdqldq81pdqgisqbyh92k249bzz35m1f5bp4la06p00ksvjf"; + sha256 = "0czc0bmrm31jy03inm6w2mbr5s9q9xk6s1x5x4kddx2qlml9pyf6"; }; buildInputs = [ pkgconfig zlib libjpeg libpng libtiff pam dbus libusb acl ]; @@ -40,8 +40,8 @@ stdenv.mkDerivation { meta = { homepage = http://www.cups.org/; description = "A standards-based printing system for UNIX"; - license = "GPLv2"; # actually LGPL for the library and GPL for the rest - maintainers = [ stdenv.lib.maintainers.urkud ]; + license = stdenv.lib.licenses.gpl2; # actually LGPL for the library and GPL for the rest + maintainers = [ stdenv.lib.maintainers.urkud stdenv.lib.maintainers.simons ]; platforms = stdenv.lib.platforms.linux; }; } diff --git a/pkgs/misc/misc.nix b/pkgs/misc/misc.nix index 15ea4f8bcc1e..1b026ebb684b 100644 --- a/pkgs/misc/misc.nix +++ b/pkgs/misc/misc.nix @@ -113,7 +113,6 @@ in dontStrip = true; - NIX_STRIP_DEBUG=0; CFLAGS="-ggdb -O0"; CXXFLAGS="-ggdb -O0"; diff --git a/pkgs/misc/uboot/default.nix b/pkgs/misc/uboot/default.nix index ffd40673b2f3..0ad55339d08f 100644 --- a/pkgs/misc/uboot/default.nix +++ b/pkgs/misc/uboot/default.nix @@ -30,7 +30,6 @@ stdenv.mkDerivation { buildNativeInputs = [ unzip ]; dontStrip = true; - NIX_STRIP_DEBUG = false; installPhase = '' ensureDir $out diff --git a/pkgs/misc/uboot/guruplug.nix b/pkgs/misc/uboot/guruplug.nix index f8048bbe0f4e..b78424acfaed 100644 --- a/pkgs/misc/uboot/guruplug.nix +++ b/pkgs/misc/uboot/guruplug.nix @@ -42,7 +42,6 @@ stdenv.mkDerivation { buildNativeInputs = [ unzip ]; dontStrip = true; - NIX_STRIP_DEBUG = false; installPhase = '' ensureDir $out diff --git a/pkgs/misc/uboot/nanonote.nix b/pkgs/misc/uboot/nanonote.nix index ff7c7742265e..ef0bc190980a 100644 --- a/pkgs/misc/uboot/nanonote.nix +++ b/pkgs/misc/uboot/nanonote.nix @@ -46,7 +46,6 @@ stdenv.mkDerivation { ''; dontStrip = true; - NIX_STRIP_DEBUG = false; installPhase = '' ensureDir $out diff --git a/pkgs/misc/uboot/sheevaplug.nix b/pkgs/misc/uboot/sheevaplug.nix index 5c38f1d053bb..83d029d41546 100644 --- a/pkgs/misc/uboot/sheevaplug.nix +++ b/pkgs/misc/uboot/sheevaplug.nix @@ -45,7 +45,6 @@ stdenv.mkDerivation { buildNativeInputs = [ unzip ]; dontStrip = true; - NIX_STRIP_DEBUG = false; installPhase = '' ensureDir $out diff --git a/pkgs/os-specific/linux/kernel-headers/default.nix b/pkgs/os-specific/linux/kernel-headers/default.nix new file mode 100644 index 000000000000..bb2e6a288037 --- /dev/null +++ b/pkgs/os-specific/linux/kernel-headers/default.nix @@ -0,0 +1,59 @@ +{stdenv, fetchurl, perl, cross ? null, kernel}: + +assert cross == null -> stdenv.isLinux; + +let + version = kernel.version; + kernelHeadersBaseConfig = if (cross == null) then + stdenv.platform.kernelHeadersBaseConfig + else + cross.platform.kernelHeadersBaseConfig; +in + +stdenv.mkDerivation { + name = "linux-headers-${version}"; + + src = kernel.src; + + targetConfig = if (cross != null) then cross.config else null; + + platform = + if cross != null then cross.platform.kernelArch else + if stdenv.system == "i686-linux" then "i386" else + if stdenv.system == "x86_64-linux" then "x86_64" else + if stdenv.system == "powerpc-linux" then "powerpc" else + if stdenv.system == "armv5tel-linux" then "arm" else + if stdenv.platform ? kernelArch then stdenv.platform.kernelArch else + abort "don't know what the kernel include directory is called for this platform"; + + buildInputs = [perl]; + + extraIncludeDirs = + if cross != null then + (if cross.arch == "powerpc" then ["ppc"] else []) + else if stdenv.system == "powerpc-linux" then ["ppc"] else []; + + buildPhase = '' + if test -n "$targetConfig"; then + export ARCH=$platform + fi + make ${kernelHeadersBaseConfig} + make mrproper headers_check + ''; + + installPhase = '' + make INSTALL_HDR_PATH=$out headers_install + + # Some builds (e.g. KVM) want a kernel.release. + ensureDir $out/include/config + echo "${version}-default" > $out/include/config/kernel.release + ''; + + # !!! hacky + fixupPhase = '' + ln -s asm $out/include/asm-$platform + if test "$platform" = "i386" -o "$platform" = "x86_64"; then + ln -s asm $out/include/asm-x86 + fi + ''; +} diff --git a/pkgs/os-specific/linux/module-init-tools/default.nix b/pkgs/os-specific/linux/module-init-tools/default.nix index 79e1111d40d6..077d08f899da 100644 --- a/pkgs/os-specific/linux/module-init-tools/default.nix +++ b/pkgs/os-specific/linux/module-init-tools/default.nix @@ -1,19 +1,26 @@ { stdenv, fetchurl, docbook2x, docbook_sgml_dtd_41 }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { name = "module-init-tools-3.16"; - src = fetchurl { - url = "mirror://kernel/linux/utils/kernel/module-init-tools/${name}.tar.bz2"; - sha256 = "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"; - }; + src = [ + (fetchurl { + url = mirror://kernel/linux/utils/kernel/module-init-tools/module-init-tools-3.16.tar.bz2; + sha256 = "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"; + }) - buildInputs = [ docbook2x ]; + # Upstream forgot to include the generated manpages. Thankfully + # the Gentoo people fixed this for us :-) + (fetchurl { + url = mirror://gentoo/distfiles/module-init-tools-3.16-man.tar.bz2; + sha256 = "1j1nzi87kgsh4scl645fhwhjvljxj83cmdasa4n4p5krhasgw358"; + }) + ]; SGML_CATALOG_FILES = "${docbook_sgml_dtd_41}/sgml/dtd/docbook-4.1/docbook.cat"; patches = [ ./module-dir.patch ./docbook2man.patch ]; - + postInstall = "rm $out/sbin/insmod.static"; # don't need it # We don't want bash (and therefore glibc) in the closure of the diff --git a/pkgs/os-specific/linux/module-init-tools/module-dir.patch b/pkgs/os-specific/linux/module-init-tools/module-dir.patch index 90805b00c3cf..95c7559604dd 100644 --- a/pkgs/os-specific/linux/module-init-tools/module-dir.patch +++ b/pkgs/os-specific/linux/module-init-tools/module-dir.patch @@ -1,36 +1,43 @@ -diff -Naur module-init-tools-3.16-orig/depmod.c module-init-tools-3.16/depmod.c ---- module-init-tools-3.16-orig/depmod.c 2011-06-02 13:55:01.000000000 -0400 -+++ module-init-tools-3.16/depmod.c 2011-10-01 23:30:14.947293695 -0400 -@@ -48,10 +48,6 @@ +commit cf2c95edb7918bc658f6cae93793c1949fc9cb6e +Author: David Guibert <david.guibert@gmail.com> +Date: Fri Aug 5 14:20:12 2011 +0200 + + introduce module-dir + +diff --git a/depmod.c b/depmod.c +index a1d2f8c..9362a35 100644 +--- a/depmod.c ++++ b/depmod.c +@@ -48,9 +48,6 @@ #include "testing.h" -#ifndef MODULE_DIR -#define MODULE_DIR "/lib/modules/" -#endif -- + #ifndef MODULE_BUILTIN_KEY #define MODULE_BUILTIN_KEY "built-in" - #endif -@@ -1514,6 +1510,7 @@ - struct module_overrides **overrides) - { +@@ -1516,6 +1513,7 @@ static int parse_config_file(const char *filename, char *line; -+ char *module_dir; unsigned int linenum = 0; FILE *cfile; ++ char *module_dir; -@@ -1536,6 +1533,9 @@ - continue; - } + cfile = fopen(filename, "r"); + if (!cfile) { +@@ -1525,6 +1523,10 @@ static int parse_config_file(const char *filename, + return 0; + } -+ if((module_dir = getenv("MODULE_DIR")) == NULL) -+ module_dir = "/lib/modules/"; ++ if((module_dir = getenv("MODULE_DIR")) == NULL) { ++ module_dir = "/lib/modules/"; ++ } + - if (streq(cmd, "search")) { - char *search_path; - -@@ -1550,7 +1550,7 @@ + while ((line = getline_wrapped(cfile, &linenum)) != NULL) { + char *ptr = line; + char *cmd, *modname; +@@ -1550,7 +1552,7 @@ static int parse_config_file(const char *filename, continue; } nofail_asprintf(&dirname, "%s%s%s/%s", basedir, @@ -39,7 +46,7 @@ diff -Naur module-init-tools-3.16-orig/depmod.c module-init-tools-3.16/depmod.c len = strlen(dirname); *search = add_search(dirname, len, *search); free(dirname); -@@ -1565,7 +1565,7 @@ +@@ -1565,7 +1567,7 @@ static int parse_config_file(const char *filename, continue; nofail_asprintf(&pathname, "%s%s%s/%s/%s.ko", basedir, @@ -48,27 +55,28 @@ diff -Naur module-init-tools-3.16-orig/depmod.c module-init-tools-3.16/depmod.c *overrides = add_override(pathname, *overrides); free(pathname); -@@ -1737,6 +1737,7 @@ +@@ -1737,6 +1739,7 @@ int main(int argc, char *argv[]) char *basedir = "", *dirname, *version; char *system_map = NULL, *module_symvers = NULL; int i; -+ char *module_dir; ++ char *module_dir; const char *config = NULL; if (native_endianness() == 0) -@@ -1832,7 +1833,10 @@ +@@ -1832,7 +1835,11 @@ int main(int argc, char *argv[]) if (optind == argc) all = 1; - nofail_asprintf(&dirname, "%s%s%s", basedir, MODULE_DIR, version); -+ if((module_dir = getenv("MODULE_DIR")) == NULL) -+ module_dir = "/lib/modules/"; ++ if((module_dir = getenv("MODULE_DIR")) == NULL) { ++ module_dir = "/lib/modules/"; ++ } + + nofail_asprintf(&dirname, "%s%s%s", basedir, module_dir, version); if (maybe_all) { if (!doing_stdout && !depfile_out_of_date(dirname)) -@@ -1850,7 +1854,7 @@ +@@ -1850,7 +1857,7 @@ int main(int argc, char *argv[]) size_t len; nofail_asprintf(&dirname, "%s%s%s/updates", basedir, @@ -77,36 +85,35 @@ diff -Naur module-init-tools-3.16-orig/depmod.c module-init-tools-3.16/depmod.c len = strlen(dirname); search = add_search(dirname, len, search); } -diff -Naur module-init-tools-3.16-orig/modinfo.c module-init-tools-3.16/modinfo.c ---- module-init-tools-3.16-orig/modinfo.c 2011-06-02 13:55:01.000000000 -0400 -+++ module-init-tools-3.16/modinfo.c 2011-10-01 23:32:15.335093548 -0400 -@@ -19,10 +19,6 @@ +diff --git a/modinfo.c b/modinfo.c +index 1dd8469..67b1041 100644 +--- a/modinfo.c ++++ b/modinfo.c +@@ -19,9 +19,6 @@ #include "zlibsupport.h" #include "testing.h" -#ifndef MODULE_DIR -#define MODULE_DIR "/lib/modules" -#endif -- + struct param { - struct param *next; -@@ -192,6 +188,7 @@ - unsigned long size; +@@ -193,6 +190,11 @@ static struct elf_file *grab_module(const char *name, struct utsname buf; char *depname, *p, *moddir; -+ char *module_dir; struct elf_file *module; ++ char *module_dir; ++ ++ if((module_dir = getenv("MODULE_DIR")) == NULL) { ++ module_dir = "/lib/modules/"; ++ } if (strchr(name, '.') || strchr(name, '/')) { -@@ -206,10 +203,14 @@ - uname(&buf); + module = grab_elf_file(name); +@@ -207,9 +209,9 @@ static struct elf_file *grab_module(const char *name, kernel = buf.release; } -+ -+ if((module_dir = getenv("MODULE_DIR")) == NULL) -+ module_dir = "/lib/modules/"; -+ if (strlen(basedir)) - nofail_asprintf(&moddir, "%s/%s/%s", basedir, MODULE_DIR, kernel); + nofail_asprintf(&moddir, "%s/%s/%s", basedir, module_dir, kernel); @@ -116,10 +123,11 @@ diff -Naur module-init-tools-3.16-orig/modinfo.c module-init-tools-3.16/modinfo. /* Search for it in modules.dep. */ nofail_asprintf(&depname, "%s/%s", moddir, "modules.dep"); -diff -Naur module-init-tools-3.16-orig/modprobe.c module-init-tools-3.16/modprobe.c ---- module-init-tools-3.16-orig/modprobe.c 2011-06-02 13:55:01.000000000 -0400 -+++ module-init-tools-3.16/modprobe.c 2011-10-01 23:34:04.111913368 -0400 -@@ -86,10 +86,6 @@ +diff --git a/modprobe.c b/modprobe.c +index 5464f45..d9fbf9d 100644 +--- a/modprobe.c ++++ b/modprobe.c +@@ -86,10 +86,6 @@ typedef enum } modprobe_flags_t; @@ -130,24 +138,24 @@ diff -Naur module-init-tools-3.16-orig/modprobe.c module-init-tools-3.16/modprob /** * print_usage - output the prefered program usage * -@@ -2131,6 +2127,7 @@ - char *cmdline_opts = NULL; - char *dirname; - errfn_t error = fatal; -+ char *module_dir; - int failed = 0; - modprobe_flags_t flags = 0; +@@ -2136,6 +2132,7 @@ int main(int argc, char *argv[]) struct modprobe_conf conf = {}; -@@ -2233,7 +2230,10 @@ + + recursion_depth = 0; ++ char *module_dir = NULL; + + /* Prepend options from environment. */ + argv = merge_args(getenv("MODPROBE_OPTIONS"), argv, &argc); +@@ -2233,7 +2230,11 @@ int main(int argc, char *argv[]) if (argc < optind + 1 && !dump_config && !list_only) print_usage(argv[0]); - nofail_asprintf(&dirname, "%s%s/%s", basedir, MODULE_DIR, buf.release); -+ if((module_dir = getenv("MODULE_DIR")) == NULL) -+ module_dir = "/lib/modules/"; ++ if((module_dir = getenv("MODULE_DIR")) == NULL) { ++ module_dir = "/lib/modules"; ++ } + + nofail_asprintf(&dirname, "%s%s/%s", basedir, module_dir, buf.release); /* Old-style -t xxx wildcard? Only with -l. */ if (list_only) { - diff --git a/pkgs/os-specific/linux/util-linux-ng/default.nix b/pkgs/os-specific/linux/util-linux-ng/default.nix index 4e62be4ff32d..ba9ae72b73a7 100644 --- a/pkgs/os-specific/linux/util-linux-ng/default.nix +++ b/pkgs/os-specific/linux/util-linux-ng/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, ncurses ? null, perl ? null }: +{ stdenv, fetchurl, zlib, ncurses ? null, perl ? null }: stdenv.mkDerivation rec { name = "util-linux-ng-2.18"; @@ -19,6 +19,6 @@ stdenv.mkDerivation rec { ${if ncurses == null then "--without-ncurses" else ""} ''; - buildInputs = stdenv.lib.optional (ncurses != null) ncurses + buildInputs = [ zlib ] ++ stdenv.lib.optional (ncurses != null) ncurses ++ stdenv.lib.optional (perl != null) perl; } diff --git a/pkgs/shells/bash/4.1.nix b/pkgs/shells/bash/4.1.nix deleted file mode 100644 index 02fb29c5daba..000000000000 --- a/pkgs/shells/bash/4.1.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-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/bash-4.1-patches.nix b/pkgs/shells/bash/bash-4.1-patches.nix deleted file mode 100644 index d22435744ccc..000000000000 --- a/pkgs/shells/bash/bash-4.1-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/4.2.nix b/pkgs/shells/bash/default.nix index 98fe43b0122a..98fe43b0122a 100644 --- a/pkgs/shells/bash/4.2.nix +++ b/pkgs/shells/bash/default.nix diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index 436b912d8d6f..eca128bcd754 100644 --- a/pkgs/stdenv/generic/default.nix +++ b/pkgs/stdenv/generic/default.nix @@ -91,8 +91,8 @@ let # Utility flags to test the type of platform. isDarwin = result.system == "i686-darwin" - || result.system == "powerpc-darwin" - || result.system == "x86_64-darwin"; + || result.system == "powerpc-darwin" + || result.system == "x86_64-darwin"; isLinux = result.system == "i686-linux" || result.system == "x86_64-linux" || result.system == "powerpc-linux" @@ -101,14 +101,14 @@ let isSunOS = result.system == "i686-solaris" || result.system == "x86_64-solaris"; isCygwin = result.system == "i686-cygwin"; - isFreeBSD = result.system == "i686-freebsd" - || result.system == "x86_64-freebsd"; - isOpenBSD = result.system == "i686-openbsd" - || result.system == "x86_64-openbsd"; - isBSD = result.system == "i686-freebsd" - || result.system == "x86_64-freebsd" - || result.system == "i686-openbsd" - || result.system == "x86_64-openbsd"; + isFreeBSD = result.system == "i686-freebsd" + || result.system == "x86_64-freebsd"; + isOpenBSD = result.system == "i686-openbsd" + || result.system == "x86_64-openbsd"; + isBSD = result.system == "i686-freebsd" + || result.system == "x86_64-freebsd" + || result.system == "i686-openbsd" + || result.system == "x86_64-openbsd"; isi686 = result.system == "i686-linux" || result.system == "i686-darwin" || result.system == "i686-freebsd" diff --git a/pkgs/stdenv/generic/docs.txt b/pkgs/stdenv/generic/docs.txt deleted file mode 100644 index 060f3cd154b9..000000000000 --- a/pkgs/stdenv/generic/docs.txt +++ /dev/null @@ -1,93 +0,0 @@ -* genericBuild performs a generic build of (typically) autotool-style - packages - - -* unpack phase - -** may be overriden by setting $unpackPhase to point at a function that - unpacks the source (which should set $sourceRoot) - -** the generic unpacker unpacks all sources specified by $srcs, or - $src if $srcs is empty - -** supports tar, bzipped tar, gzipped tar, compressed tar, zip - -** zip must be in scope (in $buildinputs) - -** additional file types may be supported by setting $findUnpacker, - which is called with a single argument specifying the file to be - unpacked - -** $findUnpacker should set $unpackCmd, specifying the full command to - unpack the file (must include the file name) - -** alternatively, $unpackCmd can be set before calling the generic - builder (e.g., 'unpackCmd="unrar x $src"'); this only works if - there is a single source file - -** the generic unpacker then sets $sourceRoot to the name of the - directory created by unpacking the source archives - -** the source archives should produce only one directory - -** alternatively, $setSourceRoot may be set to a function that sets - $sourceRoot - - -* the generic builder then chdirs to $sourceRoot - - -* patch phase (skipped if neither $patchPhase nor $patches are set) - -** may be overriden by setting $patchPhase to point at a function that - unpacks the source (which should set $sourceRoot) - -** if the $patches variable is set, it runs `patch -p1 < ...' in - $sourceRoot for each element in $patches (the `patch' command - should be in $PATH; note that it isn't in the standard environment) - - -* configuration phase - -** may be overriden by setting $configurePhase to point at a function - -** calls $preConfigurer first, if set (useful for running - autoconf/automake) - -** the configure script is specified by $configureScript, which - defaults to ./configure - -** if no executable file exists at $configureScript, does nothing - -** if a file ./ltmain.sh exists and $dontFixLibtool is not set, calls - function fixLibtool to remove its default search path (/usr etc.) - -** adds "--prefix=$out" to $configureFlags unless $dontAddPrefix is - set - -** calls $configureScript with $configureFlags - -** calls $postConfigurer, if set (useful for any last-minute patches - prior to building) - - -* build phase - -** may be overriden by setting $buildPhase to point at a function - -** runs make with flags $makeFlags - - -* install phase - -** may be overriden by setting $installPhase to point at a function - -** runs make with flags $installFlags - -** unless $dontStrip is set or $NIX_STRIP_DEBUG is not 1, finds all *.a - files in $out and runs "strip -S" on them (executables and dynamic - libraries can be stripped automatically by setting NIX_STRIP_DEBUG - to 1 (default)) - -** if $propagatedBuildInputs is set, its contents are written to - $out/nix-support/propagated-build-inputs diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh index ba06666ca898..623273962393 100644 --- a/pkgs/stdenv/generic/setup.sh +++ b/pkgs/stdenv/generic/setup.sh @@ -237,13 +237,6 @@ if test "$NIX_NO_SELF_RPATH" != "1"; then fi -# Strip debug information by default. -if test -z "$NIX_STRIP_DEBUG"; then - export NIX_STRIP_DEBUG=1 - export NIX_CFLAGS_STRIP="-g0 -Wl,--strip-debug" -fi - - # Set the TZ (timezone) environment variable, otherwise commands like # `date' will complain (e.g., `Tue Mar 9 10:01:47 Local time zone must # be set--see zic manual page 2004'). @@ -386,6 +379,13 @@ substituteAll() { } +substituteAllInPlace() { + local fileName="$1" + shift + substituteAll "$fileName" "$fileName" "$@" +} + + ###################################################################### # What follows is the generic builder. @@ -446,8 +446,8 @@ unpackFile() { case "$curSrc" in *.tar | *.tar.* | *.tgz | *.tbz2) - # GNU tar can automatically select the decompression method - # (info "(tar) gzip"). + # GNU tar can automatically select the decompression method + # (info "(tar) gzip"). tar xvf $curSrc ;; *.zip) @@ -719,6 +719,20 @@ fixupPhase() { done; fi + if test -z "$dontGzipMan"; then + GLOBIGNORE=.:..:*.gz:*.bz2 + for f in $out/share/man/*/* $out/share/man/*/*/*; do + if test -f $f; then + if gzip -c $f > $f.gz; then + rm $f + else + rm $f.gz + fi + fi + done + unset GLOBIGNORE + fi + # TODO: strip _only_ ELF executables, and return || fail here... if test -z "$dontStrip"; then stripDebugList=${stripDebugList:-lib lib64 libexec bin sbin} @@ -813,7 +827,12 @@ genericBuild() { if test "$curPhase" = installPhase -a -n "$dontInstall"; then continue; fi if test "$curPhase" = fixupPhase -a -n "$dontFixup"; then continue; fi if test "$curPhase" = distPhase -a -z "$doDist"; then continue; fi - + + if [ -n "$tracePhases" ]; then + echo + echo "@ phase-started $out $curPhase" + fi + showPhaseHeader "$curPhase" dumpVars @@ -825,6 +844,11 @@ genericBuild() { cd "${sourceRoot:-.}" fi + if [ -n "$tracePhases" ]; then + echo + echo "@ phase-succeeded $out $curPhase" + fi + stopNest done diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index 7e0116e342c7..5385fb75e214 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -5,7 +5,9 @@ # ensuring purity of components produced by it. # The function defaults are for easy testing. -{system ? "i686-linux", allPackages ? import ../../top-level/all-packages.nix, platform}: +{ system ? "i686-linux" +, allPackages ? import ../../top-level/all-packages.nix +, platform ? null }: rec { @@ -218,13 +220,15 @@ rec { static = true; }; }; - cloogppl = stdenvLinuxBoot3Pkgs.cloogppl.override { - inherit ppl; + cloog = stdenvLinuxBoot3Pkgs.cloog.override { + isl = stdenvLinuxBoot3Pkgs.isl.override { + static = true; + }; static = true; }; + cloogppl = null; }); - # 8) Construct a fourth stdenv identical to the second, except that # this one uses the dynamically linked GCC and Binutils from step # 5. The other tools (e.g. coreutils) are still from the @@ -291,7 +295,7 @@ rec { inherit gcc; inherit (stdenvLinuxBoot3Pkgs) binutils glibc; inherit (stdenvLinuxBoot4Pkgs) - gzip bzip2 bash coreutils diffutils findutils gawk + gzip bzip2 xz bash coreutils diffutils findutils gawk gnumake gnused gnutar gnugrep gnupatch patchelf attr acl; }; diff --git a/pkgs/stdenv/mingw/setup.sh b/pkgs/stdenv/mingw/setup.sh index 058d8cb18918..2bc961dfaed6 100755 --- a/pkgs/stdenv/mingw/setup.sh +++ b/pkgs/stdenv/mingw/setup.sh @@ -202,13 +202,6 @@ if test "$NIX_NO_SELF_RPATH" != "1"; then fi -# Strip debug information by default. -if test -z "$NIX_STRIP_DEBUG"; then - export NIX_STRIP_DEBUG=1 - export NIX_CFLAGS_STRIP="-g0 -Wl,--strip-debug" -fi - - # Set the TZ (timezone) environment variable, otherwise commands like # `date' will complain (e.g., `Tue Mar 9 10:01:47 Local time zone must # be set--see zic manual page 2004'). diff --git a/pkgs/stdenv/native/default.nix b/pkgs/stdenv/native/default.nix index bdf342b2c64a..1f3fa69d51b0 100644 --- a/pkgs/stdenv/native/default.nix +++ b/pkgs/stdenv/native/default.nix @@ -22,7 +22,6 @@ rec { export NIX_DONT_SET_RPATH=1 export NIX_NO_SELF_RPATH=1 dontFixLibtool=1 - NIX_STRIP_DEBUG=0 stripAllFlags=" " # the Darwin "strip" command doesn't know "-s" ''; diff --git a/pkgs/stdenv/nix/prehook.sh b/pkgs/stdenv/nix/prehook.sh index 55389b7d7716..ea80355f6bb1 100644 --- a/pkgs/stdenv/nix/prehook.sh +++ b/pkgs/stdenv/nix/prehook.sh @@ -5,7 +5,6 @@ if test "$system" = "i686-darwin" -o "$system" = "powerpc-darwin" -o "$system" = export NIX_DONT_SET_RPATH=1 export NIX_NO_SELF_RPATH=1 dontFixLibtool=1 - NIX_STRIP_DEBUG=0 # !!! do we still need this? stripAllFlags=" " # the Darwin "strip" command doesn't know "-s" xargsFlags=" " fi diff --git a/pkgs/tools/archivers/gnutar/default.nix b/pkgs/tools/archivers/gnutar/default.nix index a38c7fcdd1e8..ccd0d755e8ce 100644 --- a/pkgs/tools/archivers/gnutar/default.nix +++ b/pkgs/tools/archivers/gnutar/default.nix @@ -1,11 +1,11 @@ {stdenv, fetchurl}: stdenv.mkDerivation rec { - name = "gnutar-1.25"; + name = "gnutar-1.26"; src = fetchurl { - url = "mirror://gnu/tar/tar-1.25.tar.bz2"; - sha256 = "0js9b1jd93kjk6dgf40y2fpgpnix247rk5aws2mjgwz0p10wxxpk"; + url = "mirror://gnu/tar/tar-1.26.tar.bz2"; + sha256 = "0hbdkzmchq9ycr2x1pxqdcgdbaxksh8c6ac0jf75jajhcks6jlss"; }; meta = { diff --git a/pkgs/tools/archivers/unzip/5.52.nix b/pkgs/tools/archivers/unzip/5.52.nix deleted file mode 100644 index c72def3731a3..000000000000 --- a/pkgs/tools/archivers/unzip/5.52.nix +++ /dev/null @@ -1,18 +0,0 @@ -{stdenv, fetchurl}: - -stdenv.mkDerivation { - name = "unzip-5.52"; - - src = fetchurl { - url = http://nixos.org/tarballs/unzip552.tar.gz; - md5 = "9d23919999d6eac9217d1f41472034a9"; - }; - - buildPhase = "make -f unix/Makefile generic"; - - installPhase = "make -f unix/Makefile prefix=$out install"; - - meta = { - homepage = http://www.info-zip.org; - }; -} diff --git a/pkgs/tools/archivers/unzip/6.0.nix b/pkgs/tools/archivers/unzip/default.nix index 803832f52d82..7aaa84d9ac93 100644 --- a/pkgs/tools/archivers/unzip/6.0.nix +++ b/pkgs/tools/archivers/unzip/default.nix @@ -16,6 +16,10 @@ stdenv.mkDerivation { buildFlags = "generic D_USE_BZ2=-DUSE_BZIP2 L_BZ2=-lbz2"; + preConfigure = '' + sed -i -e 's@CF="-O3 -Wall -I. -DASM_CRC $(LOC)"@CF="-O3 -Wall -I. -DASM_CRC -DLARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(LOC)"@' unix/Makefile + ''; + installFlags = "prefix=$(out)"; meta = { diff --git a/pkgs/tools/compression/xz/default.nix b/pkgs/tools/compression/xz/default.nix index b6aa8e96013f..78a8ed95a4e9 100644 --- a/pkgs/tools/compression/xz/default.nix +++ b/pkgs/tools/compression/xz/default.nix @@ -1,25 +1,35 @@ -{stdenv, fetchurl, lib}: +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + name = "xz-5.0.3"; -stdenv.mkDerivation ({ - name = "xz-5.0.0"; - src = fetchurl { - url = http://tukaani.org/xz/xz-5.0.0.tar.bz2; - sha256 = "1n2nc00d83di0jl5d9qwpngkmlk3wqhs4w9q2ah680v9qijrxa27"; + url = "http://tukaani.org/xz/${name}.tar.bz2"; + sha256 = "1sgaq4gdh8llz3gnlgvd65x610fwc8h4m32skhqn5npwgghvj4as"; }; + doCheck = true; + meta = { homepage = http://tukaani.org/xz/; - description = "Successor of the LZMA Utils package"; - license = "GPL/LGPL"; - maintainers = [ lib.maintainers.sander ]; - }; -} + description = "XZ, general-purpose data compression software, successor of LZMA"; -// + longDescription = + '' XZ Utils is free general-purpose data compression software with high + compression ratio. XZ Utils were written for POSIX-like systems, + but also work on some not-so-POSIX systems. XZ Utils are the + successor to LZMA Utils. -(if stdenv.system == "x86_64-darwin" - # Work around assembler misconfiguration as `x86'. This appears to be fixed - # by commit b9b5c54cd438b3ae47b44cc211b71f3bc53e35ef (Nov 22 12:00:30 2009 # +0200). - then { configureFlags = "--enable-assembler=x86_64"; } - else {})) + The core of the XZ Utils compression code is based on LZMA SDK, but + it has been modified quite a lot to be suitable for XZ Utils. The + primary compression algorithm is currently LZMA2, which is used + inside the .xz container format. With typical files, XZ Utils + create 30 % smaller output than gzip and 15 % smaller output than + bzip2. + ''; + + licenses = [ "GPLv2+" "LGPLv2.1+" ]; + maintainers = with stdenv.lib.maintainers; [ sander ludo ]; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/pkgs/tools/misc/coreutils/default.nix b/pkgs/tools/misc/coreutils/default.nix index c4295e7b47a8..b1a740ab5f96 100644 --- a/pkgs/tools/misc/coreutils/default.nix +++ b/pkgs/tools/misc/coreutils/default.nix @@ -1,19 +1,21 @@ { stdenv, fetchurl, perl, gmp ? null , aclSupport ? false, acl ? null -, selinuxSupport? false, libselinux ? null, libsepol ? null }: +, selinuxSupport? false, libselinux ? null, libsepol ? null +, xz +}: assert aclSupport -> acl != null; assert selinuxSupport -> ( (libselinux != null) && (libsepol != null) ); stdenv.mkDerivation (rec { - name = "coreutils-8.7"; + name = "coreutils-8.14"; src = fetchurl { - url = "mirror://gnu/coreutils/${name}.tar.gz"; - sha256 = "11ykd7glys6lcfb2mwgmkqmmffv1pan70j6sl9vcjpnlf9dvk7bw"; + url = "mirror://gnu/coreutils/${name}.tar.xz"; + sha256 = "0bdh31fvd0ng2sqrrbz0a4yy084hmj76pbljksqyv4ljq4bhh4hd"; }; - buildNativeInputs = [ perl ]; + buildNativeInputs = [ perl xz ]; buildInputs = [ gmp ] ++ stdenv.lib.optional aclSupport acl ++ stdenv.lib.optional selinuxSupport libselinux diff --git a/pkgs/tools/package-management/disnix/default.nix b/pkgs/tools/package-management/disnix/default.nix index 631db35a9b01..815ec864626a 100644 --- a/pkgs/tools/package-management/disnix/default.nix +++ b/pkgs/tools/package-management/disnix/default.nix @@ -1,16 +1,18 @@ -{stdenv, fetchurl, pkgconfig, dbus_glib, libxml2, libxslt, getopt, nixUnstable, gettext, libiconv}: +{ stdenv, fetchurl, pkgconfig, dbus_glib, libxml2, libxslt, getopt, nixUnstable, gettext, libiconv }: stdenv.mkDerivation { name = "disnix-0.3pre29816"; + src = fetchurl { url = http://hydra.nixos.org/build/1453079/download/4/disnix-0.3pre29816.tar.gz; sha256 = "13gi0zs0a8pvgmgh3h431ydran3qf3px5m3d6vddd9b225kbkgwz"; }; + buildInputs = [ pkgconfig dbus_glib libxml2 libxslt getopt nixUnstable ] ++ stdenv.lib.optional (!stdenv.isLinux) libiconv ++ stdenv.lib.optional (!stdenv.isLinux) gettext; + dontStrip = true; - NIX_STRIP_DEBUG = true; meta = { description = "A distributed deployment extension for Nix"; diff --git a/pkgs/tools/package-management/disnix/disnixos/default.nix b/pkgs/tools/package-management/disnix/disnixos/default.nix index 92914dd1cadf..843304d96730 100644 --- a/pkgs/tools/package-management/disnix/disnixos/default.nix +++ b/pkgs/tools/package-management/disnix/disnixos/default.nix @@ -1,14 +1,16 @@ -{stdenv, fetchurl, disnix, socat, pkgconfig}: +{ stdenv, fetchurl, disnix, socat, pkgconfig }: stdenv.mkDerivation { name = "disnixos-0.2pre29928"; + src = fetchurl { url = http://hydra.nixos.org/build/1464065/download/3/disnixos-0.2pre29928.tar.gz; sha256 = "0l7kszbpi8lzq95khi45fbq71l5csf8kamds4va6bxsyfwxrx6sm"; }; + buildInputs = [ socat pkgconfig disnix ]; + dontStrip = true; - NIX_STRIP_DEBUG = true; meta = { description = "Provides complementary NixOS infrastructure deployment to Disnix"; diff --git a/pkgs/tools/text/diffutils/default.nix b/pkgs/tools/text/diffutils/default.nix index 4fde88d92626..eae48f2e3a47 100644 --- a/pkgs/tools/text/diffutils/default.nix +++ b/pkgs/tools/text/diffutils/default.nix @@ -1,11 +1,11 @@ {stdenv, fetchurl, coreutils ? null}: stdenv.mkDerivation { - name = "diffutils-3.0"; + name = "diffutils-3.2"; src = fetchurl { - url = mirror://gnu/diffutils/diffutils-3.0.tar.gz; - sha256 = "02g8i6jv0j0vr5nl13ns50lv2dbjy9kkk8jvp11n0g5fpdjizf9g"; + url = mirror://gnu/diffutils/diffutils-3.2.tar.gz; + sha256 = "1lsf0ln0h3mnm2y0mwgrfk0lyfi7bnm4r886acvdrrsvc7pypaia"; }; /* If no explicit coreutils is given, use the one from stdenv. */ diff --git a/pkgs/tools/text/gawk/default.nix b/pkgs/tools/text/gawk/default.nix index c4f37f922c74..0c7e85cce4f2 100644 --- a/pkgs/tools/text/gawk/default.nix +++ b/pkgs/tools/text/gawk/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, libsigsegv }: stdenv.mkDerivation rec { - name = "gawk-3.1.8"; + name = "gawk-4.0.0"; src = fetchurl { url = "mirror://gnu/gawk/${name}.tar.bz2"; - sha256 = "1d0jfh319w4h8l1zzqv248916wrc2add1b1aghri31rj9hn7pg2x"; + sha256 = "0sss7rhpvizi2a88h6giv0i7w5h07s2fxkw3s6n1hqvcnhrfgbb0"; }; doCheck = true; diff --git a/pkgs/tools/text/gnugrep/default.nix b/pkgs/tools/text/gnugrep/default.nix index f06be1b7336e..402d24130855 100644 --- a/pkgs/tools/text/gnugrep/default.nix +++ b/pkgs/tools/text/gnugrep/default.nix @@ -1,13 +1,13 @@ { stdenv, fetchurl, pcre, libiconv ? null}: -let version = "2.7"; in +let version = "2.9"; in stdenv.mkDerivation ({ name = "gnugrep-${version}"; src = fetchurl { url = "mirror://gnu/grep/grep-${version}.tar.gz"; - sha256 = "1b8vksfd1ngharac3ygaqim3lrf0yqap992sg0vfm7572l88655d"; + sha256 = "0w3r6m597p3qgfj6jj1nsggkwr5p38v6cxasfa8i3izcfan8w4g9"; }; buildInputs = [ pcre ] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a5ff8291d2e2..ae9b3022d2ab 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1505,11 +1505,7 @@ let unshield = callPackage ../tools/archivers/unshield { }; - unzip = unzip60; - - unzip552 = callPackage ../tools/archivers/unzip/5.52.nix { }; - - unzip60 = callPackage ../tools/archivers/unzip/6.0.nix { }; + unzip = callPackage ../tools/archivers/unzip { }; uptimed = callPackage ../tools/system/uptimed { }; @@ -1626,11 +1622,11 @@ let ### SHELLS - bash = lowPrio (callPackage ../shells/bash/4.1.nix { + bash = lowPrio (callPackage ../shells/bash { texinfo = null; }); - bashInteractive = appendToName "interactive" (callPackage ../shells/bash/4.2.nix { + bashInteractive = appendToName "interactive" (callPackage ../shells/bash { interactive = true; }); @@ -1698,7 +1694,7 @@ let gambit = callPackage ../development/compilers/gambit { }; - gcc = gcc45; + gcc = gcc46; gcc295 = wrapGCC (import ../development/compilers/gcc-2.95 { inherit fetchurl stdenv noSysDirs; @@ -1862,6 +1858,20 @@ let else null; })); + # A non-stripped version of GCC. + gcc45_debug = lowPrio (wrapGCC (callPackage ../development/compilers/gcc-4.5 { + stripped = false; + + inherit noSysDirs; + cross = null; + libcCross = null; + binutilsCross = null; + + # bootstrapping a profiled compiler does not work in the sheevaplug: + # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43944 + profiledCompiler = if stdenv.system == "armv5tel-linux" then false else true; + })); + gcc46_real = lowPrio (wrapGCC (callPackage ../development/compilers/gcc-4.6 { inherit noSysDirs; cross = null; @@ -2593,15 +2603,17 @@ let # mercurial (hg) bleeding edge version octaveHG = callPackage ../development/interpreters/octave/hg.nix { }; - perl58 = callPackage ../development/interpreters/perl-5.8 { + perl58 = callPackage ../development/interpreters/perl/5.8 { impureLibcPath = if stdenv.isLinux then null else "/usr"; }; - perl510 = callPackage ../development/interpreters/perl-5.10 { + perl510 = callPackage ../development/interpreters/perl/5.10 { }; + + perl514 = callPackage ../development/interpreters/perl/5.14 { fetchurl = fetchurlBoot; }; - perl = if system != "i686-cygwin" then perl510 else sysPerl; + perl = if system != "i686-cygwin" then perl514 else sysPerl; php = php5_3; @@ -2825,7 +2837,7 @@ let cross = assert crossSystem != null; crossSystem; }); - bison = bison24; + bison = bison25; bison1875 = callPackage ../development/tools/parsing/bison/bison-1.875.nix { }; @@ -2996,8 +3008,6 @@ let patchelf = callPackage ../development/tools/misc/patchelf { }; - patchelf06 = callPackage ../development/tools/misc/patchelf/0.6.nix { }; - peg = callPackage ../development/tools/parsing/peg { }; pmccabe = callPackage ../development/tools/misc/pmccabe { }; @@ -3423,7 +3433,9 @@ let glfw = callPackage ../development/libraries/glfw { }; - glibc = glibc212; + glibc = glibc213; + + glibcCross = glibc214Cross; glibc25 = callPackage ../development/libraries/glibc-2.5 { kernelHeaders = linuxHeaders_2_6_28; @@ -3447,15 +3459,15 @@ let installLocales = getConfig [ "glibc" "locales" ] false; }); - glibc212 = (callPackage ../development/libraries/glibc-2.12 { + glibc213 = (callPackage ../development/libraries/glibc-2.13 { kernelHeaders = linuxHeaders; installLocales = getConfig [ "glibc" "locales" ] false; machHeaders = null; hurdHeaders = null; gccCross = null; - }) // (if crossSystem != null then { hostDrv = glibc212Cross; } else {}); + }) // (if crossSystem != null then { hostDrv = glibc213Cross; } else {}); - glibc212Cross = forceBuildDrv (makeOverridable (import ../development/libraries/glibc-2.12) + glibc213Cross = forceBuildDrv (makeOverridable (import ../development/libraries/glibc-2.13) (let crossGNU = (crossSystem != null && crossSystem.config == "i586-pc-gnu"); in ({ inherit stdenv fetchurl; @@ -3473,7 +3485,28 @@ let } else { })))); - glibcCross = glibc212Cross; + glibc214 = (callPackage ../development/libraries/glibc-2.14 { + kernelHeaders = linuxHeaders; + installLocales = getConfig [ "glibc" "locales" ] false; + machHeaders = null; + hurdHeaders = null; + gccCross = null; + }) // (if crossSystem != null then { hostDrv = glibc214Cross; } else {}); + + glibc214Cross = forceBuildDrv (makeOverridable (import ../development/libraries/glibc-2.14) + (let crossGNU = (crossSystem != null && crossSystem.config == "i586-pc-gnu"); + in ({ + inherit stdenv fetchurl; + gccCross = gccCrossStageStatic; + kernelHeaders = if crossGNU then hurdHeaders else linuxHeadersCross; + installLocales = getConfig [ "glibc" "locales" ] false; + } + + // + + (if crossGNU + then { inherit machHeaders hurdHeaders mig fetchgit; } + else { })))); # We can choose: libcCrossChooser = name : if (name == "glibc") then glibcCross @@ -3488,9 +3521,9 @@ let installLocales = getConfig [ "glibc" "locales" ] false; }; - glibcLocales = callPackage ../development/libraries/glibc-2.12/locales.nix { }; + glibcLocales = callPackage ../development/libraries/glibc-2.14/locales.nix { }; - glibcInfo = callPackage ../development/libraries/glibc-2.12/info.nix { }; + glibcInfo = callPackage ../development/libraries/glibc-2.14/info.nix { }; glibc_multi = runCommand "${glibc.name}-multi" @@ -4285,7 +4318,6 @@ let neon029 = callPackage ../development/libraries/neon/0.29.nix { compressionSupport = true; sslSupport = true; - openssl = opensslNew; }; nethack = builderDefsPackage (import ../games/nethack) { @@ -4359,8 +4391,6 @@ let fetchurl = fetchurlBoot; }; - opensslNew = callPackage ../development/libraries/openssl/1.0.0e.nix { }; - ortp = callPackage ../development/libraries/ortp { }; p11_kit = callPackage ../development/libraries/p11-kit { }; @@ -5300,7 +5330,16 @@ let libnl1 = callPackage ../os-specific/linux/libnl/v1.nix { }; - linuxHeaders = linuxHeaders_2_6_32; + linuxHeaders = + let + + kernel = { + src = linuxPackages.kernel.src; + version = linuxPackages.kernel.version; + }; + + in + callPackage ../os-specific/linux/kernel-headers { inherit kernel; }; linuxHeaders26Cross = forceBuildDrv (import ../os-specific/linux/kernel-headers/2.6.32.nix { inherit stdenv fetchurl perl; @@ -5551,6 +5590,7 @@ let kernelPatches.aufs2_2_6_36 kernelPatches.mips_restart_2_6_36 kernelPatches.cifs_timeout_2_6_35 + kernelPatches.mips_restart_2_6_36 ]; }; @@ -5728,6 +5768,8 @@ let broadcom_sta = callPackage ../os-specific/linux/broadcom-sta/default.nix { }; + kernelHeaders = callPackage ../os-specific/linux/kernel-headers { }; + nvidia_x11 = callPackage ../os-specific/linux/nvidia-x11 { }; nvidia_x11_legacy96 = callPackage ../os-specific/linux/nvidia-x11/legacy96.nix { }; @@ -6389,7 +6431,6 @@ let chrome = callPackage ../applications/networking/browsers/chromium { inherit (gnome) GConf; - patchelf = patchelf06; }; chromeWrapper = wrapFirefox diff --git a/pkgs/top-level/release-small.nix b/pkgs/top-level/release-small.nix new file mode 100644 index 000000000000..f56f6cf357d7 --- /dev/null +++ b/pkgs/top-level/release-small.nix @@ -0,0 +1,224 @@ +/* A small release file, with few packages to be built. The aim is to reduce + the load on Hydra when testing the `stdenv-updates' branch. + + + This file will be evaluated by hydra with a call like this: + hydra_eval_jobs --gc-roots-dir \ + /nix/var/nix/gcroots/per-user/hydra/hydra-roots --argstr \ + system i686-linux --argstr system x86_64-linux --arg \ + nixpkgs "{outPath = ./}" .... release.nix + + Hydra can be installed with "nix-env -i hydra". */ +with (import ./release-lib.nix); + +{ + + tarball = import ./make-tarball.nix; + +} // (mapTestOn (rec { + + aspell = all; + at = linux; + aterm25 = all; + aterm28 = all; + autoconf = all; + automake110x = all; + automake111x = all; + automake19x = all; + avahi = allBut "i686-cygwin"; # Cygwin builds fail + bash = all; + bashInteractive = all; + bc = all; + binutils = linux; + bind = linux; + bison24 = all; + boostFull = all; + bsdiff = all; + bzip2 = all; + classpath = linux; + cmake = all; + coreutils = all; + cpio = all; + cron = linux; + cups = linux; + dhcp = linux; + diffutils = all; + e2fsprogs = linux; + emacs23 = gtkSupported; + enscript = all; + file = all; + findutils = all; + flex = all; + flex2535 = all; + gcc = all; + gcc33 = linux; + gcc34 = linux; + gcc41 = linux; + gcc42 = linux; + gcc43_multi = ["x86_64-linux"]; + gcc44 = linux; + gcj44 = linux; + ghdl = linux; + glibc = linux; + glibcLocales = linux; + gnat44 = linux; + gnugrep = all; + gnum4 = all; + gnumake = all; + gnupatch = all; + gnupg = linux; + gnuplot = allBut "i686-cygwin"; + gnused = all; + gnutar = all; + gnutls = linux; + grub = linux; + grub2 = linux; + gsl = linux; + guile = linux; # tests fail on Cygwin + gw6c = linux; + gzip = all; + hal = linux; + hal_info = linux; + hddtemp = linux; + hdparm = linux; + hello = all; + host = linux; + iana_etc = linux; + icecat3Xul = linux; + icewm = linux; + idutils = all; + ifplugd = linux; + inetutils = linux; + iputils = linux; + jnettop = linux; + jwhois = linux; + kbd = linux; + keen4 = ["i686-linux"]; + kvm = linux; + qemu = linux; + qemu_kvm = linux; + less = all; + lftp = all; + libtool = all; + libtool_2 = all; + libxml2 = all; + libxslt = all; + lout = linux; + lsh = linux; + lsof = linux; + ltrace = linux; + lvm2 = linux; + lynx = linux; + lzma = linux; + man = linux; + manpages = linux; + mc = all; + mcabber = linux; + mcron = linux; + mdadm = linux; + mesa = mesaPlatforms; + midori = linux; + mingetty = linux; + mk = linux; + mktemp = all; + module_init_tools = linux; + mono = linux; + monotone = linux; + mpg321 = linux; + mutt = linux; + mysql = linux; + mysql51 = linux; + ncat = linux; + netcat = all; + nfsUtils = linux; + nix = all; + nixUnstable = all; + nixSqlite = all; + nss_ldap = linux; + nssmdns = linux; + ntfs3g = linux; + ntp = linux; + openssh = linux; + openssl = all; + pam_console = linux; + pam_login = linux; + pam_unix2 = linux; + pan = gtkSupported; + par2cmdline = all; + pciutils = linux; + pdf2xml = all; + perl = all; + pkgconfig = all; + pmccabe = linux; + policykit = linux; + portmap = linux; + procps = linux; + pwdutils = linux; + python = allBut "i686-cygwin"; + pythonFull = linux; + readline = all; + rlwrap = all; + rpm = linux; + rsync = linux; + screen = linux ++ darwin; + scrot = linux; + sdparm = linux; + sharutils = all; + sloccount = allBut "i686-cygwin"; + smartmontools = all; + splashutils = linux; + sqlite = allBut "i686-cygwin"; + squid = linux; + ssmtp = linux; + stdenv = prio 175 all; + strace = linux; + su = linux; + sudo = linux; + sysklogd = linux; + syslinux = ["i686-linux"]; + sysvinit = linux; + sysvtools = linux; + tcl = linux; + tcpdump = linux; + tetex = linux; + texLive = linux; + texLiveBeamer = linux; + texLiveExtra = linux; + texinfo = all; + time = linux; + tinycc = ["i686-linux"]; + udev = linux; + uml = ["i686-linux"]; + unrar = linux; + unzip = all; + upstart = linux; + usbutils = linux; + utillinux = linux; + utillinuxCurses = linux; + w3m = all; + webkit = linux; + wget = all; + which = all; + wicd = linux; + wireshark = linux; + wirelesstools = linux; + wpa_supplicant = linux; + xfsprogs = linux; + xkeyboard_config = linux; + zile = linux; + zip = all; + + dbus_all = { + libs = linux; + tools = linux; + }; + + emacs23Packages = { + bbdb = linux; + cedet = linux; + ecb = linux; + emacsw3m = linux; + emms = linux; + nxml = all; + }; +} )) |