[PATCH 0/3] gnu: ocaml-sedlex: Update to 3.2.

  • Open
  • quality assurance status badge
Details
One participant
  • Jean-Pierre De Jesus DIAZ
Owner
unassigned
Submitted by
Jean-Pierre De Jesus DIAZ
Severity
normal
J
J
Jean-Pierre De Jesus DIAZ wrote on 23 May 13:42 +0200
(address . guix-patches@gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundation.xyz)
cover.1716464340.git.jean@foundation.xyz
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
J
J
Jean-Pierre De Jesus DIAZ wrote on 23 May 13:47 +0200
[PATCH 1/3] gnu: ocaml-sedlex: Use G-Expressions.
(address . 71145@debbugs.gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundation.xyz)
f878a9b8fd36e25a16361f30aba822e54768fd2b.1716464340.git.jean@foundation.xyz
* gnu/packages/ocaml.scm (ocaml-sedlex): Use G-expressions.

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

Toggle diff (53 lines)
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
J
J
Jean-Pierre De Jesus DIAZ wrote on 23 May 13:47 +0200
[PATCH 2/3] gnu: ocaml-sedlex: Use ucd package.
(address . 71145@debbugs.gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundation.xyz)
847d1287e1bd8b85e619e625195984432b7032de.1716464340.git.jean@foundation.xyz
* 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(-)

Toggle diff (68 lines)
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
J
J
Jean-Pierre De Jesus DIAZ wrote on 23 May 13:47 +0200
[PATCH 3/3] gnu: ocaml-sedlex: Update to 3.2.
(address . 71145@debbugs.gnu.org)(name . Jean-Pierre De Jesus DIAZ)(address . jean@foundation.xyz)
e0be8f3d885ca4bf356532091ee8c4514a1d1436.1716464340.git.jean@foundation.xyz
* 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(-)

Toggle diff (84 lines)
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
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 71145@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 71145
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch