Subject: [bug#47948] [PATCH 42/49] gnu: Add rust-swc-ecmascript.

From: Danny Milosavljevic <[email-masked]>
Date: Thu, 22 Apr 2021 12:22:01 +0200

* gnu/packages/crates-io.scm (rust-swc-ecmascript-0.31): New variable.
---
 gnu/packages/crates-io.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 425457fb67..8bbb70c97f 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -51244,3 +51244,36 @@ configuration file and/or environment variables.")
     (synopsis "Ecmascript ast.")
     (description "Ecmascript ast.")
     (license (list license:asl2.0 license:expat))))
+
+(define-public rust-swc-ecmascript-0.31
+  (package
+    (name "rust-swc-ecmascript")
+    (version "0.31.3")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (crate-uri "swc_ecmascript" version))
+        (file-name
+          (string-append name "-" version ".tar.gz"))
+        (sha256
+          (base32
+            "0h1fyb813vw15lnwybyz4s6j4xzpqvska5cm2gpwk84r25z6qa25"))))
+    (build-system cargo-build-system)
+    (arguments
+      `(#:cargo-inputs
+        (("rust-swc-ecma-ast" ,rust-swc-ecma-ast-0.43)
+         ("rust-swc-ecma-codegen"
+          ,rust-swc-ecma-codegen-0.52)
+         ("rust-swc-ecma-dep-graph"
+          ,rust-swc-ecma-dep-graph-0.22)
+         ("rust-swc-ecma-parser"
+          ,rust-swc-ecma-parser-0.54)
+         ("rust-swc-ecma-transforms"
+          ,rust-swc-ecma-transforms-0.45)
+         ("rust-swc-ecma-utils" ,rust-swc-ecma-utils-0.34)
+         ("rust-swc-ecma-visit" ,rust-swc-ecma-visit-0.29))))
+    (home-page
+      "https://github.com/swc-project/swc.git")
+    (synopsis "Ecmascript")
+    (description "Ecmascript")
+    (license (list license:asl2.0 license:expat))))
-- 
2.29.2