kristoff-it / ziggy

A data serialization language for expressing clear API messages, config files, etc.
https://ziggy-lang.io
MIT License
292 stars 17 forks source link

Nix build of ziggy is currently broken #33

Closed ethanholz closed 1 month ago

ethanholz commented 2 months ago

Currently running into an issue when using the Nix shell hook I added recently. This seems to be an issue wherein the dependencies are not being downloaded correctly.

this derivation will be built:
  /nix/store/rwi1yr80wm1c8vxzwwlbm8gny292f90b-ziggy.drv
building '/nix/store/rwi1yr80wm1c8vxzwwlbm8gny292f90b-ziggy.drv'...
error: builder for '/nix/store/rwi1yr80wm1c8vxzwwlbm8gny292f90b-ziggy.drv' failed with exit code 1;
       last 12 log lines:
       > Running phase: unpackPhase
       > unpacking source archive /nix/store/s75q7dmcldhs5qzmyl96vnmp17lsxwav-9pbaf2hgrgfqw3hnpad228698cd4n9kv-source
       > source root is 9pbaf2hgrgfqw3hnpad228698cd4n9kv-source
       > Running phase: patchPhase
       > Running phase: updateAutotoolsGnuConfigScriptsPhase
       > Running phase: configurePhase
       > no configure script, doing nothing
       > Running phase: buildPhase
       > zig build flags: -Dcpu=baseline --release=safe --color off
       > /build/9pbaf2hgrgfqw3hnpad228698cd4n9kv-source/build.zig.zon:6:20: error: unable to discover remote git server capabilities: TemporaryNameServerFailure
       > /build/9pbaf2hgrgfqw3hnpad228698cd4n9kv-source/build.zig.zon:11:20: error: unable to discover remote git server capabilities: TemporaryNameServerFailure
       > /build/9pbaf2hgrgfqw3hnpad228698cd4n9kv-source/build.zig.zon:15:20: error: unable to discover remote git server capabilities: TemporaryNameServerFailure
       For full logs, run 'nix log /nix/store/rwi1yr80wm1c8vxzwwlbm8gny292f90b-ziggy.drv'.

Similar failure found here: https://github.com/ethanholz/nix-config/actions/runs/10562427966/job/29260364427#step:4:4267

Interestingly, I do not seem to have this issue when building with nix-darwin. I have not found a fix for this using the Zig hook. One option to mitigate this is to fetch the dependencies manually before the build (similar to what zls does). However, this would require additional maintenance as the hashes for the dependencies would have to be updated in both the build.zig.zon file and the flake.nix.

kristoff-it commented 1 month ago

@aciceri should have fixed it in #35, please close this issue once you can confirm it works for you aswell

ethanholz commented 1 month ago

This looks great!