| 19 Nov 2025 |
Grimmauld (any/all) | tbh i am surprised the json format knows about phases. Isn't that a layer violation? Nix (the evaluator) shouldn't really have knowledge about the concept of stdenv or build phases at all | 23:14:33 |
maralorn | Yes, it totally is. | 23:15:50 |
maralorn | I was abhorred when I learned this. | 23:16:07 |
Grimmauld (any/all) | i hate this damn language | 23:16:12 |
Emma [it/its] | I thought build phases were a builtin ngl | 23:16:43 |
K900 | They're not | 23:16:52 |
K900 | They're an stdenv-ism | 23:16:56 |
maralorn | But nix has some kind of special support for them iirc? | 23:17:45 |
K900 | Yes | 23:18:07 |
Emma [it/its] | Now that i can see making sense, but i would've expected a fifo to be exposed in the build env or something for that purpose | 23:18:50 |
whispers (it/fae) | i don't think it does, it's a printf in nixpkgs stdenv | 23:19:13 |
whispers (it/fae) | https://github.com/NixOS/nixpkgs/blob/ed53e9bfd83a0f16833a17f478b8e11f70462854/pkgs/stdenv/generic/setup.sh#L1708 | 23:19:47 |
Emma [it/its] | Does nix just relay any line that haplens to be json or smth? | 23:19:54 |
Emma [it/its] | Oh huh, i guess theoretically anyone can hook into that | 23:20:55 |
Grimmauld (any/all) | nono, nix definitely has a concept of phases: https://github.com/search?q=repo%3ANixOS%2Fnix%20phase&type=code | 23:21:35 |
Grimmauld (any/all) | it even supports running phases individually ??? | 23:21:48 |
K900 | Layering violation ecks dee | 23:22:04 |
whispers (it/fae) | oh wow that's. horrid | 23:22:10 |
Grimmauld (any/all) | there is a couple disgusting layer violations. E.g. nix knows about outputs (particularly the bin output) to make nix run flakes work. And it also knows about quite a lot in meta. Add build phases to the pile, i guess. | 23:22:55 |
maralorn | outputs are a central concept in nix, I don't see how nix knowing about them in general is a layer violation | 23:24:15 |
maralorn | Special casing bin might be a violation | 23:24:50 |
maralorn | I mean I guess all of that could be made explicit as nix interface | 23:25:18 |
Grimmauld (any/all) | yes, outputs are fine, but knowing about bin is wrong | 23:27:00 |
Emma [it/its] | Dont you need to know about bin to make nix run work? | 23:27:44 |
Grimmauld (any/all) | tbh if you asked me how to rewrite nix, i'd split the thing into nix and nixpkgs commands, with the former being just evaluator/builder and the latter being a wrapper that adds domain-specific knowledge and assumptions | 23:27:48 |
Grimmauld (any/all) | thats exactly the problem. Flakes are a giant layer violation and should not be part of the evaluator imo. | 23:28:13 |
Emma [it/its] | The alternative would be more digging into meta/mainProgram (which it does anyways) | 23:28:15 |
Grimmauld (any/all) | like, nix shouldn't fight you if you want to use it for something not nixpkgs-shaped | 23:29:35 |
Emma [it/its] | I dont think they are, theyre part of the CLI, not the underlying evaluator | 23:29:37 |
Grimmauld (any/all) | as it stands you can't really split the two apart | 23:30:26 |