When I use the nix-shell (with cmake, etc.) for building https://github.com/pbek/QOwnNotes, I’ve no issues using “cmake && make” in the terminal.
When I use Clion in the nix-shell, I get a cmake error:
CMake Error at /nix/store/9d67jcm1wj09wqgffh8v5mkgil9psnrw-cmake-3.25.3/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB)
Call Stack (most recent call first):
/nix/store/9d67jcm1wj09wqgffh8v5mkgil9psnrw-cmake-3.25.3/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
/nix/store/9d67jcm1wj09wqgffh8v5mkgil9psnrw-cmake-3.25.3/share/cmake-3.25/Modules/FindX11.cmake:481 (find_package_handle_standard_args)
src/libraries/qhotkey/CMakeLists.txt:39 (find_package)
I’ve no issues using cmake in the nix-shell in the terminal.
Any ideas why the IDE doesn’t seem to find the paths?
I already have all kind of stuff in my shell.nix for that project:
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
# nativeBuildInputs is usually what you want -- tools you need to run
nativeBuildInputs = [
pkgs.qt5.qtbase.dev
pkgs.qt5.qmake
pkgs.qt5.qtx11extras
pkgs.qt5.qtwebsockets
pkgs.qt5.qtdeclarative
pkgs.qt5.qtsvg
pkgs.xorg.libX11
pkgs.xorg.libX11.dev
pkgs.xorg.libxcb.dev
];
}