mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 07:46:09 +01:00
Merge pull request #181465 from milahu/qt6-fix-wrap-qt-apps-hook
qt6.wrapQtAppsHook: also wrap scripts, pretty error, show hints
This commit is contained in:
commit
2988dc447b
1 changed files with 6 additions and 3 deletions
|
@ -22,6 +22,11 @@ qtUnseenHostPath() {
|
||||||
qtHostPathHook() {
|
qtHostPathHook() {
|
||||||
qtUnseenHostPath "$1" || return 0
|
qtUnseenHostPath "$1" || return 0
|
||||||
|
|
||||||
|
if ! [ -v qtPluginPrefix ]
|
||||||
|
then
|
||||||
|
echo "wrapQtAppsHook qtHostPathHook: qtPluginPrefix is unset. hint: add qt6.qtbase to buildInputs"
|
||||||
|
fi
|
||||||
|
|
||||||
local pluginDir="$1/${qtPluginPrefix:?}"
|
local pluginDir="$1/${qtPluginPrefix:?}"
|
||||||
if [ -d "$pluginDir" ]
|
if [ -d "$pluginDir" ]
|
||||||
then
|
then
|
||||||
|
@ -34,7 +39,7 @@ qtHostPathHook() {
|
||||||
qtWrapperArgs+=(--prefix QML2_IMPORT_PATH : "$qmlDir")
|
qtWrapperArgs+=(--prefix QML2_IMPORT_PATH : "$qmlDir")
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
addEnvHooks "$hostOffset" qtHostPathHook
|
addEnvHooks "$targetOffset" qtHostPathHook
|
||||||
|
|
||||||
makeQtWrapper() {
|
makeQtWrapper() {
|
||||||
local original="$1"
|
local original="$1"
|
||||||
|
@ -85,8 +90,6 @@ wrapQtAppsHook() {
|
||||||
|
|
||||||
find "$targetDir" ! -type d -executable -print0 | while IFS= read -r -d '' file
|
find "$targetDir" ! -type d -executable -print0 | while IFS= read -r -d '' file
|
||||||
do
|
do
|
||||||
isELF "$file" || isMachO "$file" || continue
|
|
||||||
|
|
||||||
if [ -f "$file" ]
|
if [ -f "$file" ]
|
||||||
then
|
then
|
||||||
echo "wrapping $file"
|
echo "wrapping $file"
|
||||||
|
|
Loading…
Reference in a new issue