Merge branch 'add-stremio' into 'master'

nongnu: Add stremio.

See merge request nonguix/nonguix!496
This commit is contained in:
Justin Veilleux 2024-11-24 11:00:42 +00:00
commit 661542950a

View File

@ -1,14 +1,23 @@
;;; SPDX-License-Identifier: GPL-3.0-or-later ;;; SPDX-License-Identifier: GPL-3.0-or-later
;;; Copyright © 2022 Jelle Licht <jlicht@fsfe.org> ;;; Copyright © 2022 Jelle Licht <jlicht@fsfe.org>
;;; Copyright © 2024 Oleg Pykhalov <go.wigust@gmail.com> ;;; Copyright © 2024 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2024 Justin Veilleux <terramorpha@cock.li>
(define-module (nongnu packages video) (define-module (nongnu packages video)
#:use-module (gnu packages pkg-config) #:use-module (gnu packages pkg-config)
#:use-module (gnu packages video) #: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 utils)
#:use-module (guix build-system cmake) #: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 gexp)
#:use-module (guix git-download) #:use-module (guix git-download)
#:use-module (guix download)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix utils) #:use-module (guix utils)
#:use-module ((guix licenses) #:prefix license:) #:use-module ((guix licenses) #:prefix license:)
@ -156,3 +165,83 @@ video decode capabilities of supported Intel GPUs."))))
(package-description obs) (package-description obs)
" This build of OBS includes embeded Chromium-based browser to enable " This build of OBS includes embeded Chromium-based browser to enable
Browser source.")))) 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."))))