!VRULIdgoKmKPzJZzjj:nixos.org

Nix Hackers

897 Members
For people hacking on the Nix package manager itself191 Servers

Load older messages


SenderMessageTime
5 Mar 2025
@flokli:matrix.orgflokliThe valid paths thing is unrelated08:47:11
@roberthensing:matrix.orgRobert Hensing (roberth) "valid paths" are basically all the registered store paths. I don't think you'll ever get valid = false unless it's missing (but I'm not familiar with all the crimes in the CLI) 08:47:20
@flokli:matrix.orgflokliThe one way I could see a store path being present without it's drv locally is by `nix-store -r`'ing something from a binary cache without locally evaluating.08:48:24
@roberthensing:matrix.orgRobert Hensing (roberth) as for deriver, it's best-effort. If it can be preserved somewhere, that would be nice, but it can only tell you the first derivation that produced the output anyway 08:49:07
@roberthensing:matrix.orgRobert Hensing (roberth)and first can be a bit arbitrary, as Nix has no concept of time :)08:49:31
@flokli:matrix.orgflokliNix also has no concept of whether a build did fail or not08:50:50
@flokli:matrix.orgflokliYou can only guess by checking whether there's a build Log available locally, and the store path or not. Bus as soon as there's a GC in between that doesn't GC the logs you're screwed 💁‍♂️08:51:53
@flokli:matrix.orgflokli* You can only guess by checking whether there's a build Log available locally, and the store path or not. But as soon as there's a GC in between that doesn't GC the logs you're screwed 💁‍♂️08:52:57
@picnoir:alternativebit.frPicnoirRight! I found other cases where you don't have drv files: the builtins relying on addToStore, like builtins.toFile For instance: https://pastebin.aquilenet.fr/?97621c09cc60ef1f#HASi9d2NbdGYa7ARzyP4eVZTAhVDcL7AsooCFFG4rqAk08:53:39
@picnoir:alternativebit.frPicnoir* Right! I found other cases where you don't have drv files: the builtins relying on directly calling addToStore, like builtins.toFile For instance: https://pastebin.aquilenet.fr/?97621c09cc60ef1f#HASi9d2NbdGYa7ARzyP4eVZTAhVDcL7AsooCFFG4rqAk08:53:57
@picnoir:alternativebit.frPicnoirWell, complexity++ in my mental model :D Nice08:54:12
@flokli:matrix.orgflokliOh yes, of course, imports and fetches are no builds 08:54:19
@picnoir:alternativebit.frPicnoir* Well, complexity++ in my mental model :D Nice 😢08:54:26
@flokli:matrix.orgflokli(native fetches)08:54:37
@picnoir:alternativebit.frPicnoirYeah08:54:41
@picnoir:alternativebit.frPicnoirbut they still end up in the same validpaths table.08:54:50
@picnoir:alternativebit.frPicnoirAnd there's no direct way to set them appart from the "regular" builds as far as I can tell.08:55:05
@picnoir:alternativebit.frPicnoirBy looking at the db I mean.08:55:15
@flokli:matrix.orgflokliYes of course not08:56:04
@flokli:matrix.orgflokliElse or would be too simple :-)08:56:12
@flokli:matrix.orgflokliYou also can have non-native fetches and native fetches both being present in your build graph, producing the same store path.08:57:11
@flokli:matrix.orgflokliSo whether something is a build or not then depends on evaluation order ;-)08:57:57
@roberthensing:matrix.orgRobert Hensing (roberth)

Recent addition:

Besides functioning as a content-addressed store, the Nix store layer works as a build system.

https://hydra.nixos.org/build/291787002/download/1/manual/store/derivation/index.html

08:58:09
@roberthensing:matrix.orgRobert Hensing (roberth)The store we have is not a fantastic CAS (more could be done), but it fulfills both tasks09:00:34
@flokli:matrix.orgflokli1741165269059.jpg
Download 1741165269059.jpg
09:01:21
@roberthensing:matrix.orgRobert Hensing (roberth)tvix does a great job at this, layering the build system onto the castore layer, instead of just juxtaposing them into storedir09:01:31
@roberthensing:matrix.orgRobert Hensing (roberth)you beat me to it :D09:01:57
@flokli:matrix.orgflokliHehe, I have that meme on quick dial 09:02:21
@kranzes:matrix.orgIlan Joselevich (Kranzes)im sitting here in front of flokli, i saw him press "send" and then your message came in, I knew your were writing it before he sent lmao09:03:00
@picnoir:alternativebit.frPicnoirIf I understand your categorization correctly, you'd put FODs in the "output" category?09:04:08

Show newer messages


Back to Room ListRoom Version: 6