Nix Flakes | 850 Members | |
| 173 Servers |
| Sender | Message | Time |
|---|---|---|
| 5 Aug 2025 | ||
| 09:21:47 | ||
| 09:49:44 | ||
| 6 Aug 2025 | ||
ive been fighting a weird bug all day, nix build github:grumpycoders/pcsx-redux fails to build on most machines i haveif i clone the repo and alter any file, it suddenly works and while attempting to debug it, it suddenly started working on my desktop, but still fails on the laptop | 02:34:06 | |
the best ive been able to narrow it down to, is that sometimes, nix will include a empty third_party/imgui in the $srcand that then breaks the postUnpack hook, and screws up the entire build | 02:34:49 | |
| but nix is being very eratic about when it does and doesnt include that empty directory | 02:35:03 | |
| on one machine where it breaks, i get:
but on the machine where it works, i get:
| 02:59:29 | |
i can see that the narhash and Path: have changed, yet they are the same git revision | 02:59:48 | |
infact, if i just rm -rf ~/.cache/nix/ i can get the above command to produce a different narhash&path! | 03:06:38 | |
| omg i think i get it | 03:55:06 | |
| nix assumed that the tarball generated from a git hash is reproducible | 03:55:29 | |
| however it's not, if you generate a tarball from git+file submodules become nothing, if you grab a tarball from github submodules become empty directories | 03:55:54 | |
| but its more crazy then that if you clone the repo, and nix build .# it failsif you edit any file, even a comment, it works if you check out anything that isnt HEAD it works if you try to bisect, every commit works except HEAD | 04:01:43 | |
| try grabbing commits other than HEAD from github | 04:02:11 | |
| they share the same cache afaict | 04:02:20 | |
nix build github:grumpycoders/pcsx-redux/1b0cbe5e4a535def2e3e3279551e6665cdc102ae will sometimes work and sometimes fail | 04:02:38 | |
| depends on what the fetch cache happens to contain | 04:02:47 | |
| ive yet to find a reliable way to trigger both cases | 04:03:01 | |
| so according to my theory, all starting from empty fetch cache | 04:03:09 | |
| if you get it from github first, it breaks | 04:03:19 | |
| if you get it from git+file first it works | 04:03:26 | |
| your right! | 04:03:55 | |
| the secondary problem, is that the bash script within the repo, isnt liking this | 04:06:30 | |
cp -ru --no-preserve=all /nix/store/wpk39xy9ybc888cihcf6kiwswnvj1yp5-source source/third_party/imgui | 04:06:55 | |
just don't use github: for this for now is what i would say | 04:07:03 | |
| as a workaround | 04:07:10 | |
if you first fetched via github, source/third_party/imgui will existso it then copies the source to source/third_party/imgui/wpk39xy9ybc888cihcf6kiwswnvj1yp5-source | 04:07:18 | |
but if you first fetched via a git clone, it wont exist, so it renames as it copies to source/third_party/imgui | 04:07:37 | |
| then everything falls apart, because the submodules are at the wrong place | 04:08:20 | |
nix build https://github.com/grumpycoders/pcsx-redux/archive/1b0cbe5e4a535def2e3e3279551e6665cdc102ae.tar.gz seems to work, and it will likely work as a flake input as well... | 04:09:44 | |
| ah wait nope | 04:09:50 | |