grantlee: search profile library paths for plugins
This commit is contained in:
parent
d5468a51fb
commit
7182709174
@ -1,4 +1,4 @@
|
||||
{ stdenv, fetchurl, qtbase, qtscript, cmake }:
|
||||
{ stdenv, lib, copyPathsToStore, fetchurl, qtbase, qtscript, cmake }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "grantlee-${version}";
|
||||
@ -10,10 +10,12 @@ stdenv.mkDerivation rec {
|
||||
name = "${name}.tar.gz";
|
||||
};
|
||||
|
||||
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
|
||||
|
||||
buildInputs = [ qtbase qtscript ];
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
description = "Qt5 port of Django template system";
|
||||
longDescription = ''
|
||||
Grantlee is a plugin based String Template system written using the Qt
|
||||
@ -25,7 +27,7 @@ stdenv.mkDerivation rec {
|
||||
and the design of Django is reused in Grantlee.'';
|
||||
|
||||
homepage = http://gitorious.org/grantlee;
|
||||
maintainers = [ ];
|
||||
maintainers = [ maintainers.ttuegel ];
|
||||
inherit (qtbase.meta) platforms;
|
||||
};
|
||||
}
|
@ -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()
|
1
pkgs/development/libraries/grantlee/5/series
Normal file
1
pkgs/development/libraries/grantlee/5/series
Normal file
@ -0,0 +1 @@
|
||||
grantlee-nix-profiles.patch
|
@ -9979,7 +9979,7 @@ with pkgs;
|
||||
|
||||
qgpgme = callPackage ../development/libraries/gpgme { };
|
||||
|
||||
grantlee = callPackage ../development/libraries/grantlee/5.x.nix { };
|
||||
grantlee = callPackage ../development/libraries/grantlee/5 { };
|
||||
|
||||
inherit (callPackage ../development/libraries/kirigami { })
|
||||
kirigami_1
|
||||
|
Loading…
Reference in New Issue
Block a user