File tree Expand file tree Collapse file tree 4 files changed +22
-3
lines changed Expand file tree Collapse file tree 4 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 7979 - ` lib.types.nullOr `
8080 - ` lib.types.functionTo `
8181 - ` lib.types.coercedTo `
82+ - ` lib.types.either `
8283
8384- 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.
8485
Original file line number Diff line number Diff line change @@ -439,6 +439,14 @@ NIX_ABORT_ON_WARN=1 checkConfigError 'The deprecated `.*functor.wrapped` attribu
439439NIX_ABORT_ON_WARN=1 checkConfigError ' The deprecated `.*functor.wrapped` attribute .*is accessed, use `.*nestedTypes.elemType` instead.' options.coercedTo.type.functor.wrapped ./deprecated-wrapped.nix
440440NIX_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
441441NIX_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
442+ # either
443+ 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
444+ 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
445+
446+ 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
447+ 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
448+ 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
449+ 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
442450
443451# Even with multiple assignments, a type error should be thrown if any of them aren't valid
444452checkConfigError ' A definition for option .* is not of type .*' \
Original file line number Diff line number Diff line change 1010 nullOr
1111 functionTo
1212 coercedTo
13+ either
1314 ;
1415in
1516{
5657 options . coercedTo = mkOption {
5758 type = coercedTo ( listOf types . str ) lib . id ( listOf types . str ) ;
5859 } ;
60+ options . either = mkOption {
61+ type = either ( listOf types . str ) ( listOf types . str ) ;
62+ } ;
63+ options . mergedEither = mkOption {
64+ type = either ( listOf types . str ) ( listOf types . str ) ;
65+ } ;
5966 }
6067 )
6168 # Module B
7784 options . mergedFunctionTo = mkOption {
7885 type = functionTo ( listOf types . str ) ;
7986 } ;
87+ options . mergedEither = mkOption {
88+ type = either ( listOf types . str ) ( listOf types . str ) ;
89+ } ;
8090 }
8191 )
8292 ] ;
Original file line number Diff line number Diff line change @@ -1134,13 +1134,13 @@ rec {
11341134 then t2 . merge loc defs
11351135 else mergeOneOption loc defs ;
11361136 typeMerge = f' :
1137- let mt1 = t1 . typeMerge ( elemAt f' . wrapped 0 ) . functor ;
1138- mt2 = t2 . typeMerge ( elemAt f' . wrapped 1 ) . functor ;
1137+ let mt1 = t1 . typeMerge ( elemAt f' . payload . elemType 0 ) . functor ;
1138+ mt2 = t2 . typeMerge ( elemAt f' . payload . elemType 1 ) . functor ;
11391139 in
11401140 if ( name == f' . name ) && ( mt1 != null ) && ( mt2 != null )
11411141 then functor . type mt1 mt2
11421142 else null ;
1143- functor = ( defaultFunctor name ) // { wrapped = [ t1 t2 ] ; } ;
1143+ functor = elemTypeFunctor name { elemType = [ t1 t2 ] ; } ;
11441144 nestedTypes . left = t1 ;
11451145 nestedTypes . right = t2 ;
11461146 } ;
You can’t perform that action at this time.
0 commit comments