DeterminateSystems / zero-to-nix

Zero to Nix is your guide to learning Nix and flakes. Created by Determinate Systems.

Home Page:https://zero-to-nix.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with page `src/pages/concepts/flakes.mdx`

necauqua opened this issue · comments

"The lib output" (https://zero-to-nix.com/concepts/flakes#lib) implies that this is the only place where you can output Nix functions or values, but that's incorrect as all the flake outputs are Nix values, be it functions or derivations or anything.

There is just a list of conventions of what outputs what tools (such as nix run) use on the flakes page, and lib isn't even one of them.

Nixpkgs just chose to export a bunch of util stuff grouped as an attrset that is returned from the lib output ¯\_(ツ)_/¯

I have a personal little convenience flake where I export a Nix function as make output here. And it totally works, in other flakes you just use <input>.make or <input>.<whatever>

@necauqua Good call! Thanks for reporting 😄