1{
2 lib,
3 fetchFromGitHub,
4 python3Packages,
5 libusb1,
6 linuxHeaders,
7}:
8
9with python3Packages;
10
11buildPythonApplication {
12 pname = "steamcontroller";
13 version = "2017-08-11";
14 format = "setuptools";
15
16 src = fetchFromGitHub {
17 owner = "ynsta";
18 repo = "steamcontroller";
19 rev = "80928ce237925e0d0d7a65a45b481435ba6b931e";
20 sha256 = "0lv9j2zv8fmkmc0x9r7fa8zac2xrwfczms35qz1nfa1hr84wniid";
21 };
22
23 postPatch = ''
24 substituteInPlace src/uinput.py --replace \
25 "/usr/include" "${linuxHeaders}/include"
26 '';
27
28 buildInputs = [ libusb1 ];
29 propagatedBuildInputs = [
30 psutil
31 python3Packages.libusb1
32 ];
33 doCheck = false;
34 pythonImportsCheck = [ "steamcontroller" ];
35
36 meta = with lib; {
37 description = "Standalone Steam controller driver";
38 homepage = "https://github.com/ynsta/steamcontroller";
39 license = licenses.mit;
40 maintainers = with maintainers; [ rnhmjoj ];
41 platforms = platforms.linux;
42 };
43}