Add Moonlight

  • Done
  • quality assurance status badge
Details
3 participants
  • Oleg Pykhalov
  • Maxim Cournoyer
  • phodina
Owner
unassigned
Submitted by
phodina
Severity
normal
P
P
phodina wrote on 6 Dec 2022 04:17
(name . Guix Patches)(address . guix-patches@gnu.org)
m_E7NdSsSdVPdQnIJ0A8fmwr7jmZ7RBn2qrDdCMW_P1FkzdxTLayYwf5gSYStidtqPw4MJolQi3BUc6qaUmX2xlpHSvJaQYb8t8oNs1d8es=@protonmail.com
Hello,

these patches add support for game streaming solution for Nvidia GameStream protocol. The client is open source. However, the games and the server is a non-libre application.

----
Petr
Attachment: file
From 3591443080ca8ae4fa775e6ea697f5e1b999a39b Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Sat, 3 Dec 2022 10:32:43 +0100
Subject: [PATCH 2/6] gnu: Add enet-moonlight.

* gnu/packages/networking.scm (enet-moonlight): New variable.

Toggle diff (50 lines)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index f5276e330e..27f67c01bf 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -2591,6 +2591,43 @@ (define-public enet
(home-page "http://enet.bespin.org")
(license license:expat)))
+(define-public enet-moonlight
+ (let ((commit "4cde9cc3dcc5c30775a80da1de87f39f98672a31")
+ (revision "1"))
+(package
+ (inherit enet)
+ (name "enet")
+ (version commit)
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cgutman/enet")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "07sr32jy989ja23fwg8bvrq2slgm7bhfw6v3xq7yczbw86c1dndv"))))
+ (build-system cmake-build-system)
+ (arguments
+ '(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'build-share-lib
+ (lambda* _
+ (substitute* "CMakeLists.txt"
+ (("STATIC") "SHARED"))))
+ (replace 'install
+ (lambda* (#:key outputs source #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (include (string-append out "/include"))
+ (lib (string-append out "/lib")))
+ (mkdir-p include)
+ (mkdir-p lib)
+ (copy-recursively (string-append source "/include") include)
+ (install-file "libenet.so" lib)))))))
+ (native-inputs
+ (list pkg-config)))))
+
(define-public sslh
(package
(name "sslh")
--
2.38.1
From 413514efa6d87236d6f3e26166ac82fc3a85a9dd Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Sat, 3 Dec 2022 10:35:36 +0100
Subject: [PATCH 4/6] gnu: Add moonlight-common.

* gnu/packages/games.scm (moonlight-common): New variable.

Toggle diff (57 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 9d79efbe94..131784bc2a 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -5857,6 +5857,50 @@ (define-public bambam
colors, pictures, and sounds.")
(license license:gpl3+)))
+(define-public moonlight-common
+ (let ((commit "8c55c086d596607041e4394fb62a1bc800b7f37c")
+ (revision "1"))
+ (package
+ (name "moonlight-common")
+ (version commit)
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url
+ "https://github.com/moonlight-stream/moonlight-common-c")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0pqm0a2p2sqvazv5gak6gl7d405kaaq6r13l7yhycm0myayqavrp"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:tests? #f
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'use-enet-pkg
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("add_subdirectory\\(enet\\)")
+ ""))))
+ (replace 'install
+ (lambda* (#:key outputs source #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (include (string-append out "/include"))
+ (lib (string-append out "/lib")))
+ (mkdir-p include)
+ (mkdir-p lib)
+ (install-file (string-append source
+ "/src/Limelight.h")
+ include)
+ (install-file "libmoonlight-common-c.so" lib)))))))
+ (native-inputs (list pkg-config))
+ (inputs (list qtbase-5 openssl enet-moonlight))
+ (synopsis "Core implementation of Nvidia's GameStream protocol")
+ (description
+ "This package provides the code GameStream code shared between @code{Moonlight} clients.")
+ (home-page "https://github.com/moonlight-stream/moonlight-common-c")
+ (license license:gpl3))))
+
(define-public mrrescue
(package
(name "mrrescue")
--
2.38.1
From 038069c5a4b7034ac2a33b822a84744419ecb3c6 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Sat, 3 Dec 2022 10:30:01 +0100
Subject: [PATCH 1/6] gnu: Add qmdnsengine.

* gnu/packages/qt.scm (qmdnsengine): New variable.

Toggle diff (38 lines)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 0f5e1c3530..c095eae871 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -123,6 +123,31 @@ (define-module (gnu packages qt)
#:use-module (gnu packages xml)
#:use-module (srfi srfi-1))
+(define-public qmdnsengine
+ (let ((commit "b7a5a9f225d5e14b39f9fd1f905c4f505cf2ee99")
+ (revision "1"))
+ (package
+ (name "qmdnsengine")
+ (version commit)
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cgutman/qmdnsengine")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1f5v5n9w4aszcdjxmw81cwmd26ssywvfiyr8x0vbyamp4kqd8mww"))))
+ (build-system cmake-build-system)
+ (arguments
+ '(#:configure-flags (list "-DBUILD_TESTS=ON")))
+ (inputs (list qtbase-5))
+ (synopsis "Multicast DNS library for Qt application")
+ (description "This package provides multicast DNS library for Qt
+ applications.")
+ (home-page "https://github.com/moonlight-stream/moonlight-common-c")
+ (license license:expat))))
+
(define-public qite
(let ((commit "75fb3b6bbd5c6a5a8fc35e08a6efbfb588ed546a")
(revision "74"))
--
2.38.1
From 6f6e1a55787059f520428287fba474fe72c4a86b Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Sat, 3 Dec 2022 10:36:38 +0100
Subject: [PATCH 6/6] gnu: Add moonlight.

* gnu/packages/games.scm (moonlight): New variable.

Toggle diff (68 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 131784bc2a..d3628266ac 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -5857,6 +5857,61 @@ (define-public bambam
colors, pictures, and sounds.")
(license license:gpl3+)))
+(define-public moonlight
+ (package
+ (name "moonlight")
+ (version "3.1.4")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/moonlight-stream/moonlight-qt")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "02y2rbiiawhj1dvgxdaz8k9kpz6zkv20zsk17fbqj8259m3g5xr5"))))
+ (build-system qt-build-system)
+ (arguments
+ (list #:tests? #f
+ #:phases #~(modify-phases %standard-phases
+ (replace 'configure
+ (lambda* _
+ (symlink (string-append #$(this-package-input
+ "sdl-gamecontrollerdb")
+ "/gamecontrollerdb.txt")
+ "app/SDL_GameControllerDB/gamecontrollerdb.txt")
+ (substitute* "moonlight-qt.pro"
+ (("moonlight-common-c \\\\")
+ "#moonlight-common-c \\")
+ (("qmdnsengine \\\\") "#qmdnsengine \\")
+ (("app \\\\") "app")
+ (("app.depends") "INCLUDEPATH +=")
+ (("h264bitstream \\\\") "#h264bitstream \\"))
+ (invoke "qmake"
+ (string-append "PREFIX=" #$output)))))))
+ (native-inputs (list pkg-config qttools-5))
+ (inputs (list moonlight-common
+ libva
+ libvdpau
+ openssl
+ opus
+ qtbase-5
+ sdl-gamecontrollerdb
+ qtquickcontrols2-5
+ qtdeclarative-5
+ qtsvg-5
+ qmdnsengine
+ sdl2
+ sdl2-ttf
+ h264bitstream
+ ffmpeg))
+ (synopsis "GameStream client for PCs")
+ (description
+ "Moonlight PC is an open source implementation of NVIDIA's GameStream, as
+used by the NVIDIA Shield.")
+ (home-page "https://moonlight-stream.org")
+ (license license:gpl3)))
+
(define-public moonlight-common
(let ((commit "8c55c086d596607041e4394fb62a1bc800b7f37c")
(revision "1"))
--
2.38.1
From 2034d229893bd6b96e66c588f235da36efc025b9 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Sat, 3 Dec 2022 10:34:03 +0100
Subject: [PATCH 3/6] gnu: Add h264bitstream.

* gnu/packages/video.scm (h264bitstream): New variable.

Toggle diff (46 lines)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 6e0a1e313c..cce98ca6cd 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -3957,6 +3957,39 @@ (define-public handbrake
;; Combination under GPLv2. See LICENSE.
(license license:gpl2)))
+(define-public h264bitstream
+ (let ((commit "34f3c58afa3c47b6cf0a49308a68cbf89c5e0bff")
+ (revision "1"))
+ (package
+ (name "h264bitstream")
+ (version commit)
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/aizvorski/h264bitstream")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0rrhzckz2a89q0chw2bfl4g89yiv9a0dcqcj80lcpdr3a1ix8q85"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ;no test suite
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'install 'fix-include-bs-h
+ (lambda* _
+ (display "")
+ (symlink (string-append #$output
+ "/include/h264bitstream/bs.h")
+ (string-append #$output "/include/bs.h")))))))
+ (native-inputs (list autoconf automake libtool pkg-config))
+ (inputs (list ffmpeg))
+ (synopsis "Library to read and write H.264 video bitstreams")
+ (description
+ "This package provides the code GameStream code shared between @code{Moonlight} clients.")
+ (home-page "https://github.com/aizvorski/h264bitstream")
+ (license license:lgpl2.1))))
+
(define-public intel-vaapi-driver
(package
(name "intel-vaapi-driver")
--
2.38.1
From 21db99543561eb797eab3386ad472186153e7622 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Mon, 5 Dec 2022 16:19:08 +0100
Subject: [PATCH 5/6] gnu: Add sdl-gamecontrollerdb.

* gnu/packages/sdl.scm (sdl-gamecontrollerdb): New variable.

Toggle diff (52 lines)
diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index 0c419dfaca..90c04c98d9 100644
--- a/gnu/packages/sdl.scm
+++ b/gnu/packages/sdl.scm
@@ -14,6 +14,7 @@
;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -41,6 +42,7 @@ (define-module (gnu packages sdl)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix utils)
+ #:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
#:use-module (gnu packages audio)
@@ -199,6 +201,29 @@ (define-public libmikmod
(license license:lgpl2.1)
(home-page "http://mikmod.sourceforge.net/")))
+(define-public sdl-gamecontrollerdb
+ (let ((commit "9bd061ec6282cd9f8ee0eff36112d98096183a82")
+ (revision "1"))
+ (package
+ (name "sdl-gamecontrollerdb")
+ (version "")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/gabomdq/SDL_GameControllerDB")
+ (commit commit)))
+ (sha256
+ (base32
+ "1dzch3c39n1kq8m5h8fpi7aqqv6k5jqwmlyagsh6fmyzwjviqgji"))))
+ (build-system copy-build-system)
+ (arguments
+ '(#:install-plan '(("gamecontrollerdb.txt" "gamecontrollerdb.txt"))))
+ (synopsis "Database of game controller mappings to be used with SDL2
+ Game Controller")
+ (description "")
+ (home-page "https://github.com/gabomdq/SDL_GameControllerDB")
+ (license license:zlib))))
+
(define-public sdl-gfx
(package
(name "sdl-gfx")
--
2.38.1
M
M
Maxim Cournoyer wrote on 16 Jan 2023 16:03
(name . phodina)(address . phodina@protonmail.com)(address . 59851@debbugs.gnu.org)
871qnua5e6.fsf@gmail.com
Hello,

phodina <phodina@protonmail.com> writes:

Toggle quote (47 lines)
> Hello,
>
> these patches add support for game streaming solution for Nvidia GameStream protocol. The client is open source. However, the games and the server is a non-libre application.
>
> ----
> Petr
> From 3591443080ca8ae4fa775e6ea697f5e1b999a39b Mon Sep 17 00:00:00 2001
> From: Petr Hodina <phodina@protonmail.com>
> Date: Sat, 3 Dec 2022 10:32:43 +0100
> Subject: [PATCH 2/6] gnu: Add enet-moonlight.
>
> * gnu/packages/networking.scm (enet-moonlight): New variable.
>
> diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
> index f5276e330e..27f67c01bf 100644
> --- a/gnu/packages/networking.scm
> +++ b/gnu/packages/networking.scm
> @@ -2591,6 +2591,43 @@ (define-public enet
> (home-page "http://enet.bespin.org")
> (license license:expat)))
>
> +(define-public enet-moonlight
> + (let ((commit "4cde9cc3dcc5c30775a80da1de87f39f98672a31")
> + (revision "1"))
> +(package
> + (inherit enet)
> + (name "enet")
> + (version commit)
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/cgutman/enet")
> + (commit version)))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "07sr32jy989ja23fwg8bvrq2slgm7bhfw6v3xq7yczbw86c1dndv"))))
> + (build-system cmake-build-system)
> + (arguments
> + '(#:tests? #f
> + #:phases
> + (modify-phases %standard-phases
> + (add-after 'unpack 'build-share-lib
> + (lambda* _
> + (substitute* "CMakeLists.txt"
> + (("STATIC") "SHARED"))))

Perhaps having -DBUILD_SHARED_LIBS=ON in #:configure-flags would be
enough.

Toggle quote (10 lines)
> + (replace 'install
> + (lambda* (#:key outputs source #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (include (string-append out "/include"))
> + (lib (string-append out "/lib")))
> + (mkdir-p include)
> + (mkdir-p lib)
> + (copy-recursively (string-append source "/include") include)
> + (install-file "libenet.so" lib)))))))

It'd be preferable to use gexps and associated variables.

Toggle quote (4 lines)
> + (native-inputs
> + (list pkg-config)))))
> +

Otherwise LGTM.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 16 Jan 2023 16:04
(name . phodina)(address . phodina@protonmail.com)(address . 59851@debbugs.gnu.org)
87wn5m8qrn.fsf@gmail.com
Hello,

phodina <phodina@protonmail.com> writes:

Toggle quote (27 lines)
> Hello,
>
> these patches add support for game streaming solution for Nvidia GameStream protocol. The client is open source. However, the games and the server is a non-libre application.
>
> ----
> Petr
>
>
> From 038069c5a4b7034ac2a33b822a84744419ecb3c6 Mon Sep 17 00:00:00 2001
> From: Petr Hodina <phodina@protonmail.com>
> Date: Sat, 3 Dec 2022 10:30:01 +0100
> Subject: [PATCH 1/6] gnu: Add qmdnsengine.
>
> * gnu/packages/qt.scm (qmdnsengine): New variable.
>
> diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
> index 0f5e1c3530..c095eae871 100644
> --- a/gnu/packages/qt.scm
> +++ b/gnu/packages/qt.scm
> @@ -123,6 +123,31 @@ (define-module (gnu packages qt)
> #:use-module (gnu packages xml)
> #:use-module (srfi srfi-1))
>
> +(define-public qmdnsengine
> + (let ((commit "b7a5a9f225d5e14b39f9fd1f905c4f505cf2ee99")
> + (revision "1"))

Please mention why we use a commit, e.g. ";; No release or tags. Use
the latest commit".

Toggle quote (22 lines)
> + (package
> + (name "qmdnsengine")
> + (version commit)
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/cgutman/qmdnsengine")
> + (commit version)))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "1f5v5n9w4aszcdjxmw81cwmd26ssywvfiyr8x0vbyamp4kqd8mww"))))
> + (build-system cmake-build-system)
> + (arguments
> + '(#:configure-flags (list "-DBUILD_TESTS=ON")))
> + (inputs (list qtbase-5))
> + (synopsis "Multicast DNS library for Qt application")
> + (description "This package provides multicast DNS library for Qt
> + applications.")
> + (home-page "https://github.com/moonlight-stream/moonlight-common-c")
> + (license license:expat))))

