Could not find OpenGL when building Hyprland
bruhderek opened this issue · comments
derek commented
How to reproduce:
git clone --recursive https://github.com/hyprwm/Hyprland && cd Hyprland
make all
This gives me the following error:
CMake Error at /nix/store/7jgkzsn972y4lrblv7f5rjpm46md0v64-cmake-3.27.8/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY
OPENGL_INCLUDE_DIR)
Call Stack (most recent call first):
/nix/store/7jgkzsn972y4lrblv7f5rjpm46md0v64-cmake-3.27.8/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
/nix/store/7jgkzsn972y4lrblv7f5rjpm46md0v64-cmake-3.27.8/share/cmake-3.27/Modules/FindOpenGL.cmake:545 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:103 (find_package)
I tried this, but still gives me the error:
nix-env -iA nixos.libGL
Thomas commented
This is not how NixOS is meant to be used. Please study the documentation further. You might want to make an overlay for Hyprland?
derek commented
@tpwrules Which part is not meant to be used? Building hyprland, or libGL? Sorry, this is my first time using NixOS.
Thomas commented
It generally does not work to git clone
and make
a package on NixOS due to the filesystem structure. Looks like there are some docs about using Hyprland: https://wiki.hyprland.org/Nix/ . However, other users have been reporting acceleration issues, in particular with home-manager.