Unverified Commit 4653d834 authored by Michele Guerini Rocco's avatar Michele Guerini Rocco Committed by GitHub
Browse files

sc-controller: 0.4.8.21 -> 0.5.0 (#385590)

parents 57de8fb5 e35b8c0b
Loading
Loading
Loading
Loading
+29 −20
Original line number Diff line number Diff line
{
  lib,
  buildPythonApplication,
  python3Packages,
  fetchFromGitHub,
  wrapGAppsHook3,
  pytestCheckHook,
  gtk3,
  gobject-introspection,
  libappindicator-gtk3,
  librsvg,
  evdev,
  pygobject3,
  pylibacl,
  bluez,
  vdf,
  linuxHeaders,
  libX11,
  libXext,
  libXfixes,
  libusb1,
  udev,
  gtk-layer-shell,
}:

buildPythonApplication rec {
python3Packages.buildPythonApplication rec {
  pname = "sc-controller";
  version = "0.4.8.21";
  version = "0.5.0";

  src = fetchFromGitHub {
    owner = "C0rn3j";
    repo = pname;
    repo = "sc-controller";
    tag = "v${version}";
    hash = "sha256-XakbCuwjIAXYFZxvJsAlDIJEl09pwFPT12h04onXd34=";
    hash = "sha256-Zxzka9zM9u7AJxrqh8011plP/HgQK61e6ejKksYfPz0=";
  };

  nativeBuildInputs = [
@@ -43,14 +39,27 @@ buildPythonApplication rec {
    librsvg
  ];

  propagatedBuildInputs = [
  dependencies =
    with python3Packages;
    [
      evdev
      pygobject3
      pylibacl
      vdf
      ioctl-opt
    ]
    ++ [
      gtk-layer-shell
      python3Packages.libusb1
    ];

  nativeCheckInputs = [ pytestCheckHook ];
  nativeCheckInputs = [
    python3Packages.pytestCheckHook
    python3Packages.libusb1
    python3Packages.toml
  ];

  patches = [ ./scc_osd_keyboard.patch ];

  postPatch = ''
    substituteInPlace scc/paths.py --replace sys.prefix "'$out'"
@@ -80,13 +89,13 @@ buildPythonApplication rec {
    )
  '';

  meta = with lib; {
  meta = {
    homepage = "https://github.com/C0rn3j/sc-controller";
    # donations: https://www.patreon.com/kozec
    description = "User-mode driver and GUI for Steam Controller and other controllers";
    license = licenses.gpl2Only;
    platforms = platforms.linux;
    maintainers = with maintainers; [
    license = lib.licenses.gpl2Only;
    platforms = lib.platforms.linux;
    maintainers = with lib.maintainers; [
      orivej
      rnhmjoj
    ];
+21 −0
Original line number Diff line number Diff line
diff --git a/scc/bin/scc_osd_keyboard.py b/scc/bin/scc_osd_keyboard.py
index 832d6e0..29e0cda 100755
--- a/scc/bin/scc_osd_keyboard.py
+++ b/scc/bin/scc_osd_keyboard.py
@@ -5,7 +5,7 @@ def sigint(*a):
 	print("\n*break*")
 	sys.exit(0)
 
-if __name__ == "__main__":
+def main():
 	signal.signal(signal.SIGINT, sigint)
 
 	import gi
@@ -23,3 +23,6 @@ if __name__ == "__main__":
 		sys.exit(1)
 	k.run()
 	sys.exit(k.get_exit_code())
+
+if __name__ == "__main__":
+	main()
+30 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  setuptools,
}:

buildPythonPackage rec {
  pname = "ioctl-opt";
  version = "1.3";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "vpelletier";
    repo = "python-ioctl-opt";
    tag = version;
    hash = "sha256-OPQmJUrZIFPdoKitlqWvgMHkLSK2nC01Yy7UpGy+aP8=";
  };

  build-system = [ setuptools ];

  pythonImportsCheck = [ "ioctl_opt" ];

  meta = {
    description = "Pythonified linux asm-generic/ioctl.h";
    homepage = "https://github.com/vpelletier/python-ioctl-opt";
    license = lib.licenses.gpl2Plus;
    maintainers = with lib.maintainers; [ rnhmjoj ];
  };
}
+0 −4
Original line number Diff line number Diff line
@@ -17829,10 +17829,6 @@ with pkgs;
  sane-frontends = callPackage ../applications/graphics/sane/frontends.nix { };
  sc-controller = python3Packages.callPackage ../misc/drivers/sc-controller {
    inherit libusb1; # Shadow python.pkgs.libusb1.
  };
  slock = callPackage ../misc/screensavers/slock {
    conf = config.slock.conf or null;
  };
+2 −0
Original line number Diff line number Diff line
@@ -6492,6 +6492,8 @@ self: super: with self; {
  iocextract = callPackage ../development/python-modules/iocextract { };
  ioctl-opt = callPackage ../development/python-modules/ioctl-opt { };
  ionhash = callPackage ../development/python-modules/ionhash { };
  ionoscloud = callPackage ../development/python-modules/ionoscloud { };