iosevka: 32.4.0 -> 32.5.0 (#378549)
[NixPkgs.git] / pkgs / by-name / st / streamcontroller / package.nix
blobe1f95c5ebf6134a4366585169dc8451d42c34be1
2   stdenv,
3   lib,
4   python3Packages,
5   fetchFromGitHub,
6   copyDesktopItems,
7   makeDesktopItem,
8   wrapGAppsHook4,
9   gobject-introspection,
10   libadwaita,
11   libportal,
12   libportal-gtk4,
13   xdg-desktop-portal,
14   xdg-desktop-portal-gtk,
16 stdenv.mkDerivation rec {
17   pname = "streamcontroller";
19   version = "1.5.0-beta.7";
20   # We have to hardcode revision because upstream often create multiple releases for the same version number.
21   # This is the commit hash that maps to 1.5.0-beta.7 released on 2024-11-20
22   rev = "45b5bc72f617c5aea306450d6592da66ade53568";
24   src = fetchFromGitHub {
25     repo = "StreamController";
26     owner = "StreamController";
27     inherit rev;
28     hash = "sha256-tgbqURtqp1KbzOfXo4b4Dp3N8Sg8xcUSTwdEFXq+f6w=";
29   };
31   # The installation method documented upstream
32   # (https://streamcontroller.github.io/docs/latest/installation/) is to clone the repo,
33   # run `pip install`, then run `python3 main.py` to launch the program.
34   # Due to how the code is structured upstream, it's infeasible to use `buildPythonApplication`.
36   dontBuild = true;
37   installPhase = ''
38     runHook preInstall
40     mkdir -p $out/usr/lib/streamcontroller
41     cp -r ./* $out/usr/lib/streamcontroller/
43     mkdir -p $out/bin/
45     # Note that the implementation of main.py assumes
46     # working directory to be at the root of the project's source code
47     makeWrapper \
48       ${python3Packages.python.interpreter} \
49       $out/bin/streamcontroller \
50       --add-flags main.py \
51       --chdir $out/usr/lib/streamcontroller \
52       --prefix PYTHONPATH : "$PYTHONPATH"
54     mkdir -p "$out/etc/udev/rules.d"
55     cp ./udev.rules $out/etc/udev/rules.d/70-streamcontroller.rules
57     install -D ./flatpak/icon_256.png $out/share/icons/hicolor/256x256/apps/streamcontroller.png
59     runHook postInstall
60   '';
62   desktopItems = [
63     (makeDesktopItem {
64       name = "StreamController";
65       desktopName = "StreamController";
66       exec = "streamcontroller";
67       icon = "streamcontroller";
68       comment = "Control your Elgato Stream Decks";
69       categories = [ "Utility" ];
70     })
71   ];
73   nativeBuildInputs = [
74     copyDesktopItems
75     wrapGAppsHook4
76     gobject-introspection
77   ];
79   buildInputs =
80     [
81       libadwaita
82       libportal
83       libportal-gtk4
84       xdg-desktop-portal
85       xdg-desktop-portal-gtk
86     ]
87     ++ (with python3Packages; [
88       annotated-types
89       async-lru
90       cairocffi
91       cairosvg
92       certifi
93       cffi
94       charset-normalizer
95       click
96       colorama
97       contourpy
98       cssselect2
99       cycler
100       dbus-python
101       decorator
102       defusedxml
103       distlib
104       dnspython
105       evdev
106       filelock
107       fonttools
108       fuzzywuzzy
109       gcodepy
110       get-video-properties
111       gitdb
112       idna
113       imageio
114       imageio-ffmpeg
115       indexed-bzip2
116       jinja2
117       joblib
118       kiwisolver
119       levenshtein
120       linkify-it-py
121       loguru
122       markdown-it-py
123       markupsafe
124       matplotlib
125       mdit-py-plugins
126       mdurl
127       meson
128       meson-python
129       natsort
130       nltk
131       numpy
132       opencv4
133       packaging
134       pillow
135       platformdirs
136       plumbum
137       proglog
138       psutil
139       pulsectl
140       pycairo
141       pyclip
142       pycparser
143       pydantic
144       pydantic-core
145       pyenchant
146       pygments
147       pygobject3
148       pymongo
149       pyparsing
150       pyperclip
151       pyproject-metadata
152       pyro5
153       pyspellchecker
154       python-dateutil
155       pyudev
156       pyusb
157       pyyaml
158       rapidfuzz
159       regex
160       requests
161       requirements-parser
162       rich
163       rpyc
164       serpent
165       setproctitle
166       six
167       smmap
168       speedtest-cli
169       streamcontroller-plugin-tools
170       streamdeck
171       textual
172       tinycss2
173       tqdm
174       types-setuptools
175       typing-extensions
176       uc-micro-py
177       urllib3
178       usb-monitor
179       webencodings
180       websocket-client
181     ]);
183   meta = with lib; {
184     description = "Elegant Linux app for the Elgato Stream Deck with support for plugins";
185     homepage = "https://core447.com/";
186     license = licenses.gpl3;
187     mainProgram = "streamcontroller";
188     maintainers = with maintainers; [ sifmelcara ];
189     platforms = lib.platforms.linux;
190   };