diff options
137 files changed, 2870 insertions, 995 deletions
diff --git a/TODO.txt b/TODO.txt new file mode 100644 index 00000000000..76f06274515 --- /dev/null +++ b/TODO.txt @@ -0,0 +1,9 @@ +This file contains list of tasks that should be done before merging +stdenv-updates back into trunk. Notation: +- TODO +* In progress ++ Done + +urkud: +- Introduce libiconvOrNull and libiconvOrLibc instead of current 'magic' + diff --git a/doc/stdenv.xml b/doc/stdenv.xml index d8d106e54ad..5c77b416cc0 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 3d4458699c7..57395f8cc68 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/editors/ed/default.nix b/pkgs/applications/editors/ed/default.nix index 905cde880ed..1b3e4e27f5b 100644 --- a/pkgs/applications/editors/ed/default.nix +++ b/pkgs/applications/editors/ed/default.nix @@ -1,11 +1,11 @@ { fetchurl, stdenv }: stdenv.mkDerivation rec { - name = "ed-1.4"; + name = "ed-1.5"; src = fetchurl { url = "mirror://gnu/ed/${name}.tar.gz"; - sha256 = "1njgcghms1377csldi1yqjhcpghiii6bshdhnjpqp78sxs2xldnv"; + sha256 = "18gvhyhwpabmgv4lh21lg8vl3z7acdyhh2mr2kj9g75wksj39pcp"; }; doCheck = true; diff --git a/pkgs/applications/misc/djvulibre/default.nix b/pkgs/applications/misc/djvulibre/default.nix index b1001976ea0..e22dce72b62 100644 --- a/pkgs/applications/misc/djvulibre/default.nix +++ b/pkgs/applications/misc/djvulibre/default.nix @@ -1,5 +1,4 @@ -{ stdenv, fetchurl, lib, useQt3 ? false, libjpeg, libtiff, libpng, ghostscript -, libungif, zlib, x11, libX11, mesa, qt3 }: +{ stdenv, fetchurl, libjpeg, libtiff, libpng, ghostscript, libungif, zlib }: stdenv.mkDerivation rec { name = "djvulibre-3.5.24"; @@ -9,12 +8,14 @@ stdenv.mkDerivation rec { sha256 = "0d1592cmc7scg2jzah47mnvbqldhxb1x9vxm7y64a3iasa0lqwy0"; }; - buildInputs = [ libjpeg libtiff libpng ghostscript zlib libungif ] ++ - stdenv.lib.optionals useQt3 [qt3 libX11 x11 mesa]; + buildInputs = [ libjpeg libtiff libpng ghostscript zlib libungif ]; + + patches = [ ./gcc-4.6.patch ]; meta = { description = "A library and viewer for the DJVU file format for scanned images"; homepage = http://djvu.sourceforge.net; - maintainers = [ lib.maintainers.urkud ]; + maintainers = [ stdenv.lib.maintainers.urkud ]; + platforms = stdenv.lib.platforms.all; }; } diff --git a/pkgs/applications/misc/djvulibre/gcc-4.6.patch b/pkgs/applications/misc/djvulibre/gcc-4.6.patch new file mode 100644 index 00000000000..48fbc2bc7ac --- /dev/null +++ b/pkgs/applications/misc/djvulibre/gcc-4.6.patch @@ -0,0 +1,658 @@ +commit 3341545edba359b292a8ef6db1b7d342caf3dcf1 +Author: Leon Bottou <leon@bottou.org> +Date: Wed May 4 21:25:35 2011 -0700 + + Added include <stddef.h> for gcc-4.6 + +diff --git a/libdjvu/BSByteStream.cpp b/libdjvu/BSByteStream.cpp +index b762ccf..d662ab0 100644 +--- a/libdjvu/BSByteStream.cpp ++++ b/libdjvu/BSByteStream.cpp +@@ -62,6 +62,7 @@ + + // - Author: Leon Bottou, 07/1998 + ++#include <stddef.h> + #include <stdlib.h> + #include <stdio.h> + #include <string.h> +diff --git a/libdjvu/BSEncodeByteStream.cpp b/libdjvu/BSEncodeByteStream.cpp +index 5d80e51..68bc3e3 100644 +--- a/libdjvu/BSEncodeByteStream.cpp ++++ b/libdjvu/BSEncodeByteStream.cpp +@@ -71,6 +71,7 @@ + #include "GOS.h" + #endif + ++#include <stddef.h> + #include <stdlib.h> + #include <stdio.h> + #include <string.h> +diff --git a/libdjvu/ByteStream.cpp b/libdjvu/ByteStream.cpp +index 158c33c..be01847 100644 +--- a/libdjvu/ByteStream.cpp ++++ b/libdjvu/ByteStream.cpp +@@ -73,6 +73,7 @@ + #include "GOS.h" + #include "GURL.h" + #include "DjVuMessage.h" ++#include <stddef.h> + #include <fcntl.h> + #if defined(WIN32) || defined(__CYGWIN32__) + # include <io.h> +diff --git a/libdjvu/DjVuFileCache.cpp b/libdjvu/DjVuFileCache.cpp +index 6b1e85d..7d7a192 100644 +--- a/libdjvu/DjVuFileCache.cpp ++++ b/libdjvu/DjVuFileCache.cpp +@@ -63,6 +63,7 @@ + #include "DjVuFileCache.h" + #include "debug.h" + ++#include <stddef.h> + #include <stdlib.h> + + +diff --git a/libdjvu/DjVuGlobal.cpp b/libdjvu/DjVuGlobal.cpp +index e6d3cec..df9278e 100644 +--- a/libdjvu/DjVuGlobal.cpp ++++ b/libdjvu/DjVuGlobal.cpp +@@ -76,6 +76,8 @@ + #include "GThreads.h" + #include "GException.h" + #include "GContainer.h" ++ ++#include <stddef.h> + #include <stdlib.h> + #include <stdio.h> + #include <string.h> +diff --git a/libdjvu/DjVuGlobalMemory.cpp b/libdjvu/DjVuGlobalMemory.cpp +index 3c6012c..c8ba309 100644 +--- a/libdjvu/DjVuGlobalMemory.cpp ++++ b/libdjvu/DjVuGlobalMemory.cpp +@@ -67,6 +67,8 @@ + + #include "DjVuGlobal.h" + #include "GException.h" ++ ++#include <stddef.h> + #include <stdlib.h> + #include <string.h> + #include "debug.h" +diff --git a/libdjvu/DjVuMessage.cpp b/libdjvu/DjVuMessage.cpp +index 6f5a735..1726025 100644 +--- a/libdjvu/DjVuMessage.cpp ++++ b/libdjvu/DjVuMessage.cpp +@@ -71,6 +71,7 @@ + #include "debug.h" + #include <ctype.h> + #include <string.h> ++#include <stddef.h> + #include <stdlib.h> + #ifdef WIN32 + # include <tchar.h> +diff --git a/libdjvu/DjVuMessageLite.cpp b/libdjvu/DjVuMessageLite.cpp +index b8c1010..5daa9d9 100644 +--- a/libdjvu/DjVuMessageLite.cpp ++++ b/libdjvu/DjVuMessageLite.cpp +@@ -73,8 +73,8 @@ + #include "debug.h" + #include <ctype.h> + #include <string.h> ++#include <stddef.h> + #include <stdlib.h> +-// #include <stdio.h> + #ifdef WIN32 + #include <tchar.h> + #include <windows.h> +diff --git a/libdjvu/DjVuPalette.cpp b/libdjvu/DjVuPalette.cpp +index c489f7b..76b0bf4 100644 +--- a/libdjvu/DjVuPalette.cpp ++++ b/libdjvu/DjVuPalette.cpp +@@ -64,6 +64,8 @@ + #include "ByteStream.h" + #include "BSByteStream.h" + #include "DjVuPalette.h" ++ ++#include <stddef.h> + #include <stdlib.h> + #include <math.h> + +diff --git a/libdjvu/DjVuPort.h b/libdjvu/DjVuPort.h +index f6a92f6..e2b3125 100644 +--- a/libdjvu/DjVuPort.h ++++ b/libdjvu/DjVuPort.h +@@ -65,6 +65,7 @@ + + #include "GThreads.h" + #include "GURL.h" ++#include "stddef.h" + + #ifdef HAVE_NAMESPACES + namespace DJVU { +diff --git a/libdjvu/DjVuToPS.cpp b/libdjvu/DjVuToPS.cpp +index 5517bf3..6914ff9 100644 +--- a/libdjvu/DjVuToPS.cpp ++++ b/libdjvu/DjVuToPS.cpp +@@ -72,6 +72,7 @@ + #include "GPixmap.h" + #include "debug.h" + #include <stdarg.h> ++#include <stddef.h> + #include <stdlib.h> + #include <stdio.h> + #include <time.h> +diff --git a/libdjvu/GBitmap.cpp b/libdjvu/GBitmap.cpp +index ab5c0de..797edcc 100644 +--- a/libdjvu/GBitmap.cpp ++++ b/libdjvu/GBitmap.cpp +@@ -66,6 +66,8 @@ + #include "GString.h" + #include "GThreads.h" + #include "GException.h" ++#include <stddef.h> ++#include <stdlib.h> + #include <string.h> + + // - Author: Leon Bottou, 05/1997 +diff --git a/libdjvu/GException.cpp b/libdjvu/GException.cpp +index 2ea179a..89da70f 100644 +--- a/libdjvu/GException.cpp ++++ b/libdjvu/GException.cpp +@@ -60,6 +60,7 @@ + # pragma implementation + #endif + ++#include <stddef.h> + #include <stdlib.h> + #include <stdio.h> + #include <string.h> +diff --git a/libdjvu/GOS.cpp b/libdjvu/GOS.cpp +index e784932..d2088e2 100644 +--- a/libdjvu/GOS.cpp ++++ b/libdjvu/GOS.cpp +@@ -65,6 +65,7 @@ + #include "GOS.h" + #include "GURL.h" + ++#include <stddef.h> + #include <stdlib.h> + #include <stdio.h> + #include <ctype.h> +diff --git a/libdjvu/GPixmap.cpp b/libdjvu/GPixmap.cpp +index 392df54..4bf6f57 100644 +--- a/libdjvu/GPixmap.cpp ++++ b/libdjvu/GPixmap.cpp +@@ -75,6 +75,8 @@ + #include "GThreads.h" + #include "Arrays.h" + #include "JPEGDecoder.h" ++ ++#include <stddef.h> + #include <stdlib.h> + #include <math.h> + #include <assert.h> +diff --git a/libdjvu/GSmartPointer.cpp b/libdjvu/GSmartPointer.cpp +index 6e523e7..58aef5b 100644 +--- a/libdjvu/GSmartPointer.cpp ++++ b/libdjvu/GSmartPointer.cpp +@@ -67,6 +67,7 @@ + // Our original implementation consisted of multiple classes. + // <http://prdownloads.sourceforge.net/djvu/DjVu2_2b-src.tgz>. + ++#include <stddef.h> + #include <string.h> + #if PARANOID_DEBUG + # include <assert.h> +diff --git a/libdjvu/GSmartPointer.h b/libdjvu/GSmartPointer.h +index 82781bd..8a8bb8a 100644 +--- a/libdjvu/GSmartPointer.h ++++ b/libdjvu/GSmartPointer.h +@@ -97,6 +97,8 @@ + #include "DjVuGlobal.h" + #include "atomic.h" + ++#include <stddef.h> ++ + #ifdef HAVE_NAMESPACES + namespace DJVU { + # ifdef NOT_DEFINED // Just to fool emacs c++ mode +diff --git a/libdjvu/GString.cpp b/libdjvu/GString.cpp +index 03f6226..350b11b 100644 +--- a/libdjvu/GString.cpp ++++ b/libdjvu/GString.cpp +@@ -73,6 +73,7 @@ + #include "GThreads.h" + #include "debug.h" + ++#include <stddef.h> + #include <stdlib.h> + #include <stdio.h> + #include <string.h> +diff --git a/libdjvu/GString.h b/libdjvu/GString.h +index b63b753..3aa1f76 100644 +--- a/libdjvu/GString.h ++++ b/libdjvu/GString.h +@@ -108,6 +108,7 @@ + #include "DjVuGlobal.h" + #include "GContainer.h" + ++#include <stddef.h> + #include <stdlib.h> + #include <stdarg.h> + #ifdef WIN32 +diff --git a/libdjvu/GThreads.cpp b/libdjvu/GThreads.cpp +index d81f3c3..253fed8 100644 +--- a/libdjvu/GThreads.cpp ++++ b/libdjvu/GThreads.cpp +@@ -71,6 +71,8 @@ + #include "GThreads.h" + #include "GException.h" + #include "DjVuMessageLite.h" ++ ++#include <stddef.h> + #include <stdlib.h> + #include <stdio.h> + +diff --git a/libdjvu/GURL.cpp b/libdjvu/GURL.cpp +index c37bf52..a80078c 100644 +--- a/libdjvu/GURL.cpp ++++ b/libdjvu/GURL.cpp +@@ -72,6 +72,7 @@ + #include "GURL.h" + #include "debug.h" + ++#include <stddef.h> + #include <stdlib.h> + #include <stdio.h> + #include <ctype.h> +diff --git a/libdjvu/GUnicode.cpp b/libdjvu/GUnicode.cpp +index 415c081..a8b25b8 100644 +--- a/libdjvu/GUnicode.cpp ++++ b/libdjvu/GUnicode.cpp +@@ -62,6 +62,8 @@ + + #include "GString.h" + ++#include <stddef.h> ++ + #if HAS_ICONV + #include <iconv.h> + #endif +diff --git a/libdjvu/IFFByteStream.h b/libdjvu/IFFByteStream.h +index a653f8c..e31b216 100644 +--- a/libdjvu/IFFByteStream.h ++++ b/libdjvu/IFFByteStream.h +@@ -124,6 +124,7 @@ + + + #include "DjVuGlobal.h" ++#include <stddef.h> + #include <stdlib.h> + #include <stdio.h> + #include <string.h> +diff --git a/libdjvu/IW44EncodeCodec.cpp b/libdjvu/IW44EncodeCodec.cpp +index 8d7b12c..49081b7 100644 +--- a/libdjvu/IW44EncodeCodec.cpp ++++ b/libdjvu/IW44EncodeCodec.cpp +@@ -76,6 +76,7 @@ + #include "IFFByteStream.h" + #include "GRect.h" + ++#include <stddef.h> + #include <stdlib.h> + #include <string.h> + #include <math.h> +diff --git a/libdjvu/IW44Image.cpp b/libdjvu/IW44Image.cpp +index 9476726..4a19fb5 100644 +--- a/libdjvu/IW44Image.cpp ++++ b/libdjvu/IW44Image.cpp +@@ -76,6 +76,7 @@ + #include "IFFByteStream.h" + #include "GRect.h" + ++#include <stddef.h> + #include <stdlib.h> + #include <string.h> + #include <math.h> +diff --git a/libdjvu/JPEGDecoder.h b/libdjvu/JPEGDecoder.h +index bd430a0..fad1d4c 100644 +--- a/libdjvu/JPEGDecoder.h ++++ b/libdjvu/JPEGDecoder.h +@@ -64,6 +64,7 @@ + + #ifdef NEED_JPEG_DECODER + ++#include <stddef.h> + #include <string.h> + #include <setjmp.h> + +diff --git a/libdjvu/MMX.cpp b/libdjvu/MMX.cpp +index 5ab60bb..528dab6 100644 +--- a/libdjvu/MMX.cpp ++++ b/libdjvu/MMX.cpp +@@ -62,6 +62,7 @@ + + #include "MMX.h" + #include <stdio.h> ++#include <stddef.h> + #include <stdlib.h> + + +diff --git a/libdjvu/UnicodeByteStream.h b/libdjvu/UnicodeByteStream.h +index 0ae112b..9b49a17 100644 +--- a/libdjvu/UnicodeByteStream.h ++++ b/libdjvu/UnicodeByteStream.h +@@ -88,6 +88,7 @@ + #include "GString.h" + #include "ByteStream.h" + ++#include <stddef.h> + + #ifdef HAVE_NAMESPACES + namespace DJVU { +diff --git a/libdjvu/XMLParser.cpp b/libdjvu/XMLParser.cpp +index 84386c5..7da923a 100644 +--- a/libdjvu/XMLParser.cpp ++++ b/libdjvu/XMLParser.cpp +@@ -75,6 +75,7 @@ + #include "debug.h" + #include <stdio.h> + #include <ctype.h> ++#include <stddef.h> + #include <stdlib.h> + + +diff --git a/libdjvu/ZPCodec.cpp b/libdjvu/ZPCodec.cpp +index f6e971d..ff5b9bf 100644 +--- a/libdjvu/ZPCodec.cpp ++++ b/libdjvu/ZPCodec.cpp +@@ -66,6 +66,8 @@ + #include "ZPCodec.h" + #include "ByteStream.h" + #include "GException.h" ++ ++#include <stddef.h> + #include <stdlib.h> + #include <assert.h> + #include <math.h> +diff --git a/libdjvu/atomic.cpp b/libdjvu/atomic.cpp +index bdc193e..63fd483 100644 +--- a/libdjvu/atomic.cpp ++++ b/libdjvu/atomic.cpp +@@ -28,6 +28,7 @@ + # include "config.h" + #endif + ++#include <stddef.h> + #include <stdlib.h> + #include <assert.h> + #include "atomic.h" +diff --git a/libdjvu/ddjvuapi.cpp b/libdjvu/ddjvuapi.cpp +index b18b84b..f40f5aa 100644 +--- a/libdjvu/ddjvuapi.cpp ++++ b/libdjvu/ddjvuapi.cpp +@@ -60,6 +60,7 @@ + # pragma implementation "ddjvuapi.h" + #endif + ++#include <stddef.h> + #include <stdlib.h> + #include <stdio.h> + #include <string.h> +diff --git a/libdjvu/ddjvuapi.h b/libdjvu/ddjvuapi.h +index d0ed48f..841f223 100644 +--- a/libdjvu/ddjvuapi.h ++++ b/libdjvu/ddjvuapi.h +@@ -64,6 +64,7 @@ extern "C" { + } + #endif + ++#include <stddef.h> + #include <stdlib.h> + #include <stdio.h> + +diff --git a/libdjvu/miniexp.cpp b/libdjvu/miniexp.cpp +index e0fb087..fc51297 100644 +--- a/libdjvu/miniexp.cpp ++++ b/libdjvu/miniexp.cpp +@@ -23,6 +23,7 @@ + # pragma implementation "miniexp.h" + #endif + ++#include <stddef.h> + #include <stdlib.h> + #include <stdio.h> + #include <ctype.h> +diff --git a/libdjvu/miniexp.h b/libdjvu/miniexp.h +index 91e345d..993005b 100644 +--- a/libdjvu/miniexp.h ++++ b/libdjvu/miniexp.h +@@ -38,7 +38,8 @@ extern "C" { + #ifndef MINILISPAPI + # define MINILISPAPI /**/ + #endif +- ++ ++#include <stddef.h> + + /* -------------------------------------------------- */ + /* LISP EXPRESSIONS */ +diff --git a/tools/bzz.cpp b/tools/bzz.cpp +index ca092e1..2ebc7b9 100644 +--- a/tools/bzz.cpp ++++ b/tools/bzz.cpp +@@ -94,6 +94,7 @@ + #include "GURL.h" + #include "DjVuMessage.h" + #include <locale.h> ++#include <stddef.h> + #include <stdlib.h> + + static const char *program = "(unknown)"; +diff --git a/tools/c44.cpp b/tools/c44.cpp +index 6f23b53..855504b 100644 +--- a/tools/c44.cpp ++++ b/tools/c44.cpp +@@ -226,6 +226,7 @@ + #include <locale.h> + #include <stdio.h> + #include <string.h> ++#include <stddef.h> + #include <stdlib.h> + + // command line data +diff --git a/tools/cjb2.cpp b/tools/cjb2.cpp +index 8cf89b9..11eb662 100644 +--- a/tools/cjb2.cpp ++++ b/tools/cjb2.cpp +@@ -120,6 +120,7 @@ + #include "jb2tune.h" + + #include <locale.h> ++#include <stddef.h> + #include <stdlib.h> + #if HAVE_TIFF + #include <tiffio.h> +diff --git a/tools/cpaldjvu.cpp b/tools/cpaldjvu.cpp +index 111cbd3..b640a7a 100644 +--- a/tools/cpaldjvu.cpp ++++ b/tools/cpaldjvu.cpp +@@ -118,6 +118,7 @@ + #include "jb2tune.h" + + #include <locale.h> ++#include <stddef.h> + #include <stdlib.h> + #include <math.h> + +diff --git a/tools/csepdjvu.cpp b/tools/csepdjvu.cpp +index cd721f8..d5203d5 100644 +--- a/tools/csepdjvu.cpp ++++ b/tools/csepdjvu.cpp +@@ -162,6 +162,7 @@ + #include "jb2tune.h" + + #include <locale.h> ++#include <stddef.h> + #include <stdlib.h> + + #undef MIN +diff --git a/tools/ddjvu.cpp b/tools/ddjvu.cpp +index 817e045..981a270 100644 +--- a/tools/ddjvu.cpp ++++ b/tools/ddjvu.cpp +@@ -62,6 +62,7 @@ + # include "config.h" + #endif + ++#include <stddef.h> + #include <stdlib.h> + #include <stdio.h> + #include <stdarg.h> +diff --git a/tools/djvm.cpp b/tools/djvm.cpp +index 951bd66..6ea88c2 100644 +--- a/tools/djvm.cpp ++++ b/tools/djvm.cpp +@@ -135,9 +135,9 @@ + #include "DjVuMessage.h" + + #include <locale.h> ++#include <stddef.h> + #include <stdlib.h> + #include <stdio.h> +-#include <stdlib.h> + + static const char * progname; + +diff --git a/tools/djvmcvt.cpp b/tools/djvmcvt.cpp +index 9ca1c54..20b468a 100644 +--- a/tools/djvmcvt.cpp ++++ b/tools/djvmcvt.cpp +@@ -144,6 +144,7 @@ + + #include <locale.h> + #include <stdio.h> ++#include <stddef.h> + #include <stdlib.h> + + static const char * progname; +diff --git a/tools/djvudump.cpp b/tools/djvudump.cpp +index 6a0215a..2dddbdf 100644 +--- a/tools/djvudump.cpp ++++ b/tools/djvudump.cpp +@@ -119,6 +119,7 @@ xxx + #include <locale.h> + #include <stdio.h> + #include <ctype.h> ++#include <stddef.h> + #include <stdlib.h> + + void +diff --git a/tools/djvuextract.cpp b/tools/djvuextract.cpp +index 4a9f381..907b99c 100644 +--- a/tools/djvuextract.cpp ++++ b/tools/djvuextract.cpp +@@ -105,6 +105,7 @@ + #include "GOS.h" + #include "DjVuMessage.h" + #include <locale.h> ++#include <stddef.h> + #include <stdlib.h> + + +diff --git a/tools/djvumake.cpp b/tools/djvumake.cpp +index 7020484..4c5fc0f 100644 +--- a/tools/djvumake.cpp ++++ b/tools/djvumake.cpp +@@ -153,6 +153,7 @@ + + #include <locale.h> + #include <stdio.h> ++#include <stddef.h> + #include <stdlib.h> + #include <ctype.h> + +diff --git a/tools/djvups.cpp b/tools/djvups.cpp +index 51aa999..632b832 100644 +--- a/tools/djvups.cpp ++++ b/tools/djvups.cpp +@@ -57,6 +57,7 @@ + # include "config.h" + #endif + ++#include <stddef.h> + #include <stdlib.h> + #include <stdio.h> + #include <stdarg.h> +diff --git a/tools/djvused.cpp b/tools/djvused.cpp +index de84dcd..687fdca 100644 +--- a/tools/djvused.cpp ++++ b/tools/djvused.cpp +@@ -61,6 +61,7 @@ + #endif + + #include <stdio.h> ++#include <stddef.h> + #include <stdlib.h> + #include <stdarg.h> + #include <errno.h> +diff --git a/tools/djvuserve.cpp b/tools/djvuserve.cpp +index 19a17da..818fe78 100644 +--- a/tools/djvuserve.cpp ++++ b/tools/djvuserve.cpp +@@ -73,6 +73,7 @@ + + #include <locale.h> + #include <stdio.h> ++#include <stddef.h> + #include <stdlib.h> + #include <sys/stat.h> + #include <time.h> +diff --git a/tools/djvutxt.cpp b/tools/djvutxt.cpp +index ba2c745..9e9124c 100644 +--- a/tools/djvutxt.cpp ++++ b/tools/djvutxt.cpp +@@ -61,6 +61,7 @@ + # include "config.h" + #endif + ++#include <stddef.h> + #include <stdlib.h> + #include <stdio.h> + #include <stdarg.h> +diff --git a/tools/tiff2pdf.h b/tools/tiff2pdf.h +index 082f5fb..656dc43 100644 +--- a/tools/tiff2pdf.h ++++ b/tools/tiff2pdf.h +@@ -22,6 +22,7 @@ + # endif + # if HAVE_TIFF + # include <stdio.h> ++# include <stddef.h> + # include <stdlib.h> + # include <tiff.h> + # include <tiffio.h> +diff --git a/xmltools/djvutoxml.cpp b/xmltools/djvutoxml.cpp +index 17c769b..b40535e 100644 +--- a/xmltools/djvutoxml.cpp ++++ b/xmltools/djvutoxml.cpp +@@ -71,6 +71,7 @@ + + #include <locale.h> + #include <stdio.h> ++#include <stddef.h> + #include <stdlib.h> + #include <sys/stat.h> + #include <assert.h> +diff --git a/xmltools/djvuxmlparser.cpp b/xmltools/djvuxmlparser.cpp +index bdc5768..6679a9d 100644 +--- a/xmltools/djvuxmlparser.cpp ++++ b/xmltools/djvuxmlparser.cpp +@@ -70,6 +70,7 @@ + #include <stdio.h> + #include <ctype.h> + #include <locale.h> ++#include <stddef.h> + #include <stdlib.h> + + static void diff --git a/pkgs/applications/networking/p2p/mldonkey/default.nix b/pkgs/applications/networking/p2p/mldonkey/default.nix index 16ce0d3504d..98abc0a3db7 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 00000000000..41449dcdd05 --- /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 fcd342e0b59..35395bd25d1 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 473adba8627..2052d2c2eb4 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 98baafb4878..f954cae05d8 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 a76684806b8..23117694767 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 f1b394a1f54..2ad7783a442 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 7faaa0122cd..faf6e92fdff 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/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index 979ceae5418..207edce147b 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -351,7 +351,7 @@ rec { with pkgs; runInLinuxVM ( stdenv.mkDerivation { name = "extract-file"; - buildInputs = [utillinuxng]; + buildInputs = [ utillinux ]; buildCommand = '' ln -s ${linux}/lib /lib ${module_init_tools}/sbin/modprobe loop @@ -376,7 +376,7 @@ rec { with pkgs; runInLinuxVM ( stdenv.mkDerivation { name = "extract-file-mtd"; - buildInputs = [utillinuxng mtdutils]; + buildInputs = [ utillinux mtdutils ]; buildCommand = '' ln -s ${linux}/lib /lib ${module_init_tools}/sbin/modprobe mtd diff --git a/pkgs/development/compilers/gcc-4.4/default.nix b/pkgs/development/compilers/gcc-4.4/default.nix index fa34364912e..d962d4ac347 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 aedd5b46b12..e1e56c8574a 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 0948e94702e..a86c317e265 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,21 +211,15 @@ 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]) ; - configureFlagsArray = stdenv.lib.optionals - (ppl != null && ppl.dontDisableStatic == true) - [ "--with-host-libstdcxx=-lstdc++ -lgcc_s" - "--with-stage1-libs=-lstdc++ -lgcc_s" ]; - configureFlags = " ${if enableMultilib then "" else "--disable-multilib"} ${if enableShared then "" else "--disable-shared"} @@ -254,7 +247,6 @@ stdenv.mkDerivation ({ ++ optional langCC "c++" ++ optional langFortran "fortran" ++ optional langJava "java" - ++ optional langTreelang "treelang" ++ optional langAda "ada" ++ optional langVhdl "vhdl" ) @@ -301,7 +293,6 @@ stdenv.mkDerivation ({ ++ optional langCC "c++" ++ optional langFortran "fortran" ++ optional langJava "java" - ++ optional langTreelang "treelang" ++ optional langAda "ada" ++ optional langVhdl "vhdl" ) @@ -356,7 +347,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 +357,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 +365,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 +401,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 6059e03880b..6e702f79ed0 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 5fdb61576fa..9ae35014916 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 @@ -11,8 +11,7 @@ , perl ? null # optional, for texi2pod (then pod2man); required for Java , 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 +, ppl ? null, cloog ? null # optional, for the Graphite optimization framework. , 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' @@ -40,9 +38,6 @@ assert langVhdl -> gnat != null; # LTO needs libelf and zlib. assert libelf != null -> zlib != null; -# Cannot use both cloog and cloog-ppl -assert cloog != null -> cloogppl == null; - with stdenv.lib; with builtins; @@ -214,30 +209,27 @@ 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) - ++ (optional (cloogppl != null) cloogppl) ++ (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]) ; configureFlagsArray = stdenv.lib.optionals - (ppl != null && ppl.dontDisableStatic == true) + (ppl != null && ppl ? dontDisableStatic && ppl.dontDisableStatic) [ "--with-host-libstdcxx=-lstdc++ -lgcc_s" ]; configureFlags = " ${if enableMultilib then "" else "--disable-multilib"} ${if enableShared then "" else "--disable-shared"} ${if ppl != null then "--with-ppl=${ppl}" else ""} - ${if cloogppl != null then "--with-cloog=${cloogppl}" else ""} ${if cloog != null then "--with-cloog=${cloog} --enable-cloog-backend=isl" else ""} @@ -263,7 +255,6 @@ stdenv.mkDerivation ({ ++ optional langCC "c++" ++ optional langFortran "fortran" ++ optional langJava "java" - ++ optional langTreelang "treelang" ++ optional langAda "ada" ++ optional langVhdl "vhdl" ++ optional langGo "go" @@ -301,7 +292,6 @@ stdenv.mkDerivation ({ ${if enableMultilib then "" else "--disable-multilib"} ${if enableShared then "" else "--disable-shared"} ${if ppl != null then "--with-ppl=${ppl.hostDrv}" else ""} - ${if cloogppl != null then "--with-cloog=${cloogppl.hostDrv}" else ""} ${if cloog != null then "--with-cloog=${cloog.hostDrv} --enable-cloog-backend=isl" else ""} ${if langJava then "--with-ecj-jar=${javaEcj.hostDrv}" else ""} ${if javaAwtGtk then "--enable-java-awt=gtk" else ""} @@ -317,7 +307,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 +372,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 +410,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 76928d10448..76928d10448 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 29edf68bb64..29edf68bb64 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 6a144a7f780..6a144a7f780 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 00000000000..bdd3365b8b0 --- /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 00000000000..a7fa7725c89 --- /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 00000000000..6a144a7f780 --- /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 4b965999910..4b965999910 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 679a7abde3b..679a7abde3b 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 48588d5a429..48588d5a429 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 d61ec82f4f0..d61ec82f4f0 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/acl/default.nix b/pkgs/development/libraries/acl/default.nix index 5ce81105fa3..3ccb5691980 100644 --- a/pkgs/development/libraries/acl/default.nix +++ b/pkgs/development/libraries/acl/default.nix @@ -1,14 +1,14 @@ { stdenv, fetchurl, gettext, attr }: stdenv.mkDerivation rec { - name = "acl-2.2.49"; + name = "acl-2.2.51"; src = fetchurl { url = "mirror://savannah/acl/${name}.src.tar.gz"; - sha256 = "1mg5nxr0r9y08lmyxmm2lfss5jz1xzbs0npsc8597x2f5rsz9ixr"; + sha256 = "09aj30m49ivycl3irram8c3givc0crivjm3ymw0nhfaxrwhlb186"; }; - buildNativeInputs = [gettext]; + buildNativeInputs = [ gettext ]; buildInputs = [ attr ]; # Upstream use C++-style comments in C code. Remove them. diff --git a/pkgs/development/libraries/attr/default.nix b/pkgs/development/libraries/attr/default.nix index 6477b443dcf..adc53086306 100644 --- a/pkgs/development/libraries/attr/default.nix +++ b/pkgs/development/libraries/attr/default.nix @@ -1,14 +1,14 @@ { stdenv, fetchurl, gettext }: stdenv.mkDerivation rec { - name = "attr-2.4.44"; + name = "attr-2.4.46"; src = fetchurl { url = "mirror://savannah/attr/${name}.src.tar.gz"; - sha256 = "16244r2vrd57i5fnf7dz3yi2mcckc47jr9y539jvljrzwnw18qlz"; + sha256 = "07qf6kb2zk512az481bbnsk9jycn477xpva1a726n5pzlzf9pmnw"; }; - buildNativeInputs = [gettext]; + buildNativeInputs = [ gettext ]; configureFlags = "MAKE=make MSGFMT=msgfmt MSGMERGE=msgmerge XGETTEXT=xgettext ECHO=echo SED=sed AWK=gawk"; diff --git a/pkgs/development/libraries/cloog-ppl/default.nix b/pkgs/development/libraries/cloog-ppl/default.nix index ca662d30eb0..d9dae7bfd41 100644 --- a/pkgs/development/libraries/cloog-ppl/default.nix +++ b/pkgs/development/libraries/cloog-ppl/default.nix @@ -1,31 +1,19 @@ -{ fetchurl, stdenv, ppl, static ? false }: - -let - - # --with-host-libstdcxx helps when *ppl* is built statically. - # But I will suppose that this is statically built only when ppl is also - # statically built. - staticFlags = - assert static -> ppl.dontDisableStatic == true; - if static then " --enable-static --disable-shared --with-host-libstdcxx=-lstdc++" else ""; - -in +{ fetchurl, stdenv, ppl }: 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 ]; - configureFlags = "--with-ppl=${ppl}" + staticFlags; - dontDisableStatic = if static then true else false; + configureFlags = "--with-ppl=${ppl}"; crossAttrs = { - configureFlags = "--with-ppl=${ppl.hostDrv}" + staticFlags; + configureFlags = "--with-ppl=${ppl.hostDrv}"; }; doCheck = true; diff --git a/pkgs/development/libraries/cloog/default.nix b/pkgs/development/libraries/cloog/default.nix index 7bd0d68c3ec..ab5737b20ed 100644 --- a/pkgs/development/libraries/cloog/default.nix +++ b/pkgs/development/libraries/cloog/default.nix @@ -1,6 +1,4 @@ -{ fetchurl, stdenv, gmp, isl, static ? false }: - -assert static -> isl.dontDisableStatic; +{ fetchurl, stdenv, gmp, isl }: stdenv.mkDerivation rec { name = "cloog-0.16.3"; @@ -14,10 +12,7 @@ stdenv.mkDerivation rec { propagatedBuildInputs = [ isl ]; - configureFlags = [ "--with-isl=system" ] - ++ (stdenv.lib.optionals static [ "--enable-static" "--disable-shared" ]); - - dontDisableStatic = static; + configureFlags = [ "--with-isl=system" ]; doCheck = true; diff --git a/pkgs/development/libraries/dbus-glib/0.94.nix b/pkgs/development/libraries/dbus-glib/0.94.nix deleted file mode 100644 index 83c1693d80f..00000000000 --- a/pkgs/development/libraries/dbus-glib/0.94.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ stdenv, fetchurl, pkgconfig, expat, gettext, libiconv, dbus, glib }: - -stdenv.mkDerivation rec { - name = "dbus-glib-0.94"; - - src = fetchurl { - url = "${meta.homepage}/releases/dbus-glib/${name}.tar.gz"; - sha256 = "16yk106bp58in6vz2li2s3iwk1si65f0n22m8c2mplzh2j9zlq74"; - }; - - buildInputs = [ pkgconfig expat gettext ] - ++ stdenv.lib.optional (!stdenv.isLinux) libiconv; - - propagatedBuildInputs = [ dbus glib ]; - - passthru = { inherit dbus glib; }; - - meta = { - homepage = http://dbus.freedesktop.org; - license = "AFL-2.1 or GPL-2"; - description = "GLib bindings for D-Bus lightweight IPC mechanism"; - }; -} diff --git a/pkgs/development/libraries/dbus-glib/default.nix b/pkgs/development/libraries/dbus-glib/default.nix index 467b9c4d506..5fccc7ad66b 100644 --- a/pkgs/development/libraries/dbus-glib/default.nix +++ b/pkgs/development/libraries/dbus-glib/default.nix @@ -1,23 +1,25 @@ { stdenv, fetchurl, pkgconfig, expat, gettext, libiconv, dbus, glib }: stdenv.mkDerivation rec { - name = "dbus-glib-0.86"; + name = "dbus-glib-0.98"; src = fetchurl { url = "${meta.homepage}/releases/dbus-glib/${name}.tar.gz"; - sha256 = "1p0bm5p8g8h0mimhj0d58dqdrhfipvcwv95l6hf69z4gygksclak"; + sha256 = "04fiwld5yaxyggxlvdmbaqkngh4fn8gfkkqckcp3274bpgb82z19"; }; - - buildInputs = [ pkgconfig expat gettext ] - ++ stdenv.lib.optional (!stdenv.isLinux) libiconv; - - propagatedBuildInputs = [ dbus.libs glib ]; - + + buildNativeInputs = [ pkgconfig gettext ]; + + buildInputs = [ expat ] ++ stdenv.lib.optional (!stdenv.isLinux) libiconv; + + propagatedBuildInputs = [ dbus glib ]; + passthru = { inherit dbus glib; }; meta = { homepage = http://dbus.freedesktop.org; license = "AFL-2.1 or GPL-2"; - description = "GLib bindings for D-Bus lightweight IPC mechanism"; + description = "Obsolete glib bindings for D-Bus lightweight IPC mechanism"; + maintainers = [ stdenv.lib.maintainers.urkud ]; }; } diff --git a/pkgs/development/libraries/dbus/1.5.6.nix b/pkgs/development/libraries/dbus/1.5.6.nix deleted file mode 100644 index 9c158933cb0..00000000000 --- a/pkgs/development/libraries/dbus/1.5.6.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ stdenv, fetchurl, pkgconfig, expat, libX11, libICE, libSM, useX11 ? true }: - -let - version = "1.5.6"; - - src = fetchurl { - url = "http://dbus.freedesktop.org/releases/dbus/dbus-${version}.tar.gz"; - sha256 = "18g5328wnh25p0hihv5gg55q5l019zzwr04shvp67myvwy07m851"; - }; - - patches = [ ./ignore-missing-includedirs.patch ]; - - configureFlags = "--localstatedir=/var --sysconfdir=/etc --with-session-socket-dir=/tmp"; - -in rec { - - libs = stdenv.mkDerivation { - name = "dbus-library-" + version; - - buildInputs = [ pkgconfig expat ]; - - inherit src patches configureFlags; - - preConfigure = - '' - sed -i '/mkinstalldirs.*localstatedir/d' bus/Makefile.in - sed -i '/SUBDIRS/s/ tools//' Makefile.in - ''; - - # Enable X11 autolaunch support in libdbus. This doesn't actually - # depend on X11 (it just execs dbus-launch in dbus.tools), - # contrary to what the configure script demands. - NIX_CFLAGS_COMPILE = "-DDBUS_ENABLE_X11_AUTOLAUNCH=1"; - - installFlags = "sysconfdir=$(out)/etc"; - }; - - tools = stdenv.mkDerivation { - name = "dbus-tools-" + version; - - inherit src patches; - - configureFlags = "${configureFlags} --with-dbus-daemondir=${daemon}/bin"; - - buildInputs = [ pkgconfig expat libs ] - ++ stdenv.lib.optionals useX11 [ libX11 libICE libSM ]; - - NIX_LDFLAGS = "-ldbus-1"; - - preConfigure = - '' - sed -i 's@$(top_builddir)/dbus/libdbus-1.la@@' tools/Makefile.in - substituteInPlace tools/Makefile.in --replace 'install-localstatelibDATA:' 'disabled:' - ''; - - postConfigure = "cd tools"; - }; - - # I'm too lazy to separate daemon and libs now. - daemon = libs; -} diff --git a/pkgs/development/libraries/dbus/default.nix b/pkgs/development/libraries/dbus/default.nix index 1d0bcc11146..c943fe87fb3 100644 --- a/pkgs/development/libraries/dbus/default.nix +++ b/pkgs/development/libraries/dbus/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, pkgconfig, expat, libX11, libICE, libSM, useX11 ? true }: let - version = "1.4.14"; + version = "1.4.16"; src = fetchurl { url = "http://dbus.freedesktop.org/releases/dbus/dbus-${version}.tar.gz"; - sha256 = "0xsqkq2q2hb09dcdsw0y359zvml480h79qvl9g31r7da57y7xwj7"; + sha256 = "1ii93d0lzj5xm564dcq6ca4s0nvm5i9fx3jp0s7i9hlc5wkfd3hx"; }; patches = [ ./ignore-missing-includedirs.patch ]; @@ -17,7 +17,9 @@ in rec { libs = stdenv.mkDerivation { name = "dbus-library-" + version; - buildInputs = [ pkgconfig expat ]; + buildNativeInputs = [ pkgconfig ]; + + buildInputs = [ expat ]; inherit src patches configureFlags; @@ -42,14 +44,16 @@ in rec { configureFlags = "${configureFlags} --with-dbus-daemondir=${daemon}/bin"; - buildInputs = [ pkgconfig expat libs ] + buildNativeInputs = [ pkgconfig ]; + + buildInputs = [ expat libs ] ++ stdenv.lib.optionals useX11 [ libX11 libICE libSM ]; NIX_LDFLAGS = "-ldbus-1"; preConfigure = '' - sed -i 's@ $(top_builddir)/dbus/libdbus-1.la@@' tools/Makefile.in + sed -i 's@$(top_builddir)/dbus/libdbus-1.la@@' tools/Makefile.in substituteInPlace tools/Makefile.in --replace 'install-localstatelibDATA:' 'disabled:' ''; diff --git a/pkgs/development/libraries/gettext/0.17.nix b/pkgs/development/libraries/gettext/0.17.nix index 6b094fdc839..bee2042f116 100644 --- a/pkgs/development/libraries/gettext/0.17.nix +++ b/pkgs/development/libraries/gettext/0.17.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, libiconv }: -stdenv.mkDerivation (rec { +stdenv.mkDerivation rec { name = "gettext-0.17"; src = fetchurl { @@ -21,6 +21,8 @@ stdenv.mkDerivation (rec { fi ''; + buildInputs = stdenv.lib.optional (!stdenv.isLinux) libiconv; + meta = { description = "GNU gettext, a well integrated set of translation tools and documentation"; @@ -47,12 +49,4 @@ stdenv.mkDerivation (rec { maintainers = [ stdenv.lib.maintainers.ludo ]; }; -} - -// - -(if (!stdenv.isLinux) # any non-GNU system - then { - buildInputs = [ libiconv ]; - } - else {})) +} \ No newline at end of file diff --git a/pkgs/development/libraries/gettext/default.nix b/pkgs/development/libraries/gettext/default.nix index ddcfc327a9e..f7b31139b56 100644 --- a/pkgs/development/libraries/gettext/default.nix +++ b/pkgs/development/libraries/gettext/default.nix @@ -1,8 +1,6 @@ -# XXX: Remove me when `stdenv-updates' is merged. - { stdenv, fetchurl, libiconv }: -stdenv.mkDerivation (rec { +stdenv.mkDerivation rec { name = "gettext-0.18.1.1"; src = fetchurl { @@ -23,6 +21,10 @@ stdenv.mkDerivation (rec { fi ''; + buildInputs = stdenv.lib.optional (!stdenv.isLinux) libiconv; + + enableParallelBuilding = true; + crossAttrs = { buildInputs = stdenv.lib.optional (stdenv.gccCross.libc ? libiconv) stdenv.gccCross.libc.libiconv.hostDrv; @@ -58,11 +60,3 @@ stdenv.mkDerivation (rec { platforms = stdenv.lib.platforms.all; }; } - -// - -(if (!stdenv.isLinux) # any non-GNU system - then { - buildInputs = [ libiconv ]; - } - else {})) diff --git a/pkgs/development/libraries/glibc-2.12/builder.sh b/pkgs/development/libraries/glibc-2.13/builder.sh index 9a1c1490019..9a1c1490019 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 00000000000..d63e7e99e48 --- /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 89e8c60b7da..31a8ef13a4f 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 00000000000..98f7f81087b --- /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 84a16fefce9..84a16fefce9 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 d732e208fa2..d732e208fa2 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 31a03c48d85..d598e0e094d 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 aca904f7ff4..aca904f7ff4 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 e48dc2bc0a6..e48dc2bc0a6 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 fbb03dd5fad..fbb03dd5fad 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 00000000000..9a1c1490019 --- /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 0d56d877018..e24089fd192 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 00000000000..31a8ef13a4f --- /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 00000000000..98f7f81087b --- /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 00000000000..84a16fefce9 --- /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 00000000000..d732e208fa2 --- /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 00000000000..d598e0e094d --- /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 00000000000..aca904f7ff4 --- /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 00000000000..e48dc2bc0a6 --- /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 00000000000..fbb03dd5fad --- /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 338debaa81e..a633177c128 100644 --- a/pkgs/development/libraries/gmp/default.nix +++ b/pkgs/development/libraries/gmp/default.nix @@ -1,27 +1,19 @@ -{stdenv, fetchurl, m4, cxx ? true, static ? false}: - -let - staticFlags = if static then " --enable-static --disable-shared" else ""; -in +{ stdenv, fetchurl, m4, cxx ? true }: stdenv.mkDerivation rec { - name = "gmp-5.0.1"; + name = "gmp-5.0.2"; src = fetchurl { url = "mirror://gnu/gmp/${name}.tar.bz2"; - sha256 = "1yrr14l6vvhm1g27y8nb3c75j0i4ii4k1gw7ik08safk3zq119m2"; + sha256 = "0a2ch2kpbzrsf3c1pfc6sph87hk2xmwa6np3sn2rzsflzmvdphnv"; }; - 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 = if cxx then "--enable-cxx" else "--disable-cxx" + - staticFlags; + buildNativeInputs = [ m4 ]; - dontDisableStatic = if static then true else false; + configureFlags = + # Build a "fat binary", with routines for several sub-architectures (x86). + [ "--enable-fat" ] + ++ (if cxx then [ "--enable-cxx" ] else [ "--disable-cxx" ]); doCheck = true; diff --git a/pkgs/development/libraries/haskell/network/2.3.0.7.nix b/pkgs/development/libraries/haskell/network/2.3.0.7.nix new file mode 100644 index 00000000000..3c0e0065ed9 --- /dev/null +++ b/pkgs/development/libraries/haskell/network/2.3.0.7.nix @@ -0,0 +1,18 @@ +{ cabal, parsec }: + +cabal.mkDerivation (self: { + pname = "network"; + version = "2.3.0.7"; + sha256 = "1rlzdacgaq8nv0bwczsrkw47rw4aamf9y4ynm3xjw0r3w1xcg9yv"; + buildDepends = [ parsec ]; + meta = { + homepage = "http://github.com/haskell/network"; + description = "Low-level networking interface"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + maintainers = [ + self.stdenv.lib.maintainers.andres + self.stdenv.lib.maintainers.simons + ]; + }; +}) diff --git a/pkgs/development/libraries/haskell/syb/0.3.5.nix b/pkgs/development/libraries/haskell/syb/0.3.5.nix new file mode 100644 index 00000000000..f15911c08bd --- /dev/null +++ b/pkgs/development/libraries/haskell/syb/0.3.5.nix @@ -0,0 +1,17 @@ +{ cabal }: + +cabal.mkDerivation (self: { + pname = "syb"; + version = "0.3.5"; + sha256 = "17gwhn0rqjf9zkx1dsmsaj41qdjlk4mq5lzpqkgy3slq30nwwwbr"; + meta = { + homepage = "http://www.cs.uu.nl/wiki/GenericProgramming/SYB"; + description = "Scrap Your Boilerplate"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + maintainers = [ + self.stdenv.lib.maintainers.andres + self.stdenv.lib.maintainers.simons + ]; + }; +}) diff --git a/pkgs/development/libraries/isl/default.nix b/pkgs/development/libraries/isl/default.nix index 2261baba030..b080064d393 100644 --- a/pkgs/development/libraries/isl/default.nix +++ b/pkgs/development/libraries/isl/default.nix @@ -1,7 +1,7 @@ -{stdenv, fetchurl, gmp, static ? false}: +{ stdenv, fetchurl, gmp }: stdenv.mkDerivation rec { - name = "isl-0.07"; # CLooG 0.16.3 fails to build with ISL 0.08. + name = "isl-0.07"; # CLooG 0.16.3 fails to build with ISL 0.08. src = fetchurl { url = "http://www.kotnet.org/~skimo/isl/${name}.tar.bz2"; @@ -10,14 +10,10 @@ stdenv.mkDerivation rec { buildInputs = [ gmp ]; - dontDisableStatic = static; - configureFlags = - stdenv.lib.optionals static [ " --enable-static" "--disable-shared" ]; - meta = { homepage = http://www.kotnet.org/~skimo/isl/; license = "LGPLv2.1"; - description = "A library for manipulating sets and relations of integer points bounded by linear constraints."; + description = "A library for manipulating sets and relations of integer points bounded by linear constraints"; maintainers = [ stdenv.lib.maintainers.shlevy ]; platforms = stdenv.lib.platforms.all; }; diff --git a/pkgs/development/libraries/libsigsegv/default.nix b/pkgs/development/libraries/libsigsegv/default.nix index 8987797ca8b..b0a726ed7f3 100644 --- a/pkgs/development/libraries/libsigsegv/default.nix +++ b/pkgs/development/libraries/libsigsegv/default.nix @@ -1,11 +1,11 @@ { fetchurl, stdenv }: stdenv.mkDerivation rec { - name = "libsigsegv-2.8"; + name = "libsigsegv-2.10"; src = fetchurl { url = "mirror://gnu/libsigsegv/${name}.tar.gz"; - sha256 = "052vcxgajdlvc77dqcs48axjz698r1g2gyagz2qcr6zvkyw304w6"; + sha256 = "16hrs8k3nmc7a8jam5j1fpspd6sdpkamskvsdpcw6m29vnis8q44"; }; doCheck = true; diff --git a/pkgs/development/libraries/libtirpc/default.nix b/pkgs/development/libraries/libtirpc/default.nix new file mode 100644 index 00000000000..d9678f646b8 --- /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/libwpg/default.nix b/pkgs/development/libraries/libwpg/default.nix index 3da153c3dc5..d140b8b8a0c 100644 --- a/pkgs/development/libraries/libwpg/default.nix +++ b/pkgs/development/libraries/libwpg/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, libwpd, xz }: +{ stdenv, fetchurl, pkgconfig, libwpd }: stdenv.mkDerivation rec { name = "libwpg-0.2.1"; @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { }; buildInputs = [ libwpd ]; - buildNativeInputs = [ pkgconfig xz ]; + buildNativeInputs = [ pkgconfig ]; meta = { homepage = http://libwpg.sourceforge.net; diff --git a/pkgs/development/libraries/libxcrypt/default.nix b/pkgs/development/libraries/libxcrypt/default.nix index aea9e53eef6..b2c9a2c9cf5 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 00000000000..0664f96aa68 --- /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/mpc/default.nix b/pkgs/development/libraries/mpc/default.nix index 88c18565b78..3824e3d3755 100644 --- a/pkgs/development/libraries/mpc/default.nix +++ b/pkgs/development/libraries/mpc/default.nix @@ -1,11 +1,11 @@ { fetchurl, stdenv, gmp, mpfr }: stdenv.mkDerivation rec { - name = "mpc-0.8.2"; + name = "mpc-0.9"; src = fetchurl { url = "http://www.multiprecision.org/mpc/download/${name}.tar.gz"; - sha256 = "1iw0ag28l5r88k7kpn6i89rqn3yhk2irqzk0d1mlb1la3paghydf"; + sha1 = "229722d553030734d49731844abfef7617b64f1a"; }; buildInputs = [ gmp mpfr ]; diff --git a/pkgs/development/libraries/mpfr/default.nix b/pkgs/development/libraries/mpfr/default.nix index 51d33f9593c..0ab745879ac 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 b503493ac88..93126d51135 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 00000000000..4a614659e72 --- /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 05db48095c3..46c170d33f9 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 00000000000..05db48095c3 --- /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/default.nix b/pkgs/development/libraries/openssl/default.nix index 633e43ac6a6..fc3018b0ab2 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -23,7 +23,8 @@ let ./gnu.patch # submitted upstream ]) - ++ (stdenv.lib.optional stdenv.isDarwin ./darwin-arch.patch); + ++ (stdenv.lib.optional stdenv.isDarwin ./darwin-arch.patch) + ++ stdenv.lib.optional (stdenv.system == "x86_64-freebsd") ./freebsd-x86_64-asm.patch; in diff --git a/pkgs/development/libraries/pcre/default.nix b/pkgs/development/libraries/pcre/default.nix index 65eb51af9b0..7802f89807d 100644 --- a/pkgs/development/libraries/pcre/default.nix +++ b/pkgs/development/libraries/pcre/default.nix @@ -1,11 +1,11 @@ -{stdenv, fetchurl, unicodeSupport ? false, cplusplusSupport ? true}: +{ stdenv, fetchurl, unicodeSupport ? true, cplusplusSupport ? true }: -stdenv.mkDerivation { - name = "pcre-8.10"; +stdenv.mkDerivation rec { + name = "pcre-8.21"; src = fetchurl { - url = mirror://sourceforge/pcre/pcre-8.10.tar.bz2; - sha256 = "7ac4e016f6bad8c7d990e6de9bce58c04ff5dd8838be0c5ada0afad1d6a07480"; + url = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/${name}.tar.bz2"; + sha256 = "1qwrqldbwszbmr4cw4f0xmcl889cmmjbf58l9vxn89zw26fm1f54"; }; # The compiler on Darwin crashes with an internal error while building the diff --git a/pkgs/development/libraries/ppl/0.11.nix b/pkgs/development/libraries/ppl/0.11.nix deleted file mode 100644 index d8ffde644de..00000000000 --- a/pkgs/development/libraries/ppl/0.11.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ fetchurl, stdenv, gmpxx, perl, gnum4, static ? false }: - -let - 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 = "0xqwyaj232gi0pgm6z2rihk6p8l1rngbbibnhmcrbq4jq550clrl"; - }; - - buildNativeInputs = [ perl gnum4 ]; - propagatedBuildInputs = [ gmpxx ]; - - dontDisableStatic = if static then true else false; - configureFlags = staticFlags; - - # Beware! It took ~6 hours to compile PPL and run its tests on a 1.2 GHz - # x86_64 box. Nevertheless, being a dependency of GCC, it probably ought - # to be tested. - doCheck = false; - - meta = { - description = "PPL: The Parma Polyhedra Library"; - - longDescription = '' - The Parma Polyhedra Library (PPL) provides numerical abstractions - especially targeted at applications in the field of analysis and - verification of complex systems. These abstractions include convex - polyhedra, defined as the intersection of a finite number of (open or - closed) halfspaces, each described by a linear inequality (strict or - non-strict) with rational coefficients; some special classes of - polyhedra shapes that offer interesting complexity/precision tradeoffs; - and grids which represent regularly spaced points that satisfy a set of - linear congruence relations. The library also supports finite - powersets and products of (any kind of) polyhedra and grids and a mixed - integer linear programming problem solver using an exact-arithmetic - version of the simplex algorithm. - ''; - - homepage = http://www.cs.unipr.it/ppl/; - - license = "GPLv3+"; - - maintainers = [ stdenv.lib.maintainers.ludo ]; - }; - } diff --git a/pkgs/development/libraries/ppl/default.nix b/pkgs/development/libraries/ppl/default.nix index 677d578e242..8cad9022d91 100644 --- a/pkgs/development/libraries/ppl/default.nix +++ b/pkgs/development/libraries/ppl/default.nix @@ -1,50 +1,49 @@ -{ fetchurl, stdenv, gmpxx, perl, gnum4, static ? false }: - -let - version = "0.10.2"; - staticFlags = if static then " --enable-static --disable-shared" else ""; -in - stdenv.mkDerivation rec { - name = "ppl-${version}"; - - src = fetchurl { - url = "mirror://gcc/infrastructure/ppl-${version}.tar.gz"; - sha256 = "0lly44sac4jd72klnhhil3wha15vak76r6gy88sh0zjsaww9hf6h"; - }; - - buildNativeInputs = [ perl gnum4 ]; - propagatedBuildInputs = [ gmpxx ]; - - dontDisableStatic = if static then true else false; - configureFlags = staticFlags; - - # Beware! It took ~6 hours to compile PPL and run its tests on a 1.2 GHz - # x86_64 box. Nevertheless, being a dependency of GCC, it probably ought - # to be tested. - doCheck = false; - - meta = { - description = "PPL: The Parma Polyhedra Library"; - - longDescription = '' - The Parma Polyhedra Library (PPL) provides numerical abstractions - especially targeted at applications in the field of analysis and - verification of complex systems. These abstractions include convex - polyhedra, defined as the intersection of a finite number of (open or - closed) halfspaces, each described by a linear inequality (strict or - non-strict) with rational coefficients; some special classes of - polyhedra shapes that offer interesting complexity/precision tradeoffs; - and grids which represent regularly spaced points that satisfy a set of - linear congruence relations. The library also supports finite - powersets and products of (any kind of) polyhedra and grids and a mixed - integer linear programming problem solver using an exact-arithmetic - version of the simplex algorithm. - ''; - - homepage = http://www.cs.unipr.it/ppl/; - - license = "GPLv3+"; - - maintainers = [ stdenv.lib.maintainers.ludo ]; - }; - } +{ fetchurl, stdenv, gmpxx, perl, gnum4 }: + +let version = "0.11.2"; in + +stdenv.mkDerivation rec { + name = "ppl-${version}"; + + src = fetchurl { + url = "http://bugseng.com/products/ppl/download/ftp/releases/${version}/ppl-${version}.tar.bz2"; + sha256 = "1sxviip4yk6gp453pid5scy1ba66dzdpr02i1416yk7lkv0x3yz3"; + }; + + buildNativeInputs = [ perl gnum4 ]; + propagatedBuildInputs = [ gmpxx ]; + + configureFlags = "--disable-watchdog"; + + # Beware! It took ~6 hours to compile PPL and run its tests on a 1.2 GHz + # x86_64 box. Nevertheless, being a dependency of GCC, it probably ought + # to be tested. + doCheck = false; + + enableParallelBuilding = true; + + meta = { + description = "PPL: The Parma Polyhedra Library"; + + longDescription = '' + The Parma Polyhedra Library (PPL) provides numerical abstractions + especially targeted at applications in the field of analysis and + verification of complex systems. These abstractions include convex + polyhedra, defined as the intersection of a finite number of (open or + closed) halfspaces, each described by a linear inequality (strict or + non-strict) with rational coefficients; some special classes of + polyhedra shapes that offer interesting complexity/precision tradeoffs; + and grids which represent regularly spaced points that satisfy a set of + linear congruence relations. The library also supports finite + powersets and products of (any kind of) polyhedra and grids and a mixed + integer linear programming problem solver using an exact-arithmetic + version of the simplex algorithm. + ''; + + homepage = http://www.cs.unipr.it/ppl/; + + license = "GPLv3+"; + + maintainers = [ stdenv.lib.maintainers.ludo ]; + }; +} diff --git a/pkgs/development/libraries/readline/readline-patches.nix b/pkgs/development/libraries/readline/readline-6.2-patches.nix index b8019fb3350..ae1e67224af 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 1bd88069127..0826e6c5f7c 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 f1b8a006ecf..a2f11bca87d 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 00000000000..6ddb0ad7066 --- /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 80958e2885f..53e27836d73 100644 --- a/pkgs/development/tools/build-managers/cmake/default.nix +++ b/pkgs/development/tools/build-managers/cmake/default.nix @@ -7,11 +7,10 @@ with stdenv.lib; let os = stdenv.lib.optionalString; majorVersion = "2.8"; - minorVersion = "4"; + minorVersion = "7"; version = "${majorVersion}.${minorVersion}"; in -# WARNING: Do NOT upgrade cmake in trunk: it fails to build on i686-linux stdenv.mkDerivation rec { name = "cmake-${os useNcurses "cursesUI-"}${os useQt4 "qt4UI-"}${version}"; @@ -19,7 +18,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "${meta.homepage}files/v${majorVersion}/cmake-${version}.tar.gz"; - sha256 = "1k2kjaj3vfifb329ff7fr4hcbpbaqb66l97pshq70h7m0zwajznr"; + sha256 = "17zmxh0gyis6w05d2km0swlvy94h3w10jgra0fpa5qcg7l2j628k"; }; patches = diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index 4ccaa550313..526bc45f8bc 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -1,30 +1,12 @@ { stdenv, fetchurl, noSysDirs, zlib, cross ? null, gold ? false, bison ? null, flex2535 ? null, bc ? null, dejagnu ? null }: -let - basename = "binutils-2.21"; -in +let basename = "binutils-2.21.1a"; in stdenv.mkDerivation rec { name = basename + stdenv.lib.optionalString (cross != null) "-${cross.config}"; - # WARNING: Upstream made a mistake in packaging that may mean anyone - # but the FSF hosting this tarball is accidentally in violation of - # the GPL. We can't update binutils until the next stdenv-updates, - # so we are stuck with this version. The issue is discussed in - # this email: http://sourceware.org/ml/binutils/2011-08/msg00198.html - # The tarball for this minor version will not be fixed, as only the - # tarballs for the latest minor version of each major version will - # be repackaged. The fixed sources for the closest version to this one - # can be found at mirror://gnu/binutils/binutils-2.21.1a.tar.bz2 - # or http://ftp.gnu.org/gnu/binutils/binutils-2.21.1a.tar.bz2 - # The sources missing from this tarball come from cgen. It is unclear - # WHICH sources should be included, but the cvs tree can be checked out - # by: - # cvs -z 9 -d :pserver:anoncvs@sourceware.org:/cvs/src login - # {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,12 +35,18 @@ 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" + stdenv.lib.optionalString (cross != null) " --target=${cross.config}" + stdenv.lib.optionalString gold " --enable-gold"; + enableParallelBuilding = true; + meta = { description = "GNU Binutils, tools for manipulating binaries (linker, assembler, etc.)"; diff --git a/pkgs/development/tools/misc/gnum4/default.nix b/pkgs/development/tools/misc/gnum4/default.nix index df417c3e55e..12cc50a37a0 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 00000000000..dd371584a79 --- /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 857aa1cabcf..00000000000 --- 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 43944ca9acd..857aa1cabcf 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/misc/strace/default.nix b/pkgs/development/tools/misc/strace/default.nix index 6bd2619e4d3..b3cf2fcbdda 100644 --- a/pkgs/development/tools/misc/strace/default.nix +++ b/pkgs/development/tools/misc/strace/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, xz, perl }: +{ stdenv, fetchurl, perl }: stdenv.mkDerivation rec { name = "strace-4.6"; @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "12n2faqq7whmszpjhv2lcb06r7900j53p0zl7vipi18inr0smycy"; }; - buildNativeInputs = [ xz perl ]; + buildNativeInputs = [ perl ]; meta = { homepage = http://strace.sourceforge.net/; diff --git a/pkgs/development/tools/parsing/bison/bison-2.5.nix b/pkgs/development/tools/parsing/bison/bison-2.5.nix index 24fc0d1bbb3..98c465a185c 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 bdac6cddf2d..f945e99c071 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 6adda85a087..e5b47f0d9ce 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 8a9efdedcf9..56461f2e858 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 15ea4f8bcc1..1b026ebb684 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 ffd40673b2f..0ad55339d08 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 f8048bbe0f4..b78424acfae 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 ad8237bc8e4..c45eb3f1d24 100644 --- a/pkgs/misc/uboot/nanonote.nix +++ b/pkgs/misc/uboot/nanonote.nix @@ -48,7 +48,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 5c38f1d053b..83d029d4154 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/hal/default.nix b/pkgs/os-specific/linux/hal/default.nix index 718d54f3106..f1757be94cf 100644 --- a/pkgs/os-specific/linux/hal/default.nix +++ b/pkgs/os-specific/linux/hal/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, pkgconfig, python, pciutils, expat , libusb, dbus, dbus_glib, glib, libuuid, perl , perlXMLParser, gettext, zlib, gperf, consolekit, policykit -, libsmbios, dmidecode, udev, utillinuxng, pmutils, usbutils +, libsmbios, dmidecode, udev, utillinux, pmutils, usbutils , eject, upstart }: @@ -51,8 +51,8 @@ stdenv.mkDerivation rec { substituteInPlace $i \ ${changeDmidecode} \ ${if udev != null then "--replace /sbin/udevadm ${udev}/sbin/udevadm" else ""} \ - --replace /bin/mount ${utillinuxng}/bin/mount \ - --replace /bin/umount ${utillinuxng}/bin/umount \ + --replace /bin/mount ${utillinux}/bin/mount \ + --replace /bin/umount ${utillinux}/bin/umount \ --replace /usr/bin/pm-is-supported ${pmutils}/bin/pm-is-supported \ --replace /usr/sbin/pm ${pmutils}/sbin/pm \ --replace /sbin/shutdown ${upstart}/sbin/shutdown diff --git a/pkgs/os-specific/linux/kernel-headers/2.6.18.5.nix b/pkgs/os-specific/linux/kernel-headers/2.6.18.5.nix deleted file mode 100644 index 5ecdd77fb87..00000000000 --- a/pkgs/os-specific/linux/kernel-headers/2.6.18.5.nix +++ /dev/null @@ -1,25 +0,0 @@ -{stdenv, fetchurl, unifdef}: - -assert stdenv.isLinux; - -stdenv.mkDerivation { - name = "linux-headers-2.6.18.5"; - builder = ./builder.sh; - src = fetchurl { - url = "mirror://kernel/linux/kernel/v2.6/linux-2.6.18.5.tar.bz2"; - sha256 = "24f0e0011cdae42e3dba56107bb6a60c57c46d1d688a9b0300fec53e80fd1e53"; - }; - - patches = [ ./unifdef-getline.patch ]; - - buildInputs = [ unifdef ]; - - platform = - 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 - abort "don't know what the kernel include directory is called for this platform"; - - extraIncludeDirs = - if stdenv.system == "powerpc-linux" then ["ppc"] else []; -} diff --git a/pkgs/os-specific/linux/kernel-headers/builder.sh b/pkgs/os-specific/linux/kernel-headers/builder.sh deleted file mode 100644 index 05392d5fe24..00000000000 --- a/pkgs/os-specific/linux/kernel-headers/builder.sh +++ /dev/null @@ -1,9 +0,0 @@ -source $stdenv/setup - -patchPhase="sed -i '/scsi/d' include/Kbuild" - -buildPhase="make mrproper headers_check"; - -installPhase="make INSTALL_HDR_PATH=$out headers_install" - -genericBuild 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 00000000000..c0f949186c6 --- /dev/null +++ b/pkgs/os-specific/linux/kernel-headers/default.nix @@ -0,0 +1,62 @@ +{ stdenv, fetchurl, perl, cross ? null }: + +assert cross == null -> stdenv.isLinux; + +let + version = "2.6.35.14"; + kernelHeadersBaseConfig = if cross == null then + stdenv.platform.kernelHeadersBaseConfig + else + cross.platform.kernelHeadersBaseConfig; +in + +stdenv.mkDerivation { + name = "linux-headers-${version}"; + + src = fetchurl { + url = "mirror://kernel/linux/kernel/v2.6/longterm/v2.6.35/linux-${version}.tar.bz2"; + sha256 = "1wzml7s9karfbk2yi36g1r8fyaq4d4f16yizc68zgchv0xzj39zl"; + }; + + 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 79e1111d40d..077d08f899d 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 90805b00c3c..95c7559604d 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/nfs-utils/default.nix b/pkgs/os-specific/linux/nfs-utils/default.nix index cf05d0fbaed..cdadcb05849 100644 --- a/pkgs/os-specific/linux/nfs-utils/default.nix +++ b/pkgs/os-specific/linux/nfs-utils/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv, tcpWrapper, utillinuxng, libcap }: +{ fetchurl, stdenv, tcpWrapper, utillinux, libcap }: stdenv.mkDerivation rec { name = "nfs-utils-1.2.3"; @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { }; # Needs `libblkid' and `libcomerr' from `e2fsprogs' or `util-linux-ng'. - buildInputs = [ tcpWrapper utillinuxng libcap ]; + buildInputs = [ tcpWrapper utillinux libcap ]; # FIXME: Add the dependencies needed for NFSv4 and TI-RPC. configureFlags = diff --git a/pkgs/os-specific/linux/pmount/default.nix b/pkgs/os-specific/linux/pmount/default.nix index 9366c2cf95f..4d555f59c37 100644 --- a/pkgs/os-specific/linux/pmount/default.nix +++ b/pkgs/os-specific/linux/pmount/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, cryptsetup, dbus, dbus_glib, intltool, ntfs3g, utillinuxng +{ stdenv, fetchurl, cryptsetup, dbus, dbus_glib, intltool, ntfs3g, utillinux , mediaDir ? "/media/" , lockDir ? "/var/lock/pmount" , whiteList ? "/etc/pmount.allow" @@ -15,14 +15,14 @@ stdenv.mkDerivation rec { sha256 = "db38fc290b710e8e9e9d442da2fb627d41e13b3ee80326c15cc2595ba00ea036"; }; - buildInputs = [ intltool utillinuxng ]; + buildInputs = [ intltool utillinux ]; configureFlags = "" + " --with-media-dir=${mediaDir}" + " --with-lock-dir=${lockDir}" + " --with-whitelist=${whiteList}" - + " --with-mount-prog=${utillinuxng}/bin/mount" - + " --with-umount-prog=${utillinuxng}/bin/umount" + + " --with-mount-prog=${utillinux}/bin/mount" + + " --with-umount-prog=${utillinux}/bin/umount" + " --with-mount-ntfs3g=${ntfs3g}/sbin/mount.ntfs-3g"; postConfigure = '' diff --git a/pkgs/os-specific/linux/util-linux-ng/default.nix b/pkgs/os-specific/linux/util-linux/default.nix index 4e62be4ff32..bd6f26dc58b 100644 --- a/pkgs/os-specific/linux/util-linux-ng/default.nix +++ b/pkgs/os-specific/linux/util-linux/default.nix @@ -1,11 +1,13 @@ -{ stdenv, fetchurl, ncurses ? null, perl ? null }: +{ stdenv, fetchurl, zlib, ncurses ? null, perl ? null }: stdenv.mkDerivation rec { - name = "util-linux-ng-2.18"; + name = "util-linux-2.20.1"; src = fetchurl { - url = "mirror://kernel/linux/utils/util-linux-ng/v2.18/${name}.tar.bz2"; - sha256 = "1k1in1ba9kvh0kplri9765wh0yk68qrkk1a55dqsm21qfryc1idq"; + # This used to be mirror://kernel/linux/utils/util-linux, but it + # disappeared in the kernel.org meltdown. + url = "mirror://gentoo/distfiles/${name}.tar.bz2"; + sha256 = "1q5vjcvw4f067c63vj2n3xggvk5prm11571x6vnqiav47vdbqvni"; }; # !!! It would be better to obtain the path to the mount helpers @@ -19,6 +21,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 02fb29c5dab..00000000000 --- 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 d22435744cc..00000000000 --- 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/bash-4.2-patches.nix b/pkgs/shells/bash/bash-4.2-patches.nix index 7f4957c500c..0a210186532 100644 --- a/pkgs/shells/bash/bash-4.2-patches.nix +++ b/pkgs/shells/bash/bash-4.2-patches.nix @@ -11,4 +11,14 @@ patch: [ (patch "008" "0dr4p83m2xpxhvd61yny0gdlasq6r9mpyiz220998y0alq8hs213") (patch "009" "086b9jkyjgf2zhwln72d7s5x759iskgg3r4hdrw6b5y1ni059vg7") (patch "010" "1p23m9kssdmpnjfp96bjmmshzf25cdzlyjygdw8j6sayqa159z5c") +(patch "011" "0chm4r6zv2kafq1g8xs7r0gixmw9h9r63rgd38rdgfvyk8ssx4d4") +(patch "012" "1f5pp64rv4mx3r34577pmb15pyxvhmdhmliccnwz20nssbqk6i1m") +(patch "013" "1sl5rxl3kz39xbnbaf0085jcx0l19l2yqjk0ja2wirmwrg3ca4il") +(patch "014" "0cwb5ilgx1gcbvnfk93pcpyhvq5wzasyvyllbxrk51c517k7i9mm") +(patch "015" "164afkc75534x1ad1h6qkl511k2cpirqs2kyx1jddwxx0j1nm1rd") +(patch "016" "19p20g7h7563m79vvy0adkpzlaxg192affzsm1rxm67wyyycr598") +(patch "017" "0zzfva20hxfrj5njd321pcjfydiv0kzcqryxfdh1sxlc95228mbk") +(patch "018" "0ka9pfnjmdak8lvmbryv2r1kkrlffnxbqjxq656la39pf9qlbag2") +(patch "019" "0mpb0whacppwcdx7pcnf0ah5vjvkw14ang6r2rh9fmkn401cvdx8") +(patch "020" "0vrwv9wpbr692kf427npmsxzvn007d9alk6jf99v7307s3q76is9") ] diff --git a/pkgs/shells/bash/4.2.nix b/pkgs/shells/bash/default.nix index 98fe43b0122..98fe43b0122 100644 --- a/pkgs/shells/bash/4.2.nix +++ b/pkgs/shells/bash/default.nix diff --git a/pkgs/stdenv/adapters.nix b/pkgs/stdenv/adapters.nix index a1e8aafd7bc..11ee83b9456 100644 --- a/pkgs/stdenv/adapters.nix +++ b/pkgs/stdenv/adapters.nix @@ -109,13 +109,14 @@ rec { } // {inherit fetchurl;}; - # Return a modified stdenv that enables building static libraries. - enableStaticLibraries = stdenv: stdenv // + # Return a modified stdenv that builds static libraries instead of + # shared libraries. + makeStaticLibraries = stdenv: stdenv // { mkDerivation = args: stdenv.mkDerivation (args // { dontDisableStatic = true; configureFlags = - (if args ? configureFlags then args.configureFlags else "") - + " --enable-static"; + (if args ? configureFlags then toString args.configureFlags else "") + + " --enable-static --disable-shared"; }); } // {inherit fetchurl;}; diff --git a/pkgs/stdenv/common-path.nix b/pkgs/stdenv/common-path.nix index 3b267a543c6..c2e5dedfd22 100644 --- a/pkgs/stdenv/common-path.nix +++ b/pkgs/stdenv/common-path.nix @@ -12,4 +12,5 @@ pkgs.bash pkgs.patch pkgs.replace + pkgs.xz ] diff --git a/pkgs/stdenv/generic/default.nix b/pkgs/stdenv/generic/default.nix index 436b912d8d6..b26bda91695 100644 --- a/pkgs/stdenv/generic/default.nix +++ b/pkgs/stdenv/generic/default.nix @@ -1,6 +1,6 @@ { system, name, preHook ? null, postHook ? null, initialPath, gcc, shell , param1 ? "", param2 ? "", param3 ? "", param4 ? "", param5 ? "" -, extraAttrs ? {}, overrides ? {} +, extraAttrs ? {}, overrides ? (pkgs: {}) , # The `fetchurl' to use for downloading curl and its dependencies # (see all-packages.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 060f3cd154b..00000000000 --- 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 ba06666ca89..62327396239 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 7e0116e342c..62ad647064e 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 ? builtins.currentSystem +, allPackages ? import ../../top-level/all-packages.nix +, platform ? null }: rec { @@ -75,7 +77,7 @@ rec { # This function builds the various standard environments used during # the bootstrap. stdenvBootFun = - {gcc, extraAttrs ? {}, overrides ? {}, extraPath ? [], fetchurl}: + {gcc, extraAttrs ? {}, overrides ? (pkgs: {}), extraPath ? [], fetchurl}: import ../generic { inherit system; @@ -95,7 +97,7 @@ rec { # Having the proper 'platform' in all the stdenvs allows getting proper # linuxHeaders for example. extraAttrs = extraAttrs // { inherit platform; }; - overrides = overrides // { + overrides = pkgs: (overrides pkgs) // { inherit fetchurl; }; }; @@ -154,23 +156,25 @@ rec { # 2) These are the packages that we can build with the first - # stdenv. We only need binutils, because recent glibcs - # require recent binutils, and those in bootstrap-tools may - # be too old. (in step 3). + # stdenv. We only need binutils, because recent Glibcs + # require recent Binutils, and those in bootstrap-tools may + # be too old. stdenvLinuxBoot1Pkgs = allPackages { inherit system platform; bootStdenv = stdenvLinuxBoot1; }; - firstBinutils = stdenvLinuxBoot1Pkgs.binutils; - + # 3) 2nd stdenv that we will use to build only the glibc. stdenvLinuxBoot2 = stdenvBootFun { gcc = wrapGCC { libc = bootstrapGlibc; - binutils = firstBinutils; + binutils = stdenvLinuxBoot1Pkgs.binutils; coreutils = bootstrapTools; }; + overrides = pkgs: { + inherit (stdenvLinuxBoot1Pkgs) perl; + }; inherit fetchurl; }; @@ -197,9 +201,18 @@ rec { coreutils = bootstrapTools; libc = stdenvLinuxGlibc; }; - overrides = { + overrides = pkgs: { glibc = stdenvLinuxGlibc; inherit (stdenvLinuxBoot1Pkgs) perl; + # Link GCC statically against GMP etc. This makes sense because + # these builds of the libraries are only used by GCC, so it + # reduces the size of the stdenv closure. + gmp = pkgs.gmp.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; }; + mpfr = pkgs.mpfr.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; }; + mpc = pkgs.mpc.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; }; + isl = pkgs.isl.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; }; + cloog = pkgs.cloog.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; }; + ppl = pkgs.ppl.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; }; }; inherit fetchurl; }; @@ -211,20 +224,7 @@ rec { bootStdenv = stdenvLinuxBoot3; }; - gccWithStaticLibs = stdenvLinuxBoot3Pkgs.gcc.gcc.override (rec { - ppl = stdenvLinuxBoot3Pkgs.ppl.override { - static = true; - gmpxx = stdenvLinuxBoot3Pkgs.gmpxx.override { - static = true; - }; - }; - cloogppl = stdenvLinuxBoot3Pkgs.cloogppl.override { - inherit ppl; - static = true; - }; - }); - - + # 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 @@ -234,11 +234,12 @@ rec { inherit (stdenvLinuxBoot3Pkgs) binutils; coreutils = bootstrapTools; libc = stdenvLinuxGlibc; - gcc = gccWithStaticLibs; + gcc = stdenvLinuxBoot3Pkgs.gcc.gcc; name = ""; }; - overrides = { + overrides = pkgs: { inherit (stdenvLinuxBoot1Pkgs) perl; + inherit (stdenvLinuxBoot3Pkgs) gettext gnum4 xz gmp; }; inherit fetchurl; }; @@ -273,7 +274,7 @@ rec { inherit (stdenvLinuxBoot3Pkgs) binutils; inherit (stdenvLinuxBoot4Pkgs) coreutils; libc = stdenvLinuxGlibc; - gcc = gccWithStaticLibs; + gcc = stdenvLinuxBoot3Pkgs.gcc.gcc; shell = stdenvLinuxBoot4Pkgs.bash + "/bin/bash"; name = ""; }; @@ -287,11 +288,11 @@ rec { inherit platform; }; - overrides = { + overrides = pkgs: { 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 058d8cb1891..2bc961dfaed 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 bdf342b2c64..1f3fa69d51b 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 55389b7d771..ea80355f6bb 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 a38c7fcdd1e..ccd0d755e8c 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 c72def3731a..00000000000 --- 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 803832f52d8..7aaa84d9ac9 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/bzip2/default.nix b/pkgs/tools/compression/bzip2/default.nix index ff13c1a2ed0..a431cd30a21 100644 --- a/pkgs/tools/compression/bzip2/default.nix +++ b/pkgs/tools/compression/bzip2/default.nix @@ -1,13 +1,15 @@ -{stdenv, fetchurl, linkStatic ? false}: +{ stdenv, fetchurl, linkStatic ? false }: + +let version = "1.0.6"; in stdenv.mkDerivation { - name = "bzip2-1.0.5"; + name = "bzip2-${version}"; builder = ./builder.sh; src = fetchurl { - url = http://www.bzip.org/1.0.5/bzip2-1.0.5.tar.gz; - sha256 = "08py2s9vw6dgw457lbklh1vsr3b8x8dlv7d8ygdfaxlx61l57gzp"; + url = "http://www.bzip.org/${version}/bzip2-${version}.tar.gz"; + sha256 = "1kfrc7f0ja9fdn6j1y6yir6li818npy6217hvr3wzmnmzhs8z152"; }; crossAttrs = { diff --git a/pkgs/tools/compression/xz/default.nix b/pkgs/tools/compression/xz/default.nix index b6aa8e96013..78a8ed95a4e 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 c4295e7b47a..b1a740ab5f9 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/misc/parted/2.3.nix b/pkgs/tools/misc/parted/2.3.nix index 622753e2303..52b3c4b4dcf 100644 --- a/pkgs/tools/misc/parted/2.3.nix +++ b/pkgs/tools/misc/parted/2.3.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, devicemapper, libuuid, gettext, readline -, utillinuxng, xz, enableStatic ? false, hurd ? null }: +, utillinux, xz, enableStatic ? false, hurd ? null }: stdenv.mkDerivation rec { name = "parted-2.3"; @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { preCheck = stdenv.lib.optionalString doCheck # The `t0400-loop-clobber-infloop.sh' test wants `mkswap'. - "export PATH=\"${utillinuxng}/sbin:$PATH\""; + "export PATH=\"${utillinux}/sbin:$PATH\""; meta = { description = "GNU Parted, a tool to create, destroy, resize, check, and copy partitions"; diff --git a/pkgs/tools/misc/parted/default.nix b/pkgs/tools/misc/parted/default.nix index 8ceab316be9..80abefc97ad 100644 --- a/pkgs/tools/misc/parted/default.nix +++ b/pkgs/tools/misc/parted/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, devicemapper, libuuid, gettext, readline -, utillinuxng, xz, check, enableStatic ? false, hurd ? null }: +, utillinux, xz, check, enableStatic ? false, hurd ? null }: stdenv.mkDerivation rec { name = "parted-3.0"; @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { preCheck = stdenv.lib.optionalString doCheck # The `t0400-loop-clobber-infloop.sh' test wants `mkswap'. - "export PATH=\"${utillinuxng}/sbin:$PATH\""; + "export PATH=\"${utillinux}/sbin:$PATH\""; meta = { description = "GNU Parted, a tool to create, destroy, resize, check, and copy partitions"; diff --git a/pkgs/tools/package-management/disnix/default.nix b/pkgs/tools/package-management/disnix/default.nix index 631db35a9b0..815ec864626 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 92914dd1cad..843304d9673 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/system/which/default.nix b/pkgs/tools/system/which/default.nix index 3721c0f0be1..fc40cd4722b 100644 --- a/pkgs/tools/system/which/default.nix +++ b/pkgs/tools/system/which/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, readline}: +{ stdenv, fetchurl }: stdenv.mkDerivation { name = "which-2.20"; @@ -8,8 +8,6 @@ stdenv.mkDerivation { sha256 = "1y2p50zadb36izzh2zw4dm5hvdiydqf3qa88l8kav20dcmfbc5yl"; }; - buildInputs = [readline]; - meta = { homepage = http://ftp.gnu.org/gnu/which/; }; diff --git a/pkgs/tools/text/diffutils/default.nix b/pkgs/tools/text/diffutils/default.nix index 4fde88d9262..eae48f2e3a4 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 c4f37f922c7..0c7e85cce4f 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 f06be1b7336..957b70f1e58 100644 --- a/pkgs/tools/text/gnugrep/default.nix +++ b/pkgs/tools/text/gnugrep/default.nix @@ -1,16 +1,16 @@ -{ stdenv, fetchurl, pcre, libiconv ? null}: +{ stdenv, fetchurl, pcre, libiconv ? null, xz }: -let version = "2.7"; in +let version = "2.10"; in stdenv.mkDerivation ({ name = "gnugrep-${version}"; src = fetchurl { - url = "mirror://gnu/grep/grep-${version}.tar.gz"; - sha256 = "1b8vksfd1ngharac3ygaqim3lrf0yqap992sg0vfm7572l88655d"; + url = "mirror://gnu/grep/grep-${version}.tar.xz"; + sha256 = "1cvsqyfzk1p38fcaav22dn76fkd02g7bjnqna6vrpk9vy9rnfybc"; }; - buildInputs = [ pcre ] + buildInputs = [ pcre xz ] ++ (stdenv.lib.optional (libiconv != null) libiconv); doCheck = if stdenv.isDarwin then false else true; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3164ea8984d..27931d56b04 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -108,7 +108,7 @@ let # overrided packages will not be built with the crossStdenv # adapter. overrides = overrider pkgsOrig // - (lib.optionalAttrs (pkgsOrig.stdenv ? overrides && crossSystem == null) pkgsOrig.stdenv.overrides); + (lib.optionalAttrs (pkgsOrig.stdenv ? overrides && crossSystem == null) (pkgsOrig.stdenv.overrides pkgsOrig)); # The un-overriden packages, passed to `overrider'. pkgsOrig = pkgsFun pkgs {}; @@ -1215,8 +1215,6 @@ let ppl = callPackage ../development/libraries/ppl { }; - ppl0_11 = callPackage ../development/libraries/ppl/0.11.nix { }; - ppp = callPackage ../tools/networking/ppp { }; pptp = callPackage ../tools/networking/pptp {}; @@ -1516,11 +1514,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 { }; @@ -1637,11 +1631,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; }); @@ -1708,7 +1702,7 @@ let gambit = callPackage ../development/compilers/gambit { }; - gcc = gcc45; + gcc = gcc46; gcc295 = wrapGCC (import ../development/compilers/gcc-2.95 { inherit fetchurl stdenv noSysDirs; @@ -1791,8 +1785,7 @@ let gcc46_realCross = lib.addMetaAttrs { platforms = []; } (makeOverridable (import ../development/compilers/gcc-4.6) { inherit fetchurl stdenv texinfo gmp mpfr mpc libelf zlib - cloog gettext which noSysDirs; - ppl = ppl0_11; + cloog ppl gettext which noSysDirs; binutilsCross = binutilsCross; libcCross = libcCross; profiledCompiler = false; @@ -1872,14 +1865,25 @@ let else null; })); - gcc46_real = lowPrio (wrapGCC (callPackage ../development/compilers/gcc-4.6 { + # 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; - ppl = ppl0_11; - cloogppl = 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; + libcCross = null; + binutilsCross = null; # bootstrapping a profiled compiler does not work in the sheevaplug: # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43944 @@ -1894,9 +1898,6 @@ let cross = null; libcCross = null; binutilsCross = null; - - ppl = ppl0_11; - cloogppl = null; })); gccApple = @@ -2047,7 +2048,6 @@ let gnatboot = gnat45; # We can't use the ppl stuff, because we would have # libstdc++ problems. - cloogppl = null; ppl = null; cloog = null; }); @@ -2337,7 +2337,7 @@ let nvidia_cg_toolkit = callPackage ../development/compilers/nvidia-cg-toolkit { }; - ocaml = ocaml_3_11_1; + ocaml = ocaml_3_12_1; ocaml_3_08_0 = callPackage ../development/compilers/ocaml/3.08.0.nix { }; @@ -2430,7 +2430,7 @@ let }; }; - ocamlPackages = recurseIntoAttrs ocamlPackages_3_11_1; + ocamlPackages = recurseIntoAttrs ocamlPackages_3_12_1; ocamlPackages_3_10_0 = mkOcamlPackages ocaml_3_10_0 pkgs.ocamlPackages_3_10_0; ocamlPackages_3_11_1 = mkOcamlPackages ocaml_3_11_1 pkgs.ocamlPackages_3_11_1; ocamlPackages_3_12_1 = mkOcamlPackages ocaml_3_12_1 pkgs.ocamlPackages_3_12_1; @@ -2556,7 +2556,8 @@ let # compatibility issues in 2.47 - at list 2.44.1 is known good # for sbcl bootstrap clisp_2_44_1 = callPackage ../development/interpreters/clisp/2.44.1.nix { - libsigsegv = libsigsegv_25; }; + libsigsegv = libsigsegv_25; + }; clojure = callPackage ../development/interpreters/clojure { }; @@ -2612,15 +2613,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; @@ -2845,7 +2848,7 @@ let cross = assert crossSystem != null; crossSystem; }); - bison = bison24; + bison = bison25; bison1875 = callPackage ../development/tools/parsing/bison/bison-1.875.nix { }; @@ -3014,8 +3017,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 { }; @@ -3221,8 +3222,7 @@ let cln = callPackage ../development/libraries/cln { }; - clppcre = builderDefsPackage (import ../development/libraries/cl-ppcre) { - }; + clppcre = builderDefsPackage (import ../development/libraries/cl-ppcre) { }; clucene_core = callPackage ../development/libraries/clucene-core { }; @@ -3282,14 +3282,6 @@ let useX11 = true; }; - dbus_all_1_5_6 = callPackage ../development/libraries/dbus/1.5.6.nix { - useX11 = true; - }; - - dbus_glib_0_94 = callPackage ../development/libraries/dbus-glib/0.94.nix { - dbus = pkgs.dbus_all_1_5_6.libs; - }; - dbus_glib = callPackage ../development/libraries/dbus-glib { }; dbus_java = callPackage ../development/libraries/java/dbus-java { }; @@ -3439,7 +3431,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; @@ -3463,15 +3457,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; @@ -3489,7 +3483,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 @@ -3504,9 +3519,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" @@ -3539,17 +3554,9 @@ let gmp = if stdenv.system == "i686-darwin" then # GMP 4.3.2 is broken on Darwin, so use 4.3.1. - makeOverridable (import ../development/libraries/gmp/4.3.1.nix) { - inherit stdenv fetchurl m4; - cxx = false; - } + callPackage ../development/libraries/gmp/4.3.1.nix { } else - # We temporarily leave gmp 4 here, waiting for a new ppl/cloog-ppl that - # would build well with gmp 5. - makeOverridable (import ../development/libraries/gmp/4.nix) { - inherit stdenv fetchurl m4; - cxx = false; - }; + callPackage ../development/libraries/gmp { }; gmpxx = appendToName "with-cxx" (gmp.override { cxx = true; }); @@ -4378,7 +4385,7 @@ let }; pcre = callPackage ../development/libraries/pcre { - unicodeSupport = getConfig ["pcre" "unicode"] false; + unicodeSupport = getConfig ["pcre" "unicode"] true; cplusplusSupport = !stdenv ? isDietLibC; }; @@ -5213,8 +5220,8 @@ let libuuid = if crossSystem != null && crossSystem.config == "i586-pc-gnu" - then (utillinuxng // { - hostDrv = lib.overrideDerivation utillinuxng.hostDrv (args: { + then (utillinux // { + hostDrv = lib.overrideDerivation utillinux.hostDrv (args: { # `libblkid' fails to build on GNU/Hurd. configureFlags = args.configureFlags + " --disable-libblkid --disable-mount --disable-libmount" @@ -5227,7 +5234,7 @@ let }); }) else if stdenv.isLinux - then utillinuxng + then utillinux else null; e3cfsprogs = callPackage ../os-specific/linux/e3cfsprogs { }; @@ -5318,7 +5325,7 @@ let libnl1 = callPackage ../os-specific/linux/libnl/v1.nix { }; - linuxHeaders = linuxHeaders_2_6_32; + linuxHeaders = callPackage ../os-specific/linux/kernel-headers { }; linuxHeaders26Cross = forceBuildDrv (import ../os-specific/linux/kernel-headers/2.6.32.nix { inherit stdenv fetchurl perl; @@ -5338,12 +5345,8 @@ let linuxHeadersCross = assert crossSystem != null; linuxHeadersCrossChooser crossSystem.platform.kernelMajor; - linuxHeaders_2_6_18 = callPackage ../os-specific/linux/kernel-headers/2.6.18.5.nix { }; - linuxHeaders_2_6_28 = callPackage ../os-specific/linux/kernel-headers/2.6.28.nix { }; - linuxHeaders_2_6_32 = callPackage ../os-specific/linux/kernel-headers/2.6.32.nix { }; - kernelPatches = callPackage ../os-specific/linux/kernel/patches.nix { }; linux_2_6_15 = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.15.nix) { @@ -5569,6 +5572,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 ]; }; @@ -5765,6 +5769,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 { }; @@ -6095,24 +6101,18 @@ let untie = callPackage ../os-specific/linux/untie { }; - upower = callPackage ../os-specific/linux/upower { - dbus_glib = pkgs.dbus_glib_0_94; - }; + upower = callPackage ../os-specific/linux/upower { }; upstart = callPackage ../os-specific/linux/upstart { }; usbutils = callPackage ../os-specific/linux/usbutils { }; - utillinux = utillinuxng; - - utillinuxCurses = utillinuxngCurses; - - utillinuxng = lowPrio (callPackage ../os-specific/linux/util-linux-ng { + utillinux = lowPrio (callPackage ../os-specific/linux/util-linux { ncurses = null; perl = null; }); - utillinuxngCurses = utillinuxng.override { + utillinuxCurses = utillinux.override { inherit ncurses perl; }; @@ -6435,7 +6435,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 00000000000..f56f6cf357d --- /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; + }; +} )) |