diff --git a/pkgs/development/libraries/qt-5/5.5/qtdeclarative/0001-nix-profiles-import-paths.patch b/pkgs/development/libraries/qt-5/5.5/qtdeclarative/0001-nix-profiles-import-paths.patch deleted file mode 100644 index 8e86f97a9477..000000000000 --- a/pkgs/development/libraries/qt-5/5.5/qtdeclarative/0001-nix-profiles-import-paths.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 3f6fa74067aacd0e595e45b4ef7ce754514cb205 Mon Sep 17 00:00:00 2001 -From: Thomas Tuegel -Date: Sat, 17 Oct 2015 09:28:18 -0500 -Subject: [PATCH] nix profiles import paths - ---- - src/qml/qml/qqmlimport.cpp | 14 ++++++++++++++ - 1 file changed, 14 insertions(+) - -diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp -index 5a54609..f33c2f9 100644 ---- a/src/qml/qml/qqmlimport.cpp -+++ b/src/qml/qml/qqmlimport.cpp -@@ -1549,6 +1549,20 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e) - QString installImportsPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath); - addImportPath(installImportsPath); - -+ // Add import 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/qml"); -+ QString canonicalPath = QDir(*it).canonicalPath(); -+ if (!canonicalPath.isEmpty()) { -+ addImportPath(canonicalPath); -+ } -+ } -+ } -+ - // env import paths - QByteArray envImportPath = qgetenv("QML2_IMPORT_PATH"); - if (!envImportPath.isEmpty()) { --- -2.5.2 - diff --git a/pkgs/development/libraries/qt-5/5.5/qtdeclarative/default.nix b/pkgs/development/libraries/qt-5/5.5/qtdeclarative/default.nix index 9181c37b2258..328d8aee72bd 100644 --- a/pkgs/development/libraries/qt-5/5.5/qtdeclarative/default.nix +++ b/pkgs/development/libraries/qt-5/5.5/qtdeclarative/default.nix @@ -1,8 +1,8 @@ -{ qtSubmodule, python, qtbase, qtsvg, qtxmlpatterns }: +{ qtSubmodule, lib, copyPathsToStore, python, qtbase, qtsvg, qtxmlpatterns }: qtSubmodule { name = "qtdeclarative"; - patches = [ ./0001-nix-profiles-import-paths.patch ]; + patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); qtInputs = [ qtbase qtsvg qtxmlpatterns ]; nativeBuildInputs = [ python ]; } diff --git a/pkgs/development/libraries/qt-5/5.5/qtdeclarative/nix-profiles-import-paths.patch b/pkgs/development/libraries/qt-5/5.5/qtdeclarative/nix-profiles-import-paths.patch new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/pkgs/development/libraries/qt-5/5.5/qtdeclarative/series b/pkgs/development/libraries/qt-5/5.5/qtdeclarative/series new file mode 100644 index 000000000000..7dbe197c56e0 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.5/qtdeclarative/series @@ -0,0 +1 @@ +nix-profiles-import-paths.patch