diff --git a/pkgs/desktops/kde-5/frameworks/extra-cmake-modules/setup-hook.sh b/pkgs/desktops/kde-5/frameworks/extra-cmake-modules/setup-hook.sh index aab0625bf61a..6c8199f17d42 100644 --- a/pkgs/desktops/kde-5/frameworks/extra-cmake-modules/setup-hook.sh +++ b/pkgs/desktops/kde-5/frameworks/extra-cmake-modules/setup-hook.sh @@ -1,22 +1,31 @@ _ecmSetXdgDirs() { addToSearchPathOnce XDG_DATA_DIRS "$1/share" addToSearchPathOnce XDG_CONFIG_DIRS "$1/etc/xdg" - addToSearchPathOnce NIX_WRAP_XDG_CONFIG_DIRS "$1/etc/xdg" + addToSearchPathOnce RUNTIME_XDG_CONFIG_DIRS "$1/etc/xdg" } _ecmSharePaths=( \ + "appdata" \ + "applications" \ "config.cfg" \ + "dbus-1" \ + "desktop-directories" \ + "doc" \ + "icons" \ + "info" \ "kconf_update" \ "kservices5" \ "kservicetypes5" \ "knotifications5" \ - "applications" \ - "desktop-directories" \ + "kxmlgui5" \ + "locale" \ + "man" \ "mime" \ - "dbus-1" \ - "interfaces" \ - "services" \ - "system-services" ) + "polkit-1" \ + "sounds" \ + "templates" \ + "wallpapers" \ + ) _ecmPropagateNative() { for dir in ${_ecmSharePaths[@]}; do @@ -24,7 +33,7 @@ _ecmPropagateNative() { propagateOnce propagatedNativeBuildInputs "$1" if [ -z "$crossConfig" ]; then propagateOnce propagatedUserEnvPkgs "$1" - addToSearchPathOnce NIX_WRAP_XDG_DATA_DIRS "$1/share" + addToSearchPathOnce RUNTIME_XDG_DATA_DIRS "$1/share" fi break fi @@ -38,7 +47,7 @@ _ecmPropagate() { if [ -d "$1/share/$dir" ]; then propagateOnce propagatedBuildInputs "$1" propagateOnce propagatedUserEnvPkgs "$1" - addToSearchPathOnce NIX_WRAP_XDG_DATA_DIRS "$1/share" + addToSearchPathOnce RUNTIME_XDG_DATA_DIRS "$1/share" break fi done 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 deleted file mode 100644 index 3b537430371a..000000000000 --- a/pkgs/development/libraries/qt-5/5.5/make-qt-wrapper.sh +++ /dev/null @@ -1,38 +0,0 @@ -wrapQtProgram() { - local prog="$1" - shift - wrapProgram "$prog" \ - --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 : "$NIX_WRAP_XDG_CONFIG_DIRS" \ - --prefix XDG_DATA_DIRS : "$NIX_WRAP_XDG_DATA_DIRS" \ - "$@" -} - -makeQtWrapper() { - local old="$1" - local new="$2" - shift - shift - makeWrapper "$old" "$new" \ - --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 : "$NIX_WRAP_XDG_CONFIG_DIRS" \ - --prefix XDG_DATA_DIRS : "$NIX_WRAP_XDG_DATA_DIRS" \ - "$@" -} - -_makeQtWrapperSetup() { - # cannot use addToSearchPath because these directories may not exist yet - export QT_PLUGIN_PATH="$QT_PLUGIN_PATH${QT_PLUGIN_PATH:+:}${!outputLib}/lib/qt5/plugins" - export QML_IMPORT_PATH="$QML_IMPORT_PATH${QML_IMPORT_PATH:+:}${!outputLib}/lib/qt5/imports" - export QML2_IMPORT_PATH="$QML2_IMPORT_PATH${QML2_IMPORT_PATH:+:}${!outputLib}/lib/qt5/qml" - export XDG_CONFIG_DIRS="$XDG_CONFIG_DIRS${XDG_CONFIG_DIRS:+:}${!outputLib}/etc/xdg" - export XDG_DATA_DIRS="$XDG_DATA_DIRS${XDG_DATA_DIRS:+:}${!outputLib}/share" - export NIX_WRAP_XDG_CONFIG_DIRS="$NIX_WRAP_XDG_CONFIG_DIRS${NIX_WRAP_XDG_CONFIG_DIRS:+:}${!outputLib}/etc/xdg" - export NIX_WRAP_XDG_DATA_DIRS="$NIX_WRAP_XDG_DATA_DIRS${NIX_WRAP_XDG_DATA_DIRS:+:}${!outputLib}/share" -} - -prePhases+=(_makeQtWrapperSetup) 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 new file mode 120000 index 000000000000..90d9b349fed5 --- /dev/null +++ b/pkgs/development/libraries/qt-5/5.5/make-qt-wrapper.sh @@ -0,0 +1 @@ +../5.6/make-qt-wrapper.sh \ No newline at end of file diff --git a/pkgs/development/libraries/qt-5/5.6/make-qt-wrapper.sh b/pkgs/development/libraries/qt-5/5.6/make-qt-wrapper.sh index 3b537430371a..b0d0bec9e3f6 100644 --- a/pkgs/development/libraries/qt-5/5.6/make-qt-wrapper.sh +++ b/pkgs/development/libraries/qt-5/5.6/make-qt-wrapper.sh @@ -2,11 +2,11 @@ wrapQtProgram() { local prog="$1" shift wrapProgram "$prog" \ - --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 : "$NIX_WRAP_XDG_CONFIG_DIRS" \ - --prefix XDG_DATA_DIRS : "$NIX_WRAP_XDG_DATA_DIRS" \ + --set QT_PLUGIN_PATH "$QT_PLUGIN_PATH" \ + --set QML_IMPORT_PATH "$QML_IMPORT_PATH" \ + --set QML2_IMPORT_PATH "$QML2_IMPORT_PATH" \ + --prefix XDG_DATA_DIRS : "$RUNTIME_XDG_DATA_DIRS" \ + --prefix XDG_CONFIG_DIRS : "$RUNTIME_XDG_CONFIG_DIRS" \ "$@" } @@ -16,11 +16,11 @@ makeQtWrapper() { shift shift makeWrapper "$old" "$new" \ - --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 : "$NIX_WRAP_XDG_CONFIG_DIRS" \ - --prefix XDG_DATA_DIRS : "$NIX_WRAP_XDG_DATA_DIRS" \ + --set QT_PLUGIN_PATH "$QT_PLUGIN_PATH" \ + --set QML_IMPORT_PATH "$QML_IMPORT_PATH" \ + --set QML2_IMPORT_PATH "$QML2_IMPORT_PATH" \ + --prefix XDG_DATA_DIRS : "$RUNTIME_XDG_DATA_DIRS" \ + --prefix XDG_CONFIG_DIRS : "$RUNTIME_XDG_CONFIG_DIRS" \ "$@" } @@ -29,10 +29,8 @@ _makeQtWrapperSetup() { export QT_PLUGIN_PATH="$QT_PLUGIN_PATH${QT_PLUGIN_PATH:+:}${!outputLib}/lib/qt5/plugins" export QML_IMPORT_PATH="$QML_IMPORT_PATH${QML_IMPORT_PATH:+:}${!outputLib}/lib/qt5/imports" export QML2_IMPORT_PATH="$QML2_IMPORT_PATH${QML2_IMPORT_PATH:+:}${!outputLib}/lib/qt5/qml" - export XDG_CONFIG_DIRS="$XDG_CONFIG_DIRS${XDG_CONFIG_DIRS:+:}${!outputLib}/etc/xdg" - export XDG_DATA_DIRS="$XDG_DATA_DIRS${XDG_DATA_DIRS:+:}${!outputLib}/share" - export NIX_WRAP_XDG_CONFIG_DIRS="$NIX_WRAP_XDG_CONFIG_DIRS${NIX_WRAP_XDG_CONFIG_DIRS:+:}${!outputLib}/etc/xdg" - export NIX_WRAP_XDG_DATA_DIRS="$NIX_WRAP_XDG_DATA_DIRS${NIX_WRAP_XDG_DATA_DIRS:+:}${!outputLib}/share" + export RUNTIME_XDG_DATA_DIRS="$XDG_DATA_DIRS${XDG_DATA_DIRS:+:}${!outputBin}/share" + export RUNTIME_XDG_CONFIG_DIRS="$XDG_CONFIG_DIRS${XDG_CONFIG_DIRS:+:}${!outputBin}/etc/xdg" } prePhases+=(_makeQtWrapperSetup)