1
1
forked from extern/flakelight

Clarify passing of inputs in documentation

This commit is contained in:
Archit Gupta 2024-06-29 17:12:34 -07:00
parent f34d07dd57
commit b7002c7cad
2 changed files with 8 additions and 8 deletions

View File

@ -92,15 +92,15 @@ modules. These inputs get passed as the `inputs` module argument, and are used
for `inputs` and `inputs'` in the package set.
Default values are automatically initialized from your flake inputs by reading
your `flake.lock`. Note that this does not include the `self` argument, which
must be passed explicitly if you want to use it. The default values also are not
affected by nix command flags like `--override-input`, so inputs should be
passed to enable full CLI functionality.
your `flake.lock`. Note that this does not include the `self` argument; for
using `self`, use `inherit inputs` or otherwise define inputs. The default
values also are not affected by nix command flags like `--override-input`, so
inputs should be passed to enable full CLI functionality.
Flakelight will add a recent `nixpkgs` input if your flake does not have one.
Other flakelight modules may provide default inputs for their dependencies.
To use a different nixpkgs from the built-in default:
To use a different nixpkgs from the built-in default (passing all inputs):
```nix
{
@ -108,7 +108,7 @@ To use a different nixpkgs from the built-in default:
flakelight.url = "github:nix-community/flakelight";
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
};
outputs = { flakelight, ... }:
outputs = { flakelight, ... }@inputs:
flakelight ./. {
inherit inputs;
};

View File

@ -73,7 +73,7 @@ To use a different nixpkgs, you can instead use:
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
flakelight.url = "github:nix-community/flakelight";
};
outputs = { flakelight, ... }:
outputs = { flakelight, ... }@inputs:
flakelight ./. {
inherit inputs;
devShell.packages = pkgs: [ pkgs.hello pkgs.coreutils ];
@ -182,7 +182,7 @@ like the following. Most attributes can be autoloaded.
{
description = "My C application.";
inputs.flakelight.url = "github:nix-community/flakelight";
outputs = { flakelight, ... }@inputs:
outputs = { flakelight, ... }:
flakelight ./. {
license = "AGPL-3.0-or-later";