GNU bug report logs - #71145
[PATCH 0/3] gnu: ocaml-sedlex: Update to 3.2.

Previous Next

Package: guix-patches;

Reported by: Jean-Pierre De Jesus DIAZ <jean <at> foundation.xyz>

Date: Thu, 23 May 2024 11:44:01 UTC

Severity: normal

Tags: patch

To reply to this bug, email your comments to 71145 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to julien <at> lepiller.eu, pukkamustard <at> posteo.net, guix-patches <at> gnu.org:
bug#71145; Package guix-patches. (Thu, 23 May 2024 11:44:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jean-Pierre De Jesus DIAZ <jean <at> foundation.xyz>:
New bug report received and forwarded. Copy sent to julien <at> lepiller.eu, pukkamustard <at> posteo.net, guix-patches <at> gnu.org. (Thu, 23 May 2024 11:44:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jean-Pierre De Jesus DIAZ <jean <at> foundation.xyz>
To: guix-patches <at> gnu.org
Cc: Jean-Pierre De Jesus DIAZ <jean <at> foundation.xyz>
Subject: [PATCH 0/3] gnu: ocaml-sedlex: Update to 3.2.
Date: Thu, 23 May 2024 13:42:38 +0200
This patch series updates ocaml-sedlex to 3.2 and refactors the package
definition to use G-Expressions and to use the system's ucd package
instead of manually downloading UCD files as the ucd package is kept
more up to date.

For now there's no package using ocaml-sedlex 3.2 as every package
depends on the 2.x versions, so PATCH 3/3 is optional but at least
useful for me for development.

Jean-Pierre De Jesus DIAZ (3):
  gnu: ocaml-sedlex: Use G-Expressions.
  gnu: ocaml-sedlex: Use ucd package.
  gnu: ocaml-sedlex: Update to 3.2.

 gnu/packages/haxe.scm  |  2 +-
 gnu/packages/ocaml.scm | 95 +++++++++++++++++++++---------------------
 2 files changed, 49 insertions(+), 48 deletions(-)


base-commit: aeba4849b42b4d3ac75341ac4b61843c1fe48181
-- 
2.41.0





Information forwarded to julien <at> lepiller.eu, pukkamustard <at> posteo.net, guix-patches <at> gnu.org:
bug#71145; Package guix-patches. (Thu, 23 May 2024 11:49:01 GMT) Full text and rfc822 format available.

Message #8 received at 71145 <at> debbugs.gnu.org (full text, mbox):

From: Jean-Pierre De Jesus DIAZ <jean <at> foundation.xyz>
To: 71145 <at> debbugs.gnu.org
Cc: Jean-Pierre De Jesus DIAZ <jean <at> foundation.xyz>
Subject: [PATCH 1/3] gnu: ocaml-sedlex: Use G-Expressions.
Date: Thu, 23 May 2024 13:47:04 +0200
* gnu/packages/ocaml.scm (ocaml-sedlex): Use G-expressions.

Change-Id: I1dd8b9e1cefef90ff4cdcc592f5ad3d735a5081b
---
 gnu/packages/ocaml.scm | 40 +++++++++++++++++++---------------------
 1 file changed, 19 insertions(+), 21 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index ef092d8e41..2100227adf 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -3783,27 +3783,25 @@ (define-public ocaml-sedlex
                 "1z8mmk1idh9hjhh2b9rp5b1h8kmzcxhagqkw0pvxn6ykx1brskq1"))))
     (build-system dune-build-system)
     (arguments
-     `(#:tests? #f                      ; no tests
-       #:package "sedlex"
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'build 'copy-resources
-           (lambda* (#:key inputs #:allow-other-keys)
-             (with-directory-excursion "src/generator/data"
-               ;; Newer versions of dune emit an error if files it wants to
-               ;; build already exist. Delete the dune file so dune doesn't
-               ;; complain.
-               (delete-file "dune")
-               (for-each
-                (lambda (file)
-                  (copy-file (assoc-ref inputs file) file))
-                '("DerivedCoreProperties.txt" "DerivedGeneralCategory.txt"
-                  "PropList.txt")))
-             #t))
-         (add-before 'build 'chmod
-           (lambda _
-             (for-each (lambda (file) (chmod file #o644)) (find-files "." ".*"))
-             #t)))))
+     (list #:tests? #f                      ; no tests
+           #:package "sedlex"
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-before 'build 'copy-resources
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (with-directory-excursion "src/generator/data"
+                     ;; Newer versions of dune emit an error if files it wants to
+                     ;; build already exist. Delete the dune file so dune doesn't
+                     ;; complain.
+                     (delete-file "dune")
+                     (for-each
+                      (lambda (file)
+                        (copy-file (assoc-ref inputs file) file))
+                      '("DerivedCoreProperties.txt" "DerivedGeneralCategory.txt"
+                        "PropList.txt")))))
+               (add-before 'build 'chmod
+                 (lambda _
+                   (for-each (lambda (file) (chmod file #o644)) (find-files "." ".*")))))))
     (propagated-inputs
      (list ocaml-gen ocaml-ppxlib ocaml-uchar))
     ;; These three files are needed by src/generator/data/dune, but would be
-- 
2.41.0





Information forwarded to julien <at> lepiller.eu, pukkamustard <at> posteo.net, guix-patches <at> gnu.org:
bug#71145; Package guix-patches. (Thu, 23 May 2024 11:49:02 GMT) Full text and rfc822 format available.

Message #11 received at 71145 <at> debbugs.gnu.org (full text, mbox):

From: Jean-Pierre De Jesus DIAZ <jean <at> foundation.xyz>
To: 71145 <at> debbugs.gnu.org
Cc: Jean-Pierre De Jesus DIAZ <jean <at> foundation.xyz>
Subject: [PATCH 2/3] gnu: ocaml-sedlex: Use ucd package.
Date: Thu, 23 May 2024 13:47:05 +0200
* gnu/packages/ocaml.scm (ocaml-sedlex): Use ucd for Unicode files.

Change-Id: I8c54e15bcb32cf315fde28921611b20eeb2a6637
---
 gnu/packages/ocaml.scm | 35 +++++++++--------------------------
 1 file changed, 9 insertions(+), 26 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 2100227adf..10b98ca758 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -87,6 +87,7 @@ (define-module (gnu packages ocaml)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages time)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages unicode)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages virtualization)
   #:use-module (gnu packages web)
@@ -3788,6 +3789,8 @@ (define-public ocaml-sedlex
            #:phases
            #~(modify-phases %standard-phases
                (add-before 'build 'copy-resources
+                 ;; These three files are needed by src/generator/data/dune,
+                 ;; but would be downloaded using curl at build time.
                  (lambda* (#:key inputs #:allow-other-keys)
                    (with-directory-excursion "src/generator/data"
                      ;; Newer versions of dune emit an error if files it wants to
@@ -3796,38 +3799,18 @@ (define-public ocaml-sedlex
                      (delete-file "dune")
                      (for-each
                       (lambda (file)
-                        (copy-file (assoc-ref inputs file) file))
-                      '("DerivedCoreProperties.txt" "DerivedGeneralCategory.txt"
-                        "PropList.txt")))))
+                        (copy-file (search-input-file inputs file)
+                                   (basename file)))
+                      '("share/ucd/extracted/DerivedGeneralCategory.txt"
+                        "share/ucd/DerivedCoreProperties.txt"
+                        "share/ucd/PropList.txt")))))
                (add-before 'build 'chmod
                  (lambda _
                    (for-each (lambda (file) (chmod file #o644)) (find-files "." ".*")))))))
     (propagated-inputs
      (list ocaml-gen ocaml-ppxlib ocaml-uchar))
-    ;; These three files are needed by src/generator/data/dune, but would be
-    ;; downloaded using curl at build time.
     (inputs
-     `(("DerivedCoreProperties.txt"
-        ,(origin
-           (method url-fetch)
-           (uri "https://www.unicode.org/Public/12.1.0/ucd/DerivedCoreProperties.txt")
-           (sha256
-            (base32
-             "0s6sn1yr9qmb2i6gf8dir2zpsbjv1frdfzy3i2yjylzvf637msx6"))))
-       ("DerivedGeneralCategory.txt"
-        ,(origin
-           (method url-fetch)
-           (uri "https://www.unicode.org/Public/12.1.0/ucd/extracted/DerivedGeneralCategory.txt")
-           (sha256
-            (base32
-             "1rifzq9ba6c58dn0lrmcb5l5k4ksx3zsdkira3m5p6h4i2wriy3q"))))
-       ("PropList.txt"
-        ,(origin
-           (method url-fetch)
-           (uri "https://www.unicode.org/Public/12.1.0/ucd/PropList.txt")
-           (sha256
-            (base32
-             "0gsb1jpj3mnqbjgbavi4l95gl6g4agq58j82km22fdfg63j3w3fk"))))))
+     (list ucd))
     (home-page "https://www.cduce.org/download.html#side")
     (synopsis "Lexer generator for Unicode and OCaml")
     (description "Lexer generator for Unicode and OCaml.")
-- 
2.41.0





Information forwarded to julien <at> lepiller.eu, pukkamustard <at> posteo.net, guix-patches <at> gnu.org:
bug#71145; Package guix-patches. (Thu, 23 May 2024 11:49:02 GMT) Full text and rfc822 format available.

Message #14 received at 71145 <at> debbugs.gnu.org (full text, mbox):

From: Jean-Pierre De Jesus DIAZ <jean <at> foundation.xyz>
To: 71145 <at> debbugs.gnu.org
Cc: Jean-Pierre De Jesus DIAZ <jean <at> foundation.xyz>
Subject: [PATCH 3/3] gnu: ocaml-sedlex: Update to 3.2.
Date: Thu, 23 May 2024 13:47:06 +0200
* gnu/packages/haxe.scm (ocaml-sedlex): Update to 3.2.
(ocaml-sedlex-2): New variable.
(ocaml-piqilib) <propagated-inputs>: Replace ocaml-sedlex by ocaml-sedlex-2.
* gnu/packages/ocaml.scm (haxe) <inputs>: Replace ocaml-sedlex by ocaml-sedlex-2.

Change-Id: I0ae3609f8db22589d8fdd110d1b7b92f6fead15d
---
 gnu/packages/haxe.scm  |  2 +-
 gnu/packages/ocaml.scm | 28 ++++++++++++++++++++++++----
 2 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/haxe.scm b/gnu/packages/haxe.scm
