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 | }: |
| 17 | |
| 18 | stdenv.mkDerivation (finalAttrs: { |
| 19 | pname = "opendeck"; |
| 20 | version = "2.14.1"; |
| 21 | |
| 22 | src = fetchurl { |
| 23 | url = "https://github.com/nekename/OpenDeck/releases/download/v/opendeck__amd64.deb"; |
| 24 | hash = "sha256-67C3lnjOD6Ra1TUsYDpiC89+k6l2toWVLYTutMLaEww="; |
| 25 | }; |
| 26 | |
| 27 | nativeBuildInputs = [ |
| 28 | dpkg |
| 29 | autoPatchelfHook |
| 30 | wrapGAppsHook3 |
| 31 | ]; |
| 32 | |
| 33 | buildInputs = [ |
| 34 | gtk3 |
| 35 | webkitgtk_4_1 |
| 36 | libsoup_3 |
| 37 | glib-networking |
| 38 | ]; |
| 39 | |
| 40 | unpackPhase = "dpkg-deb -x $src ."; |
| 41 | |
| 42 | installPhase = '' |
| 43 | runHook preInstall |
| 44 | mkdir -p $out |
| 45 | cp -r usr/* $out/ |
| 46 | install -Dm644 etc/udev/rules.d/40-streamdeck.rules $out/lib/udev/rules.d/40-streamdeck.rules |
| 47 | runHook postInstall |
| 48 | ''; |
| 49 | |
| 50 | # The tray icon library is opened with dlopen. |
| 51 | preFixup = '' |
| 52 | gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : ) |
| 53 | ''; |
| 54 | |
| 55 | meta = { |
| 56 | description = "Linux software for the Elgato Stream Deck with Stream Deck plugin support"; |
| 57 | homepage = "https://github.com/nekename/OpenDeck"; |
| 58 | license = lib.licenses.gpl3Plus; |
| 59 | mainProgram = "opendeck"; |
| 60 | platforms = [ "x86_64-linux" ]; |
| 61 | sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; |
| 62 | }; |
| 63 | }) |