* [bug#33437] [PATCH 02/10] gnu: ocaml-migrate-parsetree: Use dune-build-system.
2018-11-19 22:28 ` [bug#33437] [PATCH 01/10] build: " Julien Lepiller
@ 2018-11-19 22:28 ` Julien Lepiller
2018-11-19 22:28 ` [bug#33437] [PATCH 03/10] gnu: ocaml-ppx-tools-versioned: " Julien Lepiller
` (8 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Julien Lepiller @ 2018-11-19 22:28 UTC (permalink / raw)
To: 33437
* gnu/packages/ocaml.scm (ocaml-migrate-parsetree): Use
dune-build-system.
---
gnu/packages/ocaml.scm | 18 +++---------------
1 file changed, 3 insertions(+), 15 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index e1323582a..a1f6adc8b 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -62,6 +62,7 @@
#:use-module (gnu packages web-browsers)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
+ #:use-module (guix build-system dune)
#:use-module (guix build-system gnu)
#:use-module (guix build-system ocaml)
#:use-module (guix download)
@@ -1536,26 +1537,13 @@ following a very simple s-expression syntax.")
(sha256
(base32
"01zjp1q4hryqaxv4apkjd868fycz2kf887r6lkb6x2a545h1lh7f"))))
- (build-system ocaml-build-system)
+ (build-system dune-build-system)
(arguments
`(#:tests? #f
- #:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (replace 'build
- (lambda _
- (invoke "jbuilder" "build" "@install")
- #t))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (invoke "jbuilder" "install"
- "--prefix" (assoc-ref outputs "out"))
- #t)))))
+ #:legacy? #t))
(propagated-inputs
`(("ocamlbuild" ,ocamlbuild)
("ocaml-result" ,ocaml-result)))
- (native-inputs
- `(("dune" ,dune)))
(home-page "https://github.com/ocaml-ppx/ocaml-migrate-parsetree")
(synopsis "OCaml parsetree convertor")
(description "This library converts between parsetrees of different OCaml
--
2.19.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#33437] [PATCH 03/10] gnu: ocaml-ppx-tools-versioned: Use dune-build-system.
2018-11-19 22:28 ` [bug#33437] [PATCH 01/10] build: " Julien Lepiller
2018-11-19 22:28 ` [bug#33437] [PATCH 02/10] gnu: ocaml-migrate-parsetree: Use dune-build-system Julien Lepiller
@ 2018-11-19 22:28 ` Julien Lepiller
2018-11-19 22:28 ` [bug#33437] [PATCH 04/10] gnu: ocaml-bitstring: " Julien Lepiller
` (7 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Julien Lepiller @ 2018-11-19 22:28 UTC (permalink / raw)
To: 33437
* gnu/packages/ocaml.scm (ocaml-ppx-tools-versioned): Use
dune-build-system. Remove duplicate definition.
---
gnu/packages/ocaml.scm | 55 ++----------------------------------------
1 file changed, 2 insertions(+), 53 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index a1f6adc8b..fe8871152 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1564,60 +1564,9 @@ functions to the next and/or previous version.")
(sha256
(base32
"1x2xfjpkzbcz4rza1d7gh3ipliw6jqfcklbsln82v3561qgkqgmh"))))
- (build-system ocaml-build-system)
+ (build-system dune-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (replace 'build
- (lambda _
- (invoke "dune" "build" "@install")
- #t))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (invoke "dune" "install"
- "--prefix" (assoc-ref outputs "out"))
- #t)))))
- (native-inputs
- `(("dune" ,dune)))
- (propagated-inputs
- `(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)))
- (home-page "https://github.com/let-def/ppx_tools_versioned")
- (synopsis "Variant of ppx_tools")
- (description "This package is a variant of ppx_tools based on
-ocaml-migrate-parsetree")
- (license license:expat)))
-
-(define-public ocaml-ppx-tools-versioned
- (package
- (name "ocaml-ppx-tools-versioned")
- (version "5.2.1")
- (source (origin
- (method url-fetch)
- (uri (string-append "https://github.com/ocaml-ppx/"
- "ppx_tools_versioned/archive/"
- version ".tar.gz"))
- (file-name (string-append name "-" version ".tar.gz"))
- (sha256
- (base32
- "1x2xfjpkzbcz4rza1d7gh3ipliw6jqfcklbsln82v3561qgkqgmh"))))
- (build-system ocaml-build-system)
- (arguments
- `(#:tests? #f
- #:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (replace 'build
- (lambda _
- (invoke "dune" "build" "@install")
- #t))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (invoke "dune" "install"
- "--prefix" (assoc-ref outputs "out"))
- #t)))))
- (native-inputs
- `(("dune" ,dune)))
+ `(#:test-target "."))
(propagated-inputs
`(("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)))
(home-page "https://github.com/let-def/ppx_tools_versioned")
--
2.19.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#33437] [PATCH 04/10] gnu: ocaml-bitstring: Use dune-build-system.
2018-11-19 22:28 ` [bug#33437] [PATCH 01/10] build: " Julien Lepiller
2018-11-19 22:28 ` [bug#33437] [PATCH 02/10] gnu: ocaml-migrate-parsetree: Use dune-build-system Julien Lepiller
2018-11-19 22:28 ` [bug#33437] [PATCH 03/10] gnu: ocaml-ppx-tools-versioned: " Julien Lepiller
@ 2018-11-19 22:28 ` Julien Lepiller
2018-11-19 22:28 ` [bug#33437] [PATCH 05/10] gnu: ocaml-lwt: " Julien Lepiller
` (6 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Julien Lepiller @ 2018-11-19 22:28 UTC (permalink / raw)
To: 33437
* gnu/packages/ocaml.scm (ocaml-bitstring): Use dune-build-system.
(ocaml4.02-bitstring)[build-system]: Use ocaml-build-system explicitly.
---
gnu/packages/ocaml.scm | 95 +++++++++++++++++++-----------------------
1 file changed, 42 insertions(+), 53 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index fe8871152..bf4fcc47f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1587,31 +1587,19 @@ ocaml-migrate-parsetree")
(sha256
(base32
"15jjk2pq1vx311gl49s5ag6x5y0654x35w75z07g7kr2q334hqps"))))
- (build-system ocaml-build-system)
+ (build-system dune-build-system)
(native-inputs
`(("camlp4" ,camlp4)
("time" ,time)
("autoconf" ,autoconf)
("automake" ,automake)
- ("bisect" ,ocaml-bisect)
- ("dune" ,dune)))
+ ("bisect" ,ocaml-bisect)))
(propagated-inputs
`(("camlp4" ,camlp4)
("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned)))
(arguments
`(#:tests? #f; Tests fail to build
- #:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (replace 'build
- (lambda _
- (invoke "jbuilder" "build" "@install")
- #t))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (invoke "dune" "install"
- "--prefix" (assoc-ref outputs "out"))
- #t)))))
+ #:legacy? #t))
(properties
`((ocaml4.02-variant . ,(delay ocaml4.02-bitstring))))
(home-page "https://github.com/xguerin/bitstring")
@@ -1637,44 +1625,45 @@ powerful.")
(base32
"0vy8ibrxccii1jbsk5q6yh1kxjigqvi7lhhcmizvd5gfhf7mfyc8"))
(patches (search-patches "ocaml-bitstring-fix-configure.patch"))))
- (arguments
- `(#:ocaml ,ocaml-4.02
- #:findlib ,ocaml4.02-findlib
- #:configure-flags
- (list "CAMLP4OF=camlp4of" "--enable-coverage")
- #:make-flags
- (list (string-append "BISECTLIB="
- (assoc-ref %build-inputs "bisect")
- "/lib/ocaml/site-lib")
- (string-append "OCAMLCFLAGS=-g -I "
- (assoc-ref %build-inputs "camlp4")
- "/lib/ocaml/site-lib/camlp4 -I "
- "$(BISECTLIB)/bisect")
- (string-append "OCAMLOPTFLAGS=-g -I "
- (assoc-ref %build-inputs "camlp4")
- "/lib/ocaml/site-lib/camlp4 -I "
- "$(BISECTLIB)/bisect"))
- #:phases
- (modify-phases %standard-phases
- (add-after 'install 'link-lib
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (stubs (string-append out
- "/lib/ocaml/site-lib/stubslibs"))
- (lib (string-append out
- "/lib/ocaml/site-lib/bitstring")))
- (mkdir-p stubs)
- (symlink (string-append lib "/dllbitstring.so")
- (string-append stubs "/dllbitstring.so")))
- #t))
- (add-before 'configure 'fix-configure
- (lambda* (#:key inputs #:allow-other-keys)
- (substitute* "Makefile.in"
- (("@abs_top_builddir@")
- (string-append "@abs_top_builddir@:" (getenv "LIBRARY_PATH"))))
- (substitute* "configure"
- (("-/bin/sh") (string-append "-" (assoc-ref inputs "bash")
- "/bin/sh"))))))))
+ (build-system ocaml-build-system)
+ (arguments
+ `(#:ocaml ,ocaml-4.02
+ #:findlib ,ocaml4.02-findlib
+ #:configure-flags
+ (list "CAMLP4OF=camlp4of" "--enable-coverage")
+ #:make-flags
+ (list (string-append "BISECTLIB="
+ (assoc-ref %build-inputs "bisect")
+ "/lib/ocaml/site-lib")
+ (string-append "OCAMLCFLAGS=-g -I "
+ (assoc-ref %build-inputs "camlp4")
+ "/lib/ocaml/site-lib/camlp4 -I "
+ "$(BISECTLIB)/bisect")
+ (string-append "OCAMLOPTFLAGS=-g -I "
+ (assoc-ref %build-inputs "camlp4")
+ "/lib/ocaml/site-lib/camlp4 -I "
+ "$(BISECTLIB)/bisect"))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'link-lib
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (stubs (string-append out
+ "/lib/ocaml/site-lib/stubslibs"))
+ (lib (string-append out
+ "/lib/ocaml/site-lib/bitstring")))
+ (mkdir-p stubs)
+ (symlink (string-append lib "/dllbitstring.so")
+ (string-append stubs "/dllbitstring.so")))
+ #t))
+ (add-before 'configure 'fix-configure
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "Makefile.in"
+ (("@abs_top_builddir@")
+ (string-append "@abs_top_builddir@:" (getenv "LIBRARY_PATH"))))
+ (substitute* "configure"
+ (("-/bin/sh") (string-append "-" (assoc-ref inputs "bash")
+ "/bin/sh"))))))))
(native-inputs
`(("camlp4" ,camlp4-4.02)
("time" ,time)
--
2.19.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#33437] [PATCH 05/10] gnu: ocaml-lwt: Use dune-build-system.
2018-11-19 22:28 ` [bug#33437] [PATCH 01/10] build: " Julien Lepiller
` (2 preceding siblings ...)
2018-11-19 22:28 ` [bug#33437] [PATCH 04/10] gnu: ocaml-bitstring: " Julien Lepiller
@ 2018-11-19 22:28 ` Julien Lepiller
2018-11-19 22:28 ` [bug#33437] [PATCH 06/10] gnu: ocaml-lwt-log: " Julien Lepiller
` (5 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Julien Lepiller @ 2018-11-19 22:28 UTC (permalink / raw)
To: 33437
* gnu/packages/ocaml.scm (ocaml-lwt): Use dune-build-system.
---
gnu/packages/ocaml.scm | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index bf4fcc47f..c6ae4e78f 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2133,26 +2133,18 @@ through Transport Layer Security (@dfn{TLS}) encrypted connections.")
(file-name (string-append name "-" version ".tar.gz"))
(sha256 (base32
"0mhh019bjkg5xfvpy1pxs4xdxb759fyydmgb6l4j0qww1qgr8klp"))))
- (build-system ocaml-build-system)
+ (build-system dune-build-system)
(arguments
`(#:tests? #f; require lwt_ppx
+ #:legacy? #t
#:phases
(modify-phases %standard-phases
- (replace 'configure
+ (add-before 'build 'configure
(lambda _
(invoke "ocaml" "src/util/configure.ml" "-use-libev" "true")
- #t))
- (replace 'build
- (lambda _
- (invoke "jbuilder" "build" "@install")
- #t))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (invoke "jbuilder" "install" "--prefix" (assoc-ref outputs "out"))
#t)))))
(native-inputs
- `(("dune" ,dune)
- ("ocaml-cppo" ,ocaml-cppo)
+ `(("ocaml-cppo" ,ocaml-cppo)
("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree)
("pkg-config" ,pkg-config)
("ppx-tools-versioned" ,ocaml-ppx-tools-versioned)))
--
2.19.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#33437] [PATCH 06/10] gnu: ocaml-lwt-log: Use dune-build-system.
2018-11-19 22:28 ` [bug#33437] [PATCH 01/10] build: " Julien Lepiller
` (3 preceding siblings ...)
2018-11-19 22:28 ` [bug#33437] [PATCH 05/10] gnu: ocaml-lwt: " Julien Lepiller
@ 2018-11-19 22:28 ` Julien Lepiller
2018-11-19 22:28 ` [bug#33437] [PATCH 07/10] gnu: ocaml-cppo: " Julien Lepiller
` (4 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Julien Lepiller @ 2018-11-19 22:28 UTC (permalink / raw)
To: 33437
* gnu/packages/ocaml.scm (ocaml-lwt-log): Use dune-build-system.
---
gnu/packages/ocaml.scm | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index c6ae4e78f..5d322c273 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2178,22 +2178,10 @@ locks or other synchronization primitives.")
(file-name (string-append name "-" version ".tar.gz"))
(sha256 (base32
"1lr62j2266pbsi54xmzsfvl2z7fi7smhak7fp1ybl8hssxwi6in2"))))
- (build-system ocaml-build-system)
+ (build-system dune-build-system)
(arguments
`(#:tests? #f; require lwt_ppx
- #:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (replace 'build
- (lambda _
- (invoke "jbuilder" "build" "@install")
- #t))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (invoke "jbuilder" "install" "--prefix" (assoc-ref outputs "out"))
- #t)))))
- (native-inputs
- `(("dune" ,dune)))
+ #:legacy? #t))
(propagated-inputs
`(("lwt" ,ocaml-lwt)))
(home-page "https://github.com/aantron/lwt_log")
--
2.19.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#33437] [PATCH 07/10] gnu: ocaml-cppo: Use dune-build-system.
2018-11-19 22:28 ` [bug#33437] [PATCH 01/10] build: " Julien Lepiller
` (4 preceding siblings ...)
2018-11-19 22:28 ` [bug#33437] [PATCH 06/10] gnu: ocaml-lwt-log: " Julien Lepiller
@ 2018-11-19 22:28 ` Julien Lepiller
2018-11-19 22:28 ` [bug#33437] [PATCH 08/10] gnu: ocaml-re: " Julien Lepiller
` (3 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Julien Lepiller @ 2018-11-19 22:28 UTC (permalink / raw)
To: 33437
* gnu/packages/ocaml.scm (ocaml-cppo): Use dune-build-system.
---
gnu/packages/ocaml.scm | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 5d322c273..fe844b82d 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -2995,24 +2995,12 @@ provide a tool that can be used to:
(sha256 (base32
"1dkm3d5h6h56y937gcdk2wixlpzl59vv5pmiafglr89p20kf7gqf"))
(file-name (string-append name "-" version ".tar.gz"))))
- (build-system ocaml-build-system)
+ (build-system dune-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (replace 'build
- (lambda _
- (invoke "dune" "build" "@install" "--profile" "release")
- #t))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (invoke "dune" "install"
- "--prefix" (assoc-ref outputs "out"))
- #t)))
- #:tests? #f))
+ `(#:tests? #f
+ #:build-flags (list "--profile" "release")))
(native-inputs
- `(("dune" ,dune)
- ("ocamlbuild" ,ocamlbuild)))
+ `(("ocamlbuild" ,ocamlbuild)))
(home-page "https://github.com/mjambon/cppo")
(synopsis "Equivalent of the C preprocessor for OCaml programs")
(description "Cppo is an equivalent of the C preprocessor for OCaml
--
2.19.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#33437] [PATCH 08/10] gnu: ocaml-re: Use dune-build-system.
2018-11-19 22:28 ` [bug#33437] [PATCH 01/10] build: " Julien Lepiller
` (5 preceding siblings ...)
2018-11-19 22:28 ` [bug#33437] [PATCH 07/10] gnu: ocaml-cppo: " Julien Lepiller
@ 2018-11-19 22:28 ` Julien Lepiller
2018-11-19 22:28 ` [bug#33437] [PATCH 09/10] gnu: ocaml-camomile: " Julien Lepiller
` (2 subsequent siblings)
9 siblings, 0 replies; 14+ messages in thread
From: Julien Lepiller @ 2018-11-19 22:28 UTC (permalink / raw)
To: 33437
* gnu/packages/ocaml.scm (ocaml-re): Use dune-build-system.
---
gnu/packages/ocaml.scm | 18 +++---------------
1 file changed, 3 insertions(+), 15 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index fe844b82d..5ba9a9ad6 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -3635,26 +3635,14 @@ standard iterator type starting from 4.07.")
(sha256
(base32
"1pdb0mr6z5ax6szblr3f5lbdnqq9grm97cmsfjmdma60yrx2rqhd"))))
- (build-system ocaml-build-system)
+ (build-system dune-build-system)
(arguments
`(#:tests? #f
- #:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (replace 'build
- (lambda _
- (invoke "dune" "build" "@install" "--profile" "release")
- #t))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (invoke "dune" "install"
- "--prefix" (assoc-ref outputs "out"))
- #t)))))
+ #:build-flags (list "--profile" "release")))
(propagated-inputs
`(("ocaml-seq" ,ocaml-seq)))
(native-inputs
- `(("dune" ,dune)
- ("ounit" ,ocaml-ounit)))
+ `(("ounit" ,ocaml-ounit)))
(home-page "https://github.com/ocaml/ocaml-re/")
(synopsis "Regular expression library for OCaml")
(description "Pure OCaml regular expressions with:
--
2.19.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#33437] [PATCH 09/10] gnu: ocaml-camomile: Use dune-build-system.
2018-11-19 22:28 ` [bug#33437] [PATCH 01/10] build: " Julien Lepiller
` (6 preceding siblings ...)
2018-11-19 22:28 ` [bug#33437] [PATCH 08/10] gnu: ocaml-re: " Julien Lepiller
@ 2018-11-19 22:28 ` Julien Lepiller
2018-11-19 22:28 ` [bug#33437] [PATCH 10/10] gnu: ocaml-lambda-term: " Julien Lepiller
2018-11-24 21:17 ` [bug#33437] [PATCH 01/10] build: Add dune-build-system Ludovic Courtès
9 siblings, 0 replies; 14+ messages in thread
From: Julien Lepiller @ 2018-11-19 22:28 UTC (permalink / raw)
To: 33437
* gnu/packages/ocaml.scm (ocaml-camomile): Use dune-build-system.
---
gnu/packages/ocaml.scm | 18 +++---------------
1 file changed, 3 insertions(+), 15 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 5ba9a9ad6..896f3840a 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4376,23 +4376,11 @@ the plugins facilitate extensibility, and the frontends serve as entry points.")
(sha256
(base32
"01ssjrqz41jvrqh27jxnh9cx7ywi9b5sgsykd00i7z9nrcwhlfy2"))))
- (build-system ocaml-build-system)
+ (build-system dune-build-system)
(native-inputs
- `(("camlp4" ,camlp4)
- ("dune" ,dune)))
+ `(("camlp4" ,camlp4)))
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (replace 'build
- (lambda _
- (invoke "dune" "build" "@install" "--profile" "release")
- #t))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (invoke "dune" "install"
- "--prefix" (assoc-ref outputs "out"))
- #t)))
+ `(#:build-flags (list "--profile" "realease")
#:tests? #f))
(synopsis "Comprehensive Unicode library")
(description "Camomile is a Unicode library for OCaml. Camomile provides
--
2.19.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#33437] [PATCH 10/10] gnu: ocaml-lambda-term: Use dune-build-system.
2018-11-19 22:28 ` [bug#33437] [PATCH 01/10] build: " Julien Lepiller
` (7 preceding siblings ...)
2018-11-19 22:28 ` [bug#33437] [PATCH 09/10] gnu: ocaml-camomile: " Julien Lepiller
@ 2018-11-19 22:28 ` Julien Lepiller
2018-11-24 21:18 ` Ludovic Courtès
2018-11-24 21:17 ` [bug#33437] [PATCH 01/10] build: Add dune-build-system Ludovic Courtès
9 siblings, 1 reply; 14+ messages in thread
From: Julien Lepiller @ 2018-11-19 22:28 UTC (permalink / raw)
To: 33437
* gnu/packages/ocaml.scm (ocaml-lambda-term): Use dune-build-system.
---
gnu/packages/ocaml.scm | 17 ++---------------
1 file changed, 2 insertions(+), 15 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 896f3840a..7ed5c1951 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4481,23 +4481,10 @@ connect an engine to your inputs and rendering functions to get an editor.")
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32 "1hy5ryagqclgdm9lzh1qil5mrynlypv7mn6qm858hdcnmz9zzn0l"))))
- (build-system ocaml-build-system)
+ (build-system dune-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (replace 'build
- (lambda _
- (invoke "dune" "build" "@install" "--profile" "release")
- #t))
- (replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (invoke "dune" "install"
- "--prefix" (assoc-ref outputs "out"))
- #t)))
+ `(#:build-flags (list "--profile" "release")
#:tests? #f))
- (native-inputs
- `(("dune" ,dune)))
(propagated-inputs
`(("lwt" ,ocaml-lwt)
("lwt-log" ,ocaml-lwt-log)
--
2.19.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#33437] [PATCH 01/10] build: Add dune-build-system.
2018-11-19 22:28 ` [bug#33437] [PATCH 01/10] build: " Julien Lepiller
` (8 preceding siblings ...)
2018-11-19 22:28 ` [bug#33437] [PATCH 10/10] gnu: ocaml-lambda-term: " Julien Lepiller
@ 2018-11-24 21:17 ` Ludovic Courtès
9 siblings, 0 replies; 14+ messages in thread
From: Ludovic Courtès @ 2018-11-24 21:17 UTC (permalink / raw)
To: Julien Lepiller; +Cc: 33437
Hello Julien!
Julien Lepiller <julien@lepiller.eu> skribis:
> * guix/build/dune-build-system.scm,
> guix/build-system/dune.scm: New files.
> * Makefile.am (MODULES): Add them.
> * doc/guix.texi (Build Systems): Document dune-build-system.
> * guix/build-system/ocaml.scm (lower, default-findlib, default-ocaml): Export
> them.
> (package-with-explicit-ocaml): Also transform packages built with
> dune-build-system.
Nice!
> +@defvr {Scheme Variable} dune-build-system
> +This variable is exported by @code{(guix build-system dune)}. It
> +supports builds of packaes using Dune, a build tool for the
^
Typo.
> +@uref{https://ocaml.org, OCaml programming language}. It is implemented
Maybe add a link for Dune rather than for OCaml?
> +as an extension of the @code{ocaml-build-system} which is describe below.
^
Typo.
> +It automically adds the @code{dune} package to the set of inputs.
^^
“automatically”
> +The @code{'configure} phase is removed as dune packages typically
Maybe: “There is no @code{configure} phase because Dune packages…”?
> +The @code{#:legacy?} parameter can be passed to use the @code{jbuild}
> +command instead of the more recent @code{dune} command while building
> +a package. Its default value is @code{#f}.
Should it be called #:jbuild? instead? Because eventually everything
becomes “legacy”. :-)
> +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
> +(define-module (guix build-system dune)
Nitpick: please insert a newline before ‘define-module’. :-)
> +(define* (dune-build store name inputs
> + #:key (guile #f)
> + (outputs '("out"))
> + (search-paths '())
> + (build-flags ''())
> + (out-of-source? #t)
> + (legacy? #f)
> + (tests? #t)
> + (test-flags ''())
> + (test-target "test")
> + (install-target "install")
> + (validate-runpath? #t)
> + (patch-shebangs? #t)
> + (strip-binaries? #t)
> + (strip-flags ''("--strip-debug"))
> + (strip-directories ''("lib" "lib64" "libexec"
> + "bin" "sbin"))
> + (phases '(@ (guix build dune-build-system)
> + %standard-phases))
> + (system (%current-system))
> + (imported-modules %dune-build-system-modules)
> + (modules '((guix build dune-build-system)
> + (guix build utils))))
Would it make sense to add (guix build ocaml-build-system) as well to
the default #:modules?
> +++ b/guix/build-system/ocaml.scm
> @@ -31,6 +31,9 @@
> package-with-ocaml4.02
> strip-ocaml4.01-variant
> strip-ocaml4.02-variant
> + default-findlib
> + default-ocaml
> + lower
> ocaml-build
> ocaml-build-system))
>
> @@ -76,6 +79,13 @@
> (let ((module (resolve-interface '(gnu packages ocaml))))
> (module-ref module 'ocaml-findlib)))
>
> +(define (default-dune-build-system)
> + "Return the dune-build-system."
> +
> + ;; Do not use `@' to avoid introducing circular dependencies.
> + (let ((module (resolve-interface '(guix build-system dune))))
> + (module-ref module 'dune-build-system)))
> +
> (define (default-ocaml4.01)
> (let ((ocaml (resolve-interface '(gnu packages ocaml))))
> (module-ref ocaml 'ocaml-4.01)))
> @@ -119,7 +129,8 @@ pre-defined variants."
> => force)
>
> ;; Otherwise build the new package object graph.
> - ((eq? (package-build-system p) ocaml-build-system)
> + ((or (eq? (package-build-system p) ocaml-build-system)
> + (eq? (package-build-system p) (default-dune-build-system)))
I don’t have a better solution to offer here, but this whole
‘package-with-explicit-XYZ’ is clearly showing its limits here. :-/
Otherwise LGTM, thank you!
Ludo’.
^ permalink raw reply [flat|nested] 14+ messages in thread