qt6: do not move devTools to dev output

Nick Cao d84e2bf0 5aa78f89

Changed files
+2 -68
pkgs
development
libraries
-34
pkgs/development/libraries/qt-6/hooks/move-qt-dev-tools.sh
···
-
updateToolPath() {
-
local tool="$1"
-
local target="$2"
-
local original="${!outputBin}/$tool"
-
local actual="${!outputDev}/$tool"
-
if grep -q "$original" "$target"; then
-
echo "updateToolPath: Updating \`$original' in \`$target\'..."
-
sed -i "$target" -e "s|$original|$actual|"
-
fi
-
}
-
-
moveQtDevTools() {
-
if [ -n "$devTools" ]; then
-
for tool in $devTools; do
-
moveToOutput "$tool" "${!outputDev}"
-
done
-
-
if [ -d "${!outputDev}/mkspecs" ]; then
-
find "${!outputDev}/mkspecs" -name '*.pr?' | while read pr_; do
-
for tool in $devTools; do
-
updateToolPath "$tool" "$pr_"
-
done
-
done
-
fi
-
-
if [ -d "${!outputDev}/lib/cmake" ]; then
-
find "${!outputDev}/lib/cmake" -name '*.cmake' | while read cmake; do
-
for tool in $devTools; do
-
updateToolPath "$tool" "$cmake"
-
done
-
done
-
fi
-
fi
-
}
+2 -25
pkgs/development/libraries/qt-6/modules/qtbase.nix
···
preHook = ''
. "$fix_qt_builtin_paths"
. "$fix_qt_module_paths"
-
. ${../hooks/move-qt-dev-tools.sh}
. ${../hooks/fix-qmake-libtool.sh}
'';
···
moveToDev = false;
postFixup = ''
-
moveToOutput "mkspecs" "$dev"
-
moveToOutput "modules" "$dev"
-
moveToOutput "lib/*.prl" "$dev"
-
-
fixQtModulePaths "$dev/mkspecs/modules"
-
fixQtBuiltinPaths "$dev" '*.pr?'
-
-
# Move development tools to $dev
-
moveQtDevTools
-
moveToOutput libexec "$dev"
-
-
# fixup .pc file (where to find 'moc' etc.)
-
if [ -f "$dev/lib/pkgconfig/Qt6Core.pc" ]; then
-
sed -i "$dev/lib/pkgconfig/Qt6Core.pc" \
-
-e "/^bindir=/ c bindir=$dev/bin" \
-
-e "/^libexecdir=/ c libexecdir=$dev/libexec"
-
fi
-
-
patchShebangs $out $dev
-
-
# QTEST_ASSERT and other macros keeps runtime reference to qtbase.dev
-
if [ -f "$dev/include/QtTest/qtestassert.h" ]; then
-
substituteInPlace "$dev/include/QtTest/qtestassert.h" --replace "__FILE__" "__BASE_FILE__"
-
fi
+
fixQtModulePaths "$out/mkspecs/modules"
+
fixQtBuiltinPaths "$out" '*.pr?'
'';
dontStrip = debugSymbols;
-9
pkgs/development/libraries/qt-6/qtModule.nix
···
inherit pname version src;
patches = args.patches or patches.${pname} or [ ];
-
preHook = ''
-
. ${./hooks/move-qt-dev-tools.sh}
-
'';
-
buildInputs = args.buildInputs or [ ];
nativeBuildInputs = (args.nativeBuildInputs or [ ]) ++ [ cmake ninja perl ];
propagatedBuildInputs = args.qtInputs ++ (args.propagatedBuildInputs or [ ]);
···
outputs = args.outputs or [ "out" "dev" ];
dontWrapQtApps = args.dontWrapQtApps or true;
-
-
postFixup = ''
-
moveToOutput "libexec" "''${!outputDev}"
-
moveQtDevTools
-
'' + args.postFixup or "";
meta = with lib; {
homepage = "https://www.qt.io/";