From f06f6955bdc4300f439d594edfcb1b51d517a72e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 9 Jun 2013 10:59:23 +0200 Subject: [PATCH] qt4: fix build via adding dependency in generated makefile Also reorder attributes into the order in which they are run. --- .../libraries/qt-4.x/4.8/default.nix | 33 ++++++++----------- 1 file changed, 14 insertions(+), 19 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 7f88418bb99..1ba02279754 100644 --- a/pkgs/development/libraries/qt-4.x/4.8/default.nix +++ b/pkgs/development/libraries/qt-4.x/4.8/default.nix @@ -23,7 +23,7 @@ let v = "4.8.4"; in # * move some plugins (e.g., SQL plugins) to dedicated derivations to avoid # false build-time dependencies -stdenv.mkDerivation ( rec { +stdenv.mkDerivation rec { name = "qt-${v}"; src = fetchurl { @@ -31,6 +31,12 @@ stdenv.mkDerivation ( rec { sha256 = "0w1j16q6glniv4hppdgcvw52w72gb2jab35ylkw0qjn5lj5y7c1k"; }; + prePatch = '' + substituteInPlace configure --replace /bin/pwd pwd + substituteInPlace src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls + sed -e 's@/\(usr\|opt\)/@/var/empty/@g' -i config.tests/*/*.test -i mkspecs/*/*.conf + ''; + patches = [ ./glib-2.32.patch (substituteAll { @@ -63,6 +69,7 @@ stdenv.mkDerivation ( rec { " ''; + prefixKey = "-prefix "; configureFlags = '' -v -no-separate-debug-info -release -no-fast -confirm-license -opensource @@ -83,6 +90,12 @@ stdenv.mkDerivation ( rec { ${if developerBuild then "-developer-build" else ""} ''; + # fix underspecified dependency in a generated makefile + postConfigure = '' + substituteInPlace tools/designer/src/lib/Makefile --replace \ + "moc_qtgradientviewdialog.cpp:" "moc_qtgradientviewdialog.cpp: .uic/release-shared/ui_qtgradientview.h" + ''; + propagatedBuildInputs = [ libXrender libXrandr libXinerama libXcursor libXext libXfixes libXv libXi libSM @@ -100,14 +113,6 @@ stdenv.mkDerivation ( rec { nativeBuildInputs = [ perl pkgconfig which ]; - prefixKey = "-prefix "; - - prePatch = '' - substituteInPlace configure --replace /bin/pwd pwd - substituteInPlace src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls - sed -e 's@/\(usr\|opt\)/@/var/empty/@g' -i config.tests/*/*.test -i mkspecs/*/*.conf - ''; - enableParallelBuilding = true; crossAttrs = let @@ -152,13 +157,3 @@ stdenv.mkDerivation ( rec { platforms = platforms.linux; }; } - # ToDo: this attribute is optional *only* to prevent rebuild on hydra - // stdenv.lib.optionalAttrs developerBuild { - # fix underspecified dependency in a generated makefile - postConfigure = '' - substituteInPlace tools/designer/src/lib/Makefile --replace \ - "moc_qtgradientviewdialog.cpp:" "moc_qtgradientviewdialog.cpp: .uic/release-shared/ui_qtgradientview.h" - ''; - } -) -