From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id GEpwAEfvkGBLRgAAgWs5BA (envelope-from ) for ; Tue, 04 May 2021 08:52:55 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id gOyNN0bvkGB5bAAAbx9fmQ (envelope-from ) for ; Tue, 04 May 2021 06:52:54 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E943A37AE0 for ; Tue, 4 May 2021 08:52:53 +0200 (CEST) Received: from localhost ([::1]:56710 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldovM-0001Dm-NT for larch@yhetil.org; Tue, 04 May 2021 02:52:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36006) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ldoJn-0005Bj-7F for guix-patches@gnu.org; Tue, 04 May 2021 02:14:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39502) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ldoJm-0006a2-Tn for guix-patches@gnu.org; Tue, 04 May 2021 02:14:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ldoJm-00050W-Pc for guix-patches@gnu.org; Tue, 04 May 2021 02:14:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#45558] [PATCH] Add js_of_ocaml Resent-From: pukkamustard Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 04 May 2021 06:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45558 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: divoplade Cc: 45558@debbugs.gnu.org, 47769@debbugs.gnu.org X-Debbugs-Original-Cc: 45558@debbugs.gnu.org, 47769@debbugs.gnu.org, guix-patches@gnu.org Received: via spool by 45558-submit@debbugs.gnu.org id=B45558.162010878819201 (code B ref 45558); Tue, 04 May 2021 06:14:02 +0000 Received: (at 45558) by debbugs.gnu.org; 4 May 2021 06:13:08 +0000 Received: from localhost ([127.0.0.1]:51037 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldoIq-0004zY-5W for submit@debbugs.gnu.org; Tue, 04 May 2021 02:13:08 -0400 Received: from mout02.posteo.de ([185.67.36.66]:38093) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ldoIk-0004z6-Kh for 45558@debbugs.gnu.org; Tue, 04 May 2021 02:13:02 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id 81E0B240101 for <45558@debbugs.gnu.org>; Tue, 4 May 2021 08:12:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1620108772; bh=A+JmP9LB9GU5SGyE4lD177yuljc2RzgQTR9Pxi9uusk=; h=From:To:Cc:Subject:Date:From; b=i5aZtJv+Jew5zZgB9kxftmtnSN92vF2jW2CbMRGmk7xFgkDDsirEk5GHoHXfRnACP RVBJCdFjH0ry4yLQUyiykJp9OShYabR1LS9Qsf9XcrjMnv6sgPHyzCDS5TrsWCNEPp GWz/qO8H4bfMkJ9duky7a8uFvFdYV7UMeyGJkbXP91RLM04ZaKF6DLThhIQknmfMsx zKaLba8eOGFC7ObNvFC5krZvTOqHlWPMDHTvQILrvPiOwXSIMLzKojkcYmcGfCQH7U 6HyEKzoqQU64ZT8BS7MNfqU1PjnEe2uBzp0Uz+7AeKNeTjYPEzvrWHzDix4YtgX1hc yihmmIxNhcx5g== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FZ8dv1JL0z9rxP; Tue, 4 May 2021 08:12:50 +0200 (CEST) References: <559a908f91e39af40a1580447a708209785c69b8.camel@divoplade.fr> From: pukkamustard Date: Mon, 03 May 2021 12:38:13 +0000 In-reply-to: <559a908f91e39af40a1580447a708209785c69b8.camel@divoplade.fr> Message-ID: <86im3z9gdd.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620111174; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=j2PP22O4gcmTTr37PNJBy7+tLqQjWsWsO4+LxxzK3wI=; b=f2GUbbf96stEL0q30FwMyOUE1FKFM/wh8mJslQmYYcQQIeNMtCTrYB5xmFJjzLf/Mgq1A+ ym/HJ3Oyq6E3r26sadyq5RAktoLLdnBFueDBbHeMOqF1WhRftbb+gA130KY6BGVpjTNKq1 sRqexeJ7YbTZIUrtYq5nfrRGYCz+QFuzRSp4EIJ0EgyPXUOY9jz2MT6MlPv8xhaNuvcu2Q 59gEpUHRwea8jfEAUtNY9Lq/AY/C4TqvE0WmRLzV5yW6TalVKbQS8qojF2FLrIASo350Ye v2om0SnoM4Ydeof+dEgHD7/c5MNCkpEMzo/SxAC/mjElVrKPvxNyVj+sCWsEBg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620111174; a=rsa-sha256; cv=none; b=EOWBI3Q1+QusjyXjrG6N2Xrwi+U7U5088L6mBV/qHYfppMsvTqw51zajImfg8HsQwIAlXN r/5qpr6NgWbjKofXwsJeI+SyuA3dd3mq3eaSr2W/nilWe/qR1L0HU5nxRtQ7eMBNmnjebt AFgLyM3GTaUJuiI63DxxOzcZPhpXUU3KOzwsvkBmRRsLBHDt5CStWUGG0Nz0zgGzhsmQgC kMd5FeUNs+maNmlYyFcWEZvRUMtWIdKggO5u4PXSfGcVQpWO/ZFBri12/FaBmizNJvHKHz JUNx4LXVixgp1W4EsS+NHClHWUUU77VvTSHpDE/yU0AA/sW5jJJaKvU0PNQCAA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=i5aZtJv+; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.36 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.net header.s=2017 header.b=i5aZtJv+; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: E943A37AE0 X-Spam-Score: -1.36 X-Migadu-Scanner: scn0.migadu.com X-TUID: Xi2jtnw7GNeW --=-=-= Content-Type: text/plain; format=flowed Hi divoplade, divoplade writes: > I finally got js_of_ocaml packaged. Thank you! > I'm not sure I did everything correctly (especially indentation There do seem to be some indentation issues. Have you seen the section "Formatting Code" in the Guix manual? There is also a little script in the guix repository that will automatically indent a package definition. Also your commit logs don't seem to be exactly in the required format. For example: "gnu: add ocaml-ppxlib" should be "gnu: Add ocaml-ppxlib.". Check the section "Submitting Patches" in the Guix manual and also the commit history for examples. There are also some things that the linter discovers. For example you can omit the ".git" suffix for GitHub sources or that pkg-config is not needed in ocaml-graphics. You can run `git lint PACKAGE` too see what the linter has to say (and maybe should do that for modified package definitions). > , but also how to make non-4.07 packages This looks ok. I submitted a series of patches that does this for many OCaml packages including the ones included in your series (https://issues.guix.gnu.org/47768). I'm sorry I should have included your work in my patch series instead of duplicating. Maybe a small difference is that the patches in #47769 include a more recent version of ocaml-ppxlib (and the required version of ocaml-migrate-parsetree). I have updated your patches for ocaml-graphics and js_of_ocaml so that they can be applied on #47769. Some changes in the attached patches: ocaml-graphics: - Use version 5.1.1 instead of 5.1.0 (5.1.1 was released after you submitted the patches) - Remove unnecessary inputs - Change git-reference url to homepage (GitHub without the ".git" suffix) - Minor changes to description too make linter happy ocaml-js-of-ocaml: - Set home-page to https://ocsigen.org/js_of_ocaml/ - Use version 3.9.0 instead of 3.8.0 (again released after you submitted the patches) - Enable source maps by including ocaml-yojson as input - Enable tests (this requires ocaml-ppx-expect, ocaml-ppx-variants-conv, ocaml-variantslib and an updated version of ocaml-num) --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-Add-ocaml-graphics.patch >From ef943e9e01e979a3de7c84d88d5f8d3d6535da9a Mon Sep 17 00:00:00 2001 From: divoplade Date: Wed, 30 Dec 2020 19:06:57 +0100 Subject: [PATCH 1/6] gnu: Add ocaml-graphics. * gnu/packages/ocaml.scm (ocaml-graphics): New variable. Co-Authored-By: pukkamustard --- gnu/packages/ocaml.scm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index c390a8bce9..4727b294d9 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -6900,3 +6900,29 @@ Both interfaces give the user total control over the blocking behavior of their application, with the unbuffered interface enabling zero-copy IO. Parsers are backtracking by default and support unbounded lookahead.") (license license:bsd-3))) + +(define-public ocaml-graphics + (package + (name "ocaml-graphics") + (version "5.1.1") + (home-page "https://github.com/ocaml/graphics") + (source + (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "14w07ydji2nbdk366nfp2pzs9484xp9vqv63n345id13v48z8bfi")))) + (build-system dune-build-system) + (propagated-inputs + `(("libx11" ,libx11))) + (synopsis "The OCaml graphics library") + (description + "The graphics library provides a set of portable drawing primitives. +Drawing takes place in a separate window that is created when +Graphics.open_graph is called. This library used to be distributed with OCaml +up to OCaml 4.08.") + (license license:lgpl2.1+))) -- 2.31.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0002-gnu-Add-ocaml-variantslib.patch >From 96f9bb75aa9a401f353619d112e414eab2745db1 Mon Sep 17 00:00:00 2001 From: pukkamustard Date: Mon, 3 May 2021 22:49:23 +0200 Subject: [PATCH 2/6] gnu: Add ocaml-variantslib. * gnu/packages/ocaml.scm (ocaml-variantslib): New variable. (ocaml4.07-variantslib): Inherit from ocaml-variantslib. --- gnu/packages/ocaml.scm | 52 ++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 22 deletions(-) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 4727b294d9..e40bc78db2 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -5137,37 +5137,45 @@ of a record and create new record values.") "12948pzxrl360lybm9fzyvplgcl87zjbn4m3sk1aw75zk85p1388")) (properties `((upstream-name . "fieldslib")))))) -(define-public ocaml4.07-variantslib +(define-public ocaml-variantslib (package - (name "ocaml4.07-variantslib") - (version "0.11.0") - (source (origin - (method url-fetch) - (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v" - (version-major+minor version) - "/files/variantslib-v" version ".tar.gz")) - (sha256 - (base32 - "1hsdwmkslvk4cznqr4lyyiy7vvk5spil226k0z2in26fxq6y0hf3")))) + (name "ocaml-variantslib") + (version "0.14.0") + (source + (janestreet-origin "variantslib" version + "11zp27gh282dx9ifbhcp6i7fkc97fvk8amaj58mf1g1hwklc0lm3")) (build-system dune-build-system) (arguments ;; No tests - `(#:tests? #f - #:ocaml ,ocaml-4.07 - #:findlib ,ocaml4.07-findlib - #:dune ,ocaml4.07-dune)) + `(#:tests? #f)) (propagated-inputs - `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base)) - ("ocaml-migrate-parsetree" - ,(package-with-ocaml4.07 ocaml-migrate-parsetree)) - ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib)))) - (properties `((upstream-name . "variantslib"))) + `(("ocaml-base" ,ocaml-base) + ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree) + ("ocaml-ppxlib" ,ocaml-ppxlib))) + (properties `((upstream-name . "variantslib") + (ocaml4.07-variant . ,(delay ocaml4.07-variantslib)))) (home-page "https://github.com/janestreet/variantslib") (synopsis "OCaml variants as first class values") (description "The Core suite of libraries is an alternative to OCaml's standard library.") (license license:asl2.0))) +(define-public ocaml4.07-variantslib + (package-with-ocaml4.07 + (package + (inherit ocaml-variantslib) + (name "ocaml-variantslib") + (version "0.11.0") + (source (origin + (method url-fetch) + (uri (string-append "https://ocaml.janestreet.com/ocaml-core/v" + (version-major+minor version) + "/files/variantslib-v" version ".tar.gz")) + (sha256 + (base32 + "1hsdwmkslvk4cznqr4lyyiy7vvk5spil226k0z2in26fxq6y0hf3")))) + (properties `((upstream-name . "variantslib")))))) + (define-public ocaml-ppx-fields-conv (package (name "ocaml-ppx-fields-conv") @@ -5268,7 +5276,7 @@ definitions.") (build-system dune-build-system) (propagated-inputs `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base)) - ("ocaml-variantslib" ,ocaml4.07-variantslib) + ("ocaml-variantslib" ,(package-with-ocaml4.07 ocaml-variantslib)) ("ocaml-migrate-parsetree" ,(package-with-ocaml4.07 ocaml-migrate-parsetree)) ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib)))) @@ -6312,7 +6320,7 @@ standard library that was developed by Jane Street.") ("ocaml-splittable-random" ,ocaml4.07-splittable-random) ("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio)) ("ocaml-typerep" ,ocaml4.07-typerep) - ("ocaml-variantslib" ,ocaml4.07-variantslib) + ("ocaml-variantslib" ,(package-with-ocaml4.07 ocaml-variantslib)) ("ocaml-migrate-parsetree" ,(package-with-ocaml4.07 ocaml-migrate-parsetree)))) (properties `((upstream-name . "core_kernel"))) -- 2.31.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0003-gnu-Add-ocaml-ppx-variants-conv.patch >From 4753a6bf81c13af58a866782c8b63bbf035c9bd3 Mon Sep 17 00:00:00 2001 From: pukkamustard Date: Mon, 3 May 2021 22:42:10 +0200 Subject: [PATCH 3/6] gnu: Add ocaml-ppx-variants-conv. * gnu/packages/ocaml.scm (ocaml-ppx-variants-conv): New variable. (ocaml4.07-ppx-variants-conv): Inherit from ocaml-ppx-variants-conv. --- gnu/packages/ocaml.scm | 65 ++++++++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 25 deletions(-) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index e40bc78db2..019bfea9f9 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -5260,32 +5260,29 @@ definitions.") "0pqwnqy1xp309wvdcaax4lg02yk64lq2w03mbgfvf6ps5ry4gis9")))) (properties `((upstream-name . "ppx_sexp_conv")))))) -(define-public ocaml4.07-ppx-variants-conv +(define-public ocaml-ppx-variants-conv (package - (name "ocaml4.07-ppx-variants-conv") - (version "0.11.1") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/janestreet/ppx_variants_conv") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1yc0gsds5m2nv39zga8nnrca2n75rkqy5dz4xj1635ybz20hhbjd")))) + (name "ocaml-ppx-variants-conv") + (version "0.14.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/janestreet/ppx_variants_conv") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0q6a43zrwqzdz7aja0k44a2llyjjj5xzi2kigwhsnww3g0r5ig84")))) (build-system dune-build-system) (propagated-inputs - `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base)) - ("ocaml-variantslib" ,(package-with-ocaml4.07 ocaml-variantslib)) - ("ocaml-migrate-parsetree" - ,(package-with-ocaml4.07 ocaml-migrate-parsetree)) - ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib)))) - (arguments - `(#:ocaml ,ocaml-4.07 - #:findlib ,ocaml4.07-findlib - #:dune ,ocaml4.07-dune)) + `(("ocaml-base" ,ocaml-base) + ("ocaml-variantslib" ,ocaml-variantslib) + ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree) + ("ocaml-ppxlib" ,ocaml-ppxlib))) (properties - `((upstream-name . "ppx_variants_conv"))) + `((upstream-name . "ppx_variants_conv") + (ocaml4.07-variant . ,(delay ocaml4.07-ppx-variants-conv)))) (home-page "https://github.com/janestreet/ppx_variants_conv") (synopsis "Generation of accessor and iteration functions for OCaml variant types") @@ -5294,6 +5291,24 @@ definitions.") variant types.") (license license:asl2.0))) +(define-public ocaml4.07-ppx-variants-conv + (package-with-ocaml4.07 + (package + (inherit ocaml-ppx-variants-conv) + (name "ocaml-ppx-variants-conv") + (version "0.11.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/janestreet/ppx_variants_conv") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1yc0gsds5m2nv39zga8nnrca2n75rkqy5dz4xj1635ybz20hhbjd")))) + (properties `((upstream-name . "ppx_variants_conv")))))) + (define-public ocaml-ppx-custom-printf (package (name "ocaml-ppx-custom-printf") @@ -5352,7 +5367,7 @@ string conversion.") ("ocaml-ppx-custom-printf" ,(package-with-ocaml4.07 ocaml-ppx-custom-printf)) ("ocaml-ppx-fields-conv" ,(package-with-ocaml4.07 ocaml-ppx-fields-conv)) ("ocaml-ppx-sexp-conv" ,(package-with-ocaml4.07 ocaml-ppx-sexp-conv)) - ("ocaml-ppx-variants-conv" ,ocaml4.07-ppx-variants-conv) + ("ocaml-ppx-variants-conv" ,(package-with-ocaml4.07 ocaml-ppx-variants-conv)) ("ocaml-migrate-parsetree" ,(package-with-ocaml4.07 ocaml-migrate-parsetree)))) (arguments @@ -5888,7 +5903,7 @@ useful errors on failure.") ("ocaml-ppx-here" ,(package-with-ocaml4.07 ocaml-ppx-here)) ("ocaml-ppx-inline-test" ,(package-with-ocaml4.07 ocaml-ppx-inline-test)) ("ocaml-ppx-sexp-conv" ,(package-with-ocaml4.07 ocaml-ppx-sexp-conv)) - ("ocaml-ppx-variants-conv" ,ocaml4.07-ppx-variants-conv) + ("ocaml-ppx-variants-conv" ,(package-with-ocaml4.07 ocaml-ppx-variants-conv)) ("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio)) ("ocaml-migrate-parsetree" ,(package-with-ocaml4.07 ocaml-migrate-parsetree)) @@ -6088,7 +6103,7 @@ functions from type definitions.") ("ocaml-ppx-sexp-message" ,ocaml4.07-ppx-sexp-message) ("ocaml-ppx-sexp-value" ,ocaml4.07-ppx-sexp-value) ("ocaml-ppx-typerep-conv" ,ocaml4.07-ppx-typerep-conv) - ("ocaml-ppx-variants-conv" ,ocaml4.07-ppx-variants-conv) + ("ocaml-ppx-variants-conv" ,(package-with-ocaml4.07 ocaml-ppx-variants-conv)) ("ocaml-migrate-parsetree" ,(package-with-ocaml4.07 ocaml-migrate-parsetree)) ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib)))) -- 2.31.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0004-gnu-Add-ocaml-ppx-expect.patch >From 332c6ce5b26127f2f324a46489e4c01181de2e57 Mon Sep 17 00:00:00 2001 From: pukkamustard Date: Mon, 3 May 2021 22:32:27 +0200 Subject: [PATCH 4/6] gnu: Add ocaml-ppx-expect. * gnu/packages/ocaml.scm (ocaml-ppx-expect): New variable. (ocaml4.07-ppx-expect): Inherit from ocaml-ppx-expect. --- gnu/packages/ocaml.scm | 83 +++++++++++++++++++++++++----------------- 1 file changed, 49 insertions(+), 34 deletions(-) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 019bfea9f9..c4a024c850 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -3791,7 +3791,7 @@ library is currently designed for Unicode Standard 3.2.") `(("ocaml-result" ,(package-with-ocaml4.07 ocaml-result)) ("ocaml-camomile" ,(package-with-ocaml4.07 ocaml-camomile)))) (native-inputs - `(("ocaml-ppx-expect" ,ocaml4.07-ppx-expect))) + `(("ocaml-ppx-expect" ,(package-with-ocaml4.07 ocaml-ppx-expect)))) (properties `((upstream-name . "charInfo_width"))) (home-page "https://bitbucket.org/zandoye/charinfo_width/") @@ -5876,40 +5876,31 @@ useful errors on failure.") ("ocaml-ppxlib" ,ocaml-ppxlib))) (properties `((upstream-name . "ppx_assert")))))) -(define-public ocaml4.07-ppx-expect +(define-public ocaml-ppx-expect (package - (name "ocaml4.07-ppx-expect") - (version "0.12.0") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/janestreet/ppx_expect") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "1wawsbjfkri4sw52n8xqrzihxc3xfpdicv3ahz83a1rsn4lb8j5q")))) + (name "ocaml-ppx-expect") + (version "0.14.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/janestreet/ppx_expect") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0vbbnjrzpyk5p0js21lafr6fcp2wqka89p1876rdf472cmg0l7fv")))) (build-system dune-build-system) - (arguments - `(#:ocaml ,ocaml-4.07 - #:findlib ,ocaml4.07-findlib - #:dune ,ocaml4.07-dune)) (propagated-inputs - `(("ocaml-base" ,(package-with-ocaml4.07 ocaml-base)) - ("ocaml-ppx-assert" ,(package-with-ocaml4.07 ocaml4.07-ppx-assert)) - ("ocaml-ppx-compare" ,(package-with-ocaml4.07 ocaml-ppx-compare)) - ("ocaml-ppx-custom-printf" ,(package-with-ocaml4.07 ocaml-ppx-custom-printf)) - ("ocaml-ppx-fields-conv" ,(package-with-ocaml4.07 ocaml-ppx-fields-conv)) - ("ocaml-ppx-here" ,(package-with-ocaml4.07 ocaml-ppx-here)) - ("ocaml-ppx-inline-test" ,(package-with-ocaml4.07 ocaml-ppx-inline-test)) - ("ocaml-ppx-sexp-conv" ,(package-with-ocaml4.07 ocaml-ppx-sexp-conv)) - ("ocaml-ppx-variants-conv" ,(package-with-ocaml4.07 ocaml-ppx-variants-conv)) - ("ocaml-stdio" ,(package-with-ocaml4.07 ocaml-stdio)) - ("ocaml-migrate-parsetree" - ,(package-with-ocaml4.07 ocaml-migrate-parsetree)) - ("ocaml-ppxlib" ,(package-with-ocaml4.07 ocaml-ppxlib)) - ("ocaml-re" ,(package-with-ocaml4.07 ocaml-re)))) - (properties `((upstream-name . "ppx_expect"))) + `(("ocaml-base" ,ocaml-base) + ("ocaml-ppx-here" ,ocaml-ppx-here) + ("ocaml-ppx-inline-test" ,ocaml-ppx-inline-test) + ("ocaml-stdio" ,ocaml-stdio) + ("ocaml-ppxlib" ,ocaml-ppxlib) + ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree) + ("ocaml-re" ,ocaml-re))) + (properties `((upstream-name . "ppx_expect") + (ocaml4.07-variant . ,(delay ocaml4.07-ppx-expect)))) (home-page "https://github.com/janestreet/ppx_expect") (synopsis "Cram like framework for OCaml") (description "Expect-test is a framework for writing tests in OCaml, similar @@ -5919,6 +5910,30 @@ output-generating code, interleaved with @code{%expect} extension expressions to denote the expected output.") (license license:asl2.0))) +(define-public ocaml4.07-ppx-expect + (package-with-ocaml4.07 + (package + (inherit ocaml-ppx-expect) + (version "0.12.0") + (source + (janestreet-origin "ppx_expect" version + "1zpci8c49yn2ixchmwjx1kf9pwybv3dnn4l2dgnd6m36qnkralfk")) + (propagated-inputs + `(("ocaml-base" ,ocaml-base) + ("ocaml-ppx-assert" ,ocaml-ppx-assert) + ("ocaml-ppx-compare" ,ocaml-ppx-compare) + ("ocaml-ppx-custom-printf" ,ocaml-ppx-custom-printf) + ("ocaml-ppx-fields-conv" ,ocaml-ppx-fields-conv) + ("ocaml-ppx-here" ,ocaml-ppx-here) + ("ocaml-ppx-inline-test" ,ocaml-ppx-inline-test) + ("ocaml-ppx-sexp-conv" ,ocaml-ppx-sexp-conv) + ("ocaml-ppx-variants-conv" ,ocaml-ppx-variants-conv) + ("ocaml-stdio" ,ocaml-stdio) + ("ocaml-migrate-parsetree" ,ocaml-migrate-parsetree) + ("ocaml-ppxlib" ,ocaml-ppxlib) + ("ocaml-re" ,ocaml-re))) + (properties `((upstream-name . "ppx_expect")))))) + (define-public ocaml-ppx-js-style (package (name "ocaml-ppx-js-style") @@ -6091,7 +6106,7 @@ functions from type definitions.") ("ocaml-ppx-bench" ,ocaml4.07-ppx-bench) ("ocaml-ppx-bin-prot" ,ocaml4.07-ppx-bin-prot) ("ocaml-ppx-custom-printf" ,(package-with-ocaml4.07 ocaml-ppx-custom-printf)) - ("ocaml-ppx-expect" ,ocaml4.07-ppx-expect) + ("ocaml-ppx-expect" ,(package-with-ocaml4.07 ocaml-ppx-expect)) ("ocaml-ppx-fail" ,ocaml4.07-ppx-fail) ("ocaml-ppx-fields-conv" ,(package-with-ocaml4.07 ocaml-ppx-fields-conv)) ("ocaml-ppx-here" ,(package-with-ocaml4.07 ocaml-ppx-here)) @@ -6236,7 +6251,7 @@ Configurator allows one to: #:findlib ,ocaml4.07-findlib #:dune ,ocaml4.07-dune)) (native-inputs - `(("ocaml-ppx-expect" ,ocaml4.07-ppx-expect))) + `(("ocaml-ppx-expect" ,(package-with-ocaml4.07 ocaml-ppx-expect)))) (home-page "https://github.com/janestreet/spawn") (synopsis "Spawning sub-processes") (description -- 2.31.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0005-gnu-ocaml-num-Update-to-1.4.patch >From ac57c989bb2dab51e45561c3faeed8ef5a52cb3a Mon Sep 17 00:00:00 2001 From: pukkamustard Date: Tue, 4 May 2021 07:58:43 +0200 Subject: [PATCH 5/6] gnu: ocaml-num: Update to 1.4. * gnu/packages/ocaml.scm (ocaml-num): Update to 1.4. --- gnu/packages/ocaml.scm | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index c4a024c850..349124c99e 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -958,7 +958,7 @@ written in Objective Caml.") (define-public ocaml-num (package (name "ocaml-num") - (version "1.1") + (version "1.4") (source (origin (method git-fetch) @@ -967,33 +967,8 @@ written in Objective Caml.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "0a4mhxgs5hi81d227aygjx35696314swas0vzy3ig809jb7zq4h0")))) - (build-system ocaml-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (delete 'configure) - (add-before 'build 'fix-makefile - (lambda* (#:key outputs #:allow-other-keys) - ;; This package supposes we install to the same directory as - ;; the ocaml package. - (substitute* "src/META" - (("\"\\^\"") (string-append "\"" (assoc-ref outputs "out") - "/lib/ocaml/site-lib\""))) - (substitute* "src/Makefile" - (("\\) \\$\\(STDLIBDIR\\)") - (string-append ") " (assoc-ref outputs "out") - "/lib/ocaml/site-lib"))) - #t)) - (add-after 'install 'fix-stubslib - (lambda* (#:key outputs #:allow-other-keys) - (format #t "~a~%" (find-files "." ".*.so")) - (let ((stubdir (string-append (assoc-ref outputs "out") - "/lib/ocaml/site-lib/stublibs"))) - (delete-file stubdir) - (mkdir-p stubdir) - (install-file "src/dllnums.so" stubdir)) - #t))))) + (base32 "1vzdnvpj5dbj3ifx03v25pj2jj1ccav072v4d29pk1czdba2lzfc")))) + (build-system dune-build-system) (home-page "https://github.com/ocaml/num") (synopsis "Arbitrary-precision integer and rational arithmetic") (description "OCaml-Num contains the legacy Num library for -- 2.31.1 --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0006-gnu-Add-ocaml-js-of-ocaml.patch >From 7a19c648423b31d2322a86dc762dd01e39c417c0 Mon Sep 17 00:00:00 2001 From: divoplade Date: Wed, 30 Dec 2020 19:08:57 +0100 Subject: [PATCH 6/6] gnu: Add ocaml-js-of-ocaml. * gnu/packages/ocaml.scm (ocaml-js-of-ocaml): New variable. Co-Authored-By: pukkamustard --- gnu/packages/ocaml.scm | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 349124c99e..24d9e814fa 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -61,6 +61,7 @@ #:use-module (gnu packages maths) #:use-module (gnu packages multiprecision) #:use-module (gnu packages ncurses) + #:use-module (gnu packages node) #:use-module (gnu packages pcre) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) @@ -6939,3 +6940,43 @@ Drawing takes place in a separate window that is created when Graphics.open_graph is called. This library used to be distributed with OCaml up to OCaml 4.08.") (license license:lgpl2.1+))) + +(define-public ocaml-js-of-ocaml + (package + (name "ocaml-js-of-ocaml") + (version "3.9.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ocsigen/js_of_ocaml") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "00hdjaj94j3nc6f6wbbpx59h4yc79siphs34i1hry11r56paaqyk")))) + (build-system dune-build-system) + (arguments `(#:test-target ".")) + (propagated-inputs + `(("ocaml-ppxlib" ,ocaml-ppxlib) + ("ocaml-uchar" ,ocaml-uchar) + ("ocaml-menhir" ,ocaml-menhir) + ("ocaml-reactivedata" ,ocaml-reactivedata) + ("ocaml-cmdliner" ,ocaml-cmdliner) + ("ocaml-lwt" ,ocaml-lwt) + ("ocaml-tyxml" ,ocaml-tyxml) + ("ocaml-re" ,ocaml-re) + ("ocaml-uutf" ,ocaml-uutf) + ("ocaml-graphics" ,ocaml-graphics) + ("ocaml-yojson" ,ocaml-yojson))) + (native-inputs + ;; for tests + `(("node" ,node) + ("ocaml-ppx-expect" ,ocaml-ppx-expect) + ("ocaml-num" ,ocaml-num))) + (properties `((upstream-name . "js_of_ocaml"))) + (home-page "https://ocsigen.org/js_of_ocaml/") + (synopsis "Compiler from OCaml bytecode to Javascript") + (description "Js_of_ocaml is a compiler from OCaml bytecode to JavaScript. +It makes it possible to run pure OCaml programs in JavaScript environment like +browsers and Node.js.") + (license license:lgpl2.1+))) -- 2.31.1 --=-=-= Content-Type: text/plain; format=flowed Best regards, pukkamustard --=-=-=--