Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
/docs/guided_examples/*/build*
/docs/guided_examples/flake.lock

# Avoid adding symlinks
/support/ides/clion/*

# Products of SimoSim
Simo.log
statistics.yaml
Expand Down
11 changes: 8 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@
};

derivationAttributes = {
default = pkgs.clangStdenv.mkDerivation simoBaseAttributes;
clang = pkgs.clangStdenv.mkDerivation simoBaseAttributes;
gcc = pkgs.gccStdenv.mkDerivation simoBaseAttributes;
default = pkgs.clangStdenv.mkDerivation simoBaseAttributes;
clang = pkgs.clangStdenv.mkDerivation simoBaseAttributes;
gcc = pkgs.gccStdenv.mkDerivation simoBaseAttributes;
};
in
{
Expand All @@ -106,11 +106,16 @@
{
inputsFrom = [ derivationAttributes.default ];
packages = with pkgs; [
git
bashInteractive
clang-tools
ast-grep
# For llvm-cov
llvmPackages.llvm
];
shellHook = ''
export SHELL="${pkgs.bashInteractive}/bin/bash"
'';
};
}
);
Expand Down
13 changes: 6 additions & 7 deletions support/ides/clion/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# Use Nix packages in CLion

Based on [this](https://gist.github.com/pmenke-de/2fed80213c48c2fe80891678f4fa3b42),
but reworked to use flakes.
From the terminal, open a development environment with `nix develop`.

1. Run `support/ides/clion/setup-symlinks.sh` to expose some nix binaries
2. In `Settings` -> `Build, Execution, Deployment` -> `Toolchains`, create a new toolchain
3. Set CMake executable to `support/ides/clion/nix-cmake.sh` and the other elements of the
toolchain to the symlinks created in step 1.
Inside the development environment, launch CLion.

Note it is important to set the symlink of ctest to be able to run unit-tests from CLion.
On macOS, this can be done with `open -na "CLion.app"`.

One issue is that the integrated terminal may complain about `bash: bind: command not found`
and show escape symbol. The solution is to run `nix develop` in the terminal.
29 changes: 0 additions & 29 deletions support/ides/clion/nix-cmake.sh

This file was deleted.

19 changes: 0 additions & 19 deletions support/ides/clion/nix-run.sh

This file was deleted.

26 changes: 0 additions & 26 deletions support/ides/clion/setup-symlinks.sh

This file was deleted.