feat: add streamdeck succesor
This commit is contained in:
parent
8d9f96fff5
commit
f77b8a5fda
|
@ -1,4 +1,9 @@
|
|||
{ inputs, lib, ... }:
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
inputs.nixos-hardware.nixosModules.common-gpu-nvidia-nonprime
|
||||
|
@ -73,4 +78,7 @@
|
|||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
|
||||
nixpkgs.config.cudaSupport = true;
|
||||
|
||||
environment.systemPackages = [ pkgs.streamlink ];
|
||||
services.udev.packages = [ pkgs.streamlink ];
|
||||
}
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
[
|
||||
(import ./scripts)
|
||||
(_prev: final: {
|
||||
zsh-histdb-skim = final.callPackage ./zsh-histdb-skim.nix { };
|
||||
zsh-histdb = final.callPackage ./zsh-histdb.nix { };
|
||||
actual = final.callPackage ./actual.nix { };
|
||||
pr-tracker = final.callPackage ./pr-tracker.nix { };
|
||||
homebox = final.callPackage ./homebox.nix { };
|
||||
deploy = final.callPackage ./deploy.nix { };
|
||||
minion = final.callPackage ./minion.nix { };
|
||||
mongodb-bin = final.callPackage ./mongodb-bin.nix { };
|
||||
awakened-poe-trade = final.callPackage ./awakened-poe-trade.nix { };
|
||||
neovim-clean = final.neovim-unwrapped.overrideAttrs (
|
||||
(_final: prev: {
|
||||
zsh-histdb-skim = prev.callPackage ./zsh-histdb-skim.nix { };
|
||||
zsh-histdb = prev.callPackage ./zsh-histdb.nix { };
|
||||
actual = prev.callPackage ./actual.nix { };
|
||||
pr-tracker = prev.callPackage ./pr-tracker.nix { };
|
||||
homebox = prev.callPackage ./homebox.nix { };
|
||||
deploy = prev.callPackage ./deploy.nix { };
|
||||
minion = prev.callPackage ./minion.nix { };
|
||||
mongodb-bin = prev.callPackage ./mongodb-bin.nix { };
|
||||
awakened-poe-trade = prev.callPackage ./awakened-poe-trade.nix { };
|
||||
neovim-clean = prev.neovim-unwrapped.overrideAttrs (
|
||||
_neovimFinal: neovimPrev: {
|
||||
nativeBuildInputs = (neovimPrev.nativeBuildInputs or [ ]) ++ [ final.makeWrapper ];
|
||||
nativeBuildInputs = (neovimPrev.nativeBuildInputs or [ ]) ++ [ prev.makeWrapper ];
|
||||
postInstall =
|
||||
(neovimPrev.postInstall or "")
|
||||
+ ''
|
||||
|
@ -20,7 +20,7 @@
|
|||
'';
|
||||
}
|
||||
);
|
||||
path-of-building = final.path-of-building.overrideAttrs (old: {
|
||||
path-of-building = prev.path-of-building.overrideAttrs (old: {
|
||||
postFixup =
|
||||
(old.postFixup or "")
|
||||
+ ''
|
||||
|
@ -28,10 +28,10 @@
|
|||
--set QT_QPA_PLATFORM xcb
|
||||
'';
|
||||
});
|
||||
kanidm = final.kanidm.overrideAttrs (
|
||||
kanidm = prev.kanidm.overrideAttrs (
|
||||
old:
|
||||
let
|
||||
provisionSrc = final.fetchFromGitHub {
|
||||
provisionSrc = prev.fetchFromGitHub {
|
||||
owner = "oddlama";
|
||||
repo = "kanidm-provision";
|
||||
rev = "v1.1.0";
|
||||
|
@ -47,6 +47,9 @@
|
|||
doCheck = false;
|
||||
}
|
||||
);
|
||||
kanidm-provision = final.callPackage ./kanidm-provision.nix { };
|
||||
kanidm-provision = prev.callPackage ./kanidm-provision.nix { };
|
||||
pythonPackagesExtension = prev.pythonPackagesExtension ++ [
|
||||
(_pythonFinal: pythonPrev: { usb-monitor = pythonPrev.callPackage ./usb-monitor.nix { }; })
|
||||
];
|
||||
})
|
||||
]
|
||||
|
|
218
pkgs/streamcontroller.nix
Normal file
218
pkgs/streamcontroller.nix
Normal file
|
@ -0,0 +1,218 @@
|
|||
{
|
||||
stdenv,
|
||||
lib,
|
||||
python3Packages,
|
||||
fetchFromGitHub,
|
||||
copyDesktopItems,
|
||||
makeDesktopItem,
|
||||
wrapGAppsHook4,
|
||||
gobject-introspection,
|
||||
libadwaita,
|
||||
libportal,
|
||||
libportal-gtk4,
|
||||
xdg-desktop-portal,
|
||||
xdg-desktop-portal-gtk,
|
||||
}:
|
||||
let
|
||||
streamcontroller-plugin-tools = python3Packages.buildPythonPackage rec {
|
||||
pname = "streamcontroller-plugin-tools";
|
||||
version = "2.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "StreamController";
|
||||
repo = "streamcontroller-plugin-tools";
|
||||
rev = version;
|
||||
hash = "sha256-dQZPRSzHhI3X+Pf7miwJlECGFgUfp68PtvwXAmpq5/s=";
|
||||
};
|
||||
|
||||
dependencies = with python3Packages; [
|
||||
loguru
|
||||
rpyc
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "streamcontroller_plugin_tools" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "StreamController plugin tools";
|
||||
homepage = "https://github.com/StreamController/streamcontroller-plugin-tools";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ sifmelcara ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "streamcontroller";
|
||||
|
||||
# Note that the latest tagged version (1.5.0-beta.6) includes a python dependency
|
||||
# that doesn't exist anymore, so we package an unstable version instead.
|
||||
version = "0-unstable-2024-08-13";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "StreamController";
|
||||
owner = "StreamController";
|
||||
rev = "dbb6460a69137af192db09d504224ae9f1127cbd";
|
||||
hash = "sha256-+YYzHLRU5MNjF3iaKIDj9k4PVg+vnEZhbc3ZmNI7xyw=";
|
||||
};
|
||||
|
||||
# The installation method documented upstream
|
||||
# (https://streamcontroller.github.io/docs/latest/installation/) is to clone the repo,
|
||||
# run `pip install`, then run `python3 main.py` to launch the program.
|
||||
# Due to how the code is structured upstream, it's infeasible to use `buildPythonApplication`.
|
||||
|
||||
dontBuild = true;
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin/
|
||||
|
||||
cat << EOF > $out/bin/streamcontroller
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Note that the implementation of main.py assumes
|
||||
# working directory to be at the root of the project's source code
|
||||
cd ${src}
|
||||
${python3Packages.python}/bin/python main.py
|
||||
|
||||
EOF
|
||||
chmod +x $out/bin/streamcontroller
|
||||
|
||||
wrapProgram $out/bin/streamcontroller --prefix PYTHONPATH : "$PYTHONPATH"
|
||||
|
||||
# Install udev rules
|
||||
mkdir -p "$out/etc/udev/rules.d"
|
||||
cp ${src}/udev.rules $out/etc/udev/rules.d/70-streamcontroller.rules
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = "StreamController";
|
||||
desktopName = "StreamController";
|
||||
exec = "streamcontroller";
|
||||
icon = "${src}/flatpak/icon_256.png";
|
||||
categories = [ "Application" ];
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
copyDesktopItems
|
||||
wrapGAppsHook4
|
||||
];
|
||||
|
||||
buildInputs =
|
||||
[
|
||||
gobject-introspection
|
||||
libadwaita
|
||||
libportal
|
||||
libportal-gtk4
|
||||
xdg-desktop-portal
|
||||
xdg-desktop-portal-gtk
|
||||
]
|
||||
++ (with python3Packages; [
|
||||
annotated-types
|
||||
async-lru
|
||||
cairocffi
|
||||
cairosvg
|
||||
certifi
|
||||
cffi
|
||||
charset-normalizer
|
||||
click
|
||||
colorama
|
||||
contourpy
|
||||
cssselect2
|
||||
cycler
|
||||
dbus-python
|
||||
decorator
|
||||
defusedxml
|
||||
distlib
|
||||
dnspython
|
||||
evdev
|
||||
filelock
|
||||
fonttools
|
||||
fuzzywuzzy
|
||||
gcodepy
|
||||
get-video-properties
|
||||
gitdb
|
||||
idna
|
||||
imageio
|
||||
imageio-ffmpeg
|
||||
indexed-bzip2
|
||||
jinja2
|
||||
joblib
|
||||
kiwisolver
|
||||
levenshtein
|
||||
linkify-it-py
|
||||
loguru
|
||||
markdown-it-py
|
||||
markupsafe
|
||||
matplotlib
|
||||
mdit-py-plugins
|
||||
mdurl
|
||||
meson
|
||||
meson-python
|
||||
natsort
|
||||
nltk
|
||||
numpy
|
||||
opencv4
|
||||
packaging
|
||||
pillow
|
||||
platformdirs
|
||||
plumbum
|
||||
proglog
|
||||
psutil
|
||||
pulsectl
|
||||
pycairo
|
||||
pyclip
|
||||
pycparser
|
||||
pydantic
|
||||
pydantic-core
|
||||
pyenchant
|
||||
pygments
|
||||
pygobject3
|
||||
pymongo
|
||||
pyparsing
|
||||
pyperclip
|
||||
pyproject-metadata
|
||||
pyro5
|
||||
pyspellchecker
|
||||
python-dateutil
|
||||
pyudev
|
||||
pyusb
|
||||
pyyaml
|
||||
rapidfuzz
|
||||
regex
|
||||
requests
|
||||
requirements-parser
|
||||
rich
|
||||
rpyc
|
||||
serpent
|
||||
setproctitle
|
||||
setproctitle
|
||||
six
|
||||
smmap
|
||||
speedtest-cli
|
||||
streamcontroller-plugin-tools
|
||||
streamdeck
|
||||
textual
|
||||
tinycss2
|
||||
tqdm
|
||||
types-setuptools
|
||||
typing-extensions
|
||||
uc-micro-py
|
||||
urllib3
|
||||
usb-monitor
|
||||
webencodings
|
||||
websocket-client
|
||||
]);
|
||||
|
||||
meta = with lib; {
|
||||
description = "An elegant Linux app for the Elgato Stream Deck with support for plugins";
|
||||
homepage = "https://core447.com/";
|
||||
license = licenses.gpl3;
|
||||
mainProgram = "streamcontroller";
|
||||
maintainers = with maintainers; [ sifmelcara ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
29
pkgs/usb-monitor.nix
Normal file
29
pkgs/usb-monitor.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
lib,
|
||||
python3Packages,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "usb-monitor";
|
||||
version = "1.21";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit version;
|
||||
pname = "usb_monitor";
|
||||
hash = "sha256-M+BUmbNxQWcULFECexTnp55EZiJ6y3bYCEtSwqKldAk=";
|
||||
};
|
||||
|
||||
dependencies = [ python3Packages.pyudev ];
|
||||
|
||||
pythonImportsCheck = [ "usbmonitor" ];
|
||||
|
||||
meta = {
|
||||
description = "Cross-platform library for USB device monitoring";
|
||||
homepage = "https://github.com/Eric-Canas/USBMonitor";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ sifmelcara ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
programs.streamdeck-ui = {
|
||||
enable = true;
|
||||
#enable = true;
|
||||
settings = {
|
||||
# Device ID
|
||||
"AL31H1B01852" = {
|
||||
|
|
Loading…
Reference in a new issue