!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

886 Members
182 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
21 Mar 2025
@morgrimm:matrix.orgremi-gelinas In flake.nix? That's expected, it's not a real Nix file 11:39:00
@elikoga:matrix.orgelikoga There's quite a bit of restrictions on the flake.nix format that people complain about sometimes 11:39:06
@emilazy:matrix.orgemily for inputs I expect that by now, yes 11:39:10
@emilazy:matrix.orgemily for outputs I don't think there is any rational point 11:39:16
@emilazy:matrix.orgemilyand the error seems like it's probably just an implementation bug11:39:24
@emilazy:matrix.orgemily("expected a function but got a thunk")11:39:31
@elikoga:matrix.orgelikoga No that sounds like the format restriction+bad error messages 11:39:46
@emilazy:matrix.orgemily oh, I guess it's because outputs's arguments get introspected to define inputs 🙃 11:39:47
@emilazy:matrix.orgemilywhen you don't explicitly list them11:39:56
@emilazy:matrix.orgemily(and it uses the registry inputs, which are pinned by default in some setups, so pretty footgunny)11:40:11
@elikoga:matrix.orgelikogaThere was a little bit of a change wrt registry inputs recently one sec11:40:32
@elikoga:matrix.orgelikoga

https://github.com/NixOS/nix/pull/12068

Only the global registry is used(?)

11:41:15
@rosssmyth:matrix.org@rosssmyth:matrix.org You can do eta expansion outputs = inputs: import ./function.nix inputs; 14:11:38
@rosssmyth:matrix.org@rosssmyth:matrix.orgWhich tbh shows how silly the restriction is 14:14:20
@joepie91:pixie.townjoepie91 🏳️‍🌈wait. what?16:46:55
@elikoga:matrix.orgelikogaIt's a Nix file with a specific format, where normal Nix files are just files that contain a nix value, Nix Flakes also have syntactic restrictions on the inputs&outputs level.16:48:24
@elikoga:matrix.orgelikoga* It's a Nix file with a specific format, where normal Nix files are just files that contain a nix value, flake.nix also has syntactic restrictions on the inputs&outputs level.16:48:36
@joepie91:pixie.townjoepie91 🏳️‍🌈then why does it end in .nix if it is not a freeform Nix file?!16:49:15
@elikoga:matrix.orgelikoga?16:49:28
@joepie91:pixie.townjoepie91 🏳️‍🌈like, I'm sure those syntactic restrictions have a purpose, but it seems very expectation-breaking for a .nix file to suddenly expect essentially a different format because it happens to be a flake.nix16:49:54
@elikoga:matrix.orgelikoga?16:50:09
@joepie91:pixie.townjoepie91 🏳️‍🌈I'm not sure what is unclear?16:50:25

Show newer messages


Back to Room ListRoom Version: 6