Several nix fixes (#1737)

* Fixed nix c3c development shell

* Fix unknown git hash on nix build
This commit is contained in:
vssukharev
2024-12-29 22:12:26 +02:00
committed by GitHub
parent 1340a47bc2
commit 7b734df09e
3 changed files with 40 additions and 38 deletions

View File

@@ -1,20 +1,22 @@
{
lib,
mkShell,
clang-tools,
c3c,
}:
}:
mkShell.override {
inherit (c3c) stdenv;
} {
name = "c3c-shell";
mkShell {
inputsFrom = [
c3c
];
packages = [
clang-tools
c3c
];
shellHook = ''
ln -sf ${c3c}/compile_commands.json compile_commands.json
'';
# Usage: 'cmake . -Bbuild $C3_CMAKE_FLAGS' or 'cmake . -Bbuild $=C3_CMAKE_FLAGS' on zsh
C3_CMAKE_FLAGS = lib.concatStringsSep " " c3c.cmakeFlags;
}