Apart from the above, LGTM.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 16 Jan 2023 16:59
(name . phodina)(address . phodina@protonmail.com)(address . 59851@debbugs.gnu.org)
87pmbe8o74.fsf@gmail.com
Hi,

phodina <phodina@protonmail.com> writes:

Toggle quote (17 lines)
> Hello,
>
> these patches add support for game streaming solution for Nvidia GameStream protocol. The client is open source. However, the games and the server is a non-libre application.
>
> ----
> Petr
>
>
>
>
> From 2034d229893bd6b96e66c588f235da36efc025b9 Mon Sep 17 00:00:00 2001
> From: Petr Hodina <phodina@protonmail.com>
> Date: Sat, 3 Dec 2022 10:34:03 +0100
> Subject: [PATCH 3/6] gnu: Add h264bitstream.
>
> * gnu/packages/video.scm (h264bitstream): New variable.

[...]

Toggle quote (7 lines)
> + (build-system gnu-build-system)
> + (arguments
> + (list #:tests? #f ;no test suite
> + #:phases #~(modify-phases %standard-phases
> + (add-after 'install 'fix-include-bs-h
> + (lambda* _

Replace lambda* with lambda.

Toggle quote (2 lines)
> + (display "")

Remove this extraneous display call.

Toggle quote (9 lines)
> + (symlink (string-append #$output
> + "/include/h264bitstream/bs.h")
> + (string-append #$output "/include/bs.h")))))))
> + (native-inputs (list autoconf automake libtool pkg-config))
> + (inputs (list ffmpeg))
> + (synopsis "Library to read and write H.264 video bitstreams")
> + (description
> + "This package provides the code GameStream code shared between @code{Moonlight} clients.")

There's a typo above, with 'code' repeated twice. Since Moonlight is a
proper noun, I'd leave out the @code decorator for it.

Otherwise, LGTM.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 16 Jan 2023 17:05
(name . phodina)(address . phodina@protonmail.com)(address . 59851@debbugs.gnu.org)
87lem28nxa.fsf@gmail.com
Hello,

phodina <phodina@protonmail.com> writes:

Toggle quote (44 lines)
> Hello,
>
> these patches add support for game streaming solution for Nvidia GameStream protocol. The client is open source. However, the games and the server is a non-libre application.
>
> ----
> Petr
>
> From 413514efa6d87236d6f3e26166ac82fc3a85a9dd Mon Sep 17 00:00:00 2001
> From: Petr Hodina <phodina@protonmail.com>
> Date: Sat, 3 Dec 2022 10:35:36 +0100
> Subject: [PATCH 4/6] gnu: Add moonlight-common.
>
> * gnu/packages/games.scm (moonlight-common): New variable.
>
> diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
> index 9d79efbe94..131784bc2a 100644
> --- a/gnu/packages/games.scm
> +++ b/gnu/packages/games.scm
> @@ -5857,6 +5857,50 @@ (define-public bambam
> colors, pictures, and sounds.")
> (license license:gpl3+)))
>
> +(define-public moonlight-common
> + (let ((commit "8c55c086d596607041e4394fb62a1bc800b7f37c")
> + (revision "1"))
> + (package
> + (name "moonlight-common")
> + (version commit)
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url
> + "https://github.com/moonlight-stream/moonlight-common-c")
> + (commit version)))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "0pqm0a2p2sqvazv5gak6gl7d405kaaq6r13l7yhycm0myayqavrp"))))
> + (build-system cmake-build-system)
> + (arguments
> + `(#:tests? #f
> + #:phases (modify-phases %standard-phases
> + (add-after 'unpack 'use-enet-pkg

Perhaps name the phase 'use-system-enet-package' or
'unbundle-enet-moonlight'.

Toggle quote (16 lines)
> + (lambda _
> + (substitute* "CMakeLists.txt"
> + (("add_subdirectory\\(enet\\)")
> + ""))))
> + (replace 'install
> + (lambda* (#:key outputs source #:allow-other-keys)
> + (let* ((out (assoc-ref outputs "out"))
> + (include (string-append out "/include"))
> + (lib (string-append out "/lib")))
> + (mkdir-p include)
> + (mkdir-p lib)
> + (install-file (string-append source
> + "/src/Limelight.h")
> + include)
> + (install-file "libmoonlight-common-c.so" lib)))))))

It seems their build system is broken if it doesn't install these, and
thus should be reported upstream (with a comment linking to it here).

Toggle quote (3 lines)
> + (native-inputs (list pkg-config))
> + (inputs (list qtbase-5 openssl enet-moonlight))

Please sort inputs :-).

Toggle quote (2 lines)
> + (synopsis "Core implementation of Nvidia's GameStream protocol")

I'd use "GameStream protocol core implementation"

Toggle quote (3 lines)
> + (description
> + "This package provides the code GameStream code shared between @code{Moonlight} clients.")j

Provides the "core".

Toggle quote (3 lines)
> + (license license:gpl3))))

The license should be gpl3+, as the LICENSE text contains the original
"or any later version" and there doesn't seem to be source headers
contradicting that.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 16 Jan 2023 17:11
(name . phodina)(address . phodina@protonmail.com)(address . 59851@debbugs.gnu.org)
87h6wq8no9.fsf@gmail.com
Hi again,

phodina <phodina@protonmail.com> writes:

Toggle quote (28 lines)
> Hello,
>
> these patches add support for game streaming solution for Nvidia GameStream protocol. The client is open source. However, the games and the server is a non-libre application.
>
> ----
> Petr
>
>
>
> From 6f6e1a55787059f520428287fba474fe72c4a86b Mon Sep 17 00:00:00 2001
> From: Petr Hodina <phodina@protonmail.com>
> Date: Sat, 3 Dec 2022 10:36:38 +0100
> Subject: [PATCH 6/6] gnu: Add moonlight.
>
> * gnu/packages/games.scm (moonlight): New variable.
>
> diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
> index 131784bc2a..d3628266ac 100644
> --- a/gnu/packages/games.scm
> +++ b/gnu/packages/games.scm
> @@ -5857,6 +5857,61 @@ (define-public bambam
> colors, pictures, and sounds.")
> (license license:gpl3+)))
>
> +(define-public moonlight
> + (package
> + (name "moonlight")

Should that be called moonlight-qt? Or perhaps it's the flagship
client, and thus 'moonlight' is appropriate, and other clients can have
different names?

Toggle quote (14 lines)
> + (version "3.1.4")
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/moonlight-stream/moonlight-qt")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "02y2rbiiawhj1dvgxdaz8k9kpz6zkv20zsk17fbqj8259m3g5xr5"))))
> + (build-system qt-build-system)
> + (arguments
> + (list #:tests? #f

An explanatory comment (;no test suite) ? is required.

Toggle quote (17 lines)
> + #:phases #~(modify-phases %standard-phases
> + (replace 'configure
> + (lambda* _
> + (symlink (string-append #$(this-package-input
> + "sdl-gamecontrollerdb")
> + "/gamecontrollerdb.txt")
> + "app/SDL_GameControllerDB/gamecontrollerdb.txt")
> + (substitute* "moonlight-qt.pro"
> + (("moonlight-common-c \\\\")
> + "#moonlight-common-c \\")
> + (("qmdnsengine \\\\") "#qmdnsengine \\")
> + (("app \\\\") "app")
> + (("app.depends") "INCLUDEPATH +=")
> + (("h264bitstream \\\\") "#h264bitstream \\"))
> + (invoke "qmake"
> + (string-append "PREFIX=" #$output)))))))

Please explain what the non-obvious substitutions (commenting stuff) are
for.

Toggle quote (17 lines)
> + (native-inputs (list pkg-config qttools-5))
> + (inputs (list moonlight-common
> + libva
> + libvdpau
> + openssl
> + opus
> + qtbase-5
> + sdl-gamecontrollerdb
> + qtquickcontrols2-5
> + qtdeclarative-5
> + qtsvg-5
> + qmdnsengine
> + sdl2
> + sdl2-ttf
> + h264bitstream
> + ffmpeg))

Please sort inputs :-).

Toggle quote (2 lines)
> + (synopsis "GameStream client for PCs")

I'd drop "for PCs", since it doesn't add much.

Toggle quote (6 lines)
> + (description
> + "Moonlight PC is an open source implementation of NVIDIA's GameStream, as
> +used by the NVIDIA Shield.")
> + (home-page "https://moonlight-stream.org")
> + (license license:gpl3)))

That should also be gpl3+.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 16 Jan 2023 17:12
(name . phodina)(address . phodina@protonmail.com)(address . 59851@debbugs.gnu.org)
87cz7e8nlw.fsf@gmail.com
Hi,

phodina <phodina@protonmail.com> writes:

[...]

Toggle quote (2 lines)
> Subject: [PATCH 3/6] gnu: Add h264bitstream.

[...]

Toggle quote (6 lines)
> + (synopsis "Library to read and write H.264 video bitstreams")
> + (description
> + "This package provides the code GameStream code shared between @code{Moonlight} clients.")
> + (home-page "https://github.com/aizvorski/h264bitstream")
> + (license license:lgpl2.1))))

I overlooked that in my previous review, but the license of
h264bitstream should be lgpl2.1+.

--
Thanks,
Maxim
P
P
phodina wrote on 17 Jan 2023 09:07
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 59851@debbugs.gnu.org)
RgzlT6EkYv29_6-nDwzgii-eatP9OURzDVFm124uxVtqFhcPqHKXjnvqaHCLA_WOi520VarFzwZrI35mAk5oAi10IW3-w4PdjABUwOXbCpg=@protonmail.com
Hi Maxim,

thanks for review. Here are the patches with the fixes.

----
Petr
From 48057e988fb42f08238d3c2d6572f28af2cadee8 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Sat, 3 Dec 2022 10:34:03 +0100
Subject: [PATCH v2 3/6] gnu: Add h264bitstream.

* gnu/packages/video.scm (h264bitstream): New variable.

Toggle diff (46 lines)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index fc430b9196..b9189bbf5d 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -3992,6 +3992,39 @@ (define-public handbrake
;; Combination under GPLv2. See LICENSE.
(license license:gpl2)))
+(define-public h264bitstream
+ ;; Used as submodule in https://github.com/moonlight-stream/moonlight-qt
+ (let ((commit "34f3c58afa3c47b6cf0a49308a68cbf89c5e0bff")
+ (revision "1"))
+ (package
+ (name "h264bitstream")
+ (version commit)
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/aizvorski/h264bitstream")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0rrhzckz2a89q0chw2bfl4g89yiv9a0dcqcj80lcpdr3a1ix8q85"))))
+ (build-system gnu-build-system)
+ (arguments
+ (list #:tests? #f ;no test suite
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'install 'fix-include-bs-h
+ (lambda _
+ (symlink (string-append #$output
+ "/include/h264bitstream/bs.h")
+ (string-append #$output "/include/bs.h")))))))
+ (native-inputs (list autoconf automake libtool pkg-config))
+ (inputs (list ffmpeg))
+ (synopsis "Library to read and write H.264 video bitstreams")
+ (description
+ "This package provides the GameStream code shared between Moonlight clients.")
+ (home-page "https://github.com/aizvorski/h264bitstream")
+ (license license:lgpl2.1+))))
+
(define-public intel-vaapi-driver
(package
(name "intel-vaapi-driver")
--
2.38.1
From a18528bd178c177f50e73de4b89ccbf758ab1774 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Sat, 3 Dec 2022 10:36:38 +0100
Subject: [PATCH v2 6/6] gnu: Add moonlight-qt.

* gnu/packages/games.scm (moonlight-qt): New variable.

Toggle diff (73 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 5f5bd8795e..6600c1ee60 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -5841,6 +5841,66 @@ (define-public bambam
colors, pictures, and sounds.")
(license license:gpl3+)))
+(define-public moonlight-qt
+ (package
+ (name "moonlight-qt")
+ (version "3.1.4")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/moonlight-stream/moonlight-qt")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "02y2rbiiawhj1dvgxdaz8k9kpz6zkv20zsk17fbqj8259m3g5xr5"))))
+ (build-system qt-build-system)
+ (arguments
+ (list #:tests? #f ;no test suite
+ #:phases #~(modify-phases %standard-phases
+ (replace 'configure
+ (lambda* _
+ (symlink (string-append #$(this-package-input
+ "sdl-gamecontrollerdb")
+ "/gamecontrollerdb.txt")
+ "app/SDL_GameControllerDB/gamecontrollerdb.txt")
+ (substitute* "moonlight-qt.pro"
+ (("moonlight-common-c \\\\")
+ "#moonlight-common-c \\")
+ (("qmdnsengine \\\\")
+ "#qmdnsengine \\")
+ (("app \\\\")
+ "app")
+ (("app.depends")
+ "INCLUDEPATH +=")
+ (("h264bitstream \\\\")
+ "#h264bitstream \\"))
+ (invoke "qmake"
+ (string-append "PREFIX="
+ #$output)))))))
+ (native-inputs (list pkg-config qttools-5))
+ (inputs (list ffmpeg
+ h264bitstream
+ libva
+ libvdpau
+ moonlight-common
+ openssl
+ opus
+ qmdnsengine
+ qtbase-5
+ qtdeclarative-5
+ qtquickcontrols2-5
+ qtsvg-5
+ sdl2
+ sdl2-ttf
+ sdl-gamecontrollerdb))
+ (synopsis "GameStream client")
+ (description
+ "Moonlight is an open source implementation of NVIDIA's GameStream, as
+used by the NVIDIA Shield.")
+ (home-page "https://moonlight-stream.org")
+ (license license:gpl3+)))
+
(define-public moonlight-common
;; Used as submodule in https://github.com/moonlight-stream/moonlight
(let ((commit "8c55c086d596607041e4394fb62a1bc800b7f37c")
--
2.38.1
From a923f2a2e49a0a9851e43aec325fbaee1ee8b4cb Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Mon, 5 Dec 2022 16:19:08 +0100
Subject: [PATCH v2 5/6] gnu: Add sdl-gamecontrollerdb.

* gnu/packages/sdl.scm (sdl-gamecontrollerdb): New variable.

Toggle diff (52 lines)
diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
index 0c419dfaca..90c04c98d9 100644
--- a/gnu/packages/sdl.scm
+++ b/gnu/packages/sdl.scm
@@ -14,6 +14,7 @@
;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -41,6 +42,7 @@ (define-module (gnu packages sdl)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix utils)
+ #:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
#:use-module (gnu packages audio)
@@ -199,6 +201,29 @@ (define-public libmikmod
(license license:lgpl2.1)
(home-page "http://mikmod.sourceforge.net/")))
+(define-public sdl-gamecontrollerdb
+ (let ((commit "9bd061ec6282cd9f8ee0eff36112d98096183a82")
+ (revision "1"))
+ (package
+ (name "sdl-gamecontrollerdb")
+ (version "")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/gabomdq/SDL_GameControllerDB")
+ (commit commit)))
+ (sha256
+ (base32
+ "1dzch3c39n1kq8m5h8fpi7aqqv6k5jqwmlyagsh6fmyzwjviqgji"))))
+ (build-system copy-build-system)
+ (arguments
+ '(#:install-plan '(("gamecontrollerdb.txt" "gamecontrollerdb.txt"))))
+ (synopsis "Database of game controller mappings to be used with SDL2
+ Game Controller")
+ (description "")
+ (home-page "https://github.com/gabomdq/SDL_GameControllerDB")
+ (license license:zlib))))
+
(define-public sdl-gfx
(package
(name "sdl-gfx")
--
2.38.1
From 164ff47fa7668e962c0a0b9bc8ac2a3f4fbab527 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Sat, 3 Dec 2022 10:32:43 +0100
Subject: [PATCH v2 2/6] gnu: Add enet-moonlight.

* gnu/packages/networking.scm (enet-moonlight): New variable.

Toggle diff (52 lines)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index a7b51ed1ff..b125753dae 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -2591,6 +2591,45 @@ (define-public enet
(home-page "http://enet.bespin.org")
(license license:expat)))
+(define-public enet-moonlight
+ (let ((commit "4cde9cc3dcc5c30775a80da1de87f39f98672a31")
+ (revision "1"))
+ (package
+ (inherit enet)
+ (name "enet")
+ (version commit)
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cgutman/enet")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "07sr32jy989ja23fwg8bvrq2slgm7bhfw6v3xq7yczbw86c1dndv"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list #:tests? #f ;no test suite
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'build-share-lib
+ (lambda* _
+ ;; -DBUILD_SHARED_LIBS=ON not working
+ (substitute* "CMakeLists.txt"
+ (("STATIC")
+ "SHARED"))))
+ (replace 'install
+ (lambda* (#:key outputs source #:allow-other-keys)
+ (let* ((include (string-append #$output
+ "/include"))
+ (lib (string-append #$output "/lib")))
+ (mkdir-p include)
+ (mkdir-p lib)
+ (copy-recursively (string-append source
+ "/include")
+ include)
+ (install-file "libenet.so" lib)))))))
+ (native-inputs (list pkg-config)))))
+
(define-public sslh
(package
(name "sslh")
--
2.38.1
From 5c467ecfd2a4628ed776288b213968a0f4e0dedc Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Sat, 3 Dec 2022 10:35:36 +0100
Subject: [PATCH v2 4/6] gnu: Add moonlight-common.

* gnu/packages/games.scm (moonlight-common): New variable.

Toggle diff (57 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index a0b21b3bdd..5f5bd8795e 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -5841,6 +5841,50 @@ (define-public bambam
colors, pictures, and sounds.")
(license license:gpl3+)))
+(define-public moonlight-common
+ ;; Used as submodule in https://github.com/moonlight-stream/moonlight
+ (let ((commit "8c55c086d596607041e4394fb62a1bc800b7f37c")
+ (revision "1"))
+ (package
+ (name "moonlight-common")
+ (version commit)
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url
+ "https://github.com/moonlight-stream/moonlight-common-c")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0pqm0a2p2sqvazv5gak6gl7d405kaaq6r13l7yhycm0myayqavrp"))))
+ (build-system cmake-build-system)
+ (arguments
+ (list #:tests? #f
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'use-system-enet-package
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("add_subdirectory\\(enet\\)")
+ ""))))
+ (replace 'install
+ (lambda* (#:key outputs source #:allow-other-keys)
+ (let* ((include (string-append #$output
+ "/include"))
+ (lib (string-append #$output "/lib")))
+ (mkdir-p include)
+ (mkdir-p lib)
+ (install-file (string-append source
+ "/src/Limelight.h") include)
+ (install-file "libmoonlight-common-c.so" lib)))))))
+ (native-inputs (list pkg-config))
+ (inputs (list enet-moonlight openssl qtbase-5))
+ (synopsis "GameStream protocol core implementation")
+ (description
+ "This package provides the GameStream core code for the protocol.")
+ (home-page "https://github.com/moonlight-stream/moonlight-common-c")
+ (license license:gpl3+))))
+
(define-public mrrescue
(package
(name "mrrescue")
--
2.38.1
From 0f7b7aeff35661dee6bb9d204845730d2618f3b9 Mon Sep 17 00:00:00 2001
From: Petr Hodina <phodina@protonmail.com>
Date: Sat, 3 Dec 2022 10:30:01 +0100
Subject: [PATCH v2 1/6] gnu: Add qmdnsengine.

* gnu/packages/qt.scm (qmdnsengine): New variable.

Toggle diff (39 lines)
diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm
index 6406fd5c49..28225167f0 100644
--- a/gnu/packages/qt.scm
+++ b/gnu/packages/qt.scm
@@ -123,6 +123,32 @@ (define-module (gnu packages qt)
#:use-module (gnu packages xml)
#:use-module (srfi srfi-1))
+(define-public qmdnsengine
+ ;; Used as submodule in https://github.com/moonlight-stream/moonlight-qt
+ (let ((commit "b7a5a9f225d5e14b39f9fd1f905c4f505cf2ee99")
+ (revision "1"))
+ (package
+ (name "qmdnsengine")
+ (version commit)
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cgutman/qmdnsengine")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1f5v5n9w4aszcdjxmw81cwmd26ssywvfiyr8x0vbyamp4kqd8mww"))))
+ (build-system cmake-build-system)
+ (arguments
+ '(#:configure-flags (list "-DBUILD_TESTS=ON")))
+ (inputs (list qtbase-5))
+ (synopsis "Multicast DNS library for Qt application")
+ (description "This package provides multicast DNS library for Qt
+ applications.")
+ (home-page "https://github.com/moonlight-stream/moonlight-common-c")
+ (license license:expat))))
+
(define-public qite
(let ((commit "75fb3b6bbd5c6a5a8fc35e08a6efbfb588ed546a")
(revision "74"))
--
2.38.1
M
M
Maxim Cournoyer wrote on 17 Jan 2023 17:29
(name . phodina)(address . phodina@protonmail.com)(address . 59851@debbugs.gnu.org)
87cz7d15we.fsf@gmail.com
Hi Petr,

phodina <phodina@protonmail.com> writes:

Toggle quote (7 lines)
> From a923f2a2e49a0a9851e43aec325fbaee1ee8b4cb Mon Sep 17 00:00:00 2001
> From: Petr Hodina <phodina@protonmail.com>
> Date: Mon, 5 Dec 2022 16:19:08 +0100
> Subject: [PATCH v2 5/6] gnu: Add sdl-gamecontrollerdb.
>
> * gnu/packages/sdl.scm (sdl-gamecontrollerdb): New variable.

Apologies, it looks like I forgot to review that one in the original
submission.

Toggle quote (30 lines)
> diff --git a/gnu/packages/sdl.scm b/gnu/packages/sdl.scm
> index 0c419dfaca..90c04c98d9 100644
> --- a/gnu/packages/sdl.scm
> +++ b/gnu/packages/sdl.scm
> @@ -14,6 +14,7 @@
> ;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
> ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
> ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
> +;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -41,6 +42,7 @@ (define-module (gnu packages sdl)
> #:use-module (guix download)
> #:use-module (guix git-download)
> #:use-module (guix utils)
> + #:use-module (guix build-system copy)
> #:use-module (guix build-system gnu)
> #:use-module (guix build-system trivial)
> #:use-module (gnu packages audio)
> @@ -199,6 +201,29 @@ (define-public libmikmod
> (license license:lgpl2.1)
> (home-page "http://mikmod.sourceforge.net/")))
>
> +(define-public sdl-gamecontrollerdb
> + (let ((commit "9bd061ec6282cd9f8ee0eff36112d98096183a82")
> + (revision "1"))
> + (package
> + (name "sdl-gamecontrollerdb")
> + (version "")
^
Oops! :-)

Toggle quote (15 lines)
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/gabomdq/SDL_GameControllerDB")
> + (commit commit)))
> + (sha256
> + (base32
> + "1dzch3c39n1kq8m5h8fpi7aqqv6k5jqwmlyagsh6fmyzwjviqgji"))))
> + (build-system copy-build-system)
> + (arguments
> + '(#:install-plan '(("gamecontrollerdb.txt" "gamecontrollerdb.txt"))))
> + (synopsis "Database of game controller mappings to be used with SDL2
> + Game Controller")
> + (description "")

^
The synopsis and description need to be reworked here.

Otherwise, LGTM.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 17 Jan 2023 17:35
(name . phodina)(address . phodina@protonmail.com)(address . 59851@debbugs.gnu.org)
878ri115m6.fsf@gmail.com
Hi Petr,

phodina <phodina@protonmail.com> writes:

Toggle quote (53 lines)
> From a18528bd178c177f50e73de4b89ccbf758ab1774 Mon Sep 17 00:00:00 2001
> From: Petr Hodina <phodina@protonmail.com>
> Date: Sat, 3 Dec 2022 10:36:38 +0100
> Subject: [PATCH v2 6/6] gnu: Add moonlight-qt.
>
> * gnu/packages/games.scm (moonlight-qt): New variable.
>
> diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
> index 5f5bd8795e..6600c1ee60 100644
> --- a/gnu/packages/games.scm
> +++ b/gnu/packages/games.scm
> @@ -5841,6 +5841,66 @@ (define-public bambam
> colors, pictures, and sounds.")
> (license license:gpl3+)))
>
> +(define-public moonlight-qt
> + (package
> + (name "moonlight-qt")
> + (version "3.1.4")
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/moonlight-stream/moonlight-qt")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "02y2rbiiawhj1dvgxdaz8k9kpz6zkv20zsk17fbqj8259m3g5xr5"))))
> + (build-system qt-build-system)
> + (arguments
> + (list #:tests? #f ;no test suite
> + #:phases #~(modify-phases %standard-phases
> + (replace 'configure
> + (lambda* _
> + (symlink (string-append #$(this-package-input
> + "sdl-gamecontrollerdb")
> + "/gamecontrollerdb.txt")
> + "app/SDL_GameControllerDB/gamecontrollerdb.txt")
> + (substitute* "moonlight-qt.pro"
> + (("moonlight-common-c \\\\")
> + "#moonlight-common-c \\")
> + (("qmdnsengine \\\\")
> + "#qmdnsengine \\")
> + (("app \\\\")
> + "app")
> + (("app.depends")
> + "INCLUDEPATH +=")
> + (("h264bitstream \\\\")
> + "#h264bitstream \\"))
> + (invoke "qmake"
> + (string-append "PREFIX="
> + #$output)))))))

The above could benefit from a comment explaining what this is about
(mostly unbundling libraries, it seems).

Toggle quote (21 lines)
> + (native-inputs (list pkg-config qttools-5))
> + (inputs (list ffmpeg
> + h264bitstream
> + libva
> + libvdpau
> + moonlight-common
> + openssl
> + opus
> + qmdnsengine
> + qtbase-5
> + qtdeclarative-5
> + qtquickcontrols2-5
> + qtsvg-5
> + sdl2
> + sdl2-ttf
> + sdl-gamecontrollerdb))
> + (synopsis "GameStream client")
> + (description
> + "Moonlight is an open source implementation of NVIDIA's GameStream, as
> +used by the NVIDIA Shield.")

There's no need to use 'open source' or similar adjective in Guix, as
this is already implied for the whole collection of software offered.

Thank you, and apologies for sending my comments in multiple small
chunks.

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 21 Mar 2023 15:07
(name . phodina)(address . phodina@protonmail.com)(address . 59851@debbugs.gnu.org)
87bkkmqjti.fsf_-_@gmail.com
Hello Petr,

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

Toggle quote (87 lines)
> Hi Petr,
>
> phodina <phodina@protonmail.com> writes:
>
>> From a18528bd178c177f50e73de4b89ccbf758ab1774 Mon Sep 17 00:00:00 2001
>> From: Petr Hodina <phodina@protonmail.com>
>> Date: Sat, 3 Dec 2022 10:36:38 +0100
>> Subject: [PATCH v2 6/6] gnu: Add moonlight-qt.
>>
>> * gnu/packages/games.scm (moonlight-qt): New variable.
>>
>> diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
>> index 5f5bd8795e..6600c1ee60 100644
>> --- a/gnu/packages/games.scm
>> +++ b/gnu/packages/games.scm
>> @@ -5841,6 +5841,66 @@ (define-public bambam
>> colors, pictures, and sounds.")
>> (license license:gpl3+)))
>>
>> +(define-public moonlight-qt
>> + (package
>> + (name "moonlight-qt")
>> + (version "3.1.4")
>> + (source (origin
>> + (method git-fetch)
>> + (uri (git-reference
>> + (url "https://github.com/moonlight-stream/moonlight-qt")
>> + (commit (string-append "v" version))))
>> + (file-name (git-file-name name version))
>> + (sha256
>> + (base32
>> + "02y2rbiiawhj1dvgxdaz8k9kpz6zkv20zsk17fbqj8259m3g5xr5"))))
>> + (build-system qt-build-system)
>> + (arguments
>> + (list #:tests? #f ;no test suite
>> + #:phases #~(modify-phases %standard-phases
>> + (replace 'configure
>> + (lambda* _
>> + (symlink (string-append #$(this-package-input
>> + "sdl-gamecontrollerdb")
>> + "/gamecontrollerdb.txt")
>> + "app/SDL_GameControllerDB/gamecontrollerdb.txt")
>> + (substitute* "moonlight-qt.pro"
>> + (("moonlight-common-c \\\\")
>> + "#moonlight-common-c \\")
>> + (("qmdnsengine \\\\")
>> + "#qmdnsengine \\")
>> + (("app \\\\")
>> + "app")
>> + (("app.depends")
>> + "INCLUDEPATH +=")
>> + (("h264bitstream \\\\")
>> + "#h264bitstream \\"))
>> + (invoke "qmake"
>> + (string-append "PREFIX="
>> + #$output)))))))
>
> The above could benefit from a comment explaining what this is about
> (mostly unbundling libraries, it seems).
>
>> + (native-inputs (list pkg-config qttools-5))
>> + (inputs (list ffmpeg
>> + h264bitstream
>> + libva
>> + libvdpau
>> + moonlight-common
>> + openssl
>> + opus
>> + qmdnsengine
>> + qtbase-5
>> + qtdeclarative-5
>> + qtquickcontrols2-5
>> + qtsvg-5
>> + sdl2
>> + sdl2-ttf
>> + sdl-gamecontrollerdb))
>> + (synopsis "GameStream client")
>> + (description
>> + "Moonlight is an open source implementation of NVIDIA's GameStream, as
>> +used by the NVIDIA Shield.")
>
> There's no need to use 'open source' or similar adjective in Guix, as
> this is already implied for the whole collection of software offered.
>
> Thank you, and apologies for sending my comments in multiple small
> chunks.

Gentle ping. See the thread for the full review comments.

--
Thanks,
Maxim
O
O
Oleg Pykhalov wrote on 21 Jan 14:22 +0100
(address . 59851-done@debbugs.gnu.org)
87le8ix1mm.fsf_-_@gmail.com
Hello Maxim and Petr,

Thank you for packaging this tool! The patch series modified according
to Maxim suggestions and pushed to master, if you don't mind.

Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:

[…]

Toggle quote (2 lines)
> Gentle ping. See the thread for the full review comments.

Also:

The ‘sdl2-gamecontrollerdb’ input is used instead of
‘sdl-gamecontrollerdb’ (the same thing but newer source commit).

Added to ‘version’ package fields ‘git-commit’ with respectful upstream
versions.

Pushed as f649f820535312c031b3392721cf23ed06ae310b to master.


Petr, if you have a package recipe for the Sunshine (a FOSS streaming
server compatible with Moonlight), I would happy to add it, too.


Thanks,
Oleg.
-----BEGIN PGP SIGNATURE-----

iQJIBAEBCgAyFiEEcjhxI46s62NFSFhXFn+OpQAa+pwFAmWtGoEUHGdvLndpZ3Vz
dEBnbWFpbC5jb20ACgkQFn+OpQAa+pwOZQ/9GuF/dIpWBKeQomS1JZnhi+02nQXt
/6awwNL3Kwy8MnjItqAm9GhQcgvPUA/23v8mZXIgRMb++CBpOz5/kR39SmGowQy5
q8hj8JA5JGHVOkIM6XJyhUG9k2KMfaH6XnRDQK7bXzzzDTfw91wkEUvUxT/ES04N
blR9SqEordjSWbzPqgH8JQbO8+iajeNQ+Y1fG16OCG1dqYsd8iyj2Ff8cb8znu42
3Sia9Uq+SXuOY44cm6nxLPPAczkmlHgAEVXbORoeejooZVhyePgHX0d425ZauGNi
JX+i5noYQV5lK+rv20ldg4+8z2so5rGUU8LrKJEO8RYDHvhAuCp3ke8ReNC5l9/k
EDpq4VuZJGDEY2aakNl0Xox9m+dNPdUbo9E6gqlOo8GD5YLFQAfCThwUKvFRQv5w
deYt23WlWcelBKP0xQpPvYWDBJ14+meUO36UHTJHctD7bSJpN7nczLHXznZNKPmW
A61EMhmAjmP2ZSszx6Th9DzRd4IDM9HRHKHol+yaD3gF6ZLyi1hShTP+fjELnuyr
Tpj/ZgVVTMBZl2afu0nFzl0bmRhFSRQOc+ZdL28JgPo8KkKjr4VKIqCdvNYhZsaT
fy2nCgpS7vonzi6aJpd60gCilZRY0bWdGAgDref+IkyJDJVChhdfe+8BEi8I/Vty
/KSX6RrJkleNla0=
=QO08
-----END PGP SIGNATURE-----

Closed
?