diff options
author | Dima <dgoldin+github@protonmail.ch> | 2019-11-23 15:21:25 +0100 |
---|---|---|
committer | Dima <dgoldin+github@protonmail.ch> | 2019-11-23 15:40:45 +0100 |
commit | 3c15d578d4271142d7e596b9dc708cf07da48fa8 (patch) | |
tree | 7f735f5e875ab7d2435ae221ce3a7b0c9b6c2adf /nixos/lib/make-options-doc/default.nix | |
parent | 7c5b287ca17198627b243973a5702e9ad6ee1d4b (diff) |
make-options-doc: fix string context issues
When using `documentation.nixos.includeAllModules = true;` with external
modules, the string context might contain dependencies to derivations
and so `toFile` refuses to evaluate;
```
error: in 'toFile': the file 'options.xml' cannot refer to derivation outputs, at
[...]/nixpkgs/nixos/lib/make-options-doc/default.nix:89:16
```
This is not an issue when using `writeText` (instead of manually
stripping the context).
Diffstat (limited to 'nixos/lib/make-options-doc/default.nix')
-rw-r--r-- | nixos/lib/make-options-doc/default.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/lib/make-options-doc/default.nix b/nixos/lib/make-options-doc/default.nix index 35c8b543dece..eee8f612410d 100644 --- a/nixos/lib/make-options-doc/default.nix +++ b/nixos/lib/make-options-doc/default.nix @@ -86,7 +86,7 @@ let optionsList = lib.sort optionLess optionsListDesc; # Convert the list of options into an XML file. - optionsXML = builtins.toFile "options.xml" (builtins.toXML optionsList); + optionsXML = pkgs.writeText "options.xml" (builtins.toXML optionsList); optionsNix = builtins.listToAttrs (map (o: { name = o.name; value = removeAttrs o ["name" "visible" "internal"]; }) optionsList); |