mirror of
https://github.com/nix-community/flakelight.git
synced 2024-10-05 09:21:55 +02:00
Pass inputs in examples
This commit is contained in:
parent
c576f0b59a
commit
9dca671d0e
13
API_GUIDE.md
13
API_GUIDE.md
@ -109,19 +109,6 @@ To use a different nixpkgs from the built-in default:
|
|||||||
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
|
||||||
};
|
};
|
||||||
outputs = { flakelight, ... }:
|
outputs = { flakelight, ... }:
|
||||||
flakelight ./. { };
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
You can also explicitly pass in inputs, overriding defaults, as follows:
|
|
||||||
|
|
||||||
```nix
|
|
||||||
{
|
|
||||||
inputs = {
|
|
||||||
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
|
|
||||||
flakelight.url = "github:nix-community/flakelight";
|
|
||||||
};
|
|
||||||
outputs = { flakelight, ... }@inputs:
|
|
||||||
flakelight ./. {
|
flakelight ./. {
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
};
|
};
|
||||||
|
@ -75,6 +75,7 @@ To use a different nixpkgs, you can instead use:
|
|||||||
};
|
};
|
||||||
outputs = { flakelight, ... }:
|
outputs = { flakelight, ... }:
|
||||||
flakelight ./. {
|
flakelight ./. {
|
||||||
|
inherit inputs;
|
||||||
devShell.packages = pkgs: [ pkgs.hello pkgs.coreutils ];
|
devShell.packages = pkgs: [ pkgs.hello pkgs.coreutils ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user