forked from extern/flakelight
Move shorter API guide sections before module options
This commit is contained in:
parent
e5db2dcd86
commit
3f595f5f2c
59
api_guide.md
59
api_guide.md
@ -46,6 +46,36 @@ If you need access to module args, you can write it as bellow:
|
||||
}
|
||||
```
|
||||
|
||||
## Module arguments
|
||||
|
||||
The following module arguments are available:
|
||||
|
||||
- `src`: The flake's source directory
|
||||
- `lib`: nixpkgs lib attribute
|
||||
- `config`: configured option values
|
||||
- `options`: available options
|
||||
- `flakelight`: flakelight lib attribute
|
||||
- `inputs`: value of inputs option
|
||||
- `outputs`: resulting output (i.e. final flake attributes)
|
||||
- `autoloadArgs`: arguments passed to supported autoloaded files
|
||||
|
||||
## Additional pkgs values
|
||||
|
||||
Functions that take the package set as an argument, such as package definitions
|
||||
or `perSystem` values, have several additional values available in the package
|
||||
set.
|
||||
|
||||
The `src`, `inputs`, `outputs`, and `flakelight` attributes are the same as the
|
||||
above module arguments.
|
||||
|
||||
`inputs'` and `outputs'` are transformed versions of `inputs` and `outputs` with
|
||||
system preselected. I.e., `inputs.emacs-overlay.packages.x86_64-linux.default`
|
||||
can be accessed as `inputs'.emacs-overlay.packages.default`.
|
||||
|
||||
`defaultMeta` is a derivation meta attribute set generated from options. Modules
|
||||
setting `packages.default` should use this to allow meta attributes to be
|
||||
configured.
|
||||
|
||||
## Module options
|
||||
|
||||
This section covers the options available to modules.
|
||||
@ -726,32 +756,3 @@ check that is added if editorconfig configuration is detected.
|
||||
|
||||
`flakelight.builtinFormatters` can be set to false to disable the default
|
||||
formatting configuration.
|
||||
|
||||
## Module arguments
|
||||
|
||||
The following module arguments are available:
|
||||
|
||||
- `src`: The flake's source directory
|
||||
- `lib`: nixpkgs lib attribute
|
||||
- `config`: configured option values
|
||||
- `options`: available options
|
||||
- `flakelight`: flakelight lib attribute
|
||||
- `inputs`: value of inputs option
|
||||
- `outputs`: resulting output (i.e. final flake attributes)
|
||||
- `autoloadArgs`: arguments passed to supported autoloaded files
|
||||
|
||||
## Additional pkgs values
|
||||
|
||||
For functions that take package arguments, several additional values are
|
||||
available in the package set.
|
||||
|
||||
The `src`, `inputs`, `outputs`, and `flakelight` attributes are the same as the
|
||||
above module arguments.
|
||||
|
||||
`inputs'` and `outputs'` are transformed versions of `inputs` and `outputs` with
|
||||
system preselected. I.e., `inputs.emacs-overlay.packages.x86_64-linux.default`
|
||||
can be accessed as `inputs'.emacs-overlay.packages.default`.
|
||||
|
||||
`defaultMeta` is a derivation meta attribute set generated from options. Modules
|
||||
setting `packages.default` should use this to allow meta attributes to be
|
||||
configured.
|
||||
|
Loading…
Reference in New Issue
Block a user