Add support for nix flakes (#1614)

* Add support for nix flakes
* Added debug build type for flake.nix; Got rid of redundant version check in nix/default.nix
* Added dev shell with compile_commands.json into flake.nix
* Fixed issue with generated compile_commands.json while creating c3c derivation with nix. Deduced devShells in flake.nix to nix/shell.nix
This commit is contained in:
vssukharev
2024-11-12 13:33:39 +02:00
committed by GitHub
parent a228eb020d
commit e6b6edefaf
5 changed files with 204 additions and 0 deletions

20
nix/shell.nix Normal file
View File

@@ -0,0 +1,20 @@
{
mkShell,
clang-tools,
c3c,
}:
mkShell {
inputsFrom = [
c3c
];
packages = [
clang-tools
c3c
];
shellHook = ''
ln -sf ${c3c}/compile_commands.json compile_commands.json
'';
}