2021-10-14 00:43:12 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
2022-03-05 16:20:37 +00:00
|
|
|
, scons
|
2021-10-14 00:43:12 +00:00
|
|
|
, libX11
|
|
|
|
, pkg-config
|
|
|
|
, libusb1
|
|
|
|
, boost
|
|
|
|
, glib
|
|
|
|
, dbus-glib
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-14 00:43:12 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "xboxdrv";
|
2021-10-14 00:43:12 +00:00
|
|
|
version = "0.8.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-14 00:43:12 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xboxdrv";
|
|
|
|
repo = "xboxdrv";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-R0Bt4xfzQA1EmZbf7lcWLwSSUayf5Y711QhlAVhiLrY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
2022-03-05 16:20:37 +00:00
|
|
|
nativeBuildInputs = [ pkg-config scons ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ libX11 libusb1 boost glib dbus-glib ];
|
2022-03-05 16:20:37 +00:00
|
|
|
enableParallelBuilding = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
dontUseSconsInstall = true;
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
patches = [
|
|
|
|
./fix-60-sec-delay.patch
|
|
|
|
./scons-py3.patch
|
|
|
|
./scons-v4.2.0.patch
|
|
|
|
./xboxdrvctl-py3.patch
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-08-05 21:33:18 +00:00
|
|
|
homepage = "https://xboxdrv.gitlab.io/";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Xbox/Xbox360 (and more) gamepad driver for Linux that works in userspace";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
maintainers = [ ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|