mirror of
https://github.com/edolstra/flake-compat.git
synced 2024-12-14 11:47:34 +00:00
Return all outputs
They were already exposed in `defaultNix` and `shellNix`, but "polluted" by a `default` attribute and probably not very intuitive to find. Issue #15.
This commit is contained in:
parent
e3408d6ab2
commit
a1b45cd4a2
2 changed files with 8 additions and 0 deletions
|
@ -27,3 +27,9 @@ 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`.
|
||||
|
||||
You can access any flake output via the `outputs` attribute returned by `flake-compat`, e.g.
|
||||
|
||||
```nix
|
||||
(import ... { src = ./.; }).outputs.packages.x86_64-linux.default
|
||||
```
|
||||
|
|
|
@ -229,6 +229,8 @@ let
|
|||
|
||||
in
|
||||
rec {
|
||||
outputs = result;
|
||||
|
||||
defaultNix =
|
||||
(builtins.removeAttrs result ["__functor"])
|
||||
// (if result ? defaultPackage.${system} then { default = result.defaultPackage.${system}; } else {})
|
||||
|
|
Loading…
Reference in a new issue