c3lang / c3c

Compiler for the C3 language
https://c3-lang.org
GNU Lesser General Public License v3.0
3.01k stars 184 forks source link

Add support for nix flakes #1614

Closed vssukharev closed 1 week ago

vssukharev commented 2 weeks ago

Added support for nix flakes.

Flake provides the following outputs:

tomaskallup commented 2 weeks ago

I can compile & use c3c via nix build. The devShell is... sketchy, due to the LLVM & LLD being separeted, cmake won't work as it doesn't find LLD. Sadly that's not really something we can handle, unless we do a shellHook which does the replacing, but then it polutes users git state with modified CMakeLists.txt

vssukharev commented 2 weeks ago

I'made dev shell only for LSP working correctly. So that you need to use nix build .#c3c-nochecks to make project built. Unfortunately, as you said, there are no appropriate workarounds how to do it in dev shell directly.

lerno commented 1 week ago

Thank you!