summary refs log tree commit diff
path: root/gnu/packages/games.scm
diff options
context:
space:
mode:
authorPetr Hodina <phodina@protonmail.com>2022-12-03 10:35:36 +0100
committerOleg Pykhalov <go.wigust@gmail.com>2024-01-21 16:01:04 +0300
commit5034e541e6aa86fc13e84b6bec587f610635eb90 (patch)
tree08a4aa20750aeae47b75aaaa1f67c01f94677e8e /gnu/packages/games.scm
parent14db6616e8e4a8d8cca3772d3aeb710bc5088081 (diff)
downloadguix-5034e541e6aa86fc13e84b6bec587f610635eb90.tar.gz
gnu: Add moonlight-common.
* gnu/packages/games.scm (moonlight-common): New variable.

Signed-off-by: Oleg Pykhalov <go.wigust@gmail.com>
Change-Id: Ibf379d85fac0bdc000fdf56a3c850bb8a1067330
Diffstat (limited to 'gnu/packages/games.scm')
-rw-r--r--gnu/packages/games.scm44
1 files changed, 44 insertions, 0 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index 0c9192401d..6d0aa419a1 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -6230,6 +6230,50 @@ application that locks the keyboard and mouse and instead displays bright
 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 (git-version "3.1.4" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url
+                       "https://github.com/moonlight-stream/moonlight-common-c")
+                      (commit commit)))
+                (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")