diff options
author | Ulrik Strid <ulrik@strid.tech> | 2024-06-10 22:05:10 +0200 |
---|---|---|
committer | Ulrik Strid <ulrik@strid.tech> | 2024-06-11 22:01:02 +0200 |
commit | 0377e02b2896679952446ac8ae91e7ffaf735522 (patch) | |
tree | 3daa20e4ba6d2d72c06299fed7e899d64fbeddd3 /pkgs/applications/misc | |
parent | 051f920625ab5aabe37c920346e3e69d7d34400e (diff) |
streamdeck-ui: 3.1.0 -> 4.1.2
Diffstat (limited to 'pkgs/applications/misc')
-rw-r--r-- | pkgs/applications/misc/streamdeck-ui/default.nix | 61 | ||||
-rw-r--r-- | pkgs/applications/misc/streamdeck-ui/update-pillow.patch | 13 |
2 files changed, 39 insertions, 35 deletions
diff --git a/pkgs/applications/misc/streamdeck-ui/default.nix b/pkgs/applications/misc/streamdeck-ui/default.nix index f8ecf3694e511..f77c093331fe7 100644 --- a/pkgs/applications/misc/streamdeck-ui/default.nix +++ b/pkgs/applications/misc/streamdeck-ui/default.nix @@ -1,6 +1,7 @@ { lib , python3Packages , fetchFromGitHub +, fetchPypi , copyDesktopItems , writeText , makeDesktopItem @@ -8,23 +9,28 @@ , xvfb-run , qt6 }: - +let + # There are breaking changes between 6 and 7 + importlib-metadata_6 = python3Packages.importlib-metadata.overrideAttrs (_: rec { + version = "6.9.0"; + src = fetchPypi { + pname = "importlib_metadata"; + inherit version; + hash = "sha256-6Ky1I8M1qRgiZ04Um0bAOZ7E0yjE0fbknCc9pf8CAbk="; + }; + }); +in python3Packages.buildPythonApplication rec { pname = "streamdeck-ui"; - version = "3.1.0"; + version = "4.1.2"; src = fetchFromGitHub { repo = "streamdeck-linux-gui"; owner = "streamdeck-linux-gui"; rev = "v${version}"; - sha256 = "sha256-AIE9j022L4WSlHBAu3TT5uE4Ilgk/jYSmU03K8Hs8xY="; + hash = "sha256-CSsFPGnKVQUCND6YOA9kfO41KS85C57YL9LcrWlQRKo="; }; - patches = [ - # nixpkgs has a newer pillow version - ./update-pillow.patch - ]; - desktopItems = let common = { name = "streamdeck-ui"; @@ -69,30 +75,41 @@ python3Packages.buildPythonApplication rec { nativeBuildInputs = [ python3Packages.poetry-core + python3Packages.pythonRelaxDepsHook copyDesktopItems qt6.wrapQtAppsHook wrapGAppsHook3 ]; - propagatedBuildInputs = with python3Packages; [ - setuptools - filetype - cairosvg - pillow - pynput - pyside6 - streamdeck - xlib - ] ++ lib.optionals stdenv.isLinux [ - qt6.qtwayland - ]; + pythonRelaxDeps = [ "pillow" ]; + + propagatedBuildInputs = + with python3Packages; + [ + setuptools + filetype + cairosvg + pillow + pynput + pyside6 + streamdeck + xlib + importlib-metadata_6 + evdev + ] + ++ lib.optionals stdenv.isLinux [ qt6.qtwayland ]; nativeCheckInputs = [ xvfb-run - python3Packages.pytest - ]; + ] ++ (with python3Packages; [ + pytest + pytest-qt + pytest-mock + ]); checkPhase = '' + # The tests needs to find the log file + export STREAMDECK_UI_LOG_FILE=$(pwd)/.streamdeck_ui.log xvfb-run pytest tests ''; diff --git a/pkgs/applications/misc/streamdeck-ui/update-pillow.patch b/pkgs/applications/misc/streamdeck-ui/update-pillow.patch deleted file mode 100644 index 88945586628f1..0000000000000 --- a/pkgs/applications/misc/streamdeck-ui/update-pillow.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/pyproject.toml b/pyproject.toml -index 0aff29e..4371616 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -14,7 +14,7 @@ packages = [ - [tool.poetry.dependencies] - python = ">=3.8,<3.12" - streamdeck = "^0.9.3" --pillow = "^9.4.0" -+pillow = "^10.0.0" - pynput = "^1.7.6" - pyside6 = "^6.4.2" - CairoSVG = "^2.5.2" |