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

Signed-off-by: Seth Flynn <getchoo@tuta.io>
(cherry picked from commit 58579539d071c569800ba0370a6d5918de025e33)
This commit is contained in:
Seth Flynn 2025-03-30 17:19:20 -04:00
parent 87c5b6cc83
commit 5c4bd3db52
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
'';
};
}