diff --git a/pkgs/top-level/stage.nix b/pkgs/top-level/stage.nix index 2334242238d5..b37311b8f0e3 100644 --- a/pkgs/top-level/stage.nix +++ b/pkgs/top-level/stage.nix @@ -191,15 +191,19 @@ let aliases = self: super: lib.optionalAttrs config.allowAliases (import ./aliases.nix lib self super); - variants = import ./variants.nix { - inherit - lib - nixpkgsFun - stdenv - overlays - makeMuslParsedPlatform - ; - }; + variants = + self: super: + lib.optionalAttrs config.allowVariants ( + import ./variants.nix { + inherit + lib + nixpkgsFun + stdenv + overlays + makeMuslParsedPlatform + ; + } self super + ); # stdenvOverrides is used to avoid having multiple of versions # of certain dependencies that were used in bootstrapping the