diff options
author | Nick Cao <nickcao@nichi.co> | 2023-04-13 21:11:49 +0800 |
---|---|---|
committer | Nick Cao <nickcao@nichi.co> | 2023-04-14 19:09:56 +0800 |
commit | d84e2bf05653e277c74afc1077f3126d403bf720 (patch) | |
tree | e747526e2fd867a0e77c6f83537d950129a146ef | |
parent | 5aa78f89f029200ce4e882e29389fb6d58ccdee5 (diff) | |
download | nixpkgs-d84e2bf05653e277c74afc1077f3126d403bf720.tar nixpkgs-d84e2bf05653e277c74afc1077f3126d403bf720.tar.gz nixpkgs-d84e2bf05653e277c74afc1077f3126d403bf720.tar.bz2 nixpkgs-d84e2bf05653e277c74afc1077f3126d403bf720.tar.lz nixpkgs-d84e2bf05653e277c74afc1077f3126d403bf720.tar.xz nixpkgs-d84e2bf05653e277c74afc1077f3126d403bf720.tar.zst nixpkgs-d84e2bf05653e277c74afc1077f3126d403bf720.zip |
qt6: do not move devTools to dev output
-rw-r--r-- | pkgs/development/libraries/qt-6/hooks/move-qt-dev-tools.sh | 34 | ||||
-rw-r--r-- | pkgs/development/libraries/qt-6/modules/qtbase.nix | 27 | ||||
-rw-r--r-- | pkgs/development/libraries/qt-6/qtModule.nix | 9 |
3 files changed, 2 insertions, 68 deletions
diff --git a/pkgs/development/libraries/qt-6/hooks/move-qt-dev-tools.sh b/pkgs/development/libraries/qt-6/hooks/move-qt-dev-tools.sh deleted file mode 100644 index 85489c85105..00000000000 --- a/pkgs/development/libraries/qt-6/hooks/move-qt-dev-tools.sh +++ /dev/null @@ -1,34 +0,0 @@ -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 -} diff --git a/pkgs/development/libraries/qt-6/modules/qtbase.nix b/pkgs/development/libraries/qt-6/modules/qtbase.nix index 0babdbc6094..b529bd7b968 100644 --- a/pkgs/development/libraries/qt-6/modules/qtbase.nix +++ b/pkgs/development/libraries/qt-6/modules/qtbase.nix @@ -204,7 +204,6 @@ stdenv.mkDerivation rec { preHook = '' . "$fix_qt_builtin_paths" . "$fix_qt_module_paths" - . ${../hooks/move-qt-dev-tools.sh} . ${../hooks/fix-qmake-libtool.sh} ''; @@ -263,30 +262,8 @@ stdenv.mkDerivation rec { 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; diff --git a/pkgs/development/libraries/qt-6/qtModule.nix b/pkgs/development/libraries/qt-6/qtModule.nix index d7952db753e..2f7de750237 100644 --- a/pkgs/development/libraries/qt-6/qtModule.nix +++ b/pkgs/development/libraries/qt-6/qtModule.nix @@ -18,10 +18,6 @@ stdenv.mkDerivation (args // { 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 [ ]); @@ -32,11 +28,6 @@ stdenv.mkDerivation (args // { dontWrapQtApps = args.dontWrapQtApps or true; - postFixup = '' - moveToOutput "libexec" "''${!outputDev}" - moveQtDevTools - '' + args.postFixup or ""; - meta = with lib; { homepage = "https://www.qt.io/"; description = "A cross-platform application framework for C++"; |