From patchwork Wed Jan 10 07:43:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Lepiller X-Patchwork-Id: 58733 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 112A427BBE9; Wed, 10 Jan 2024 07:45:13 +0000 (GMT) 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 2682027BBE2 for ; Wed, 10 Jan 2024 07:45:09 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rNTGl-00025D-2f; Wed, 10 Jan 2024 02:44:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rNTGj-00022R-8D for guix-patches@gnu.org; Wed, 10 Jan 2024 02:44:57 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rNTGi-0003yi-Rn for guix-patches@gnu.org; Wed, 10 Jan 2024 02:44:56 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rNTGq-0008JG-2M for guix-patches@gnu.org; Wed, 10 Jan 2024 02:45:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#64249] [PATCH v9 09/34] gnu: coq: Update to 8.17.1. Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 10 Jan 2024 07:45:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64249 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64249@debbugs.gnu.org Cc: pukkamustard , Josselin Poiret Received: via spool by 64249-submit@debbugs.gnu.org id=B64249.170487264931027 (code B ref 64249); Wed, 10 Jan 2024 07:45:04 +0000 Received: (at 64249) by debbugs.gnu.org; 10 Jan 2024 07:44:09 +0000 Received: from localhost ([127.0.0.1]:41704 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNTFw-00084I-HP for submit@debbugs.gnu.org; Wed, 10 Jan 2024 02:44:09 -0500 Received: from lepiller.eu ([89.234.186.109]:59302 helo=hermes.lepiller.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rNTFj-0007zA-1r for 64249@debbugs.gnu.org; Wed, 10 Jan 2024 02:43:57 -0500 Received: from hermes.lepiller.eu (localhost [127.0.0.1]) by hermes.lepiller.eu (OpenSMTPD) with ESMTP id dba7fac4; Wed, 10 Jan 2024 07:43:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=from:to :cc:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=dkim; bh=/wdRa9E/+/UQyyQuL5OJ3YXDU QywKbtiHK7upvb8b8A=; b=NES+EgftLIvrFb3M48UdjdwiLd1XA36z0IIiKapo5 YsRwGWFlitVaKSO4EmZJFtlZB1ev8yP4rhQ4lPgA4voOFkqfygwVSnIncwJCP2CB zAYyc/p97OZtIjCSucf6FlO/fewD9FHayc4X4lzsFenIRUnI7BqG7XaeBFbRW1Lc GN1KhUUmKkO8ahV0wqKl2BIpTHMnvGVyH9gpQX41LOifsQmCcShQdW85qKtlyH63 lgAVC/Mp/AAB63G75qFvR2SUpwmzIFT6j09lcqfvOjinfq48Md2qPnJ2k6TlY4tk G1hBzavR+m9nUntx99mtPlqh8TfoMqEck8xE2MculsxpA== Received: by hermes.lepiller.eu (OpenSMTPD) with ESMTPSA id 78d7f009 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 10 Jan 2024 07:43:42 +0000 (UTC) From: Julien Lepiller Date: Wed, 10 Jan 2024 08:43:10 +0100 Message-ID: <20240110074336.24651-9-julien@lepiller.eu> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240110074336.24651-1-julien@lepiller.eu> References: <20240110074336.24651-1-julien@lepiller.eu> 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: pukkamustard * gnu/packages/coq.scm (coq): Update to 8.17.1 and merge with coq-core and coq-stdlib. [arguments] Merge with coq-core and coq-stdlib. Add pre-build phases and add a custom install phase. Remove unnecessary test-target. [source](patches): Remove. [native-search-paths]: Remove COQLIBPATH and COQCORELIB. (coq-core): Remove variable. (coq-stdlib): Remove variable. (coq-ide)[propagated-inputs]: Add zlib. (coq-mathcomp-bigenough)[propagated-inputs]: Remove coq-core. (coq-mathcomp-finmap)[inputs]: Remove coq-stdlib. (coq-equations): Update to 1.3-8.17. * gnu/packages/patches/coq-fix-envvars.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. Co-authored-by: Josselin Poiret --- gnu/local.mk | 1 - gnu/packages/coq.scm | 89 ++++++++-------------- gnu/packages/patches/coq-fix-envvars.patch | 53 ------------- 3 files changed, 32 insertions(+), 111 deletions(-) delete mode 100644 gnu/packages/patches/coq-fix-envvars.patch diff --git a/gnu/local.mk b/gnu/local.mk index 62242d8c62..c5b9ef6338 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1051,7 +1051,6 @@ dist_patch_DATA = \ %D%/packages/patches/converseen-hide-non-free-pointers.patch \ %D%/packages/patches/cool-retro-term-wctype.patch \ %D%/packages/patches/coreutils-gnulib-tests.patch \ - %D%/packages/patches/coq-fix-envvars.patch \ %D%/packages/patches/cppcheck-disable-char-signedness-test.patch \ %D%/packages/patches/cpuinfo-system-libraries.patch \ %D%/packages/patches/cpulimit-with-glib-2.32.patch \ diff --git a/gnu/packages/coq.scm b/gnu/packages/coq.scm index 57f8489a18..105b942ad3 100644 --- a/gnu/packages/coq.scm +++ b/gnu/packages/coq.scm @@ -31,6 +31,7 @@ (define-module (gnu packages coq) #:use-module (gnu packages base) #:use-module (gnu packages bison) #:use-module (gnu packages boost) + #:use-module (gnu packages compression) #:use-module (gnu packages emacs) #:use-module (gnu packages flex) #:use-module (gnu packages gawk) @@ -51,10 +52,10 @@ (define-module (gnu packages coq) #:use-module (guix utils) #:use-module ((srfi srfi-1) #:hide (zip))) -(define-public coq-core +(define-public coq (package - (name "coq-core") - (version "8.16.1") + (name "coq") + (version "8.17.1") (source (origin (method git-fetch) @@ -64,28 +65,35 @@ (define-public coq-core (file-name (git-file-name name version)) (sha256 (base32 - "0ljpqhh5lfsim29fcfp2xfcvm3j84pf1mb0gnpdr8vcqqw7mqwpf")) - (patches (search-patches "coq-fix-envvars.patch")))) + "0gg6hizq0i08lk741b579cbswhy6qvkh6inc3d3i5a2af98psq63")))) (native-search-paths (list (search-path-specification (variable "COQPATH") - (files (list "lib/ocaml/site-lib/coq/user-contrib" - "lib/coq/user-contrib"))) - (search-path-specification - (variable "COQLIBPATH") - (files (list "lib/ocaml/site-lib/coq"))) - (search-path-specification - (variable "COQCORELIB") - (files (list "lib/ocaml/site-lib/coq-core")) - (separator #f)))) + (files (list "lib/coq/user-contrib"))))) (build-system dune-build-system) + (arguments + (list + #:package "coq-core,coq-stdlib,coq" + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (coqlib (string-append out "/lib/ocaml/site-lib/coq/"))) + (invoke "./configure" "-prefix" out + "-libdir" coqlib)))) + (add-before 'build 'make-dunestrap + (lambda _ (invoke "make" "dunestrap"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (libdir (string-append out "/lib/ocaml/site-lib"))) + (invoke "dune" "install" "--prefix" out + "--libdir" libdir "coq" "coq-core" "coq-stdlib"))))))) (inputs (list gmp ocaml-zarith)) (native-inputs (list ocaml-ounit2 which)) - (arguments - `(#:package "coq-core" - #:test-target ".")) (properties '((upstream-name . "coq"))) ; also for inherited packages (home-page "https://coq.inria.fr") (synopsis "Proof assistant for higher-order logic") @@ -97,39 +105,6 @@ (define-public coq-core ;; Some of the documentation is distributed under opl1.0+. (license (list license:lgpl2.1 license:opl1.0+)))) -(define-public coq-stdlib - (package - (inherit coq-core) - (name "coq-stdlib") - (arguments - `(#:package "coq-stdlib" - #:test-target "." - #:phases - (modify-phases %standard-phases - (add-before 'build 'fix-dune - (lambda _ - (substitute* "user-contrib/Ltac2/dune" - (("coq-core.plugins.ltac2") - (string-join - (map (lambda (plugin) (string-append "coq-core.plugins." plugin)) - '("ltac2" "number_string_notation" "tauto" "cc" - "firstorder")) - " ")))))))) - (inputs - (list coq-core gmp ocaml-zarith)) - (native-inputs '()))) - -(define-public coq - (package - (inherit coq-core) - (name "coq") - (arguments - `(#:package "coq" - #:test-target ".")) - (propagated-inputs - (list coq-core coq-stdlib)) - (native-inputs '()))) - (define-public coq-ide-server (package (inherit coq) @@ -148,7 +123,7 @@ (define-public coq-ide `(#:tests? #f #:package "coqide")) (propagated-inputs - (list coq coq-ide-server)) + (list coq coq-ide-server zlib)) (inputs (list lablgtk3 ocaml-lablgtk3-sourceview3)))) @@ -582,16 +557,16 @@ (define-public coq-autosubst (define-public coq-equations (package (name "coq-equations") - (version "1.3") + (version "1.3-8.17") (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/mattam82/Coq-Equations") - (commit (string-append "v" version "-8.16")))) + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 - "08f756vgdd1wklkarg0b93j4n5mhkqm5ixxrhyb23dcv2dwhc8yg")))) + "0g68h4c1ijpphixvl9wkd7sibds38v4236dpvvh194j5ii42vnn8")))) (build-system gnu-build-system) (native-inputs (list ocaml coq camlp5)) @@ -743,7 +718,7 @@ (define-public coq-mathcomp-finmap "/lib/coq/user-contrib")) #:phases (modify-phases %standard-phases (delete 'configure)))) - (inputs (list coq coq-stdlib coq-mathcomp which)) + (inputs (list coq coq coq-mathcomp which)) (synopsis "Finite sets and finite types for coq-mathcomp") (description "This library is an extension of coq-mathcomp which supports finite sets @@ -774,7 +749,7 @@ (define-public coq-mathcomp-bigenough ;; by the packaged project in the future. #:tests? #f #:make-flags ,#~(list (string-append "COQBIN=" - #$(this-package-input "coq-core") + #$(this-package-input "coq") "/bin/") (string-append "COQMF_COQLIB=" (assoc-ref %outputs "out") @@ -784,7 +759,7 @@ (define-public coq-mathcomp-bigenough "/lib/coq/user-contrib")) #:phases (modify-phases %standard-phases (delete 'configure)))) - (propagated-inputs (list coq coq-core coq-mathcomp which)) + (propagated-inputs (list coq coq-mathcomp which)) (home-page "https://math-comp.github.io/") (synopsis "Small library to do epsilon - N reasoning") (description diff --git a/gnu/packages/patches/coq-fix-envvars.patch b/gnu/packages/patches/coq-fix-envvars.patch deleted file mode 100644 index 6c48224c64..0000000000 --- a/gnu/packages/patches/coq-fix-envvars.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 0e76cda958a4d3e4bcbb96e171c26b6b3478c6c2 Mon Sep 17 00:00:00 2001 -From: Julien Lepiller -Date: Thu, 10 Feb 2022 16:44:10 +0100 -Subject: [PATCH] Fix environment variable usage. - ---- - boot/env.ml | 26 +++++++++++++++++++------- - 1 file changed, 19 insertions(+), 7 deletions(-) - -diff --git a/boot/env.ml b/boot/env.ml -index e8521e7..d834a3a 100644 ---- a/boot/env.ml -+++ b/boot/env.ml -@@ -32,17 +32,29 @@ let fail_msg = - - let fail s = Format.eprintf "%s@\n%!" fail_msg; exit 1 - -+let path_to_list p = -+ let sep = if String.equal Sys.os_type "Win32" then ';' else ':' in -+ String.split_on_char sep p -+ - (* This code needs to be refactored, for now it is just what used to be in envvars *) - let guess_coqlib () = - Util.getenv_else "COQLIB" (fun () -> - let prelude = "theories/Init/Prelude.vo" in -- Util.check_file_else -- ~dir:Coq_config.coqlibsuffix -- ~file:prelude -- (fun () -> -- if Sys.file_exists (Filename.concat Coq_config.coqlib prelude) -- then Coq_config.coqlib -- else fail ())) -+ let coqlibpath = Util.getenv_else "COQLIBPATH" (fun () -> Coq_config.coqlibsuffix) in -+ let paths = path_to_list coqlibpath in -+ let valid_paths = -+ List.filter -+ (fun dir -> (Util.check_file_else ~dir:dir ~file:prelude (fun () -> "")) <> "") -+ paths in -+ match valid_paths with -+ | [] -> -+ if Sys.file_exists (Filename.concat Coq_config.coqlib prelude) -+ then Coq_config.coqlib -+ else -+ fail "cannot guess a path for Coq libraries; please use -coqlib option \ -+ or ensure you have installed the package containing Coq's stdlib (coq-stdlib in OPAM) \ -+ If you intend to use Coq without a standard library, the -boot -noinit options must be used." -+ | p::_ -> p) - - (* Build layout uses coqlib = coqcorelib *) - let guess_coqcorelib lib = --- -2.34.0 -