Hello, I’m trying to get a Minecraft mod development environment working, but currently it fails to init with GLFW error: [0x10006]EGL: Library not found. (And later Authorization required, but no authorization protocol specified) I assume I’m missing some library from buildInputs or NIX_LD_LIBRARY_PATH but I have no idea what.
My shell.nix:
{ pkgs ? import <nixpkgs> {} }:
let
jdk = pkgs.jdk17;
gradle = pkgs.gradle.override {
java = pkgs.jdk17;
};
libs = with pkgs; [
stdenv.cc.cc
openssl
libglvnd
libGL
pipewire
glfw
openal
];
in
pkgs.mkShell {
buildInputs = [
jdk
gradle
] ++ libs;
NIX_LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath libs;
NIX_LD = pkgs.lib.fileContents "${pkgs.stdenv.cc}/nix-support/dynamic-linker";
# ^--- when using direnv, this line will require the 'use flake --impure' option.
shellHook = ''
export JAVA_HOME=${pkgs.jdk17}
PATH="${pkgs.jdk17}/bin:$PATH"
'';
}
I’m using a wayland-based graphics environment with Xwayland enabled (Plasma) and normal modded Minecraft launched through Prism works without a problem.