summaryrefslogtreecommitdiff
path: root/gnu/packages/ocaml.scm
diff options
context:
space:
mode:
authorJulien Lepiller <julien@lepiller.eu>2019-11-27 21:34:33 +0100
committerJulien Lepiller <julien@lepiller.eu>2019-11-30 15:50:27 +0100
commit98a468ffd29252e2b08f53b7e115b8a3e0d1df15 (patch)
tree8392740b43b8c6d084e4ff0eeaa6960cc6a75df3 /gnu/packages/ocaml.scm
parent5a4003f453ee8afdfe21d959e105250bfc876063 (diff)
downloadguix-patches-98a468ffd29252e2b08f53b7e115b8a3e0d1df15.tar
guix-patches-98a468ffd29252e2b08f53b7e115b8a3e0d1df15.tar.gz
gnu: Add ocaml-sedlex.
* gnu/packages/ocaml.scm (ocaml-sedlex): New variable.
Diffstat (limited to 'gnu/packages/ocaml.scm')
-rw-r--r--gnu/packages/ocaml.scm67
1 files changed, 67 insertions, 0 deletions
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 75e66206b1..21ed1f167a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2025,6 +2025,73 @@ representation of the data.")
and consumable.")
(license license:bsd-2)))
+(define-public ocaml-sedlex
+ (package
+ (name "ocaml-sedlex")
+ (version "2.1")
+ (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
+ "05f6qa8x3vhpdz1fcnpqk37fpnyyq13icqsk2gww5idjnh6kng26"))))
+ (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"
+ (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)))))
+ (native-inputs
+ `(("ocamlbuild" ,ocamlbuild)))
+ (propagated-inputs
+ `(("ocaml-gen" ,ocaml-gen)
+ ("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)
+ ("ocaml-uchar" ,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"))))))
+ (home-page "http://www.cduce.org/download.html#side")
+ (synopsis "Lexer generator for Unicode and OCaml")
+ (description "Lexer generator for Unicode and OCaml.")
+ (license license:expat)))
+
(define-public ocaml-uchar
(package
(name "ocaml-uchar")