sc-controller: switch to python3 fork
The original sc-controller is being rewritten in C, while the current version is stuck in maintenance mode and python 2. This fork is based entirely on the original kozec's sc-controller and introduces python 3 support while staying backward-compatible (including versioning up to the patch number).
This commit is contained in:
parent
0d082b464d
commit
f74154a4b9
@ -1,19 +1,20 @@
|
|||||||
{ lib, buildPythonApplication, fetchFromGitHub, wrapGAppsHook
|
{ lib, buildPythonApplication, fetchFromGitHub, wrapGAppsHook
|
||||||
|
, pytestCheckHook
|
||||||
, gtk3, gobject-introspection, libappindicator-gtk3, librsvg
|
, gtk3, gobject-introspection, libappindicator-gtk3, librsvg
|
||||||
, evdev, pygobject3, pylibacl, pytest, bluez
|
, evdev, pygobject3, pylibacl, bluez, vdf
|
||||||
, linuxHeaders
|
, linuxHeaders
|
||||||
, libX11, libXext, libXfixes, libusb1, udev
|
, libX11, libXext, libXfixes, libusb1, udev
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonApplication rec {
|
buildPythonApplication rec {
|
||||||
pname = "sc-controller";
|
pname = "sc-controller";
|
||||||
version = "0.4.7";
|
version = "0.4.8.6";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "kozec";
|
owner = "Ryochan7";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1dskjh5qcjf4x21n4nk1zvdfivbgimsrc2lq1id85bibzps29499";
|
sha256 = "1fgizgzm79zl9r2kkwvh1gf9lnxaix15283xxk6bz843inr8b88k";
|
||||||
};
|
};
|
||||||
|
|
||||||
# see https://github.com/NixOS/nixpkgs/issues/56943
|
# see https://github.com/NixOS/nixpkgs/issues/56943
|
||||||
@ -23,9 +24,9 @@ buildPythonApplication rec {
|
|||||||
|
|
||||||
buildInputs = [ gtk3 gobject-introspection libappindicator-gtk3 librsvg ];
|
buildInputs = [ gtk3 gobject-introspection libappindicator-gtk3 librsvg ];
|
||||||
|
|
||||||
propagatedBuildInputs = [ evdev pygobject3 pylibacl ];
|
propagatedBuildInputs = [ evdev pygobject3 pylibacl vdf ];
|
||||||
|
|
||||||
checkInputs = [ pytest ];
|
checkInputs = [ pytestCheckHook ];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace scc/paths.py --replace sys.prefix "'$out'"
|
substituteInPlace scc/paths.py --replace sys.prefix "'$out'"
|
||||||
@ -48,12 +49,8 @@ buildPythonApplication rec {
|
|||||||
)
|
)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkPhase = ''
|
|
||||||
PYTHONPATH=. py.test
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/kozec/sc-controller";
|
homepage = "https://github.com/Ryochan7/sc-controller";
|
||||||
# donations: https://www.patreon.com/kozec
|
# donations: https://www.patreon.com/kozec
|
||||||
description = "User-mode driver and GUI for Steam Controller and other controllers";
|
description = "User-mode driver and GUI for Steam Controller and other controllers";
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
|
@ -32036,7 +32036,7 @@ with pkgs;
|
|||||||
|
|
||||||
satysfi = callPackage ../tools/typesetting/satysfi { };
|
satysfi = callPackage ../tools/typesetting/satysfi { };
|
||||||
|
|
||||||
sc-controller = pythonPackages.callPackage ../misc/drivers/sc-controller {
|
sc-controller = python3Packages.callPackage ../misc/drivers/sc-controller {
|
||||||
inherit libusb1; # Shadow python.pkgs.libusb1.
|
inherit libusb1; # Shadow python.pkgs.libusb1.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user