Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

streamcontroller: 1.5.0-beta.7 -> 1.5.0-beta.8

Ulrik Strid 2096eeca ce52a4d8

+40 -25
+40 -25
pkgs/by-name/st/streamcontroller/package.nix
··· 1 1 { 2 2 stdenv, 3 3 lib, 4 + isKde ? false, 4 5 python3Packages, 5 6 fetchFromGitHub, 6 7 copyDesktopItems, ··· 12 13 libportal-gtk4, 13 14 xdg-desktop-portal, 14 15 xdg-desktop-portal-gtk, 16 + kdotool, 15 17 }: 16 - stdenv.mkDerivation rec { 18 + let 19 + # We have to hardcode revision because upstream often create multiple releases for the same version number. 20 + # This is the commit hash that maps to 1.5.0-beta.8 released on 2025-03-12 21 + rev = "de11d84afac7873044568606a8468c78d57aceda"; 22 + in 23 + stdenv.mkDerivation { 17 24 pname = "streamcontroller"; 18 25 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"; 26 + version = "1.5.0-beta.8"; 23 27 24 28 src = fetchFromGitHub { 25 29 repo = "StreamController"; 26 30 owner = "StreamController"; 27 31 inherit rev; 28 - hash = "sha256-tgbqURtqp1KbzOfXo4b4Dp3N8Sg8xcUSTwdEFXq+f6w="; 32 + hash = "sha256-pE92/oX9iZYCIhwDkPkjPq/cDUQLUGs+Ou5rjFEIBpo="; 29 33 }; 30 34 31 35 # The installation method documented upstream ··· 34 38 # Due to how the code is structured upstream, it's infeasible to use `buildPythonApplication`. 35 39 36 40 dontBuild = true; 37 - installPhase = '' 38 - runHook preInstall 41 + installPhase = 42 + # Some plugins needs to load things dynamically and in that case we won't find python3 without this 43 + let 44 + binPath = 45 + [ 46 + python3Packages.python.interpreter 47 + ] 48 + # Allows automatic detection of windows to switch pages on KDE 49 + ++ lib.optional isKde kdotool; 50 + in 51 + '' 52 + runHook preInstall 39 53 40 - mkdir -p $out/usr/lib/streamcontroller 41 - cp -r ./* $out/usr/lib/streamcontroller/ 54 + mkdir -p $out/usr/lib/streamcontroller 55 + cp -r ./* $out/usr/lib/streamcontroller/ 42 56 43 - mkdir -p $out/bin/ 57 + mkdir -p $out/bin/ 44 58 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" 59 + # Note that the implementation of main.py assumes 60 + # working directory to be at the root of the project's source code 61 + makeWrapper \ 62 + ${python3Packages.python.interpreter} \ 63 + $out/bin/streamcontroller \ 64 + --add-flags main.py \ 65 + --chdir $out/usr/lib/streamcontroller \ 66 + --prefix PYTHONPATH : "$PYTHONPATH" \ 67 + --prefix PATH : "$PATH:${lib.makeBinPath binPath}" 53 68 54 - mkdir -p "$out/etc/udev/rules.d" 55 - cp ./udev.rules $out/etc/udev/rules.d/70-streamcontroller.rules 69 + mkdir -p "$out/etc/udev/rules.d" 70 + cp ./udev.rules $out/etc/udev/rules.d/70-streamcontroller.rules 56 71 57 - install -D ./flatpak/icon_256.png $out/share/icons/hicolor/256x256/apps/streamcontroller.png 72 + install -D ./flatpak/icon_256.png $out/share/icons/hicolor/256x256/apps/com.core447.StreamController.png 58 73 59 - runHook postInstall 60 - ''; 74 + runHook postInstall 75 + ''; 61 76 62 77 desktopItems = [ 63 78 (makeDesktopItem { 64 79 name = "StreamController"; 65 80 desktopName = "StreamController"; 66 81 exec = "streamcontroller"; 67 - icon = "streamcontroller"; 82 + icon = "com.core447.StreamController"; 68 83 comment = "Control your Elgato Stream Decks"; 69 84 categories = [ "Utility" ]; 70 85 })