diff options
author | Ulrik Strid <ulrik@strid.tech> | 2024-06-10 22:05:41 +0200 |
---|---|---|
committer | Ulrik Strid <ulrik@strid.tech> | 2024-06-11 22:01:02 +0200 |
commit | 742ed72e6a9acd79a13735a1bfa6aaddca7640ad (patch) | |
tree | 899ff743d81598b7da59c9c8e2ae5fe99673fb78 /pkgs/applications/misc | |
parent | 0377e02b2896679952446ac8ae91e7ffaf735522 (diff) |
streamdeck-ui: reformat with rfc formatter
Diffstat (limited to 'pkgs/applications/misc')
-rw-r--r-- | pkgs/applications/misc/streamdeck-ui/default.nix | 97 |
1 files changed, 53 insertions, 44 deletions
diff --git a/pkgs/applications/misc/streamdeck-ui/default.nix b/pkgs/applications/misc/streamdeck-ui/default.nix index f77c093331fe7..9adbea933593c 100644 --- a/pkgs/applications/misc/streamdeck-ui/default.nix +++ b/pkgs/applications/misc/streamdeck-ui/default.nix @@ -1,13 +1,14 @@ -{ lib -, python3Packages -, fetchFromGitHub -, fetchPypi -, copyDesktopItems -, writeText -, makeDesktopItem -, wrapGAppsHook3 -, xvfb-run -, qt6 +{ + lib, + python3Packages, + fetchFromGitHub, + fetchPypi, + copyDesktopItems, + writeText, + makeDesktopItem, + wrapGAppsHook3, + xvfb-run, + qt6, }: let # There are breaking changes between 6 and 7 @@ -31,23 +32,28 @@ python3Packages.buildPythonApplication rec { hash = "sha256-CSsFPGnKVQUCND6YOA9kfO41KS85C57YL9LcrWlQRKo="; }; - 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; - }) - ]; + 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 @@ -55,21 +61,24 @@ python3Packages.buildPythonApplication rec { 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/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/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 - ''; + mkdir -p "$out/share/pixmaps" + cp streamdeck_ui/logo.png $out/share/pixmaps/streamdeck-ui.png + ''; dontWrapQtApps = true; dontWrapGApps = true; - makeWrapperArgs = [ "\${qtWrapperArgs[@]}" "\${gappsWrapperArgs[@]}"]; + makeWrapperArgs = [ + "\${qtWrapperArgs[@]}" + "\${gappsWrapperArgs[@]}" + ]; format = "pyproject"; @@ -99,13 +108,13 @@ python3Packages.buildPythonApplication rec { ] ++ lib.optionals stdenv.isLinux [ qt6.qtwayland ]; - nativeCheckInputs = [ - xvfb-run - ] ++ (with python3Packages; [ - pytest - pytest-qt - pytest-mock - ]); + nativeCheckInputs = + [ xvfb-run ] + ++ (with python3Packages; [ + pytest + pytest-qt + pytest-mock + ]); checkPhase = '' # The tests needs to find the log file |