summary refs log tree commit diff
path: root/gnu/packages/julia-xyz.scm
diff options
context:
space:
mode:
authorNicolas Graves via Guix-patches via <guix-patches@gnu.org>2023-02-24 17:58:54 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2023-03-16 00:10:52 +0100
commit6993977548ece30b45d22fb416adba7ca81c2ec4 (patch)
tree50a38b82dcda2eac87c17852d9f60e0569fd24a1 /gnu/packages/julia-xyz.scm
parent96801c11c80729add8ee5bcb4552c03f06081314 (diff)
downloadguix-6993977548ece30b45d22fb416adba7ca81c2ec4.tar.gz
gnu: Add julia-cstparser.
* gnu/packages/julia-xyz.scm (julia-cstparser): New variable.

Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Diffstat (limited to 'gnu/packages/julia-xyz.scm')
-rw-r--r--gnu/packages/julia-xyz.scm34
1 files changed, 34 insertions, 0 deletions
diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm
index cc17eb42cf..32288e980b 100644
--- a/gnu/packages/julia-xyz.scm
+++ b/gnu/packages/julia-xyz.scm
@@ -1318,6 +1318,40 @@ both the 256 color and 24 bit true color extensions, and the different text
 styles available to terminals.")
     (license license:expat)))
 
+(define-public julia-cstparser
+  (package
+    (name "julia-cstparser")
+    (version "3.3.4")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/julia-vscode/CSTParser.jl")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "162jpcdph26ybg7rajbvfcbpnngygybpzk5bry4c4ppda3m1dl1i"))))
+    (build-system julia-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'fix-or-ignore-tests
+            (lambda _
+              (substitute* "test/iterate.jl"
+                (("parser.jl")
+                 (string-append #$output "/share/julia/loadpath/CSTParser/test/parser.jl"))
+                (("../src")
+                 (string-append #$output "/share/julia/loadpath/CSTParser/src")))
+              (substitute* "test/check_base.jl"
+                (("testset.*" all)
+                 (string-append all "return\n"))))))))
+    (inputs (list julia-tokenize))
+    (home-page "https://github.com/julia-vscode/CSTParser.jl")
+    (synopsis "Parser for Julia")
+    (description "This package provides a parser for Julia code.")
+    (license license:expat)))
+
 (define-public julia-csv
   (package
     (name "julia-csv")