clay
clay copied to clipboard
[Repo]: Add Nix Flakes support
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
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!
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 🙂
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
I'm pretty sure you can seper the flake packages to be both releases and branch releases :P
Should I add that to the flake?
Okay there we go, it's a bit ugly with the force pushes, but I have squashed the commits