From 47543c0dfdc5e5e22296b689f6221de1fabbfa72 Mon Sep 17 00:00:00 2001 From: terramorpha Date: Mon, 15 Jul 2024 19:35:34 -0400 Subject: [PATCH] nongnu: Add stremio. * nongnu/packages/video.scm (stremio): New variable. --- nongnu/packages/video.scm | 89 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/nongnu/packages/video.scm b/nongnu/packages/video.scm index e5af3a1..72223ab 100644 --- a/nongnu/packages/video.scm +++ b/nongnu/packages/video.scm @@ -1,14 +1,23 @@ ;;; SPDX-License-Identifier: GPL-3.0-or-later ;;; Copyright © 2022 Jelle Licht ;;; Copyright © 2024 Oleg Pykhalov +;;; Copyright © 2024 Justin Veilleux (define-module (nongnu packages video) #:use-module (gnu packages pkg-config) #:use-module (gnu packages video) + #:use-module (gnu packages qt) + #:use-module (gnu packages tls) + #:use-module (gnu packages gnome) + #:use-module (gnu packages node) + #:use-module (gnu packages cmake) #:use-module (guix build utils) #:use-module (guix build-system cmake) + #:use-module (guix build-system gnu) + #:use-module (guix build-system qt) #:use-module (guix gexp) #:use-module (guix git-download) + #:use-module (guix download) #:use-module (guix packages) #:use-module (guix utils) #:use-module ((guix licenses) #:prefix license:) @@ -156,3 +165,83 @@ video decode capabilities of supported Intel GPUs.")))) (package-description obs) " This build of OBS includes embeded Chromium-based browser to enable Browser source.")))) + +(define-public stremio + (let ((server.js + (origin + (method url-fetch) + (uri "https://dl.strem.io/server/v4.20.8/desktop/server.js") + (sha256 + (base32 "0xmlbx6aib5h78ya369pnpxyn05b12l05i8v2kymijbmaw7j04vi"))))) + (package + (name "stremio") + (version "4.4.168") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/Stremio/stremio-shell") + (commit (string-append "v" version)) + (recursive? #t))) + (sha256 + (base32 + "14x9i8qvm19sijh7hqppbk8s14dvv7dqlck7x3s8n9i4xn4ncgd7")))) + (build-system gnu-build-system) + (arguments + (list + ;; no tests + #:tests? #f + #:phases + (with-imported-modules '((guix build qt-utils)) + #~(modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'put-server.js + (lambda _ + (copy-file #$server.js "./server.js"))) + (replace 'build + (lambda _ + (invoke "make" + (string-append "PREFIX=" #$output) + "-f" + "release.makefile") + (display "hello\n"))) + (replace 'install + (lambda _ + (invoke "make" + (string-append "PREFIX=" #$output) + "-f" + "release.makefile" "install"))) + (add-after 'install 'link-bin-to-opt + (lambda _ + (mkdir (string-append #$output "/bin")) + (symlink (string-append #$output "/opt/stremio/stremio") + (string-append #$output "/bin/stremio")))) + (add-after 'link-bin-to-opt 'wrap-programs + (lambda* (#:key sh inputs #:allow-other-keys) + (use-modules (guix build qt-utils)) + ((@@ (guix build qt-utils) wrap-qt-program*) + (string-append #$output "/bin/stremio") + #:sh (which "sh") + #:inputs inputs + #:output-dir #$output + #:qt-wrap-excluded-inputs %qt-wrap-excluded-inputs))))))) + (inputs + (list + qtbase-5 + qtdeclarative-5 + qtwebengine-5 + openssl + qtquickcontrols-5 + mpv + librsvg + node)) + (native-inputs + (list + cmake)) + (license license:gpl3+) + (home-page "https://www.stremio.com/") + (synopsis "Media center with streaming and torrenting capabilities") + (description "Stremio offers a secure, modern and seamless entertainment experience. With +its easy-to-use interface and diverse content library, including 4K HDR +support, users can enjoy their favorite movies and TV shows across all their +devices. And with its commitment to security, Stremio is the ultimate choice +for a worry-free, high-quality streaming experience."))))