New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Steam controller userspace driver #33201
Conversation
{ stdenv, lib, buildPythonPackage, fetchPypi, libusb1 }: | ||
|
||
buildPythonPackage rec { | ||
name = "${pname}-${version}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name is not needed for buildPython*
sha256 = "03b7xrz8vqg8w0za5r503jhcmbd1ls5610jcja1rqz833nf0v4wc"; | ||
}; | ||
|
||
patchPhase = lib.optionalString stdenv.isLinux '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
postPatch
|
||
patchPhase = lib.optionalString stdenv.isLinux '' | ||
substituteInPlace usb1/libusb1.py --replace \ | ||
"ctypes.util.find_library(base_name)" "'${libusb1}/lib/libusb-1.0.so'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see ${stdenv.hostPlatform.extensions.sharedLibrary}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was fast! Thank you. I don't know how to use this. Any examples?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python-packages.nix
has some examples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, done.
homepage = https://github.com/vpelletier/python-libusb1; | ||
description = "Python ctype-based wrapper around libusb1"; | ||
license = licenses.lgpl2Plus; | ||
platform = libusb1.meta.platforms; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
already set by buildPython*
9929cd1
to
fb2a14a
Compare
fb2a14a
to
aa6a18a
Compare
I'm adding another driver in #33364 (originally based on this one) which additionally includes GUI configuration of profiles. |
Motivation for this change
Purely selfish reason: I'm getting one so this needs to be packaged.
I'll soon add a module as well.
Things done