summaryrefslogtreecommitdiff
path: root/shell.nix
diff options
context:
space:
mode:
Diffstat (limited to 'shell.nix')
-rw-r--r--shell.nix18
1 files changed, 18 insertions, 0 deletions
diff --git a/shell.nix b/shell.nix
new file mode 100644
index 0000000..0c22e94
--- /dev/null
+++ b/shell.nix
@@ -0,0 +1,18 @@
+{ pkgs ? import <nixpkgs> {}
+, ...
+}:
+
+pkgs.mkShell {
+ buildInputs = [
+ pkgs.scons
+ pkgs.clang
+ pkgs.clang-tools
+ ];
+
+ shellHook = ''
+ if [ ! -f compile_commands.json ]; then
+ printf "Generating compile_commands.json...\n"
+ scons cdb
+ fi
+ '';
+}