summary refs log tree commit diff
path: root/pkgs/development
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@gmail.com>2015-10-27 19:40:28 -0500
committerThomas Tuegel <ttuegel@gmail.com>2015-10-31 08:48:53 -0500
commit24babaad9ab3e157d1bbb97531536ab6741511de (patch)
treec94125991ea3310bb45421609743b9d82a2a79b4 /pkgs/development
parentbeaca8e3b7846d0f278101f05603847c12ca926d (diff)
downloadnixlib-24babaad9ab3e157d1bbb97531536ab6741511de.tar
nixlib-24babaad9ab3e157d1bbb97531536ab6741511de.tar.gz
nixlib-24babaad9ab3e157d1bbb97531536ab6741511de.tar.bz2
nixlib-24babaad9ab3e157d1bbb97531536ab6741511de.tar.lz
nixlib-24babaad9ab3e157d1bbb97531536ab6741511de.tar.xz
nixlib-24babaad9ab3e157d1bbb97531536ab6741511de.tar.zst
nixlib-24babaad9ab3e157d1bbb97531536ab6741511de.zip
makeQtWrapper: wrap XDG directories
Diffstat (limited to 'pkgs/development')
-rw-r--r--pkgs/development/libraries/qt-5/5.5/make-qt-wrapper.sh7
-rw-r--r--pkgs/development/libraries/qt-5/5.5/qtbase/setup-hook.sh2
2 files changed, 8 insertions, 1 deletions
diff --git a/pkgs/development/libraries/qt-5/5.5/make-qt-wrapper.sh b/pkgs/development/libraries/qt-5/5.5/make-qt-wrapper.sh
index 4eda9f82faa2..d61665455bf4 100644
--- a/pkgs/development/libraries/qt-5/5.5/make-qt-wrapper.sh
+++ b/pkgs/development/libraries/qt-5/5.5/make-qt-wrapper.sh
@@ -2,6 +2,8 @@ addQtDependency() {
     addToSearchPath QT_PLUGIN_PATH "$1/lib/qt5/plugins"
     addToSearchPath QML_IMPORT_PATH "$1/lib/qt5/imports"
     addToSearchPath QML2_IMPORT_PATH "$1/lib/qt5/qml"
+    addToSearchPath XDG_CONFIG_DIRS "$1/etc/xdg"
+    addToSearchPath XDG_DATA_DIRS "$1/share"
 }
 
 wrapQtProgram() {
@@ -11,6 +13,8 @@ wrapQtProgram() {
         --prefix QT_PLUGIN_PATH : "$QT_PLUGIN_PATH" \
         --prefix QML_IMPORT_PATH : "$QML_IMPORT_PATH" \
         --prefix QML2_IMPORT_PATH : "$QML2_IMPORT_PATH" \
+        --prefix XDG_CONFIG_DIRS : "$XDG_CONFIG_DIRS" \
+        --prefix XDG_DATA_DIRS : "$XDG_DATA_DIRS" \
         "$@"
 }
 
@@ -23,6 +27,8 @@ makeQtWrapper() {
         --prefix QT_PLUGIN_PATH : "$QT_PLUGIN_PATH" \
         --prefix QML_IMPORT_PATH : "$QML_IMPORT_PATH" \
         --prefix QML2_IMPORT_PATH : "$QML2_IMPORT_PATH" \
+        --prefix XDG_CONFIG_DIRS : "$XDG_CONFIG_DIRS" \
+        --prefix XDG_DATA_DIRS : "$XDG_DATA_DIRS" \
         "$@"
 }
 
@@ -30,6 +36,7 @@ makeQtWrapper() {
 export QT_PLUGIN_PATH="$QT_PLUGIN_PATH${QT_PLUGIN_PATH:+:}$out/lib/qt5/plugins"
 export QML_IMPORT_PATH="$QML_IMPORT_PATH${QML_IMPORT_PATH:+:}$out/lib/qt5/imports"
 export QML2_IMPORT_PATH="$QML2_IMPORT_PATH${QML2_IMPORT_PATH:+:}$out/lib/qt5/qml"
+export XDG_CONFIG_DIRS="$XDG_CONFIG_DIRS${XDG_CONFIG_DIRS:+:}$out/etc/xdg"
 export XDG_DATA_DIRS="$XDG_DATA_DIRS${XDG_DATA_DIRS:+:}$out/share"
 
 envHooks+=(addQtDependency)
diff --git a/pkgs/development/libraries/qt-5/5.5/qtbase/setup-hook.sh b/pkgs/development/libraries/qt-5/5.5/qtbase/setup-hook.sh
index d5e9eff60eff..b86b6df28ac8 100644
--- a/pkgs/development/libraries/qt-5/5.5/qtbase/setup-hook.sh
+++ b/pkgs/development/libraries/qt-5/5.5/qtbase/setup-hook.sh
@@ -22,7 +22,7 @@ addQtModule() {
 
 propagateRuntimeDeps() {
     local propagated
-    for dir in "lib/qt5/plugins" "lib/qt5/qml" "lib/qt5/imports"; do
+    for dir in "etc/xdg" "lib/qt5/plugins" "lib/qt5/qml" "lib/qt5/imports" "share"; do
         if [[ -d "$1/$dir" ]]; then
             propagated=
             for pkg in $propagatedBuildInputs; do