Message ID | f12147e60124381318d6f422628c669c081da36d.1708191568.git.marc@mccd.space |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 898B627BBED; Sun, 18 Feb 2024 21:01:38 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id EC12C27BBE9 for <patchwork@mira.cbaines.net>; Sun, 18 Feb 2024 21:01:37 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1rboHr-0007m9-GJ; Sun, 18 Feb 2024 16:01:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rblhY-0005tH-Kh for guix-patches@gnu.org; Sun, 18 Feb 2024 13:15:44 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rblhY-0001Ke-Cx for guix-patches@gnu.org; Sun, 18 Feb 2024 13:15:44 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rblhq-0002Rn-OU; Sun, 18 Feb 2024 13:16:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69185] [PATCH master] gnu: ocaml: Update to 5.1.1 Resent-From: Marc Coquand <marc@mccd.space> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: julien@lepiller.eu, pukkamustard@posteo.net, guix-patches@gnu.org Resent-Date: Sun, 18 Feb 2024 18:16:02 +0000 Resent-Message-ID: <handler.69185.B.17082801509377@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 69185 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69185@debbugs.gnu.org Cc: Marc Coquand <marc@mccd.space>, Julien Lepiller <julien@lepiller.eu>, pukkamustard <pukkamustard@posteo.net> X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Julien Lepiller <julien@lepiller.eu>, pukkamustard <pukkamustard@posteo.net> Received: via spool by submit@debbugs.gnu.org id=B.17082801509377 (code B ref -1); Sun, 18 Feb 2024 18:16:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 Feb 2024 18:15:50 +0000 Received: from localhost ([127.0.0.1]:36897 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1rblhd-0002R8-Jv for submit@debbugs.gnu.org; Sun, 18 Feb 2024 13:15:50 -0500 Received: from lists.gnu.org ([209.51.188.17]:53956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <marc@mccd.space>) id 1rblQS-0001mW-Cl for submit@debbugs.gnu.org; Sun, 18 Feb 2024 12:58:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <marc@mccd.space>) id 1rbOf0-0003kj-ND for guix-patches@gnu.org; Sat, 17 Feb 2024 12:39:34 -0500 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <marc@mccd.space>) id 1rbOey-0003CX-Sz for guix-patches@gnu.org; Sat, 17 Feb 2024 12:39:34 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id A828A32002E8; Sat, 17 Feb 2024 12:39:29 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sat, 17 Feb 2024 12:39:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mccd.space; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to; s=fm3; t=1708191569; x=1708277969; bh=eG97m8YnvgRTspWryuBmS 7yaN2Ia7p5G/KeiHS43zM4=; b=wBcK+uxdGDHYMRI//TMO0WB2ww1iP+xX3ZDaO TzmmCqMq9+9/LfpQmPk67+iy9g3wrznjSRMyvLLCbWZwE8j5qbGOvXgsgpxUaC+V O1hmLzG1A/cfltLWHdelj2NZNO/O0S6CnACm+EGU7eGVvU58coz4S1j4nm9PCr8A k+itdi9NsHzIhxr5p2ISAl3LeZl0lKQZ+xKULHOFPP5abN8D3UUTRLJqMiQX6dx6 CUeyFFhZHxB0LiSUlNrcNA2X3tMwKzLkpQxkDggNe4Of1thkR68F7temLiCJ5kxO C5KaNWKcdVKBXjhpdheyQzFxtIk6xH1sU06M31/kcqM7b3axA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1708191569; x=1708277969; bh=eG97m8YnvgRTspWryuBmS7yaN2Ia 7p5G/KeiHS43zM4=; b=hbNpEgT1sWNUirSXezBDd77FbQ5ak6v/6RklOJX5sAxM ognkkzhj/2gciwKSY8lIwBs/ThAXm3GOE9i0bw22h34GdDBiadnkpbHtY0vIqXhB frpTobpWmEP8FmHYdLkRwzNNNM+InofYJqQoTBv4zkfLRWYWxXFp02ZU1YmTRFyx bxBgt9hvIuXrb8piq5a3XMVOid7CB2/HrBoorDPF6BlIRm8QFlm5KYSivSfo4vXz YvD7Hga3VaZCUBYzXrk5iYifPdj+RwBdS8omYMB0KVSnfaFwwAQa9A0vUg+J3e9c KRpWybBLpDdbJg4dOGX0PvIp2DNZWQfNfvQHC/0cSg== X-ME-Sender: <xms:UO_QZZbLlU94JRmHk5enntV-D1E1ii4jIBjwNAdzUBZZy1eg48kVEA> <xme:UO_QZQaP7oEGKj7WTQJBOgyZgn-zUhLiJYhbzG4g_uwzba64nN2rjYBZcRbI9DLr4 bxgtv_hSQ33j4sz4uo> X-ME-Received: <xmr:UO_QZb-h-qs7vMK66AS9Fj0FrN_QXXNfLSnFp_WCDTKDhv9MmOvoylC7z0ijv3hCeO_VSXTBmQ> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdeggddutdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvfevufffkffoggfgsedtkeertd ertddtnecuhfhrohhmpeforghrtgcuvehoqhhurghnugcuoehmrghrtgesmhgttggurdhs phgrtggvqeenucggtffrrghtthgvrhhnpefgvdetvdffiefgvdfhhfejvedujeeutddvje ffgefhudehveehlefgveduuedvvdenucffohhmrghinhepghhithhhuhgsrdgtohhmpdho tggrmhhlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepmhgrrhgtsehmtggtugdrshhprggtvg X-ME-Proxy: <xmx:UO_QZXrk_2kiwZN307ZiVK9ij09OrJa4pcjJKoV0KjAU4DlR7wcoNw> <xmx:UO_QZUqo9bGyh4O_GtQjRmXP2_ZTZJjdPSjWR78yOSHMOY151mhdQA> <xmx:UO_QZdS_6UtxyJ89hQddZAY5zep9zEn4zJNUGFNCWaL4H-vWzG7oxQ> <xmx:Ue_QZRBF3X-gKrxGY43IZfc5MwxQ-fW_sRI3CYhDZpX8vY_rqBVfGA> Feedback-ID: ia2d149fd:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 17 Feb 2024 12:39:28 -0500 (EST) From: Marc Coquand <marc@mccd.space> Date: Sat, 17 Feb 2024 11:39:29 -0600 Message-ID: <f12147e60124381318d6f422628c669c081da36d.1708191568.git.marc@mccd.space> X-Mailer: git-send-email 2.43.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=64.147.123.21; envelope-from=marc@mccd.space; helo=wout5-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 18 Feb 2024 13:15:48 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Sun, 18 Feb 2024 16:01:21 -0500 X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches |
Series |
[bug#69185,master] gnu: ocaml: Update to 5.1.1
|
|
Commit Message
Marc Coquand
Feb. 17, 2024, 5:39 p.m. UTC
* gnu/packages/ocaml.scm (ocaml): Update to 5.1.1 Change-Id: Ie95f2e31185a5f5ef345839d357d5768e4299fcc --- gnu/packages/ocaml.scm | 56 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) base-commit: 3cf199dbcf85a44fa8370e786e568fc3feb7067c
Comments
Thanks! I wonder how useful the OCaml compiler itself is without a `package-with-ocaml5.1` transformation? The `ocaml` package itself just provides the compiler but no nice way (afaik) of using the compiler with dependencies and all. Do you think it would make sense to add a `package-with-ocaml5.1` transformation in `(guix build-system ocaml)`? Maybe even better we can replace the OCaml 5.0 compiler with a newer version. The only packages depending on ocaml-5.0 are ocaml5.0-merlin and ocaml5.0-eio. They could be updated to use a newer OCaml version. Maybe no point in keeping OCaml 5.0 around. What do you think? -pukkamustard Marc Coquand <marc@mccd.space> writes: > * gnu/packages/ocaml.scm (ocaml): Update to 5.1.1 > > Change-Id: Ie95f2e31185a5f5ef345839d357d5768e4299fcc > --- > gnu/packages/ocaml.scm | 56 ++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 56 insertions(+) > > diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm > index 0f4c351141..f7b9f9b81a 100644 > --- a/gnu/packages/ocaml.scm > +++ b/gnu/packages/ocaml.scm > @@ -191,6 +191,62 @@ (define-public camlboot > This package produces a native @command{ocamlc} and a bytecode @command{ocamllex}.") > (license license:expat)))) > > +(define-public ocaml-5.1 > + (package > + (name "ocaml") > + (version "5.1.1") > + (source > + (origin > + (method git-fetch) > + (uri (git-reference > + (url "https://github.com/ocaml/ocaml") > + (commit version))) > + (file-name (git-file-name name version)) > + (sha256 > + (base32 "19sjc8r2c78y7g47jjxb1c30zzvkdhgy8yp3i1kkz1hm6nj96adr")))) > + (build-system gnu-build-system) > + (native-search-paths > + (list (search-path-specification > + (variable "OCAMLPATH") > + (files (list "lib/ocaml" "lib/ocaml/site-lib"))) > + (search-path-specification > + (variable "CAML_LD_LIBRARY_PATH") > + (files (list "lib/ocaml/site-lib/stubslibs" > + "lib/ocaml/site-lib/stublibs"))))) > + (native-inputs (list perl pkg-config)) > + (inputs (list libx11 libiberty ;needed for objdump support > + zlib)) ;also needed for objdump support > + (arguments > + `(#:configure-flags '("--enable-ocamltest") > + #:test-target "tests" > + #:make-flags '("defaultentry") > + #:phases (modify-phases %standard-phases > + (add-after 'unpack 'patch-/bin/sh-references > + (lambda* (#:key inputs #:allow-other-keys) > + (let* ((sh (search-input-file inputs "/bin/sh")) > + (quoted-sh (string-append "\"" sh "\""))) > + (with-fluids ((%default-port-encoding #f)) > + (for-each (lambda (file) > + (substitute* file > + (("\"/bin/sh\"") > + (begin > + (format (current-error-port) > + "patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%" > + file quoted-sh) > + quoted-sh)))) > + (find-files "." "\\.ml$"))))))))) > + (home-page "https://ocaml.org/") > + (synopsis "The OCaml programming language") > + (description > + "OCaml is a general purpose industrial-strength programming language with > +an emphasis on expressiveness and safety. Developed for more than 20 years at > +Inria it benefits from one of the most advanced type systems and supports > +functional, imperative and object-oriented styles of programming.") > + ;; The compiler is distributed under qpl1.0 with a change to choice of > + ;; law: the license is governed by the laws of France. The library is > + ;; distributed under lgpl2.0. > + (license (list license:qpl license:lgpl2.0)))) > + > (define-public ocaml-5.0 > (package > (name "ocaml") > > base-commit: 3cf199dbcf85a44fa8370e786e568fc3feb7067c
Marc Coquand <marc@mccd.space> writes: >> Do you think it would make sense to add a >> `package-with-ocaml5.1` transformation in `(guix build-system ocaml)`? > > Absolutely, or replace the ocaml5.0 one. > >> Maybe even better we can replace the OCaml 5.0 compiler with a newer >> version. The only packages depending on ocaml-5.0 are ocaml5.0-merlin >> and ocaml5.0-eio. They could be updated to use a newer OCaml >> version. Maybe no point in keeping OCaml 5.0 around. What do you think? > > I see there is also in packages/ocaml.scm: > > - ocaml5.0-merlin-reader > - ocaml5.0-ppx-expect > - ocaml5.0-dune-bootstrap > - ocaml5.0-crowbar > - ocaml5.0-findlib > > I assume that if we replace the old 5.0 version, we would need to bump > these packages as well, since they use Ocaml 5.0? Yes. > I am relatively new to software packaging, so I do not know what best > practice is here: if it is best to replace the old version or create an > entry for the new version. Hm, I'd say it's good to keep versions around that are being used by other packages in Guix or it is a version where we can assume that significant amount of people are using it from Guix for things outside of Guix. I think OCaml 5.0 is neither: - The ocaml5.0-* packages are mostly to get a working development environment (ocaml5.0-merlin and dependencies). - Our ocaml5.0-eio is outdated and the recently released Eio 1.0.0 only supports OCaml 5.1.1 or later. - There's not much reason to use OCaml 5.0 when OCaml 5.1 is available. I'd suggest replacing OCaml 5.0 with OCaml 5.1 in Guix. Happy hacking! -pukkamustard > pukkamustard <pukkamustard@posteo.net> writes: > >> Thanks! >> >> I wonder how useful the OCaml compiler itself is without a >> `package-with-ocaml5.1` transformation? The `ocaml` package itself just >> provides the compiler but no nice way (afaik) of using the compiler with >> dependencies and all. Do you think it would make sense to add a >> `package-with-ocaml5.1` transformation in `(guix build-system ocaml)`? >> >> Maybe even better we can replace the OCaml 5.0 compiler with a newer >> version. The only packages depending on ocaml-5.0 are ocaml5.0-merlin >> and ocaml5.0-eio. They could be updated to use a newer OCaml >> version. Maybe no point in keeping OCaml 5.0 around. What do you think? >> >> -pukkamustard >> >> >> Marc Coquand <marc@mccd.space> writes: >> >>> * gnu/packages/ocaml.scm (ocaml): Update to 5.1.1 >>> >>> Change-Id: Ie95f2e31185a5f5ef345839d357d5768e4299fcc >>> --- >>> gnu/packages/ocaml.scm | 56 ++++++++++++++++++++++++++++++++++++++++++ >>> 1 file changed, 56 insertions(+) >>> >>> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm >>> index 0f4c351141..f7b9f9b81a 100644 >>> --- a/gnu/packages/ocaml.scm >>> +++ b/gnu/packages/ocaml.scm >>> @@ -191,6 +191,62 @@ (define-public camlboot >>> This package produces a native @command{ocamlc} and a bytecode @command{ocamllex}.") >>> (license license:expat)))) >>> >>> +(define-public ocaml-5.1 >>> + (package >>> + (name "ocaml") >>> + (version "5.1.1") >>> + (source >>> + (origin >>> + (method git-fetch) >>> + (uri (git-reference >>> + (url "https://github.com/ocaml/ocaml") >>> + (commit version))) >>> + (file-name (git-file-name name version)) >>> + (sha256 >>> + (base32 "19sjc8r2c78y7g47jjxb1c30zzvkdhgy8yp3i1kkz1hm6nj96adr")))) >>> + (build-system gnu-build-system) >>> + (native-search-paths >>> + (list (search-path-specification >>> + (variable "OCAMLPATH") >>> + (files (list "lib/ocaml" "lib/ocaml/site-lib"))) >>> + (search-path-specification >>> + (variable "CAML_LD_LIBRARY_PATH") >>> + (files (list "lib/ocaml/site-lib/stubslibs" >>> + "lib/ocaml/site-lib/stublibs"))))) >>> + (native-inputs (list perl pkg-config)) >>> + (inputs (list libx11 libiberty ;needed for objdump support >>> + zlib)) ;also needed for objdump support >>> + (arguments >>> + `(#:configure-flags '("--enable-ocamltest") >>> + #:test-target "tests" >>> + #:make-flags '("defaultentry") >>> + #:phases (modify-phases %standard-phases >>> + (add-after 'unpack 'patch-/bin/sh-references >>> + (lambda* (#:key inputs #:allow-other-keys) >>> + (let* ((sh (search-input-file inputs "/bin/sh")) >>> + (quoted-sh (string-append "\"" sh "\""))) >>> + (with-fluids ((%default-port-encoding #f)) >>> + (for-each (lambda (file) >>> + (substitute* file >>> + (("\"/bin/sh\"") >>> + (begin >>> + (format (current-error-port) >>> + "patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%" >>> + file quoted-sh) >>> + quoted-sh)))) >>> + (find-files "." "\\.ml$"))))))))) >>> + (home-page "https://ocaml.org/") >>> + (synopsis "The OCaml programming language") >>> + (description >>> + "OCaml is a general purpose industrial-strength programming language with >>> +an emphasis on expressiveness and safety. Developed for more than 20 years at >>> +Inria it benefits from one of the most advanced type systems and supports >>> +functional, imperative and object-oriented styles of programming.") >>> + ;; The compiler is distributed under qpl1.0 with a change to choice of >>> + ;; law: the license is governed by the laws of France. The library is >>> + ;; distributed under lgpl2.0. >>> + (license (list license:qpl license:lgpl2.0)))) >>> + >>> (define-public ocaml-5.0 >>> (package >>> (name "ocaml") >>> >>> base-commit: 3cf199dbcf85a44fa8370e786e568fc3feb7067c
Hello pukkamustard, pukkamustard <pukkamustard@posteo.net> skribis: > Hm, I'd say it's good to keep versions around that are being used by > other packages in Guix or it is a version where we can assume that > significant amount of people are using it from Guix for things outside > of Guix. > > I think OCaml 5.0 is neither: > > - The ocaml5.0-* packages are mostly to get a working development > environment (ocaml5.0-merlin and dependencies). > - Our ocaml5.0-eio is outdated and the recently released Eio 1.0.0 only > supports OCaml 5.1.1 or later. > - There's not much reason to use OCaml 5.0 when OCaml 5.1 is available. > > I'd suggest replacing OCaml 5.0 with OCaml 5.1 in Guix. Can removing 5.0 be done in a followup patch? Should we apply this patch in this meantime, or would you suggest adjusting it beforehand? Thanks, Ludo’.
Hi Ludo`, Ludovic Courtès <ludo@gnu.org> writes: > > Can removing 5.0 be done in a followup patch? Should we apply this > patch in this meantime, or would you suggest adjusting it beforehand? > Yes, that can be done. Might even be good to keep the update to 5.1.1 in two smaller patche sets (one to add 5.1.1, one to remove 5.0.0). I would suggest adding a package-with-ocaml5.1 transformation to this patch series (as dependencies probably ocaml5.1-findlib and ocaml5.1-dune). This would make the new compiler more directly usable and would help in testing the new compiler for OCaml packages already in Guix. -pukkamustard
Hello, pukkamustard <pukkamustard@posteo.net> skribis: > I would suggest adding a package-with-ocaml5.1 transformation to this > patch series (as dependencies probably ocaml5.1-findlib and > ocaml5.1-dune). This would make the new compiler more directly usable > and would help in testing the new compiler for OCaml packages already in > Guix. Marc, could you look into adding this? (I’m not on the OCaml team but I Cc’d Julien who’s one of them. If Julien is unavailable and pukkamustard gives a green light, I can apply the revised patch on their behalf.) Ludo’.
Hey! I'll have a look at this when I have time, hopefully tomorrow or end of the week. :) Sincerely, Marc Ludovic Courtès <ludo@gnu.org> writes: > Hello, > > pukkamustard <pukkamustard@posteo.net> skribis: > >> I would suggest adding a package-with-ocaml5.1 transformation to this >> patch series (as dependencies probably ocaml5.1-findlib and >> ocaml5.1-dune). This would make the new compiler more directly usable >> and would help in testing the new compiler for OCaml packages already in >> Guix. > > Marc, could you look into adding this? > > (I’m not on the OCaml team but I Cc’d Julien who’s one of them. If > Julien is unavailable and pukkamustard gives a green light, I can apply > the revised patch on their behalf.) > > Ludo’.
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 0f4c351141..f7b9f9b81a 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -191,6 +191,62 @@ (define-public camlboot This package produces a native @command{ocamlc} and a bytecode @command{ocamllex}.") (license license:expat)))) +(define-public ocaml-5.1 + (package + (name "ocaml") + (version "5.1.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ocaml/ocaml") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "19sjc8r2c78y7g47jjxb1c30zzvkdhgy8yp3i1kkz1hm6nj96adr")))) + (build-system gnu-build-system) + (native-search-paths + (list (search-path-specification + (variable "OCAMLPATH") + (files (list "lib/ocaml" "lib/ocaml/site-lib"))) + (search-path-specification + (variable "CAML_LD_LIBRARY_PATH") + (files (list "lib/ocaml/site-lib/stubslibs" + "lib/ocaml/site-lib/stublibs"))))) + (native-inputs (list perl pkg-config)) + (inputs (list libx11 libiberty ;needed for objdump support + zlib)) ;also needed for objdump support + (arguments + `(#:configure-flags '("--enable-ocamltest") + #:test-target "tests" + #:make-flags '("defaultentry") + #:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-/bin/sh-references + (lambda* (#:key inputs #:allow-other-keys) + (let* ((sh (search-input-file inputs "/bin/sh")) + (quoted-sh (string-append "\"" sh "\""))) + (with-fluids ((%default-port-encoding #f)) + (for-each (lambda (file) + (substitute* file + (("\"/bin/sh\"") + (begin + (format (current-error-port) + "patch-/bin/sh-references: ~a: changing `\"/bin/sh\"' to `~a'~%" + file quoted-sh) + quoted-sh)))) + (find-files "." "\\.ml$"))))))))) + (home-page "https://ocaml.org/") + (synopsis "The OCaml programming language") + (description + "OCaml is a general purpose industrial-strength programming language with +an emphasis on expressiveness and safety. Developed for more than 20 years at +Inria it benefits from one of the most advanced type systems and supports +functional, imperative and object-oriented styles of programming.") + ;; The compiler is distributed under qpl1.0 with a change to choice of + ;; law: the license is governed by the laws of France. The library is + ;; distributed under lgpl2.0. + (license (list license:qpl license:lgpl2.0)))) + (define-public ocaml-5.0 (package (name "ocaml")