node-xyz.scm 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il>
  3. ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
  4. ;;; Copyright © 2021 Noisytoot <noisytoot@disroot.org>
  5. ;;; Copyright © 2021 Charles <charles.b.jackson@protonmail.com>
  6. ;;;
  7. ;;; This file is part of GNU Guix.
  8. ;;;
  9. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  10. ;;; under the terms of the GNU General Public License as published by
  11. ;;; the Free Software Foundation; either version 3 of the License, or (at
  12. ;;; your option) any later version.
  13. ;;;
  14. ;;; GNU Guix is distributed in the hope that it will be useful, but
  15. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  16. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. ;;; GNU General Public License for more details.
  18. ;;;
  19. ;;; You should have received a copy of the GNU General Public License
  20. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  21. (define-module (gnu packages node-xyz)
  22. #:use-module ((guix licenses) #:prefix license:)
  23. #:use-module (guix packages)
  24. #:use-module (guix git-download)
  25. #:use-module (guix build-system node))
  26. (define-public node-acorn
  27. (package
  28. (name "node-acorn")
  29. (version "8.4.1")
  30. (source
  31. (origin
  32. (method git-fetch)
  33. (uri (git-reference
  34. (url "https://github.com/acornjs/acorn")
  35. (commit version)))
  36. (file-name (git-file-name name version))
  37. (sha256
  38. (base32 "068h5gysz8bbslq31dva8f223rdf8l7w6nxcxjnv4zdprwkzkhaa"))))
  39. (build-system node-build-system)
  40. (arguments
  41. '(#:phases
  42. (modify-phases %standard-phases
  43. (add-after 'unpack 'change-directory
  44. (lambda _
  45. (chdir "acorn"))))))
  46. (home-page "https://github.com/acornjs/acorn/tree/master/acorn")
  47. (synopsis "Javascript-based Javascript parser")
  48. (description "Acornjs is a Javascrip parser with many options and an
  49. architecture supporting plugins.")
  50. (license license:expat)))
  51. (define-public node-color-name
  52. (package
  53. (name "node-color-name")
  54. (version "1.1.3")
  55. (source
  56. (origin
  57. (method git-fetch)
  58. (uri (git-reference
  59. (url "https://github.com/colorjs/color-name")
  60. (commit (string-append "v" version))))
  61. (file-name (git-file-name name version))
  62. (sha256
  63. (base32
  64. "09rbmj16nfwcwkhrybqxyy66bkrs50vpw6hkdqqb14l3gsyxpr74"))))
  65. (build-system node-build-system)
  66. (home-page "https://github.com/colorjs/color-name")
  67. (synopsis "JSON with CSS color names")
  68. (description
  69. "This package provides a JSON list with color names and their values.")
  70. (license license:expat)))
  71. (define-public node-env-variable
  72. (package
  73. (name "node-env-variable")
  74. (version "0.0.4")
  75. (source
  76. (origin
  77. (method git-fetch)
  78. (uri (git-reference
  79. (url "https://github.com/bigpipe/env-variable")
  80. (commit version)))
  81. (file-name (git-file-name name version))
  82. (sha256
  83. (base32
  84. "0nnpxjxfhy4na7fixb7p3ww6ard5xgggfm83b78i333867r4gmsq"))))
  85. (build-system node-build-system)
  86. (arguments '(#:tests? #f)) ; No tests.
  87. (home-page "https://github.com/bigpipe/env-variable")
  88. (synopsis "Environment variables for Node with fallbacks")
  89. (description "This package provides environment variables with
  90. @code{process.env}, @code{window.name}, @code{location.hash} and
  91. @code{localStorage} fallbacks.")
  92. (license license:expat)))
  93. (define-public node-far
  94. (package
  95. (name "node-far")
  96. (version "0.0.7")
  97. (source
  98. (origin
  99. (method git-fetch)
  100. (uri (git-reference
  101. (url "https://github.com/felixge/node-far")
  102. (commit (string-append "v" version))))
  103. (file-name (git-file-name name version))
  104. (sha256
  105. (base32
  106. "083rv1rszjn0i91zcpaghlid0kwhk0angmpj4hiflrlyhd6cmjzw"))))
  107. (build-system node-build-system)
  108. (arguments
  109. '(#:phases
  110. (modify-phases %standard-phases
  111. (replace 'check
  112. (lambda _
  113. ;; We skip the two tests which are supposed to fail.
  114. (invoke "bin/node-far" "-v" "test/" "-e" "test.*fail.js"))))))
  115. (inputs
  116. `(("node-oop" ,node-oop)))
  117. (home-page "https://github.com/felixge/node-far")
  118. (synopsis "Node.js test runner")
  119. (description "This package provides a simple test runner that finds and runs
  120. multiple node.js files, while providing useful information about output and exit
  121. codes.")
  122. (license license:expat)))
  123. (define-public node-long-stack-traces
  124. (package
  125. (name "node-long-stack-traces")
  126. (version "0.1.2")
  127. (source
  128. (origin
  129. (method git-fetch)
  130. (uri (git-reference
  131. (url "https://github.com/tlrobinson/long-stack-traces")
  132. (commit (string-append "v" version))))
  133. (file-name (git-file-name name version))
  134. (sha256
  135. (base32
  136. "0famwsyc6xawi30v25zi65d8fhbvlvh976bqydf1dqn5gz200cl3"))))
  137. (build-system node-build-system)
  138. (arguments '(#:tests? #f)) ; No tests.
  139. (home-page "https://github.com/tlrobinson/long-stack-traces")
  140. (synopsis "Long stacktraces implemented in user-land JavaScript")
  141. (description "This package provides long stacktraces for V8 implemented in
  142. user-land JavaScript.")
  143. (license license:expat))) ; in README
  144. (define-public node-mersenne
  145. (package
  146. (name "node-mersenne")
  147. (version "0.0.4")
  148. (source
  149. (origin
  150. (method git-fetch)
  151. (uri (git-reference
  152. (url "https://github.com/jwatte/node-mersenne")
  153. ;; The actual release lacks a git tag.
  154. (commit "f9fa01694ee49d6ae6ff9d90cfda594bddd3ccef")))
  155. (file-name (git-file-name name version))
  156. (sha256
  157. (base32
  158. "034iaiq2pdqn342p2404cpz364g282d2hkp9375hysnh9i968wbb"))))
  159. (build-system node-build-system)
  160. (arguments '(#:tests? #f)) ; No tests.
  161. (home-page "http://www.enchantedage.com/node-mersenne")
  162. (synopsis "Node.js module for generating Mersenne Twister random numbers")
  163. (description "Thix package provides a node.js port of the Mersenne Twister
  164. random number generator.")
  165. (license license:bsd-3)))
  166. (define-public node-oop
  167. ;; No releases, last commit was February 2013.
  168. (let ((commit "f9d87cda0958886955c14a0a716e57021ed295dc")
  169. (revision "1"))
  170. (package
  171. (name "node-oop")
  172. (version (git-version "0.0.0" revision commit))
  173. (source
  174. (origin
  175. (method git-fetch)
  176. (uri (git-reference
  177. (url "https://github.com/felixge/node-oop")
  178. (commit commit)))
  179. (file-name (git-file-name name version))
  180. (sha256
  181. (base32
  182. "0mqrcf0xi2jbwffwkk00cljpqfsri1jk8s6kz8jny45apn7zjds1"))))
  183. (build-system node-build-system)
  184. (arguments '(#:tests? #f)) ; Tests run during build phase.
  185. (home-page "https://github.com/felixge/node-oop")
  186. (synopsis "Simple, light-weight oop module for Node")
  187. (description "This library tries to bring basic oop features to JavaScript
  188. while being as light-weight and simple as possible.")
  189. (license license:expat))))
  190. (define-public node-stack-trace
  191. ;; There have been improvements since the last release.
  192. (let ((commit "4fd379ee78965ce7ce8820b436f1b1b590d5dbcf")
  193. (revision "1"))
  194. (package
  195. (name "node-stack-trace")
  196. (version (git-version "0.0.10" revision commit))
  197. (source
  198. (origin
  199. (method git-fetch)
  200. (uri (git-reference
  201. (url "https://github.com/felixge/node-stack-trace")
  202. (commit commit)))
  203. (file-name (git-file-name name version))
  204. (sha256
  205. (base32
  206. "1pk19wcpy8i95z5jr77fybd57qj7xmzmniap4dy47vjlmpkqia4i"))))
  207. (build-system node-build-system)
  208. (arguments
  209. '(#:phases
  210. (modify-phases %standard-phases
  211. (add-before 'check 'skip-intentionally-failing-test
  212. (lambda _
  213. (substitute* "test/run.js"
  214. (("far.include") "far.exclude(/test-parse.js/)\nfar.include"))
  215. #t)))))
  216. (native-inputs
  217. `(("node-far" ,node-far)
  218. ("node-long-stack-traces" ,node-long-stack-traces)))
  219. (home-page "https://github.com/felixge/node-stack-trace")
  220. (synopsis "Get v8 stack traces as an array of CallSite objects")
  221. (description "Get v8 stack traces as an array of CallSite objects.")
  222. (license license:expat))))
  223. (define-public node-statsd-parser
  224. (package
  225. (name "node-statsd-parser")
  226. (version "0.0.4")
  227. (source
  228. (origin
  229. (method git-fetch)
  230. (uri (git-reference
  231. (url "https://github.com/dscape/statsd-parser")
  232. (commit version)))
  233. (file-name (git-file-name name version))
  234. (sha256
  235. (base32
  236. "049rnczsd6pv6bk282q4w72bhqc5cs562djgr7yncy7lk0wzq5j3"))))
  237. (build-system node-build-system)
  238. (arguments '(#:tests? #f)) ; No tests.
  239. (home-page "https://github.com/dscape/statsd-parser")
  240. (synopsis "Streaming parser for the statsd protocol")
  241. (description "This package provides a streaming parser for the statsd
  242. protocol used in @code{node-lynx}.")
  243. (license license:asl2.0)))
  244. (define-public node-util-deprecate
  245. (package
  246. (name "node-util-deprecate")
  247. (version "1.0.2")
  248. (source
  249. (origin
  250. (method git-fetch)
  251. (uri (git-reference
  252. (url "https://github.com/TooTallNate/util-deprecate")
  253. (commit version)))
  254. (file-name (git-file-name name version))
  255. (sha256
  256. (base32
  257. "1rk94nl3qc7znsk8400bnga30v0m7j2mmvz9ldwjinxv1d3n11xc"))))
  258. (build-system node-build-system)
  259. (arguments '(#:tests? #f)) ; No test suite.
  260. (home-page "https://github.com/TooTallNate/util-deprecate")
  261. (synopsis "Node.js `util.deprecate()` function with browser support")
  262. (description "This package provides the Node.js @code{util.deprecate()}
  263. function with browser support.")
  264. (license license:expat)))
  265. (define-public node-semver
  266. (package
  267. (name "node-semver")
  268. (version "7.2.1")
  269. (source (origin
  270. (method git-fetch)
  271. (uri (git-reference
  272. (url "https://github.com/npm/node-semver")
  273. (commit (string-append "v" version))))
  274. (file-name (git-file-name name version))
  275. (sha256
  276. (base32
  277. "06biknqb05r9xsmcflm3ygh50pjvdk84x6r79w43kmck4fn3qn5p"))))
  278. (build-system node-build-system)
  279. (arguments
  280. '(#:tests? #f ; FIXME: Tests depend on node-tap
  281. #:phases
  282. (modify-phases %standard-phases
  283. ;; The only dependency to check for is tap, which we don't have.
  284. (delete 'configure))))
  285. (home-page "https://github.com/npm/node-semver")
  286. (synopsis "Parses semantic versions strings")
  287. (description
  288. "@code{node-semver} is a JavaScript implementation of the
  289. @uref{https://semver.org/, SemVer.org} specification.")
  290. (license license:isc)))
  291. (define-public node-wrappy
  292. (package
  293. (name "node-wrappy")
  294. (version "1.0.2")
  295. (source (origin
  296. (method git-fetch)
  297. (uri (git-reference
  298. (url "https://github.com/npm/wrappy")
  299. (commit (string-append "v" version))))
  300. (file-name (git-file-name name version))
  301. (sha256
  302. (base32
  303. "1ymlc61cja6v5438vwb04gq8wg2b784lj39zf0g4i36fvgcw9783"))))
  304. (build-system node-build-system)
  305. (arguments
  306. '(#:tests? #f ; FIXME: Tests depend on node-tap
  307. #:phases
  308. (modify-phases %standard-phases
  309. ;; The only dependency to check for is tap, which we don't have.
  310. (delete 'configure))))
  311. (home-page "https://github.com/npm/wrappy")
  312. (synopsis "Callback wrapping utility")
  313. (description "@code{wrappy} is a utility for Node.js to wrap callbacks.")
  314. (license license:isc)))
  315. (define-public node-once
  316. (package
  317. (name "node-once")
  318. (version "1.4.0")
  319. (source (origin
  320. (method git-fetch)
  321. (uri (git-reference
  322. (url "https://github.com/isaacs/once")
  323. (commit (string-append "v" version))))
  324. (file-name (git-file-name name version))
  325. (sha256
  326. (base32
  327. "1z8dcbf28dqdcp4wb0c53wrs90a07nkrax2c9kk26dsk1dhrnxav"))))
  328. (build-system node-build-system)
  329. (arguments
  330. '(#:tests? #f ; FIXME: tests depend on node-tap
  331. #:phases
  332. (modify-phases %standard-phases
  333. ;; The default configure phase fails due to tap being missing, as we do
  334. ;; not have tap packaged yet. It is used only for tests. This package
  335. ;; still works as a dependency of node-glob and node-inflight.
  336. (delete 'configure))))
  337. (inputs
  338. `(("node-wrappy" ,node-wrappy)))
  339. (home-page "https://github.com/isaacs/once")
  340. (synopsis "Node.js module to call a function only once")
  341. (description
  342. "@code{once} is a Node.js module to call a function exactly one time.
  343. Subsequent calls will either return the cached previous value or throw an error
  344. if desired.")
  345. (license license:isc)))