diff --git a/README.md b/README.md index 3e99466..7dd387c 100644 --- a/README.md +++ b/README.md @@ -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 +``` diff --git a/default.nix b/default.nix index 766844b..4d3fc32 100644 --- a/default.nix +++ b/default.nix @@ -229,6 +229,8 @@ let in rec { + outputs = result; + defaultNix = (builtins.removeAttrs result ["__functor"]) // (if result ? defaultPackage.${system} then { default = result.defaultPackage.${system}; } else {})