From 5c467ecfd2a4628ed776288b213968a0f4e0dedc Mon Sep 17 00:00:00 2001 From: Petr Hodina 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. 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