Commit graph

278 commits

Author SHA1 Message Date
Eelco Dolstra aed79cca1a * Another unused function.
svn path=/nixpkgs/trunk/; revision=18391
2009-11-17 15:36:48 +00:00
Eelco Dolstra a56509c0db * Remove some more unused functions.
svn path=/nixpkgs/trunk/; revision=18390
2009-11-17 15:31:48 +00:00
Eelco Dolstra 802fa4ba0b * Remove sumArgs and its few remaining uses. Idem for composedArgs.
svn path=/nixpkgs/trunk/; revision=18388
2009-11-17 15:26:22 +00:00
Nicolas Pierron da1311b893 * Add the Go Programming Language compiler.
svn path=/nixpkgs/trunk/; revision=18348
2009-11-14 20:14:28 +00:00
Nicolas Pierron 7482474aef * Improve showVal: handle integer and strings.
svn path=/nixpkgs/trunk/; revision=18346
2009-11-14 20:14:15 +00:00
Nicolas Pierron d791b830aa * Fix typo and clarify why you should not use "mkFixStrictness" on top of
plain list or attribute set.

svn path=/nixpkgs/trunk/; revision=18260
2009-11-07 16:24:11 +00:00
Nicolas Pierron b901c0e808 * Add an awful hack to bypass the strictness of isType operators for
option definitions.

svn path=/nixpkgs/trunk/; revision=18259
2009-11-07 16:09:04 +00:00
Nicolas Pierron 8b47086b85 * Change the check function to accept sub-modules with arguments in
option definitions.

svn path=/nixpkgs/trunk/; revision=18252
2009-11-07 12:15:39 +00:00
Nicolas Pierron bb077b253f * Add a function to sort a list.
* Add a new property to order NixOS definitions without creating
  dependencies between snippets.
* Add mkHeader & mkFooter properties (special case of mkOrder).

svn path=/nixpkgs/trunk/; revision=18242
2009-11-07 01:59:55 +00:00
Nicolas Pierron 88f113d032 * Add a function to replace "pkgs.checker". The function checkModule does a
traversal of all definitions and also check definitions contained inside
  sub-modules.

svn path=/nixpkgs/trunk/; revision=18241
2009-11-07 01:59:50 +00:00
Nicolas Pierron 233d72e4fb * Add "_args" to all sub-module configurations result. This attribute
enable argument introspection outside of the scope of each sub-module.

svn path=/nixpkgs/trunk/; revision=18240
2009-11-07 01:59:45 +00:00
Nicolas Pierron 10d74af2f6 * Add a type to handle environment variables with the usual string
separator ":".

svn path=/nixpkgs/trunk/; revision=18239
2009-11-07 01:58:56 +00:00
Nicolas Pierron 09bed4bffc * Report file locations in the stack-trace when multiple option
declarations cannot be merged.

svn path=/nixpkgs/trunk/; revision=18149
2009-11-05 16:36:03 +00:00
Nicolas Pierron d8bbae877a * Add a type for read-only options. Options which are only declared
are used when a module produces read-only data for other modules.

svn path=/nixpkgs/trunk/; revision=18148
2009-11-05 15:39:45 +00:00
Nicolas Pierron 5684506470 * Add isDefined to each options. This will clean-up NixOS introspection.
svn path=/nixpkgs/trunk/; revision=18147
2009-11-05 15:39:39 +00:00
Eelco Dolstra 374bb28dd8 * The libx86 package refers to platforms.netbsd, so add it.
svn path=/nixpkgs/trunk/; revision=17987
2009-10-28 12:25:06 +00:00
Eelco Dolstra a565a82e4e svn path=/nixpkgs/trunk/; revision=17934 2009-10-23 07:34:56 +00:00
Michael Raskin a9a462f13d Try to add missing flip function for NixOS
svn path=/nixpkgs/trunk/; revision=17933
2009-10-23 07:00:15 +00:00
Nicolas Pierron b15cbb639e Refactor a bit to add names to intermediate computations. Add a cross
temporary result to fetch information from the evaluation to make them
available inside the option declaration.

Add: isNotDefined flag inside the option.

svn path=/nixpkgs/trunk/; revision=17766
2009-10-12 17:51:21 +00:00
Nicolas Pierron 81694a7f54 * modules.nix: use catAttrs function instead of hand made code.
svn path=/nixpkgs/trunk/; revision=17760
2009-10-12 15:50:59 +00:00
Nicolas Pierron 19648abc05 Revert previous commit because this is implicit. Fix property evaluation
error which arose when one module define a value with "mkDefaultValue"
and another module define its value with "mkIf <false>".

svn path=/nixpkgs/trunk/; revision=17759
2009-10-12 15:16:22 +00:00
Nicolas Pierron e82843144c do not delay mkOverride on options which are does not have sub modules.
svn path=/nixpkgs/trunk/; revision=17758
2009-10-12 15:07:31 +00:00
Nicolas Pierron 03eab95618 Only allow properties with a onGlobalEval function to go through specific
types.

svn path=/nixpkgs/trunk/; revision=17756
2009-10-12 13:37:00 +00:00
Nicolas Pierron 926f20a1ee Revert "* Revert the last two commits ..." (rev 17738) & Fix.
svn path=/nixpkgs/trunk/; revision=17740
2009-10-09 23:03:24 +00:00
Eelco Dolstra 037a777b7d * Enable builds on OpenBSD.
svn path=/nixpkgs/trunk/; revision=17739
2009-10-09 19:42:59 +00:00
Eelco Dolstra 24b50e92ee * Revert the last two commits since they break every job in the
buildfarm ("undefined variable `delayPropertiesTemplate'").

svn path=/nixpkgs/trunk/; revision=17738
2009-10-09 19:34:28 +00:00
Nicolas Pierron d11481e9bf Add mkOverrideTemplate (currently the same as mkOverride).
svn path=/nixpkgs/trunk/; revision=17737
2009-10-09 18:11:36 +00:00
Nicolas Pierron bb16a7f08d Replace a counter intuitive behaviour of module evaluations.
- types.nix:
Introduce a new flag named "delayProperties" which define either that
properties should be evaluated (when false) or that they should be delaied
through the type structure.

- properties.nix:
Generalized the delayProperties function to make it work with the iter
functions of option types.

- modules.nix:
Replace evalProperties by a condition based on the value of the
"delayProperties" flag of the option type.  If the flag does not exists or
if it is false, then the system behaves as always.  Otherwise it delays
the properties from the current value to each values contained inside it.

svn path=/nixpkgs/trunk/; revision=17736
2009-10-09 18:11:30 +00:00
Nicolas Pierron fd0396037a extract function unifyOptionModule from moduleMerge. This function is
used to convert option sets, provided inside option declarations, to a
module.

svn path=/nixpkgs/trunk/; revision=17735
2009-10-09 18:11:24 +00:00
Marc Weber 0e6c476d60 fix some typos in comments
svn path=/nixpkgs/trunk/; revision=17708
2009-10-08 00:54:26 +00:00
Nicolas Pierron e528b920bb Add the reverseList function.
svn path=/nixpkgs/trunk/; revision=17676
2009-10-06 13:36:46 +00:00
Nicolas Pierron 088e6995a2 Improve the efficiency of stringToCharacters.
svn path=/nixpkgs/trunk/; revision=17671
2009-10-06 09:21:58 +00:00
Nicolas Pierron 915fa6a08f introduce the stringAsChars ans replaceChars functions.
svn path=/nixpkgs/trunk/; revision=17670
2009-10-06 09:21:52 +00:00
Nicolas Pierron bbb4ce1dd7 Extract the path done inside the iteration process of the option type and
give it as argument to each sub-module.

With the type "types.attrsOf types.optionSet", you will obtain the name of
the attribute in which the sub-modules are contained.

svn path=/nixpkgs/trunk/; revision=17669
2009-10-06 09:21:46 +00:00
Nicolas Pierron 1f68748a8b Add removePrefix function.
svn path=/nixpkgs/trunk/; revision=17667
2009-10-06 09:21:39 +00:00
Nicolas Pierron c3d328ca48 Fix sub-module argument manipulation: Avoid using an empty set to check
the type of the module.

svn path=/nixpkgs/trunk/; revision=17666
2009-10-06 09:21:17 +00:00
Nicolas Pierron ba09982edb Fix merge function of types.
svn path=/nixpkgs/trunk/; revision=17649
2009-10-05 18:10:42 +00:00
Nicolas Pierron 3872882e93 Fix collect example.
svn path=/nixpkgs/trunk/; revision=17510
2009-09-29 15:34:19 +00:00
Nicolas Pierron 00127bef3f Move zip & zipWithNames from misc.nix to attrsets.nix and rename them to
zipAttrs*.

Add recursiveUpdate functions based on zipAttrs.

svn path=/nixpkgs/trunk/; revision=17506
2009-09-29 14:57:00 +00:00
Nicolas Pierron 4c43afbaf6 export definitions to be used in conjunctions with extraConfigs. With such
method, properties evaluated at the evaluation time are still on the values
which makes this interresting to use in conjunction with extraConfigs.
The extraConfigs values are merged with the other values and then the
properties gets evaluated.

Thus, we can keep properties like mkOverride with this method.

svn path=/nixpkgs/trunk/; revision=17482
2009-09-28 18:22:55 +00:00
Nicolas Pierron 33d43ac18b Add extraConfigs attribute inside options. This attribute is used to
insert definitions from an external location.  As opposed to other
defintions, these definitions are always embedded into a list which allow
to add multiple definitions with one module.

!!! This feature _should not_ be used as a new mean to define options.

svn path=/nixpkgs/trunk/; revision=17481
2009-09-28 18:22:49 +00:00
Nicolas Pierron b3b40ebf79 Add setAttrByPath:
- used to defined an attribute with its path as a list of attribute names.

svn path=/nixpkgs/trunk/; revision=17480
2009-09-28 18:22:44 +00:00
Nicolas Pierron 7ff2778cc6 Add splitString:
splitString "." "foo.bar.baz"  returns  ["foo" "bar" "baz"]

svn path=/nixpkgs/trunk/; revision=17479
2009-09-28 18:22:37 +00:00
Nicolas Pierron b0f639844a the tryEval builtin does not have a strict evaluation. Add the toXML
builtin to force the evaluation of the configuration value.  Thus the
success flag returned by tryEval corespond to the success of the
whole evaluation.

svn path=/nixpkgs/trunk/; revision=17478
2009-09-28 18:22:31 +00:00
Nicolas Pierron fad1b41fe4 externals argumental are now taking precedence over the result of
moduleMerge because we may need to alter the result of the configuration
before using it inside other options.

svn path=/nixpkgs/trunk/; revision=17477
2009-09-28 18:22:24 +00:00
Nicolas Pierron e6399964cb Add the zipLists and zipListsWith functions.
svn path=/nixpkgs/trunk/; revision=17476
2009-09-28 18:22:14 +00:00
Nicolas Pierron 13f467fc84 Remove values coming from the original sources because this may cause the evaluation of unsafe code.
Instead add the computed value under tryEval to catch bad evaluations.

svn path=/nixpkgs/trunk/; revision=17453
2009-09-26 23:01:35 +00:00
Marc Weber 15afc2fa04 fix mergeAttrsWithFunc (also merge in names which are only in the snd attrs)
svn path=/nixpkgs/trunk/; revision=17406
2009-09-24 18:22:33 +00:00
Eelco Dolstra b7a90c11d3 * selectMaintained (renamed): don't use meta.maintainer, just use
meta.platforms.
* Valgrind *should* work on Darwin now, except that our GCC doesn't
  recognise the -arch flag.

svn path=/nixpkgs/trunk/; revision=17372
2009-09-23 19:45:02 +00:00
Eelco Dolstra 12395c36a9 * Typos.
svn path=/nixpkgs/trunk/; revision=17348
2009-09-22 09:26:18 +00:00