From 6448c94e5789a108dc9e9c5f6e5d67669dcf27c3 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Sat, 26 Mar 2016 14:56:06 +0100 Subject: [PATCH 1/6] leocad: work around cmath problem introduced by recent glibc https://hydra.nixos.org/build/33610365/nixlog/1/raw --- pkgs/applications/graphics/leocad/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/graphics/leocad/default.nix b/pkgs/applications/graphics/leocad/default.nix index eaaf047c9bb3..9ca9c5921028 100644 --- a/pkgs/applications/graphics/leocad/default.nix +++ b/pkgs/applications/graphics/leocad/default.nix @@ -16,8 +16,11 @@ stdenv.mkDerivation rec { buildInputs = [ qt4 zlib ]; - prefixKey="INSTALL_PREFIX="; + prefixKey = "INSTALL_PREFIX="; configureScript = "qmake leocad.pro"; + postPatch = '' + substituteInPlace common/camera.cpp --replace "isnan(" "std::isnan(" + ''; meta = with stdenv.lib; { description = "CAD program for creating virtual LEGO models"; From a4ed0524076c620aa6fc8224ef08360ab72c2ee4 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Sat, 26 Mar 2016 15:46:28 +0100 Subject: [PATCH 2/6] zoom: fix gcc5 build https://hydra.nixos.org/build/33122239/nixlog/1/raw --- pkgs/games/zoom/default.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/games/zoom/default.nix b/pkgs/games/zoom/default.nix index 200b9c24c7db..d6e79289525d 100644 --- a/pkgs/games/zoom/default.nix +++ b/pkgs/games/zoom/default.nix @@ -2,21 +2,26 @@ # !!! assert freetype == xorg.freetype -stdenv.mkDerivation { +stdenv.mkDerivation rec { name = "zoom-1.1.5"; src = fetchurl { - url = http://www.logicalshift.co.uk/unix/zoom/zoom-1.1.5.tar.gz; + url = "http://www.logicalshift.co.uk/unix/zoom/${name}.tar.gz"; sha256 = "1g6van7f7sg3zfcz80mncnnbccyg2hnm0hq4x558vpsm0lf7z5pj"; }; buildInputs = [ perl expat xlibsWrapper freetype ]; - # Zoom doesn't add the right directory in the include path. - CFLAGS = [ "-I" (freetype + "/include/freetype2") ]; + NIX_CFLAGS_COMPILE = [ + # Zoom doesn't add the right directory in the include path. + "-I" (freetype + "/include/freetype2") + + # for gcc5; c11 inline semantics breaks the build + "-fgnu89-inline" + ]; meta = with stdenv.lib; { - description = "Player for Z-Code, TADS and HUGO stories or games, usually text adventures ('interactive fiction')"; + description = "Player for Z-Code, TADS and HUGO stories or games"; longDescription = '' Zoom is a player for Z-Code, TADS and HUGO stories or games. These are usually text adventures ('interactive fiction'), and were first created From 0b060bdf68d41210d99593fe80f7148c0446244f Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Sat, 26 Mar 2016 15:49:28 +0100 Subject: [PATCH 3/6] yad: fix gcc5 build https://hydra.nixos.org/build/33612450/nixlog/1/raw --- pkgs/tools/misc/yad/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/tools/misc/yad/default.nix b/pkgs/tools/misc/yad/default.nix index d884d48f5214..d874d9b4b146 100644 --- a/pkgs/tools/misc/yad/default.nix +++ b/pkgs/tools/misc/yad/default.nix @@ -13,6 +13,9 @@ stdenv.mkDerivation rec { "--enable-icon-browser" ]; + # for gcc5: c11 inline semantics breaks the build + NIX_CFLAGS_COMPILE = "-fgnu89-inline"; + buildInputs = [ gtk2 ]; nativeBuildInputs = [ pkgconfig intltool ]; From cb896a1e7f64697639a9cbfa05f9d05232573454 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Sat, 26 Mar 2016 15:54:07 +0100 Subject: [PATCH 4/6] yad: ad-hoc patching to fix undefined reference errors --- pkgs/tools/misc/yad/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/tools/misc/yad/default.nix b/pkgs/tools/misc/yad/default.nix index d874d9b4b146..2c8660a49139 100644 --- a/pkgs/tools/misc/yad/default.nix +++ b/pkgs/tools/misc/yad/default.nix @@ -20,6 +20,11 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkgconfig intltool ]; + postPatch = '' + sed -i src/file.c -e '21i#include ' + sed -i src/form.c -e '21i#include ' + ''; + preFixup = "rm $out/share/icons/hicolor/icon-theme.cache"; meta = { From 29c3314fe4d547f5f21e228a26d41e6aa1db45a4 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Sat, 26 Mar 2016 16:14:38 +0100 Subject: [PATCH 5/6] hugin: add missing dependencies https://hydra.nixos.org/build/33609995/nixlog/2/raw --- pkgs/applications/graphics/hugin/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/graphics/hugin/default.nix b/pkgs/applications/graphics/hugin/default.nix index 97181cb0d1bf..338b3cf0f97e 100644 --- a/pkgs/applications/graphics/hugin/default.nix +++ b/pkgs/applications/graphics/hugin/default.nix @@ -1,6 +1,6 @@ { stdenv, cmake, fetchurl, gnumake, pkgconfig, makeWrapper , boost, gettext, tclap, wxGTK -, freeglut, glew, libXi, libXmu, mesa +, freeglut, glew, libX11, libXi, libXmu, mesa, cairo , autopanosiftc, enblend-enfuse, exiv2, fftw, ilmbase, lensfun, libpng, libtiff , openexr, panotools, perlPackages, sqlite, vigra }: @@ -16,7 +16,7 @@ stdenv.mkDerivation rec { NIX_CFLAGS_COMPILE = "-I${ilmbase}/include/OpenEXR"; buildInputs = [ boost gettext tclap wxGTK - freeglut glew libXi libXmu mesa + freeglut glew libX11 libXi libXmu mesa cairo exiv2 fftw ilmbase lensfun libtiff libpng openexr panotools sqlite vigra perlPackages.ImageExifTool makeWrapper From c13ddd14bda4905bb9eebff5ab30c10516869baf Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Sat, 26 Mar 2016 16:47:46 +0100 Subject: [PATCH 6/6] udftools: fix gcc5 build -fgnu89-inline was insufficient, revert to -std=gnu90 See https://hydra.nixos.org/build/33103604/nixlog/1/raw Also fix various undefined reference errors by ad-hoc patching --- pkgs/tools/filesystems/udftools/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/tools/filesystems/udftools/default.nix b/pkgs/tools/filesystems/udftools/default.nix index 329950f8969b..7cb924c6cf13 100644 --- a/pkgs/tools/filesystems/udftools/default.nix +++ b/pkgs/tools/filesystems/udftools/default.nix @@ -10,9 +10,15 @@ stdenv.mkDerivation rec { buildInputs = [ ncurses readline ]; + NIX_CFLAGS_COMPILE = "-std=gnu90"; + preConfigure = '' sed -e '1i#include ' -i cdrwtool/cdrwtool.c -i pktsetup/pktsetup.c sed -e 's@[(]char[*][)]spm [+]=@spm = ((char*) spm) + @' -i wrudf/wrudf.c + sed -e '27i#include ' -i include/udf_endian.h + sed -e '38i#include ' -i wrudf/wrudf-cdrw.c + sed -e '12i#include ' -i wrudf/wrudf-cdr.c + sed -e '37i#include ' -i wrudf/ide-pc.c ''; meta = with stdenv.lib; {