Merge pull request #264903 from Artturin/splitqt1

authored by Artturi and committed by GitHub b65f481f 4285a2a6

+24 -35
+20 -27
pkgs/development/libraries/qt-5/5.15/default.nix
··· 12 12 , bison, cups ? null, harfbuzz, libGL, perl, python3 13 13 , gstreamer, gst-plugins-base, gtk3, dconf 14 14 , darwin 15 - , buildPackages 16 15 17 16 # options 18 17 , developerBuild ? false ··· 202 201 qttools = [ ./qttools.patch ]; 203 202 }; 204 203 205 - addPackages = self: with self; 204 + addPackages = self: 206 205 let 207 - qtModule = 208 - import ../qtModule.nix 209 - { 210 - inherit perl; 211 - inherit lib; 212 - # Use a variant of mkDerivation that does not include wrapQtApplications 213 - # to avoid cyclic dependencies between Qt modules. 214 - mkDerivation = 215 - import ../mkDerivation.nix 216 - { inherit lib; inherit debug; wrapQtAppsHook = null; } 217 - stdenv.mkDerivation; 218 - } 219 - { inherit self srcs patches; }; 206 + qtModule = callPackage ../qtModule.nix { 207 + inherit patches; 208 + # Use a variant of mkDerivation that does not include wrapQtApplications 209 + # to avoid cyclic dependencies between Qt modules. 210 + mkDerivation = 211 + (callPackage ../mkDerivation.nix { wrapQtAppsHook = null; }) stdenv.mkDerivation; 212 + }; 220 213 221 214 callPackage = self.newScope { inherit qtCompatVersion qtModule srcs stdenv; }; 222 215 in { 223 216 224 217 inherit callPackage qtCompatVersion qtModule srcs; 225 218 226 - mkDerivationWith = 227 - import ../mkDerivation.nix 228 - { inherit lib; inherit debug; inherit (self) wrapQtAppsHook; }; 219 + mkDerivationWith = callPackage ../mkDerivation.nix { }; 229 220 230 - mkDerivation = mkDerivationWith stdenv.mkDerivation; 221 + mkDerivation = callPackage ({ mkDerivationWith }: mkDerivationWith stdenv.mkDerivation) { }; 231 222 232 223 qtbase = callPackage ../modules/qtbase.nix { 233 224 inherit (srcs.qtbase) src version; ··· 309 300 qtxmlpatterns = callPackage ../modules/qtxmlpatterns.nix {}; 310 301 311 302 env = callPackage ../qt-env.nix {}; 312 - full = env "qt-full-${qtbase.version}" ([ 303 + full = callPackage ({ env, qtbase }: env "qt-full-${qtbase.version}") { } 304 + # `with self` is ok to use here because having these spliced is unnecessary 305 + (with self; [ 313 306 qt3d qtcharts qtconnectivity qtdeclarative qtdoc qtgraphicaleffects 314 307 qtimageformats qtlocation qtmultimedia qtquickcontrols qtquickcontrols2 315 308 qtscript qtsensors qtserialport qtsvg qttools qttranslations ··· 318 311 ] ++ lib.optional (!stdenv.isDarwin) qtwayland 319 312 ++ lib.optional (stdenv.isDarwin) qtmacextras); 320 313 321 - qmake = makeSetupHook { 314 + qmake = callPackage ({ qtbase }: makeSetupHook { 322 315 name = "qmake-hook"; 323 - propagatedBuildInputs = [ self.qtbase.dev ]; 316 + propagatedBuildInputs = [ qtbase.dev ]; 324 317 substitutions = { 325 318 inherit debug; 326 319 fix_qmake_libtool = ../hooks/fix-qmake-libtool.sh; 327 320 }; 328 - } ../hooks/qmake-hook.sh; 321 + } ../hooks/qmake-hook.sh) { }; 329 322 330 - wrapQtAppsHook = makeSetupHook { 323 + wrapQtAppsHook = callPackage ({ makeBinaryWrapper, qtbase, qtwayland }: makeSetupHook { 331 324 name = "wrap-qt5-apps-hook"; 332 - propagatedBuildInputs = [ self.qtbase.dev buildPackages.makeBinaryWrapper ] 333 - ++ lib.optional stdenv.isLinux self.qtwayland.dev; 334 - } ../hooks/wrap-qt-apps-hook.sh; 325 + propagatedBuildInputs = [ qtbase.dev makeBinaryWrapper ] 326 + ++ lib.optional stdenv.isLinux qtwayland.dev; 327 + } ../hooks/wrap-qt-apps-hook.sh) { }; 335 328 }; 336 329 337 330 baseScope = makeScopeWithSplicing' {
+1 -3
pkgs/development/libraries/qt-5/mkDerivation.nix
··· 1 - { lib, debug, wrapQtAppsHook }: 2 - 3 - let inherit (lib) optional; in 1 + { wrapQtAppsHook }: 4 2 5 3 mkDerivation: 6 4
+2 -4
pkgs/development/libraries/qt-5/qtModule.nix
··· 1 - { lib, mkDerivation, perl }: 1 + { lib, mkDerivation, perl, qmake, patches, srcs }: 2 2 3 3 let inherit (lib) licenses maintainers platforms; in 4 - 5 - { self, srcs, patches }: 6 4 7 5 args: 8 6 ··· 16 14 inherit pname version src; 17 15 patches = (args.patches or []) ++ (patches.${pname} or []); 18 16 19 - nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ perl self.qmake ]; 17 + nativeBuildInputs = (args.nativeBuildInputs or []) ++ [ perl qmake ]; 20 18 propagatedBuildInputs = 21 19 (lib.warnIf (args ? qtInputs) "qt5.qtModule's qtInputs argument is deprecated" args.qtInputs or []) ++ 22 20 (args.propagatedBuildInputs or []);
+1 -1
pkgs/top-level/all-packages.nix
··· 24670 24670 inherit (__splicedPackages) 24671 24671 makeScopeWithSplicing' generateSplicesForMkScope lib fetchurl fetchpatch fetchgit fetchFromGitHub makeSetupHook makeWrapper 24672 24672 bison cups dconf harfbuzz libGL perl gtk3 python3 24673 - darwin buildPackages; 24673 + darwin; 24674 24674 inherit (__splicedPackages.gst_all_1) gstreamer gst-plugins-base; 24675 24675 inherit config; 24676 24676 stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv;