nixpkgs/pkgs/lib
Nicolas Pierron 249a3a314f Add: Handle a way to factor conditions.
mkIf config.foo.enable {
  require = [ .. ];

  environment = {
    // infer the else part.
    extraPackages = [pkgs.foo];
    etc = mkThenElse {
      thenPart = { .. };
      elsePart = { .. };
    };
  };
}

Fix: UniqFlattenAttr compare configuration without the "require" attribute.

svn path=/nixpkgs/trunk/; revision=13372
2008-11-23 00:19:18 +00:00
..
default.nix Add: Handle a way to factor conditions. 2008-11-23 00:19:18 +00:00
strings-with-deps.nix Merged with trunk again 2008-01-23 18:11:03 +00:00