Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GLX Error on NixOS #187

Open
hanzy1110 opened this issue May 9, 2024 · 0 comments
Open

GLX Error on NixOS #187

hanzy1110 opened this issue May 9, 2024 · 0 comments

Comments

@hanzy1110
Copy link

Maybe a config error but couldn't find anything related
I'm trying to build raylib-rs on my laptop running Wayland on NixOS.
The program builds normally but when I try to run the executable I get the following error:

WARNING: GLFW: Error: 65542 Description: GLX: Failed to load GLX
WARNING: GLFW: Failed to initialize Window
thread 'main' panicked at /home/bm69/.cargo/registry/src/index.crates.io-6f17d22bba15001f/raylib-3.7.0/src/core/mod.rs:208:13:
Attempting to create window failed!
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Note that the "wayland" feature is no longer recognized so the readme is outdated as of version 3.7.
Here are the packages I'm installing in my flake.nix file:

    devShells = forEachSupportedSystem ({pkgs}: {
      default = pkgs.mkShell {
        packages = with pkgs; [
          rustToolchain
          openssl
          pkg-config
          cargo-deny
          cargo-edit
          cargo-watch
          rust-analyzer
          cmake
          gnumake
          pkg-config
          libGL
          xorg.libX11
          xorg.libX11.dev
          xorg.libXft
          xorg.libXrandr
          xorg.libXinerama
          xorg.libXcursor
          xorg.libXi
          libatomic_ops
          mesa
          alsa-lib
          glibc
          # [Wayland]
          wayland
          wayland-protocols
          libxkbcommon
          glfw-wayland
        ];
      };
    });

Some of the glfw packages listed on the readme weren't availble on nixpkgs.
Any help is appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant