unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Julien Lepiller <julien@lepiller.eu>
To: 35150@debbugs.gnu.org
Subject: [bug#35150] [PATCH 9/9] gnu: opam: Unbundle dependencies.
Date: Thu,  4 Apr 2019 21:16:38 +0200	[thread overview]
Message-ID: <20190404191638.31953-9-julien@lepiller.eu> (raw)
In-Reply-To: <20190404191638.31953-1-julien@lepiller.eu>

* gnu/packages/ocaml.scm (opam)[build-system]: Use ocaml-build-system.
[source]: Use unbundled sources.
[arguments]: Update.
[inputs, native-inputs, propagated-inputs]: Add missing dependencies.
---
 gnu/packages/ocaml.scm | 50 +++++++++++++++++++++++-------------------
 1 file changed, 28 insertions(+), 22 deletions(-)

diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 0613bc29c6..58746d45df 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -475,28 +475,28 @@ the opam file fomat.")
     (name "opam")
     (version "2.0.3")
     (source (origin
-              (method url-fetch)
-              ;; Use the '-full' version, which includes all the dependencies.
-              (uri (string-append
-                    "https://github.com/ocaml/opam/releases/download/"
-                    version "/opam-full-" version ".tar.gz")
-               ;; (string-append "https://github.com/ocaml/opam/archive/"
-               ;;                    version ".tar.gz")
-               )
+              (method git-fetch)
+              (uri (git-reference
+                     (url "https://github.com/ocaml/opam")
+                     (commit version)))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "1qphm1grxx5j8li7f9qfpih4ylrnjl08b4ym8ma4ln44l56xm285"))))
-    (build-system gnu-build-system)
+                "151zvyijrapi805xm0j88ixlrhdbssfagxr2i1w25aagcd18n5y4"))))
+    (build-system ocaml-build-system)
     (arguments
-     '(;; Sometimes, 'make -jX' would fail right after ./configure with
-       ;; "Fatal error: exception End_of_file".
-       #:parallel-build? #f
+     `(#:configure-flags
+       (list (string-append "SHELL="
+                            (assoc-ref %build-inputs "bash")
+                            "/bin/sh"))
 
        ;; For some reason, 'ocp-build' needs $TERM to be set.
-       #:make-flags `("TERM=screen"
-                      ,(string-append "SHELL="
-                                      (assoc-ref %build-inputs "bash")
-                                      "/bin/sh"))
+       #:make-flags
+       (list "TERM=screen"
+             (string-append "SHELL="
+                            (assoc-ref %build-inputs "bash")
+                            "/bin/sh"))
+
        #:test-target "tests"
 
        ;; FIXME: There's an obscure test failure:
@@ -522,12 +522,10 @@ the opam file fomat.")
                          ;; isolated environment when building with opam.
                          ;; This is necessary for packages to find external
                          ;; dependencies, such as a C compiler, make, etc...
-                         (("^add_mounts ro /usr")
-                          "add_mounts ro /gnu /run/current-system /usr"))
+                         (("^add_sys_mounts /usr")
+                          "add_sys_mounts /gnu /run/current-system /usr"))
                        (substitute* "src/client/opamInitDefaults.ml"
                          (("\"bwrap\"") (string-append "\"" bwrap "\"")))
-                       ;; Build dependencies
-                       (apply invoke "make" "lib-ext" make-flags)
                        #t)))
                  (add-before 'check 'pre-check
                    (lambda _
@@ -536,7 +534,9 @@ the opam file fomat.")
                      (invoke "git" "config" "--global" "user.name" "Guix")
                      #t)))))
     (native-inputs
-     `(("git" ,git)                               ;for the tests
+     `(("dune" ,dune)
+       ("git" ,git)                               ;for the tests
+       ("ocaml-cppo" ,ocaml-cppo)
        ("python" ,python)                         ;for the tests
        ("camlp4" ,camlp4)))
     (inputs
@@ -544,6 +544,12 @@ the opam file fomat.")
        ("ncurses" ,ncurses)
        ("curl" ,curl)
        ("bubblewrap" ,bubblewrap)))
+    (propagated-inputs
+     `(("ocaml-cmdliner" ,ocaml-cmdliner)
+       ("ocaml-dose3" ,ocaml-dose3)
+       ("ocaml-mccs" ,ocaml-mccs)
+       ("ocaml-opam-file-format" ,ocaml-opam-file-format)
+       ("ocaml-re" ,ocaml-re)))
     (home-page "http://opam.ocamlpro.com/")
     (synopsis "Package manager for OCaml")
     (description
-- 
2.21.0

  parent reply	other threads:[~2019-04-04 19:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-04 18:54 [bug#35150] [PATCH] Unbundle opam dependencies Julien Lepiller
2019-04-04 19:16 ` [bug#35150] [PATCH 1/9] import: opam: Add more patterns to opam file parser Julien Lepiller
2019-04-04 19:16   ` [bug#35150] [PATCH 2/9] import: opam: Use dune-build-system when possible Julien Lepiller
2019-04-04 19:16   ` [bug#35150] [PATCH 3/9] gnu: Add ocaml-opam-file-format Julien Lepiller
2019-04-04 19:16   ` [bug#35150] [PATCH 4/9] gnu: ocaml-cmdliner: Update to 1.0.3 Julien Lepiller
2019-04-04 19:16   ` [bug#35150] [PATCH 5/9] gnu: Add ocaml-extlib Julien Lepiller
2019-04-04 19:16   ` [bug#35150] [PATCH 6/9] gnu: Add ocaml-cudf Julien Lepiller
2019-04-04 19:16   ` [bug#35150] [PATCH 7/9] gnu: Add ocaml-mccs Julien Lepiller
2019-04-04 19:16   ` [bug#35150] [PATCH 8/9] gnu: Add ocaml-dose3 Julien Lepiller
2019-04-04 19:16   ` Julien Lepiller [this message]
2019-04-10 15:08   ` [bug#35150] [PATCH 1/9] import: opam: Add more patterns to opam file parser Ludovic Courtès
2019-04-10 15:09 ` [bug#35150] [PATCH] Unbundle opam dependencies Ludovic Courtès
2019-04-10 19:48   ` bug#35150: " Julien Lepiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190404191638.31953-9-julien@lepiller.eu \
    --to=julien@lepiller.eu \
    --cc=35150@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).