19 Dec 2024 |
| @sugar:platypus-sandbox.com left the room. | 01:56:02 |
guiniol | nixos-rebuild finished on the non-nixos machine, but I have no idea where the results are and if they got copied to the store. What I can say is that the nixos machine didn't fetch lix from the cache on that non-nixos machine... | 01:58:36 |
guiniol | if anyone knows how to make sure that the packages built by nixos-rebuild are in the store (I didn't run switch since this is on a non-nixos package), that'd be great | 01:59:20 |
Irenes | they should absolutely be in the store | 02:00:37 |
Irenes | there's no other place anything gets built. if they were just built, and you didn't set up anything that would build them remotely, they are in the store | 02:00:57 |
Irenes | nixos-rebuild should have created a result/ symlink to the top-level derivation that is the system it built, in the directory that was current when you invoked it | 02:01:32 |
Irenes | I think. heh. at any rate I sure do have a lot of those lying around, so it probably does. | 02:01:45 |
Irenes | hm | 02:02:27 |
Irenes | your situation is one where you probably do want to go a bit deeper | 02:02:40 |
ToxicFrog | nixos-build build will do that by default, yeah. | 02:02:45 |
ToxicFrog | *nixos-rebuild | 02:02:57 |
Irenes | when you know the full hash of a package you can just ls /nix/store/dfoikgjer-whatever and it's either there or it isn't | 02:03:06 |
Irenes | I think your easiest course of action here is just ls -l in the place you invoked nixos-rebuild build and look at the full path that the result symlink points to | 02:03:46 |
Irenes | then ls that path to see if it exists | 02:03:53 |
Irenes | and you can ls that same path on the cache machine to see if it exists there as well | 02:04:06 |
Irenes | since the path is a deterministic property of the derivation | 02:04:16 |
Irenes | however, I note that the thing you're really trying to check is the lix derivation, which is a dependency of the system derivation but not synonymous with it | 02:04:52 |
Irenes | it's possible for the cache to have the lix build without having the system derivation, and that may even be likely since it's common for there to be small pieces in a system derivation that are marked to be built local-only | 02:05:18 |
Irenes | so you uh | 02:05:22 |
Irenes | will need to find the full path for the relevant copy of lix | 02:05:37 |
Irenes | I don't have a specific, formal technique for that that always works | 02:05:46 |
Irenes | although notionally the dependencies of a derivation in the store are listed in the sqlite database that's somewhere under /nix , and you can poke around inside it by running sqlite on that file and writing sql as you see fit, that's kinda slow and unwieldy | 02:06:31 |
Irenes | I'm sure there's some query command that just searches it up, but I kinda bounced off that command's manpage really hard for organizational reasons and haven't circled back to it | 02:06:59 |
Irenes | when the derivation I'm trying to find is a dependency of one I already have, I often just look around in the output directory of the one I have to see if I can find a file that's a symlink to a file in the derivation I want | 02:07:31 |
Irenes | and then I can just follow the link | 02:07:38 |
Irenes | for example, system derivations have a subdirectory sw/ which has sw/bin/ , sw/etc/ and so on for all the stuff that on a non-nix system would be globally installed | 02:08:39 |
Irenes | this should be anything that was listed in environment.systemPackages in the config | 02:08:56 |
Irenes | so putting that all together, you could do ls -l result/sw/bin/nix and see if it prints out a symlink to a derivation with lix in its name | 02:09:27 |
Irenes | and if so, now you have that path and can check if it exists on the other machine too | 02:09:37 |
Irenes | hope that helps | 02:09:39 |