Merge pull request #33201 from rnhmjoj/steamcontroller
Add Steam controller userspace driver
This commit is contained in:
commit
bb729316dd
26
pkgs/development/python-modules/libusb1/default.nix
Normal file
26
pkgs/development/python-modules/libusb1/default.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{ stdenv, lib, buildPythonPackage, fetchPypi, libusb1 }:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "libusb1";
|
||||||
|
version = "1.6.4";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "03b7xrz8vqg8w0za5r503jhcmbd1ls5610jcja1rqz833nf0v4wc";
|
||||||
|
};
|
||||||
|
|
||||||
|
postPatch = lib.optionalString stdenv.isLinux ''
|
||||||
|
substituteInPlace usb1/libusb1.py --replace \
|
||||||
|
"ctypes.util.find_library(base_name)" \
|
||||||
|
"'${libusb1}/lib/libusb${stdenv.hostPlatform.extensions.sharedLibrary}'"
|
||||||
|
'';
|
||||||
|
|
||||||
|
buildInputs = [ libusb1 ];
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
homepage = https://github.com/vpelletier/python-libusb1;
|
||||||
|
description = "Python ctype-based wrapper around libusb1";
|
||||||
|
license = licenses.lgpl2Plus;
|
||||||
|
maintainers = with maintainers; [ rnhmjoj ];
|
||||||
|
};
|
||||||
|
}
|
35
pkgs/misc/drivers/steamcontroller/default.nix
Normal file
35
pkgs/misc/drivers/steamcontroller/default.nix
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{ stdenv, lib, fetchFromGitHub, python3Packages, libusb1, linuxHeaders
|
||||||
|
, GyroplotSupport ? false
|
||||||
|
}:
|
||||||
|
|
||||||
|
with python3Packages;
|
||||||
|
|
||||||
|
buildPythonApplication rec {
|
||||||
|
name = "steamcontroller-${version}";
|
||||||
|
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 ];
|
||||||
|
propagatedBuildInputs =
|
||||||
|
[ psutil python3Packages.libusb1 ]
|
||||||
|
++ lib.optionals GyroplotSupport [ pyqtgraph pyside ];
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "A standalone Steam controller driver";
|
||||||
|
homepage = https://github.com/ynsta/steamcontroller;
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ rnhmjoj ];
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
@ -19734,6 +19734,8 @@ with pkgs;
|
|||||||
|
|
||||||
splix = callPackage ../misc/cups/drivers/splix { };
|
splix = callPackage ../misc/cups/drivers/splix { };
|
||||||
|
|
||||||
|
steamcontroller = callPackage ../misc/drivers/steamcontroller { };
|
||||||
|
|
||||||
streamripper = callPackage ../applications/audio/streamripper { };
|
streamripper = callPackage ../applications/audio/streamripper { };
|
||||||
|
|
||||||
sqsh = callPackage ../development/tools/sqsh { };
|
sqsh = callPackage ../development/tools/sqsh { };
|
||||||
|
@ -4016,6 +4016,8 @@ in {
|
|||||||
|
|
||||||
libtmux = callPackage ../development/python-modules/libtmux { };
|
libtmux = callPackage ../development/python-modules/libtmux { };
|
||||||
|
|
||||||
|
libusb1 = callPackage ../development/python-modules/libusb1 { inherit (pkgs) libusb1; };
|
||||||
|
|
||||||
linuxfd = callPackage ../development/python-modules/linuxfd { };
|
linuxfd = callPackage ../development/python-modules/linuxfd { };
|
||||||
|
|
||||||
locket = buildPythonPackage rec {
|
locket = buildPythonPackage rec {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user