How to build raylib project using nix flake?

Thanks for ur quick reply. I only get the error on first build and succesive builds do not complain at all. The reason why i asked was everytime i try to run it i am getting "
./zig-out/bin/zigraylib: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38’ not found (required by ./zig-out/bin/zigraylib)" error which i havent found any solution of.

zigraylib main*​​​ via ❄️  impure (nix-shell-env)
❯ ./zig-out/bin/zigraylib
./zig-out/bin/zigraylib: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by ./zig-out/bin/zigraylib)

Incase if it anyone needs to check my flake file here it is. zig raylib flakes · GitHub

I have almost zero experience using nix, so I will just list a few topics that may or may not be related:

Hopefully someone with more experience using nix can help you.

2 Likes

Your nix flake doesn’t have any reference to Zig or glibc, how are you building Zig? Your #app only runs g++.

I would use nixhub.io to grab the flake url you need to get the specific version of glibc that raylib appears to be asking for

1 Like