Compare commits
1 commit
main
...
blaggacao/
Author | SHA1 | Date | |
---|---|---|---|
3ae3af556f |
19
README.md
19
README.md
|
@ -27,3 +27,22 @@ Afterwards, create a `default.nix` file containing the following:
|
|||
```
|
||||
|
||||
If you would like a `shell.nix` file, create one containing the above, replacing `defaultNix` with `shellNix`.
|
||||
|
||||
|
||||
## Call Parent Flake (second use)
|
||||
|
||||
To use, add the following to your subflake's flake.nix:
|
||||
|
||||
```nix
|
||||
{
|
||||
inputs.flake-compat.url = "github:edolstra/flake-compat";
|
||||
}
|
||||
```
|
||||
|
||||
Afterwards, you can use it to call a flake from anywhere, including a parent directory, as follows:
|
||||
|
||||
```nix
|
||||
{
|
||||
parent = flake-compat ../.;
|
||||
}
|
||||
```
|
||||
|
|
|
@ -188,6 +188,8 @@ let
|
|||
|
||||
in
|
||||
rec {
|
||||
inherit result; # consumed by flake.nix
|
||||
|
||||
defaultNix =
|
||||
(builtins.removeAttrs result ["__functor"])
|
||||
// (if result ? defaultPackage.${system} then { default = result.defaultPackage.${system}; } else {})
|
||||
|
|
Loading…
Reference in a new issue