From patchwork Thu May 2 15:39:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Raven Hallsby X-Patchwork-Id: 26823 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 4438527BBEA; Thu, 2 May 2024 16:41:05 +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=ham 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 7AFA327BBE2 for ; Thu, 2 May 2024 16:41:04 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s2YYH-0004Np-0w; Thu, 02 May 2024 11:40:53 -0400 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 1s2YY5-0004KX-F7 for guix-patches@gnu.org; Thu, 02 May 2024 11:40:42 -0400 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 1s2YY5-00008i-1q for guix-patches@gnu.org; Thu, 02 May 2024 11:40:41 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s2YYQ-0007R3-Cl; Thu, 02 May 2024 11:41:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70720] [PATCH 2/3] gnu: Add tree-sitter-vhdl. Resent-From: Karl Hallsby Original-Sender: "Debbugs-submit" Resent-CC: andrew@trop.in, cox.katherine.e+guix@gmail.com, liliana.prikler@gmail.com, guix-patches@gnu.org Resent-Date: Thu, 02 May 2024 15:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70720 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70720@debbugs.gnu.org Cc: Karl Hallsby , Andrew Tropin , Katherine Cox-Buday , Liliana Marie Prikler X-Debbugs-Original-Xcc: Andrew Tropin , Katherine Cox-Buday , Liliana Marie Prikler Received: via spool by 70720-submit@debbugs.gnu.org id=B70720.171466440228530 (code B ref 70720); Thu, 02 May 2024 15:41:02 +0000 Received: (at 70720) by debbugs.gnu.org; 2 May 2024 15:40:02 +0000 Received: from localhost ([127.0.0.1]:44476 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2YXS-0007Pu-0N for submit@debbugs.gnu.org; Thu, 02 May 2024 11:40:02 -0400 Received: from mail-io1-xd31.google.com ([2607:f8b0:4864:20::d31]:47115) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s2YXP-0007PI-Kl for 70720@debbugs.gnu.org; Thu, 02 May 2024 11:40:00 -0400 Received: by mail-io1-xd31.google.com with SMTP id ca18e2360f4ac-7da3ec3e044so369725539f.2 for <70720@debbugs.gnu.org>; Thu, 02 May 2024 08:39:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hallsby.com; s=google; t=1714664372; x=1715269172; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kDWcKExcdw+d/SgkMbzVSx3Nu67waUgsR8vBYCRue3A=; b=Efi+YEUKlK0J5TzFcP5uQLAyh0tx1O93R0dfISXEiLfThQsruaeQXUEMSqsck0McmV hzHwPYPn03AFPMpdeHZZqREgJCAyEuZHbY2JQywElmvTTkWveA3BeCbjtMpfKrgh5IKS yS4xuMbuXxufrQERWX2LXeWcvIeEbdeNXMGLWHTrqxLw8pEv9+QRMk9kVY8RSkT/cIp5 VTZXTNDotBSmcQnFoo4M2DNt8Pm6yoV7vvZRb7q5tvD75feO/jONBvWjcI1nIck6IXrm KcDipmKlJu7oqGce5El4aqwK7YqVw6+9X90U67yf2gOUbQ9Dc/+unduIbNgq9YtX0yZb oYMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714664372; x=1715269172; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kDWcKExcdw+d/SgkMbzVSx3Nu67waUgsR8vBYCRue3A=; b=OaGgXj88nWiGIUOly2+dKrDKfpIDK0WJpH2oJhAb4Pvh4gkciLlC73XrlIlnIg/Eq0 9QsbzfvUfkhLsnf9BLOScczqgC27xhCFSvAyyzK5dfdCayFuV7IVnFuKjjCZzdCnXCPc IB9gs0+nw8OoH8pOyD9b1asQWb1AdzZVFBBD1wsMeo77actdjROeV54PfWLiIaQxCn1p Ep2r0J1q1OrIIczjqryNhVP7sNdSrgnjKzcMMwSCWXUryDb5D8LRtYZLhkmujZRa/eqc qUzPt9eE3d1RVZihTpDCO3NkdbVMjDBKC88RC2YY1QrCeEuWhY0qjHB01dax+plxTd7Q taMg== X-Gm-Message-State: AOJu0YzDe+A7bJLvNypS/6A5irYI/l52eEsCNro0HYB97SSBtF3Arse4 4RaOv+eLtJgzS6btPjCxCupthI4EFM4KNcVbdNnaSs28CgJQ+FOxHFLjm0tREFm6xPADBOaP/mk = X-Google-Smtp-Source: AGHT+IHe0ll0M6iXK+3ONBSCbnxu8aUFpThN20kKhJ2YkpV17TpXIp7bmIfHnkY7cRJU6wKwsZn5zA== X-Received: by 2002:a05:6e02:174b:b0:36a:3c07:9caf with SMTP id y11-20020a056e02174b00b0036a3c079cafmr86691ill.30.1714664371833; Thu, 02 May 2024 08:39:31 -0700 (PDT) Received: from avocato.wireless.northwestern.private (wireless-165-124-85-63.nuwlan.northwestern.edu. [165.124.85.63]) by smtp.gmail.com with ESMTPSA id q21-20020a056638239500b00482b42e7b50sm265155jat.53.2024.05.02.08.39.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 08:39:31 -0700 (PDT) Date: Thu, 2 May 2024 10:39:22 -0500 Message-ID: <1cc45cfd22fb89cc16ef6d9bdb26f5b0d53afbf7.1714663253.git.karl@hallsby.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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: , Reply-to: Karl Hallsby X-ACL-Warn: , Karl Hallsby via Guix-patches X-Patchwork-Original-From: Karl Hallsby via Guix-patches via From: Raven Hallsby 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 * gnu/packages/tree-sitter.scm (tree-sitter-vhdl): New variable. This is the tree-sitter-vhdl implementation the tree-sitter website points to, but it seems that tree-sitter-vhdl seems to be abandoned (though it may be complete). The cleanup snippet does more work than it should probably do, but it is the only way for Change-Id: Ia26e33f9898573e70c9afdd4025e3770d042dbd6 --- gnu/packages/tree-sitter.scm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) -- 2.41.0 diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm index 105581bfc4..42f311223e 100644 --- a/gnu/packages/tree-sitter.scm +++ b/gnu/packages/tree-sitter.scm @@ -716,3 +716,34 @@ (define-public tree-sitter-verilog (use-modules (guix build utils)) (delete-file "binding.gyp") (delete-file-recursively "bindings")))))) + +(define-public tree-sitter-vhdl + (let ((commit "a3b2d84990527c7f8f4ae219c332c00c33d2d8e5") + (revision "0")) + (tree-sitter-grammar + "vhdl" "VHDL" + "0gz2b0qg1jzi2q6wgj6k6g35kmni3pqglq4f5kblkxx909463n8a" + (git-version "0.0.0" revision commit) + #:repository-url "https://github.com/alemuller/tree-sitter-vhdl" + #:commit commit + #:get-cleanup-snippet + (lambda _ + #~(begin + (use-modules (guix build utils)) + (delete-file "binding.gyp") + ;; tree-sitter-vhdl does not have bindings/ directory. + (delete-file "src/grammar.json") + (delete-file "src/node-types.json") + (delete-file "src/parser.c") + (delete-file-recursively "src/tree_sitter") + ;; Fix a query error in the highlight.scm query test. This would be + ;; easier with a patch, but this works too, and we still get to use + ;; tree-sitter-grammar. The fix is taken from here: + ;; https://github.com/n8tlarsen/tree-sitter-vhdl/commit/dabf157c6bb7220d72d3ceba0ce1abd90bf62187 + ;; This is a documented issue that has not been resolved for nearly 2 + ;; years. + ;; https://github.com/alemuller/tree-sitter-vhdl/issues/2 + (substitute* "queries/highlights.scm" + (("\\(integer_decimal\n") "(integer_decimal)\n") + (("\\(integer\\)") "") + (("\"0\")") "\"0\"")))))))