2024-02-20 00:31:01 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, fetchurl
|
|
|
|
, mpv
|
|
|
|
, nodejs
|
|
|
|
, qmake
|
|
|
|
, qtwebchannel
|
|
|
|
, qtwebengine
|
|
|
|
, wrapQtAppsHook
|
2021-12-20 21:21:22 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "stremio-shell";
|
2024-02-01 23:35:31 +01:00
|
|
|
version = "4.4.165";
|
2021-12-20 21:21:22 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Stremio";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
fetchSubmodules = true;
|
2024-02-01 23:35:31 +01:00
|
|
|
sha256 = "sha256-Gky0/HaGm11PeV4twoQV71T99NG2o0mYzQxu/c9x5oE=";
|
2021-12-20 21:21:22 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
server = fetchurl {
|
|
|
|
url = "https://s3-eu-west-1.amazonaws.com/stremio-artifacts/four/v${version}/server.js";
|
2024-02-01 23:35:31 +01:00
|
|
|
sha256 = "sha256-52Pg0PrV15arGqhD3rXYCl1J6kcoL+/BHRvgiQBO/OA=";
|
2021-12-20 21:21:22 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ qtwebengine mpv ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ qmake wrapQtAppsHook ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/{bin,share/applications}
|
|
|
|
ln -s $out/opt/stremio/stremio $out/bin/stremio
|
|
|
|
mv $out/opt/stremio/smartcode-stremio.desktop $out/share/applications
|
2023-02-01 14:06:18 +01:00
|
|
|
install -Dm 644 images/stremio_window.png $out/share/pixmaps/smartcode-stremio.png
|
2021-12-20 21:21:22 +01:00
|
|
|
ln -s ${nodejs}/bin/node $out/opt/stremio/node
|
|
|
|
ln -s $server $out/opt/stremio/server.js
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2023-08-07 20:54:00 +02:00
|
|
|
mainProgram = "stremio";
|
2021-12-20 21:21:22 +01:00
|
|
|
description = "A modern media center that gives you the freedom to watch everything you want.";
|
|
|
|
homepage = "https://www.stremio.com/";
|
|
|
|
# (Server-side) web UI is closed source now, apparently they work on open-sourcing it.
|
|
|
|
# server.js appears to be MIT-licensed, but I can't find how they actually build it.
|
|
|
|
# https://www.reddit.com/r/StremioAddons/comments/n2ob04/a_summary_of_how_stremio_works_internally_and/
|
|
|
|
license = with licenses; [ gpl3 mit ];
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|