[bug#34958] Add a package argument to dune-build-system

Message ID 20190323194934.07e3d48e@lepiller.eu
State Accepted
Headers show
Series [bug#34958] Add a package argument to dune-build-system | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed

Commit Message

Julien Lepiller March 23, 2019, 6:49 p.m. UTC
Hi, these two patches add a new #:package argument to the
dune-build-system. This is required to build a package that comes with
more than one build file, such as packages in a repo with multiple
packages.

This is the case for ocaml-alcotest that is updated in the second
patch. It used the ocaml-build-system, but the build system was changed
upstream to dune, so the first patch is needed to build alcotest. I'd
like some feedback especially on the first patch :)

Thank you!

Comments

Ludovic Courtès March 23, 2019, 8:50 p.m. UTC | #1
Hi!

Julien Lepiller <julien@lepiller.eu> skribis:

>>From 619eb1219ac34d4974da4a3794df0e5a6098e48f Mon Sep 17 00:00:00 2001
> From: Julien Lepiller <julien@lepiller.eu>
> Date: Sat, 23 Mar 2019 19:18:31 +0100
> Subject: [PATCH 1/2] guix: dune-build-system: Add a package parameter.
>
> * guix/build-system/dune.scm: Add a package parameter.
> * guix/build/dune.scm (build, test, install): Use it.
> * doc/guix.texi: Document it.

[...]

> +The @code{#:package} parameter can be passed to specify a packagename, which
                                                                   ^^
Missing space.

> +is usefull when a package contains multiple packages and you want to build
            ^
Typo.

Otherwise LGTM.

>>From 6ac1b059ef2c46ea6ac80070e6a49f79bdddbdc4 Mon Sep 17 00:00:00 2001
> From: Julien Lepiller <julien@lepiller.eu>
> Date: Sat, 23 Mar 2019 19:22:37 +0100
> Subject: [PATCH 2/2] gnu: ocaml-alcotest: Update to 0.8.5.
>
> * gnu/packages/ocaml.scm (ocaml-alcotest): Update to 0.8.5.

LGTM!

Thank you,
Ludo’.
Julien Lepiller March 23, 2019, 9:59 p.m. UTC | #2
pushed as 78b3748c1c5446f19e7a74ec424d61a7826fc843 and
23c8a97a5b2766eb853a161c47cc86babf3b4322, thank you!

Patch

From 6ac1b059ef2c46ea6ac80070e6a49f79bdddbdc4 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Sat, 23 Mar 2019 19:22:37 +0100
Subject: [PATCH 2/2] gnu: ocaml-alcotest: Update to 0.8.5.

* gnu/packages/ocaml.scm (ocaml-alcotest): Update to 0.8.5.
---
 gnu/packages/ocaml.scm | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 801611beb1..a6889c642e 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -1724,28 +1724,26 @@  immutability.")
 (define-public ocaml-alcotest
   (package
     (name "ocaml-alcotest")
-    (version "0.7.2")
+    (version "0.8.5")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/mirage/alcotest/releases/"
                                   "download/" version "/alcotest-" version ".tbz"))
               (sha256
                 (base32
-                  "0g5lzk0gpfx4q8hyhr460gr4lab5wakfxsmhfwvb3yinxwzs95gc"))))
-    (build-system ocaml-build-system)
+                  "0szwjxvaahgynsx0apj81jxj3ki6yz4is9mh2wkcbx66qy7n6fvb"))))
+    (build-system dune-build-system)
     (arguments
-     `(#:tests? #f
-       #:build-flags (list "build")
-       #:phases
-       (modify-phases %standard-phases
-         (delete 'configure))))
+     `(#:package "alcotest"
+       #:test-target "."))
     (native-inputs
-     `(("ocamlbuild" ,ocamlbuild)
-       ("opam" ,opam)
-       ("topkg" ,ocaml-topkg)))
+     `(("ocamlbuild" ,ocamlbuild)))
     (propagated-inputs
-     `(("fmt" ,ocaml-fmt)
-       ("astring" ,ocaml-astring)))
+     `(("ocaml-astring" ,ocaml-astring)
+       ("ocaml-cmdliner" ,ocaml-cmdliner)
+       ("ocaml-fmt" ,ocaml-fmt)
+       ("ocaml-result" ,ocaml-result)
+       ("ocaml-uuidm" ,ocaml-uuidm)))
     (home-page "https://github.com/mirage/alcotest")
     (synopsis "Lightweight OCaml test framework")
     (description "Alcotest exposes simple interface to perform unit tests.  It
-- 
2.21.0