From patchwork Wed Sep 7 18:33:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Garek Dyszel X-Patchwork-Id: 42278 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 3AA8327BBEA; Wed, 7 Sep 2022 19:35:09 +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 62DC827BBE9 for ; Wed, 7 Sep 2022 19:35:08 +0100 (BST) Received: from localhost ([::1]:40032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oVzt8-0005Hp-6g for patchwork@mira.cbaines.net; Wed, 07 Sep 2022 14:35:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56460) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVzsB-0004gL-U3 for guix-patches@gnu.org; Wed, 07 Sep 2022 14:34:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39297) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oVzsB-0005Fz-KV for guix-patches@gnu.org; Wed, 07 Sep 2022 14:34:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oVzsB-0007yw-GN for guix-patches@gnu.org; Wed, 07 Sep 2022 14:34:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57540] [RFC PATCH v2 05/19] gnu: Add coq-mathcomp-hierarchy-builder.* gnu/packages/coq.scm (coq-mathcomp-hierarchy-builder): 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:03 +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: 57540@debbugs.gnu.org Received: via spool by 57540-submit@debbugs.gnu.org id=B57540.166257562130579 (code B ref 57540); Wed, 07 Sep 2022 18:34:03 +0000 Received: (at 57540) by debbugs.gnu.org; 7 Sep 2022 18:33:41 +0000 Received: from localhost ([127.0.0.1]:56214 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVzro-0007x8-TU for submit@debbugs.gnu.org; Wed, 07 Sep 2022 14:33:41 -0400 Received: from knopi.disroot.org ([178.21.23.139]:45682) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oVzrn-0007x1-6S for 57540@debbugs.gnu.org; Wed, 07 Sep 2022 14:33:39 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 888E140122 for <57540@debbugs.gnu.org>; Wed, 7 Sep 2022 20:33:38 +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 UTF8SMTP id qII2mgx_VAvT for <57540@debbugs.gnu.org>; Wed, 7 Sep 2022 20:33:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1662575617; bh=b9xVwYzyCN2zILZQoRrrNUpKqr6BjQsMcfh8YqVCi+I=; h=From:To:Subject:Date; b=c3Dwt0CzomVFNZdrgTwFPeCSe1ws9bOyK02fOSJgutj8OumMMjfOUxznTdxFKEyDR og3/KyjlrEQiqv3HP8/eRZ68dDVjigaoQGEbufo/FhRJWXb42jsxdi5SrWwyJRlo5o bcWQ6/pHvNQ4EPAmgTDTUPpSsPsfGTentdxfR+PZdA5+LofmA+Xn/jOLiuan55Dvvu qTVlf0407190/yxEg3O2lrpGytIJ4DaEdhOjXgu64v4JO0qQqz0JEb3PyeYR4RDSsO PK4X1oo8/iWbBFM10rtt23HQDono/kkSymdgDrjim/D74WbDyyI/gN1wTbBIz4ul53 f4iEThxAff1Bw== Date: Wed, 07 Sep 2022 14:33:34 -0400 Message-ID: <87mtbbvxtt.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/coq.scm (coq-mathcomp-hierarchy-builder): New variable. --- gnu/packages/coq.scm | 72 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/gnu/packages/coq.scm b/gnu/packages/coq.scm index 5ae5392db4..24f9492175 100644 --- a/gnu/packages/coq.scm +++ b/gnu/packages/coq.scm @@ -764,3 +764,75 @@ (define-public coq-elpi the @code{->} notation. Finally it provides a way to define new vernacular commands and new tactics.") (license license:lgpl2.1))) + +(define-public coq-mathcomp-hierarchy-builder + (package + (name "coq-mathcomp-hierarchy-builder") + ;; For more information on which version works with Coq 8.15, + ;; see the relevant issue: + ;; https://github.com/math-comp/hierarchy-builder/issues/297 + ;; Here we use + ;; coq-elpi 1.14.0 + ocaml-elpi 1.15.2 + + ;; coq-mathcomp-hierarchy-builder 1.3.0 (Coq 8.15) + (version "1.3.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/math-comp/hierarchy-builder") + (commit (string-append "v" version)) + (recursive? #t))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "17k7rlxdx43qda6i1yafpgc64na8br285cb0mbxy5wryafcdrkrc")))) + (build-system gnu-build-system) + (arguments + `(#:test-target "test-suite" + #:make-flags ,#~(list (string-append "COQBIN=" + #$(this-package-input "coq-core") + "/bin/") + (string-append "COQBININSTALL=" + (assoc-ref %outputs "out") "/bin/") + (string-append "DESTDIR=" + (assoc-ref %outputs "out")) + (string-append "ELPIDIR=" + #$(this-package-input "ocaml-elpi") + "/lib/ocaml/site-lib/elpi") + (string-append "COQMF_COQLIB=" + (assoc-ref %outputs "out") + "/lib/ocaml/site-lib/coq") + (string-append "COQLIBINSTALL=" + (assoc-ref %outputs "out") + "/lib/coq/user-contrib")) + #:phases (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda* (#:key make-flags #:allow-other-keys) + (apply invoke "make" "build" make-flags)))))) + (inputs (list coq + coq-core + coq-mathcomp + which + ocaml + coq-elpi + ocaml-elpi)) + (synopsis "Hierarchy structures for the Coq proof assistant") + (description + "Hierarchy Builder (HB) provides high level commands to declare a +hierarchy of algebraic structure (or interfaces if you prefer the +glossary of computer science) for the Coq system. + +Given a structure one can develop its theory, and that theory becomes +automatically applicable to all the examples of the structure. One can +also declare alternative interfaces, for convenience or backward +compatibility, and provide glue code linking these interfaces to the +structures part of the hierarchy. + +HB commands compile down to Coq modules, sections, records, coercions, +canonical structure instances and notations following the packed +classes discipline which is at the core of the Mathematical Components +library. All that complexity is hidden behind a few concepts and a few +declarative Coq commands.") + (home-page "https://math-comp.github.io/") + ;; MIT license + (license license:expat)))