nannou-org / nannou

A Creative Coding Framework for Rust.
https://nannou.cc/
6.04k stars 305 forks source link

Add a Nix flake along with a package derivation (default.nix) and dev shell (shell.nix). Update hotglsl. #950

Closed mitchmindtree closed 10 months ago

mitchmindtree commented 10 months ago

These can be ignored by most users, but will be useful for Nix folks and may help to simplify our CI a little.

The default.nix can also be used as a CI-checked reference of what system dependencies and env vars are required on Linux and macOS.

Tested successfully on x86_64-linux and aarch64-darwin.

TODO


The hotglsl crate was updated to 0.2 in order to switch from the glsl-to-spirv crate to the pure-Rust naga removing the need for some system deps like libclang.

tychedelia commented 10 months ago

@mitchmindtree Just had to do this for bevy which was kinda annoying https://github.com/nannou-org/nannou/pull/952/commits/e5fcbe95f37ca9171b8826dd38e416c29d33d0ee. The simplest fix would be a composite action but I could be convinced to run nix in ci. ^^

mitchmindtree commented 10 months ago

OK I've had a go at simplifying the CI a little and added a "Nix Shell" contributing chapter!