Commit 6e6773c8 authored by Ming-Chuan's avatar Ming-Chuan
Browse files

python3Packages.streamcontroller-streamdeck: init at 0.1.5



It's a fork of streamdeck package made by streamcontroller author,
required by streamcontroller.

pkgs/development/python-modules/streamcontroller-streamdeck/default.nix
is copied from pkgs/development/python-modules/streamdeck/default.nix
with minor modification.

Co-authored-by: default avatarSandro <sandro.jaeckel@gmail.com>
parent 04c2037a
Loading
Loading
Loading
Loading
+44 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  buildPythonPackage,
  fetchPypi,
  replaceVars,
  pkgs,
  setuptools,
}:

buildPythonPackage rec {
  pname = "streamcontroller-streamdeck";
  version = "0.1.5";
  pyproject = true;

  src = fetchPypi {
    inherit version;
    pname = "streamcontroller_streamdeck";
    hash = "sha256-JSDCg9PLDqxM1KdoCEnYzJip71re6rdS/mLn6fsGn9E=";
  };

  patches = [
    # substitute libusb path
    (replaceVars ./hardcode-libusb.patch {
      libusb = "${pkgs.hidapi}/lib/libhidapi-libusb${stdenv.hostPlatform.extensions.sharedLibrary}";
    })
  ];

  build-system = [ setuptools ];

  pythonImportsCheck = [ "StreamDeck" ];
  doCheck = false;

  meta = with lib; {
    # This is a fork of abcminiuser/python-elgato-streamdeck targeted at StreamController.
    description = "Python library to control the Elgato Stream Deck";
    homepage = "https://github.com/StreamController/streamcontroller-python-elgato-streamdeck";
    license = licenses.mit;
    maintainers = with maintainers; [
      majiir
      sifmelcara
    ];
  };
}
+13 −0
Original line number Diff line number Diff line
diff --git a/src/StreamDeck/Transport/LibUSBHIDAPI.py b/src/StreamDeck/Transport/LibUSBHIDAPI.py
index edf53a1..2d38af3 100644
--- a/src/StreamDeck/Transport/LibUSBHIDAPI.py
+++ b/src/StreamDeck/Transport/LibUSBHIDAPI.py
@@ -155,7 +155,7 @@ class LibUSBHIDAPI(Transport):
 
             search_library_names = {
                 "Windows": ["hidapi.dll", "libhidapi-0.dll", "./hidapi.dll"],
-                "Linux": ["libhidapi-libusb.so", "libhidapi-libusb.so.0"],
+                "Linux": ["@libusb@"],
                 "Darwin": ["libhidapi.dylib"],
                 "FreeBSD": ["libhidapi.so"],
             }
+4 −0
Original line number Diff line number Diff line
@@ -18212,6 +18212,10 @@ self: super: with self; {
    callPackage ../development/python-modules/streamcontroller-plugin-tools
      { };
  streamcontroller-streamdeck =
    callPackage ../development/python-modules/streamcontroller-streamdeck
      { };
  streamdeck = callPackage ../development/python-modules/streamdeck { };
  streaming-form-data = callPackage ../development/python-modules/streaming-form-data { };