68 lines
1.3 KiB
Nix
68 lines
1.3 KiB
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
inputs,
|
|
...
|
|
}:
|
|
|
|
{
|
|
# https://devenv.sh/basics/
|
|
env.CMAKE_GENERATOR = "Ninja Multi-Config";
|
|
env.CMAKE_EXPORT_COMPILE_COMMANDS = "ON";
|
|
env.CMAKE_DEFAULT_BUILD_TYPE = "Debug";
|
|
|
|
# https://devenv.sh/packages/
|
|
packages = with pkgs; [
|
|
git
|
|
nil
|
|
jetbrains.clion
|
|
cmake
|
|
cmakeCurses
|
|
neocmakelsp
|
|
clang
|
|
ninja
|
|
clang-tools
|
|
gdb
|
|
watchexec
|
|
tbb
|
|
];
|
|
|
|
# https://devenv.sh/languages/
|
|
# languages.c.enable = true;
|
|
# languages.c.debugger = pkgs.gdb;
|
|
|
|
# https://devenv.sh/processes/
|
|
# processes.cargo-watch.exec = "cargo-watch";
|
|
|
|
# https://devenv.sh/services/
|
|
# services.postgres.enable = true;
|
|
|
|
# https://devenv.sh/scripts/
|
|
scripts.hello.exec = ''
|
|
echo hello from $GREET
|
|
'';
|
|
|
|
enterShell = ''
|
|
# export CXX=clang++
|
|
# export CC=clang
|
|
export CMAKE_PREFIX_PATH="''${NIXPKGS_CMAKE_PREFIX_PATH}"
|
|
'';
|
|
|
|
# https://devenv.sh/tasks/
|
|
# tasks = {
|
|
# "myproj:setup".exec = "mytool build";
|
|
# "devenv:enterShell".after = [ "myproj:setup" ];
|
|
# };
|
|
|
|
# https://devenv.sh/tests/
|
|
enterTest = ''
|
|
echo "Running tests"
|
|
git --version | grep --color=auto "${pkgs.git.version}"
|
|
'';
|
|
|
|
# https://devenv.sh/git-hooks/
|
|
# git-hooks.hooks.shellcheck.enable = true;
|
|
|
|
# See full reference at https://devenv.sh/reference/options/
|
|
}
|