Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.03 35 lines 973 B view raw
1{ stdenv, lib, fetchFromGitHub, python3Packages, libusb1, linuxHeaders 2, GyroplotSupport ? false 3}: 4 5with python3Packages; 6 7buildPythonApplication rec { 8 name = "steamcontroller-${version}"; 9 version = "2017-08-11"; 10 11 src = fetchFromGitHub { 12 owner = "ynsta"; 13 repo = "steamcontroller"; 14 rev = "80928ce237925e0d0d7a65a45b481435ba6b931e"; 15 sha256 = "0lv9j2zv8fmkmc0x9r7fa8zac2xrwfczms35qz1nfa1hr84wniid"; 16 }; 17 18 postPatch = '' 19 substituteInPlace src/uinput.py --replace \ 20 "/usr/include" "${linuxHeaders}/include" 21 ''; 22 23 buildInputs = [ libusb1 ]; 24 propagatedBuildInputs = 25 [ psutil python3Packages.libusb1 ] 26 ++ lib.optionals GyroplotSupport [ pyqtgraph pyside ]; 27 28 meta = with stdenv.lib; { 29 description = "A standalone Steam controller driver"; 30 homepage = https://github.com/ynsta/steamcontroller; 31 license = licenses.mit; 32 maintainers = with maintainers; [ rnhmjoj ]; 33 platforms = platforms.linux; 34 }; 35}