Create nix flake for compiling and developing#11231
Create nix flake for compiling and developing#11231Denis101 wants to merge 10 commits intosimulationcraft:midnightfrom
Conversation
|
I've never dove very deeply into flakes, and had @emallson provide some feedback, as they have a little more nix-specific experience than me. Here's a mixture of feedback from me and them.
File formatting in simc is very much up to individual maintainers, and there is no consistent formatting procedure for the entire repository. Bad format commits will easily generate very massive whitespace changes across millions of lines, especially in data files.
Allowing for a QT-less devshell would be desirable. Many developers skip building the GUI entirely, as many do not use it. |
|
To sum up our discord conversation:
|
Adds a relatively simple
flake.nixthat enables the following with nix (and NixOS):nix developin the root directory to get a development shell pre-installed with clang and llvm. Optionally runnix develop .#simcqtto get a devshell with Qt6 to develop the GUI with.nix buildto compilesimcinto a nix derivation. The default package does not include the GUI, this can be built withnix build .#simcqt.nix run . [options]in the root directory to run the compiled binary in the derivation.This can be used in flake-based NixOS configurations to include the
simcpackage in theoretically any nix installation. I have only tested this on my own x86_64 NixOS (Linux 6.18) machine, so not sure if the compilation may fail in either Windows (via WSL) or macOS.