Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pkgs/development/libraries/qt-6/hooks/qtbase-setup-hook.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
if [[ -n "${__nix_qtbase-}" ]]; then
# Throw an error if a different version of Qt was already set up.
if [[ "$__nix_qtbase" != "@out@" ]]; then
if [[ "$__nix_qtbase" != "@qtbaseOut@" ]]; then
echo >&2 "Error: detected mismatched Qt dependencies:"
echo >&2 " @out@"
echo >&2 " @qtbaseOut@"
echo >&2 " $__nix_qtbase"
exit 1
fi
else # Only set up Qt once.
__nix_qtbase="@out@"
__nix_qtbase="@qtbaseOut@"

qtPluginPrefix=@qtPluginPrefix@
qtQmlPrefix=@qtQmlPrefix@
Expand All @@ -16,7 +16,7 @@ else # Only set up Qt once.
. @fix_qt_module_paths@

# Build tools are often confused if QMAKE is unset.
export QMAKE=@out@/bin/qmake
export QMAKE=@qtbaseOut@/bin/qmake

export QMAKEPATH=

Expand Down
7 changes: 7 additions & 0 deletions pkgs/development/libraries/qt-6/modules/qtbase/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,13 @@ stdenv.mkDerivation {
moveToOutput "mkspecs/modules" "$dev"
fixQtModulePaths "$dev/mkspecs/modules"
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.
# Use a different placeholder and explicitly substitute this
# to keep compatibility with __structuredAttrs and avoid substituteAll.
substituteInPlace "''${!outputDev}/nix-support/setup-hook" \
--replace-fail "@qtbaseOut@" $out
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
# FIXME: not sure why this isn't added automatically?
Expand Down
Loading