mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
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).
This commit is contained in:
parent
7c5b287ca1
commit
3c15d578d4
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user