Pass inputs in examples

This commit is contained in:
Archit Gupta 2024-05-20 20:42:53 -07:00
parent c576f0b59a
commit 9dca671d0e
2 changed files with 1 additions and 13 deletions

View File

@ -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;
}; };

View File

@ -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 ];
}; };
} }