Skip to content

Nix flake template for Zig Raylib development with dependencies

Notifications You must be signed in to change notification settings

quot/Zig-Raylib-Flake-Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zig/Raylib Nix Flake Template

A starting point for developing Zig with Raylib using Nix or in NixOS.


Based on: https://github.com/nix-community/templates/tree/main/zig

Using Raylib-Zig: https://github.com/Not-Nik/raylib-zig


Building raylib-zig in NixOS throws errors caused by missing system libraries.

error: unable to find dynamic system library 'GL' using strategy 'paths_first'.
...
error: unable to find dynamic system library 'X11' using strategy 'paths_first'.

This flake sets up a development environment with those missing dependencies so you don't have to install them on your base OS.

How to use

Currently, the flake is only setup to use nix develop. You can use nix develop --command bash -c "zig build run; exit;" if you want to do a one-time run without staying in the develp environment.

Tested With

  • Zig 0.13.0
  • Raylib 5.5-dev through raylib-zig

About

Nix flake template for Zig Raylib development with dependencies

Topics

Resources

Stars

Watchers

Forks