From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id AA4UH44gNmE3ZQAAgWs5BA (envelope-from ) for ; Mon, 06 Sep 2021 16:07:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id KDDEGo4gNmGNcAAA1q6Kng (envelope-from ) for ; Mon, 06 Sep 2021 14:07:10 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2810512AD6 for ; Mon, 6 Sep 2021 16:07:10 +0200 (CEST) Received: from localhost ([::1]:50184 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNFHB-0000FJ-BD for larch@yhetil.org; Mon, 06 Sep 2021 10:07:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41630) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNFH5-0000Ag-Kn for guix-patches@gnu.org; Mon, 06 Sep 2021 10:07:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42627) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNFH5-0004fv-DU for guix-patches@gnu.org; Mon, 06 Sep 2021 10:07:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mNFH5-0004my-8a for guix-patches@gnu.org; Mon, 06 Sep 2021 10:07:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50317] [PATCH v2 3/4] gnu: ocaml-ppx-variants-conv: Patch for building with ocaml-ppxlib. Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 06 Sep 2021 14:07:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50317 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50317@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 50317-submit@debbugs.gnu.org id=B50317.163093721918366 (code B ref 50317); Mon, 06 Sep 2021 14:07:03 +0000 Received: (at 50317) by debbugs.gnu.org; 6 Sep 2021 14:06:59 +0000 Received: from localhost ([127.0.0.1]:54167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNFH1-0004mA-IX for submit@debbugs.gnu.org; Mon, 06 Sep 2021 10:06:59 -0400 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:40164 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mNFH0-0004lc-5V for 50317@debbugs.gnu.org; Mon, 06 Sep 2021 10:06:58 -0400 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=yoctocell.xyz; s=mail; t=1630937212; bh=o5kuDj0nRdz5Hh1YrS66HqlmTGwJ/hh0c3q1zAurSoI=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=j76sAtT5QsA3kO8g6D0REYfSRFwAZdnO1xDwkZbID4ehfxuNW1NBJO1zvuTZ0K3el K+3uS9pRjdmqkD01C8rok0z/IfesVV2QLNjTzVuVls4TmA1RoQk84bHFVVZuAyYeks /xRNSKX0mTawUmlLTHi7Esxt4maYP7wECmicTjnY= In-Reply-To: References: Message-Id: Date: Mon, 06 Sep 2021 16:06:52 +0200 MIME-Version: 1.0 Content-Type: text/plain 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1630937230; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=37auLhAquntFTIFNh9amD+5KpDVzUD9n8B9x7307+yc=; b=I7XOubyMJJojcjejnHEnkF7voeV9LU5wvr624PTMSgvDROAh981MXvBD4UP2S4HGOHizZ5 R/9YXqME6T1HAovMz5M/KksZvLTDus7Cde4xFQHwjLf5RKgMUv+3wLOPEys4WVmCWUjqrC 91WDGAwpA4exg8XFiT1VV6W4dPYCietccDzKgKmCzw7mUZJRfodKBJXDJ8nor7k4ss3U7d xhzUxXHQzTwrIH8YgRmYVemP8J1xyqW3GmWGtOYhnwn+w8ig8QeJu39hrP5vWvsMSS6XQf 9wkYL94GViS5WtIAbBDx3CXuWlWaGg1MMakZB2GilyhvMeDQc0H5hgmB8zxHzw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1630937230; a=rsa-sha256; cv=none; b=Tl0hSze3zZOqcpjbJwE6gacuXRf20Lk6rIIZ3mcVcN1rglTfgy/IcpcloomiifoEXW/P9j Sx20D9gYT/LadiZe7SOQ+03HxavcZyP9+COO8VrFEkgWYgDE4BQgGlyKBzQ7OBHES6MSvi AeahJNFu5TSwnNColwxJWa2YEoXRpy3Ut2EXBP1HCrRkjR8Rn8K0s0KPwijWzIFr5wbCrL 0AB8TJjRUlr8TiTjqoFoux19qgNJ1TAv8DpPGXXq9M3F2xhrwUk+Z1fzdB0b4ezIJ8zM+T 3ygpfCN4lVsrMiS0M86TxbDkyZo+OapkYp9rO2INdKWD8Y8j27r3RxD+loZI2Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=j76sAtT5; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -0.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=j76sAtT5; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 2810512AD6 X-Spam-Score: -0.32 X-Migadu-Scanner: scn0.migadu.com X-TUID: QXYK53yoz0oR The patch will make it build when building it with ocaml-ppxlib@0.23.0. * gnu/packages/patches/ocaml-ppx-variants-ppxlib-api-change.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/ocaml.scm (ocaml-ppx-variants-conv): Apply the patch. --- gnu/local.mk | 1 + gnu/packages/ocaml.scm | 4 ++ ...ocaml-ppx-variants-ppxlib-api-change.patch | 42 +++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 gnu/packages/patches/ocaml-ppx-variants-ppxlib-api-change.patch diff --git a/gnu/local.mk b/gnu/local.mk index dc2e41d384..9fb068917a 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1523,6 +1523,7 @@ dist_patch_DATA = \ %D%/packages/patches/ocaml-dose3-Fix-for-ocaml-4.06.patch \ %D%/packages/patches/ocaml-dose3-dont-make-printconf.patch \ %D%/packages/patches/ocaml-dose3-Install-mli-cmx-etc.patch \ + %D%/packages/patches/ocaml-ppx-variants-ppxlib-api-change.patch \ %D%/packages/patches/omake-fix-non-determinism.patch \ %D%/packages/patches/oneko-remove-nonfree-characters.patch \ %D%/packages/patches/onnx-optimizer-system-library.patch \ diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm index 53305ce60f..e319fb891d 100644 --- a/gnu/packages/ocaml.scm +++ b/gnu/packages/ocaml.scm @@ -5340,6 +5340,10 @@ definitions.") (uri (git-reference (url "https://github.com/janestreet/ppx_variants_conv") (commit (string-append "v" version)))) + (patches + (search-patches + ;; Fix build when building with ocaml-ppxlib@0.23.0. + "ocaml-ppx-variants-ppxlib-api-change.patch")) (file-name (git-file-name name version)) (sha256 (base32 diff --git a/gnu/packages/patches/ocaml-ppx-variants-ppxlib-api-change.patch b/gnu/packages/patches/ocaml-ppx-variants-ppxlib-api-change.patch new file mode 100644 index 0000000000..b437bfb061 --- /dev/null +++ b/gnu/packages/patches/ocaml-ppx-variants-ppxlib-api-change.patch @@ -0,0 +1,42 @@ +From 6103f6fc56f978c847ba7c1f2d9f38ee93a5e337 Mon Sep 17 00:00:00 2001 +From: Sonja Heinze +Date: Tue, 9 Mar 2021 12:57:47 +0100 +Subject: [PATCH] Adapt to Ppxlib's API change + +Ppxlib is removing Lexer.keyword_table from the API in exchange for +the more lightweight Keyword.is_keyword. + +Signed-off-by: Sonja Heinze +--- +Patch from . + + ppx_variants_conv.opam | 2 +- + src/ppx_variants_conv.ml | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ppx_variants_conv.opam b/ppx_variants_conv.opam +index 7e7148d..b56040f 100644 +--- a/ppx_variants_conv.opam ++++ b/ppx_variants_conv.opam +@@ -15,7 +15,7 @@ depends: [ + "base" {>= "v0.14" & < "v0.15"} + "variantslib" {>= "v0.14" & < "v0.15"} + "dune" {>= "2.0.0"} +- "ppxlib" {>= "0.14.0"} ++ "ppxlib" {>= "0.23.0"} + ] + synopsis: "Generation of accessor and iteration functions for ocaml variant types" + description: " +diff --git a/src/ppx_variants_conv.ml b/src/ppx_variants_conv.ml +index 8d60086..112fc78 100644 +--- a/src/ppx_variants_conv.ml ++++ b/src/ppx_variants_conv.ml +@@ -66,7 +66,7 @@ end + + let variant_name_to_string v = + let s = String.lowercase v in +- if Caml.Hashtbl.mem Lexer.keyword_table s ++ if Keyword.is_keyword s + then s ^ "_" + else s + -- 2.33.0