index c7af07325f..f1cdc8732f 100644
--- a/gnu/packages/haxe.scm
+++ b/gnu/packages/haxe.scm
@@ -177,7 +177,7 @@ (define-public haxe
                   ocaml-extlib
                   ocaml-luv
                   ocaml-ptmap
-                  ocaml-sedlex
+                  ocaml-sedlex-2
                   ocaml-sha
                   ocaml-xml-light
                   pcre2
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 10b98ca758..c96b374a99 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -3772,7 +3772,7 @@ (define-public ocaml-gen
 (define-public ocaml-sedlex
   (package
     (name "ocaml-sedlex")
-    (version "2.6")
+    (version "3.2")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -3781,10 +3781,10 @@ (define-public ocaml-sedlex
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "1z8mmk1idh9hjhh2b9rp5b1h8kmzcxhagqkw0pvxn6ykx1brskq1"))))
+                "1vzsmp8mvx9vrgjr5chsk2p2s5ii08c9kizw9ilx78jj30nzamz5"))))
     (build-system dune-build-system)
     (arguments
-     (list #:tests? #f                      ; no tests
+     (list ;#:tests? #f                      ; no tests
            #:package "sedlex"
            #:phases
            #~(modify-phases %standard-phases
@@ -3807,6 +3807,7 @@ (define-public ocaml-sedlex
                (add-before 'build 'chmod
                  (lambda _
                    (for-each (lambda (file) (chmod file #o644)) (find-files "." ".*")))))))
+    (native-inputs (list ocaml-ppx-expect))
     (propagated-inputs
      (list ocaml-gen ocaml-ppxlib ocaml-uchar))
     (inputs
@@ -3816,6 +3817,25 @@ (define-public ocaml-sedlex
     (description "Lexer generator for Unicode and OCaml.")
     (license license:expat)))
 
+(define-public ocaml-sedlex-2
+  (package
+    (inherit ocaml-sedlex)
+    (name "ocaml-sedlex")
+    (version "2.6")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/ocaml-community/sedlex")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1z8mmk1idh9hjhh2b9rp5b1h8kmzcxhagqkw0pvxn6ykx1brskq1"))))
+    (arguments
+     (substitute-keyword-arguments (package-arguments ocaml-sedlex)
+       ((#:tests? _ #t) #f)))               ; no tests
+    (native-inputs '())))
+
 (define-public ocaml-uchar
   (package
     (name "ocaml-uchar")
@@ -5218,7 +5238,7 @@ (define-public ocaml-piqilib
      (list which))
     (propagated-inputs
      `(("ocaml-xmlm" ,ocaml-xmlm)
-       ("ocaml-sedlex" ,ocaml-sedlex)
+       ("ocaml-sedlex" ,ocaml-sedlex-2)
        ("ocaml-easy-format" ,ocaml-easy-format)
        ("ocaml-base64" ,ocaml-base64)))
     (home-page "https://piqi.org")
-- 
2.41.0





This bug report was last modified 107 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.