summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergio Pastor PĂ©rez <sergio.pastorperez@outlook.es>2024-03-29 17:25:11 +0100
committerGuix Patches Tester <>2024-04-17 13:54:59 +0200
commit91b711f199202a2e4b4d811e6acf1e1b06f8b698 (patch)
treebef031d7b62c3b7e01459f40baee5bef7bc07d6c
parentb47ae1ecc43baaf726701ab2d2f810ecfaa75428 (diff)
downloadguix-patches-issue-70078.tar
guix-patches-issue-70078.tar.gz
gnu: Add stremio.issue-70078
* gnu/packages/video.scm (stremio): New variable. Change-Id: Ie4c2dc30a0d488e20be21c3802330e993a60df70
-rw-r--r--gnu/packages/video.scm105
1 files changed, 105 insertions, 0 deletions
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 00072055d3..24acb8ccfa 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -169,6 +169,7 @@
#:use-module (gnu packages ncurses)
#:use-module (gnu packages nettle)
#:use-module (gnu packages networking)
+ #:use-module (gnu packages node)
#:use-module (gnu packages ocr)
#:use-module (gnu packages pcre)
#:use-module (gnu packages pciutils)
@@ -3752,6 +3753,110 @@ and custom quantization matrices.")
from sites like Twitch.tv and pipes them into a video player of choice.")
(license license:bsd-2)))
+(define-public stremio
+ (define server-js
+ (let ((version "4.20.8"))
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://dl.strem.io/server/v" version
+ "/desktop/server.js"))
+ (file-name (string-append "server-js-" version))
+ (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)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "14x9i8qvm19sijh7hqppbk8s14dvv7dqlck7x3s8n9i4xn4ncgd7"))))
+ (build-system qt-build-system)
+ (native-inputs (list librsvg))
+ (inputs (list qtbase-5
+ qtdeclarative-5
+ qtwebchannel-5
+ qtwebengine-5
+ qtquickcontrols-5
+ openssl
+ mpv
+ node))
+ (arguments
+ (list
+ #:tests? #f
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'setup-server
+ (lambda _
+ (copy-file #$server-js "server.js")))
+ (add-after 'unpack 'fix-paths
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "main.qml"
+ (("var node_executable =.*$")
+ (string-append "var node_executable =\""
+ (search-input-file inputs "bin/node")
+ "\"\n"))
+ (("applicationDirPath \\+\"/server\\.js\"")
+ (string-append "\""
+ #$server-js "\"")))
+ (substitute* "smartcode-stremio.desktop"
+ (("Exec=stremio")
+ (string-append "Exec="
+ #$output "/bin/stremio")))))
+ (replace 'configure
+ (lambda _
+ (invoke "qmake")))
+ (replace 'build
+ (lambda _
+ (invoke "make" "-f" "release.makefile"
+ (string-append "PREFIX="
+ #$output))))
+ (replace 'install
+ (lambda _
+ (invoke "make" "-f" "release.makefile" "install"
+ (string-append "PREFIX="
+ #$output))
+ ;; Setup bin dir.
+ (with-directory-excursion #$output
+ (install-file "opt/stremio/stremio" "bin")
+ (install-file "opt/stremio/smartcode-stremio.desktop"
+ "share/applications")
+ ;; Setup icon dir.
+ (for-each (lambda (size)
+ (let ((dir (string-append #$output
+ "/share/icons/hicolor/"
+ size
+ "x"
+ size
+ "/apps")))
+ (mkdir-p dir)
+ (copy-file (string-append
+ "opt/stremio/icons/smartcode-stremio_"
+ size ".png")
+ (string-append dir
+ "/smartcode-stremio.png"))
+ (copy-file (string-append
+ "opt/stremio/icons/smartcode-stremio-tray_"
+ size ".png")
+ (string-append dir
+ "/smartcode-stremio-tray.png"))))
+ '("16" "22" "24" "32" "64" "128"))
+ ;; Remove unnecessary opt dir.
+ (delete-file-recursively "opt")))))))
+ (home-page "https://www.stremio.com")
+ (synopsis "Modern media center that gives you the freedom to watch
+everything you want")
+ (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.")
+ (license license:expat)))
+
(define-public twitchy
(let ((commit "9beb36d80b16662414129693e74fa3a2fd97554e")) ; 3.4 has no tag
(package