clay icon indicating copy to clipboard operation
clay copied to clipboard

[Repo]: Add Nix Flakes support

Open h4rldev opened this issue 6 months ago • 3 comments

I've added a flake.nix to this repository, so that developers using the Nix ecosystem can quickly pull the header and include it globally by just adding the link to the repository.

It exports a package, a development shell environment, and a format checker. (mostly for the flake itself, but it checks the C code within the examples and renderers)

It's been tested to be working, at least on NixOS, testing for other Nix ecosystems like nix-darwin, may be needed, and testing on other platforms, such as ARM

h4rldev avatar May 22 '25 04:05 h4rldev

Oh, I forgot to mention, there may be dependencies needed for each example and build, but during my test builds, I haven't spotted anything wrong!

h4rldev avatar May 22 '25 04:05 h4rldev

Hello, thanks for opening this PR! I'll need to put some time into testing out how nix works as I'm not a user myself, so I'll let you know when I've taken a look 🙂

nicbarker avatar May 25 '25 23:05 nicbarker

It seems I forgot to include the .clang-format file the flake depends on, though I think you should review it's config regarding that so that macros aren't mangled and properly formatted, as I haven't really looked into it, I can just remove the c formatting from the formatting command entirely, but that's your decision

h4rldev avatar May 26 '25 10:05 h4rldev

I'm pretty sure you can seper the flake packages to be both releases and branch releases :P

h4rldev avatar Jun 05 '25 19:06 h4rldev

Should I add that to the flake?

h4rldev avatar Jun 05 '25 19:06 h4rldev

Okay there we go, it's a bit ugly with the force pushes, but I have squashed the commits

h4rldev avatar Jun 09 '25 19:06 h4rldev