Files
nixos-configs/packages/stremio-linux-shell/default.nix
T

106 lines
2.6 KiB
Nix

{
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";
};
})