diff options
author | Alyssa Ross <hi@alyssa.is> | 2019-02-07 15:19:21 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2019-02-07 23:35:47 +0000 |
commit | e5013c05a2f845255debf94318ab38ecef1c186b (patch) | |
tree | bec11a0bd31d3432a16899e5539f1098f1c168a4 /nixpkgs/lib/types.nix | |
parent | 4fc07c92ec07cafcf6d56143ea7334693143ef88 (diff) | |
parent | 2d2f10475138b7206572dc3ec288184df2be022e (diff) | |
download | nixlib-e5013c05a2f845255debf94318ab38ecef1c186b.tar nixlib-e5013c05a2f845255debf94318ab38ecef1c186b.tar.gz nixlib-e5013c05a2f845255debf94318ab38ecef1c186b.tar.bz2 nixlib-e5013c05a2f845255debf94318ab38ecef1c186b.tar.lz nixlib-e5013c05a2f845255debf94318ab38ecef1c186b.tar.xz nixlib-e5013c05a2f845255debf94318ab38ecef1c186b.tar.zst nixlib-e5013c05a2f845255debf94318ab38ecef1c186b.zip |
Merge commit '2d2f10475138b7206572dc3ec288184df2be022e'
Diffstat (limited to 'nixpkgs/lib/types.nix')
-rw-r--r-- | nixpkgs/lib/types.nix | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/nixpkgs/lib/types.nix b/nixpkgs/lib/types.nix index d1ece2402ad7..7a88e1b9e36b 100644 --- a/nixpkgs/lib/types.nix +++ b/nixpkgs/lib/types.nix @@ -284,8 +284,7 @@ rec { (mergeDefinitions (loc ++ [name]) elemType defs).optionalValue ) # Push down position info. - (map (def: listToAttrs (mapAttrsToList (n: def': - { name = n; value = { inherit (def) file; value = def'; }; }) def.value)) defs))); + (map (def: mapAttrs (n: v: { inherit (def) file; value = v; }) def.value) defs))); getSubOptions = prefix: elemType.getSubOptions (prefix ++ ["<name>"]); getSubModules = elemType.getSubModules; substSubModules = m: attrsOf (elemType.substSubModules m); @@ -470,10 +469,7 @@ rec { # Obsolete alternative to configOf. It takes its option # declarations from the ‘options’ attribute of containing option # declaration. - optionSet = mkOptionType { - name = builtins.trace "types.optionSet is deprecated; use types.submodule instead" "optionSet"; - description = "option set"; - }; + optionSet = builtins.throw "types.optionSet is deprecated; use types.submodule instead" "optionSet"; # Augment the given type with an additional type check function. addCheck = elemType: check: elemType // { check = x: elemType.check x && check x; }; |