From 956c266fb7ec02c142933da668d3d8e24ba905cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 20 Aug 2017 10:30:34 +0200 Subject: [PATCH 1/6] gcc49: remove Darwin patch that's included in 4.9 --- pkgs/development/compilers/gcc/4.9/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index 1380d36725a1..e45ee0bcc6a7 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -72,8 +72,7 @@ let version = "4.9.4"; # target libraries and tools. ++ optional langAda ../gnat-cflags.patch ++ optional langFortran ../gfortran-driving.patch - # The NXConstStr.patch can be removed at 4.9.4 - ++ optional hostPlatform.isDarwin ../gfortran-darwin-NXConstStr.patch; + ; javaEcj = fetchurl { # The `$(top_srcdir)/ecj.jar' file is automatically picked up at From dbc9f3b10df818b6277c8343cf6099e28ff1c563 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 20 Aug 2017 10:40:51 +0200 Subject: [PATCH 2/6] fftw: fix on Darwin (hopefully) It won't produce the $info output. --- pkgs/development/libraries/fftw/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/fftw/default.nix b/pkgs/development/libraries/fftw/default.nix index d4d8c7f8aee2..5cf83752aa70 100644 --- a/pkgs/development/libraries/fftw/default.nix +++ b/pkgs/development/libraries/fftw/default.nix @@ -4,7 +4,10 @@ with lib; assert elem precision [ "single" "double" "long-double" "quad-precision" ]; -let version = "3.3.6-pl1"; in +let + version = "3.3.6-pl1"; + withDoc = stdenv.cc.isGNU; +in stdenv.mkDerivation rec { name = "fftw-${precision}-${version}"; @@ -14,7 +17,8 @@ stdenv.mkDerivation rec { sha256 = "0g8qk98lgq770ixdf7n36yd5xjsgm2v3wzvnphwmhy6r4y2amx0y"; }; - outputs = [ "out" "dev" "man" "info" ]; # it's dev-doc only + outputs = [ "out" "dev" "man" ] + ++ optional withDoc "info"; # it's dev-doc only outputBin = "dev"; # fftw-wisdom configureFlags = @@ -27,7 +31,7 @@ stdenv.mkDerivation rec { ++ optional (stdenv.isx86_64 && (precision == "single" || precision == "double") ) "--enable-sse2" ++ optional stdenv.cc.isGNU "--enable-openmp" # doc generation causes Fortran wrapper generation which hard-codes gcc - ++ optional (!stdenv.cc.isGNU) "--disable-doc"; + ++ optional (!withDoc) "--disable-doc"; enableParallelBuilding = true; From 1919bb504360272242a6856b995df8d291adcecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 20 Aug 2017 10:52:30 +0200 Subject: [PATCH 3/6] gnome3.caribou: fixup build after automake update #28232 /cc gnome update #28053. --- pkgs/desktops/gnome-3/3.22/core/caribou/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/desktops/gnome-3/3.22/core/caribou/default.nix b/pkgs/desktops/gnome-3/3.22/core/caribou/default.nix index d63b6e86af3b..2d71f1da5925 100644 --- a/pkgs/desktops/gnome-3/3.22/core/caribou/default.nix +++ b/pkgs/desktops/gnome-3/3.22/core/caribou/default.nix @@ -1,5 +1,5 @@ -{ fetchurl, stdenv, pkgconfig, gnome3, clutter, dbus, pythonPackages, libxml2, autoconf -, libxklavier, libXtst, gtk2, intltool, libxslt, at_spi2_core, automake }: +{ fetchurl, stdenv, pkgconfig, gnome3, clutter, dbus, pythonPackages, libxml2 +, libxklavier, libXtst, gtk2, intltool, libxslt, at_spi2_core, autoreconfHook }: let majorVersion = "0.4"; @@ -12,13 +12,14 @@ stdenv.mkDerivation rec { sha256 = "0mfychh1q3dx0b96pjz9a9y112bm9yqyim40yykzxx1hppsdjhww"; }; + nativeBuildInputs = [ pkgconfig autoreconfHook ]; buildInputs = with gnome3; - [ glib pkgconfig gtk clutter at_spi2_core dbus pythonPackages.python automake - pythonPackages.pygobject3 libxml2 libXtst gtk2 intltool libxslt autoconf ]; + [ glib gtk clutter at_spi2_core dbus pythonPackages.python + pythonPackages.pygobject3 libxml2 libXtst gtk2 intltool libxslt ]; propagatedBuildInputs = [ gnome3.libgee libxklavier ]; - preBuild = '' + postPatch = '' patchShebangs . substituteInPlace libcaribou/Makefile.am --replace "--shared-library=libcaribou.so.0" "--shared-library=$out/lib/libcaribou.so.0" ''; From beaad855004c60ba00989dbc5525b7d28933e1cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 20 Aug 2017 11:11:44 +0200 Subject: [PATCH 4/6] gcc-4.8: fix build Problems: building with gcc-6 now, and fallout after output changes #27424. --- pkgs/development/compilers/gcc/4.8/default.nix | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index ee7ddccced77..7a41ba38e519 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, noSysDirs +{ stdenv, fetchurl, fetchpatch, noSysDirs , langC ? true, langCC ? true, langFortran ? false , langObjC ? targetPlatform.isDarwin , langObjCpp ? targetPlatform.isDarwin @@ -71,7 +71,14 @@ let version = "4.8.5"; # target libraries and tools. ++ optional langAda ../gnat-cflags.patch ++ optional langFortran ../gfortran-driving.patch - ++ optional hostPlatform.isDarwin ../gfortran-darwin-NXConstStr.patch; + ++ optional hostPlatform.isDarwin ../gfortran-darwin-NXConstStr.patch + ++ [(fetchpatch { + name = "libc_name_p.diff"; # needed to build with gcc6 + url = "https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=ec1cc0263f1"; + sha256 = "01jd7pdarh54ki498g6sz64ijl9a1l5f9v8q2696aaxalvh2vwzl"; + excludes = [ "gcc/cp/ChangeLog" ]; + })] + ; javaEcj = fetchurl { # The `$(top_srcdir)/ecj.jar' file is automatically picked up at @@ -218,7 +225,7 @@ stdenv.mkDerivation ({ hardeningDisable = [ "format" ]; - outputs = [ "out" "lib" "doc" ]; + outputs = [ "out" "lib" "man" "info" ]; setOutputFlags = false; NIX_NO_SELF_RPATH = true; From 785ceea7bade1d7868e203a0f5eb392fe9b4def7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 20 Aug 2017 11:49:26 +0200 Subject: [PATCH 5/6] libreoffice: fixup by building with gcc-5 I was lazy to try to find another solution. /cc maintainers: @7c6f434c, @viric. --- pkgs/top-level/all-packages.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7fb6382241aa..191aace1968a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14961,6 +14961,8 @@ with pkgs; harfbuzz = harfbuzz.override { withIcu = true; withGraphite2 = true; }; + # checking whether g++ supports C++14 or C++11... configure: error: no + stdenv = overrideCC stdenv gcc5; }); libreoffice-still = lowPrio (callPackage ../applications/office/libreoffice/still.nix { @@ -14980,6 +14982,8 @@ with pkgs; harfbuzz = harfbuzz.override { withIcu = true; withGraphite2 = true; }; + # checking whether g++ supports C++14 or C++11... configure: error: no + stdenv = overrideCC stdenv gcc5; }); From d2e9836aa66378ec846d8d317e21a70709ba93d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 20 Aug 2017 12:04:36 +0200 Subject: [PATCH 6/6] apt: fixup by building with gcc-5 I was lazy to try to find another solution. --- pkgs/top-level/all-packages.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 191aace1968a..73c2ffce5277 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -539,6 +539,8 @@ with pkgs; apt = callPackage ../tools/package-management/apt { inherit (perlPackages) Po4a; + # include/c++/6.4.0/cstdlib:75:25: fatal error: stdlib.h: No such file or directory + stdenv = overrideCC stdenv gcc5; }; autorevision = callPackage ../tools/misc/autorevision { };