Hello, I’m new around here and I’m working through the Ziglings exercises. I have zig installed through my nix-config on the latest version using the community overlay. The output of zig version:
0.16.0-dev.2040+c475f1fcd
$ zig build -Dn=19
test/tests.zig:51:26: error: no field or member function named 'addRemoveDirTree' in 'Build'
const cleanup = b.addRemoveDirTree(.{ .src_path = .{ .owner = b, .sub_path = tmp_path } });
~^~~~~~~~~~~~~~~~~
/nix/store/2vqv52nidfy84sp1qzl0sfsg683vki7c-zig-0.16.0-dev.2040+c475f1fcd/lib/std/Build.zig:1:1: note: struct declared here
const Build = @This();
^~~~~
test/tests.zig:51:26: note: method invocation only supports up to one level of implicit pointer dereferencing
test/tests.zig:51:26: note: use '.*' to dereference pointer
referenced by:
build: build.zig:315:41
runBuild__anon_31869: /nix/store/2vqv52nidfy84sp1qzl0sfsg683vki7c-zig-0.16.0-dev.2040+c475f1fcd/lib/std/Build.zig:2259:44
6 reference(s) hidden; use '-freference-trace=8' to see all references
Unfortunately I haven’t been able to get zig build to work for any of the exercises yet, I’ve been using zig run … and manually checking my work.
I was able to get away with it up until exercise 84 where the suspend keyword gets introduced. When running this one, I get:
$ zig run ./exercises/084_async.zig
exercises/084_async.zig:56:5: error: async has not been implemented in the self-hosted compiler yet
suspend {}
^~~~~~~~~~
referenced by:
main: exercises/084_async.zig:51:12
callMain [inlined]: /nix/store/2vqv52nidfy84sp1qzl0sfsg683vki7c-zig-0.16.0-dev.2040+c475f1fcd/lib/std/start.zig:675:59
callMainWithArgs [inlined]: /nix/store/2vqv52nidfy84sp1qzl0sfsg683vki7c-zig-0.16.0-dev.2040+c475f1fcd/lib/std/start.zig:626:20
posixCallMainAndExit: /nix/store/2vqv52nidfy84sp1qzl0sfsg683vki7c-zig-0.16.0-dev.2040+c475f1fcd/lib/std/start.zig:581:38
2 reference(s) hidden; use '-freference-trace=6' to see all references
Any ideas for how to get this working on NixOS?