Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

qt5: fix splicing

and simplify some things

remove now unnecessary use of buildPackages

Artturin 19e04743 6b6bb56d

+19 -32
+15 -24
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 ··· 204 203 205 204 addPackages = self: with 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 221 mkDerivation = mkDerivationWith stdenv.mkDerivation; 231 222 ··· 318 309 ] ++ lib.optional (!stdenv.isDarwin) qtwayland 319 310 ++ lib.optional (stdenv.isDarwin) qtmacextras); 320 311 321 - qmake = makeSetupHook { 312 + qmake = callPackage ({ qtbase }: makeSetupHook { 322 313 name = "qmake-hook"; 323 - propagatedBuildInputs = [ self.qtbase.dev ]; 314 + propagatedBuildInputs = [ qtbase.dev ]; 324 315 substitutions = { 325 316 inherit debug; 326 317 fix_qmake_libtool = ../hooks/fix-qmake-libtool.sh; 327 318 }; 328 - } ../hooks/qmake-hook.sh; 319 + } ../hooks/qmake-hook.sh) { }; 329 320 330 - wrapQtAppsHook = makeSetupHook { 321 + wrapQtAppsHook = callPackage ({ makeBinaryWrapper, qtbase, qtwayland }: makeSetupHook { 331 322 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; 323 + propagatedBuildInputs = [ qtbase.dev makeBinaryWrapper ] 324 + ++ lib.optional stdenv.isLinux qtwayland.dev; 325 + } ../hooks/wrap-qt-apps-hook.sh) { }; 335 326 }; 336 327 337 328 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
··· 24656 24656 inherit (__splicedPackages) 24657 24657 makeScopeWithSplicing' generateSplicesForMkScope lib fetchurl fetchpatch fetchgit fetchFromGitHub makeSetupHook makeWrapper 24658 24658 bison cups dconf harfbuzz libGL perl gtk3 python3 24659 - darwin buildPackages; 24659 + darwin; 24660 24660 inherit (__splicedPackages.gst_all_1) gstreamer gst-plugins-base; 24661 24661 inherit config; 24662 24662 stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv;