diff --git a/doc/manual/writing-nix-expressions.xml b/doc/manual/writing-nix-expressions.xml index 9f7fed8fde..744ae6839c 100644 --- a/doc/manual/writing-nix-expressions.xml +++ b/doc/manual/writing-nix-expressions.xml @@ -1288,8 +1288,9 @@ command-line argument. See builtins.add e1 e2 - Add integers e1 and - e2.. + Return the sum of the integers + e1 and + e2. @@ -1710,7 +1711,79 @@ in foo of e. The main application for toXML is to communicate information with the builder in a more structured format than plain environment - variables. + variables. + + Passing information to a builder + using <function>toXML</function> + + + $out/server-conf.xml + "; + + stylesheet = builtins.toFile "stylesheet.xsl" " + + + + + + + + + + + + + "; + + servlets = builtins.toXML [ + { path = "/bugtracker"; war = jira + "/lib/atlassian-jira.war"; } + { path = "/wiki"; war = uberwiki + "/uberwiki.war"; } + ]; +})]]> + + + + The string in the attribute servlets + evaluates to something like this: + + + + + + + + + + + + + + + + + + + + + + +]]> + + + +