From a3855ef9aee3ffebc41ce1ed07e2aad176ad2808 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sat, 17 Oct 2015 09:23:37 -0500 Subject: [PATCH] qt55: set library paths from NIX_PROFILES --- .../5.5/qtbase/0001-dlopen-gtkstyle.patch | 6 +-- .../qt-5/5.5/qtbase/0002-dlopen-resolv.patch | 6 +-- .../qt-5/5.5/qtbase/0003-dlopen-gl.patch | 6 +-- .../qt-5/5.5/qtbase/0004-tzdir.patch | 6 +-- .../5.5/qtbase/0005-dlopen-libXcursor.patch | 6 +-- .../qt-5/5.5/qtbase/0006-dlopen-openssl.patch | 6 +-- .../qt-5/5.5/qtbase/0007-dlopen-dbus.patch | 6 +-- .../5.5/qtbase/0008-xdg-config-dirs.patch | 6 +-- .../5.5/qtbase/0009-decrypt-ssl-traffic.patch | 6 +-- .../qt-5/5.5/qtbase/0010-mkspecs-libgl.patch | 27 +++++++++++++ .../0011-nix-profiles-library-paths.patch | 38 +++++++++++++++++++ .../qt-5/5.5/qtbase/0014-mkspecs-libgl.patch | 17 --------- .../libraries/qt-5/5.5/qtbase/default.nix | 5 ++- 13 files changed, 95 insertions(+), 46 deletions(-) create mode 100644 pkgs/development/libraries/qt-5/5.5/qtbase/0010-mkspecs-libgl.patch create mode 100644 pkgs/development/libraries/qt-5/5.5/qtbase/0011-nix-profiles-library-paths.patch delete mode 100644 pkgs/development/libraries/qt-5/5.5/qtbase/0014-mkspecs-libgl.patch diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/0001-dlopen-gtkstyle.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/0001-dlopen-gtkstyle.patch index b86dfaf628b3..a4211378b904 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/0001-dlopen-gtkstyle.patch +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/0001-dlopen-gtkstyle.patch @@ -1,7 +1,7 @@ -From d3224286c647f1d1e7dac485bbeee5bc8286e6c6 Mon Sep 17 00:00:00 2001 +From 5334f7d5d3e7be31ea25c3553dfb60f283a14669 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Mon, 1 Dec 2014 17:21:58 -0600 -Subject: [PATCH 1/9] dlopen-gtkstyle +Subject: [PATCH 01/11] dlopen-gtkstyle --- qtbase/src/widgets/styles/qgtk2painter.cpp | 2 +- @@ -59,5 +59,5 @@ index 0e119a1..ad6caa1 100644 return (QGtkStylePrivate::gconf_client_get_default !=0); } -- -2.5.0 +2.5.2 diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/0002-dlopen-resolv.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/0002-dlopen-resolv.patch index 90afce32dc13..ce768fec80c4 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/0002-dlopen-resolv.patch +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/0002-dlopen-resolv.patch @@ -1,7 +1,7 @@ -From af315c076c8626292075592fab1726fcd62c3169 Mon Sep 17 00:00:00 2001 +From 51ae02d8c9de1cb93bf22b2519efb119dd2e39d9 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Mon, 1 Dec 2014 17:22:55 -0600 -Subject: [PATCH 2/9] dlopen-resolv +Subject: [PATCH 02/11] dlopen-resolv --- qtbase/src/network/kernel/qdnslookup_unix.cpp | 2 +- @@ -35,5 +35,5 @@ index 90a6f76..758407a 100644 return; } -- -2.5.0 +2.5.2 diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/0003-dlopen-gl.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/0003-dlopen-gl.patch index a8a0bdf44106..0f8bd78aa320 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/0003-dlopen-gl.patch +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/0003-dlopen-gl.patch @@ -1,7 +1,7 @@ -From fc9f34b6e8a290615868e27bfcd31c355d11487c Mon Sep 17 00:00:00 2001 +From d1f7bf62e4bab26df5deea37f08cfdd278cca47c Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Mon, 1 Dec 2014 17:23:08 -0600 -Subject: [PATCH 3/9] dlopen-gl +Subject: [PATCH 03/11] dlopen-gl --- .../plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp | 2 +- @@ -21,5 +21,5 @@ index 5166372..bdeb69a 100644 } } -- -2.5.0 +2.5.2 diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/0004-tzdir.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/0004-tzdir.patch index a4e9cd986a24..c2564df4e1a1 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/0004-tzdir.patch +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/0004-tzdir.patch @@ -1,7 +1,7 @@ -From b1a0771652ddf91058f67fa92260a89c43f5c530 Mon Sep 17 00:00:00 2001 +From 26c73d6da84f1b4797421b9ddecef18d6ce588f0 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Mon, 1 Dec 2014 17:23:22 -0600 -Subject: [PATCH 4/9] tzdir +Subject: [PATCH 04/11] tzdir --- qtbase/src/corelib/tools/qtimezoneprivate_tz.cpp | 21 +++++++++++++++------ @@ -48,5 +48,5 @@ index 29f0e17..3878974 100644 } -- -2.5.0 +2.5.2 diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/0005-dlopen-libXcursor.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/0005-dlopen-libXcursor.patch index fe53e0e7c48b..61c9b9846f5a 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/0005-dlopen-libXcursor.patch +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/0005-dlopen-libXcursor.patch @@ -1,7 +1,7 @@ -From 5fbe717120864d490fa4d60bc7f7676ac19bd69d Mon Sep 17 00:00:00 2001 +From 9fbdfd6c1231ee4778acc9a2edf297cf4b9314ac Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Mon, 1 Dec 2014 17:33:51 -0600 -Subject: [PATCH 5/9] dlopen-libXcursor +Subject: [PATCH 05/11] dlopen-libXcursor --- qtbase/src/plugins/platforms/xcb/qxcbcursor.cpp | 4 ++-- @@ -25,5 +25,5 @@ index e51ab85..7ec4b0b 100644 } if (xcursorFound) { -- -2.5.0 +2.5.2 diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/0006-dlopen-openssl.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/0006-dlopen-openssl.patch index 718ff08ca43f..ad48133d93f7 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/0006-dlopen-openssl.patch +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/0006-dlopen-openssl.patch @@ -1,7 +1,7 @@ -From 4c4b1f2a35644014da79d089d3860e518fa9a27d Mon Sep 17 00:00:00 2001 +From 2d7e4e21291238e2b41d0e173f918cd3530c8ade Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sun, 23 Aug 2015 08:52:04 -0500 -Subject: [PATCH 6/9] dlopen openssl +Subject: [PATCH 06/11] dlopen openssl --- qtbase/src/network/ssl/qsslsocket_openssl_symbols.cpp | 8 ++++---- @@ -34,5 +34,5 @@ index e2700df..a7ccf88 100644 // libssl.so.0 and libcrypto.so.0 found return pair; -- -2.5.0 +2.5.2 diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/0007-dlopen-dbus.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/0007-dlopen-dbus.patch index 96d268c358bd..dcd5855e824e 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/0007-dlopen-dbus.patch +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/0007-dlopen-dbus.patch @@ -1,7 +1,7 @@ -From a23141d76cdde068ba1cefdad4a6352c921ce7c9 Mon Sep 17 00:00:00 2001 +From d060d32d8df3e320a12567ebdfc2c1d01c648168 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sun, 23 Aug 2015 08:52:27 -0500 -Subject: [PATCH 7/9] dlopen dbus +Subject: [PATCH 07/11] dlopen dbus --- qtbase/src/dbus/qdbus_symbols.cpp | 2 +- @@ -21,5 +21,5 @@ index b82d92b..f72c9cb 100644 lib->unload(); -- -2.5.0 +2.5.2 diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/0008-xdg-config-dirs.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/0008-xdg-config-dirs.patch index 4d23d640df00..ebb572081bf1 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/0008-xdg-config-dirs.patch +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/0008-xdg-config-dirs.patch @@ -1,7 +1,7 @@ -From a7dc6209542ef8aa54191c0e17fbb9b41cbad67f Mon Sep 17 00:00:00 2001 +From 253c0829d4bc30da0152a22114a949449796ec7d Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sun, 23 Aug 2015 08:52:57 -0500 -Subject: [PATCH 8/9] xdg config dirs +Subject: [PATCH 08/11] xdg config dirs --- qtbase/src/corelib/io/qsettings.cpp | 18 ++++++++++++++++++ @@ -51,5 +51,5 @@ index 93d63fd..160b197 100644 SandboxConfFile = 0, NumConfFiles = 1 -- -2.5.0 +2.5.2 diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/0009-decrypt-ssl-traffic.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/0009-decrypt-ssl-traffic.patch index 8c8ec6974585..1d7202924cd3 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/0009-decrypt-ssl-traffic.patch +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/0009-decrypt-ssl-traffic.patch @@ -1,7 +1,7 @@ -From 64bc88615a4cb58d461fe600b46611415d74b7b2 Mon Sep 17 00:00:00 2001 +From 44378743aa6ca21eb61de93476daa8356081c0fc Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Sun, 23 Aug 2015 08:53:42 -0500 -Subject: [PATCH 9/9] decrypt ssl traffic +Subject: [PATCH 09/11] decrypt ssl traffic --- qtbase/src/network/ssl/qsslsocket_openssl.cpp | 2 +- @@ -21,5 +21,5 @@ index 049666b..e8342ab 100644 #include "qssl_p.h" #include "qsslsocket_openssl_p.h" -- -2.5.0 +2.5.2 diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/0010-mkspecs-libgl.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/0010-mkspecs-libgl.patch new file mode 100644 index 000000000000..0f418e600f15 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/0010-mkspecs-libgl.patch @@ -0,0 +1,27 @@ +From 5113406661f06afa01da48ebc0567a4d0f69051c Mon Sep 17 00:00:00 2001 +From: Thomas Tuegel +Date: Sat, 17 Oct 2015 09:12:46 -0500 +Subject: [PATCH 10/11] mkspecs libgl + +--- + qtbase/mkspecs/common/linux.conf | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/qtbase/mkspecs/common/linux.conf b/qtbase/mkspecs/common/linux.conf +index 8d6fb6f..0ff9181 100644 +--- a/qtbase/mkspecs/common/linux.conf ++++ b/qtbase/mkspecs/common/linux.conf +@@ -12,8 +12,8 @@ QMAKE_INCDIR = + QMAKE_LIBDIR = + QMAKE_INCDIR_X11 = + QMAKE_LIBDIR_X11 = +-QMAKE_INCDIR_OPENGL = +-QMAKE_LIBDIR_OPENGL = ++QMAKE_INCDIR_OPENGL = @mesa@/include ++QMAKE_LIBDIR_OPENGL = @mesa@/lib + QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL + QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL + QMAKE_INCDIR_EGL = +-- +2.5.2 + diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/0011-nix-profiles-library-paths.patch b/pkgs/development/libraries/qt-5/5.5/qtbase/0011-nix-profiles-library-paths.patch new file mode 100644 index 000000000000..8eaf2f4ffac5 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/0011-nix-profiles-library-paths.patch @@ -0,0 +1,38 @@ +From 2da5e660c4b470444e756f2ec88cb520a124bc99 Mon Sep 17 00:00:00 2001 +From: Thomas Tuegel +Date: Sat, 17 Oct 2015 09:20:35 -0500 +Subject: [PATCH] nix profiles library paths + +--- + qtbase/src/corelib/kernel/qcoreapplication.cpp | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/qtbase/src/corelib/kernel/qcoreapplication.cpp b/qtbase/src/corelib/kernel/qcoreapplication.cpp +index ecafe91..96e3eb5 100644 +--- a/qtbase/src/corelib/kernel/qcoreapplication.cpp ++++ b/qtbase/src/corelib/kernel/qcoreapplication.cpp +@@ -2496,6 +2496,21 @@ QStringList QCoreApplication::libraryPaths() + } + } + } ++ ++ // Add library paths derived from NIX_PROFILES. ++ const QByteArray nixProfilesEnv = qgetenv("NIX_PROFILES"); ++ if (!nixProfilesEnv.isEmpty()) { ++ QLatin1Char pathSep(' '); ++ QStringList paths = QFile::decodeName(nixProfilesEnv).split(pathSep, QString::SkipEmptyParts); ++ for (QStringList::iterator it = paths.begin(); it != paths.end(); ++it) { ++ it->append("/lib/qt5/plugins"); ++ QString canonicalPath = QDir(*it).canonicalPath(); ++ if (!canonicalPath.isEmpty() ++ && !app_libpaths->contains(canonicalPath)) { ++ app_libpaths->append(canonicalPath); ++ } ++ } ++ } + } + return *(coreappdata()->app_libpaths); + } +-- +2.5.2 + 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 deleted file mode 100644 index 1fc4bbd60765..000000000000 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/0014-mkspecs-libgl.patch +++ /dev/null @@ -1,17 +0,0 @@ -Ensure Qt knows where libGL is. - -Author: Bjørn Forsman -diff -uNr qt-everywhere-opensource-src-5.3.2.orig/qtbase/mkspecs/common/linux.conf qt-everywhere-opensource-src-5.3.2/qtbase/mkspecs/common/linux.conf ---- qt-everywhere-opensource-src-5.3.2.orig/qtbase/mkspecs/common/linux.conf 2014-09-11 12:48:07.000000000 +0200 -+++ qt-everywhere-opensource-src-5.3.2/qtbase/mkspecs/common/linux.conf 2015-08-23 13:03:30.617473019 +0200 -@@ -12,8 +12,8 @@ - QMAKE_LIBDIR = - QMAKE_INCDIR_X11 = - QMAKE_LIBDIR_X11 = --QMAKE_INCDIR_OPENGL = --QMAKE_LIBDIR_OPENGL = -+QMAKE_INCDIR_OPENGL = @mesa@/include -+QMAKE_LIBDIR_OPENGL = @mesa@/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..7c48c4571d92 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix +++ b/pkgs/development/libraries/qt-5/5.5/qtbase/default.nix @@ -84,12 +84,13 @@ stdenv.mkDerivation { xdg-config-dirs = ./0008-xdg-config-dirs.patch; decrypt-ssl-traffic = ./0009-decrypt-ssl-traffic.patch; mkspecs-libgl = substituteAll { - src = ./0014-mkspecs-libgl.patch; + src = ./0010-mkspecs-libgl.patch; inherit mesa; }; + nix-profiles-library-paths = ./0011-nix-profiles-library-paths.patch; in [ dlopen-resolv dlopen-gl tzdir dlopen-libXcursor dlopen-openssl - dlopen-dbus xdg-config-dirs + dlopen-dbus xdg-config-dirs nix-profiles-library-paths ] ++ optional gtkStyle dlopen-gtkstyle ++ optional decryptSslTraffic decrypt-ssl-traffic