[bug#70078,v2] gnu: Add stremio.
Commit Message
* gnu/packages/video.scm (stremio): New variable.
Change-Id: Ie4c2dc30a0d488e20be21c3802330e993a60df70
---
gnu/packages/video.scm | 112 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 112 insertions(+)
base-commit: bcfb283cda1b782129c8a70b69d216b925501185
Comments
Hello Sergio,
since this package passes QA, I had a quick look.
Concerning the license, the https://github.com/Stremio/stremio-shell
repository links to the GPL version 3, not expat. Normally this means
"or later"; unfortunately the source code does not seem to have an
explicit license notice specifying gpl3 or gpl3+.
So should this package be called stremio or stremio-shell?
The binary is called stremio, so I think it makes sense to keep this
also as the project name.
I also did not find a license for the "embedded"
stremio-server-4.20.8.js file; the file itself says
/*! For license information please see server.js.LICENSE.txt */
but where is this file?
I also found this open issue
https://github.com/Stremio/stremio-service/issues/49
which seems to indicate that the code is not free.
Andreas
Hello Andreas, thanks for reviewing my patch.
Andreas Enge <andreas@enge.fr> writes:
> Concerning the license, the https://github.com/Stremio/stremio-shell
> repository links to the GPL version 3, not expat. Normally this means
> "or later"; unfortunately the source code does not seem to have an
> explicit license notice specifying gpl3 or gpl3+.
I apologise for the mistake.
> So should this package be called stremio or stremio-shell?
> The binary is called stremio, so I think it makes sense to keep this
> also as the project name.
I think "stremio" is the better name. In my opinion, it's more clear for
the end user.
> I also did not find a license for the "embedded"
> stremio-server-4.20.8.js file; the file itself says
> /*! For license information please see server.js.LICENSE.txt */
> but where is this file?
> I also found this open issue
> https://github.com/Stremio/stremio-service/issues/49
> which seems to indicate that the code is not free.
I could neither find the license for that file. It's probably an
overlooked issue, I think we can probably get in touch with the
developers to clarify that. Reading that issue, it seems that they did
not have the source code available for the "server.js", which now it is,
as you can see[1].
Also this post[2] seem to indicate that the intention of the Stremio
developers it to open-source everything.
[1] https://dl.strem.io/server/v4.20.8/desktop/server.js
[2]
https://blog.stremio.com/announcing-stremio-core-embracing-open-source-and-rust
Reading that post it seems that the "server.js" should also fall under
an open-source license.
What do you reckon? Do we need to contact the developers before merging
the package?
Best regards,
Sergio.
Hello Sergio and Andreas,
>> I also did not find a license for the "embedded"
>> stremio-server-4.20.8.js file; the file itself says
>> /*! For license information please see server.js.LICENSE.txt */
>> but where is this file?
>> I also found this open issue
>> https://github.com/Stremio/stremio-service/issues/49
>> which seems to indicate that the code is not free.
>
> I could neither find the license for that file. It's probably an
> overlooked issue, I think we can probably get in touch with the
> developers to clarify that. Reading that issue, it seems that they did
> not have the source code available for the "server.js", which now it is,
> as you can see[1].
>
> Also this post[2] seem to indicate that the intention of the Stremio
> developers it to open-source everything.
>
> [1] https://dl.strem.io/server/v4.20.8/desktop/server.js
> [2]
> https://blog.stremio.com/announcing-stremio-core-embracing-open-source-and-rust
>
> Reading that post it seems that the "server.js" should also fall under
> an open-source license.
>
> What do you reckon? Do we need to contact the developers before merging
> the package?
I concur with Sergio, the server.js has been available now and the
announcement post does make it clear that it is "open-source". Now of
course we need a license to make it clear if it’s libre (GPL-compatible)
or not. We should contact the developers for that. But I think it is
GPL-compatible, since if you look at the flatpak of Stremio[0] it says
that GPL-3.0-or-later.
So I don’t think there’s much to worry, we should double check it from
the devs and then go forward in adding it. Stremio is a godsend for
people who torrent and self-host their media content.
[0]: https://flathub.org/apps/com.stremio.Stremio
Regards,
Hello,
Am Sat, Apr 19, 2025 at 12:43:27PM +0200 schrieb Sergio Pastor Pérez:
> I think "stremio" is the better name. In my opinion, it's more clear for
> the end user.
okay, good with me.
> > I also did not find a license for the "embedded"
> > stremio-server-4.20.8.js file; the file itself says
> > /*! For license information please see server.js.LICENSE.txt */
> > but where is this file?
> > I also found this open issue
> > https://github.com/Stremio/stremio-service/issues/49
> > which seems to indicate that the code is not free.
> I could neither find the license for that file. It's probably an
> overlooked issue, I think we can probably get in touch with the
> developers to clarify that. Reading that issue, it seems that they did
> not have the source code available for the "server.js", which now it is,
> as you can see[1].
> Also this post[2] seem to indicate that the intention of the Stremio
> developers it to open-source everything.
> [1] https://dl.strem.io/server/v4.20.8/desktop/server.js
> [2]
> https://blog.stremio.com/announcing-stremio-core-embracing-open-source-and-rust
> Reading that post it seems that the "server.js" should also fall under
> an open-source license.
> What do you reckon? Do we need to contact the developers before merging
> the package?
This all seems to be a bit vague. There is this press release [2] from
2019 that makes announcements like "Stremio-core will be open-source too,
and licensed under the permissive MIT license.", but such a declaration
of intentions does not mean that anything *is* actually published under
such a license. (And for instance, the expat vs. gpl3 question shows the
discrepancy between announcements and reality.)
On the other hand, there is the issue
https://github.com/Stremio/stremio-service/issues/49
from 2023 in which the "lead dev" arguments that some parts of the code
are and should remain proprietary.
It may just be an oversight, and the hint towards a license file at the
top of server.js is an indication of that, but we cannot be sure and do
not have this license file.
So my opinion is that as long as we have no proofs of a free license,
this package has to be considered proprietary and cannot be added to
Guix. Maybe you could bring this up with the developers and have them
add a license statement, or a link to such a statement, in the server.js
file.
Andreas
Andreas Enge <andreas@enge.fr> writes:
> This all seems to be a bit vague. There is this press release [2] from
> 2019 that makes announcements like "Stremio-core will be open-source too,
> and licensed under the permissive MIT license.", but such a declaration
> of intentions does not mean that anything *is* actually published under
> such a license. (And for instance, the expat vs. gpl3 question shows the
> discrepancy between announcements and reality.)
>
> On the other hand, there is the issue
> https://github.com/Stremio/stremio-service/issues/49
> from 2023 in which the "lead dev" arguments that some parts of the code
> are and should remain proprietary.
>
> It may just be an oversight, and the hint towards a license file at the
> top of server.js is an indication of that, but we cannot be sure and do
> not have this license file.
>
> So my opinion is that as long as we have no proofs of a free license,
> this package has to be considered proprietary and cannot be added to
> Guix. Maybe you could bring this up with the developers and have them
> add a license statement, or a link to such a statement, in the server.js
> file.
Alright, I've opened an issue in their Github page[1]. Let's see if they
can clarify the license for us.
[1] https://github.com/Stremio/stremio-shell/issues/435
Sergio Pastor Pérez <sergio.pastorperez@gmail.com> writes:
> Andreas Enge <andreas@enge.fr> writes:
>> This all seems to be a bit vague. There is this press release [2] from
>> 2019 that makes announcements like "Stremio-core will be open-source too,
>> and licensed under the permissive MIT license.", but such a declaration
>> of intentions does not mean that anything *is* actually published under
>> such a license. (And for instance, the expat vs. gpl3 question shows the
>> discrepancy between announcements and reality.)
>>
>> On the other hand, there is the issue
>> https://github.com/Stremio/stremio-service/issues/49
>> from 2023 in which the "lead dev" arguments that some parts of the code
>> are and should remain proprietary.
>>
>> It may just be an oversight, and the hint towards a license file at the
>> top of server.js is an indication of that, but we cannot be sure and do
>> not have this license file.
>>
>> So my opinion is that as long as we have no proofs of a free license,
>> this package has to be considered proprietary and cannot be added to
>> Guix. Maybe you could bring this up with the developers and have them
>> add a license statement, or a link to such a statement, in the server.js
>> file.
>
> Alright, I've opened an issue in their Github page[1]. Let's see if they
> can clarify the license for us.
>
> [1] https://github.com/Stremio/stremio-shell/issues/435
I've got a reply and seems Andreas was right distrusting the
licensing. According to the developers 'server.js' is proprietary
software[1]
[1]
https://github.com/Stremio/stremio-shell/issues/435#issuecomment-2844471402
-- Closing this issue due to the package not following Guix guidelines.
Hello Sergio,
Am Thu, May 01, 2025 at 12:15:13PM +0200 schrieb Sergio Pastor Pérez:
> I've got a reply and seems Andreas was right distrusting the
> licensing. According to the developers 'server.js' is proprietary
> software[1]
> https://github.com/Stremio/stremio-shell/issues/435#issuecomment-2844471402
thanks for following up! The logic behind using free software to
"only wrap" non-free software, so that the combined work becomes
non-distributable by third parties, is strange, but their decision
to make.
Andreas
@@ -177,6 +177,7 @@ (define-module (gnu packages video)
#: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)
@@ -3844,6 +3845,117 @@ (define-public streamlink
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 "stremio-server-" version ".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))
+ ;; NOTE: submodules are embedded libraries so there is no reason
+ ;; to unbundle them.
+ (recursive? #t)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "14x9i8qvm19sijh7hqppbk8s14dvv7dqlck7x3s8n9i4xn4ncgd7"))))
+ (build-system qt-build-system)
+ (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* "CMakeLists.txt"
+ (("opt/stremio")
+ "bin"))
+ (substitute* "release.makefile"
+ (("/opt/stremio")
+ "/bin"))
+ (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))
+ (with-directory-excursion #$output
+ ;; Setup desktop file.
+ (let ((dir "share/applications")
+ (desktop "smartcode-stremio.desktop"))
+ (mkdir-p "share/applications")
+ (copy-file (string-append "bin/" desktop)
+ (string-append dir "/" desktop))
+ (delete-file (string-append "bin/" desktop)))
+ ;; Setup icon dir.
+ (for-each (lambda (size)
+ (let ((dir (string-append "share/icons/hicolor/"
+ size "x" size "/apps")))
+ (mkdir-p dir)
+ (copy-file (string-append
+ "bin/icons/smartcode-stremio_" size
+ ".png")
+ (string-append dir
+ "/smartcode-stremio.png"))
+ (copy-file (string-append
+ "bin/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 "bin/icons")))))))
+ (inputs (list librsvg
+ mpv
+ node
+ openssl
+ qtdeclarative-5
+ qtquickcontrols-5
+ qtwebchannel-5
+ qtwebengine-5
+ qtbase-5))
+ (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