From patchwork Mon May 3 12:38:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: pukkamustard X-Patchwork-Id: 29101 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 917F927BC82; Tue, 4 May 2021 07:52:53 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED,URIBL_SBL,URIBL_SBL_A autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 612BD27BC81 for ; Tue, 4 May 2021 07:52:52 +0100 (BST) Received: from localhost ([::1]:56710 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ldovL-0001Dm-Ij for patchwork@mira.cbaines.net; Tue, 04 May 2021 02:52:51 -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 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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) Best regards, pukkamustard 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