feat: test streamcontroller upstream
This commit is contained in:
parent
ccd83ce53e
commit
0ebd6d5ec9
17
flake.lock
17
flake.lock
|
@ -1435,6 +1435,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixpkgs-streamcontroller": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1724014496,
|
||||||
|
"narHash": "sha256-2+fJJtJ2BEkiIUl//7ysrMRW/whuw4/oX/xL/CFfSDM=",
|
||||||
|
"owner": "sifmelcara",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "1e6aa887f401957d4d3fd01934e6e176eea9aa9a",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "sifmelcara",
|
||||||
|
"ref": "streamcontroller",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs-wayland": {
|
"nixpkgs-wayland": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_5",
|
"flake-compat": "flake-compat_5",
|
||||||
|
@ -1714,6 +1730,7 @@
|
||||||
"nixos-nftables-firewall": "nixos-nftables-firewall",
|
"nixos-nftables-firewall": "nixos-nftables-firewall",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixpkgs-octoprint": "nixpkgs-octoprint",
|
"nixpkgs-octoprint": "nixpkgs-octoprint",
|
||||||
|
"nixpkgs-streamcontroller": "nixpkgs-streamcontroller",
|
||||||
"nixpkgs-wayland": "nixpkgs-wayland",
|
"nixpkgs-wayland": "nixpkgs-wayland",
|
||||||
"nixvim": "nixvim",
|
"nixvim": "nixvim",
|
||||||
"pre-commit-hooks": "pre-commit-hooks_4",
|
"pre-commit-hooks": "pre-commit-hooks_4",
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
nixpkgs-octoprint.url = "github:patrickdag/nixpkgs/octoprint-update";
|
nixpkgs-octoprint.url = "github:patrickdag/nixpkgs/octoprint-update";
|
||||||
|
nixpkgs-streamcontroller.url = "github:sifmelcara/nixpkgs/streamcontroller";
|
||||||
|
|
||||||
nixpkgs-wayland = {
|
nixpkgs-wayland = {
|
||||||
url = "github:nix-community/nixpkgs-wayland";
|
url = "github:nix-community/nixpkgs-wayland";
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
# So we just mimic the options and overlays defined by the passed pkgs set.
|
# So we just mimic the options and overlays defined by the passed pkgs set.
|
||||||
node.name = name;
|
node.name = name;
|
||||||
node.secretsDir = ../. + "/hosts/${name}/secrets";
|
node.secretsDir = ../. + "/hosts/${name}/secrets";
|
||||||
nixpkgs.overlays = (import ../pkgs) ++ [
|
nixpkgs.overlays = (import ../pkgs inputs) ++ [
|
||||||
# nixpkgs-wayland.overlay
|
# nixpkgs-wayland.overlay
|
||||||
inputs.nixos-extra-modules.overlays.default
|
inputs.nixos-extra-modules.overlays.default
|
||||||
inputs.nix-topology.overlays.default
|
inputs.nix-topology.overlays.default
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
_module.args.pkgs = import inputs.nixpkgs {
|
_module.args.pkgs = import inputs.nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
overlays = (import ../pkgs/default.nix) ++ [
|
overlays = (import ../pkgs inputs) ++ [
|
||||||
inputs.nix-topology.overlays.default
|
inputs.nix-topology.overlays.default
|
||||||
inputs.nixos-extra-modules.overlays.default
|
inputs.nixos-extra-modules.overlays.default
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[
|
inputs: [
|
||||||
(import ./scripts)
|
(import ./scripts)
|
||||||
(_final: prev: {
|
(_final: prev: {
|
||||||
zsh-histdb-skim = prev.callPackage ./zsh-histdb-skim.nix { };
|
zsh-histdb-skim = prev.callPackage ./zsh-histdb-skim.nix { };
|
||||||
|
@ -10,6 +10,9 @@
|
||||||
minion = prev.callPackage ./minion.nix { };
|
minion = prev.callPackage ./minion.nix { };
|
||||||
mongodb-bin = prev.callPackage ./mongodb-bin.nix { };
|
mongodb-bin = prev.callPackage ./mongodb-bin.nix { };
|
||||||
awakened-poe-trade = prev.callPackage ./awakened-poe-trade.nix { };
|
awakened-poe-trade = prev.callPackage ./awakened-poe-trade.nix { };
|
||||||
|
streamcontroller =
|
||||||
|
prev.callPackage "${inputs.nixpgkgs-streamcontroller}/pkgs/by-name/st/streamcontroller/package.nix"
|
||||||
|
{ };
|
||||||
neovim-clean = prev.neovim-unwrapped.overrideAttrs (
|
neovim-clean = prev.neovim-unwrapped.overrideAttrs (
|
||||||
_neovimFinal: neovimPrev: {
|
_neovimFinal: neovimPrev: {
|
||||||
nativeBuildInputs = (neovimPrev.nativeBuildInputs or [ ]) ++ [ prev.makeWrapper ];
|
nativeBuildInputs = (neovimPrev.nativeBuildInputs or [ ]) ++ [ prev.makeWrapper ];
|
||||||
|
@ -49,7 +52,12 @@
|
||||||
);
|
);
|
||||||
kanidm-provision = prev.callPackage ./kanidm-provision.nix { };
|
kanidm-provision = prev.callPackage ./kanidm-provision.nix { };
|
||||||
pythonPackagesExtension = prev.pythonPackagesExtension ++ [
|
pythonPackagesExtension = prev.pythonPackagesExtension ++ [
|
||||||
(_pythonFinal: pythonPrev: { usb-monitor = pythonPrev.callPackage ./usb-monitor.nix { }; })
|
(_pythonFinal: pythonPrev: {
|
||||||
|
usb-monitor =
|
||||||
|
pythonPrev.callPackage
|
||||||
|
"${inputs.nixpkgs-streamcontroller}/pkgs/development/python-modules/usb-monitor/default.nix"
|
||||||
|
{ };
|
||||||
|
})
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,218 +0,0 @@
|
||||||
{
|
|
||||||
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;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,29 +0,0 @@
|
||||||
{
|
|
||||||
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;
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in a new issue