mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-21 03:25:36 +00:00
Merge pull request #318899 from ulrikstrid/ulrikstrid--streamdeck-ui-4_1_2
streamdeck-ui: 3.1.0 -> 4.1.2
This commit is contained in:
commit
29616b7af3
@ -1,106 +0,0 @@
|
||||
{ lib
|
||||
, python3Packages
|
||||
, fetchFromGitHub
|
||||
, copyDesktopItems
|
||||
, writeText
|
||||
, makeDesktopItem
|
||||
, wrapGAppsHook3
|
||||
, xvfb-run
|
||||
, qt6
|
||||
}:
|
||||
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "streamdeck-ui";
|
||||
version = "3.1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "streamdeck-linux-gui";
|
||||
owner = "streamdeck-linux-gui";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-AIE9j022L4WSlHBAu3TT5uE4Ilgk/jYSmU03K8Hs8xY=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# nixpkgs has a newer pillow version
|
||||
./update-pillow.patch
|
||||
];
|
||||
|
||||
desktopItems = let
|
||||
common = {
|
||||
name = "streamdeck-ui";
|
||||
desktopName = "Stream Deck UI";
|
||||
icon = "streamdeck-ui";
|
||||
exec = "streamdeck";
|
||||
comment = "UI for the Elgato Stream Deck";
|
||||
categories = [ "Utility" ];
|
||||
};
|
||||
in builtins.map makeDesktopItem [
|
||||
common
|
||||
(common // {
|
||||
name = "${common.name}-noui";
|
||||
exec = "${common.exec} --no-ui";
|
||||
noDisplay = true;
|
||||
})
|
||||
];
|
||||
|
||||
postInstall =
|
||||
let
|
||||
udevRules = ''
|
||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", TAG+="uaccess"
|
||||
'';
|
||||
in
|
||||
''
|
||||
mkdir -p $out/lib/systemd/user
|
||||
substitute scripts/streamdeck.service $out/lib/systemd/user/streamdeck.service \
|
||||
--replace '<path to streamdeck>' $out/bin/streamdeck
|
||||
|
||||
mkdir -p "$out/etc/udev/rules.d"
|
||||
cp ${writeText "70-streamdeck.rules" udevRules} $out/etc/udev/rules.d/70-streamdeck.rules
|
||||
|
||||
mkdir -p "$out/share/pixmaps"
|
||||
cp streamdeck_ui/logo.png $out/share/pixmaps/streamdeck-ui.png
|
||||
'';
|
||||
|
||||
dontWrapQtApps = true;
|
||||
dontWrapGApps = true;
|
||||
makeWrapperArgs = [ "\${qtWrapperArgs[@]}" "\${gappsWrapperArgs[@]}"];
|
||||
|
||||
format = "pyproject";
|
||||
|
||||
nativeBuildInputs = [
|
||||
python3Packages.poetry-core
|
||||
copyDesktopItems
|
||||
qt6.wrapQtAppsHook
|
||||
wrapGAppsHook3
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
setuptools
|
||||
filetype
|
||||
cairosvg
|
||||
pillow
|
||||
pynput
|
||||
pyside6
|
||||
streamdeck
|
||||
xlib
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
qt6.qtwayland
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
xvfb-run
|
||||
python3Packages.pytest
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
xvfb-run pytest tests
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Linux compatible UI for the Elgato Stream Deck";
|
||||
homepage = "https://streamdeck-linux-gui.github.io/streamdeck-linux-gui/";
|
||||
license = licenses.mit;
|
||||
mainProgram = "streamdeck";
|
||||
maintainers = with maintainers; [ majiir ];
|
||||
};
|
||||
}
|
@ -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"
|
139
pkgs/by-name/st/streamdeck-ui/package.nix
Normal file
139
pkgs/by-name/st/streamdeck-ui/package.nix
Normal file
@ -0,0 +1,139 @@
|
||||
{
|
||||
copyDesktopItems,
|
||||
fetchFromGitHub,
|
||||
fetchPypi,
|
||||
lib,
|
||||
makeDesktopItem,
|
||||
python3Packages,
|
||||
qt6,
|
||||
wrapGAppsHook3,
|
||||
writeText,
|
||||
xvfb-run,
|
||||
}:
|
||||
|
||||
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 = "4.1.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "streamdeck-linux-gui";
|
||||
owner = "streamdeck-linux-gui";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-CSsFPGnKVQUCND6YOA9kfO41KS85C57YL9LcrWlQRKo=";
|
||||
};
|
||||
|
||||
format = "pyproject";
|
||||
|
||||
pythonRelaxDeps = [ "pillow" ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
python3Packages.poetry-core
|
||||
python3Packages.pythonRelaxDepsHook
|
||||
copyDesktopItems
|
||||
qt6.wrapQtAppsHook
|
||||
wrapGAppsHook3
|
||||
];
|
||||
|
||||
propagatedBuildInputs =
|
||||
with python3Packages;
|
||||
[
|
||||
setuptools
|
||||
filetype
|
||||
cairosvg
|
||||
pillow
|
||||
pynput
|
||||
pyside6
|
||||
streamdeck
|
||||
xlib
|
||||
importlib-metadata_6
|
||||
evdev
|
||||
]
|
||||
++ lib.optionals stdenv.isLinux [ qt6.qtwayland ];
|
||||
|
||||
nativeCheckInputs =
|
||||
[ xvfb-run ]
|
||||
++ (with python3Packages; [
|
||||
pytest
|
||||
pytest-qt
|
||||
pytest-mock
|
||||
]);
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
# The tests needs to find the log file
|
||||
export STREAMDECK_UI_LOG_FILE=$(pwd)/.streamdeck_ui.log
|
||||
xvfb-run pytest tests
|
||||
|
||||
runHook preCheck
|
||||
'';
|
||||
|
||||
postInstall =
|
||||
let
|
||||
udevRules = ''
|
||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", TAG+="uaccess"
|
||||
'';
|
||||
in
|
||||
''
|
||||
mkdir -p $out/lib/systemd/user
|
||||
substitute scripts/streamdeck.service $out/lib/systemd/user/streamdeck.service \
|
||||
--replace '<path to streamdeck>' $out/bin/streamdeck
|
||||
|
||||
mkdir -p "$out/etc/udev/rules.d"
|
||||
cp ${writeText "70-streamdeck.rules" udevRules} $out/etc/udev/rules.d/70-streamdeck.rules
|
||||
|
||||
mkdir -p "$out/share/pixmaps"
|
||||
cp streamdeck_ui/logo.png $out/share/pixmaps/streamdeck-ui.png
|
||||
'';
|
||||
|
||||
desktopItems =
|
||||
let
|
||||
common = {
|
||||
name = "streamdeck-ui";
|
||||
desktopName = "Stream Deck UI";
|
||||
icon = "streamdeck-ui";
|
||||
exec = "streamdeck";
|
||||
comment = "UI for the Elgato Stream Deck";
|
||||
categories = [ "Utility" ];
|
||||
};
|
||||
in
|
||||
builtins.map makeDesktopItem [
|
||||
common
|
||||
(
|
||||
common
|
||||
// {
|
||||
name = "${common.name}-noui";
|
||||
exec = "${common.exec} --no-ui";
|
||||
noDisplay = true;
|
||||
}
|
||||
)
|
||||
];
|
||||
|
||||
dontWrapQtApps = true;
|
||||
dontWrapGApps = true;
|
||||
makeWrapperArgs = [
|
||||
"\${qtWrapperArgs[@]}"
|
||||
"\${gappsWrapperArgs[@]}"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Linux compatible UI for the Elgato Stream Deck";
|
||||
downloadPage = "https://github.com/streamdeck-linux-gui/streamdeck-linux-gui/";
|
||||
homepage = "https://streamdeck-linux-gui.github.io/streamdeck-linux-gui/";
|
||||
license = lib.licenses.mit;
|
||||
mainProgram = "streamdeck";
|
||||
maintainers = with lib.maintainers; [ majiir ];
|
||||
};
|
||||
}
|
@ -31667,8 +31667,6 @@ with pkgs;
|
||||
|
||||
srain = callPackage ../applications/networking/irc/srain { };
|
||||
|
||||
streamdeck-ui = callPackage ../applications/misc/streamdeck-ui { };
|
||||
|
||||
super-productivity = callPackage ../applications/office/super-productivity { };
|
||||
|
||||
inherit (callPackages ../development/libraries/wlroots {})
|
||||
|
Loading…
Reference in New Issue
Block a user