qt6Packages: use makeScopeWithSplicing

23.11 has a warning for `overrideScope'` in `makeScope` itself
This commit is contained in:
Artturin 2023-11-11 21:27:08 +02:00
parent 65874cc847
commit 6e2e32556e
2 changed files with 25 additions and 8 deletions

View file

@ -24662,7 +24662,7 @@ with pkgs;
qt6 = recurseIntoAttrs (callPackage ../development/libraries/qt-6 { });
qt6Packages = recurseIntoAttrs (import ./qt6-packages.nix {
inherit lib pkgs qt6;
inherit lib __splicedPackages makeScopeWithSplicing' generateSplicesForMkScope pkgsBuildHost;
stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv;
});

View file

@ -5,17 +5,27 @@
# this file.
{ lib
, pkgs
, qt6
, __splicedPackages
, makeScopeWithSplicing'
, generateSplicesForMkScope
, stdenv
, pkgsBuildHost
}:
(lib.makeScope pkgs.newScope ( self:
let
callPackage = self.callPackage;
pkgs = __splicedPackages;
# qt6 set should not be pre-spliced to prevent spliced packages being a part of an unspliced set
# 'pkgsCross.aarch64-multiplatform.pkgsBuildTarget.targetPackages.qt6Packages.qtbase' should not have a `__spliced` but if qt6 is pre-spliced then it will have one.
# pkgsBuildHost == pkgs
qt6 = pkgsBuildHost.qt6;
in
(qt6 // {
makeScopeWithSplicing' {
otherSplices = generateSplicesForMkScope "qt6Packages";
f = (self: let
inherit (self) callPackage;
noExtraAttrs = set: lib.attrsets.removeAttrs set [ "extend" "override" "overrideScope" "overrideScope'" "overrideDerivation" ];
in (noExtraAttrs qt6) // {
inherit stdenv;
# LIBRARIES
@ -45,4 +55,11 @@ in
qt6Support = true;
suffix = "qt6";
};
})))
} // lib.optionalAttrs pkgs.config.allowAliases {
# Convert to a throw on 01-01-2023.
# Warnings show up in various cli tool outputs, throws do not.
# Remove completely before 24.05
overrideScope' = lib.warn "qt6Packages now uses makeScopeWithSplicing which does not have \"overrideScope'\", use \"overrideScope\"." self.overrideScope;
});
}