nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

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

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