summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2024-09-19 14:00:56 +0100
committerSharlatan Hellseher <sharlatanus@gmail.com>2024-11-09 21:33:51 +0000
commit9ff0a399438b11a5a4e248565df3512343896e1c (patch)
tree1565cb6abb41c774c9195f9b17fcd3ffb41552f9 /gnu
parent922d0170818b6f9ba55b6202825f689b645419eb (diff)
gnu: build/go: Apply default 'fix-embed-files phase.
These changes remove redundant phases where files, requiring to be embed during build or check phases, are copied to the build directory as proposed in <https://issues.guix.gnu.org/73299>. * gnu/packages/backup.scm (restic-rest-server) [arguments]: <#:phases>: Remove 'fix-embed-files phase. * gnu/packages/configuration-management.scm (chezmoi): Likewise. * gnu/packages/packages/golang-build.scm (go-github-com-golang-protobuf): Likewise. * gnu/packages/golang-web.scm (go-github-com-go-openapi-loads, go-github-com-go-openapi-runtime, go-github-com-golang-groupcache): Likewise. * gnu/packages/golang-xyz.scm (go-github-com-dgraph-io-badger): Likewise. * gnu/packages/golang.scm (go-github-com-ssgelm-cookiejarparser): Likewise. * gnu/packages/ipfs.scm (go-github-com-ipfs-go-ds-badger, go-github-com-libp2p-go-libp2p, kubo): Likewise. * gnu/packages/irc.scm (soju): Likewise. * gnu/packages/networking.scm (nebula): Likewise. * gnu/packages/prometheus.scm (go-github-com-nbrownus-go-metrics-prometheus, go-github-com-prometheus-client-golang, go-github-com-prometheus-common, go-github-com-prometheus-common-sigv4, go-github-com-prometheus-exporter-toolkit, go-github-com-prometheus-statsd-exporter): Likewise * gnu/packages/version-control.scm (git-lfs): Likewise. * gnu/packages/web.scm (miniflux): Likewise. * gnu/packages/golang-crypto.scm (go-filippo-io-age): [arguments]: <#:phases>: Remove 'copy-input-to-vendor-direcotyr and 'remove-vendor-directory phases. * gnu/packages/golang-web.scm (go-github-com-go-openapi-analysis, go-github-com-go-openapi-analysis, go-github-com-go-openapi-validate): Likewise. * gnu/packages/golang.scm (go-github-com-charmbracelet-glamour): Likewise. * gnu/packages/textutils.scm (vale): Likewise. Change-Id: Ic2ec01c8caf86f3ae69d7a1812c1e0b78a549e91
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/backup.scm18
-rw-r--r--gnu/packages/configuration-management.scm21
-rw-r--r--gnu/packages/golang-build.scm18
-rw-r--r--gnu/packages/golang-crypto.scm31
-rw-r--r--gnu/packages/golang-web.scm133
-rw-r--r--gnu/packages/golang-xyz.scm84
-rw-r--r--gnu/packages/golang.scm39
-rw-r--r--gnu/packages/ipfs.scm69
-rw-r--r--gnu/packages/irc.scm18
-rw-r--r--gnu/packages/networking.scm18
-rw-r--r--gnu/packages/prometheus.scm122
-rw-r--r--gnu/packages/textutils.scm27
-rw-r--r--gnu/packages/version-control.scm8
-rw-r--r--gnu/packages/web.scm18
14 files changed, 31 insertions, 593 deletions
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 025398888fe..0973c5ddca5 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -1058,24 +1058,6 @@ precious backup space.
1058 #:unpack-path "github.com/restic/rest-server" 1058 #:unpack-path "github.com/restic/rest-server"
1059 #:phases 1059 #:phases
1060 #~(modify-phases %standard-phases 1060 #~(modify-phases %standard-phases
1061 ;; TODO: Implement it in go-build-system.
1062 ;;
1063 ;; This happens due to Golang can't determine the valid directory of
1064 ;; the module of embed file which is symlinked during setup
1065 ;; environment phase, but easy resolved after coping file from the
1066 ;; store to the build directory of the current package, see details
1067 ;; in Golang source:
1068 ;;
1069 ;; - URL: <https://github.com/golang/go/blob/>
1070 ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
1071 ;; - file: src/cmd/go/internal/load/pkg.go#L2059
1072 (add-after 'unpack 'fix-embed-files
1073 (lambda _
1074 (for-each (lambda (file)
1075 (let ((file-store-path (readlink file)))
1076 (delete-file file)
1077 (copy-recursively file-store-path file)))
1078 (find-files "src" ".*(editions_defaults.binpb)$"))))
1079 ;; Unit tests seems to break with Guix' non-standard TMPDIR. 1061 ;; Unit tests seems to break with Guix' non-standard TMPDIR.
1080 (add-before 'check 'set-tmpdir 1062 (add-before 'check 'set-tmpdir
1081 (lambda _ 1063 (lambda _
diff --git a/gnu/packages/configuration-management.scm b/gnu/packages/configuration-management.scm
index 6d81f0dcaca..b654975a42e 100644
--- a/gnu/packages/configuration-management.scm
+++ b/gnu/packages/configuration-management.scm
@@ -50,6 +50,7 @@
50 (arguments 50 (arguments
51 (list 51 (list
52 #:import-path "github.com/twpayne/chezmoi" 52 #:import-path "github.com/twpayne/chezmoi"
53 #:embed-files #~(list ".*\\.xml")
53 #:install-source? #f 54 #:install-source? #f
54 #:phases 55 #:phases
55 #~(modify-phases %standard-phases 56 #~(modify-phases %standard-phases
@@ -80,25 +81,7 @@
80 "secretkeepassxc.txt" 81 "secretkeepassxc.txt"
81 "secretlastpass.txt" 82 "secretlastpass.txt"
82 "secretonepassword.txt" 83 "secretonepassword.txt"
83 "secretpass.txt")))) 84 "secretpass.txt")))))))
84 ;; TODO: Implement it in go-build-system.
85 ;;
86 ;; This happens due to Golang can't determine the valid directory of
87 ;; the module of embed file which is symlinked during setup
88 ;; environment phase, but easy resolved after coping file from the
89 ;; store to the build directory of the current package, see details
90 ;; in Golang source:
91 ;;
92 ;; - URL: <https://github.com/golang/go/blob/>
93 ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
94 ;; - file: src/cmd/go/internal/load/pkg.go#L2059
95 (add-after 'unpack 'fix-embed-files
96 (lambda _
97 (for-each (lambda (file)
98 (let ((file-store-path (readlink file)))
99 (delete-file file)
100 (copy-recursively file-store-path file)))
101 (find-files "src" (string-append "\\.xml$"))))))))
102 (native-inputs 85 (native-inputs
103 (list go-github-com-masterminds-sprig-v3 86 (list go-github-com-masterminds-sprig-v3
104 go-github-com-bmatcuk-doublestar-v2 87 go-github-com-bmatcuk-doublestar-v2
diff --git a/gnu/packages/golang-build.scm b/gnu/packages/golang-build.scm
index 8fdd652b636..7049acf8c2b 100644
--- a/gnu/packages/golang-build.scm
+++ b/gnu/packages/golang-build.scm
@@ -103,24 +103,6 @@ functions that have a name matched by regex:.")
103 #:import-path "github.com/golang/protobuf" 103 #:import-path "github.com/golang/protobuf"
104 #:phases 104 #:phases
105 #~(modify-phases %standard-phases 105 #~(modify-phases %standard-phases
106 ;; TODO: Implement it in go-build-system.
107 ;;
108 ;; This happens due to Golang can't determine the valid directory of
109 ;; the module of embed file which is symlinked during setup
110 ;; environment phase, but easy resolved after coping file from the
111 ;; store to the build directory of the current package, see details
112 ;; in Golang source:
113 ;;
114 ;; - URL: <https://github.com/golang/go/blob/>
115 ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
116 ;; - file: src/cmd/go/internal/load/pkg.go#L2059
117 (add-after 'unpack 'fix-embed-files
118 (lambda _
119 (for-each (lambda (file)
120 (let ((file-store-path (readlink file)))
121 (delete-file file)
122 (copy-recursively file-store-path file)))
123 (find-files "src" ".*(editions_defaults.binpb)$"))))
124 ;; XXX: Workaround for go-build-system's lack of Go modules 106 ;; XXX: Workaround for go-build-system's lack of Go modules
125 ;; support. 107 ;; support.
126 (delete 'build) 108 (delete 'build)
diff --git a/gnu/packages/golang-crypto.scm b/gnu/packages/golang-crypto.scm
index 016592e7769..9a845612a31 100644
--- a/gnu/packages/golang-crypto.scm
+++ b/gnu/packages/golang-crypto.scm
@@ -137,33 +137,10 @@ can be ignored.")
137 (build-system go-build-system) 137 (build-system go-build-system)
138 (arguments 138 (arguments
139 (list 139 (list
140 #:import-path "filippo.io/age" 140 #:embed-files #~(list "armor.*" "header_crlf" "hmac_.*" "scrypt.*"
141 #:phases 141 "stanza_.*" "stream_.*" "version_unsupported"
142 #~(modify-phases %standard-phases 142 "x25519.*" "x25519_.*")
143 ;; FIXME: src/c2sp.org/CCTV/age/age.go:13:12: pattern testdata: 143 #:import-path "filippo.io/age"))
144 ;; cannot embed directory testdata: contains no embeddable files
145 ;;
146 ;; This happens due to Golang can't determine the valid directory of
147 ;; the module which is sourced during setup environment phase, but
148 ;; easy resolved after coping to expected directory "vendor" within
149 ;; the current package, see details in Golang source:
150 ;;
151 ;; - URL: <https://github.com/golang/go/blob/>
152 ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
153 ;; - file: src/cmd/go/internal/load/pkg.go#L2059
154 (add-before 'build 'copy-input-to-vendor-directory
155 (lambda* (#:key import-path #:allow-other-keys)
156 (with-directory-excursion (string-append "src/" import-path)
157 (mkdir "vendor")
158 (copy-recursively
159 (string-append
160 #$(this-package-native-input "go-c2sp-org-cctv-age")
161 "/src/c2sp.org")
162 "vendor/c2sp.org"))))
163 (add-before 'install 'remove-vendor-directory
164 (lambda* (#:key import-path #:allow-other-keys)
165 (with-directory-excursion (string-append "src/" import-path)
166 (delete-file-recursively "vendor")))))))
167 (native-inputs 144 (native-inputs
168 (list go-c2sp-org-cctv-age 145 (list go-c2sp-org-cctv-age
169 go-github-com-rogpeppe-go-internal)) 146 go-github-com-rogpeppe-go-internal))
diff --git a/gnu/packages/golang-web.scm b/gnu/packages/golang-web.scm
index 9bfb01072b4..885b93d63d0 100644
--- a/gnu/packages/golang-web.scm
+++ b/gnu/packages/golang-web.scm
@@ -1596,6 +1596,7 @@ language.")
1596 (build-system go-build-system) 1596 (build-system go-build-system)
1597 (arguments 1597 (arguments
1598 (list 1598 (list
1599 #:embed-files #~(list "jsonschema-draft-04\\.json" "schema\\.json")
1599 #:import-path "github.com/go-openapi/analysis" 1600 #:import-path "github.com/go-openapi/analysis"
1600 #:phases 1601 #:phases
1601 #~(modify-phases %standard-phases 1602 #~(modify-phases %standard-phases
@@ -1606,35 +1607,11 @@ language.")
1606 ;; Tests requiring network access. 1607 ;; Tests requiring network access.
1607 (("TestFlatten_RemoteAbsolute") 1608 (("TestFlatten_RemoteAbsolute")
1608 "OffTestFlatten_RemoteAbsolute"))))) 1609 "OffTestFlatten_RemoteAbsolute")))))
1609 ;; FIXME: pattern schemas/*.json: cannot embed irregular file
1610 ;; schemas/jsonschema-draft-04.json
1611 ;;
1612 ;; This happens due to Golang can't determine the valid directory of
1613 ;; the module which is sourced during setup environment phase, but
1614 ;; easy resolved after coping to expected directory "vendor" within
1615 ;; the current package, see details in Golang source:
1616 ;;
1617 ;; - URL: <https://github.com/golang/go/blob/>
1618 ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
1619 ;; - file: src/cmd/go/internal/load/pkg.go#L2059
1620 (add-before 'build 'copy-input-to-vendor-directory
1621 (lambda* (#:key import-path #:allow-other-keys)
1622 (with-directory-excursion (string-append "src/" import-path)
1623 (mkdir "vendor")
1624 (copy-recursively
1625 (string-append
1626 #$(this-package-input "go-github-com-go-openapi-spec")
1627 "/src/github.com")
1628 "vendor/github.com"))))
1629 (replace 'check 1610 (replace 'check
1630 (lambda* (#:key tests? import-path #:allow-other-keys) 1611 (lambda* (#:key tests? import-path #:allow-other-keys)
1631 (when tests? 1612 (when tests?
1632 (with-directory-excursion (string-append "src/" import-path) 1613 (with-directory-excursion (string-append "src/" import-path)
1633 (invoke "go" "test" "-v" "./..."))))) 1614 (invoke "go" "test" "-v" "./..."))))))))
1634 (add-before 'install 'remove-vendor-directory
1635 (lambda* (#:key import-path #:allow-other-keys)
1636 (with-directory-excursion (string-append "src/" import-path)
1637 (delete-file-recursively "vendor")))))))
1638 (native-inputs 1615 (native-inputs
1639 (list go-github-com-stretchr-testify)) 1616 (list go-github-com-stretchr-testify))
1640 (propagated-inputs 1617 (propagated-inputs
@@ -1749,28 +1726,8 @@ prototyped in @url{https://github.com/xeipuuv/gojsonreference}.")
1749 (build-system go-build-system) 1726 (build-system go-build-system)
1750 (arguments 1727 (arguments
1751 (list 1728 (list
1752 #:import-path "github.com/go-openapi/loads" 1729 #:embed-files #~(list "jsonschema-draft-04\\.json" "schema\\.json")
1753 #:phases 1730 #:import-path "github.com/go-openapi/loads"))
1754 #~(modify-phases %standard-phases
1755 ;; TODO: Implement it in go-build-system.
1756 ;;
1757 ;; This happens due to Golang can't determine the valid directory of
1758 ;; the module of embed file which is symlinked during setup
1759 ;; environment phase, but easy resolved after coping file from the
1760 ;; store to the build directory of the current package, see details
1761 ;; in Golang source:
1762 ;;
1763 ;; - URL: <https://github.com/golang/go/blob/>
1764 ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
1765 ;; - file: src/cmd/go/internal/load/pkg.go#L2059
1766 (add-after 'unpack 'fix-embed-files
1767 (lambda _
1768 (for-each (lambda (file)
1769 (let ((file-store-path (readlink file)))
1770 (delete-file file)
1771 (copy-recursively file-store-path file)))
1772 (find-files "src"
1773 "^(jsonschema-draft-04|schema)\\.json$")))))))
1774 (native-inputs 1731 (native-inputs
1775 (list go-github-com-stretchr-testify)) 1732 (list go-github-com-stretchr-testify))
1776 (propagated-inputs 1733 (propagated-inputs
@@ -1802,27 +1759,8 @@ Supports JSON and YAML documents.")
1802 (build-system go-build-system) 1759 (build-system go-build-system)
1803 (arguments 1760 (arguments
1804 (list 1761 (list
1805 #:import-path "github.com/go-openapi/runtime" 1762 #:embed-files #~(list "jsonschema-draft-04\\.json" "schema\\.json")
1806 #:phases 1763 #:import-path "github.com/go-openapi/runtime"))
1807 #~(modify-phases %standard-phases
1808 ;; TODO: Implement it in go-build-system.
1809 ;;
1810 ;; This happens due to Golang can't determine the valid directory of
1811 ;; the module of embed file which is symlinked during setup
1812 ;; environment phase, but easy resolved after coping file from the
1813 ;; store to the build directory of the current package, see details
1814 ;; in Golang source:
1815 ;;
1816 ;; - URL: <https://github.com/golang/go/blob/>
1817 ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
1818 ;; - file: src/cmd/go/internal/load/pkg.go#L2059
1819 (add-after 'unpack 'fix-embed-files
1820 (lambda _
1821 (for-each (lambda (file)
1822 (let ((file-store-path (readlink file)))
1823 (delete-file file)
1824 (copy-recursively file-store-path file)))
1825 (find-files "src" "\\.json$")))))))
1826 (native-inputs 1764 (native-inputs
1827 (list go-github-com-stretchr-testify)) 1765 (list go-github-com-stretchr-testify))
1828 (propagated-inputs 1766 (propagated-inputs
@@ -1957,6 +1895,7 @@ projects.")
1957 (build-system go-build-system) 1895 (build-system go-build-system)
1958 (arguments 1896 (arguments
1959 (list 1897 (list
1898 #:embed-files #~(list "jsonschema-draft-04\\.json" "schema\\.json")
1960 #:import-path "github.com/go-openapi/validate" 1899 #:import-path "github.com/go-openapi/validate"
1961 #:phases 1900 #:phases
1962 #~(modify-phases %standard-phases 1901 #~(modify-phases %standard-phases
@@ -1967,41 +1906,7 @@ projects.")
1967 (for-each delete-file 1906 (for-each delete-file
1968 (list "benchmark_test.go" 1907 (list "benchmark_test.go"
1969 "example_validator_test.go" 1908 "example_validator_test.go"
1970 "doc_test.go"))))) 1909 "doc_test.go"))))))))
1971 ;; FIXME: pattern schemas/*.json: cannot embed irregular file
1972 ;; schemas/jsonschema-draft-04.json
1973 ;;
1974 ;; This happens due to Golang can't determine the valid directory of
1975 ;; the module which is sourced during setup environment phase, but
1976 ;; easy resolved after coping to expected directory "vendor" within
1977 ;; the current package, see details in Golang source:
1978 ;;
1979 ;; - URL: <https://github.com/golang/go/blob/>
1980 ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
1981 ;; - file: src/cmd/go/internal/load/pkg.go#L2059
1982 (add-before 'build 'copy-input-to-vendor-directory
1983 (lambda* (#:key import-path #:allow-other-keys)
1984 (with-directory-excursion (string-append "src/" import-path)
1985 (mkdir "vendor")
1986 (copy-recursively
1987 (string-append
1988 #$(this-package-input "go-github-com-go-openapi-loads")
1989 "/src/github.com")
1990 "vendor/github.com")
1991 (copy-recursively
1992 (string-append
1993 #$(this-package-input "go-github-com-go-openapi-spec")
1994 "/src/github.com")
1995 "vendor/github.com")
1996 (copy-recursively
1997 (string-append
1998 #$(this-package-input "go-github-com-go-openapi-analysis")
1999 "/src/github.com")
2000 "vendor/github.com"))))
2001 (add-before 'install 'remove-vendor-directory
2002 (lambda* (#:key import-path #:allow-other-keys)
2003 (with-directory-excursion (string-append "src/" import-path)
2004 (delete-file-recursively "vendor")))))))
2005 (native-inputs 1910 (native-inputs
2006 (list go-github-com-stretchr-testify)) 1911 (list go-github-com-stretchr-testify))
2007 (propagated-inputs 1912 (propagated-inputs
@@ -2169,27 +2074,7 @@ from CloudFlare's github.com/cloudflare/cfssl/revoke.")
2169 (build-system go-build-system) 2074 (build-system go-build-system)
2170 (arguments 2075 (arguments
2171 (list 2076 (list
2172 #:import-path "github.com/golang/groupcache" 2077 #:import-path "github.com/golang/groupcache"))
2173 #:phases
2174 #~(modify-phases %standard-phases
2175 ;; TODO: Implement it in go-build-system.
2176 ;;
2177 ;; This happens due to Golang can't determine the valid directory of
2178 ;; the module of embed file which is symlinked during setup
2179 ;; environment phase, but easy resolved after coping file from the
2180 ;; store to the build directory of the current package, see details
2181 ;; in Golang source:
2182 ;;
2183 ;; - URL: <https://github.com/golang/go/blob/>
2184 ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
2185 ;; - file: src/cmd/go/internal/load/pkg.go#L2059
2186 (add-after 'unpack 'fix-embed-files
2187 (lambda _
2188 (for-each (lambda (file)
2189 (let ((file-store-path (readlink file)))
2190 (delete-file file)
2191 (copy-recursively file-store-path file)))
2192 (find-files "src" ".*(editions_defaults.binpb)$")))))))
2193 (propagated-inputs 2078 (propagated-inputs
2194 (list go-github-com-golang-protobuf)) 2079 (list go-github-com-golang-protobuf))
2195 (home-page "https://github.com/golang/groupcache") 2080 (home-page "https://github.com/golang/groupcache")
diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index 14ad1fcbd5b..d3738450cf9 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -2110,25 +2110,6 @@ encoding/decoding. It has no dependencies.")
2110 #:import-path "github.com/dgraph-io/badger" 2110 #:import-path "github.com/dgraph-io/badger"
2111 #:phases 2111 #:phases
2112 #~(modify-phases %standard-phases 2112 #~(modify-phases %standard-phases
2113 ;; TODO: Implement it in go-build-system.
2114 ;;
2115 ;; This happens due to Golang can't determine the valid directory of
2116 ;; the module of embed file which is symlinked during setup
2117 ;; environment phase, but easy resolved after coping file from the
2118 ;; store to the build directory of the current package, see details
2119 ;; in Golang source:
2120 ;;
2121 ;; - URL: <https://github.com/golang/go/blob/>
2122 ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
2123 ;; - file: src/cmd/go/internal/load/pkg.go#L2059
2124 (add-after 'unpack 'fix-embed-files
2125 (lambda _
2126 (for-each (lambda (file)
2127 (let ((file-store-path (readlink file)))
2128 (delete-file file)
2129 (copy-recursively file-store-path file)))
2130 (find-files "src" (string-append
2131 ".*(editions_defaults.binpb)$")))))
2132 (add-after 'unpack 'patch-failing-tests 2113 (add-after 'unpack 'patch-failing-tests
2133 (lambda* (#:key unpack-path tests? #:allow-other-keys) 2114 (lambda* (#:key unpack-path tests? #:allow-other-keys)
2134 (with-directory-excursion (string-append "src/" unpack-path) 2115 (with-directory-excursion (string-append "src/" unpack-path)
@@ -4595,24 +4576,6 @@ allocator. This is primarily useful for long lived buffers that usually sit emp
4595 #:import-path "github.com/libp2p/go-msgio" 4576 #:import-path "github.com/libp2p/go-msgio"
4596 #:phases 4577 #:phases
4597 #~(modify-phases %standard-phases 4578 #~(modify-phases %standard-phases
4598 ;; TODO: Implement it in go-build-system.
4599 ;;
4600 ;; This happens due to Golang can't determine the valid directory of
4601 ;; the module of embed file which is symlinked during setup
4602 ;; environment phase, but easy resolved after coping file from the
4603 ;; store to the build directory of the current package, see details
4604 ;; in Golang source:
4605 ;;
4606 ;; - URL: <https://github.com/golang/go/blob/>
4607 ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
4608 ;; - file: src/cmd/go/internal/load/pkg.go#L2059
4609 (add-after 'unpack 'fix-embed-files
4610 (lambda _
4611 (for-each (lambda (file)
4612 (let ((file-store-path (readlink file)))
4613 (delete-file file)
4614 (copy-recursively file-store-path file)))
4615 (find-files "src" ".*(editions_defaults.binpb)$"))))
4616 ;; XXX: Replace when go-build-system supports nested path. 4579 ;; XXX: Replace when go-build-system supports nested path.
4617 (replace 'check 4580 (replace 'check
4618 (lambda* (#:key import-path tests? #:allow-other-keys) 4581 (lambda* (#:key import-path tests? #:allow-other-keys)
@@ -5164,24 +5127,6 @@ other directories. It is optimized for filewalking.")
5164 #:import-path "github.com/matttproud/golang_protobuf_extensions/v2" 5127 #:import-path "github.com/matttproud/golang_protobuf_extensions/v2"
5165 #:phases 5128 #:phases
5166 #~(modify-phases %standard-phases 5129 #~(modify-phases %standard-phases
5167 ;; TODO: Implement it in go-build-system.
5168 ;;
5169 ;; This happens due to Golang can't determine the valid directory of
5170 ;; the module of embed file which is symlinked during setup
5171 ;; environment phase, but easy resolved after coping file from the
5172 ;; store to the build directory of the current package, see details
5173 ;; in Golang source:
5174 ;;
5175 ;; - URL: <https://github.com/golang/go/blob/>
5176 ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
5177 ;; - file: src/cmd/go/internal/load/pkg.go#L2059
5178 (add-after 'unpack 'fix-embed-files
5179 (lambda _
5180 (for-each (lambda (file)
5181 (let ((file-store-path (readlink file)))
5182 (delete-file file)
5183 (copy-recursively file-store-path file)))
5184 (find-files "src" ".*(editions_defaults.binpb)$"))))
5185 ;; XXX: Activate when go-build-system supports submodules. 5130 ;; XXX: Activate when go-build-system supports submodules.
5186 (delete 'build) 5131 (delete 'build)
5187 ;; XXX: Replace when go-build-system supports nested path. 5132 ;; XXX: Replace when go-build-system supports nested path.
@@ -5776,33 +5721,8 @@ list of sentences.")
5776 (build-system go-build-system) 5721 (build-system go-build-system)
5777 (arguments 5722 (arguments
5778 (list 5723 (list
5779 #:import-path "github.com/niklasfasching/go-org" 5724 #:embed-files #~(list ".*\\.xml")
5780 #:phases 5725 #:import-path "github.com/niklasfasching/go-org"))
5781 #~(modify-phases %standard-phases
5782 ;; FIXME: Pattern embedded: cannot embed directory embedded:
5783 ;; contains no embeddable files.
5784 ;;
5785 ;; This happens due to Golang can't determine the valid directory of
5786 ;; the module which is sourced during setup environment phase, but
5787 ;; easy resolved after coping to expected directory "vendor" within
5788 ;; the current package, see details in Golang source:
5789 ;;
5790 ;; - URL: <https://github.com/golang/go/blob/>
5791 ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
5792 ;; - file: src/cmd/go/internal/load/pkg.go#L2059
5793 (add-before 'build 'copy-input-to-vendor-directory
5794 (lambda* (#:key import-path #:allow-other-keys)
5795 (with-directory-excursion (string-append "src/" import-path)
5796 (mkdir "vendor")
5797 (copy-recursively
5798 (string-append
5799 #$(this-package-input "go-github-com-alecthomas-chroma-v2")
5800 "/src/github.com")
5801 "vendor/github.com"))))
5802 (add-before 'install 'remove-vendor-directory
5803 (lambda* (#:key import-path #:allow-other-keys)
5804 (with-directory-excursion (string-append "src/" import-path)
5805 (delete-file-recursively "vendor")))))))
5806 (propagated-inputs 5726 (propagated-inputs
5807 (list go-golang-org-x-net 5727 (list go-golang-org-x-net
5808 go-github-com-pmezard-go-difflib 5728 go-github-com-pmezard-go-difflib
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 8887e36da29..612a4896da6 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -5899,6 +5899,7 @@ size of the terminal.")
5899 (build-system go-build-system) 5899 (build-system go-build-system)
5900 (arguments 5900 (arguments
5901 (list 5901 (list
5902 #:embed-files #~(list ".*\\.xml")
5902 #:import-path "github.com/charmbracelet/glamour" 5903 #:import-path "github.com/charmbracelet/glamour"
5903 #:phases 5904 #:phases
5904 #~(modify-phases %standard-phases 5905 #~(modify-phases %standard-phases
@@ -5912,31 +5913,7 @@ size of the terminal.")
5912 #o644) 5913 #o644)
5913 (substitute* "src/github.com/charmbracelet/glamour/glamour_test.go" 5914 (substitute* "src/github.com/charmbracelet/glamour/glamour_test.go"
5914 ((" generate = false") 5915 ((" generate = false")
5915 " generate = true")))) 5916 " generate = true")))))))
5916 ;; FIXME: Pattern embedded: cannot embed directory embedded:
5917 ;; contains no embeddable files.
5918 ;;
5919 ;; This happens due to Golang can't determine the valid directory of
5920 ;; the module which is sourced during setup environment phase, but
5921 ;; easy resolved after coping to expected directory "vendor" within
5922 ;; the current package, see details in Golang source:
5923 ;;
5924 ;; - URL: <https://github.com/golang/go/blob/>
5925 ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
5926 ;; - file: src/cmd/go/internal/load/pkg.go#L2059
5927 (add-before 'build 'copy-input-to-vendor-directory
5928 (lambda* (#:key import-path #:allow-other-keys)
5929 (with-directory-excursion (string-append "src/" import-path)
5930 (mkdir "vendor")
5931 (copy-recursively
5932 (string-append
5933 #$(this-package-input "go-github-com-alecthomas-chroma-v2")
5934 "/src/github.com")
5935 "vendor/github.com"))))
5936 (add-before 'install 'remove-vendor-directory
5937 (lambda* (#:key import-path #:allow-other-keys)
5938 (with-directory-excursion (string-append "src/" import-path)
5939 (delete-file-recursively "vendor")))))))
5940 (propagated-inputs 5917 (propagated-inputs
5941 (list go-github-com-alecthomas-chroma-v2 5918 (list go-github-com-alecthomas-chroma-v2
5942 go-github-com-microcosm-cc-bluemonday 5919 go-github-com-microcosm-cc-bluemonday
@@ -7763,16 +7740,8 @@ of the current user.")
7763 (build-system go-build-system) 7740 (build-system go-build-system)
7764 (arguments 7741 (arguments
7765 (list 7742 (list
7766 #:import-path "github.com/ssgelm/cookiejarparser" 7743 #:embed-files #~(list "children" "nodes" "text")
7767 #:phases 7744 #:import-path "github.com/ssgelm/cookiejarparser"))
7768 #~(modify-phases %standard-phases
7769 (add-after 'unpack 'fix-embed-x-net
7770 (lambda _
7771 (delete-file-recursively "src/golang.org/x/net/publicsuffix/data")
7772 (copy-recursively
7773 #$(file-append (this-package-input "go-golang-org-x-net")
7774 "/src/golang.org/x/net/publicsuffix/data")
7775 "src/golang.org/x/net/publicsuffix/data"))))))
7776 (propagated-inputs (list go-golang-org-x-net)) 7745 (propagated-inputs (list go-golang-org-x-net))
7777 (home-page "https://github.com/ssgelm/cookiejarparser") 7746 (home-page "https://github.com/ssgelm/cookiejarparser")
7778 (synopsis "Parse a curl cookiejar with Go") 7747 (synopsis "Parse a curl cookiejar with Go")
diff --git a/gnu/packages/ipfs.scm b/gnu/packages/ipfs.scm
index f01f5f53c1c..d5849a3f18f 100644
--- a/gnu/packages/ipfs.scm
+++ b/gnu/packages/ipfs.scm
@@ -354,27 +354,7 @@ throughout its lifetime.")
354 (list 354 (list
355 ;; XXX: Tests time out, figure out workaround. 355 ;; XXX: Tests time out, figure out workaround.
356 #:tests? #f 356 #:tests? #f
357 #:import-path "github.com/ipfs/go-ds-badger" 357 #:import-path "github.com/ipfs/go-ds-badger"))
358 #:phases
359 #~(modify-phases %standard-phases
360 ;; TODO: Implement it in go-build-system.
361 ;;
362 ;; This happens due to Golang can't determine the valid directory of
363 ;; the module of embed file which is symlinked during setup
364 ;; environment phase, but easy resolved after coping file from the
365 ;; store to the build directory of the current package, see details
366 ;; in Golang source:
367 ;;
368 ;; - URL: <https://github.com/golang/go/blob/>
369 ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
370 ;; - file: src/cmd/go/internal/load/pkg.go#L2059
371 (add-after 'unpack 'fix-embed-files
372 (lambda _
373 (for-each (lambda (file)
374 (let ((file-store-path (readlink file)))
375 (delete-file file)
376 (copy-recursively file-store-path file)))
377 (find-files "src" ".*(editions_defaults.binpb)$")))))))
378 (propagated-inputs 358 (propagated-inputs
379 (list go-github-com-dgraph-io-badger 359 (list go-github-com-dgraph-io-badger
380 go-github-com-ipfs-go-datastore 360 go-github-com-ipfs-go-datastore
@@ -854,30 +834,8 @@ their levels to be controlled individually.")
854 (build-system go-build-system) 834 (build-system go-build-system)
855 (arguments 835 (arguments
856 (list 836 (list
857 #:import-path "github.com/libp2p/go-libp2p" 837 #:embed-files #~(list "sorted-network-list.bin")
858 #:phases 838 #:import-path "github.com/libp2p/go-libp2p"))
859 #~(modify-phases %standard-phases
860 ;; TODO: Implement it in go-build-system.
861 ;;
862 ;; This happens due to Golang can't determine the valid directory of
863 ;; the module of embed file which is symlinked during setup
864 ;; environment phase, but easy resolved after coping file from the
865 ;; store to the build directory of the current package, see details
866 ;; in Golang source:
867 ;;
868 ;; - URL: <https://github.com/golang/go/blob/>
869 ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
870 ;; - file: src/cmd/go/internal/load/pkg.go#L2059
871 (add-after 'unpack 'fix-embed-files
872 (lambda _
873 (for-each
874 (lambda (file)
875 (let ((file-store-path (readlink file)))
876 (delete-file file)
877 (copy-recursively file-store-path file)))
878 (find-files "src" (string-append
879 ".*(editions_defaults.binpb"
880 "|sorted-network-list.bin)$"))))))))
881 (propagated-inputs 839 (propagated-inputs
882 (list go-github-com-benbjohnson-clock 840 (list go-github-com-benbjohnson-clock
883 go-github-com-davidlazar-go-crypto 841 go-github-com-davidlazar-go-crypto
@@ -1098,30 +1056,11 @@ types.")
1098 (build-system go-build-system) 1056 (build-system go-build-system)
1099 (arguments 1057 (arguments
1100 (list 1058 (list
1059 #:embed-files #~(list "sorted-network-list.bin")
1101 #:unpack-path "github.com/ipfs/kubo" 1060 #:unpack-path "github.com/ipfs/kubo"
1102 #:import-path "github.com/ipfs/kubo/cmd/ipfs" 1061 #:import-path "github.com/ipfs/kubo/cmd/ipfs"
1103 #:phases 1062 #:phases
1104 #~(modify-phases %standard-phases 1063 #~(modify-phases %standard-phases
1105 ;; TODO: Implement it in go-build-system.
1106 ;;
1107 ;; This happens due to Golang can't determine the valid directory of
1108 ;; the module of embed file which is symlinked during setup
1109 ;; environment phase, but easy resolved after coping file from the
1110 ;; store to the build directory of the current package, see details
1111 ;; in Golang source:
1112 ;;
1113 ;; - URL: <https://github.com/golang/go/blob/>
1114 ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
1115 ;; - file: src/cmd/go/internal/load/pkg.go#L2059
1116 (add-after 'unpack 'fix-embed-files
1117 (lambda _
1118 (for-each (lambda (file)
1119 (let ((file-store-path (readlink file)))
1120 (delete-file file)
1121 (copy-recursively file-store-path file)))
1122 (find-files "src" (string-append
1123 ".*(editions_defaults.binpb"
1124 "|sorted-network-list.bin)$")))))
1125 ;; https://github.com/ipfs/kubo/blob/master/docs/command-completion.md 1064 ;; https://github.com/ipfs/kubo/blob/master/docs/command-completion.md
1126 (add-after 'install 'install-bashcompletion 1065 (add-after 'install 'install-bashcompletion
1127 (lambda _ 1066 (lambda _
diff --git a/gnu/packages/irc.scm b/gnu/packages/irc.scm
index e75432673ed..51bd43869ed 100644
--- a/gnu/packages/irc.scm
+++ b/gnu/packages/irc.scm
@@ -1160,24 +1160,6 @@ what.")
1160 #:import-path "codeberg.org/emersion/soju" 1160 #:import-path "codeberg.org/emersion/soju"
1161 #:phases 1161 #:phases
1162 #~(modify-phases %standard-phases 1162 #~(modify-phases %standard-phases
1163 ;; TODO: Implement it in go-build-system.
1164 ;;
1165 ;; This happens due to Golang can't determine the valid directory of
1166 ;; the module of embed file which is symlinked during setup
1167 ;; environment phase, but easy resolved after coping file from the
1168 ;; store to the build directory of the current package, see details
1169 ;; in Golang source:
1170 ;;
1171 ;; - URL: <https://github.com/golang/go/blob/>
1172 ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
1173 ;; - file: src/cmd/go/internal/load/pkg.go#L2059
1174 (add-after 'unpack 'fix-embed-files
1175 (lambda _
1176 (for-each (lambda (file)
1177 (let ((file-store-path (readlink file)))
1178 (delete-file file)
1179 (copy-recursively file-store-path file)))
1180 (find-files "src" ".*(editions_defaults.binpb)$"))))
1181 (add-after 'unpack 'adjust-makefile 1163 (add-after 'unpack 'adjust-makefile
1182 (lambda* (#:key import-path #:allow-other-keys) 1164 (lambda* (#:key import-path #:allow-other-keys)
1183 (with-directory-excursion (string-append "src/" import-path) 1165 (with-directory-excursion (string-append "src/" import-path)
diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm
index 8cd49992ec5..6e3a355bd43 100644
--- a/gnu/packages/networking.scm
+++ b/gnu/packages/networking.scm
@@ -4779,24 +4779,6 @@ IPv6 Internet connectivity - it also works over IPv4.")
4779 #:install-source? #f 4779 #:install-source? #f
4780 #:phases 4780 #:phases
4781 #~(modify-phases %standard-phases 4781 #~(modify-phases %standard-phases
4782 ;; TODO: Implement it in go-build-system.
4783 ;;
4784 ;; This happens due to Golang can't determine the valid directory of
4785 ;; the module of embed file which is symlinked during setup
4786 ;; environment phase, but easy resolved after coping file from the
4787 ;; store to the build directory of the current package, see details
4788 ;; in Golang source:
4789 ;;
4790 ;; - URL: <https://github.com/golang/go/blob/>
4791 ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
4792 ;; - file: src/cmd/go/internal/load/pkg.go#L2059
4793 (add-after 'unpack 'fix-embed-files
4794 (lambda _
4795 (for-each (lambda (file)
4796 (let ((file-store-path (readlink file)))
4797 (delete-file file)
4798 (copy-recursively file-store-path file)))
4799 (find-files "src" ".*(editions_defaults.binpb)$"))))
4800 (replace 'build 4782 (replace 'build
4801 (lambda* (#:key import-path #:allow-other-keys) 4783 (lambda* (#:key import-path #:allow-other-keys)
4802 ;; Suggested option to provide build time flags is not supported 4784 ;; Suggested option to provide build time flags is not supported
diff --git a/gnu/packages/prometheus.scm b/gnu/packages/prometheus.scm
index fe2fa18e957..3e3a51b8057 100644
--- a/gnu/packages/prometheus.scm
+++ b/gnu/packages/prometheus.scm
@@ -112,27 +112,7 @@ x/net/trace)} tracing wrappers @code{net.Conn}, both inbound
112 ;; The project looks abandoned, tests failed with a new go-metrics, see 112 ;; The project looks abandoned, tests failed with a new go-metrics, see
113 ;; <https://github.com/nbrownus/go-metrics-prometheus/pull/2>. 113 ;; <https://github.com/nbrownus/go-metrics-prometheus/pull/2>.
114 #:tests? #f 114 #:tests? #f
115 #:import-path "github.com/nbrownus/go-metrics-prometheus" 115 #:import-path "github.com/nbrownus/go-metrics-prometheus"))
116 #:phases
117 #~(modify-phases %standard-phases
118 ;; TODO: Implement it in go-build-system.
119 ;;
120 ;; This happens due to Golang can't determine the valid directory of
121 ;; the module of embed file which is symlinked during setup
122 ;; environment phase, but easy resolved after coping file from the
123 ;; store to the build directory of the current package, see details
124 ;; in Golang source:
125 ;;
126 ;; - URL: <https://github.com/golang/go/blob/>
127 ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
128 ;; - file: src/cmd/go/internal/load/pkg.go#L2059
129 (add-after 'unpack 'fix-embed-files
130 (lambda _
131 (for-each (lambda (file)
132 (let ((file-store-path (readlink file)))
133 (delete-file file)
134 (copy-recursively file-store-path file)))
135 (find-files "src" ".*(editions_defaults.binpb)$")))))))
136 (native-inputs 116 (native-inputs
137 (list go-github-com-stretchr-testify)) 117 (list go-github-com-stretchr-testify))
138 (propagated-inputs 118 (propagated-inputs
@@ -169,25 +149,6 @@ registry.")
169 #:import-path "github.com/prometheus/client_golang" 149 #:import-path "github.com/prometheus/client_golang"
170 #:phases 150 #:phases
171 #~(modify-phases %standard-phases 151 #~(modify-phases %standard-phases
172 ;; TODO: Implement it in go-build-system.
173 ;;
174 ;; This happens due to Golang can't determine the valid directory of
175 ;; the module of embed file which is symlinked during setup
176 ;; environment phase, but easy resolved after coping file from the
177 ;; store to the build directory of the current package, see details
178 ;; in Golang source:
179 ;;
180 ;; - URL: <https://github.com/golang/go/blob/>
181 ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
182 ;; - file: src/cmd/go/internal/load/pkg.go#L2059
183 (add-before 'unpack 'fix-embed-files
184 (lambda _
185 (for-each (lambda (file)
186 (let ((file-store-path (readlink file)))
187 (delete-file file)
188 (copy-recursively file-store-path file)))
189 (find-files "src" (string-append
190 ".*(editions_defaults.binpb)$")))))
191 (add-after 'unpack 'remove-examples-and-tutorials 152 (add-after 'unpack 'remove-examples-and-tutorials
192 (lambda* (#:key import-path #:allow-other-keys) 153 (lambda* (#:key import-path #:allow-other-keys)
193 (with-directory-excursion (string-append "src/" import-path) 154 (with-directory-excursion (string-append "src/" import-path)
@@ -278,25 +239,6 @@ Prometheus metrics.")
278 #:import-path "github.com/prometheus/common" 239 #:import-path "github.com/prometheus/common"
279 #:phases 240 #:phases
280 #~(modify-phases %standard-phases 241 #~(modify-phases %standard-phases
281 ;; TODO: Implement it in go-build-system.
282 ;;
283 ;; This happens due to Golang can't determine the valid directory of
284 ;; the module of embed file which is symlinked during setup
285 ;; environment phase, but easy resolved after coping file from the
286 ;; store to the build directory of the current package, see details
287 ;; in Golang source:
288 ;;
289 ;; - URL: <https://github.com/golang/go/blob/>
290 ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
291 ;; - file: src/cmd/go/internal/load/pkg.go#L2059
292 (add-after 'unpack 'fix-embed-files
293 (lambda _
294 (for-each (lambda (file)
295 (let ((file-store-path (readlink file)))
296 (delete-file file)
297 (copy-recursively file-store-path file)))
298 (find-files "src" (string-append
299 ".*(editions_defaults.binpb)$")))))
300 ;; XXX: Workaround for go-build-system's lack of Go modules support. 242 ;; XXX: Workaround for go-build-system's lack of Go modules support.
301 (delete 'build) 243 (delete 'build)
302 (replace 'check 244 (replace 'check
@@ -408,27 +350,7 @@ metrics.")
408 (arguments 350 (arguments
409 (list 351 (list
410 #:import-path "github.com/prometheus/common/sigv4" 352 #:import-path "github.com/prometheus/common/sigv4"
411 #:unpack-path "github.com/prometheus/common" 353 #:unpack-path "github.com/prometheus/common"))
412 #:phases
413 #~(modify-phases %standard-phases
414 ;; TODO: Implement it in go-build-system.
415 ;;
416 ;; This happens due to Golang can't determine the valid directory of
417 ;; the module of embed file which is symlinked during setup
418 ;; environment phase, but easy resolved after coping file from the
419 ;; store to the build directory of the current package, see details
420 ;; in Golang source:
421 ;;
422 ;; - URL: <https://github.com/golang/go/blob/>
423 ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
424 ;; - file: src/cmd/go/internal/load/pkg.go#L2059
425 (add-after 'unpack 'fix-embed-files
426 (lambda _
427 (for-each (lambda (file)
428 (let ((file-store-path (readlink file)))
429 (delete-file file)
430 (copy-recursively file-store-path file)))
431 (find-files "src" ".*(editions_defaults.binpb)$")))))))
432 (native-inputs 354 (native-inputs
433 (list go-github-com-stretchr-testify)) 355 (list go-github-com-stretchr-testify))
434 (propagated-inputs 356 (propagated-inputs
@@ -463,22 +385,6 @@ from the default AWS credential chain.")
463 #:import-path "github.com/prometheus/exporter-toolkit" 385 #:import-path "github.com/prometheus/exporter-toolkit"
464 #:phases 386 #:phases
465 #~(modify-phases %standard-phases 387 #~(modify-phases %standard-phases
466 (add-after 'unpack 'fix-embed-editions-defaults-binpb
467 (lambda _
468 (let* ((import-path "google.golang.org/protobuf")
469 (subdir "internal/editiondefaults")
470 (embed-file "editions_defaults.binpb")
471 (embed-file-path
472 (string-append "src/"
473 import-path "/"
474 subdir "/"
475 embed-file)))
476 (delete-file-recursively embed-file-path)
477 (copy-file
478 (string-append
479 #$(this-package-native-input "go-google-golang-org-protobuf")
480 "/" embed-file-path)
481 embed-file-path))))
482 ;; XXX: Workaround for go-build-system's lack of Go modules support. 388 ;; XXX: Workaround for go-build-system's lack of Go modules support.
483 (delete 'build) 389 (delete 'build)
484 (replace 'check 390 (replace 'check
@@ -572,29 +478,7 @@ kernel, and process metrics from the @file{/proc} pseudo file system.")
572 (arguments 478 (arguments
573 (list 479 (list
574 #:import-path "github.com/prometheus/statsd_exporter" 480 #:import-path "github.com/prometheus/statsd_exporter"
575 #:phases 481 #:embed-files #~(list "landing_page.css" "landing_page.html")))
576 #~(modify-phases %standard-phases
577 ;; TODO: Implement it in go-build-system.
578 ;;
579 ;; This happens due to Golang can't determine the valid directory of
580 ;; the module of embed file which is symlinked during setup
581 ;; environment phase, but easy resolved after coping file from the
582 ;; store to the build directory of the current package, see details
583 ;; in Golang source:
584 ;;
585 ;; - URL: <https://github.com/golang/go/blob/>
586 ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
587 ;; - file: src/cmd/go/internal/load/pkg.go#L2059
588 (add-before 'build 'fix-embed-files
589 (lambda _
590 (for-each (lambda (file)
591 (let ((file-store-path (readlink file)))
592 (delete-file file)
593 (copy-recursively file-store-path file)))
594 (find-files "src" (string-append
595 ".*(editions_defaults.binpb"
596 "|landing_page.css"
597 "|landing_page.html)$"))))))))
598 (native-inputs 482 (native-inputs
599 (list go-github-com-stvp-go-udp-testing)) 483 (list go-github-com-stvp-go-udp-testing))
600 (propagated-inputs 484 (propagated-inputs
diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index deebd893d68..22a40866c9a 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -1517,6 +1517,7 @@ of a Unix terminal to HTML code.")
1517 (arguments 1517 (arguments
1518 (list 1518 (list
1519 #:install-source? #f 1519 #:install-source? #f
1520 #:embed-files #~(list ".*\\.gob")
1520 #:import-path "github.com/errata-ai/vale/cmd/vale" 1521 #:import-path "github.com/errata-ai/vale/cmd/vale"
1521 #:unpack-path "github.com/errata-ai/vale" 1522 #:unpack-path "github.com/errata-ai/vale"
1522 #:phases 1523 #:phases
@@ -1536,26 +1537,6 @@ of a Unix terminal to HTML code.")
1536 (("TestLocalZip") "OffTestLocalZip") 1537 (("TestLocalZip") "OffTestLocalZip")
1537 (("TestNoPkgFound") "OffTestNoPkgFound") 1538 (("TestNoPkgFound") "OffTestNoPkgFound")
1538 (("TestV3Pkg") "OffTestV3Pkg"))))) 1539 (("TestV3Pkg") "OffTestV3Pkg")))))
1539 ;; FIXME: Pattern embedded: cannot embed directory embedded:
1540 ;; contains no embeddable files.
1541 ;;
1542 ;; This happens due to Golang can't determine the valid directory of
1543 ;; the module which is sourced during setup environment phase, but
1544 ;; easy resolved after coping to expected directory "vendor" within
1545 ;; the current package, see details in Golang source:
1546 ;;
1547 ;; - URL: <https://github.com/golang/go/blob/>
1548 ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
1549 ;; - file: src/cmd/go/internal/load/pkg.go#L2059
1550 (add-before 'build 'copy-input-to-vendor-directory
1551 (lambda* (#:key unpack-path #:allow-other-keys)
1552 (with-directory-excursion (string-append "src/" unpack-path)
1553 (mkdir "vendor")
1554 (copy-recursively
1555 (string-append
1556 #$(this-package-native-input "go-github-com-jdkato-twine")
1557 "/src/github.com")
1558 "vendor/github.com"))))
1559 ;; XXX: Workaround for go-build-system's lack of Go modules 1540 ;; XXX: Workaround for go-build-system's lack of Go modules
1560 ;; support. 1541 ;; support.
1561 (replace 'check 1542 (replace 'check
@@ -1563,11 +1544,7 @@ of a Unix terminal to HTML code.")
1563 (when tests? 1544 (when tests?
1564 (with-directory-excursion (string-append "src/" unpack-path) 1545 (with-directory-excursion (string-append "src/" unpack-path)
1565 (setenv "HOME" "/tmp") 1546 (setenv "HOME" "/tmp")
1566 (invoke "go" "test" "-v" "./..."))))) 1547 (invoke "go" "test" "-v" "./..."))))))))
1567 (add-before 'install 'remove-vendor-directory
1568 (lambda* (#:key unpack-path #:allow-other-keys)
1569 (with-directory-excursion (string-append "src/" unpack-path)
1570 (delete-file-recursively "vendor")))))))
1571 (native-inputs 1548 (native-inputs
1572 (list go-github-com-masterminds-sprig-v3 1549 (list go-github-com-masterminds-sprig-v3
1573 go-github-com-adrg-strutil 1550 go-github-com-adrg-strutil
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 9a703e9bbc0..c892a83a98c 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -3686,6 +3686,7 @@ will reconstruct the object along its delta-base chain and return it.")
3686 (build-system go-build-system) 3686 (build-system go-build-system)
3687 (arguments 3687 (arguments
3688 (list 3688 (list
3689 #:embed-files #~(list "children" "nodes" "text")
3689 #:import-path "github.com/git-lfs/git-lfs" 3690 #:import-path "github.com/git-lfs/git-lfs"
3690 #:install-source? #f 3691 #:install-source? #f
3691 #:phases 3692 #:phases
@@ -3695,13 +3696,6 @@ will reconstruct the object along its delta-base chain and return it.")
3695 (substitute* "src/github.com/git-lfs/git-lfs/lfs/hook.go" 3696 (substitute* "src/github.com/git-lfs/git-lfs/lfs/hook.go"
3696 (("/bin/sh") 3697 (("/bin/sh")
3697 (search-input-file inputs "bin/sh"))))) 3698 (search-input-file inputs "bin/sh")))))
3698 (add-after 'unpack 'fix-embed-x-net
3699 (lambda _
3700 (delete-file-recursively "src/golang.org/x/net/publicsuffix/data")
3701 (copy-recursively
3702 #$(file-append (this-package-input "go-golang-org-x-net")
3703 "/src/golang.org/x/net/publicsuffix/data")
3704 "src/golang.org/x/net/publicsuffix/data")))
3705 ;; Only build the man pages if ruby-asciidoctor is available. 3699 ;; Only build the man pages if ruby-asciidoctor is available.
3706 #$@(if (this-package-native-input "ruby-asciidoctor") 3700 #$@(if (this-package-native-input "ruby-asciidoctor")
3707 #~((add-before 'build 'man-gen 3701 #~((add-before 'build 'man-gen
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index e5b53e226be..d21f3f09e6d 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -367,24 +367,6 @@ and its related documentation.")
367 #$version)) 367 #$version))
368 #:phases 368 #:phases
369 #~(modify-phases %standard-phases 369 #~(modify-phases %standard-phases
370 ;; TODO: Implement it in go-build-system.
371 ;;
372 ;; This happens due to Golang can't determine the valid directory of
373 ;; the module of embed file which is symlinked during setup
374 ;; environment phase, but easy resolved after coping file from the
375 ;; store to the build directory of the current package, see details
376 ;; in Golang source:
377 ;;
378 ;; - URL: <https://github.com/golang/go/blob/>
379 ;; - commit: 82c14346d89ec0eeca114f9ca0e88516b2cda454
380 ;; - file: src/cmd/go/internal/load/pkg.go#L2059
381 (add-after 'unpack 'fix-embed-files
382 (lambda _
383 (for-each (lambda (file)
384 (let ((file-store-path (readlink file)))
385 (delete-file file)
386 (copy-recursively file-store-path file)))
387 (find-files "src" ".*(editions_defaults.binpb)$"))))
388 ;; XXX: Replace when go-build-system supports nested path. 370 ;; XXX: Replace when go-build-system supports nested path.
389 (replace 'check 371 (replace 'check
390 (lambda* (#:key import-path tests? #:allow-other-keys) 372 (lambda* (#:key import-path tests? #:allow-other-keys)