From d74a8a4a39ab2e27419cf2c43116ec4c6ba95772 Mon Sep 17 00:00:00 2001 From: John Ogle Date: Mon, 11 May 2026 20:54:59 -0700 Subject: [PATCH] Add stremio-linux-shell from master branch --- flake.nix | 5 ++ packages/default.nix | 1 + packages/stremio-linux-shell/default.nix | 105 +++++++++++++++++++++++ 3 files changed, 111 insertions(+) create mode 100644 packages/stremio-linux-shell/default.nix diff --git a/flake.nix b/flake.nix index 869f178..9818301 100644 --- a/flake.nix +++ b/flake.nix @@ -116,6 +116,10 @@ (ufinal: uprev: { claude-code = uprev.callPackage ./packages/claude-code { }; }) + # Override stremio-linux-shell with custom GTK4/master branch version + (ofinal: oprev: { + stremio-linux-shell = ofinal.custom.stremio-linux-shell; + }) ]; nixosModules = [ @@ -296,6 +300,7 @@ "custom-rclone-torbox-setup" = pkgs.custom.rclone-torbox-setup; "custom-opencode" = pkgs.custom.opencode; "custom-qmd" = pkgs.custom.qmd; + "custom-stremio-linux-shell" = pkgs.custom.stremio-linux-shell; "qt-pinned-jellyfin-media-player" = pkgsQt.jellyfin-media-player; # "qt-pinned-stremio" = pkgsQt.stremio; # Replaced by stremio-linux-shell (Rust/CEF-based) diff --git a/packages/default.nix b/packages/default.nix index 9ca060a..2c2b20f 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -11,4 +11,5 @@ rec { qmd = pkgs.callPackage ./qmd { }; openclaw-image = pkgs.callPackage ./openclaw-image { }; openclaw-runtime-closure = pkgs.callPackage ./openclaw-image/runtime-closure.nix { inherit qmd; }; + stremio-linux-shell = pkgs.callPackage ./stremio-linux-shell { }; } diff --git a/packages/stremio-linux-shell/default.nix b/packages/stremio-linux-shell/default.nix new file mode 100644 index 0000000..5919bcb --- /dev/null +++ b/packages/stremio-linux-shell/default.nix @@ -0,0 +1,105 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + pkg-config, + wrapGAppsHook4, + nodejs, + libepoxy, + mpv, + gtk4, + libadwaita, + webkitgtk_6_0, + atk, + glib, + cairo, + pango, + gdk-pixbuf, + libsoup_3, + libnotify, + libsecret, +}: + +let + src = fetchFromGitHub { + owner = "Stremio"; + repo = "stremio-linux-shell"; + rev = "261f46fdf155c9352bd1b2a8ce1ee232b36c9286"; + hash = "sha256-7kfUUjqXIXL1TrSse2AKCjGXHWKcTrDEeXtsFpIiKHc="; + }; +in +rustPlatform.buildRustPackage (finalAttrs: { + pname = "stremio-linux-shell"; + version = "1.0.0-beta.13.master"; + + src = src; + + # Note: The cargo hash for this specific commit + cargoHash = "sha256-yqrPtvF59ii/UTHAcCa9DDqTe6czG722mxzCPB6UoG0="; + + # Build instructions + nativeBuildInputs = [ + pkg-config + wrapGAppsHook4 + nodejs + ]; + + buildInputs = [ + libepoxy + mpv + gtk4 + libadwaita + webkitgtk_6_0 + atk + glib + cairo + pango + gdk-pixbuf + libsoup_3 + libnotify + libsecret + ]; + + # Environment variables + env.GETTEXT_DIR = "${src}/po"; + env.GETTEXT_DOMAIN = "stremio"; + env.SERVER_PATH = "\${out}/share/stremio/server.js"; + + # Post install steps + postInstall = '' + mkdir -p $out/share/applications + cp data/com.stremio.Stremio.desktop $out/share/applications/com.stremio.Stremio.desktop + + mkdir -p $out/share/metainfo + cp data/com.stremio.Stremio.metainfo.xml $out/share/metainfo/com.stremio.Stremio.metainfo.xml + + mkdir -p $out/share/dbus-1/services + cp data/com.stremio.Stremio.service $out/share/dbus-1/services/com.stremio.Stremio.service + + mkdir -p $out/share/icons/hicolor/128x128/apps + cp data/icons/com.stremio.Stremio.svg $out/share/icons/hicolor/128x128/apps/com.stremio.Stremio.svg + + mkdir -p $out/share/stremio + cp data/server.js $out/share/stremio/server.js + + # Rename the binary from stremio-linux-shell to stremio + mv $out/bin/stremio-linux-shell $out/bin/stremio + ''; + + meta = { + description = "Stremio Linux Shell - Freedom to Stream (GTK4/libadwaita/WebKitGTK master branch)"; + longDescription = '' + Stremio Linux Shell - a modern, GTK4/libadwaita-based media center client. + This version uses WebKitGTK instead of CEF/winit from the beta.13 version. + + Note: This is built from the master branch which is a complete rewrite. + Requires Rust 1.92+ to build due to GTK4 0.11.3 dependencies. + ''; + homepage = "https://stremio.com"; + sourceProvenance = [ lib.sourceTypes.fromSource ]; + license = lib.licenses.gpl3Only; + maintainers = with lib.maintainers; [ ]; + platforms = [ "x86_64-linux" "aarch64-linux" ]; + mainProgram = "stremio"; + }; +})