guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/05: gnu: Add enet-moonlight.


From: guix-commits
Subject: 02/05: gnu: Add enet-moonlight.
Date: Sun, 21 Jan 2024 08:10:05 -0500 (EST)

wigust pushed a commit to branch master
in repository guix.

commit cbb4d8cb27b3d0b2cdd5919670b13a84f04468f5
Author: Petr Hodina <phodina@protonmail.com>
AuthorDate: Sat Dec 3 10:32:43 2022 +0100

    gnu: Add enet-moonlight.
    
    * gnu/packages/networking.scm (enet-moonlight): New variable.
    
    Signed-off-by: Oleg Pykhalov <go.wigust@gmail.com>
---
 gnu/packages/networking.scm | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 64e32f78f2..fb0de2da22 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -2624,6 +2624,45 @@ library remains flexible, portable, and easily 
embeddable.")
     (home-page "http://enet.bespin.org";)
     (license license:expat)))
 
+(define-public enet-moonlight
+  (let ((commit "4cde9cc3dcc5c30775a80da1de87f39f98672a31")
+        (revision "1"))
+    (package
+      (inherit enet)
+      (name "enet")
+      (version (git-version "1.3.17" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/cgutman/enet";)
+                      (commit commit)))
+                (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")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]