diff options
author | Nicolas Pierron <nicolas.b.pierron@gmail.com> | 2009-10-06 09:21:17 +0000 |
---|---|---|
committer | Nicolas Pierron <nicolas.b.pierron@gmail.com> | 2009-10-06 09:21:17 +0000 |
commit | c3d328ca484a8fe918358e5c575d490ca7aae6ad (patch) | |
tree | 6a6ce59e84df8fd313d15b2ecc57fad93fb0b84e /pkgs/lib/modules.nix | |
parent | 1a093f3b730c9e721906db4f7a407510c8f4c316 (diff) | |
download | nixpkgs-c3d328ca484a8fe918358e5c575d490ca7aae6ad.tar nixpkgs-c3d328ca484a8fe918358e5c575d490ca7aae6ad.tar.gz nixpkgs-c3d328ca484a8fe918358e5c575d490ca7aae6ad.tar.bz2 nixpkgs-c3d328ca484a8fe918358e5c575d490ca7aae6ad.tar.lz nixpkgs-c3d328ca484a8fe918358e5c575d490ca7aae6ad.tar.xz nixpkgs-c3d328ca484a8fe918358e5c575d490ca7aae6ad.tar.zst nixpkgs-c3d328ca484a8fe918358e5c575d490ca7aae6ad.zip |
Fix sub-module argument manipulation: Avoid using an empty set to check
the type of the module. svn path=/nixpkgs/trunk/; revision=17666
Diffstat (limited to 'pkgs/lib/modules.nix')
-rw-r--r-- | pkgs/lib/modules.nix | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/pkgs/lib/modules.nix b/pkgs/lib/modules.nix index 1b278e65f3d..0df5c63da55 100644 --- a/pkgs/lib/modules.nix +++ b/pkgs/lib/modules.nix @@ -192,16 +192,13 @@ rec { # locations to sub-options declarations decls = map (m: - mapSubOptions (subModule: - let module = lib.applyIfFunction subModule {}; in + mapSubOptions (subModule: (args: + let module = lib.applyIfFunction subModule args; in if lib.isModule module then - { inherit (m) key; } // subModule + { inherit (m) key; } // module else - args: { - inherit (m) key; - options = lib.applyIfFunction subModule args; - } - ) m.options + { inherit (m) key; options = module; } + )) m.options ) (declarationsOf name); in addOptionMakeUp |