From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id AMxlKJrFmmb+bwEAe85BDQ:P1 (envelope-from ) for ; Fri, 19 Jul 2024 19:59:22 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id AMxlKJrFmmb+bwEAe85BDQ (envelope-from ) for ; Fri, 19 Jul 2024 21:59:22 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=lfbbr3Nt; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1721419162; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: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=LwBOWCzzZHNFarSQ4oRp/OmbpAfztRFmAvM4bxSxdi4=; b=jhvICBpNf/AaR2YClgz4bhkh48IHgjscvfx5xObwd6w/7JPAPhTIMwa5NJRiMwsA6/Z0cf nwHrpK11ETXp+wRLuL3yOSGQY4A3WQzN2vHCrf2CAKEZIWaoIyEpTZs+JOAab5vyS1MSHV n+EB8hBDufqqVKGjaoxP7dlL2vK843Cc/9O9wYcRAHlLNRwns/XOpDExtgu3VFrtZOj3i2 CoEZmXoyZHH0oCVhFOSiftOAq24pap19/1JAQ5FQ4fSkb7HXwmKs7E4MNsoeAsUTcEj93Q IX8H2iWLYEucPG16fIGyvHtU7uiSxWXwqsd8RbY8Rak8hSMF2djGCW9BRwGy3w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=lfbbr3Nt; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1721419162; a=rsa-sha256; cv=none; b=QymdL517DXPw41C7Cmw21epfsDuNf/zjbFSc3pdfP5sST+UI7W8asMnJ6t06O0zGPOhpuH 3mMZDiD4UVdp/vK3js25Mp/KqeDLScNA7nd4vbXE7GCrCZFvCid7kKwiw4AasGOXNStb/R LsXeXC5EkbT0BY/YJcKr6j+NVh1rVHMU3ngtZGzyaIblBHsn5Bnlf6qVmr8T4y4HpD27yy IFIHkuUHqTL4dATAolt1ZeBBBs1a8umHnZZVUVjoZ2jFWRNOrkLcXf22ac8c8aXxmvPqhw mCMMBUXwg+6huFojfGz5vmTPKLPxeLf+d+DY/BiOtTw36B7kYrWHNDljGacTrg== 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 28606579B9 for ; Fri, 19 Jul 2024 21:59:22 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sUtl1-000358-Sx; Fri, 19 Jul 2024 15:59:12 -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 1sUtkw-00033z-A8 for guix-patches@gnu.org; Fri, 19 Jul 2024 15:59:06 -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 1sUtkv-0001wX-W6 for guix-patches@gnu.org; Fri, 19 Jul 2024 15:59:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sUtkv-0000Gx-8n for guix-patches@gnu.org; Fri, 19 Jul 2024 15:59:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72189] [PATCH 7/7] gnu: vale: Update to 3.4.2. Resent-From: Sharlatan Hellseher Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 19 Jul 2024 19:59:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72189 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72189@debbugs.gnu.org Cc: Sharlatan Hellseher Received: via spool by 72189-submit@debbugs.gnu.org id=B72189.1721419130980 (code B ref 72189); Fri, 19 Jul 2024 19:59:05 +0000 Received: (at 72189) by debbugs.gnu.org; 19 Jul 2024 19:58:50 +0000 Received: from localhost ([127.0.0.1]:51016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUtkg-0000Fc-2p for submit@debbugs.gnu.org; Fri, 19 Jul 2024 15:58:50 -0400 Received: from mail-wm1-f45.google.com ([209.85.128.45]:48624) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sUtkc-0000E5-4H for 72189@debbugs.gnu.org; Fri, 19 Jul 2024 15:58:46 -0400 Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-427d2cc1c4eso14667555e9.1 for <72189@debbugs.gnu.org>; Fri, 19 Jul 2024 12:58:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721419061; x=1722023861; 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=LwBOWCzzZHNFarSQ4oRp/OmbpAfztRFmAvM4bxSxdi4=; b=lfbbr3NtG6abIuJKAkYlELSZXg+dmvm36YRN7qtNzSzaUwPdpJKL2hOSQxXrsT8GtF LVoGae0cqERgjMsStkQBPzNcsqjbgg660fLRS4awI8lZGnlD1yT9btMbav1Qh1eK95aM FzT3hC4QNBmUt75NcKRKtvOlsXnOlVsmoLhoq8NO6+TBmGYT2EHVGIMBUVJRHCge5lCS lEMwT5E+F/zifxaeGfemncd7pIi0+v6JLd4OiQNaT7+Rwi9xKoNh7ep8/pO252vKib9q qVzbJmwJR7pYXcJ9RkKeTJYdsP02R2BQHSWSYCunSjn845p0b/T7fjhHyylbBl+wKrW2 Y84Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721419061; x=1722023861; 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=LwBOWCzzZHNFarSQ4oRp/OmbpAfztRFmAvM4bxSxdi4=; b=Fq09LjMb1PiKJ8vIdtqnX67JeBnuGKcfXVl2G0GsUFG6L2+213BL9QCEtMhoixJ/sP tOIwvyyfrDJ3R6XOsb+rQ4LnZPiqW2F7a4v+3xqq2JPPZBnR7fczPkVI+UETIHchvMKx OvZZM8BKlBIZUcIF9Muv2YerDPViIuJstb9wNkS2faXBBaey1vBAwcv7o31TsNm7ieMF qNuwQKEwPCD1I6EDYkR0Z4FGXKPTCnkgop7YVXzcn8F21/LP323khE3wynXql2wx7fNu x4Dnn+cOxkS1+1YoBzevirEQXcfikZ9adTnW3R0v9adC5rdLD4jAkeObzNVjf8EgfWk6 S7Cw== X-Gm-Message-State: AOJu0YyDBCOnO/DTN1qokcnuC1fMhPPaToFcKFXmUvsVgRRHQPn8Z5Vj M9JUt+QJZXyD0NAbbRN3VFgosnUWBiyshaPucDFgvEvptf2QZfScEuqKoWu6 X-Google-Smtp-Source: AGHT+IFmcPPW27+DcxJlRS3fUvFZU70BkcO4W07+pwepSwxQpKmYmPYmTFVgWFh5RBEjxEvWZwwsBw== X-Received: by 2002:a05:600c:35c9:b0:426:597c:7d4d with SMTP id 5b1f17b1804b1-427c2cc0398mr63751855e9.18.1721419061030; Fri, 19 Jul 2024 12:57:41 -0700 (PDT) Received: from guxtil.incerto.xyz (bagu-15-b2-v4wan-170076-cust245.vm21.cable.virginm.net. [77.98.0.246]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-368787ec6e5sm2411559f8f.96.2024.07.19.12.57.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jul 2024 12:57:40 -0700 (PDT) From: Sharlatan Hellseher Date: Fri, 19 Jul 2024 20:57:32 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 28606579B9 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -3.81 X-Spam-Score: -3.81 X-TUID: P9f9RP4hRHZJ * gnu/packages/textutils.scm (vale): Update to 3.4.2. [source]: Change snippets removing vendored modules as they are not provided any more, to one adjusting module import path. [arguments]: <#:phases>: Add 'disable-failing-tests, 'copy-input-to-vendor-directory and 'remove-vendor-directory phases. Use custom 'check phase. [native-inputs]: Remove go-github-com-fatih-color, go-github-com-mitchellh-go-homedir, go-github-com-spf13-afero, go-github-com-urfave-cli, and go-gopkg-in-ini-v1; add go-github-com-masterminds-sprig-v3, go-github-com-adrg-strutil, go-github-com-adrg-xdg, go-github-com-bmatcuk-doublestar-v4, go-github-com-d5-tengo-v2, go-github-com-errata-ai-ini, go-github-com-errata-ai-regexp2, go-github-com-expr-lang-expr, go-github-com-jdkato-twine, go-github-com-karrick-godirwalk, go-github-com-mholt-archiver-v3, go-github-com-niklasfasching-go-org, go-github-com-otiai10-copy, go-github-com-pterm-pterm, go-github-com-remeh-sizedwaitgroup, go-github-com-spf13-pflag, go-golang-org-x-exp, and go-golang-org-x-sys. Change-Id: Ie378b419e34a924a5f1c8b383b029706d9846216 --- gnu/packages/textutils.scm | 108 +++++++++++++++++++++++++++---------- 1 file changed, 80 insertions(+), 28 deletions(-) diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm index 39205f3784..7deea364d8 100644 --- a/gnu/packages/textutils.scm +++ b/gnu/packages/textutils.scm @@ -1428,7 +1428,9 @@ (define-public aha (define-public vale (package (name "vale") - (version "2.4.0") + ;; Newer versions requires which is + ;; quite a large project to pack. + (version "3.4.2") (source (origin (method git-fetch) @@ -1436,43 +1438,93 @@ (define-public vale (url "https://github.com/errata-ai/vale") (commit (string-append "v" version)))) (sha256 - (base32 "0d07fwha2220m8j24h527xl0gnl3svvyaywflgk5292d6g49ach2")) + (base32 "15f8ggh7hpfmfpszl9qkdfz19kds6gg6x5dgcqy0v6jrcsdbgpgp")) (file-name (git-file-name name version)) (modules '((guix build utils))) - ;; Remove some available vendor modules. - ;; TODO: Pack all of them and remove vendor directory completely. (snippet - '(for-each - delete-file-recursively - (list "vendor/github.com/fatih/color" - "vendor/github.com/mitchellh/mapstructure" - "vendor/github.com/gobwas/glob" - "vendor/github.com/mitchellh/go-homedir" - "vendor/github.com/olekukonko/tablewriter" - "vendor/github.com/spf13/afero" - "vendor/github.com/urfave/cli" - "vendor/github.com/yuin/goldmark" - "vendor/golang.org/x/net/html" - "vendor/gopkg.in/ini.v1" - "vendor/gopkg.in/yaml.v2"))))) + #~(begin + ;; Module name has been changed upstream. + (substitute* (find-files "." "\\.go$") + (("github.com/antonmedv/expr") "github.com/expr-lang/expr")))))) (build-system go-build-system) (arguments - (list #:install-source? #f - #:import-path "github.com/errata-ai/vale")) + (list + #:install-source? #f + #:import-path "github.com/errata-ai/vale/cmd/vale" + #:unpack-path "github.com/errata-ai/vale" + #:phases + #~(modify-phases %standard-phases + ;; Disable tests requring network access: Get + ;; "https://raw.githubusercontent.com/errata-ai/styles/master/library.json": + ;; dial tcp: lookup raw.githubusercontent.com on [::1]:53: + ;; read udp [::1]:52621->[::1]:53: read: connection refused. + (add-after 'unpack 'disable-failing-tests + (lambda* (#:key tests? unpack-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" unpack-path) + (substitute* (find-files "." "\\_test.go$") + (("TestLibrary") "OffTestLibrary") + (("TestLocalComplete") "OffTestLocalComplete") + (("TestLocalDir") "OffTestLocalDir") + (("TestLocalOnlyStyles") "OffTestLocalOnlyStyles") + (("TestLocalZip") "OffTestLocalZip") + (("TestNoPkgFound") "OffTestNoPkgFound") + (("TestV3Pkg") "OffTestV3Pkg"))))) + ;; FIXME: Pattern embedded: cannot embed directory embedded: + ;; contains no embeddable files. + ;; + ;; This happens due to Golang can't determine the valid directory of + ;; the module which is sourced during setup environment phase, but + ;; easy resolved after coping to expected directory "vendor" within + ;; the current package, see details in Golang source: + ;; + ;; - URL: + ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454 + ;; - file: src/cmd/go/internal/load/pkg.go#L2059 + (add-before 'build 'copy-input-to-vendor-directory + (lambda* (#:key unpack-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" unpack-path) + (mkdir "vendor") + (copy-recursively + (string-append + #$(this-package-native-input "go-github-com-jdkato-twine") + "/src/github.com") + "vendor/github.com")))) + ;; XXX: Workaround for go-build-system's lack of Go modules + ;; support. + (replace 'check + (lambda* (#:key tests? unpack-path #:allow-other-keys) + (when tests? + (with-directory-excursion (string-append "src/" unpack-path) + (setenv "HOME" "/tmp") + (invoke "go" "test" "-v" "./..."))))) + (add-before 'install 'remove-vendor-directory + (lambda* (#:key unpack-path #:allow-other-keys) + (with-directory-excursion (string-append "src/" unpack-path) + (delete-file-recursively "vendor"))))))) (native-inputs - (list go-github-com-fatih-color - go-github-com-mitchellh-mapstructure + (list go-github-com-masterminds-sprig-v3 + go-github-com-adrg-strutil + go-github-com-adrg-xdg + go-github-com-bmatcuk-doublestar-v4 + go-github-com-d5-tengo-v2 + go-github-com-errata-ai-ini + go-github-com-errata-ai-regexp2 + go-github-com-expr-lang-expr go-github-com-gobwas-glob - ;; go-github-com-jdkato-prose - ;; go-github-com-jdkato-regexp - go-github-com-mitchellh-go-homedir + go-github-com-jdkato-twine + go-github-com-karrick-godirwalk + go-github-com-mholt-archiver-v3 + go-github-com-mitchellh-mapstructure + go-github-com-niklasfasching-go-org go-github-com-olekukonko-tablewriter - ;; go-github-com-remeh-sizedwaitgroup - go-github-com-spf13-afero - go-github-com-urfave-cli + go-github-com-otiai10-copy + go-github-com-pterm-pterm + go-github-com-remeh-sizedwaitgroup + go-github-com-spf13-pflag go-github-com-yuin-goldmark + go-golang-org-x-exp go-golang-org-x-net - go-gopkg-in-ini-v1 + go-golang-org-x-sys go-gopkg-in-yaml-v2)) (home-page "https://github.com/errata-ai/vale") (synopsis "Fully customizable syntax-aware linter that focuses on your style") -- 2.41.0