···113113 args ? {}
114114 , # This would be remove in the future, Prefer _module.check option instead.
115115 check ? true
116116+ # Internal variable to avoid `_key` collisions regardless
117117+ # of `extendModules`. Used in `submoduleWith`.
118118+ # Test case: lib/tests/modules, "168767"
119119+ , extensionOffset ? 0
116120 }:
117121 let
118122 withWarnings = x:
···338342 modules ? [],
339343 specialArgs ? {},
340344 prefix ? [],
345345+ extensionOffset ? length modules,
341346 }:
342347 evalModules (evalModulesArgs // {
343348 modules = regularModules ++ modules;
344349 specialArgs = evalModulesArgs.specialArgs or {} // specialArgs;
345350 prefix = extendArgs.prefix or evalModulesArgs.prefix;
351351+ inherit extensionOffset;
346352 });
347353348354 type = lib.types.submoduleWith {
349349- inherit modules specialArgs;
355355+ inherit modules specialArgs extensionOffset;
350356 };
351357352358 result = withWarnings {
+5-1
lib/tests/modules.sh
···293293294294# moduleType
295295checkConfigOutput '^"a b"$' config.resultFoo ./declare-variants.nix ./define-variant.nix
296296-checkConfigOutput '^"a y z"$' config.resultFooBar ./declare-variants.nix ./define-variant.nix
296296+checkConfigOutput '^"a b y z"$' config.resultFooBar ./declare-variants.nix ./define-variant.nix
297297checkConfigOutput '^"a b c"$' config.resultFooFoo ./declare-variants.nix ./define-variant.nix
298298299299## emptyValue's
···326326327327# Test that types.optionType leaves types untouched as long as they don't need to be merged
328328checkConfigOutput 'ok' config.freeformItems.foo.bar ./adhoc-freeformType-survives-type-merge.nix
329329+330330+# Anonymous submodules don't get nixed by import resolution/deduplication
331331+# because of an `extendModules` bug, issue 168767.
332332+checkConfigOutput '^1$' config.sub.specialisation.value ./extendModules-168767-imports.nix
329333330334cat <<EOF
331335====== module tests ======
···11-# This file was generated by go2nix.
22-[
33- {
44- goPackagePath = "github.com/shoenig/config";
55- fetch = {
66- type = "git";
77- url = "https://github.com/shoenig/config";
88- rev = "7d793e7ad7f175ef22743b1ea38acee8267788db";
99- sha256 = "1dhcv1j5xk30kj73dfnx3xqx8mcvk9r8ywp9khgf2kq6wh9sm1qr";
1010- };
1111- }
1212-]
+1
pkgs/top-level/aliases.nix
···141141142142 ### C ###
143143144144+ c14 = throw "c14 is deprecated and archived by upstream"; # Added 2022-04-10
144145 caddy1 = throw "caddy 1.x has been removed from nixpkgs, as it's unmaintained: https://github.com/caddyserver/caddy/blob/master/.github/SECURITY.md#supported-versions"; # Added 2020-10-02
145146 calibre-py2 = throw "calibre-py2 has been removed from nixpkgs, as calibre has upgraded to python 3. Please use calibre as replacement"; # Added 2021-01-13
146147 calibre-py3 = throw "calibre-py3 has been removed from nixpkgs, as calibre's default python version is now 3. Please use calibre as replacement"; # Added 2021-01-13