fix(nix): only create compile_commands.json if it doesn't exist

Signed-off-by: Seth Flynn <getchoo@tuta.io>
This commit is contained in:
Seth Flynn 2025-03-30 17:19:20 -04:00
parent 32b49ecb84
commit 58579539d0
No known key found for this signature in database
GPG Key ID: D31BD0D494BBEE86

View File

@ -105,8 +105,10 @@
];
shellHook = ''
cmake $cmakeFlags -D CMAKE_BUILD_TYPE=Debug
ln -s {build/,}compile_commands.json
if [ ! -f compile_commands.json ]; then
cmake $cmakeFlags -D CMAKE_BUILD_TYPE=Debug
ln -s {build/,}compile_commands.json
fi
'';
};
}