dot
vizie's NixOS desktop: Hyprland, CachyOS kernel and gaming tweaks
| 1 | # OpenDeck (Stream Deck software), repackaged from the upstream release .deb. |
| 2 | # Not in nixpkgs. It also ships the udev rules that let your user open the |
| 3 | # Stream Deck; modules/nixos/apps.nix installs them with services.udev.packages. |
| 4 | { |
| 5 | lib, |
| 6 | stdenv, |
| 7 | fetchurl, |
| 8 | dpkg, |
| 9 | autoPatchelfHook, |
| 10 | wrapGAppsHook3, |
| 11 | gtk3, |
| 12 | webkitgtk_4_1, |
| 13 | libayatana-appindicator, |
| 14 | libsoup_3, |
| 15 | glib-networking, |
| 16 | nodejs, |
| 17 | }: |
| 18 | |
| 19 | stdenv.mkDerivation (finalAttrs: { |
| 20 | pname = "opendeck"; |
| 21 | version = "2.14.1"; |
| 22 | |
| 23 | src = fetchurl { |
| 24 | url = "https://github.com/nekename/OpenDeck/releases/download/v/opendeck__amd64.deb"; |
| 25 | hash = "sha256-67C3lnjOD6Ra1TUsYDpiC89+k6l2toWVLYTutMLaEww="; |
| 26 | }; |
| 27 | |
| 28 | nativeBuildInputs = [ |
| 29 | dpkg |
| 30 | autoPatchelfHook |
| 31 | wrapGAppsHook3 |
| 32 | ]; |
| 33 | |
| 34 | buildInputs = [ |
| 35 | gtk3 |
| 36 | webkitgtk_4_1 |
| 37 | libsoup_3 |
| 38 | glib-networking |
| 39 | ]; |
| 40 | |
| 41 | unpackPhase = "dpkg-deb -x $src ."; |
| 42 | |
| 43 | installPhase = '' |
| 44 | runHook preInstall |
| 45 | mkdir -p $out |
| 46 | cp -r usr/* $out/ |
| 47 | install -Dm644 etc/udev/rules.d/40-streamdeck.rules $out/lib/udev/rules.d/40-streamdeck.rules |
| 48 | runHook postInstall |
| 49 | ''; |
| 50 | |
| 51 | # The tray icon library is opened with dlopen. Node.js plugins (Redline) are |
| 52 | # started with whatever `node` is on PATH. |
| 53 | preFixup = '' |
| 54 | gappsWrapperArgs+=( |
| 55 | --prefix LD_LIBRARY_PATH : |
| 56 | --suffix PATH : |
| 57 | ) |
| 58 | ''; |
| 59 | |
| 60 | meta = { |
| 61 | description = "Linux software for the Elgato Stream Deck with Stream Deck plugin support"; |
| 62 | homepage = "https://github.com/nekename/OpenDeck"; |
| 63 | license = lib.licenses.gpl3Plus; |
| 64 | mainProgram = "opendeck"; |
| 65 | platforms = [ "x86_64-linux" ]; |
| 66 | sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; |
| 67 | }; |
| 68 | }) |