mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
qt6.qtbase: fix darwin permissions for statically linked plugins
Assisted-by: Claude (Fable) Fixes https://github.com/NixOS/nixpkgs/issues/530884
This commit is contained in:
parent
cb66de93b3
commit
6e58884bf2
1 changed files with 13 additions and 1 deletions
|
|
@ -275,6 +275,13 @@ stdenv.mkDerivation {
|
|||
--replace-quiet /usr/libexec/PlistBuddy '${lib.getExe' xcbuild "PlistBuddy"}'
|
||||
done
|
||||
|
||||
# Unlike Apple's PlistBuddy, xcbuild's only accepts capitalized commands,
|
||||
# so the usage-description probe in permissions.prf always fails and the
|
||||
# darwin permission plugins (Bluetooth, camera, ...) are silently never
|
||||
# linked into qmake-built apps.
|
||||
substituteInPlace mkspecs/features/permissions.prf \
|
||||
--replace-fail "-c 'print " "-c 'Print "
|
||||
|
||||
substituteInPlace mkspecs/common/macx.conf \
|
||||
--replace-fail 'CONFIG += ' 'CONFIG += no_default_rpath '
|
||||
'';
|
||||
|
|
@ -332,7 +339,12 @@ stdenv.mkDerivation {
|
|||
postFixup = ''
|
||||
moveToOutput "mkspecs/modules" "$dev"
|
||||
fixQtModulePaths "$dev/mkspecs/modules"
|
||||
fixQtBuiltinPaths "$out" '*.pr?'
|
||||
# fixQtBuiltinPaths reads qtPluginPrefix/qtQmlPrefix from the environment,
|
||||
# but the setup hook only exports them for downstream packages; without
|
||||
# them e.g. $$[QT_INSTALL_PLUGINS] in qt.prf is rewritten to "$out/"
|
||||
# instead of "$out/${qtPluginPrefix}", breaking static plugin linking.
|
||||
qtPluginPrefix=${qtPluginPrefix} qtQmlPrefix=${qtQmlPrefix} \
|
||||
fixQtBuiltinPaths "$out" '*.pr?'
|
||||
|
||||
# @out@ would be automagically replaced inside makeSetupHook by the output of that derivation,
|
||||
# but we need it to be the output of this derivation.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue