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