Home  >  Article  >  Backend Development  >  The package of XInput2.h header file cannot be found on nixos

The package of XInput2.h header file cannot be found on nixos

王林
王林forward
2024-02-06 09:48:041245browse

The package of XInput2.h header file cannot be found on nixos

Question content

I have been trying to build some go projects that use the X11 library and am trying to build https://github.com/npmaile/ I encountered this error when using PapeChanger/.

45 | #include <X11/extensions/Xinerama.h>
   |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Whenever this happens, I usually just look in nix-pkgs for a package usually named "xorg.lib", or in this case the "xorg.libXinerama" package. This usually works fine, but on a few recent projects I've run into this error.

48 | #include <X11/extensions/XInput2.h>
   |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

When trying to find this library, I can't seem to find its package anywhere.

I tried xorg.xinput and found out that it is a program and not a library. I tried looking everywhere on the nix-pkgs website for this library but found nothing. As a sanity check, I did some searching to see if it was a thing and found this page in the xorg documentation as well as the fedora wiki page about the library.

What I am looking for is the packaging method of Xinput2. It looks like a pretty core component, so I can't imagine it isn't.


Correct answer


The file comes from the "dev" output of the xorg.libXi fork in nixpkgs. Here are some commands I ran to confirm when checking out the nixpkgs repository:

$ nix-build -A xorg.libXi.dev
/nix/store/qrs00hnv9frpk49rbp6dir3vqw0my8j7-libXi-1.8-dev
$ ls result-dev/include/X11/extensions
XInput2.h  XInput.h

The above is the detailed content of The package of XInput2.h header file cannot be found on nixos. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:stackoverflow.com. If there is any infringement, please contact admin@php.cn delete