1 { lib, buildPythonApplication, fetchFromGitHub, wrapGAppsHook3
3 , gtk3, gobject-introspection, libappindicator-gtk3, librsvg
4 , evdev, pygobject3, pylibacl, bluez, vdf
6 , libX11, libXext, libXfixes, libusb1, udev
9 buildPythonApplication rec {
10 pname = "sc-controller";
13 src = fetchFromGitHub {
17 sha256 = "sha256-arBdPrFtdllWMn1KuZ+PlENiJ0oRPVbgVjbef+pv+IE=";
20 nativeBuildInputs = [ wrapGAppsHook3 gobject-introspection ];
22 buildInputs = [ gtk3 libappindicator-gtk3 librsvg ];
24 propagatedBuildInputs = [ evdev pygobject3 pylibacl vdf ];
26 nativeCheckInputs = [ pytestCheckHook ];
29 substituteInPlace scc/paths.py --replace sys.prefix "'$out'"
30 substituteInPlace scc/uinput.py --replace /usr/include ${linuxHeaders}/include
31 substituteInPlace scc/device_monitor.py --replace "find_library('bluetooth')" "'libbluetooth.so.3'"
34 LD_LIBRARY_PATH = lib.makeLibraryPath [ libX11 libXext libXfixes libusb1 udev bluez ];
37 gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : "$LD_LIBRARY_PATH")
42 # scc runs these scripts as programs. (See find_binary() in scc/tools.py.)
43 cd $out/lib/python*/site-packages/scc/x11
44 patchPythonScript scc-autoswitch-daemon.py
45 patchPythonScript scc-osd-daemon.py
50 homepage = "https://github.com/Ryochan7/sc-controller";
51 # donations: https://www.patreon.com/kozec
52 description = "User-mode driver and GUI for Steam Controller and other controllers";
53 license = licenses.gpl2Only;
54 platforms = platforms.linux;
55 maintainers = with maintainers; [ orivej rnhmjoj ];