2021-01-25 09:26:54 +01:00
|
|
|
{ lib, fetchFromGitHub, python3Packages, libusb1, linuxHeaders
|
2017-12-30 11:52:24 +01:00
|
|
|
, GyroplotSupport ? false
|
|
|
|
}:
|
|
|
|
|
|
|
|
with python3Packages;
|
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
buildPythonApplication {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "steamcontroller";
|
2017-12-30 11:52:24 +01:00
|
|
|
version = "2017-08-11";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "ynsta";
|
|
|
|
repo = "steamcontroller";
|
|
|
|
rev = "80928ce237925e0d0d7a65a45b481435ba6b931e";
|
|
|
|
sha256 = "0lv9j2zv8fmkmc0x9r7fa8zac2xrwfczms35qz1nfa1hr84wniid";
|
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/uinput.py --replace \
|
|
|
|
"/usr/include" "${linuxHeaders}/include"
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ libusb1 ];
|
2021-01-04 03:20:30 +01:00
|
|
|
propagatedBuildInputs = [ psutil python3Packages.libusb1 ]
|
2017-12-30 11:52:24 +01:00
|
|
|
++ lib.optionals GyroplotSupport [ pyqtgraph pyside ];
|
|
|
|
|
2021-01-04 03:20:30 +01:00
|
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "steamcontroller" ];
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2017-12-30 11:52:24 +01:00
|
|
|
description = "A standalone Steam controller driver";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/ynsta/steamcontroller";
|
2017-12-30 11:52:24 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ rnhmjoj ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|