From patchwork Tue Jun 1 20:22:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: pukkamustard X-Patchwork-Id: 29753 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 8437F27BC81; Tue, 1 Jun 2021 21:25:43 +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=-2.8 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 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 0719927BC78 for ; Tue, 1 Jun 2021 21:25:43 +0100 (BST) Received: from localhost ([::1]:56888 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1loAxK-0000j2-1u for patchwork@mira.cbaines.net; Tue, 01 Jun 2021 16:25:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42644) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1loAwl-0007vK-Sb for guix-patches@gnu.org; Tue, 01 Jun 2021 16:25:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54550) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1loAwl-0000BF-Cv for guix-patches@gnu.org; Tue, 01 Jun 2021 16:25:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1loAwl-0006tw-9d for guix-patches@gnu.org; Tue, 01 Jun 2021 16:25:07 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47768] [PATCH v3 12/42] gnu: Add ocaml-sedlex. Resent-From: pukkamustard Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 01 Jun 2021 20:25:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47768 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Xinglu Chen Cc: pukkamustard , 47768@debbugs.gnu.org Received: via spool by 47768-submit@debbugs.gnu.org id=B47768.162257908926320 (code B ref 47768); Tue, 01 Jun 2021 20:25:07 +0000 Received: (at 47768) by debbugs.gnu.org; 1 Jun 2021 20:24:49 +0000 Received: from localhost ([127.0.0.1]:37823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1loAwT-0006qM-5z for submit@debbugs.gnu.org; Tue, 01 Jun 2021 16:24:49 -0400 Received: from mout01.posteo.de ([185.67.36.65]:53625) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1loAwQ-0006ps-Jq for 47768@debbugs.gnu.org; Tue, 01 Jun 2021 16:24:47 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 168AF24002A for <47768@debbugs.gnu.org>; Tue, 1 Jun 2021 22:24:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1622579081; bh=DjReW/kuSKYqk7gSlG9wRrPiMbZcxyA4cffeDB/P4nI=; h=From:To:Cc:Subject:Date:From; b=EEMZNWyxCu7e+Nf54kBZ638PkTTkwPy4dfwqijpHdX/XoO70t022VNKYpOzI5b+uw Mebp+k1ZO/3E/HYKCsT0M2NHSDfCbUNO8Oocx3qSKscy8Goz9FASgLB/eket+5gvVb mrcKM5zPVp8A/jsyR26F/uMcb/6OCOkZiz3u+TohDf9ww2E8wh2tkhCK6vSe6mv5n6 sgJsetsUDZ/YLzG2vVZgW44uhwssw1JjzGk18m8TrQqVXS7QlF8S8bIt8y1egmjEmd JwJtBMgRihQ81KY9i/slCYTvoicAwIngTjCIcyvlpbSu9OWAzmZjCldh+VSa0biB05 ZyRKSJ5ckfwbg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FvkCp5qPFz9rxD; Tue, 1 Jun 2021 22:24:38 +0200 (CEST) From: pukkamustard Date: Tue, 1 Jun 2021 20:22:55 +0000 Message-Id: <20210601202325.8777-13-pukkamustard@posteo.net> In-Reply-To: <87lf82hasx.fsf@yoctocell.xyz> References: <87lf82hasx.fsf@yoctocell.xyz> 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 * gnu/packages/ocaml.scm (ocaml-sedlex): New variable. (ocaml4.07-sedlex): Inherit from ocaml-sedlex. --- gnu/packages/ocaml.scm | 57 ++++++++++++++++++++++++++++-------------- 1 file changed, 38 insertions(+), 19 deletions(-) diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 7fe59c0b95..605567b996 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -2555,10 +2555,10 @@ representation of the data.") and consumable.") (license license:bsd-2))) -(define-public ocaml4.07-sedlex +(define-public ocaml-sedlex (package - (name "ocaml4.07-sedlex") - (version "2.1") + (name "ocaml-sedlex") + (version "2.3") (source (origin (method git-fetch) (uri (git-reference @@ -2567,36 +2567,37 @@ and consumable.") (file-name (git-file-name name version)) (sha256 (base32 - "05f6qa8x3vhpdz1fcnpqk37fpnyyq13icqsk2gww5idjnh6kng26")))) + "0iw3phlaqr27jdf857hmj5v5hdl0vngbb2h37p2ll18sw991fxar")))) (build-system dune-build-system) (arguments - `(#:tests? #f; no tests + `(#:tests? #f ; no tests #:package "sedlex" #:phases (modify-phases %standard-phases (add-before 'build 'copy-resources (lambda* (#:key inputs #:allow-other-keys) (with-directory-excursion "src/generator/data" + ;; Newer versions of dune emit an error if files it wants to + ;; build already exist. Delete the dune file so dune doesn't + ;; complain. + (delete-file "dune") (for-each - (lambda (file) - (copy-file (assoc-ref inputs file) file)) - '("DerivedCoreProperties.txt" "DerivedGeneralCategory.txt" - "PropList.txt"))) + (lambda (file) + (copy-file (assoc-ref inputs file) file)) + '("DerivedCoreProperties.txt" "DerivedGeneralCategory.txt" + "PropList.txt"))) #t)) (add-before 'build 'chmod (lambda _ (for-each (lambda (file) (chmod file #o644)) (find-files "." ".*")) - #t))) - #:ocaml ,ocaml-4.07 - #:findlib ,ocaml4.07-findlib - #:dune ,ocaml4.07-dune)) + #t))))) (native-inputs - `(("ocamlbuild" ,(package-with-ocaml4.07 ocamlbuild)))) + `(("ocamlbuild" ,ocamlbuild))) (propagated-inputs - `(("ocaml-gen" ,(package-with-ocaml4.07 ocaml-gen)) - ("ocaml-ppx-tools-versioned" - ,(package-with-ocaml4.07 ocaml-ppx-tools-versioned)) - ("ocaml-uchar" ,(package-with-ocaml4.07 ocaml-uchar)))) + `(("ocaml-gen" ,ocaml-gen) + ("ocaml-ppxlib" ,ocaml-ppxlib) + ("ocaml-ppx-tools-versioned" ,ocaml-ppx-tools-versioned) + ("ocaml-uchar" ,ocaml-uchar))) ;; These three files are needed by src/generator/data/dune, but would be ;; downloaded using curl at build time. (inputs @@ -2621,11 +2622,29 @@ and consumable.") (sha256 (base32 "0gsb1jpj3mnqbjgbavi4l95gl6g4agq58j82km22fdfg63j3w3fk")))))) + (properties `((ocaml4.07-variant . ,(delay ocaml4.07-sedlex)))) (home-page "https://www.cduce.org/download.html#side") (synopsis "Lexer generator for Unicode and OCaml") (description "Lexer generator for Unicode and OCaml.") (license license:expat))) +(define-public ocaml4.07-sedlex + (package-with-ocaml4.07 + (package + (inherit ocaml-sedlex) + (name "ocaml-sedlex") + (version "2.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ocaml-community/sedlex") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "05f6qa8x3vhpdz1fcnpqk37fpnyyq13icqsk2gww5idjnh6kng26")))) + (properties '())))) + (define-public ocaml-uchar (package (name "ocaml-uchar") @@ -3473,7 +3492,7 @@ Format module of the OCaml standard library.") `(("which" ,which))) (propagated-inputs `(("ocaml-xmlm" ,(package-with-ocaml4.07 ocaml-xmlm)) - ("ocaml-sedlex" ,ocaml4.07-sedlex) + ("ocaml-sedlex" ,(package-with-ocaml4.07 ocaml-sedlex)) ("ocaml-easy-format" ,(package-with-ocaml4.07 ocaml-easy-format)) ("ocaml-base64" ,(package-with-ocaml4.07 ocaml-base64)))) (home-page "http://piqi.org")