gnu: vale: Update to 3.4.2.
* 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: Ie378b419e34a924a5f1c8b383b029706d9846216master
parent
49d3ab2294
commit
0bf887f29c
|
@ -1428,7 +1428,9 @@ of a Unix terminal to HTML code.")
|
||||||
(define-public vale
|
(define-public vale
|
||||||
(package
|
(package
|
||||||
(name "vale")
|
(name "vale")
|
||||||
(version "2.4.0")
|
;; Newer versions requires <github.com/smacker/go-tree-sitter> which is
|
||||||
|
;; quite a large project to pack.
|
||||||
|
(version "3.4.2")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
|
@ -1436,43 +1438,93 @@ of a Unix terminal to HTML code.")
|
||||||
(url "https://github.com/errata-ai/vale")
|
(url "https://github.com/errata-ai/vale")
|
||||||
(commit (string-append "v" version))))
|
(commit (string-append "v" version))))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "0d07fwha2220m8j24h527xl0gnl3svvyaywflgk5292d6g49ach2"))
|
(base32 "15f8ggh7hpfmfpszl9qkdfz19kds6gg6x5dgcqy0v6jrcsdbgpgp"))
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(modules '((guix build utils)))
|
(modules '((guix build utils)))
|
||||||
;; Remove some available vendor modules.
|
|
||||||
;; TODO: Pack all of them and remove vendor directory completely.
|
|
||||||
(snippet
|
(snippet
|
||||||
'(for-each
|
#~(begin
|
||||||
delete-file-recursively
|
;; Module name has been changed upstream.
|
||||||
(list "vendor/github.com/fatih/color"
|
(substitute* (find-files "." "\\.go$")
|
||||||
"vendor/github.com/mitchellh/mapstructure"
|
(("github.com/antonmedv/expr") "github.com/expr-lang/expr"))))))
|
||||||
"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")))))
|
|
||||||
(build-system go-build-system)
|
(build-system go-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list #:install-source? #f
|
(list
|
||||||
#:import-path "github.com/errata-ai/vale"))
|
#: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: <https://github.com/golang/go/blob/>
|
||||||
|
;; - 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
|
(native-inputs
|
||||||
(list go-github-com-fatih-color
|
(list go-github-com-masterminds-sprig-v3
|
||||||
go-github-com-mitchellh-mapstructure
|
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-gobwas-glob
|
||||||
;; go-github-com-jdkato-prose
|
go-github-com-jdkato-twine
|
||||||
;; go-github-com-jdkato-regexp
|
go-github-com-karrick-godirwalk
|
||||||
go-github-com-mitchellh-go-homedir
|
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-olekukonko-tablewriter
|
||||||
;; go-github-com-remeh-sizedwaitgroup
|
go-github-com-otiai10-copy
|
||||||
go-github-com-spf13-afero
|
go-github-com-pterm-pterm
|
||||||
go-github-com-urfave-cli
|
go-github-com-remeh-sizedwaitgroup
|
||||||
|
go-github-com-spf13-pflag
|
||||||
go-github-com-yuin-goldmark
|
go-github-com-yuin-goldmark
|
||||||
|
go-golang-org-x-exp
|
||||||
go-golang-org-x-net
|
go-golang-org-x-net
|
||||||
go-gopkg-in-ini-v1
|
go-golang-org-x-sys
|
||||||
go-gopkg-in-yaml-v2))
|
go-gopkg-in-yaml-v2))
|
||||||
(home-page "https://github.com/errata-ai/vale")
|
(home-page "https://github.com/errata-ai/vale")
|
||||||
(synopsis "Fully customizable syntax-aware linter that focuses on your style")
|
(synopsis "Fully customizable syntax-aware linter that focuses on your style")
|
||||||
|
|
Reference in New Issue