diff --git a/pkgs/development/libraries/qt-5/5.4/0008-dlopen-webkit-udev.patch b/pkgs/development/libraries/qt-5/5.4/0008-dlopen-webkit-udev.patch index e8a4ba6a2151..fd226708a916 100644 --- a/pkgs/development/libraries/qt-5/5.4/0008-dlopen-webkit-udev.patch +++ b/pkgs/development/libraries/qt-5/5.4/0008-dlopen-webkit-udev.patch @@ -16,13 +16,13 @@ index 60ff317..da8ac69 100644 { m_libUdev.setLoadHints(QLibrary::ResolveAllSymbolsHint); - m_libUdev.setFileNameAndVersion(QStringLiteral("udev"), 1); -+ m_libUdev.setFileNameAndVersion(QStringLiteral("@udev@/lib/libudev"), 1); ++ m_libUdev.setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 1); m_loaded = m_libUdev.load(); if (resolveMethods()) return true; - m_libUdev.setFileNameAndVersion(QStringLiteral("udev"), 0); -+ m_libUdev.setFileNameAndVersion(QStringLiteral("@udev@/lib/libudev"), 0); ++ m_libUdev.setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 0); m_loaded = m_libUdev.load(); return resolveMethods(); } diff --git a/pkgs/development/libraries/qt-5/5.4/0009-dlopen-serialport-udev.patch b/pkgs/development/libraries/qt-5/5.4/0009-dlopen-serialport-udev.patch index e1e66a3ce95a..bb304392af4c 100644 --- a/pkgs/development/libraries/qt-5/5.4/0009-dlopen-serialport-udev.patch +++ b/pkgs/development/libraries/qt-5/5.4/0009-dlopen-serialport-udev.patch @@ -16,10 +16,10 @@ index 09940ab..45460f9 100644 { if (!udevLibrary->isLoaded()) { - udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 1); -+ udevLibrary->setFileNameAndVersion(QStringLiteral("@udev@/lib/libudev"), 1); ++ udevLibrary->setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 1); if (!udevLibrary->load()) { - udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 0); -+ udevLibrary->setFileNameAndVersion(QStringLiteral("@udev@/lib/libudev"), 0); ++ udevLibrary->setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 0); if (!udevLibrary->load()) { qWarning("Failed to load the library: %s, supported version(s): %i and %i", qPrintable(udevLibrary->fileName()), 1, 0); return false; diff --git a/pkgs/development/libraries/qt-5/5.4/0014-mkspecs-libgl.patch b/pkgs/development/libraries/qt-5/5.4/0014-mkspecs-libgl.patch index 1fc4bbd60765..4ec1947f6f95 100644 --- a/pkgs/development/libraries/qt-5/5.4/0014-mkspecs-libgl.patch +++ b/pkgs/development/libraries/qt-5/5.4/0014-mkspecs-libgl.patch @@ -10,8 +10,8 @@ diff -uNr qt-everywhere-opensource-src-5.3.2.orig/qtbase/mkspecs/common/linux.co QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = -+QMAKE_INCDIR_OPENGL = @mesa@/include -+QMAKE_LIBDIR_OPENGL = @mesa@/lib ++QMAKE_INCDIR_OPENGL = @mesa_inc@/include ++QMAKE_LIBDIR_OPENGL = @mesa_lib@/lib QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL QMAKE_INCDIR_EGL = diff --git a/pkgs/development/libraries/qt-5/5.4/default.nix b/pkgs/development/libraries/qt-5/5.4/default.nix index 136c352d1aa5..5807e6858723 100644 --- a/pkgs/development/libraries/qt-5/5.4/default.nix +++ b/pkgs/development/libraries/qt-5/5.4/default.nix @@ -15,6 +15,7 @@ , bison2 , mesa_noglu +, libudev , cups , gnome @@ -214,13 +215,18 @@ let serialport = callPackage ( - { qtSubmodule, base }: + { qtSubmodule, base, substituteAll }: qtSubmodule { name = "qtserialport"; qtInputs = [ base ]; patchFlags = "-p2"; # patches originally for monolithic build - patches = [ ./0009-dlopen-serialport-udev.patch ]; + patches = [ + (substituteAll { + src = ./0009-dlopen-serialport-udev.patch; + libudev = libudev.out; + }) + ]; } ) {}; @@ -268,7 +274,7 @@ let ( { qtSubmodule, declarative, location, multimedia, sensors , fontconfig, gdk_pixbuf, gtk, libwebp, libxml2, libxslt - , sqlite, udev + , sqlite, libudev , bison2, flex, gdb, gperf, perl, pkgconfig, python, ruby , substituteAll , flashplayerFix ? false @@ -287,21 +293,22 @@ let (substituteAll { src = ./0002-dlopen-webkit-nsplugin.patch; - inherit gtk gdk_pixbuf; + gtk = gtk.out; + gdk_pixbuf = gdk_pixbuf.out; } ) ++ optional flashplayerFix (substituteAll { src = ./0007-dlopen-webkit-gtk.patch; - inherit gtk; + gtk = gtk.out; } ) ++ [ (substituteAll { src = ./0008-dlopen-webkit-udev.patch; - inherit udev; + libudev = libudev.out; } ) ]; diff --git a/pkgs/development/libraries/qt-5/5.4/qtbase.nix b/pkgs/development/libraries/qt-5/5.4/qtbase.nix index 30d53eb874be..c333298e4583 100644 --- a/pkgs/development/libraries/qt-5/5.4/qtbase.nix +++ b/pkgs/development/libraries/qt-5/5.4/qtbase.nix @@ -44,8 +44,8 @@ stdenv.mkDerivation { substituteInPlace qtbase/configure --replace /bin/pwd pwd substituteInPlace qtbase/src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls substituteInPlace qtbase/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp \ - --replace /usr/share/X11/locale ${libX11}/share/X11/locale \ - --replace /usr/lib/X11/locale ${libX11}/share/X11/locale + --replace /usr/share/X11/locale ${libX11.out}/share/X11/locale \ + --replace /usr/lib/X11/locale ${libX11.out}/share/X11/locale sed -e 's@/\(usr\|opt\)/@/var/empty/@g' -i config.tests/*/*.test -i qtbase/mkspecs/*/*.conf ''; @@ -54,25 +54,27 @@ stdenv.mkDerivation { (substituteAll { src = ./0001-dlopen-gtkstyle.patch; # substituteAll ignores env vars starting with capital letter - gconf = GConf; - inherit gnome_vfs libgnomeui gtk; + gconf = GConf.out; + gtk = gtk.out; + libgnomeui = libgnomeui.out; + gnome_vfs = gnome_vfs.out; }) ++ [ (substituteAll { src = ./0004-dlopen-resolv.patch; - glibc = stdenv.cc.libc; + glibc = stdenv.cc.libc.out; }) (substituteAll { src = ./0005-dlopen-gl.patch; openglDriver = if mesaSupported then mesa.driverLink else "/no-such-path"; }) ./0006-tzdir.patch - (substituteAll { src = ./0010-dlopen-libXcursor.patch; inherit libXcursor; }) - (substituteAll { src = ./0011-dlopen-openssl.patch; inherit openssl; }) - (substituteAll { src = ./0012-dlopen-dbus.patch; dbus_libs = dbus; }) + (substituteAll { src = ./0010-dlopen-libXcursor.patch; libXcursor = libXcursor.out; }) + (substituteAll { src = ./0011-dlopen-openssl.patch; openssl = openssl.out; }) + (substituteAll { src = ./0012-dlopen-dbus.patch; dbus_libs = dbus.libs.out; }) ./0013-xdg_config_dirs.patch ] ++ optional mesaSupported - (substituteAll { src = ./0014-mkspecs-libgl.patch; inherit mesa; }) + (substituteAll { src = ./0014-mkspecs-libgl.patch; mesa_inc = mesa.dev; mesa_lib = mesa.out; }) ++ (optional decryptSslTraffic ./0100-ssl.patch); preConfigure = '' diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/0014-mkspecs-libgl.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/0014-mkspecs-libgl.patch index 1fc4bbd60765..4ec1947f6f95 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/0014-mkspecs-libgl.patch +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/0014-mkspecs-libgl.patch @@ -10,8 +10,8 @@ diff -uNr qt-everywhere-opensource-src-5.3.2.orig/qtbase/mkspecs/common/linux.co QMAKE_LIBDIR_X11 = -QMAKE_INCDIR_OPENGL = -QMAKE_LIBDIR_OPENGL = -+QMAKE_INCDIR_OPENGL = @mesa@/include -+QMAKE_LIBDIR_OPENGL = @mesa@/lib ++QMAKE_INCDIR_OPENGL = @mesa_inc@/include ++QMAKE_LIBDIR_OPENGL = @mesa_lib@/lib QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL QMAKE_INCDIR_EGL = diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix b/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix index a80810353ad4..4137a83754ba 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix @@ -48,8 +48,8 @@ stdenv.mkDerivation { substituteInPlace qtbase/configure --replace /bin/pwd pwd substituteInPlace qtbase/src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls substituteInPlace qtbase/src/plugins/platforminputcontexts/compose/generator/qtablegenerator.cpp \ - --replace /usr/share/X11/locale ${libX11}/share/X11/locale \ - --replace /usr/lib/X11/locale ${libX11}/share/X11/locale + --replace /usr/share/X11/locale ${libX11.out}/share/X11/locale \ + --replace /usr/lib/X11/locale ${libX11.out}/share/X11/locale sed -e 's@/\(usr\|opt\)/@/var/empty/@g' -i config.tests/*/*.test -i qtbase/mkspecs/*/*.conf ''; @@ -57,12 +57,14 @@ stdenv.mkDerivation { let dlopen-gtkstyle = substituteAll { src = ./0001-dlopen-gtkstyle.patch; # substituteAll ignores env vars starting with capital letter - gconf = GConf; - inherit gnome_vfs libgnomeui gtk; + gconf = GConf.out; + gtk = gtk.out; + libgnomeui = libgnomeui.out; + gnome_vfs = gnome_vfs.out; }; dlopen-resolv = substituteAll { src = ./0002-dlopen-resolv.patch; - glibc = stdenv.cc.libc; + glibc = stdenv.cc.libc.out; }; dlopen-gl = substituteAll { src = ./0003-dlopen-gl.patch; @@ -71,21 +73,22 @@ stdenv.mkDerivation { tzdir = ./0004-tzdir.patch; dlopen-libXcursor = substituteAll { src = ./0005-dlopen-libXcursor.patch; - inherit libXcursor; + libXcursor = libXcursor.out; }; dlopen-openssl = substituteAll { src = ./0006-dlopen-openssl.patch; - inherit openssl; + openssl = openssl.out; }; dlopen-dbus = substituteAll { src = ./0007-dlopen-dbus.patch; - dbus_libs = dbus; + dbus_libs = dbus.libs.out; }; xdg-config-dirs = ./0008-xdg-config-dirs.patch; decrypt-ssl-traffic = ./0009-decrypt-ssl-traffic.patch; mkspecs-libgl = substituteAll { src = ./0014-mkspecs-libgl.patch; - inherit mesa; + mesa_inc = mesa.dev; + mesa_lib = mesa.out; }; in [ dlopen-resolv dlopen-gl tzdir dlopen-libXcursor dlopen-openssl diff --git a/pkgs/development/libraries/qt-5/5.5/qtserialport/0001-dlopen-serialport-udev.patch b/pkgs/development/libraries/qt-5/5.5/qtserialport/0001-dlopen-serialport-udev.patch index 6636cc9265a8..3a813dc80074 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtserialport/0001-dlopen-serialport-udev.patch +++ b/pkgs/development/libraries/qt-5/5.5/qtserialport/0001-dlopen-serialport-udev.patch @@ -16,10 +16,10 @@ index 6f2cabd..81b9849 100644 { if (!udevLibrary->isLoaded()) { - udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 1); -+ udevLibrary->setFileNameAndVersion(QStringLiteral("@udev@/lib/libudev"), 1); ++ udevLibrary->setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 1); if (!udevLibrary->load()) { - udevLibrary->setFileNameAndVersion(QStringLiteral("udev"), 0); -+ udevLibrary->setFileNameAndVersion(QStringLiteral("@udev@/lib/libudev"), 0); ++ udevLibrary->setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 0); if (!udevLibrary->load()) { qWarning("Failed to load the library: %s, supported version(s): %i and %i", qPrintable(udevLibrary->fileName()), 1, 0); return false; diff --git a/pkgs/development/libraries/qt-5/5.5/qtserialport/default.nix b/pkgs/development/libraries/qt-5/5.5/qtserialport/default.nix index fa7383fc1e76..32549c95344a 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtserialport/default.nix +++ b/pkgs/development/libraries/qt-5/5.5/qtserialport/default.nix @@ -1,7 +1,12 @@ -{ qtSubmodule, qtbase }: +{ qtSubmodule, qtbase, substituteAll, libudev }: qtSubmodule { name = "qtserialport"; qtInputs = [ qtbase ]; - patches = [ ./0001-dlopen-serialport-udev.patch ]; + patches = [ + (substituteAll { + src = ./0001-dlopen-serialport-udev.patch; + libudev = libudev.out; + }) + ]; } diff --git a/pkgs/development/libraries/qt-5/5.5/qtwebkit/0003-dlopen-webkit-udev.patch b/pkgs/development/libraries/qt-5/5.5/qtwebkit/0003-dlopen-webkit-udev.patch index f3b9d407bd72..1c360cd81aa2 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtwebkit/0003-dlopen-webkit-udev.patch +++ b/pkgs/development/libraries/qt-5/5.5/qtwebkit/0003-dlopen-webkit-udev.patch @@ -16,13 +16,13 @@ index 60ff317..da8ac69 100644 { m_libUdev.setLoadHints(QLibrary::ResolveAllSymbolsHint); - m_libUdev.setFileNameAndVersion(QStringLiteral("udev"), 1); -+ m_libUdev.setFileNameAndVersion(QStringLiteral("@udev@/lib/libudev"), 1); ++ m_libUdev.setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 1); m_loaded = m_libUdev.load(); if (resolveMethods()) return true; - m_libUdev.setFileNameAndVersion(QStringLiteral("udev"), 0); -+ m_libUdev.setFileNameAndVersion(QStringLiteral("@udev@/lib/libudev"), 0); ++ m_libUdev.setFileNameAndVersion(QStringLiteral("@libudev@/lib/libudev"), 0); m_loaded = m_libUdev.load(); return resolveMethods(); } diff --git a/pkgs/development/libraries/qt-5/5.5/qtwebkit/default.nix b/pkgs/development/libraries/qt-5/5.5/qtwebkit/default.nix index 596c02d39afb..2e92391f4c08 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtwebkit/default.nix +++ b/pkgs/development/libraries/qt-5/5.5/qtwebkit/default.nix @@ -1,6 +1,6 @@ { qtSubmodule, stdenv, qtdeclarative, qtlocation, qtmultimedia, qtsensors , fontconfig, gdk_pixbuf, gtk, libwebp, libxml2, libxslt -, sqlite, udev +, sqlite, libudev , bison2, flex, gdb, gperf, perl, pkgconfig, python, ruby , substituteAll , flashplayerFix ? false @@ -18,15 +18,16 @@ qtSubmodule { patches = let dlopen-webkit-nsplugin = substituteAll { src = ./0001-dlopen-webkit-nsplugin.patch; - inherit gtk gdk_pixbuf; + gtk = gtk.out; + gdk_pixbuf = gdk_pixbuf.out; }; dlopen-webkit-gtk = substituteAll { src = ./0002-dlopen-webkit-gtk.patch; - inherit gtk; + gtk = gtk.out; }; dlopen-webkit-udev = substituteAll { src = ./0003-dlopen-webkit-udev.patch; - inherit udev; + libudev = libudev.out; }; in optionals flashplayerFix [ dlopen-webkit-nsplugin dlopen-webkit-gtk ] ++ [ dlopen-webkit-udev ];