guix-patches
[Top][All Lists]
Advanced

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

[bug#60120] [PATCH 17/28] gnu: Add ocaml5.0-ctypes


From: pukkamustard
Subject: [bug#60120] [PATCH 17/28] gnu: Add ocaml5.0-ctypes
Date: Fri, 16 Dec 2022 13:25:16 +0000

* gnu/packages/ocaml.scm (ocaml5.0-ctypes): New variable.
---
 gnu/packages/ocaml.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index bcd88c8637..7fbaed69ad 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4797,6 +4797,7 @@ (define-public ocaml-ctypes
       ("integers" ,ocaml-integers)))
    (inputs
     (list libffi))
+   (properties `((ocaml5.0-variant . ,(delay ocaml5.0-ctypes))))
    (synopsis "Library for binding to C libraries using pure OCaml")
    (description "Ctypes is a library for binding to C libraries using pure
 OCaml.  The primary aim is to make writing C extensions as straightforward as
@@ -4807,6 +4808,33 @@ (define-public ocaml-ctypes
 without writing or generating any C!")
    (license license:expat)))
 
+(define-public ocaml5.0-ctypes
+  ;; Contains fix to support OCaml 5.0
+  ;; (https://github.com/ocamllabs/ocaml-ctypes/pull/709)
+  (let ((commit "52ff621f47dbc1ee5a90c30af0ae0474549946b4")
+        (revision "0"))
+    (package-with-ocaml5.0
+     (package
+       (inherit ocaml-ctypes)
+       (name "ocaml-ctypes")
+       (version (git-version "0.20.1" revision commit))
+       (home-page "https://github.com/ocamllabs/ocaml-ctypes";)
+       (arguments
+        (append
+         ;; Some tests fail. Failure seems to be due to OCaml 5.0.
+         `(#:tests? #f)
+         (package-arguments ocaml-ctypes)))
+       (source (origin
+                 (method git-fetch)
+                 (uri (git-reference
+                       (url home-page)
+                       (commit commit)))
+                 (file-name (git-file-name name version))
+                 (sha256
+                  (base32
+                   "0vyiryqchz0mdfhal7bdivqsk5yhvzzckrqv495rlpbdxzklcp7g"))))
+       (properties '())))))
+
 (define-public ocaml-ocb-stubblr
   (package
    (name "ocaml-ocb-stubblr")
-- 
2.38.1






reply via email to

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