From patchwork Wed Oct 5 17:51:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Garek Dyszel X-Patchwork-Id: 6225 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 E4C9627BBEA; Wed, 5 Oct 2022 18:59:08 +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 7C50E27BBE9 for ; Wed, 5 Oct 2022 18:59:08 +0100 (BST) Received: from localhost ([::1]:33362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1og8fj-000275-Ki for patchwork@mira.cbaines.net; Wed, 05 Oct 2022 13:59:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1og8Yt-0004Fj-OZ for guix-patches@gnu.org; Wed, 05 Oct 2022 13:52:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58950) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1og8Yt-0007n4-GD for guix-patches@gnu.org; Wed, 05 Oct 2022 13:52:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1og8Yt-0007GM-Bw for guix-patches@gnu.org; Wed, 05 Oct 2022 13:52:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58310] [PATCH 13/14] gnu: Add coq-mathcomp-hierarchy-builder. References: <87h70iqji2.fsf@disroot.org> In-Reply-To: <87h70iqji2.fsf@disroot.org> Resent-From: Garek Dyszel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 05 Oct 2022 17:52:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58310 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58310@debbugs.gnu.org Received: via spool by 58310-submit@debbugs.gnu.org id=B58310.166499230927860 (code B ref 58310); Wed, 05 Oct 2022 17:52:03 +0000 Received: (at 58310) by debbugs.gnu.org; 5 Oct 2022 17:51:49 +0000 Received: from localhost ([127.0.0.1]:58023 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1og8Yf-0007FI-1I for submit@debbugs.gnu.org; Wed, 05 Oct 2022 13:51:49 -0400 Received: from knopi.disroot.org ([178.21.23.139]:46068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1og8Yd-0007FA-2z for 58310@debbugs.gnu.org; Wed, 05 Oct 2022 13:51:47 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 7FCE04C6BD for <58310@debbugs.gnu.org>; Wed, 5 Oct 2022 19:51:46 +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 BbamnLWxMMiT for <58310@debbugs.gnu.org>; Wed, 5 Oct 2022 19:51:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1664992305; bh=yocTBlqnywT95u/6Yz0IgzHcUrZsJcI6PIQmQjjhzAM=; h=From:To:Subject:Date; b=DNy8OV8vbyiknU/+pdDMeP50m7ilMU6za+8HA0ye6u+2yIm/toLPrr/RRnH3bfmDO V3dwqceJRxRUNh9dK+f81fNysjWXqmVkMTM3yW2DapKS+h2fvdRbBP/8RY+XBQSDRU aOxzs+D/AYm2htCpH3sboVOYDzVCRQaY38yWRqMPGO4NNGt2tZ39l2/aaZezqSzeEh nlncp6DzSD5gr7UbmLogJhbq+UBr/sFzpgyoRm0cPTKQrSFpYE2S9NNxnNodH9qPAn iDWqb//gfQVPw57Xd42FVO+93/iyQ4g0j3K16XfclCUyiQEnqODakSFETE5XzxvlYp m53D8teNhXp5w== Date: Wed, 05 Oct 2022 13:51:41 -0400 Message-ID: <87lepup39u.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 diff --git a/gnu/packages/coq.scm b/gnu/packages/coq.scm index 313366cb11..184e503dd5 100644 --- a/gnu/packages/coq.scm +++ b/gnu/packages/coq.scm @@ -843,3 +843,65 @@ (define-public coq-elpi Coq's primitives. 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.16, + ;; see the relevant issue: + ;; https://github.com/math-comp/hierarchy-builder/issues/297 + ;; Here we use + ;; coq-elpi 1.15.4 + ocaml-elpi 1.16.5 + + ;; coq-mathcomp-hierarchy-builder 1.3.0 (Coq 8.16) + (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)))) + (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 interfaces for the Coq system. + +Given a structure one can develop its theory, and that theory becomes +applicable to all 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.") + (home-page "https://math-comp.github.io/") + (license license:expat)))