intellij-direnv
intellij-direnv copied to clipboard
Can't give Clion tools to import cmake projects
I've got a pretty simple Clion project on macOS that I also want to be able to work on from NixOS.
I've added a shell.nix like this:
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
nativeBuildInputs = with pkgs; [
cmake
];
CMAKE_MAKE_PROGRAM = "make";
CMAKE_C_COMPILER = "$CC";
CMAKE_CXX_COMPILER = "$CXX";
}
but Clion's cmake loading can't see these variables and fails to do anything, complaining that they're not set.
In the IDE's terminal, the variables are set and I can execute the tools as expected.
Could you please post your .envrc
?
It's just use nix
.
This is still an issue unfortunately, any hints to what could cause this?
Sometimes I need to open the settings dialog twice for the variables to appear. If this does not help the problem is maybe the same as #11. Does it work, when you launch clion from the terminal after direnv loaded the environment into the shell?
It does indeed work when launching it from the terminal.