···1{2 stdenv,3 lib,04 python3Packages,5 fetchFromGitHub,6 copyDesktopItems,···13 libportal-gtk4,14 xdg-desktop-portal,15 xdg-desktop-portal-gtk,016}:17-stdenv.mkDerivation rec {0000018 pname = "streamcontroller";1920- version = "1.5.0-beta.7";21- # We have to hardcode revision because upstream often create multiple releases for the same version number.22- # This is the commit hash that maps to 1.5.0-beta.7 released on 2024-11-2023- rev = "45b5bc72f617c5aea306450d6592da66ade53568";2425 src = fetchFromGitHub {26 repo = "StreamController";27 owner = "StreamController";28 inherit rev;29- hash = "sha256-tgbqURtqp1KbzOfXo4b4Dp3N8Sg8xcUSTwdEFXq+f6w=";30 };3132 # The installation method documented upstream···38 # Due to how the code is structured upstream, it's infeasible to use `buildPythonApplication`.3940 dontBuild = true;41- installPhase = ''42- runHook preInstall00000000004344- mkdir -p $out/usr/lib/streamcontroller45- cp -r ./* $out/usr/lib/streamcontroller/4647- mkdir -p $out/bin/4849- # Note that the implementation of main.py assumes50- # working directory to be at the root of the project's source code51- makeWrapper \52- ${python3Packages.python.interpreter} \53- $out/bin/streamcontroller \54- --add-flags main.py \55- --chdir $out/usr/lib/streamcontroller \56- --prefix PYTHONPATH : "$PYTHONPATH"05758- mkdir -p "$out/etc/udev/rules.d"59- cp ./udev.rules $out/etc/udev/rules.d/70-streamcontroller.rules6061- install -D ./flatpak/icon_256.png $out/share/icons/hicolor/256x256/apps/streamcontroller.png6263- runHook postInstall64- '';6566 desktopItems = [67 (makeDesktopItem {68 name = "StreamController";69 desktopName = "StreamController";70 exec = "streamcontroller";71- icon = "streamcontroller";72 comment = "Control your Elgato Stream Decks";73 categories = [ "Utility" ];74 })
···1{2 stdenv,3 lib,4+ isKde ? false,5 python3Packages,6 fetchFromGitHub,7 copyDesktopItems,···12 libportal-gtk4,13 xdg-desktop-portal,14 xdg-desktop-portal-gtk,15+ kdotool,16}:17+let18+ # We have to hardcode revision because upstream often create multiple releases for the same version number.19+ # This is the commit hash that maps to 1.5.0-beta.8 released on 2025-03-1220+ rev = "de11d84afac7873044568606a8468c78d57aceda";21+in22+stdenv.mkDerivation {23 pname = "streamcontroller";2425+ version = "1.5.0-beta.8";0002627 src = fetchFromGitHub {28 repo = "StreamController";29 owner = "StreamController";30 inherit rev;31+ hash = "sha256-pE92/oX9iZYCIhwDkPkjPq/cDUQLUGs+Ou5rjFEIBpo=";32 };3334 # The installation method documented upstream···34 # Due to how the code is structured upstream, it's infeasible to use `buildPythonApplication`.3536 dontBuild = true;37+ installPhase =38+ # Some plugins needs to load things dynamically and in that case we won't find python3 without this39+ let40+ binPath =41+ [42+ python3Packages.python.interpreter43+ ]44+ # Allows automatic detection of windows to switch pages on KDE45+ ++ lib.optional isKde kdotool;46+ in47+ ''48+ runHook preInstall4950+ mkdir -p $out/usr/lib/streamcontroller51+ cp -r ./* $out/usr/lib/streamcontroller/5253+ mkdir -p $out/bin/5455+ # Note that the implementation of main.py assumes56+ # working directory to be at the root of the project's source code57+ makeWrapper \58+ ${python3Packages.python.interpreter} \59+ $out/bin/streamcontroller \60+ --add-flags main.py \61+ --chdir $out/usr/lib/streamcontroller \62+ --prefix PYTHONPATH : "$PYTHONPATH" \63+ --prefix PATH : "$PATH:${lib.makeBinPath binPath}"6465+ mkdir -p "$out/etc/udev/rules.d"66+ cp ./udev.rules $out/etc/udev/rules.d/70-streamcontroller.rules6768+ install -D ./flatpak/icon_256.png $out/share/icons/hicolor/256x256/apps/com.core447.StreamController.png6970+ runHook postInstall71+ '';7273 desktopItems = [74 (makeDesktopItem {75 name = "StreamController";76 desktopName = "StreamController";77 exec = "streamcontroller";78+ icon = "com.core447.StreamController";79 comment = "Control your Elgato Stream Decks";80 categories = [ "Utility" ];81 })