diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/grantlee/5/grantlee-nix-profiles.patch')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/grantlee/5/grantlee-nix-profiles.patch | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/grantlee/5/grantlee-nix-profiles.patch b/nixpkgs/pkgs/development/libraries/grantlee/5/grantlee-nix-profiles.patch new file mode 100644 index 000000000000..f6c13dbd6d55 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/grantlee/5/grantlee-nix-profiles.patch @@ -0,0 +1,19 @@ +Index: grantlee-5.1.0/templates/lib/engine.cpp +=================================================================== +--- grantlee-5.1.0.orig/templates/lib/engine.cpp ++++ grantlee-5.1.0/templates/lib/engine.cpp +@@ -48,6 +48,14 @@ Engine::Engine(QObject *parent) + + d_ptr->m_pluginDirs = QCoreApplication::instance()->libraryPaths(); + d_ptr->m_pluginDirs << QString::fromLocal8Bit(GRANTLEE_PLUGIN_PATH); ++ ++ // Add library paths derived from NIX_PROFILES. ++ const QByteArrayList profiles = qgetenv("NIX_PROFILES").split(' '); ++ for (const QByteArray &profile: profiles) { ++ if (!profile.isEmpty()) { ++ d_ptr->m_pluginDirs << (QFile::decodeName(profile) + QStringLiteral("/lib")); ++ } ++ } + } + + Engine::~Engine() |