Loading doc/release-notes/rl-2505.section.md +1 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,7 @@ - `lib.types.nullOr` - `lib.types.functionTo` - `lib.types.coercedTo` - `lib.types.either` - Plasma 5 and Qt 5 based versions of associated software are deprecated in NixOS 25.05, and will be removed in NixOS 25.11. Users are encouraged to upgrade to Plasma 6. Loading lib/tests/modules.sh +8 −0 Original line number Diff line number Diff line Loading @@ -439,6 +439,14 @@ NIX_ABORT_ON_WARN=1 checkConfigError 'The deprecated `.*functor.wrapped` attribu NIX_ABORT_ON_WARN=1 checkConfigError 'The deprecated `.*functor.wrapped` attribute .*is accessed, use `.*nestedTypes.elemType` instead.' options.coercedTo.type.functor.wrapped ./deprecated-wrapped.nix NIX_ABORT_ON_WARN=1 checkConfigError 'The deprecated `.*functor.wrapped` attribute .*is accessed, use `.*nestedTypes.elemType` instead.' options.coercedTo.type.nestedTypes.finalType.functor.wrapped ./deprecated-wrapped.nix NIX_ABORT_ON_WARN=1 checkConfigError 'The deprecated `.*functor.wrapped` attribute .*is accessed, use `.*nestedTypes.elemType` instead.' options.coercedTo.type.nestedTypes.coercedType.functor.wrapped ./deprecated-wrapped.nix # either NIX_ABORT_ON_WARN=1 checkConfigError 'The deprecated `.*functor.wrapped` attribute .*is accessed, use `.*nestedTypes.elemType` instead.' options.either.type.functor.wrapped ./deprecated-wrapped.nix NIX_ABORT_ON_WARN=1 checkConfigError 'The deprecated `.*functor.wrapped` attribute .*is accessed, use `.*nestedTypes.elemType` instead.' options.mergedEither.type.functor.wrapped ./deprecated-wrapped.nix NIX_ABORT_ON_WARN=1 checkConfigError 'The deprecated `.*functor.wrapped` attribute .*is accessed, use `.*nestedTypes.elemType` instead.' options.either.type.nestedTypes.left.functor.wrapped ./deprecated-wrapped.nix NIX_ABORT_ON_WARN=1 checkConfigError 'The deprecated `.*functor.wrapped` attribute .*is accessed, use `.*nestedTypes.elemType` instead.' options.either.type.nestedTypes.right.functor.wrapped ./deprecated-wrapped.nix NIX_ABORT_ON_WARN=1 checkConfigError 'The deprecated `.*functor.wrapped` attribute .*is accessed, use `.*nestedTypes.elemType` instead.' options.mergedEither.type.nestedTypes.left.functor.wrapped ./deprecated-wrapped.nix NIX_ABORT_ON_WARN=1 checkConfigError 'The deprecated `.*functor.wrapped` attribute .*is accessed, use `.*nestedTypes.elemType` instead.' options.mergedEither.type.nestedTypes.right.functor.wrapped ./deprecated-wrapped.nix # Even with multiple assignments, a type error should be thrown if any of them aren't valid checkConfigError 'A definition for option .* is not of type .*' \ Loading lib/tests/modules/deprecated-wrapped.nix +10 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ let nullOr functionTo coercedTo either ; in { Loading Loading @@ -56,6 +57,12 @@ in options.coercedTo = mkOption { type = coercedTo (listOf types.str) lib.id (listOf types.str); }; options.either = mkOption { type = either (listOf types.str) (listOf types.str); }; options.mergedEither = mkOption { type = either (listOf types.str) (listOf types.str); }; } ) # Module B Loading @@ -77,6 +84,9 @@ in options.mergedFunctionTo = mkOption { type = functionTo (listOf types.str); }; options.mergedEither = mkOption { type = either (listOf types.str) (listOf types.str); }; } ) ]; Loading lib/types.nix +3 −3 Original line number Diff line number Diff line Loading @@ -1134,13 +1134,13 @@ rec { then t2.merge loc defs else mergeOneOption loc defs; typeMerge = f': let mt1 = t1.typeMerge (elemAt f'.wrapped 0).functor; mt2 = t2.typeMerge (elemAt f'.wrapped 1).functor; let mt1 = t1.typeMerge (elemAt f'.payload.elemType 0).functor; mt2 = t2.typeMerge (elemAt f'.payload.elemType 1).functor; in if (name == f'.name) && (mt1 != null) && (mt2 != null) then functor.type mt1 mt2 else null; functor = (defaultFunctor name) // { wrapped = [ t1 t2 ]; }; functor = elemTypeFunctor name { elemType = [ t1 t2 ]; }; nestedTypes.left = t1; nestedTypes.right = t2; }; Loading Loading
doc/release-notes/rl-2505.section.md +1 −0 Original line number Diff line number Diff line Loading @@ -79,6 +79,7 @@ - `lib.types.nullOr` - `lib.types.functionTo` - `lib.types.coercedTo` - `lib.types.either` - Plasma 5 and Qt 5 based versions of associated software are deprecated in NixOS 25.05, and will be removed in NixOS 25.11. Users are encouraged to upgrade to Plasma 6. Loading
lib/tests/modules.sh +8 −0 Original line number Diff line number Diff line Loading @@ -439,6 +439,14 @@ NIX_ABORT_ON_WARN=1 checkConfigError 'The deprecated `.*functor.wrapped` attribu NIX_ABORT_ON_WARN=1 checkConfigError 'The deprecated `.*functor.wrapped` attribute .*is accessed, use `.*nestedTypes.elemType` instead.' options.coercedTo.type.functor.wrapped ./deprecated-wrapped.nix NIX_ABORT_ON_WARN=1 checkConfigError 'The deprecated `.*functor.wrapped` attribute .*is accessed, use `.*nestedTypes.elemType` instead.' options.coercedTo.type.nestedTypes.finalType.functor.wrapped ./deprecated-wrapped.nix NIX_ABORT_ON_WARN=1 checkConfigError 'The deprecated `.*functor.wrapped` attribute .*is accessed, use `.*nestedTypes.elemType` instead.' options.coercedTo.type.nestedTypes.coercedType.functor.wrapped ./deprecated-wrapped.nix # either NIX_ABORT_ON_WARN=1 checkConfigError 'The deprecated `.*functor.wrapped` attribute .*is accessed, use `.*nestedTypes.elemType` instead.' options.either.type.functor.wrapped ./deprecated-wrapped.nix NIX_ABORT_ON_WARN=1 checkConfigError 'The deprecated `.*functor.wrapped` attribute .*is accessed, use `.*nestedTypes.elemType` instead.' options.mergedEither.type.functor.wrapped ./deprecated-wrapped.nix NIX_ABORT_ON_WARN=1 checkConfigError 'The deprecated `.*functor.wrapped` attribute .*is accessed, use `.*nestedTypes.elemType` instead.' options.either.type.nestedTypes.left.functor.wrapped ./deprecated-wrapped.nix NIX_ABORT_ON_WARN=1 checkConfigError 'The deprecated `.*functor.wrapped` attribute .*is accessed, use `.*nestedTypes.elemType` instead.' options.either.type.nestedTypes.right.functor.wrapped ./deprecated-wrapped.nix NIX_ABORT_ON_WARN=1 checkConfigError 'The deprecated `.*functor.wrapped` attribute .*is accessed, use `.*nestedTypes.elemType` instead.' options.mergedEither.type.nestedTypes.left.functor.wrapped ./deprecated-wrapped.nix NIX_ABORT_ON_WARN=1 checkConfigError 'The deprecated `.*functor.wrapped` attribute .*is accessed, use `.*nestedTypes.elemType` instead.' options.mergedEither.type.nestedTypes.right.functor.wrapped ./deprecated-wrapped.nix # Even with multiple assignments, a type error should be thrown if any of them aren't valid checkConfigError 'A definition for option .* is not of type .*' \ Loading
lib/tests/modules/deprecated-wrapped.nix +10 −0 Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ let nullOr functionTo coercedTo either ; in { Loading Loading @@ -56,6 +57,12 @@ in options.coercedTo = mkOption { type = coercedTo (listOf types.str) lib.id (listOf types.str); }; options.either = mkOption { type = either (listOf types.str) (listOf types.str); }; options.mergedEither = mkOption { type = either (listOf types.str) (listOf types.str); }; } ) # Module B Loading @@ -77,6 +84,9 @@ in options.mergedFunctionTo = mkOption { type = functionTo (listOf types.str); }; options.mergedEither = mkOption { type = either (listOf types.str) (listOf types.str); }; } ) ]; Loading
lib/types.nix +3 −3 Original line number Diff line number Diff line Loading @@ -1134,13 +1134,13 @@ rec { then t2.merge loc defs else mergeOneOption loc defs; typeMerge = f': let mt1 = t1.typeMerge (elemAt f'.wrapped 0).functor; mt2 = t2.typeMerge (elemAt f'.wrapped 1).functor; let mt1 = t1.typeMerge (elemAt f'.payload.elemType 0).functor; mt2 = t2.typeMerge (elemAt f'.payload.elemType 1).functor; in if (name == f'.name) && (mt1 != null) && (mt2 != null) then functor.type mt1 mt2 else null; functor = (defaultFunctor name) // { wrapped = [ t1 t2 ]; }; functor = elemTypeFunctor name { elemType = [ t1 t2 ]; }; nestedTypes.left = t1; nestedTypes.right = t2; }; Loading