I am trying to build WPILib but it throws both of these errors fatal error: GL/gl.h: No such file or directory 67 | #include <GL/gl.h>
and fatal error: X11/Xlib.h: No such file or directory 32 | #include <X11/Xlib.h>
and this is my flake
{
description = "A Nix-flake for building WPILib";
inputs.nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
outputs = inputs:
let
supportedSystems = [ "x86_64-linux" "aarch64-linux" ];
forEachSupportedSystem = f: inputs.nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import inputs.nixpkgs { inherit system; };
});
in
{
devShells = forEachSupportedSystem ({ pkgs }:
let
fhs = pkgs.buildFHSEnv.override
{
stdenv = pkgs.stdenv;
}
{
name = "WPILibSHell";
targetPkgs = pkgs: (with pkgs; [
llvmPackages.libcxxClang
libgcc
gfortran
temurin-bin
xorg.libX11
xorg.libXcursor
xorg.libXrandr
xorg.libXinerama
xorg.libXi
libGL
]);
multiPkgs = pkgs: (with pkgs; [
xorg.libX11
xorg.libXcursor
xorg.libXrandr
xorg.libXinerama
xorg.libXi
libGL
]);
buildInputs = with pkgs; [
xorg.libX11
xorg.libXcursor
xorg.libXrandr
xorg.libXinerama
xorg.libXi
libGL];
hardeningDisable = [ "fortify" ];
};
in
{
default = fhs.env;
});
};
}
when i was using mkShell instead of buildFHSEnv it worked with them in build inputs, however i ran into other issues that made me switch to a sandbox.