diff options
author | Evgeny Egorochkin <phreedom@yandex.ru> | 2013-03-13 15:05:30 +0100 |
---|---|---|
committer | Evgeny Egorochkin <phreedom@yandex.ru> | 2013-08-22 23:17:30 +0300 |
commit | 993deb1a4a96971f0de41fa596bb2ddd134ef171 (patch) | |
tree | 21ea8505b277940a977d87f118d90e10ecab7a07 /pkgs/lib/options.nix | |
parent | 6c97e9ef722e60d93b843254cd90591ed26bda97 (diff) | |
download | nixpkgs-993deb1a4a96971f0de41fa596bb2ddd134ef171.tar nixpkgs-993deb1a4a96971f0de41fa596bb2ddd134ef171.tar.gz nixpkgs-993deb1a4a96971f0de41fa596bb2ddd134ef171.tar.bz2 nixpkgs-993deb1a4a96971f0de41fa596bb2ddd134ef171.tar.lz nixpkgs-993deb1a4a96971f0de41fa596bb2ddd134ef171.tar.xz nixpkgs-993deb1a4a96971f0de41fa596bb2ddd134ef171.tar.zst nixpkgs-993deb1a4a96971f0de41fa596bb2ddd134ef171.zip |
Hopefully a fixed version of Refactor: introduce isType reducing redundancy.
Coding-by-sed wasn't a good idea :(
Diffstat (limited to 'pkgs/lib/options.nix')
-rw-r--r-- | pkgs/lib/options.nix | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkgs/lib/options.nix b/pkgs/lib/options.nix index 620de84e707..a7d1a3483a0 100644 --- a/pkgs/lib/options.nix +++ b/pkgs/lib/options.nix @@ -11,10 +11,10 @@ with import ./properties.nix; rec { - inherit (lib) typeOf; + inherit (lib) isType; - isOption = attrs: (typeOf attrs) == "option"; + isOption = isType "option"; mkOption = attrs: attrs // { _type = "option"; # name (this is the name of the attributem it is automatically generated by the traversal) @@ -190,7 +190,7 @@ rec { defValue = builtins.getAttr defName defs; optValue = builtins.getAttr defName opts; in - if typeOf defValue == "option" + if isOption defValue then # `defValue' is an option. if hasAttr defName opts |