-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
module system: internalise prefix-stripping logic
Add an internal `_module.sources` option which specifies a list of sources to be used by `lib.strings.lookupPrefix` to render paths in option values and declarations. The sources always include the `nixpkgsSource`, which links to the manual for `lib.trivial.manualRevision`. Implement this logic in a new `lib.optionsToDocTemplate` function which deprecates `lib.optionAttrSetToDocList`. The returned option declarations are now attrsets as returned by `lookupPrefix`. If `decl.source` is set, then the declaration is rendered using angle bracket syntax: `<${decl.source}/${decl.path}>`. Other consumers are free to treat the source name as they intend. Deprecate `documentation.nixos.extraModuleSources`, converting it to `_module.sources` with `name` set to `_unknown`. We now call `eval-cacheable-options.nix` with a single filtered nixpkgs source, which is easier to maintain than a bunch of paths and allows things to work more smoothly (mainly `lib.trivial.release` can access ../.version, and `lib.nixpkgsSource` works as intended so we don't need to special-case anything).
- Loading branch information
Showing
12 changed files
with
158 additions
and
215 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.