nixpkgs/pkgs/lib
Eelco Dolstra d897fc5501 * Some prototype code to make dealing with options in Nixpkgs/NixOS
easier.  Instead of writing

    config.get ["foo" "bar"]

  it would be much cleaner to just write

    config.foo.bar

  only this doesn't handle the case where option foo.bar is not
  supplied in the configuration; in that case we need to take the
  default value from some set of option definitions
  (system/options.nix in NixOS).

  Following a suggestion from Martin, the function `combine' (need
  better name) takes a set of option definitions (which follow the
  attribute set structure of the options) and a set of options and
  fills in missing values in the latter with default values from the
  former.  This only works with very recent versions of Nix (it needs
  Marc Weber's listToAttrs primop).

svn path=/nixpkgs/trunk/; revision=9203
2007-08-27 15:10:48 +00:00
..
default-unstable.nix renamed chosenOptions to chooseOptionsByFlags and added support for optionals 2007-08-19 17:24:05 +00:00
default.nix Added conditional concatenation and used it for name and configureFlags generation. 2007-08-15 21:17:11 +00:00
options.nix * Some prototype code to make dealing with options in Nixpkgs/NixOS 2007-08-27 15:10:48 +00:00
strings-with-deps.nix Added strings-with-deps, a set of functions that are intended to 2007-08-26 21:59:31 +00:00