From patchwork Wed Sep 7 18:32:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Garek Dyszel X-Patchwork-Id: 42274 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 6FA7E27BBEA; Wed, 7 Sep 2022 19:34:24 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable 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 1508727BBE9 for ; Wed, 7 Sep 2022 19:34:24 +0100 (BST) Received: from localhost ([::1]:55710 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oVzsV-0004ht-2M for patchwork@mira.cbaines.net; Wed, 07 Sep 2022 14:34:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVzsA-0004eW-KY for guix-patches@gnu.org; Wed, 07 Sep 2022 14:34:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39292) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oVzsA-0005Fc-BN for guix-patches@gnu.org; Wed, 07 Sep 2022 14:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oVzsA-0007yS-7W for guix-patches@gnu.org; Wed, 07 Sep 2022 14:34:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57540] [RFC PATCH v2 02/19] gnu: Add ocaml-atd.* gnu/packages/ocaml.scm (ocaml-atd): New variable. References: <79d544f7d8ba64b631a6f0f1d2ef0b08@disroot.org> In-Reply-To: <79d544f7d8ba64b631a6f0f1d2ef0b08@disroot.org> Resent-From: Garek Dyszel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 07 Sep 2022 18:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57540 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Julien Lepiller Cc: 57540@debbugs.gnu.org Received: via spool by 57540-submit@debbugs.gnu.org id=B57540.166257558230501 (code B ref 57540); Wed, 07 Sep 2022 18:34:02 +0000 Received: (at 57540) by debbugs.gnu.org; 7 Sep 2022 18:33:02 +0000 Received: from localhost ([127.0.0.1]:56205 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVzrC-0007vt-Ge for submit@debbugs.gnu.org; Wed, 07 Sep 2022 14:33:02 -0400 Received: from knopi.disroot.org ([178.21.23.139]:37540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVzrA-0007vN-JI for 57540@debbugs.gnu.org; Wed, 07 Sep 2022 14:33:01 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 09DCD40123; Wed, 7 Sep 2022 20:33:00 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KMDVTpJtRc8F; Wed, 7 Sep 2022 20:32:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1662575575; bh=pd9pUdKrEjzDqeqqhGEHu4Gcvar8m2RNX4vDewBfxxU=; h=From:To:Cc:Subject:Date; b=CnOuCzpMd6TE7CiV1v1LnT1iO+TWxB154Z/H6IolyWBsxPl12R0m9CKcnqQwLzws7 qQY9m1HLvmdRd+u2dqbxDryO82yohQx2ixlrWtKumV909Rkm/25TRQsZGdRIGWpw8a fa+hxtyfpmcWDFMQ2XhNjbmOycrU+J4j41ugSeHA/dMTo6WebMWzZNfTkwkBuAkxQA FcZrzPUnHBASA+Xbm/Prf/kmpSTHoZMLMBr8tgRj95ignNfb2No40O0c4/4E6YmDqR dhD1+r0Ljn+F0CuytTk6kJAuilGYuDuObNWyO8IABqPi9DsB5V2Msp1TjBIfKr6Rt0 UEbXins+KOR0A== Date: Wed, 07 Sep 2022 14:32:52 -0400 Message-ID: <87r10nvxuz.fsf@disroot.org> 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" Reply-to: Garek Dyszel X-ACL-Warn: , Garek Dyszel via Guix-patches X-Patchwork-Original-From: Garek Dyszel via Guix-patches via From: Garek Dyszel X-getmail-retrieved-from-mailbox: Patches * gnu/packages/ocaml.scm (ocaml-atd): New variable. --- gnu/packages/ocaml.scm | 59 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index c4fa05b934..11b982519b 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -8870,3 +8870,62 @@ (define-public ocaml-elpi ELPI is free software released under the terms of LGPL 2.1 or above.") (license license:lgpl2.1))) + +;; NOTE: requires python-jsonschema with version at minimum 4.6.0 to run +;; tests. +;; See https://github.com/ahrefs/atd/issues/306 for more info on that. +(define-public ocaml-atd + (package + (name "ocaml-atd") + (version "2.10.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ahrefs/atd") + (commit version) + (recursive? #t))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "10fgahdigrl01py0k0q2d6a60yps38q96dxhjnzm9jz4g931716l")))) + (build-system dune-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + ;; The dune-build-system does not run "make test" but + ;; "dune runtest test --release". + ;; This project, rather, needs us to run "make test". + ;; + ;; For this package (ocaml-atd), we DO NOT run all the + ;; tests. The atd repository has resources for several + ;; different interfaces (python, scala, etc), but we + ;; don't need to run those tests if we are just + ;; interested in the ocaml interface. + ;; So we stick with just the ocaml tests here. + (when tests? + (invoke "make" "test-ocaml"))))))) + (propagated-inputs (list ocaml-menhir + ocaml-easy-format + ocaml-odoc + ocaml-re + ocaml-camlp-streams + ocaml-biniou + ocaml-yojson + ocaml-cmdliner)) + (native-inputs (list ocaml-alcotest + python + python-pypa-build + python-jsonschema-4.15 + python-flake8 + python-mypy + python-pytest)) + (home-page "https://github.com/ahrefs/atd") + (synopsis "Parser for the ATD data format description language") + (description + "ATD is the OCaml library providing a parser for the ATD language +and various utilities. ATD stands for Adjustable Type Definitions in +reference to its main property of supporting annotations that allow a +good fit with a variety of data formats.") + ;; Modified BSD license + (license (license:non-copyleft "LICENSE.md"))))