From 02341c20bcd78aab0e0beee2899e527874dc452e Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Wed, 16 Nov 2016 22:22:10 +0100 Subject: [PATCH 01/59] db: disable dbm support by default --- pkgs/development/libraries/db/clang-4.8.patch | 13 ------------- pkgs/development/libraries/db/clang-5.3.patch | 13 ------------- pkgs/development/libraries/db/clang-6.0.patch | 13 ------------- pkgs/development/libraries/db/generic.nix | 14 ++++++++------ 4 files changed, 8 insertions(+), 45 deletions(-) diff --git a/pkgs/development/libraries/db/clang-4.8.patch b/pkgs/development/libraries/db/clang-4.8.patch index bbb778914977..aa46b8500b5a 100644 --- a/pkgs/development/libraries/db/clang-4.8.patch +++ b/pkgs/development/libraries/db/clang-4.8.patch @@ -38,19 +38,6 @@ index 0034dcc..160c8ea 100644 #else #define atomic_inc(env, p) __atomic_inc(env, p) #define atomic_dec(env, p) __atomic_dec(env, p) -diff --git a/dbinc/db.in b/dbinc/db.in -index 9fc6712..7428e0a 100644 ---- a/dbinc/db.in -+++ b/dbinc/db.in -@@ -2413,7 +2413,7 @@ typedef struct { - #define fetch(a) __db_dbm_fetch@DB_VERSION_UNIQUE_NAME@(a) - #define firstkey __db_dbm_firstkey@DB_VERSION_UNIQUE_NAME@ - #define nextkey(a) __db_dbm_nextkey@DB_VERSION_UNIQUE_NAME@(a) --#define store(a, b) __db_dbm_store@DB_VERSION_UNIQUE_NAME@(a, b) -+#define store_db(a, b) __db_dbm_store@DB_VERSION_UNIQUE_NAME@(a, b) - - /******************************************************* - * Hsearch historic interface. diff --git a/mp/mp_fget.c b/mp/mp_fget.c index 5fdee5a..0b75f57 100644 --- a/mp/mp_fget.c diff --git a/pkgs/development/libraries/db/clang-5.3.patch b/pkgs/development/libraries/db/clang-5.3.patch index 1cfb13ca8e68..caf19ffeb92b 100644 --- a/pkgs/development/libraries/db/clang-5.3.patch +++ b/pkgs/development/libraries/db/clang-5.3.patch @@ -38,19 +38,6 @@ index 6a858f7..9f338dc 100644 #else #define atomic_inc(env, p) __atomic_inc(env, p) #define atomic_dec(env, p) __atomic_dec(env, p) -diff --git a/src/dbinc/db.in b/src/dbinc/db.in -index 92ac822..f80428e 100644 ---- a/src/dbinc/db.in -+++ b/src/dbinc/db.in -@@ -2782,7 +2782,7 @@ typedef struct { - #define fetch(a) __db_dbm_fetch@DB_VERSION_UNIQUE_NAME@(a) - #define firstkey __db_dbm_firstkey@DB_VERSION_UNIQUE_NAME@ - #define nextkey(a) __db_dbm_nextkey@DB_VERSION_UNIQUE_NAME@(a) --#define store(a, b) __db_dbm_store@DB_VERSION_UNIQUE_NAME@(a, b) -+#define store_db(a, b) __db_dbm_store@DB_VERSION_UNIQUE_NAME@(a, b) - - /******************************************************* - * Hsearch historic interface. diff --git a/src/mp/mp_fget.c b/src/mp/mp_fget.c index 16de695..d0dcc29 100644 --- a/src/mp/mp_fget.c diff --git a/pkgs/development/libraries/db/clang-6.0.patch b/pkgs/development/libraries/db/clang-6.0.patch index 5c1e8f506c4e..a411e60dc39b 100644 --- a/pkgs/development/libraries/db/clang-6.0.patch +++ b/pkgs/development/libraries/db/clang-6.0.patch @@ -20,19 +20,6 @@ index e4420aa..4799b5f 100644 #else #define atomic_inc(env, p) __atomic_inc_int(env, p) #define atomic_dec(env, p) __atomic_dec_int(env, p) -diff --git a/src/dbinc/db.in b/src/dbinc/db.in -index 3c2ad9b..3e46f02 100644 ---- a/src/dbinc/db.in -+++ b/src/dbinc/db.in -@@ -2999,7 +2999,7 @@ typedef struct { - #define fetch(a) __db_dbm_fetch@DB_VERSION_UNIQUE_NAME@(a) - #define firstkey __db_dbm_firstkey@DB_VERSION_UNIQUE_NAME@ - #define nextkey(a) __db_dbm_nextkey@DB_VERSION_UNIQUE_NAME@(a) --#define store(a, b) __db_dbm_store@DB_VERSION_UNIQUE_NAME@(a, b) -+#define store_db(a, b) __db_dbm_store@DB_VERSION_UNIQUE_NAME@(a, b) - - /******************************************************* - * Hsearch historic interface. diff --git a/src/mp/mp_fget.c b/src/mp/mp_fget.c index 59fe9fe..fa4ced7 100644 --- a/src/mp/mp_fget.c diff --git a/pkgs/development/libraries/db/generic.nix b/pkgs/development/libraries/db/generic.nix index a6f9c676bba0..c32045559019 100644 --- a/pkgs/development/libraries/db/generic.nix +++ b/pkgs/development/libraries/db/generic.nix @@ -1,6 +1,7 @@ { stdenv, fetchurl , cxxSupport ? true , compat185 ? true +, dbmSupport ? false # Options from inherited versions , version, sha256 @@ -19,12 +20,13 @@ stdenv.mkDerivation (rec { patches = extraPatches; - configureFlags = [ - (if cxxSupport then "--enable-cxx" else "--disable-cxx") - (if compat185 then "--enable-compat185" else "--disable-compat185") - "--enable-dbm" - (stdenv.lib.optionalString stdenv.isFreeBSD "--with-pic") - ]; + configureFlags = + [ + (if cxxSupport then "--enable-cxx" else "--disable-cxx") + (if compat185 then "--enable-compat185" else "--disable-compat185") + ] + ++ stdenv.lib.optional dbmSupport "--enable-dbm" + ++ stdenv.lib.optional stdenv.isFreeBSD "--with-pic"; preConfigure = '' cd build_unix From 7af2d3d6e2bf54e606c93887668fcc23d9355559 Mon Sep 17 00:00:00 2001 From: Tim Cuthbertson Date: Tue, 24 Jan 2017 21:08:42 +1100 Subject: [PATCH 02/59] buildPythonPackage: send pip output to stderr --- .../interpreters/python/build-python-package-setuptools.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/python/build-python-package-setuptools.nix b/pkgs/development/interpreters/python/build-python-package-setuptools.nix index f077533ecfe4..c6e21ff4fede 100644 --- a/pkgs/development/interpreters/python/build-python-package-setuptools.nix +++ b/pkgs/development/interpreters/python/build-python-package-setuptools.nix @@ -49,7 +49,7 @@ in attrs // { export PATH="$tmp_path/bin:$PATH" export PYTHONPATH="$tmp_path/${python.sitePackages}:$PYTHONPATH" mkdir -p $tmp_path/${python.sitePackages} - ${bootstrapped-pip}/bin/pip install -e . --prefix $tmp_path + ${bootstrapped-pip}/bin/pip install -e . --prefix $tmp_path >&2 fi ${postShellHook} ''; From 17a344a5daebf7796e5b25f45658359b6c0dfda2 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 14 Oct 2016 17:52:14 +0200 Subject: [PATCH 03/59] binutils: Add lib output Some packages depend on libbfd. This prevents them from having all of binutils in their closure (which is 29 MiB). --- .../tools/misc/binutils/default.nix | 8 +++++++- .../tools/misc/binutils/no-plugins.patch | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/tools/misc/binutils/no-plugins.patch diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index 4c32255e8755..0214cafb1a7b 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -32,9 +32,15 @@ stdenv.mkDerivation rec { # This is needed, for instance, so that running "ldd" on a binary that is # PaX-marked to disable mprotect doesn't fail with permission denied. ./pt-pax-flags.patch + + # Bfd looks in BINDIR/../lib for some plugins that don't + # exist. This is pointless (since users can't install plugins + # there) and causes a cycle between the lib and bin outputs, so + # get rid of it. + ./no-plugins.patch ]; - outputs = [ "out" "info" ] ++ (optional (cross == null) "dev"); + outputs = [ "out" "lib" "info" ] ++ (optional (cross == null) "dev"); nativeBuildInputs = [ bison ]; buildInputs = [ zlib ]; diff --git a/pkgs/development/tools/misc/binutils/no-plugins.patch b/pkgs/development/tools/misc/binutils/no-plugins.patch new file mode 100644 index 000000000000..9624b7976b70 --- /dev/null +++ b/pkgs/development/tools/misc/binutils/no-plugins.patch @@ -0,0 +1,19 @@ +diff -ru binutils-2.27-orig/bfd/plugin.c binutils-2.27/bfd/plugin.c +--- binutils-2.27-orig/bfd/plugin.c 2016-10-14 17:46:30.791315555 +0200 ++++ binutils-2.27/bfd/plugin.c 2016-10-14 17:46:38.583298765 +0200 +@@ -333,6 +333,7 @@ + if (plugin_program_name == NULL) + return found; + ++#if 0 + plugin_dir = concat (BINDIR, "/../lib/bfd-plugins", NULL); + p = make_relative_prefix (plugin_program_name, + BINDIR, +@@ -364,6 +365,7 @@ + free (p); + if (d) + closedir (d); ++#endif + + return found; + } From d01d2db3d89beb7b0599c3251fd5127cd4bd58e2 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 19 Oct 2016 16:19:11 +0200 Subject: [PATCH 04/59] audiofile: Fix build on GCC 6 http://hydra.nixos.org/build/42228674 --- .../libraries/audiofile/default.nix | 2 +- .../libraries/audiofile/gcc-6.patch | 30 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/libraries/audiofile/gcc-6.patch diff --git a/pkgs/development/libraries/audiofile/default.nix b/pkgs/development/libraries/audiofile/default.nix index c76115000cb0..78867881dc32 100644 --- a/pkgs/development/libraries/audiofile/default.nix +++ b/pkgs/development/libraries/audiofile/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { sha256 = "0rb927zknk9kmhprd8rdr4azql4gn2dp75a36iazx2xhkbqhvind"; }; - patches = [ ./CVE-2015-7747.patch ]; + patches = [ ./CVE-2015-7747.patch ./gcc-6.patch ]; meta = with stdenv.lib; { description = "Library for reading and writing audio files in various formats"; diff --git a/pkgs/development/libraries/audiofile/gcc-6.patch b/pkgs/development/libraries/audiofile/gcc-6.patch new file mode 100644 index 000000000000..1a7edd5af9a1 --- /dev/null +++ b/pkgs/development/libraries/audiofile/gcc-6.patch @@ -0,0 +1,30 @@ +http://patchwork.ozlabs.org/patch/630200/ + +From 28cfdbbcb96a69087c3d21faf69b5eae7bcf6d69 Mon Sep 17 00:00:00 2001 +From: Hodorgasm +Date: Wed, 11 May 2016 21:42:07 -0400 +Subject: [PATCH] Cast to unsigned while left bit-shifting + +GCC-6 now treats the left bitwise-shift of a negative integer as nonconformant so explicitly cast to an unsigned int while bit-shifting. + +Downloaded from upstream PR: +https://github.com/mpruett/audiofile/pull/28 + +Signed-off-by: Bernd Kuhls +--- + libaudiofile/modules/SimpleModule.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libaudiofile/modules/SimpleModule.h b/libaudiofile/modules/SimpleModule.h +index 03c6c69..4014fb2 100644 +--- a/libaudiofile/modules/SimpleModule.h ++++ b/libaudiofile/modules/SimpleModule.h +@@ -123,7 +123,7 @@ struct signConverter + typedef typename IntTypes::UnsignedType UnsignedType; + + static const int kScaleBits = (Format + 1) * CHAR_BIT - 1; +- static const int kMinSignedValue = -1 << kScaleBits; ++ static const int kMinSignedValue = static_cast(static_cast(-1) << kScaleBits);; + + struct signedToUnsigned : public std::unary_function + { From 0cb253853db3e93b1d6e29f37022031007f5dbe5 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 2 Nov 2016 15:31:43 +0100 Subject: [PATCH 05/59] memtest86+: Build with gcc 5 http://hydra.nixos.org/build/43011285 --- pkgs/top-level/all-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0cf4923a3fec..bbe1243749db 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2776,7 +2776,9 @@ in memtest86 = callPackage ../tools/misc/memtest86 { }; - memtest86plus = callPackage ../tools/misc/memtest86+ { }; + memtest86plus = callPackage ../tools/misc/memtest86+ { + stdenv = overrideCC stdenv gcc5; + }; meo = callPackage ../tools/security/meo { boost = boost155; From a2900f3f0f6913653da773e98a880433bc246231 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 3 Nov 2016 09:24:03 +0100 Subject: [PATCH 06/59] libfaketime: Fix build on gcc 6 http://hydra.nixos.org/build/43031670 --- pkgs/development/libraries/libfaketime/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/libraries/libfaketime/default.nix b/pkgs/development/libraries/libfaketime/default.nix index 16ee2151faa5..c620254aacd6 100644 --- a/pkgs/development/libraries/libfaketime/default.nix +++ b/pkgs/development/libraries/libfaketime/default.nix @@ -16,6 +16,9 @@ stdenv.mkDerivation rec { makeFlagsArray+=(PREFIX="$out" LIBDIRNAME=/lib) ''; + # Work around "libfaketime.c:513:7: error: nonnull argument 'buf' compared to NULL [-Werror=nonnull-compare]". + NIX_CFLAGS_COMPILE = "-Wno-nonnull-compare"; + meta = with stdenv.lib; { description = "Report faked system time to programs without having to change the system-wide time"; homepage = http://www.code-wizards.com/projects/libfaketime/; From 48dce4ad7be99ccb5e9710aaa19855e85fdd69a3 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 9 Nov 2016 15:28:57 +0100 Subject: [PATCH 07/59] libraw: 0.17.1 -> 0.17.2 Also apply a fix from Debian for building with GCC 6. --- pkgs/development/libraries/libraw/default.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libraw/default.nix b/pkgs/development/libraries/libraw/default.nix index fedc5287b49b..10979abdeabc 100644 --- a/pkgs/development/libraries/libraw/default.nix +++ b/pkgs/development/libraries/libraw/default.nix @@ -2,13 +2,20 @@ stdenv.mkDerivation rec { name = "libraw-${version}"; - version = "0.17.1"; + version = "0.17.2"; src = fetchurl { url = "http://www.libraw.org/data/LibRaw-${version}.tar.gz"; - sha256 = "18fygk896gxbx47nh2rn5jp4skisgkl6pdfjqb7h0zn39hd6b6g5"; + sha256 = "0p6imxpsfn82i0i9w27fnzq6q6gwzvb9f7sygqqakv36fqnc9c4j"; }; + patches = + [ (fetchurl { + url = https://anonscm.debian.org/cgit/pkg-phototools/libraw.git/plain/debian/patches/0001-Fix_gcc6_narrowing_conversion.patch?id=d890937aaca6359df45a66b35e547c94ca564823; + sha256 = "1lcg5l0wmwiyzhhm67c1c7hy8py6ihxfmicnhrwpi3i6f16vq29w"; + }) + ]; + outputs = [ "out" "lib" "dev" "doc" ]; buildInputs = [ jasper ]; From 3756edb1096112ead131754b0aa4745f60773d28 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Tue, 17 Jan 2017 04:58:14 +0100 Subject: [PATCH 08/59] ragel: fix build with gcc 6 --- pkgs/development/tools/parsing/ragel/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/tools/parsing/ragel/default.nix b/pkgs/development/tools/parsing/ragel/default.nix index 05546da67f01..0fe243e8aaff 100644 --- a/pkgs/development/tools/parsing/ragel/default.nix +++ b/pkgs/development/tools/parsing/ragel/default.nix @@ -20,6 +20,8 @@ let configureFlags = [ "--with-colm=${colm}" ]; + NIX_CFLAGS_COMPILE = "-std=gnu++98"; + doCheck = true; meta = with stdenv.lib; { From b13e77fc3371cb3280ab0bcdb4825922d260c92b Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Tue, 17 Jan 2017 05:07:11 +0100 Subject: [PATCH 09/59] geos: 3.5.0 -> 3.6.1 --- pkgs/development/libraries/geos/default.nix | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/pkgs/development/libraries/geos/default.nix b/pkgs/development/libraries/geos/default.nix index d63a1bb75726..de7111f6be36 100644 --- a/pkgs/development/libraries/geos/default.nix +++ b/pkgs/development/libraries/geos/default.nix @@ -1,24 +1,17 @@ -{ composableDerivation, fetchurl, python }: +{ stdenv, fetchurl, fetchpatch, python }: -let inherit (composableDerivation) edf; in - -composableDerivation.composableDerivation {} rec { - - flags = - # python and ruby untested - edf { name = "python"; enable = { buildInputs = [ python ]; }; }; - # (if args.use_svn then ["libtool" "autoconf" "automake" "swig"] else []) - # // edf { name = "ruby"; enable = { buildInputs = [ ruby ]; };} - - name = "geos-3.5.0"; +stdenv.mkDerivation rec { + name = "geos-3.6.1"; src = fetchurl { url = "http://download.osgeo.org/geos/${name}.tar.bz2"; - sha256 = "49982b23bcfa64a53333dab136b82e25354edeb806e5a2e2f5b8aa98b1d0ae02"; + sha256 = "1icz31kd5sml2kdxhjznvmv33zfr6nig9l0i6bdcz9q9g8x4wbja"; }; enableParallelBuilding = true; + buildInputs = [ python ]; + meta = { description = "C++ port of the Java Topology Suite (JTS)"; homepage = http://geos.refractions.net/; From b80291ab98865e61df1442e6e25f5723139689ae Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Tue, 17 Jan 2017 22:51:17 +0100 Subject: [PATCH 10/59] protobuf3_0: 3.0.0 -> 3.0.2 --- pkgs/development/libraries/protobuf/3.0.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/protobuf/3.0.nix b/pkgs/development/libraries/protobuf/3.0.nix index f80acf462b85..4e77e7f1fbee 100644 --- a/pkgs/development/libraries/protobuf/3.0.nix +++ b/pkgs/development/libraries/protobuf/3.0.nix @@ -1,6 +1,6 @@ { callPackage, ... }: callPackage ./generic-v3.nix { - version = "3.0.0"; - sha256 = "05qkcl96lkdama848m7q3nzzzdckjc158iiyvgmln0zi232xx7g7"; + version = "3.0.2"; + sha256 = "16wmr1fgdqpf84fkq90cxvccfsxx7h0q0wzqkbg8vdjmka412g09"; } From a3a0e8fe6468b6052add9bad5772dacd1ba400e0 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Wed, 18 Jan 2017 00:11:59 +0100 Subject: [PATCH 11/59] protobuf3_0: fix build with gcc 6 --- pkgs/development/libraries/protobuf/generic-v3.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/protobuf/generic-v3.nix b/pkgs/development/libraries/protobuf/generic-v3.nix index f74aea9dbd57..315608bf2b4f 100644 --- a/pkgs/development/libraries/protobuf/generic-v3.nix +++ b/pkgs/development/libraries/protobuf/generic-v3.nix @@ -34,6 +34,8 @@ stdenv.mkDerivation rec { doCheck = true; + NIX_CFLAGS_COMPILE = "-Wno-error=misleading-indentation"; + meta = { description = "Google's data interchange format"; longDescription = From 9aae2991f2404c2c4781ea9e25c1a64471ba212f Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Wed, 18 Jan 2017 00:22:08 +0100 Subject: [PATCH 12/59] qt4: add patch to fix build with gcc6, set c++ std --- .../development/libraries/qt-4.x/4.8/default.nix | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/qt-4.x/4.8/default.nix b/pkgs/development/libraries/qt-4.x/4.8/default.nix index 91a8899f4d13..cfb4ac614599 100644 --- a/pkgs/development/libraries/qt-4.x/4.8/default.nix +++ b/pkgs/development/libraries/qt-4.x/4.8/default.nix @@ -80,12 +80,19 @@ stdenv.mkDerivation rec { gtk = gtk2.out; gdk_pixbuf = gdk_pixbuf.out; }) - ++ [(fetchpatch { + ++ [ + (fetchpatch { name = "fix-medium-font.patch"; url = "http://anonscm.debian.org/cgit/pkg-kde/qt/qt4-x11.git/plain/debian/patches/" + "kubuntu_39_fix_medium_font.diff?id=21b342d71c19e6d68b649947f913410fe6129ea4"; sha256 = "0bli44chn03c2y70w1n8l7ss4ya0b40jqqav8yxrykayi01yf95j"; - })]; + }) + (fetchpatch { + name = "qt4-gcc6.patch"; + url = "https://git.archlinux.org/svntogit/packages.git/plain/trunk/qt4-gcc6.patch?h=packages/qt4&id=ca773a144f5abb244ac4f2749eeee9333cac001f"; + sha256 = "07lrva7bjh6i40p7b3ml26a2jlznri8bh7y7iyx5zmvb1gfxmj34"; + }) + ]; preConfigure = '' export LD_LIBRARY_PATH="`pwd`/lib:$LD_LIBRARY_PATH" @@ -145,8 +152,9 @@ stdenv.mkDerivation rec { enableParallelBuilding = false; - NIX_CFLAGS_COMPILE = optionalString (stdenv.isFreeBSD || stdenv.isDarwin) - "-I${glib.dev}/include/glib-2.0 -I${glib.out}/lib/glib-2.0/include" + NIX_CFLAGS_COMPILE = "-std=gnu++98" + + optionalString (stdenv.isFreeBSD || stdenv.isDarwin) + "-I${glib.dev}/include/glib-2.0 -I${glib.out}/lib/glib-2.0/include" + optionalString stdenv.isDarwin " -I${libcxx}/include/c++/v1"; NIX_LDFLAGS = optionalString (stdenv.isFreeBSD || stdenv.isDarwin) From 3098c3fd00e18683a7c62d29d330abecc30bc9f2 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Wed, 18 Jan 2017 01:12:49 +0100 Subject: [PATCH 13/59] smpeg: build with gcc 6 --- pkgs/development/libraries/smpeg/default.nix | 7 ++-- pkgs/development/libraries/smpeg/format.patch | 11 +++++++ pkgs/development/libraries/smpeg/gcc6.patch | 33 +++++++++++++++++++ 3 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 pkgs/development/libraries/smpeg/format.patch create mode 100644 pkgs/development/libraries/smpeg/gcc6.patch diff --git a/pkgs/development/libraries/smpeg/default.nix b/pkgs/development/libraries/smpeg/default.nix index 6803dfd76de9..f248d65e2ed6 100644 --- a/pkgs/development/libraries/smpeg/default.nix +++ b/pkgs/development/libraries/smpeg/default.nix @@ -10,9 +10,12 @@ stdenv.mkDerivation rec { sha256 = "0ynwn7ih5l2b1kpzpibns9bb9wzfjak7mgrb1ji0dkn2q5pv6lr0"; }; - enableParallelBuilding = true; + patches = [ + ./format.patch + ./gcc6.patch + ]; - hardeningDisable = [ "format" ]; + enableParallelBuilding = true; buildInputs = [ SDL gtk2 mesa ]; diff --git a/pkgs/development/libraries/smpeg/format.patch b/pkgs/development/libraries/smpeg/format.patch new file mode 100644 index 000000000000..8486dee5cda4 --- /dev/null +++ b/pkgs/development/libraries/smpeg/format.patch @@ -0,0 +1,11 @@ +--- a/plaympeg.c 2014-09-04 08:55:10.646132150 +0200 ++++ b/plaympeg.c 2014-09-04 08:56:57.465210820 +0200 +@@ -262,7 +262,7 @@ + answer[i] = c; + } + answer[i] = 0; +- fprintf(stderr, answer + 4); ++ fprintf(stderr, "%s", answer + 4); + } + while(answer[3] == '-'); + diff --git a/pkgs/development/libraries/smpeg/gcc6.patch b/pkgs/development/libraries/smpeg/gcc6.patch new file mode 100644 index 000000000000..165feb4428c2 --- /dev/null +++ b/pkgs/development/libraries/smpeg/gcc6.patch @@ -0,0 +1,33 @@ +--- a/audio/hufftable.cpp ++++ b/audio/hufftable.cpp +@@ -9,6 +9,7 @@ + #include "config.h" + #endif + ++#include + #include "MPEGaudio.h" + + static const unsigned int +@@ -550,11 +551,11 @@ htd33[ 31][2]={{ 16, 1},{ 8, 1},{ 4, + + const HUFFMANCODETABLE MPEGaudio::ht[HTN]= + { +- { 0, 0-1, 0-1, 0, 0, htd33}, ++ { 0, UINT_MAX, UINT_MAX, 0, 0, htd33}, + { 1, 2-1, 2-1, 0, 7,htd01}, + { 2, 3-1, 3-1, 0, 17,htd02}, + { 3, 3-1, 3-1, 0, 17,htd03}, +- { 4, 0-1, 0-1, 0, 0, htd33}, ++ { 4, UINT_MAX, UINT_MAX, 0, 0, htd33}, + { 5, 4-1, 4-1, 0, 31,htd05}, + { 6, 4-1, 4-1, 0, 31,htd06}, + { 7, 6-1, 6-1, 0, 71,htd07}, +@@ -564,7 +565,7 @@ const HUFFMANCODETABLE MPEGaudio::ht[HTN + {11, 8-1, 8-1, 0,127,htd11}, + {12, 8-1, 8-1, 0,127,htd12}, + {13,16-1,16-1, 0,511,htd13}, +- {14, 0-1, 0-1, 0, 0, htd33}, ++ {14, UINT_MAX, UINT_MAX, 0, 0, htd33}, + {15,16-1,16-1, 0,511,htd15}, + {16,16-1,16-1, 1,511,htd16}, + {17,16-1,16-1, 2,511,htd16}, From 0f3cee15b5f963c4a3c6ef088f3334374eddb26a Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Wed, 18 Jan 2017 14:48:13 +0100 Subject: [PATCH 14/59] wxGTK: build with gcc 6 --- pkgs/development/libraries/wxGTK-2.8/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/wxGTK-2.8/default.nix b/pkgs/development/libraries/wxGTK-2.8/default.nix index c4530da54531..6b9aa4587350 100644 --- a/pkgs/development/libraries/wxGTK-2.8/default.nix +++ b/pkgs/development/libraries/wxGTK-2.8/default.nix @@ -41,7 +41,7 @@ stdenv.mkDerivation rec { + optionalString withMesa "${mesa.out}/lib "; # Work around a bug in configure. - NIX_CFLAGS_COMPILE = [ "-DHAVE_X11_XLIB_H=1" "-lX11" "-lcairo" ]; + NIX_CFLAGS_COMPILE = [ "-DHAVE_X11_XLIB_H=1" "-lX11" "-lcairo" "-Wno-narrowing" ]; preConfigure = " substituteInPlace configure --replace 'SEARCH_INCLUDE=' 'DUMMY_SEARCH_INCLUDE=' From 90fc5042adde849261a38f37efc3878238f508f2 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Wed, 18 Jan 2017 20:42:53 +0100 Subject: [PATCH 15/59] wxGTK30: fix build with gcc 6 --- pkgs/development/libraries/wxGTK-3.0/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/wxGTK-3.0/default.nix b/pkgs/development/libraries/wxGTK-3.0/default.nix index 5c45b29ec5cd..ed9372725146 100644 --- a/pkgs/development/libraries/wxGTK-3.0/default.nix +++ b/pkgs/development/libraries/wxGTK-3.0/default.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchurl, pkgconfig, gtk2, libXinerama, libSM, libXxf86vm, xf86vidmodeproto -, gstreamer, gst_plugins_base, GConf, setfile +{ stdenv, fetchurl, fetchpatch, pkgconfig, gtk2, libXinerama, libSM, libXxf86vm +, xf86vidmodeproto , gstreamer, gst_plugins_base, GConf, setfile , withMesa ? true, mesa ? null, compat24 ? false, compat26 ? true, unicode ? true , withWebKit ? false, webkitgtk2 ? null , AGL ? null, Carbon ? null, Cocoa ? null, Kernel ? null, QTKit ? null @@ -33,6 +33,11 @@ stdenv.mkDerivation { propagatedBuildInputs = optional stdenv.isDarwin AGL; + patches = [ (fetchpatch { + url = "https://raw.githubusercontent.com/jessehager/MINGW-packages/af6ece963d8157dd3fbc710bcc190647c4924c63/mingw-w64-wxwidgets/wxWidgets-3.0.2-gcc6-abs.patch"; + sha256 = "0100pg0z7i6cjyysf2k3330pmqmdaxgc9hz6kxnfvc31dynjcq3h"; + }) ]; + configureFlags = [ "--enable-gtk2" "--disable-precomp-headers" "--enable-mediactrl" (if compat24 then "--enable-compat24" else "--disable-compat24") From 45f1a914e8e4b5f32382b3f062c33a9e047525b6 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 19 Jan 2017 02:03:42 +0100 Subject: [PATCH 16/59] audacity: fix build with gcc 6 --- pkgs/applications/audio/audacity/default.nix | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/audio/audacity/default.nix b/pkgs/applications/audio/audacity/default.nix index f91fc03ec019..8b81fd7c35a0 100644 --- a/pkgs/applications/audio/audacity/default.nix +++ b/pkgs/applications/audio/audacity/default.nix @@ -13,12 +13,19 @@ stdenv.mkDerivation rec { url = "https://github.com/audacity/audacity/archive/Audacity-${version}.tar.gz"; sha256 = "1ggr6g0mk36rqj7ahsg8b0b1r9kphwajzvxgn43md263rm87n04h"; }; - patches = [(fetchpatch { - name = "new-ffmpeg.patch"; - url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk" - + "/audacity-ffmpeg.patch?h=packages/audacity&id=0c1e35798d4d70692"; - sha256 = "19fr674mw844zmkp1476yigkcnmb6zyn78av64ccdwi3p68i00rf"; - })]; + patches = [ + (fetchpatch { + name = "new-ffmpeg.patch"; + url = "https://projects.archlinux.org/svntogit/packages.git/plain/trunk" + + "/audacity-ffmpeg.patch?h=packages/audacity&id=0c1e35798d4d70692"; + sha256 = "19fr674mw844zmkp1476yigkcnmb6zyn78av64ccdwi3p68i00rf"; + }) + (fetchpatch { + name = "gcc6.patch"; + url = "https://github.com/audacity/audacity/commit/60f2322055756e8cacfe96530a12c63e9694482c.patch"; + sha256 = "07jlxr8y7ap3nsblx3zh8v9rcx7ajbcfnvwzhwykmbwbsyirgqf2"; + }) + ]; preConfigure = /* we prefer system-wide libs */ '' mv lib-src lib-src-rm From 0437bc96630db63a667646e4b2faaa272b836aea Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 19 Jan 2017 02:09:16 +0100 Subject: [PATCH 17/59] podofo: 0.9.3 -> 0.9.4, pin to gcc5 --- pkgs/development/libraries/podofo/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/podofo/default.nix b/pkgs/development/libraries/podofo/default.nix index 0b67ce16331c..b68bc20ecf35 100644 --- a/pkgs/development/libraries/podofo/default.nix +++ b/pkgs/development/libraries/podofo/default.nix @@ -1,16 +1,16 @@ { stdenv, fetchurl, cmake, zlib, freetype, libjpeg, libtiff, fontconfig -, openssl, libpng, lua5 }: +, gcc5, openssl, libpng, lua5 }: stdenv.mkDerivation rec { - name = "podofo-0.9.3"; + name = "podofo-0.9.4"; src = fetchurl { url = "mirror://sourceforge/podofo/${name}.tar.gz"; - sha256 = "1n12lbq9x15vqn7dc0hsccp56l5jdff1xrhvlfqlbklxx0qiw9pc"; + sha256 = "0ngqgwl38afmzcj2zpf18a2g63vhm2fp45cbf9z62129rdgm1pyc"; }; propagatedBuildInputs = [ zlib freetype libjpeg libtiff fontconfig openssl libpng ]; - nativeBuildInputs = [ cmake ]; + nativeBuildInputs = [ cmake gcc5 ]; buildInputs = [ lua5 stdenv.cc.libc ]; crossAttrs = { From 4e5f484016b6ee9df10d33e209803c29a1ace555 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 19 Jan 2017 02:18:03 +0100 Subject: [PATCH 18/59] libe-book: fix build with gcc6 --- pkgs/development/libraries/libe-book/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/libraries/libe-book/default.nix b/pkgs/development/libraries/libe-book/default.nix index 02195dede936..1e374b8ad1fd 100644 --- a/pkgs/development/libraries/libe-book/default.nix +++ b/pkgs/development/libraries/libe-book/default.nix @@ -28,6 +28,7 @@ stdenv.mkDerivation { src = fetchurl { inherit (s) url sha256; }; + NIX_CFLAGS_COMPILE = "-Wno-error=unused-function"; meta = { inherit (s) version; description = ''Library for import of reflowable e-book formats''; From 9842a107dad0aaad8f21d6e2b98be1bc00347dcf Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 19 Jan 2017 02:24:04 +0100 Subject: [PATCH 19/59] linuxPackages.perf: fix build with gcc6 --- pkgs/os-specific/linux/kernel/perf.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/kernel/perf.nix b/pkgs/os-specific/linux/kernel/perf.nix index 9e5724984576..76f2662f21b9 100644 --- a/pkgs/os-specific/linux/kernel/perf.nix +++ b/pkgs/os-specific/linux/kernel/perf.nix @@ -30,7 +30,10 @@ stdenv.mkDerivation { # Note: we don't add elfutils to buildInputs, since it provides a # bad `ld' and other stuff. - NIX_CFLAGS_COMPILE = "-Wno-error=cpp -Wno-error=bool-compare -Wno-error=deprecated-declarations"; + NIX_CFLAGS_COMPILE = [ + "-Wno-error=cpp" "-Wno-error=bool-compare" "-Wno-error=deprecated-declarations" + "-Wno-error=unused-const-variable" "-Wno-error=misleading-indentation" + ]; installFlags = "install install-man ASCIIDOC8=1"; From b8340929d07e063e968d99ba545624e73aca141b Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 19 Jan 2017 12:43:05 +0100 Subject: [PATCH 20/59] libtasn1: 4.9 -> 4.10 --- pkgs/development/libraries/libtasn1/default.nix | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkgs/development/libraries/libtasn1/default.nix b/pkgs/development/libraries/libtasn1/default.nix index 150e7455c032..3b74406d7bf1 100644 --- a/pkgs/development/libraries/libtasn1/default.nix +++ b/pkgs/development/libraries/libtasn1/default.nix @@ -5,16 +5,12 @@ stdenv.mkDerivation rec { src = fetchurl { url = "mirror://gnu/libtasn1/${name}.tar.gz"; - sha256 = "681a4d9a0d259f2125713f2e5766c5809f151b3a1392fd91390f780b4b8f5a02"; + sha256 = "00jsix5hny0g768zv4hk78dib7w0qmk5fbizf4jj37r51nd4s6k8"; }; outputs = [ "out" "dev" "devdoc" ]; outputBin = "dev"; - # Warning causes build to fail on darwin since 4.9, - # check if this can be removed in the next release. - CFLAGS = "-Wno-sign-compare"; - buildInputs = [ perl texinfo ]; doCheck = true; From 6d3f23d0457f87952d13c2a47f404a83a4593be7 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 19 Jan 2017 15:48:29 +0100 Subject: [PATCH 21/59] thunderbird: add patch to fix build with gcc6 --- .../mailreaders/thunderbird/default.nix | 2 + .../mailreaders/thunderbird/gcc6.patch | 75 +++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 pkgs/applications/networking/mailreaders/thunderbird/gcc6.patch diff --git a/pkgs/applications/networking/mailreaders/thunderbird/default.nix b/pkgs/applications/networking/mailreaders/thunderbird/default.nix index 5f1483672b24..89cdfcb1aa43 100644 --- a/pkgs/applications/networking/mailreaders/thunderbird/default.nix +++ b/pkgs/applications/networking/mailreaders/thunderbird/default.nix @@ -25,6 +25,8 @@ stdenv.mkDerivation rec { sha512 = "1f4579ac37b8ab98c91fe2e3e6742ba1b005ca9346d23f467d19e6af45eb457cab749bf91ed2a79f2058bd66f54da661da3ea5d5786f8c4b472d8a2a6c34db4b"; }; + patches = [ ./gcc6.patch ]; + # New sed no longer tolerates this mistake. postPatch = '' for f in mozilla/{js/src,}/configure; do diff --git a/pkgs/applications/networking/mailreaders/thunderbird/gcc6.patch b/pkgs/applications/networking/mailreaders/thunderbird/gcc6.patch new file mode 100644 index 000000000000..bd1022202851 --- /dev/null +++ b/pkgs/applications/networking/mailreaders/thunderbird/gcc6.patch @@ -0,0 +1,75 @@ + +# HG changeset patch +# User Mike Hommey +# Date 1457596445 -32400 +# Node ID 55212130f19da3079167a6b0a5a0ed6689c9a71d +# Parent 27c94617d7064d566c24a42e11cd4c7ef725923d +Bug 1245076 - Don't include mozalloc.h from the cstdlib wrapper. r=froydnj + +Our STL wrappers do various different things, one of which is including +mozalloc.h for infallible operator new. mozalloc.h includes stdlib.h, +which, in libstdc++ >= 6 is now itself a wrapper around cstdlib, which +circles back to our STL wrapper. + +But of the things our STL wrappers do, including mozalloc.h is not one +that is necessary for cstdlib. So skip including mozalloc.h in our +cstdlib wrapper. + +Additionally, some C++ sources (in media/mtransport) are including +headers in an extern "C" block, which end up including stdlib.h, which +ends up including cstdlib because really, this is all C++, and our +wrapper pre-includes for mozalloc.h, which fails because templates +don't work inside extern "C". So, don't pre-include when we're not +including mozalloc.h. + + +diff --git a/mozilla/config/gcc-stl-wrapper.template.h b/mozilla/config/gcc-stl-wrapper.template.h +--- a/mozilla/config/gcc-stl-wrapper.template.h ++++ b/mozilla/config/gcc-stl-wrapper.template.h +@@ -12,33 +12,40 @@ + // compiling ObjC. + #if defined(__EXCEPTIONS) && __EXCEPTIONS && !(__OBJC__ && __GNUC__ && XP_IOS) + # error "STL code can only be used with -fno-exceptions" + #endif + + // Silence "warning: #include_next is a GCC extension" + #pragma GCC system_header + ++// Don't include mozalloc for cstdlib. See bug 1245076. ++#ifndef moz_dont_include_mozalloc_for_cstdlib ++# define moz_dont_include_mozalloc_for_cstdlib ++#endif ++#ifndef moz_dont_include_mozalloc_for_${HEADER} + // mozalloc.h wants ; break the cycle by always explicitly + // including here. NB: this is a tad sneaky. Sez the gcc docs: + // + // `#include_next' does not distinguish between and "file" + // inclusion, nor does it check that the file you specify has the + // same name as the current file. It simply looks for the file + // named, starting with the directory in the search path after the + // one where the current file was found. +-#include_next ++# include_next + + // See if we're in code that can use mozalloc. NB: this duplicates + // code in nscore.h because nscore.h pulls in prtypes.h, and chromium + // can't build with that being included before base/basictypes.h. +-#if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) +-# include "mozilla/mozalloc.h" +-#else +-# error "STL code can only be used with infallible ::operator new()" ++# if !defined(XPCOM_GLUE) && !defined(NS_NO_XPCOM) && !defined(MOZ_NO_MOZALLOC) ++# include "mozilla/mozalloc.h" ++# else ++# error "STL code can only be used with infallible ::operator new()" ++# endif ++ + #endif + + #if defined(DEBUG) && !defined(_GLIBCXX_DEBUG) + // Enable checked iterators and other goodies + // + // FIXME/bug 551254: gcc's debug STL implementation requires -frtti. + // Figure out how to resolve this with -fno-rtti. Maybe build with + // -frtti in DEBUG builds? + From 41cb4593b437f2ef1caad989a0f8f6f62ac5e62f Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 19 Jan 2017 22:57:29 +0100 Subject: [PATCH 22/59] openxcom: add patch to fix build with gcc6 --- pkgs/games/openxcom/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/games/openxcom/default.nix b/pkgs/games/openxcom/default.nix index 204663e1448c..65c2a42922b2 100644 --- a/pkgs/games/openxcom/default.nix +++ b/pkgs/games/openxcom/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, cmake, mesa, zlib, openssl, libyamlcpp, boost +{stdenv, fetchurl, fetchpatch, cmake, mesa, zlib, openssl, libyamlcpp, boost , SDL, SDL_image, SDL_mixer, SDL_gfx }: let version = "1.0.0"; in @@ -13,6 +13,11 @@ stdenv.mkDerivation { buildInputs = [ cmake mesa zlib openssl libyamlcpp boost SDL SDL_image SDL_mixer SDL_gfx ]; + patches = [ (fetchpatch { + url = "https://github.com/SupSuper/OpenXcom/commit/49bec0851fc6e5365cac0f71b2c40a80ddf95e77.patch"; + sha256 = "156fk8wz4qc0nmqq3zjb6kw84qirabads2azr6xvlgb3lcn327v2"; + }) ]; + meta = { description = "Open source clone of UFO: Enemy Unknown"; homepage = http://openxcom.org; From bc08b942e91aa8e4f1a65d68753c928cce84e1e0 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 19 Jan 2017 23:10:28 +0100 Subject: [PATCH 23/59] warmux: add patch to fix build with gcc6 --- pkgs/games/warmux/gcc-fix.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkgs/games/warmux/gcc-fix.patch b/pkgs/games/warmux/gcc-fix.patch index 1ac476b92a32..913b912af7d4 100644 --- a/pkgs/games/warmux/gcc-fix.patch +++ b/pkgs/games/warmux/gcc-fix.patch @@ -34,3 +34,18 @@ Author: Felix Geyer #include #include #include + +Description: Fix conversion error in gcc 6. +Author: Robin Gloster + +--- warmux-11.04.1.orig/src/interface/weapon_menu.cpp 2017-01-19 23:06:32.401035923 +0100 ++++ warmux-11.04.1/src/interface/weapon_menu.cpp 2017-01-19 23:07:14.245866593 +0100 +@@ -391,7 +391,7 @@ + Weapon * WeaponsMenu::UpdateCurrentOverflyItem(const Polygon * poly) + { + if (!show) +- return false; ++ return nullptr; + const std::vector& items = poly->GetItem(); + WeaponMenuItem * tmp; + Interface::GetInstance()->SetCurrentOverflyWeapon(NULL); From d3cd8b1d58de5ad67e227617ffa2629f04b9e9ac Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Sat, 21 Jan 2017 13:49:24 +0100 Subject: [PATCH 24/59] spidermonkey_1_8_5: add patch to fix build with gcc6 --- pkgs/development/interpreters/spidermonkey/1.8.5.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/spidermonkey/1.8.5.nix b/pkgs/development/interpreters/spidermonkey/1.8.5.nix index 3c5eef01db01..ed09ac7467d4 100644 --- a/pkgs/development/interpreters/spidermonkey/1.8.5.nix +++ b/pkgs/development/interpreters/spidermonkey/1.8.5.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, autoconf213, fetchurl, pkgconfig, nspr, perl, python2, zip }: +{ stdenv, lib, autoconf213, fetchurl, fetchpatch, pkgconfig, nspr, perl, python2, zip }: stdenv.mkDerivation rec { name = "spidermonkey-${version}"; @@ -22,7 +22,13 @@ stdenv.mkDerivation rec { ${lib.optionalString stdenv.isArm "autoreconf --verbose --force"} ''; - patches = stdenv.lib.optionals stdenv.isArm [ + patches = [ + (fetchpatch { + name = "gcc6.patch"; + url = "https://anonscm.debian.org/cgit/collab-maint/mozjs.git/plain/debian/patches/fix-811665.patch?id=00b15c7841968ab4f7fec409a6b93fa5e1e1d32e"; + sha256 = "1q8477xqxiy5d8376k5902l45gd0qkd4nxmhl8vr6rr1pxfcny99"; + }) + ] ++ stdenv.lib.optionals stdenv.isArm [ # Explained below in configureFlags for ARM ./1.8.5-findvanilla.patch # Fix for hard float flags. From 8cae089f199552ef7629421eb73b67901f45c8d7 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Sat, 21 Jan 2017 14:42:59 +0100 Subject: [PATCH 25/59] dirac: fix build with gcc6 --- pkgs/development/libraries/dirac/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/dirac/default.nix b/pkgs/development/libraries/dirac/default.nix index ac94e077b9a6..7b42ead14bd8 100644 --- a/pkgs/development/libraries/dirac/default.nix +++ b/pkgs/development/libraries/dirac/default.nix @@ -14,6 +14,8 @@ stdenv.mkDerivation rec { patches = [ ./dirac-1.0.2.patch ]; + NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; + postInstall = '' # keep only necessary binaries find $out/bin \( -name '*RGB*' -or -name '*YUV*' -or -name create_dirac_testfile.pl \) -delete From d31b3a9e6dad213fe60b0fe1ede1ca4b87e055f5 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Sat, 21 Jan 2017 14:43:22 +0100 Subject: [PATCH 26/59] freeimage: fix build with gcc6 --- pkgs/development/libraries/freeimage/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/freeimage/default.nix b/pkgs/development/libraries/freeimage/default.nix index 42105c7022c2..6ee7670fc296 100644 --- a/pkgs/development/libraries/freeimage/default.nix +++ b/pkgs/development/libraries/freeimage/default.nix @@ -1,11 +1,15 @@ -{stdenv, fetchurl, unzip, darwin}: +{ stdenv, fetchurl, unzip, darwin }: + stdenv.mkDerivation { name = "freeimage-3.17.0"; + src = fetchurl { url = mirror://sourceforge/freeimage/FreeImage3170.zip; sha256 = "12bz57asdcfsz3zr9i9nska0fb6h3z2aizy412qjqkixkginbz7v"; }; + buildInputs = [ unzip ] ++ stdenv.lib.optional stdenv.isDarwin darwin.cctools; + prePatch = if stdenv.isDarwin then '' sed -e 's/gcc-4.0/clang/g' \ @@ -38,6 +42,8 @@ stdenv.mkDerivation { preInstall = "mkdir -p $out/include $out/lib"; postInstall = stdenv.lib.optionalString (!stdenv.isDarwin) "make -f Makefile.fip install"; + NIX_CFLAGS_COMPILE = "-Wno-narrowing"; + meta = { description = "Open Source library for accessing popular graphics image file formats"; homepage = http://freeimage.sourceforge.net/; From 246765f33db59d7d0244b8c415a76f64f4082538 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Sat, 21 Jan 2017 14:43:45 +0100 Subject: [PATCH 27/59] libjack2: add patch to fix build with gcc6 --- pkgs/misc/jackaudio/default.nix | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pkgs/misc/jackaudio/default.nix b/pkgs/misc/jackaudio/default.nix index a4e4e408fec5..a38c9b764100 100644 --- a/pkgs/misc/jackaudio/default.nix +++ b/pkgs/misc/jackaudio/default.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchFromGitHub, pkgconfig, python2Packages, makeWrapper -, bash, libsamplerate, libsndfile, readline, gcc +{ stdenv, fetchFromGitHub, fetchpatch, pkgconfig, python2Packages, makeWrapper +, bash, libsamplerate, libsndfile, readline # Optional Dependencies , dbus ? null, libffado ? null, alsaLib ? null @@ -34,11 +34,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ pkgconfig python makeWrapper ]; - buildInputs = [ gcc - python - - libsamplerate libsndfile readline - + buildInputs = [ python libsamplerate libsndfile readline optDbus optPythonDBus optLibffado optAlsaLib optLibopus ]; @@ -46,7 +42,13 @@ stdenv.mkDerivation rec { substituteInPlace svnversion_regenerate.sh --replace /bin/bash ${bash}/bin/bash ''; - patches = [ ./jack-gcc5.patch ]; + patches = [ + ./jack-gcc5.patch + (fetchpatch { + url = "https://github.com/jackaudio/jack2/commit/ff1ed2c4524095055140370c1008a2d9cccc5645.patch"; + sha256 = "0vywakbmlskvs9ginij9ilk39wjyzg7w6cf1qxp11hb0hj69fir5"; + }) + ]; configurePhase = '' python waf configure --prefix=$out \ From 6bc1f2f61c113f49ae4c8799eff7e1b5d61adef1 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Sun, 22 Jan 2017 20:24:27 +0100 Subject: [PATCH 28/59] ams-lv2: 1.1.0 -> 1.2.1 --- pkgs/applications/audio/ams-lv2/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/audio/ams-lv2/default.nix b/pkgs/applications/audio/ams-lv2/default.nix index 9d62696a3f8e..fbbb9f90f8a5 100644 --- a/pkgs/applications/audio/ams-lv2/default.nix +++ b/pkgs/applications/audio/ams-lv2/default.nix @@ -1,12 +1,14 @@ -{ stdenv, fetchurl, cairo, fftw, gtkmm2, lv2, lvtk, pkgconfig, python }: +{ stdenv, fetchFromGitHub, cairo, fftw, gtkmm2, lv2, lvtk, pkgconfig, python }: stdenv.mkDerivation rec { name = "ams-lv2-${version}"; - version = "1.1.0"; + version = "1.2.1"; - src = fetchurl { - url = "https://github.com/blablack/ams-lv2/archive/v${version}.tar.gz"; - sha256 = "1kqbl7rc3zrs27c5ga0frw3mlpx15sbxzhf04sfbrd9l60535fd5"; + src = fetchFromGitHub { + owner = "blablack"; + repo = "ams-lv2"; + rev = version; + sha256 = "1n1dnqnj24xhiy9323lj52nswr5120cj56fpckg802miss05sr6x"; }; buildInputs = [ cairo fftw gtkmm2 lv2 lvtk pkgconfig python ]; From dc52135d550c0f860bd5983d80d31f2e8fdc6424 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Sun, 22 Jan 2017 20:25:16 +0100 Subject: [PATCH 29/59] apvlv: 0.1 -> 0.1.5 --- pkgs/applications/misc/apvlv/default.nix | 37 +++++++++++++++--------- pkgs/top-level/all-packages.nix | 4 +-- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/pkgs/applications/misc/apvlv/default.nix b/pkgs/applications/misc/apvlv/default.nix index 88e08b409146..977f5e94e5d9 100644 --- a/pkgs/applications/misc/apvlv/default.nix +++ b/pkgs/applications/misc/apvlv/default.nix @@ -1,26 +1,37 @@ -{ stdenv, fetchurl, cmake, pkgconfig, - gtk2 , poppler, freetype, libpthreadstubs, libXdmcp, libxshmfence +{ stdenv, fetchFromGitHub, fetchpatch, cmake, pkgconfig, pcre, libxkbcommon, epoxy +, gtk3, poppler, freetype, libpthreadstubs, libXdmcp, libxshmfence }: stdenv.mkDerivation rec { - version = "0.1.f7f7b9c"; + version = "0.1.5"; name = "apvlv-${version}"; - src = fetchurl { - url = "https://github.com/downloads/naihe2010/apvlv/${name}-Source.tar.gz"; - sha256 = "125nlcfjdhgzi9jjxh9l2yc9g39l6jahf8qh2555q20xkxf4rl0w"; + src = fetchFromGitHub { + owner = "naihe2010"; + repo = "apvlv"; + rev = "v${version}"; + sha256 = "1n4xiic8lqnv3mqi7wpdv866gyyakax71gffv3n9427rmcld465i"; }; - preConfigure = '' - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${poppler.dev}/include/poppler" - ''; + NIX_CFLAGS_COMPILE = "-I${poppler.dev}/include/poppler"; buildInputs = [ pkgconfig cmake - poppler - freetype gtk2 - libpthreadstubs libXdmcp libxshmfence # otherwise warnings in compilation - ]; + poppler pcre libxkbcommon epoxy + freetype gtk3 + libpthreadstubs libXdmcp libxshmfence # otherwise warnings in compilation + ]; + + patches = [ + (fetchpatch { + url = "https://github.com/naihe2010/apvlv/commit/d432635b9c5ea6c052a2ae1fb71aedec5c4ad57a.patch"; + sha256 = "1am8dgv2kkpqmm2vaysa61czx8ppdx94zb3c59sx88np50jpy70w"; + }) + (fetchpatch { + url = "https://github.com/naihe2010/apvlv/commit/4c7a583e8431964def482e5471f02e6de8e62a7b.patch"; + sha256 = "1dszm120lwm90hcg5zmd4vr6pjyaxc84qmb7k0fr59mmb3qif62j"; + }) + ]; installPhase = '' # binary diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bbe1243749db..f2b593f806ec 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15731,9 +15731,7 @@ in inherit (gnome2) libgnomeprint libgnomeprintui libgnomecanvas; }; - apvlv = callPackage ../applications/misc/apvlv { - gtk2 = gtk2-x11; - }; + apvlv = callPackage ../applications/misc/apvlv { }; xpdf = callPackage ../applications/misc/xpdf { base14Fonts = "${ghostscript}/share/ghostscript/fonts"; From 7a02353e36a61424c2068d1b0c72cfb6885ca664 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Sun, 22 Jan 2017 19:56:55 +0100 Subject: [PATCH 30/59] acoustidFingerprinter: add patch to fix build with gcc6 --- pkgs/tools/audio/acoustid-fingerprinter/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/audio/acoustid-fingerprinter/default.nix b/pkgs/tools/audio/acoustid-fingerprinter/default.nix index 208b4c2b38b0..80149fa98ddf 100644 --- a/pkgs/tools/audio/acoustid-fingerprinter/default.nix +++ b/pkgs/tools/audio/acoustid-fingerprinter/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, cmake, pkgconfig, qt4, taglib, chromaprint, ffmpeg }: +{ stdenv, fetchurl, fetchpatch, cmake, pkgconfig, qt4, taglib, chromaprint, ffmpeg }: stdenv.mkDerivation rec { name = "acoustid-fingerprinter-${version}"; @@ -14,6 +14,11 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DTAGLIB_MIN_VERSION=${(builtins.parseDrvName taglib.name).version}" ]; + patches = [ (fetchpatch { + url = "https://bitbucket.org/acoustid/acoustid-fingerprinter/commits/632e87969c3a5562a5d4842b03613267ba6236b2/raw"; + sha256 = "15hm9knrpqn3yqrwyjz4zh2aypwbcycd0c5svrsy1fb2h2rh05jk"; + }) ]; + meta = with stdenv.lib; { homepage = "http://acoustid.org/fingerprinter"; description = "Audio fingerprinting tool using chromaprint"; From bcfca9224f6ed0933562fdf3d3aa8ff226023d22 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Mon, 23 Jan 2017 01:33:49 +0100 Subject: [PATCH 31/59] gnome3.gjs: 1.46 -> 1.47, use spidermonkey_31 --- pkgs/desktops/gnome-3/3.22/core/gjs/default.nix | 4 ++-- pkgs/desktops/gnome-3/3.22/core/gjs/src.nix | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/desktops/gnome-3/3.22/core/gjs/default.nix b/pkgs/desktops/gnome-3/3.22/core/gjs/default.nix index ac5572decb8c..1141db03c407 100644 --- a/pkgs/desktops/gnome-3/3.22/core/gjs/default.nix +++ b/pkgs/desktops/gnome-3/3.22/core/gjs/default.nix @@ -1,12 +1,12 @@ { fetchurl, stdenv, pkgconfig, gnome3, gtk3, gobjectIntrospection -, spidermonkey_24, pango, readline, glib, libxml2, dbus }: +, spidermonkey_31, pango, readline, glib, libxml2, dbus }: stdenv.mkDerivation rec { inherit (import ./src.nix fetchurl) name src; buildInputs = [ libxml2 gobjectIntrospection pkgconfig gtk3 glib pango readline dbus ]; - propagatedBuildInputs = [ spidermonkey_24 ]; + propagatedBuildInputs = [ spidermonkey_31 ]; postInstall = '' sed 's|-lreadline|-L${readline.out}/lib -lreadline|g' -i $out/lib/libgjs.la diff --git a/pkgs/desktops/gnome-3/3.22/core/gjs/src.nix b/pkgs/desktops/gnome-3/3.22/core/gjs/src.nix index 1f4ef08f9b12..7af8d7c531b3 100644 --- a/pkgs/desktops/gnome-3/3.22/core/gjs/src.nix +++ b/pkgs/desktops/gnome-3/3.22/core/gjs/src.nix @@ -1,11 +1,11 @@ # Autogenerated by maintainers/scripts/gnome.sh update fetchurl: rec { - name = "gjs-${major}.0"; - major = "1.46"; + name = "gjs-${major}.4"; + major = "1.47"; src = fetchurl { url = "mirror://gnome/sources/gjs/${major}/${name}.tar.xz"; - sha256 = "2283591fa70785443793e1d7db66071b36052d707075f229baeb468d8dd25ad4"; + sha256 = "05x9yk3h53wn9fpwbcxl8yz71znhwhzwy7412di77x88ghkxi2c1"; }; } From 61f893fb64b542507fa3d99480c5372a35aa1d4a Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Mon, 23 Jan 2017 01:34:41 +0100 Subject: [PATCH 32/59] html-tidy: 5.0.0 -> 5.2.0 --- pkgs/tools/text/html-tidy/default.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/tools/text/html-tidy/default.nix b/pkgs/tools/text/html-tidy/default.nix index c0db454ed29b..1a264885b485 100644 --- a/pkgs/tools/text/html-tidy/default.nix +++ b/pkgs/tools/text/html-tidy/default.nix @@ -1,14 +1,14 @@ -{ stdenv, fetchurl, cmake, libxslt }: +{ stdenv, fetchFromGitHub, cmake, libxslt }: -let - version = "5.0.0"; -in stdenv.mkDerivation rec { name = "html-tidy-${version}"; + version = "5.2.0"; - src = fetchurl { - url = "https://github.com/htacg/tidy-html5/archive/${version}.tar.gz"; - sha256 = "1qz7hgk482496agngp9grz4jqkyxrp29r2ywbccc9i5198yspca4"; + src = fetchFromGitHub { + owner = "htacg"; + repo = "tidy-html5"; + rev = version; + sha256 = "1yxp3kjsxd5zwwn4r5rpyq5ndyylbcnb9pisdyf7dxjqd47z64bc"; }; nativeBuildInputs = [ cmake libxslt/*manpage*/ ]; From d7b17e8b1cc6d67ced284e849665f199b457d26e Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Wed, 25 Jan 2017 20:07:40 +0100 Subject: [PATCH 33/59] edbrowse: mark as broken --- pkgs/applications/editors/edbrowse/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/editors/edbrowse/default.nix b/pkgs/applications/editors/edbrowse/default.nix index e6f942dbfdd6..e5e64a32e977 100644 --- a/pkgs/applications/editors/edbrowse/default.nix +++ b/pkgs/applications/editors/edbrowse/default.nix @@ -1,10 +1,11 @@ -{ stdenv, fetchurl, spidermonkey_24, unzip, curl, pcre, readline, openssl, perl, html-tidy }: +{ stdenv, fetchurl, spidermonkey, unzip, curl, pcre, readline, openssl, perl, html-tidy }: + stdenv.mkDerivation rec { name = "edbrowse-${version}"; version = "3.6.1"; nativeBuildInputs = [ unzip ]; - buildInputs = [ curl pcre readline openssl spidermonkey_24 perl html-tidy ]; + buildInputs = [ curl pcre readline openssl spidermonkey perl html-tidy ]; patchPhase = '' substituteInPlace src/ebjs.c --replace \"edbrowse-js\" \"$out/bin/edbrowse-js\" @@ -14,7 +15,7 @@ stdenv.mkDerivation rec { done ''; - NIX_CFLAGS_COMPILE = "-I${spidermonkey_24.dev}/include/mozjs-24"; + NIX_CFLAGS_COMPILE = "-I${spidermonkey}/include/mozjs-31"; makeFlags = "-C src prefix=$(out)"; src = fetchurl { @@ -34,5 +35,6 @@ stdenv.mkDerivation rec { homepage = http://edbrowse.org/; maintainers = [ maintainers.schmitthenner maintainers.vrthra ]; platforms = platforms.linux; + broken = true; # no compatible spidermonkey }; } From 5dacc53af3f4537fab693952b5f13b6cafcde6d4 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Wed, 25 Jan 2017 20:07:57 +0100 Subject: [PATCH 34/59] spidermonkey_24: remove --- .../interpreters/spidermonkey/24.nix | 62 ------------------- pkgs/top-level/all-packages.nix | 1 - 2 files changed, 63 deletions(-) delete mode 100644 pkgs/development/interpreters/spidermonkey/24.nix diff --git a/pkgs/development/interpreters/spidermonkey/24.nix b/pkgs/development/interpreters/spidermonkey/24.nix deleted file mode 100644 index 6e354c542963..000000000000 --- a/pkgs/development/interpreters/spidermonkey/24.nix +++ /dev/null @@ -1,62 +0,0 @@ -{ stdenv, fetchurl, pkgconfig, nspr, perl, python2, zip, libffi, readline, icu }: - -stdenv.mkDerivation rec { - version = "24.2.0"; - name = "spidermonkey-${version}"; - - src = fetchurl { - url = "mirror://mozilla/js/mozjs-${version}.tar.bz2"; - sha256 = "1n1phk8r3l8icqrrap4czplnylawa0ddc2cc4cgdz46x3lrkybz6"; - }; - - outputs = [ "out" "dev" "lib" ]; - - propagatedBuildInputs = [ nspr ]; - - buildInputs = [ pkgconfig perl python2 zip libffi readline icu ]; - - postPatch = '' - # Fixes an issue with version detection under perl 5.22.x - sed -i 's/(defined\((@TEMPLATE_FILE)\))/\1/' config/milestone.pl - ''; - - postUnpack = "sourceRoot=\${sourceRoot}/js/src"; - - preConfigure = '' - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${nspr.dev}/include/nspr" - export LIBXUL_DIST=$out - ''; - - setOutputFlags = false; - configureFlags = [ - "--libdir=$(lib)/lib" - "--includedir=$(dev)/include" - "--enable-threadsafe" - "--with-system-icu" - "--with-system-nspr" - "--with-system-ffi" - "--enable-readline" - ]; - - # hack around a make problem, see https://github.com/NixOS/nixpkgs/issues/1279#issuecomment-29547393 - preBuild = "touch -- {.,shell,jsapi-tests}/{-lpthread,-ldl}"; - - enableParallelBuilding = true; - - doCheck = true; - preCheck = "rm jit-test/tests/sunspider/check-date-format-tofte.js"; # https://bugzil.la/600522 - - postInstall = '' - rm "$lib"/lib/*.a # halve the output size - moveToOutput "bin/js*-config" "$dev" # break the cycle - ''; - - meta = with stdenv.lib; { - description = "Mozilla's JavaScript engine written in C/C++"; - homepage = https://developer.mozilla.org/en/SpiderMonkey; - # TODO: MPL/GPL/LGPL tri-license. - maintainers = [ maintainers.goibhniu ]; - platforms = platforms.linux; - }; -} - diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f2b593f806ec..5df31f6bbd39 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5912,7 +5912,6 @@ in spidermonkey_1_8_5 = callPackage ../development/interpreters/spidermonkey/1.8.5.nix { }; spidermonkey_17 = callPackage ../development/interpreters/spidermonkey/17.nix { }; - spidermonkey_24 = callPackage ../development/interpreters/spidermonkey/24.nix { }; spidermonkey_31 = callPackage ../development/interpreters/spidermonkey/31.nix { }; spidermonkey_38 = callPackage ../development/interpreters/spidermonkey/38.nix { }; spidermonkey = spidermonkey_31; From a38f1911d34f2a72e15d5e98d76bece6cb8042a8 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 26 Jan 2017 01:52:38 +0100 Subject: [PATCH 35/59] systemd: 231 -> 232 Includes adding some more upstream units and removing obsolete (-.slice) ones. --- nixos/modules/system/boot/networkd.nix | 6 ++++-- nixos/modules/system/boot/resolved.nix | 4 +++- nixos/modules/system/boot/systemd.nix | 20 ++++++++++++++++---- pkgs/os-specific/linux/systemd/default.nix | 20 +++++--------------- 4 files changed, 28 insertions(+), 22 deletions(-) diff --git a/nixos/modules/system/boot/networkd.nix b/nixos/modules/system/boot/networkd.nix index b828ad53dc58..be70bdbf0a91 100644 --- a/nixos/modules/system/boot/networkd.nix +++ b/nixos/modules/system/boot/networkd.nix @@ -667,8 +667,10 @@ in config = mkIf config.systemd.network.enable { - systemd.additionalUpstreamSystemUnits = - [ "systemd-networkd.service" "systemd-networkd-wait-online.service" ]; + systemd.additionalUpstreamSystemUnits = [ + "systemd-networkd.service" "systemd-networkd-wait-online.service" + "org.freedesktop.network1.busname" + ]; systemd.network.units = mapAttrs' (n: v: nameValuePair "${n}.link" (linkToUnit n v)) cfg.links // mapAttrs' (n: v: nameValuePair "${n}.netdev" (netdevToUnit n v)) cfg.netdevs diff --git a/nixos/modules/system/boot/resolved.nix b/nixos/modules/system/boot/resolved.nix index 4b7c545dcc0d..a3fb733c289d 100644 --- a/nixos/modules/system/boot/resolved.nix +++ b/nixos/modules/system/boot/resolved.nix @@ -71,7 +71,9 @@ in config = mkIf cfg.enable { - systemd.additionalUpstreamSystemUnits = [ "systemd-resolved.service" ]; + systemd.additionalUpstreamSystemUnits = [ + "systemd-resolved.service" "org.freedesktop.resolve1.busname" + ]; systemd.services.systemd-resolved = { wantedBy = [ "multi-user.target" ]; diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix index a2ee51669715..ace1545b96e6 100644 --- a/nixos/modules/system/boot/systemd.nix +++ b/nixos/modules/system/boot/systemd.nix @@ -17,6 +17,7 @@ let "busnames.target" "sysinit.target" "sockets.target" + "exit.target" "graphical.target" "multi-user.target" "network.target" @@ -41,11 +42,13 @@ let "systemd-udevd.service" "systemd-udev-settle.service" "systemd-udev-trigger.service" + "systemd-hwdb-update.service" # Consoles. "getty.target" "getty@.service" "serial-getty@.service" + "console-getty.service" "container-getty@.service" "systemd-vconsole-setup.service" @@ -72,6 +75,7 @@ let "systemd-journal-flush.service" "systemd-journal-gatewayd.socket" "systemd-journal-gatewayd.service" + "systemd-journal-catalog-update.service" "systemd-journald-audit.socket" "systemd-journald-dev-log.socket" "syslog.socket" @@ -104,6 +108,7 @@ let "systemd-random-seed.service" "systemd-backlight@.service" "systemd-rfkill.service" + "systemd-rfkill.socket" # Hibernate / suspend. "hibernate.target" @@ -111,8 +116,8 @@ let "sleep.target" "hybrid-sleep.target" "systemd-hibernate.service" - "systemd-suspend.service" "systemd-hybrid-sleep.service" + "systemd-suspend.service" # Reboot stuff. "reboot.target" @@ -136,10 +141,10 @@ let # Slices / containers. "slices.target" - "-.slice" "system.slice" "user.slice" "machine.slice" + "machines.target" "systemd-machined.service" "systemd-nspawn@.service" @@ -162,12 +167,12 @@ let "systemd-localed.service" "systemd-hostnamed.service" "systemd-binfmt.service" + "systemd-exit.service" ] ++ cfg.additionalUpstreamSystemUnits; upstreamSystemWants = - [ #"basic.target.wants" - "sysinit.target.wants" + [ "sysinit.target.wants" "sockets.target.wants" "local-fs.target.wants" "multi-user.target.wants" @@ -176,11 +181,18 @@ let upstreamUserUnits = [ "basic.target" + "bluetooth.target" + "busnames.target" "default.target" "exit.target" + "graphical-session-pre.target" + "graphical-session.target" "paths.target" + "printer.target" "shutdown.target" + "smartcard.target" "sockets.target" + "sound.target" "systemd-exit.service" "timers.target" ]; diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 8939f8548706..62b6f66d6abc 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -4,30 +4,21 @@ , kexectools, libmicrohttpd, linuxHeaders ? stdenv.cc.libc.linuxHeaders, libseccomp , iptables, gnu-efi , autoreconfHook, gettext, docbook_xsl, docbook_xml_dtd_42, docbook_xml_dtd_45 -, enableKDbus ? false }: assert stdenv.isLinux; stdenv.mkDerivation rec { - version = "231"; + version = "232"; name = "systemd-${version}"; src = fetchFromGitHub { - owner = "NixOS"; + owner = "mayflower"; repo = "systemd"; - rev = "3b11791d323cf2d0e00a156967021e1ae9119de2"; - sha256 = "1xzldwd6407jdg6z36smd49d961nmqykpay969i4xfdldcgyjdv0"; + rev = "42a48d16c0ec48330286f8332a4628e1d71c759b"; + sha256 = "18bcxbba1wk44xhlsna18x3c4b07sq6670wnsy2xy1x2kzfnmhdl"; }; - patches = [ - # Fixes tty issues, see #18158. Remove when upgrading to systemd 232. - (fetchpatch { - url = "https://github.com/systemd/systemd/commit/bd64d82c1c0e3fe2a5f9b3dd9132d62834f50b2d.patch"; - sha256 = "1gc9fxdlnfmjhbi77xfwcb5mkhryjsdi0rmbh2lq2qq737iyqqwm"; - }) - ]; - outputs = [ "out" "lib" "man" "dev" ]; buildInputs = @@ -53,7 +44,6 @@ stdenv.mkDerivation rec { "--with-dbussystemservicedir=$(out)/share/dbus-1/system-services" "--with-dbussessionservicedir=$(out)/share/dbus-1/services" "--with-tty-gid=3" # tty in NixOS has gid 3 - "--enable-compat-libs" # get rid of this eventually "--disable-tests" "--enable-lz4" @@ -80,7 +70,7 @@ stdenv.mkDerivation rec { "--with-sysvinit-path=" "--with-sysvrcnd-path=" "--with-rc-local-script-path-stop=/etc/halt.local" - ] ++ (if enableKDbus then [ "--enable-kdbus" ] else [ "--disable-kdbus" ]); + ]; hardeningDisable = [ "stackprotector" ]; From 972749f1d423c5682faf5cd40fe3458bdcbb8cab Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 26 Jan 2017 17:57:10 +0100 Subject: [PATCH 36/59] systemd: fix repository url Left-over from testing, sorry.. --- pkgs/os-specific/linux/systemd/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 62b6f66d6abc..97ba7315ead9 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -13,7 +13,7 @@ stdenv.mkDerivation rec { name = "systemd-${version}"; src = fetchFromGitHub { - owner = "mayflower"; + owner = "nixos"; repo = "systemd"; rev = "42a48d16c0ec48330286f8332a4628e1d71c759b"; sha256 = "18bcxbba1wk44xhlsna18x3c4b07sq6670wnsy2xy1x2kzfnmhdl"; From e11f8dc72df04e4a5758cebb89f63f1abded4521 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Fri, 27 Jan 2017 18:24:06 +0100 Subject: [PATCH 37/59] miraclecast: remove obsolete enableKDbus flag --- pkgs/top-level/all-packages.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a00ed9c0a323..1ea614e56148 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11552,9 +11552,7 @@ with pkgs; mingetty = callPackage ../os-specific/linux/mingetty { }; - miraclecast = callPackage ../os-specific/linux/miraclecast { - systemd = systemd.override { enableKDbus = true; }; - }; + miraclecast = callPackage ../os-specific/linux/miraclecast { }; mkinitcpio-nfs-utils = callPackage ../os-specific/linux/mkinitcpio-nfs-utils { }; From 9c9e5bf25e9aa33176de32251b8aa0af6ae3cf49 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 27 Jan 2017 18:43:33 +0100 Subject: [PATCH 38/59] libva: 1.7.2 -> 1.7.3 --- pkgs/development/libraries/libva/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libva/default.nix b/pkgs/development/libraries/libva/default.nix index 8cba1a38b5ba..031ac781651c 100644 --- a/pkgs/development/libraries/libva/default.nix +++ b/pkgs/development/libraries/libva/default.nix @@ -5,11 +5,11 @@ stdenv.mkDerivation rec { name = "libva-${version}"; - version = "1.7.2"; + version = "1.7.3"; src = fetchurl { url = "http://www.freedesktop.org/software/vaapi/releases/libva/${name}.tar.bz2"; - sha256 = "04rczbnbi70y1ziy9ab59szi3glk9q35hshlws0bcj2ndbqirmjx"; + sha256 = "1ndrf136rlw03xag7j1xpmf9015d1h0dpnv6v587jnh6k2a17g12"; }; outputs = [ "bin" "dev" "out" ]; From bb8859bd66e84d78284a06a43440d1bc7e8211ca Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 27 Jan 2017 18:43:50 +0100 Subject: [PATCH 39/59] vaapiIntel: 1.7.2 -> 1.7.3 --- pkgs/development/libraries/vaapi-intel/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/vaapi-intel/default.nix b/pkgs/development/libraries/vaapi-intel/default.nix index e3a7124720b0..df68b86519b7 100644 --- a/pkgs/development/libraries/vaapi-intel/default.nix +++ b/pkgs/development/libraries/vaapi-intel/default.nix @@ -3,11 +3,11 @@ }: stdenv.mkDerivation rec { - name = "libva-intel-driver-1.7.2"; + name = "libva-intel-driver-1.7.3"; src = fetchurl { url = "http://www.freedesktop.org/software/vaapi/releases/libva-intel-driver/${name}.tar.bz2"; - sha256 = "1g371q9p31i57fkidjp2akvrbaadpyx3bwmg5kn72sc2mbv7p7h9"; + sha256 = "0dzryi9x873p9gikzcb9wzwqv2j3wssm0b85ws63vqjszpckgbbn"; }; patchPhase = '' From 27d21e94470b084b7c11cb870794aeba58492283 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sun, 29 Jan 2017 17:20:07 +0100 Subject: [PATCH 40/59] npth: 1.2 -> 1.3 --- pkgs/development/libraries/npth/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/npth/default.nix b/pkgs/development/libraries/npth/default.nix index 0c28a921995b..8ebf62cfdf0e 100644 --- a/pkgs/development/libraries/npth/default.nix +++ b/pkgs/development/libraries/npth/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl }: stdenv.mkDerivation rec { - name = "npth-1.2"; + name = "npth-1.3"; src = fetchurl { url = "ftp://ftp.gnupg.org/gcrypt/npth/${name}.tar.bz2"; - sha256 = "12n0nvhw4fzwp0k7gjv3rc6pdml0qiinbbfiz4ilg6pl5kdxvnvd"; + sha256 = "0am86vblapwz84254qpmhz0chk70g6qzh3wdxcs0gvba8d01ka5w"; }; meta = with stdenv.lib; { From 4b2731d4f483bbb2165a21d8e3a616104c3ec39c Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sun, 29 Jan 2017 17:19:47 +0100 Subject: [PATCH 41/59] lmdb: 0.9.18 -> 0.9.19 --- pkgs/development/libraries/lmdb/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/lmdb/default.nix b/pkgs/development/libraries/lmdb/default.nix index 80019d52f4f0..f1171a6a6185 100644 --- a/pkgs/development/libraries/lmdb/default.nix +++ b/pkgs/development/libraries/lmdb/default.nix @@ -1,13 +1,15 @@ -{ stdenv, fetchzip }: +{ stdenv, fetchFromGitHub }: let optional = stdenv.lib.optional; in stdenv.mkDerivation rec { name = "lmdb-${version}"; - version = "0.9.18"; + version = "0.9.19"; - src = fetchzip { - url = "https://github.com/LMDB/lmdb/archive/LMDB_${version}.tar.gz"; - sha256 = "01j384kxg36kym060pybr5p6mjw0xv33bqbb8arncdkdq57xk8wg"; + src = fetchFromGitHub { + owner = "LMDB"; + repo = "lmdb"; + rev = "LMDB_${version}"; + sha256 = "04qx803jdmhkcam748fn0az3cyzvj91lw28kcvwfyq0al7pmjkfs"; }; postUnpack = "sourceRoot=\${sourceRoot}/libraries/liblmdb"; From 4236364258351305f0a09d4f1f9e63c599d94733 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sun, 29 Jan 2017 17:19:22 +0100 Subject: [PATCH 42/59] libgpgerror: 1.24 -> 1.26 --- pkgs/development/libraries/libgpg-error/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libgpg-error/default.nix b/pkgs/development/libraries/libgpg-error/default.nix index d81a59a5c621..afa064881a66 100644 --- a/pkgs/development/libraries/libgpg-error/default.nix +++ b/pkgs/development/libraries/libgpg-error/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "libgpg-error-${version}"; - version = "1.24"; + version = "1.26"; src = fetchurl { url = "mirror://gnupg/libgpg-error/${name}.tar.bz2"; - sha256 = "0h75sf1ngr750c3fjfn4583q7wz40qm63jhg8vjfdrbx936f2s4j"; + sha256 = "0sgfia0syq78k1c9h10rkhc1nfv5v097icrprlx2x4qn074wnjsc"; }; postPatch = "sed '/BUILD_TIMESTAMP=/s/=.*/=1970-01-01T00:01+0000/' -i ./configure"; From b6d889dcd937eb7dc5ae992e46c35e3a30a46354 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sun, 29 Jan 2017 17:19:07 +0100 Subject: [PATCH 43/59] libgcrypt: 1.7.5 -> 1.7.6 --- pkgs/development/libraries/libgcrypt/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libgcrypt/default.nix b/pkgs/development/libraries/libgcrypt/default.nix index f05257898964..fc2c859a5f87 100644 --- a/pkgs/development/libraries/libgcrypt/default.nix +++ b/pkgs/development/libraries/libgcrypt/default.nix @@ -4,11 +4,11 @@ assert enableCapabilities -> stdenv.isLinux; stdenv.mkDerivation rec { name = "libgcrypt-${version}"; - version = "1.7.5"; + version = "1.7.6"; src = fetchurl { url = "mirror://gnupg/libgcrypt/${name}.tar.bz2"; - sha256 = "0078pbzm6nlgvnwlylshsg707ifcmfpnpbvhlhqbpwpfic9a9zni"; + sha256 = "1g05prhgqw4ryd0w433q8nhds0h93kf47hfjagi2r7dghkpaysk2"; }; outputs = [ "out" "dev" "info" ]; From 403432f6abea1730628337c35622430110f59468 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sun, 29 Jan 2017 17:18:53 +0100 Subject: [PATCH 44/59] gpgme: 1.7.0 -> 1.8.0 --- pkgs/development/libraries/gpgme/default.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/gpgme/default.nix b/pkgs/development/libraries/gpgme/default.nix index 8acc773a46c8..307fde4e5c27 100644 --- a/pkgs/development/libraries/gpgme/default.nix +++ b/pkgs/development/libraries/gpgme/default.nix @@ -9,11 +9,11 @@ let gpgProgram = if useGnupg1 then "gpg" else "gpg2"; in stdenv.mkDerivation rec { - name = "gpgme-1.7.0"; + name = "gpgme-1.8.0"; src = fetchurl { url = "mirror://gnupg/gpgme/${name}.tar.bz2"; - sha256 = "0j6capvv6lcr6p763lr2ygzkzkj5lqm7fnbfc1xaygib1znmzxbi"; + sha256 = "0csx3qnycwm0n90ql6gs65if5xi4gqyzzy21fxs2xqicghjrfq2r"; }; outputs = [ "out" "dev" "info" ]; @@ -24,7 +24,6 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig gnupg ]; configureFlags = [ - "--with-gpg=${gpgStorePath}/bin/${gpgProgram}" "--enable-fixed-path=${gpgStorePath}/bin" ]; From c770a94097d82dc1a107d8de0e10ea3e3728c0b0 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sun, 29 Jan 2017 17:18:30 +0100 Subject: [PATCH 45/59] gnu-efi: 3.0.4 -> 3.0.5 --- pkgs/development/libraries/gnu-efi/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gnu-efi/default.nix b/pkgs/development/libraries/gnu-efi/default.nix index aa644a3a4a83..6425749d0417 100644 --- a/pkgs/development/libraries/gnu-efi/default.nix +++ b/pkgs/development/libraries/gnu-efi/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "gnu-efi-${version}"; - version = "3.0.4"; + version = "3.0.5"; src = fetchurl { url = "mirror://sourceforge/gnu-efi/${name}.tar.bz2"; - sha256 = "1bzq5czw5dxlvpgs9ij2iz7q6krwhja87vc982r6vffcqcl0982i"; + sha256 = "08hb2gpzcj5p743wcagm0j2m4gh100xv12llpbjc13zi2icwv3xx"; }; patches = optional stdenv.isAarch64 ./aarch64-fix-discarded-qualifier.patch; From 1c5237e25c6bad14a13c33e53d9b0eaed8cb7d60 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Sun, 29 Jan 2017 17:18:09 +0100 Subject: [PATCH 46/59] gmime: 2.6.20 -> 2.6.23 --- pkgs/development/libraries/gmime/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gmime/default.nix b/pkgs/development/libraries/gmime/default.nix index 8796a5f67404..e908c9b5b134 100644 --- a/pkgs/development/libraries/gmime/default.nix +++ b/pkgs/development/libraries/gmime/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl, pkgconfig, glib, zlib, libgpgerror, gobjectIntrospection }: stdenv.mkDerivation rec { - name = "gmime-2.6.20"; + name = "gmime-2.6.23"; src = fetchurl { url = "mirror://gnome/sources/gmime/2.6/${name}.tar.xz"; - sha256 = "0rfzbgsh8ira5p76kdghygl5i3fvmmx4wbw5rp7f8ajc4vxp18g0"; + sha256 = "0slzlzcr3h8jikpz5a5amqd0csqh2m40gdk910ws2hnaf5m6hjbi"; }; outputs = [ "out" "dev" ]; From eaa9e01c1d453bb42fc6f91336d01f94cbabb465 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Mon, 30 Jan 2017 13:03:48 +0100 Subject: [PATCH 47/59] Revert "binutils: Add lib output" This reverts commit 17a344a5daebf7796e5b25f45658359b6c0dfda2. --- .../tools/misc/binutils/default.nix | 8 +------- .../tools/misc/binutils/no-plugins.patch | 19 ------------------- 2 files changed, 1 insertion(+), 26 deletions(-) delete mode 100644 pkgs/development/tools/misc/binutils/no-plugins.patch diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index 0214cafb1a7b..4c32255e8755 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -32,15 +32,9 @@ stdenv.mkDerivation rec { # This is needed, for instance, so that running "ldd" on a binary that is # PaX-marked to disable mprotect doesn't fail with permission denied. ./pt-pax-flags.patch - - # Bfd looks in BINDIR/../lib for some plugins that don't - # exist. This is pointless (since users can't install plugins - # there) and causes a cycle between the lib and bin outputs, so - # get rid of it. - ./no-plugins.patch ]; - outputs = [ "out" "lib" "info" ] ++ (optional (cross == null) "dev"); + outputs = [ "out" "info" ] ++ (optional (cross == null) "dev"); nativeBuildInputs = [ bison ]; buildInputs = [ zlib ]; diff --git a/pkgs/development/tools/misc/binutils/no-plugins.patch b/pkgs/development/tools/misc/binutils/no-plugins.patch deleted file mode 100644 index 9624b7976b70..000000000000 --- a/pkgs/development/tools/misc/binutils/no-plugins.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -ru binutils-2.27-orig/bfd/plugin.c binutils-2.27/bfd/plugin.c ---- binutils-2.27-orig/bfd/plugin.c 2016-10-14 17:46:30.791315555 +0200 -+++ binutils-2.27/bfd/plugin.c 2016-10-14 17:46:38.583298765 +0200 -@@ -333,6 +333,7 @@ - if (plugin_program_name == NULL) - return found; - -+#if 0 - plugin_dir = concat (BINDIR, "/../lib/bfd-plugins", NULL); - p = make_relative_prefix (plugin_program_name, - BINDIR, -@@ -364,6 +365,7 @@ - free (p); - if (d) - closedir (d); -+#endif - - return found; - } From db896154d1fae2476be750bdcee5f4f889518479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Mon, 30 Jan 2017 14:08:54 +0100 Subject: [PATCH 48/59] binutils: minimize rebuilds after parent revert Only revert the addition of the output and only on Darwin. --- .../tools/misc/binutils/default.nix | 11 ++++++++++- .../tools/misc/binutils/no-plugins.patch | 19 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/tools/misc/binutils/no-plugins.patch diff --git a/pkgs/development/tools/misc/binutils/default.nix b/pkgs/development/tools/misc/binutils/default.nix index 4c32255e8755..e61acd598cf6 100644 --- a/pkgs/development/tools/misc/binutils/default.nix +++ b/pkgs/development/tools/misc/binutils/default.nix @@ -32,9 +32,18 @@ stdenv.mkDerivation rec { # This is needed, for instance, so that running "ldd" on a binary that is # PaX-marked to disable mprotect doesn't fail with permission denied. ./pt-pax-flags.patch + + # Bfd looks in BINDIR/../lib for some plugins that don't + # exist. This is pointless (since users can't install plugins + # there) and causes a cycle between the lib and bin outputs, so + # get rid of it. + ./no-plugins.patch ]; - outputs = [ "out" "info" ] ++ (optional (cross == null) "dev"); + outputs = [ "out" ] + ++ optional (!stdenv.isDarwin) "lib" # problems in Darwin stdenv + ++ [ "info" ] + ++ optional (cross == null) "dev"; nativeBuildInputs = [ bison ]; buildInputs = [ zlib ]; diff --git a/pkgs/development/tools/misc/binutils/no-plugins.patch b/pkgs/development/tools/misc/binutils/no-plugins.patch new file mode 100644 index 000000000000..9624b7976b70 --- /dev/null +++ b/pkgs/development/tools/misc/binutils/no-plugins.patch @@ -0,0 +1,19 @@ +diff -ru binutils-2.27-orig/bfd/plugin.c binutils-2.27/bfd/plugin.c +--- binutils-2.27-orig/bfd/plugin.c 2016-10-14 17:46:30.791315555 +0200 ++++ binutils-2.27/bfd/plugin.c 2016-10-14 17:46:38.583298765 +0200 +@@ -333,6 +333,7 @@ + if (plugin_program_name == NULL) + return found; + ++#if 0 + plugin_dir = concat (BINDIR, "/../lib/bfd-plugins", NULL); + p = make_relative_prefix (plugin_program_name, + BINDIR, +@@ -364,6 +365,7 @@ + free (p); + if (d) + closedir (d); ++#endif + + return found; + } From cc07ec890d0e7b31d7154f1bce6d3ba19aae5a1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Mon, 30 Jan 2017 15:23:34 +0100 Subject: [PATCH 49/59] protobuf-3.x: fixup build with default gcc version /cc @globin a3a0e8fe6. http://hydra.nixos.org/build/47266085 --- pkgs/development/libraries/protobuf/generic-v3.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/protobuf/generic-v3.nix b/pkgs/development/libraries/protobuf/generic-v3.nix index 315608bf2b4f..39cf0a1741d6 100644 --- a/pkgs/development/libraries/protobuf/generic-v3.nix +++ b/pkgs/development/libraries/protobuf/generic-v3.nix @@ -34,7 +34,9 @@ stdenv.mkDerivation rec { doCheck = true; - NIX_CFLAGS_COMPILE = "-Wno-error=misleading-indentation"; + NIX_CFLAGS_COMPILE = with stdenv.lib; + # gcc before 6 doesn't know this option + optionalString (hasPrefix "gcc-6" stdenv.cc.cc) "-Wno-error=misleading-indentation"; meta = { description = "Google's data interchange format"; From 8a0d1bcf8bcc5b09a857769bfb3f1e45e9f73249 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 2 Feb 2017 01:12:55 +0100 Subject: [PATCH 50/59] systemd: add patches to fix i686 booting --- pkgs/os-specific/linux/systemd/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 97ba7315ead9..3248b93a5229 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -15,8 +15,8 @@ stdenv.mkDerivation rec { src = fetchFromGitHub { owner = "nixos"; repo = "systemd"; - rev = "42a48d16c0ec48330286f8332a4628e1d71c759b"; - sha256 = "18bcxbba1wk44xhlsna18x3c4b07sq6670wnsy2xy1x2kzfnmhdl"; + rev = "9a35924a4f15dab2a84b3104b1cd125a3c36f77d"; + sha256 = "1z3rishvjlr5d4qgd262r13z04vzvlrlgwm7kpsf4hk7w0gmz4i5"; }; outputs = [ "out" "lib" "man" "dev" ]; From dfcc9e2994eba3544ddfe303be5128ff17195ca6 Mon Sep 17 00:00:00 2001 From: Bas van Dijk Date: Wed, 25 Jan 2017 00:00:54 +0100 Subject: [PATCH 51/59] ghc: support building with integer-simple and provide package sets for it If the flag enableIntegerSimple is true GHC will be build with the GPL-free but slower integer-simple library instead of the faster but GPLed integer-gmp library. The attribute `pkgs.haskell.compiler.integer-simple."${ghcVersion}"` provides a GHC compiler build with `integer-simple`. Similarly, the attribute `pkgs.haskell.packages.integer-simple."${ghcVersion}"` provides a package set supporting `integer-simple`. Closes https://github.com/NixOS/nixpkgs/pull/22121. Closes https://github.com/NixOS/nixpkgs/issues/5493. --- doc/languages-frameworks/haskell.md | 58 +++++++++++++++++++++++ pkgs/development/compilers/ghc/7.10.2.nix | 18 +++++-- pkgs/development/compilers/ghc/7.10.3.nix | 11 ++++- pkgs/development/compilers/ghc/7.2.2.nix | 19 ++++++-- pkgs/development/compilers/ghc/7.4.2.nix | 19 ++++++-- pkgs/development/compilers/ghc/7.6.3.nix | 19 ++++++-- pkgs/development/compilers/ghc/7.8.3.nix | 19 ++++++-- pkgs/development/compilers/ghc/7.8.4.nix | 19 ++++++-- pkgs/development/compilers/ghc/8.0.1.nix | 11 ++++- pkgs/development/compilers/ghc/8.0.2.nix | 11 ++++- pkgs/development/compilers/ghc/head.nix | 11 ++++- pkgs/top-level/haskell-packages.nix | 42 +++++++++++++++- 12 files changed, 218 insertions(+), 39 deletions(-) diff --git a/doc/languages-frameworks/haskell.md b/doc/languages-frameworks/haskell.md index 6728f4abba0e..34b53ded3791 100644 --- a/doc/languages-frameworks/haskell.md +++ b/doc/languages-frameworks/haskell.md @@ -793,6 +793,64 @@ It's important to realize, however, that most system libraries in Nix are built as shared libraries only, i.e. there is just no static library available that Cabal could link! +### Building GHC with integer-simple + +By default GHC implements the Integer type using the +[GNU Multiple Precision Arithmetic (GMP) library](https://gmplib.org/). +The implementation can be found in the +[integer-gmp](http://hackage.haskell.org/package/integer-gmp) package. + +A potential problem with this is that GMP is licensed under the +[​GNU Lesser General Public License (LGPL)](http://www.gnu.org/copyleft/lesser.html), +a kind of "copyleft" license. According to the terms of the LGPL, paragraph 5, +you may distribute a program that is designed to be compiled and dynamically +linked with the library under the terms of your choice (i.e., commercially) but +if your program incorporates portions of the library, if it is linked +statically, then your program is a "derivative"--a "work based on the +library"--and according to paragraph 2, section c, you "must cause the whole of +the work to be licensed" under the terms of the LGPL (including for free). + +The LGPL licensing for GMP is a problem for the overall licensing of binary +programs compiled with GHC because most distributions (and builds) of GHC use +static libraries. (Dynamic libraries are currently distributed only for OS X.) +The LGPL licensing situation may be worse: even though +​[The Glasgow Haskell Compiler License](https://www.haskell.org/ghc/license) +is essentially a "free software" license (BSD3), according to +paragraph 2 of the LGPL, GHC must be distributed under the terms of the LGPL! + +To work around these problems GHC can be build with a slower but LGPL-free +alternative implemention for Integer called +[integer-simple](http://hackage.haskell.org/package/integer-simple). + +To get a GHC compiler build with `integer-simple` instead of `integer-gmp` use +the attribute: `pkgs.haskell.compiler.integer-simple."${ghcVersion}"`. +For example: + + $ nix-build -E '(import {}).pkgs.haskell.compiler.integer-simple.ghc802' + ... + $ result/bin/ghc-pkg list | grep integer + integer-simple-0.1.1.1 + +The following command displays the complete list of GHC compilers build with `integer-simple`: + + $ nix-env -f "" -qaP -A haskell.compiler.integer-simple + haskell.compiler.integer-simple.ghc7102 ghc-7.10.2 + haskell.compiler.integer-simple.ghc7103 ghc-7.10.3 + haskell.compiler.integer-simple.ghc722 ghc-7.2.2 + haskell.compiler.integer-simple.ghc742 ghc-7.4.2 + haskell.compiler.integer-simple.ghc763 ghc-7.6.3 + haskell.compiler.integer-simple.ghc783 ghc-7.8.3 + haskell.compiler.integer-simple.ghc784 ghc-7.8.4 + haskell.compiler.integer-simple.ghc801 ghc-8.0.1 + haskell.compiler.integer-simple.ghc802 ghc-8.0.2 + haskell.compiler.integer-simple.ghcHEAD ghc-8.1.20170106 + +To get a package set supporting `integer-simple` use the attribute: +`pkgs.haskell.packages.integer-simple."${ghcVersion}"`. For example +use the following to get the `scientific` package build with `integer-simple`: + + $ nix-build -A pkgs.haskell.packages.integer-simple.ghc802.scientific + ## Other resources diff --git a/pkgs/development/compilers/ghc/7.10.2.nix b/pkgs/development/compilers/ghc/7.10.2.nix index e384a42a51f4..521afbd88b43 100644 --- a/pkgs/development/compilers/ghc/7.10.2.nix +++ b/pkgs/development/compilers/ghc/7.10.2.nix @@ -1,20 +1,27 @@ -{ stdenv, fetchurl, fetchpatch, bootPkgs, perl, gmp, ncurses, libiconv, binutils, coreutils +{ stdenv, fetchurl, fetchpatch, bootPkgs, perl, ncurses, libiconv, binutils, coreutils , libxml2, libxslt, docbook_xsl, docbook_xml_dtd_45, docbook_xml_dtd_42, hscolour + + # If enabled GHC will be build with the GPL-free but slower integer-simple + # library instead of the faster but GPLed integer-gmp library. +, enableIntegerSimple ? false, gmp }: let inherit (bootPkgs) ghc; buildMK = '' - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib" - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include" libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.out}/lib" ${stdenv.lib.optionalString stdenv.isDarwin '' libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include" libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib" ''} - ''; + '' + (if enableIntegerSimple then '' + INTEGER_LIBRARY=integer-simple + '' else '' + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib" + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include" + ''); in @@ -46,8 +53,9 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-gcc=${stdenv.cc}/bin/cc" - "--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib" "--datadir=$doc/share/doc/ghc" + ] ++ stdenv.lib.optional (! enableIntegerSimple) [ + "--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib" ]; # required, because otherwise all symbols from HSffi.o are stripped, and diff --git a/pkgs/development/compilers/ghc/7.10.3.nix b/pkgs/development/compilers/ghc/7.10.3.nix index 020e4fd30cf7..d75f5df370f8 100644 --- a/pkgs/development/compilers/ghc/7.10.3.nix +++ b/pkgs/development/compilers/ghc/7.10.3.nix @@ -1,5 +1,9 @@ -{ stdenv, fetchurl, fetchpatch, bootPkgs, perl, gmp, ncurses, libiconv, binutils, coreutils +{ stdenv, fetchurl, fetchpatch, bootPkgs, perl, ncurses, libiconv, binutils, coreutils , libxml2, libxslt, docbook_xsl, docbook_xml_dtd_45, docbook_xml_dtd_42, hscolour + + # If enabled GHC will be build with the GPL-free but slower integer-simple + # library instead of the faster but GPLed integer-gmp library. +, enableIntegerSimple ? false, gmp }: let @@ -38,13 +42,16 @@ stdenv.mkDerivation rec { export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}" '' + stdenv.lib.optionalString stdenv.isDarwin '' export NIX_LDFLAGS+=" -no_dtrace_dof" + '' + stdenv.lib.optionalString enableIntegerSimple '' + echo "INTEGER_LIBRARY=integer-simple" > mk/build.mk ''; configureFlags = [ "--with-gcc=${stdenv.cc}/bin/cc" - "--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib" "--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib" "--datadir=$doc/share/doc/ghc" + ] ++ stdenv.lib.optional (! enableIntegerSimple) [ + "--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib" ] ++ stdenv.lib.optional stdenv.isDarwin [ "--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib" ]; diff --git a/pkgs/development/compilers/ghc/7.2.2.nix b/pkgs/development/compilers/ghc/7.2.2.nix index 31cac49135fc..b3f672a8ef56 100644 --- a/pkgs/development/compilers/ghc/7.2.2.nix +++ b/pkgs/development/compilers/ghc/7.2.2.nix @@ -1,4 +1,9 @@ -{ stdenv, fetchurl, ghc, perl, gmp, ncurses, libiconv }: +{ stdenv, fetchurl, ghc, perl, ncurses, libiconv + + # If enabled GHC will be build with the GPL-free but slower integer-simple + # library instead of the faster but GPLed integer-gmp library. +, enableIntegerSimple ? false, gmp +}: stdenv.mkDerivation rec { version = "7.2.2"; @@ -11,18 +16,22 @@ stdenv.mkDerivation rec { patches = [ ./fix-7.2.2-clang.patch ./relocation.patch ]; - buildInputs = [ ghc perl gmp ncurses ]; + buildInputs = [ ghc perl ncurses ] + ++ stdenv.lib.optional (!enableIntegerSimple) gmp; buildMK = '' - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib" - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include" libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.out}/lib" ${stdenv.lib.optionalString stdenv.isDarwin '' libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include" libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib" ''} - ''; + '' + (if enableIntegerSimple then '' + INTEGER_LIBRARY=integer-simple + '' else '' + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib" + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include" + ''); preConfigure = '' echo "${buildMK}" > mk/build.mk diff --git a/pkgs/development/compilers/ghc/7.4.2.nix b/pkgs/development/compilers/ghc/7.4.2.nix index 63ce7ddfacc7..08b4f6f5471e 100644 --- a/pkgs/development/compilers/ghc/7.4.2.nix +++ b/pkgs/development/compilers/ghc/7.4.2.nix @@ -1,4 +1,9 @@ -{ stdenv, fetchurl, ghc, perl, gmp, ncurses, libiconv }: +{ stdenv, fetchurl, ghc, perl, ncurses, libiconv + + # If enabled GHC will be build with the GPL-free but slower integer-simple + # library instead of the faster but GPLed integer-gmp library. +, enableIntegerSimple ? false, gmp +}: stdenv.mkDerivation rec { version = "7.4.2"; @@ -12,18 +17,22 @@ stdenv.mkDerivation rec { patches = [ ./fix-7.4.2-clang.patch ./relocation.patch ]; - buildInputs = [ ghc perl gmp ncurses ]; + buildInputs = [ ghc perl ncurses ] + ++ stdenv.lib.optional (!enableIntegerSimple) gmp; buildMK = '' - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib" - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include" libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.out}/lib" ${stdenv.lib.optionalString stdenv.isDarwin '' libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include" libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib" ''} - ''; + '' + (if enableIntegerSimple then '' + INTEGER_LIBRARY=integer-simple + '' else '' + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib" + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include" + ''); preConfigure = '' echo "${buildMK}" > mk/build.mk diff --git a/pkgs/development/compilers/ghc/7.6.3.nix b/pkgs/development/compilers/ghc/7.6.3.nix index 5a933a23aa8b..bdc0a20d3b4c 100644 --- a/pkgs/development/compilers/ghc/7.6.3.nix +++ b/pkgs/development/compilers/ghc/7.6.3.nix @@ -1,4 +1,9 @@ -{ stdenv, fetchurl, ghc, perl, gmp, ncurses, binutils, libiconv }: +{ stdenv, fetchurl, ghc, perl, ncurses, binutils, libiconv + + # If enabled GHC will be build with the GPL-free but slower integer-simple + # library instead of the faster but GPLed integer-gmp library. +, enableIntegerSimple ? false, gmp +}: let # The "-Wa,--noexecstack" options might be needed only with GNU ld (as opposed @@ -19,11 +24,10 @@ in stdenv.mkDerivation rec { patches = [ ./fix-7.6.3-clang.patch ./relocation.patch ]; - buildInputs = [ ghc perl gmp ncurses ]; + buildInputs = [ ghc perl ncurses ] + ++ stdenv.lib.optional (!enableIntegerSimple) gmp; buildMK = '' - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib" - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include" libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.out}/lib" ${stdenv.lib.optionalString stdenv.isDarwin '' @@ -34,7 +38,12 @@ in stdenv.mkDerivation rec { # Set ghcFlags for building ghc itself SRC_HC_OPTS += ${ghcFlags} SRC_CC_OPTS += ${cFlags} - ''; + '' + (if enableIntegerSimple then '' + INTEGER_LIBRARY=integer-simple + '' else '' + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib" + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include" + ''); preConfigure = '' echo "${buildMK}" > mk/build.mk diff --git a/pkgs/development/compilers/ghc/7.8.3.nix b/pkgs/development/compilers/ghc/7.8.3.nix index f631ad923560..986ec98c6b32 100644 --- a/pkgs/development/compilers/ghc/7.8.3.nix +++ b/pkgs/development/compilers/ghc/7.8.3.nix @@ -1,4 +1,9 @@ -{ stdenv, fetchurl, ghc, perl, gmp, ncurses, libiconv }: +{ stdenv, fetchurl, ghc, perl, ncurses, libiconv + + # If enabled GHC will be build with the GPL-free but slower integer-simple + # library instead of the faster but GPLed integer-gmp library. +, enableIntegerSimple ? false, gmp +}: stdenv.mkDerivation rec { version = "7.8.3"; @@ -11,13 +16,12 @@ stdenv.mkDerivation rec { patches = [ ./relocation.patch ]; - buildInputs = [ ghc perl gmp ncurses ]; + buildInputs = [ ghc perl ncurses ] + ++ stdenv.lib.optional (!enableIntegerSimple) gmp; enableParallelBuilding = true; buildMK = '' - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib" - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include" libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.out}/lib" DYNAMIC_BY_DEFAULT = NO @@ -25,7 +29,12 @@ stdenv.mkDerivation rec { libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include" libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib" ''} - ''; + '' + (if enableIntegerSimple then '' + INTEGER_LIBRARY=integer-simple + '' else '' + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib" + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include" + ''); preConfigure = '' echo "${buildMK}" > mk/build.mk diff --git a/pkgs/development/compilers/ghc/7.8.4.nix b/pkgs/development/compilers/ghc/7.8.4.nix index f41a1cf7d98d..057b9f70fc78 100644 --- a/pkgs/development/compilers/ghc/7.8.4.nix +++ b/pkgs/development/compilers/ghc/7.8.4.nix @@ -1,4 +1,9 @@ -{ stdenv, fetchurl, ghc, perl, gmp, ncurses, libiconv }: +{ stdenv, fetchurl, ghc, perl, ncurses, libiconv + + # If enabled GHC will be build with the GPL-free but slower integer-simple + # library instead of the faster but GPLed integer-gmp library. +, enableIntegerSimple ? false, gmp +}: stdenv.mkDerivation (rec { version = "7.8.4"; @@ -11,13 +16,12 @@ stdenv.mkDerivation (rec { patches = [ ./relocation.patch ]; - buildInputs = [ ghc perl gmp ncurses ]; + buildInputs = [ ghc perl ncurses ] + ++ stdenv.lib.optional (!enableIntegerSimple) gmp; enableParallelBuilding = true; buildMK = '' - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib" - libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include" libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes="${ncurses.dev}/include" libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-libraries="${ncurses.out}/lib" DYNAMIC_BY_DEFAULT = NO @@ -25,7 +29,12 @@ stdenv.mkDerivation (rec { libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-includes="${libiconv}/include" libraries/base_CONFIGURE_OPTS += --configure-option=--with-iconv-libraries="${libiconv}/lib" ''} - ''; + '' + (if enableIntegerSimple then '' + INTEGER_LIBRARY=integer-simple + '' else '' + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-libraries="${gmp.out}/lib" + libraries/integer-gmp_CONFIGURE_OPTS += --configure-option=--with-gmp-includes="${gmp.dev}/include" + ''); preConfigure = '' echo "${buildMK}" > mk/build.mk diff --git a/pkgs/development/compilers/ghc/8.0.1.nix b/pkgs/development/compilers/ghc/8.0.1.nix index 1834f3ae50b6..ae6edb739c9d 100644 --- a/pkgs/development/compilers/ghc/8.0.1.nix +++ b/pkgs/development/compilers/ghc/8.0.1.nix @@ -1,5 +1,9 @@ -{ stdenv, fetchurl, fetchpatch, bootPkgs, perl, gmp, ncurses, libiconv, binutils, coreutils +{ stdenv, fetchurl, fetchpatch, bootPkgs, perl, ncurses, libiconv, binutils, coreutils , hscolour, patchutils, sphinx + + # If enabled GHC will be build with the GPL-free but slower integer-simple + # library instead of the faster but GPLed integer-gmp library. +, enableIntegerSimple ? false, gmp }: let @@ -41,13 +45,16 @@ stdenv.mkDerivation rec { export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}" '' + stdenv.lib.optionalString stdenv.isDarwin '' export NIX_LDFLAGS+=" -no_dtrace_dof" + '' + stdenv.lib.optionalString enableIntegerSimple '' + echo "INTEGER_LIBRARY=integer-simple" > mk/build.mk ''; configureFlags = [ "--with-gcc=${stdenv.cc}/bin/cc" - "--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib" "--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib" "--datadir=$doc/share/doc/ghc" + ] ++ stdenv.lib.optional (! enableIntegerSimple) [ + "--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib" ] ++ stdenv.lib.optional stdenv.isDarwin [ "--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib" ]; diff --git a/pkgs/development/compilers/ghc/8.0.2.nix b/pkgs/development/compilers/ghc/8.0.2.nix index ba8401b9b092..5f687aca63a2 100644 --- a/pkgs/development/compilers/ghc/8.0.2.nix +++ b/pkgs/development/compilers/ghc/8.0.2.nix @@ -1,5 +1,9 @@ -{ stdenv, fetchurl, fetchpatch, bootPkgs, perl, gmp, ncurses, libiconv, binutils, coreutils +{ stdenv, fetchurl, fetchpatch, bootPkgs, perl, ncurses, libiconv, binutils, coreutils , hscolour, patchutils, sphinx + + # If enabled GHC will be build with the GPL-free but slower integer-simple + # library instead of the faster but GPLed integer-gmp library. +, enableIntegerSimple ? false, gmp }: let @@ -28,13 +32,16 @@ stdenv.mkDerivation rec { export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}" '' + stdenv.lib.optionalString stdenv.isDarwin '' export NIX_LDFLAGS+=" -no_dtrace_dof" + '' + stdenv.lib.optionalString enableIntegerSimple '' + echo "INTEGER_LIBRARY=integer-simple" > mk/build.mk ''; configureFlags = [ "--with-gcc=${stdenv.cc}/bin/cc" - "--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib" "--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib" "--datadir=$doc/share/doc/ghc" + ] ++ stdenv.lib.optional (! enableIntegerSimple) [ + "--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib" ] ++ stdenv.lib.optional stdenv.isDarwin [ "--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib" ]; diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index e7f4335d6f6e..0ca8e8c299eb 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -1,6 +1,10 @@ -{ stdenv, fetchgit, bootPkgs, perl, gmp, ncurses, libiconv, binutils, coreutils +{ stdenv, fetchgit, bootPkgs, perl, ncurses, libiconv, binutils, coreutils , autoconf, automake, happy, alex, python3, buildPlatform, targetPlatform , selfPkgs, cross ? null + + # If enabled GHC will be build with the GPL-free but slower integer-simple + # library instead of the faster but GPLed integer-gmp library. +, enableIntegerSimple ? false, gmp }: let @@ -20,6 +24,8 @@ let export NIX_LDFLAGS="$NIX_LDFLAGS -rpath $out/lib/ghc-${version}" '' + stdenv.lib.optionalString stdenv.isDarwin '' export NIX_LDFLAGS+=" -no_dtrace_dof" + '' + stdenv.lib.optionalString enableIntegerSimple '' + echo "INTEGER_LIBRARY=integer-simple" > mk/build.mk ''; in stdenv.mkDerivation (rec { inherit version rev; @@ -41,8 +47,9 @@ in stdenv.mkDerivation (rec { configureFlags = [ "CC=${stdenv.cc}/bin/cc" - "--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib" "--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib" + ] ++ stdenv.lib.optional (! enableIntegerSimple) [ + "--with-gmp-includes=${gmp.dev}/include" "--with-gmp-libraries=${gmp.out}/lib" ] ++ stdenv.lib.optional stdenv.isDarwin [ "--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib" ]; diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 805e9560c203..7d4c06425baa 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -1,6 +1,21 @@ { pkgs, callPackage, stdenv, buildPlatform, targetPlatform }: -rec { +let # These are attributes in compiler and packages that don't support integer-simple. + integerSimpleExcludes = [ + "ghc6102Binary" + "ghc704Binary" + "ghc742Binary" + "ghc6104" + "ghc6123" + "ghc704" + "ghcjs" + "ghcjsHEAD" + "ghcCross" + "jhc" + "uhc" + "integer-simple" + ]; +in rec { lib = import ../development/haskell-modules/lib.nix { inherit pkgs; }; @@ -74,6 +89,17 @@ rec { inherit (pkgs.haskellPackages) ghcWithPackages; }); + # The integer-simple attribute set contains all the GHC compilers + # build with integer-simple instead of integer-gmp. + integer-simple = + let integerSimpleGhcNames = + pkgs.lib.filter (name: ! builtins.elem name integerSimpleExcludes) + (pkgs.lib.attrNames compiler); + integerSimpleGhcs = pkgs.lib.genAttrs integerSimpleGhcNames + (name: compiler."${name}".override { enableIntegerSimple = true; }); + in integerSimpleGhcs // { + ghcHEAD = integerSimpleGhcs.ghcHEAD.override { selfPkgs = packages.integer-simple.ghcHEAD; }; + }; }; packages = { @@ -142,6 +168,20 @@ rec { compilerConfig = callPackage ../development/haskell-modules/configuration-ghcjs.nix { }; }; + # The integer-simple attribute set contains package sets for all the GHC compilers + # using integer-simple instead of integer-gmp. + integer-simple = + let integerSimpleGhcNames = + pkgs.lib.filter (name: ! builtins.elem name integerSimpleExcludes) + (pkgs.lib.attrNames packages); + in pkgs.lib.genAttrs integerSimpleGhcNames (name: packages."${name}".override { + ghc = compiler.integer-simple."${name}"; + overrides = _self : _super : { + integer-simple = null; + integer-gmp = null; + }; + }); + # These attributes exist only for backwards-compatibility so that we don't break # stack's --nix support. These attributes will disappear in the foreseeable # future: https://github.com/commercialhaskell/stack/issues/2259. From 75a4679548aef2062babe669da27471af3dbcae2 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Wed, 1 Feb 2017 11:01:24 +0100 Subject: [PATCH 52/59] Recurse from haskell.compiler into haskell.compiler.integer-simple on Hydra. This ensures that the gmp-free compiler variants are compiled on hydra.nixos.org, too. --- pkgs/top-level/haskell-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 7d4c06425baa..6f07c129322d 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -97,9 +97,9 @@ in rec { (pkgs.lib.attrNames compiler); integerSimpleGhcs = pkgs.lib.genAttrs integerSimpleGhcNames (name: compiler."${name}".override { enableIntegerSimple = true; }); - in integerSimpleGhcs // { + in pkgs.recurseIntoAttrs (integerSimpleGhcs // { ghcHEAD = integerSimpleGhcs.ghcHEAD.override { selfPkgs = packages.integer-simple.ghcHEAD; }; - }; + }); }; packages = { From 787c1add0ba40ba8094b0ed4001de10c7d05c033 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Thu, 2 Feb 2017 13:44:41 +0100 Subject: [PATCH 53/59] qt4: fixup missing space between flags on Darwin Since 9aae2991f24, /cc @globin. --- pkgs/development/libraries/qt-4.x/4.8/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/qt-4.x/4.8/default.nix b/pkgs/development/libraries/qt-4.x/4.8/default.nix index cfb4ac614599..4215404a9f67 100644 --- a/pkgs/development/libraries/qt-4.x/4.8/default.nix +++ b/pkgs/development/libraries/qt-4.x/4.8/default.nix @@ -154,7 +154,7 @@ stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE = "-std=gnu++98" + optionalString (stdenv.isFreeBSD || stdenv.isDarwin) - "-I${glib.dev}/include/glib-2.0 -I${glib.out}/lib/glib-2.0/include" + " -I${glib.dev}/include/glib-2.0 -I${glib.out}/lib/glib-2.0/include" + optionalString stdenv.isDarwin " -I${libcxx}/include/c++/v1"; NIX_LDFLAGS = optionalString (stdenv.isFreeBSD || stdenv.isDarwin) From e7c968fbf2edd32bb1d009207f873017e4bf5287 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Fri, 3 Feb 2017 12:37:40 +0100 Subject: [PATCH 54/59] linuxPackages*.perf: fix build with default gcc Broken since 9842a107. --- pkgs/os-specific/linux/kernel/perf.nix | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/perf.nix b/pkgs/os-specific/linux/kernel/perf.nix index 76f2662f21b9..0bfd8dfe700d 100644 --- a/pkgs/os-specific/linux/kernel/perf.nix +++ b/pkgs/os-specific/linux/kernel/perf.nix @@ -32,8 +32,11 @@ stdenv.mkDerivation { # bad `ld' and other stuff. NIX_CFLAGS_COMPILE = [ "-Wno-error=cpp" "-Wno-error=bool-compare" "-Wno-error=deprecated-declarations" - "-Wno-error=unused-const-variable" "-Wno-error=misleading-indentation" - ]; + ] + # gcc before 6 doesn't know these options + ++ stdenv.lib.optionals (hasPrefix "gcc-6" stdenv.cc.cc) [ + "-Wno-error=unused-const-variable" "-Wno-error=misleading-indentation" + ]; installFlags = "install install-man ASCIIDOC8=1"; From 45fcefd4bea9ceff7e0c0546c684ae6a7f7f2b40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sat, 4 Feb 2017 11:28:09 +0100 Subject: [PATCH 55/59] qt4: another attempt to fix build on Darwin --- pkgs/development/libraries/qt-4.x/4.8/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/qt-4.x/4.8/default.nix b/pkgs/development/libraries/qt-4.x/4.8/default.nix index 4215404a9f67..8c8e311a93ed 100644 --- a/pkgs/development/libraries/qt-4.x/4.8/default.nix +++ b/pkgs/development/libraries/qt-4.x/4.8/default.nix @@ -152,7 +152,8 @@ stdenv.mkDerivation rec { enableParallelBuilding = false; - NIX_CFLAGS_COMPILE = "-std=gnu++98" + NIX_CFLAGS_COMPILE = + optionalString stdenv.isLinux "-std=gnu++98" # gnu++ in (Obj)C flags is no good on Darwin + optionalString (stdenv.isFreeBSD || stdenv.isDarwin) " -I${glib.dev}/include/glib-2.0 -I${glib.out}/lib/glib-2.0/include" + optionalString stdenv.isDarwin " -I${libcxx}/include/c++/v1"; From 94a7a80f0b2981d26f6b75db0ca1a7a308552020 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sat, 4 Feb 2017 11:53:23 +0100 Subject: [PATCH 56/59] Revert "spidermonkey_24: remove" This reverts commit 5dacc53af3f4537fab693952b5f13b6cafcde6d4. --- .../interpreters/spidermonkey/24.nix | 62 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 63 insertions(+) create mode 100644 pkgs/development/interpreters/spidermonkey/24.nix diff --git a/pkgs/development/interpreters/spidermonkey/24.nix b/pkgs/development/interpreters/spidermonkey/24.nix new file mode 100644 index 000000000000..6e354c542963 --- /dev/null +++ b/pkgs/development/interpreters/spidermonkey/24.nix @@ -0,0 +1,62 @@ +{ stdenv, fetchurl, pkgconfig, nspr, perl, python2, zip, libffi, readline, icu }: + +stdenv.mkDerivation rec { + version = "24.2.0"; + name = "spidermonkey-${version}"; + + src = fetchurl { + url = "mirror://mozilla/js/mozjs-${version}.tar.bz2"; + sha256 = "1n1phk8r3l8icqrrap4czplnylawa0ddc2cc4cgdz46x3lrkybz6"; + }; + + outputs = [ "out" "dev" "lib" ]; + + propagatedBuildInputs = [ nspr ]; + + buildInputs = [ pkgconfig perl python2 zip libffi readline icu ]; + + postPatch = '' + # Fixes an issue with version detection under perl 5.22.x + sed -i 's/(defined\((@TEMPLATE_FILE)\))/\1/' config/milestone.pl + ''; + + postUnpack = "sourceRoot=\${sourceRoot}/js/src"; + + preConfigure = '' + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${nspr.dev}/include/nspr" + export LIBXUL_DIST=$out + ''; + + setOutputFlags = false; + configureFlags = [ + "--libdir=$(lib)/lib" + "--includedir=$(dev)/include" + "--enable-threadsafe" + "--with-system-icu" + "--with-system-nspr" + "--with-system-ffi" + "--enable-readline" + ]; + + # hack around a make problem, see https://github.com/NixOS/nixpkgs/issues/1279#issuecomment-29547393 + preBuild = "touch -- {.,shell,jsapi-tests}/{-lpthread,-ldl}"; + + enableParallelBuilding = true; + + doCheck = true; + preCheck = "rm jit-test/tests/sunspider/check-date-format-tofte.js"; # https://bugzil.la/600522 + + postInstall = '' + rm "$lib"/lib/*.a # halve the output size + moveToOutput "bin/js*-config" "$dev" # break the cycle + ''; + + meta = with stdenv.lib; { + description = "Mozilla's JavaScript engine written in C/C++"; + homepage = https://developer.mozilla.org/en/SpiderMonkey; + # TODO: MPL/GPL/LGPL tri-license. + maintainers = [ maintainers.goibhniu ]; + platforms = platforms.linux; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f74aa2c41764..07a4ce82a5f3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5927,6 +5927,7 @@ with pkgs; spidermonkey_1_8_5 = callPackage ../development/interpreters/spidermonkey/1.8.5.nix { }; spidermonkey_17 = callPackage ../development/interpreters/spidermonkey/17.nix { }; + spidermonkey_24 = callPackage ../development/interpreters/spidermonkey/24.nix { }; spidermonkey_31 = callPackage ../development/interpreters/spidermonkey/31.nix { }; spidermonkey_38 = callPackage ../development/interpreters/spidermonkey/38.nix { }; spidermonkey = spidermonkey_31; From a558519a55065bc48bbe535d3d0fbc08c183e910 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sat, 4 Feb 2017 11:53:37 +0100 Subject: [PATCH 57/59] Revert "gnome3.gjs: 1.46 -> 1.47, use spidermonkey_31" This reverts commit bcfca9224f6ed0933562fdf3d3aa8ff226023d22. It broke gnome-shell build and I can't see a quick way to fix it; cause: removal of gjs-internals-1.0.pc. Stable gnome-shell update didn't help. --- pkgs/desktops/gnome-3/3.22/core/gjs/default.nix | 4 ++-- pkgs/desktops/gnome-3/3.22/core/gjs/src.nix | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/desktops/gnome-3/3.22/core/gjs/default.nix b/pkgs/desktops/gnome-3/3.22/core/gjs/default.nix index 1141db03c407..ac5572decb8c 100644 --- a/pkgs/desktops/gnome-3/3.22/core/gjs/default.nix +++ b/pkgs/desktops/gnome-3/3.22/core/gjs/default.nix @@ -1,12 +1,12 @@ { fetchurl, stdenv, pkgconfig, gnome3, gtk3, gobjectIntrospection -, spidermonkey_31, pango, readline, glib, libxml2, dbus }: +, spidermonkey_24, pango, readline, glib, libxml2, dbus }: stdenv.mkDerivation rec { inherit (import ./src.nix fetchurl) name src; buildInputs = [ libxml2 gobjectIntrospection pkgconfig gtk3 glib pango readline dbus ]; - propagatedBuildInputs = [ spidermonkey_31 ]; + propagatedBuildInputs = [ spidermonkey_24 ]; postInstall = '' sed 's|-lreadline|-L${readline.out}/lib -lreadline|g' -i $out/lib/libgjs.la diff --git a/pkgs/desktops/gnome-3/3.22/core/gjs/src.nix b/pkgs/desktops/gnome-3/3.22/core/gjs/src.nix index 7af8d7c531b3..1f4ef08f9b12 100644 --- a/pkgs/desktops/gnome-3/3.22/core/gjs/src.nix +++ b/pkgs/desktops/gnome-3/3.22/core/gjs/src.nix @@ -1,11 +1,11 @@ # Autogenerated by maintainers/scripts/gnome.sh update fetchurl: rec { - name = "gjs-${major}.4"; - major = "1.47"; + name = "gjs-${major}.0"; + major = "1.46"; src = fetchurl { url = "mirror://gnome/sources/gjs/${major}/${name}.tar.xz"; - sha256 = "05x9yk3h53wn9fpwbcxl8yz71znhwhzwy7412di77x88ghkxi2c1"; + sha256 = "2283591fa70785443793e1d7db66071b36052d707075f229baeb468d8dd25ad4"; }; } From d2a571aacde26a3b09ac01b4ca77831a7ac6e4ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sat, 4 Feb 2017 20:46:49 +0100 Subject: [PATCH 58/59] audacity: fixup build also with default gcc and enableParallelBuilding. --- pkgs/applications/audio/audacity/default.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/audio/audacity/default.nix b/pkgs/applications/audio/audacity/default.nix index 8b81fd7c35a0..92e6adbaa965 100644 --- a/pkgs/applications/audio/audacity/default.nix +++ b/pkgs/applications/audio/audacity/default.nix @@ -20,12 +20,13 @@ stdenv.mkDerivation rec { + "/audacity-ffmpeg.patch?h=packages/audacity&id=0c1e35798d4d70692"; sha256 = "19fr674mw844zmkp1476yigkcnmb6zyn78av64ccdwi3p68i00rf"; }) - (fetchpatch { - name = "gcc6.patch"; - url = "https://github.com/audacity/audacity/commit/60f2322055756e8cacfe96530a12c63e9694482c.patch"; - sha256 = "07jlxr8y7ap3nsblx3zh8v9rcx7ajbcfnvwzhwykmbwbsyirgqf2"; - }) - ]; + ] + ++ optional (hasPrefix "gcc-6" stdenv.cc.cc.name) + (fetchpatch { + name = "gcc6.patch"; + url = "https://github.com/audacity/audacity/commit/60f2322055756e8cacfe96530a12c63e9694482c.patch"; + sha256 = "07jlxr8y7ap3nsblx3zh8v9rcx7ajbcfnvwzhwykmbwbsyirgqf2"; + }); preConfigure = /* we prefer system-wide libs */ '' mv lib-src lib-src-rm @@ -64,6 +65,8 @@ stdenv.mkDerivation rec { ffmpeg libmad lame libvorbis flac soundtouch ]; #ToDo: detach sbsms + enableParallelBuilding = true; + dontDisableStatic = true; doCheck = false; # Test fails From 73d798549fdc5a77245558ac27976ac76a2c44e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sat, 4 Feb 2017 20:58:47 +0100 Subject: [PATCH 59/59] protobuf, perf: fix my bad condition on gcc version --- pkgs/development/libraries/protobuf/generic-v3.nix | 2 +- pkgs/os-specific/linux/kernel/perf.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/protobuf/generic-v3.nix b/pkgs/development/libraries/protobuf/generic-v3.nix index 39cf0a1741d6..44ecdcb2f659 100644 --- a/pkgs/development/libraries/protobuf/generic-v3.nix +++ b/pkgs/development/libraries/protobuf/generic-v3.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE = with stdenv.lib; # gcc before 6 doesn't know this option - optionalString (hasPrefix "gcc-6" stdenv.cc.cc) "-Wno-error=misleading-indentation"; + optionalString (hasPrefix "gcc-6" stdenv.cc.cc.name) "-Wno-error=misleading-indentation"; meta = { description = "Google's data interchange format"; diff --git a/pkgs/os-specific/linux/kernel/perf.nix b/pkgs/os-specific/linux/kernel/perf.nix index 0bfd8dfe700d..fa4ac3b513d8 100644 --- a/pkgs/os-specific/linux/kernel/perf.nix +++ b/pkgs/os-specific/linux/kernel/perf.nix @@ -34,7 +34,7 @@ stdenv.mkDerivation { "-Wno-error=cpp" "-Wno-error=bool-compare" "-Wno-error=deprecated-declarations" ] # gcc before 6 doesn't know these options - ++ stdenv.lib.optionals (hasPrefix "gcc-6" stdenv.cc.cc) [ + ++ stdenv.lib.optionals (hasPrefix "gcc-6" stdenv.cc.cc.name) [ "-Wno-error=unused-const-variable" "-Wno-error=misleading-indentation" ];