diff --git a/pkgs/development/libraries/qt-5/5.5/default.nix b/pkgs/development/libraries/qt-5/5.5/default.nix index e7d35dcb84b2..6d27ed5a0d32 100644 --- a/pkgs/development/libraries/qt-5/5.5/default.nix +++ b/pkgs/development/libraries/qt-5/5.5/default.nix @@ -112,7 +112,11 @@ let qtxmlpatterns ]; - makeQtWrapper = makeSetupHook { deps = [ makeWrapper ]; } ./make-qt-wrapper.sh; + makeQtWrapper = + makeSetupHook + { deps = [ makeWrapper ]; } + ../make-qt-wrapper.sh; + qmakeHook = makeSetupHook { deps = [ self.qtbase.dev ]; } diff --git a/pkgs/development/libraries/qt-5/5.6/default.nix b/pkgs/development/libraries/qt-5/5.6/default.nix index 5c58b85639ba..560e0ac021d9 100644 --- a/pkgs/development/libraries/qt-5/5.6/default.nix +++ b/pkgs/development/libraries/qt-5/5.6/default.nix @@ -109,7 +109,11 @@ let qtwebchannel qtwebengine qtwebsockets qtx11extras qtxmlpatterns ]; - makeQtWrapper = makeSetupHook { deps = [ makeWrapper ]; } ./make-qt-wrapper.sh; + makeQtWrapper = + makeSetupHook + { deps = [ makeWrapper ]; } + ../make-qt-wrapper.sh; + qmakeHook = makeSetupHook { deps = [ self.qtbase.dev ]; } 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 deleted file mode 100644 index b0d0bec9e3f6..000000000000 --- a/pkgs/development/libraries/qt-5/5.6/make-qt-wrapper.sh +++ /dev/null @@ -1,36 +0,0 @@ -wrapQtProgram() { - local prog="$1" - shift - wrapProgram "$prog" \ - --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" \ - "$@" -} - -makeQtWrapper() { - local old="$1" - local new="$2" - shift - shift - makeWrapper "$old" "$new" \ - --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" \ - "$@" -} - -_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 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) diff --git a/pkgs/development/libraries/qt-5/5.7/default.nix b/pkgs/development/libraries/qt-5/5.7/default.nix index dbb66b6510a1..b3a8b4d05ebd 100644 --- a/pkgs/development/libraries/qt-5/5.7/default.nix +++ b/pkgs/development/libraries/qt-5/5.7/default.nix @@ -107,7 +107,7 @@ let makeQtWrapper = makeSetupHook { deps = [ makeWrapper ]; } - ./make-qt-wrapper.sh; + ../make-qt-wrapper.sh; qmakeHook = makeSetupHook diff --git a/pkgs/development/libraries/qt-5/5.7/make-qt-wrapper.sh b/pkgs/development/libraries/qt-5/5.7/make-qt-wrapper.sh deleted file mode 100644 index b0d0bec9e3f6..000000000000 --- a/pkgs/development/libraries/qt-5/5.7/make-qt-wrapper.sh +++ /dev/null @@ -1,36 +0,0 @@ -wrapQtProgram() { - local prog="$1" - shift - wrapProgram "$prog" \ - --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" \ - "$@" -} - -makeQtWrapper() { - local old="$1" - local new="$2" - shift - shift - makeWrapper "$old" "$new" \ - --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" \ - "$@" -} - -_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 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) diff --git a/pkgs/development/libraries/qt-5/5.5/make-qt-wrapper.sh b/pkgs/development/libraries/qt-5/make-qt-wrapper.sh similarity index 100% rename from pkgs/development/libraries/qt-5/5.5/make-qt-wrapper.sh rename to pkgs/development/libraries/qt-5/make-qt-wrapper.sh