I have been trying to build some go projects that use X11 libraries and I have been getting an error like this when trying to build https://github.com/npmaile/PapeChanger/.
45 | #include <X11/extensions/Xinerama.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Whenever this happens I usually just lookup in nix-pkgs for the package usually named "xorg.lib<header_file_name>" or in this case the package "xorg.libXinerama". This usually works fine, but in the last couple projects I have been coming across this error.
48 | #include <X11/extensions/XInput2.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
When trying to lookup this library I just can't seem to find the package for it anywhere.
I tried xorg.xinput and found it was a program rather than a library. I tried to look high and low in the nix-pkgs website to find the library and came up empty. As a sanity check, I did some searching to see if it was a thing and found this page in the xorg docs as well as this fedora wiki page about the library.
What I am looking for is what Xinput2 is packaged under. It seems like a rather core component so I can't imagine it isn't.
That file comes from the "dev" output of the xorg.libXi
derivation in nixpkgs. Here are some commands I ran in a checkout of the nixpkgs repository to confirm that:
$ nix-build -A xorg.libXi.dev
/nix/store/qrs00hnv9frpk49rbp6dir3vqw0my8j7-libXi-1.8-dev
$ ls result-dev/include/X11/extensions
XInput2.h XInput.h