Skip to content
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

Merged
merged 2 commits into from Dec 30, 2017
Merged

Conversation

rnhmjoj
Copy link
Contributor

@rnhmjoj rnhmjoj commented Dec 30, 2017

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
  • Tested using sandboxing (nix.useSandbox on NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test (none)
  • Tested compilation of all pkgs that depend on this change (none)
  • Tested execution of all binary files
  • Fits CONTRIBUTING.md.

@rnhmjoj rnhmjoj requested a review from FRidh as a code owner December 30, 2017 11:01
{ stdenv, lib, buildPythonPackage, fetchPypi, libusb1 }:

buildPythonPackage rec {
name = "${pname}-${version}";
Copy link
Member

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 ''
Copy link
Member

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'"
Copy link
Member

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}

Copy link
Contributor Author

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?

Copy link
Member

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.

Copy link
Contributor Author

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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already set by buildPython*

@FRidh FRidh merged commit bb72931 into NixOS:master Dec 30, 2017
@orivej orivej mentioned this pull request Jan 3, 2018
8 tasks
@orivej
Copy link
Contributor

orivej commented Jan 3, 2018

I'm adding another driver in #33364 (originally based on this one) which additionally includes GUI configuration of profiles.

@rnhmjoj rnhmjoj deleted the steamcontroller branch January 22, 2018 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants