Skip to content

Commit

Permalink
qt6Packages: use makeScopeWithSplicing
Browse files Browse the repository at this point in the history
  • Loading branch information
Artturin committed Nov 11, 2023
1 parent 9c89c74 commit 1a9ecb3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24654,7 +24654,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;
stdenv = if stdenv.isDarwin then darwin.apple_sdk_11_0.stdenv else stdenv;
});

Expand Down
25 changes: 18 additions & 7 deletions pkgs/top-level/qt6-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,23 @@
# this file.

{ lib
, pkgs
, qt6
, __splicedPackages
, makeScopeWithSplicing'
, generateSplicesForMkScope
, stdenv
}:

(lib.makeScope pkgs.newScope ( self:

let
callPackage = self.callPackage;
pkgs = __splicedPackages;
qt6 = __splicedPackages.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
Expand Down Expand Up @@ -45,4 +51,9 @@ in
qt6Support = true;
suffix = "qt6";
};
})))

} // lib.optionalAttrs pkgs.config.allowAliases {
# remove before 24.05
overrideScope' = lib.warn "qt6Packages now uses makeScopeWithSplicing which does not have \"overrideScope'\", use \"overrideScope\"." self.overrideScope;
});
}

0 comments on commit 1a9ecb3

Please sign in to comment.