1
0
Fork 0
mirror of https://github.com/edolstra/flake-compat.git synced 2024-12-14 11:47:34 +00:00

Merge pull request #69 from edolstra/add-outputs-attr

Return all outputs
This commit is contained in:
Eelco Dolstra 2024-11-27 16:47:01 +01:00 committed by GitHub
commit 9ed2ac151e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View file

@ -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
```

View file

@ -229,6 +229,8 @@ let
in
rec {
outputs = result;
defaultNix =
(builtins.removeAttrs result ["__functor"])
// (if result ? defaultPackage.${system} then { default = result.defaultPackage.${system}; } else {})