[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
189/189: gnu: Add rust-swc-1.
From: |
guix-commits |
Subject: |
189/189: gnu: Add rust-swc-1. |
Date: |
Mon, 21 Sep 2020 06:02:02 -0400 (EDT) |
arunisaac pushed a commit to branch wip-swc
in repository guix.
commit 91e2676395c76d5d0c337099457ec5fc330b6d75
Author: Arun Isaac <arunisaac@systemreboot.net>
AuthorDate: Mon Sep 21 14:14:30 2020 +0530
gnu: Add rust-swc-1.
* gnu/packages/crates-io.scm (rust-swc-1): New variable.
---
gnu/packages/crates-io.scm | 96 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 96 insertions(+)
diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm
index 9e5c759..fe78388 100644
--- a/gnu/packages/crates-io.scm
+++ b/gnu/packages/crates-io.scm
@@ -29,6 +29,7 @@
(define-module (gnu packages crates-io)
#:use-module (guix build-system cargo)
#:use-module (guix download)
+ #:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix utils)
@@ -28457,6 +28458,101 @@ cryptographic implementations.")
(description "Custom derive for sval.")
(license (list license:asl2.0 license:expat))))
+(define-public rust-swc-1
+ (package
+ (name "rust-swc")
+ (version "1.2.24")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/swc-project/swc")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1w9al035x0gmard80vqvah8sy8szs6bnd1ynnyssiiylzg7vhyyv"))))
+ (build-system cargo-build-system)
+ (arguments
+ `(#:cargo-inputs
+ (("rust-ansi-term" ,rust-ansi-term-0.12)
+ ("rust-base64" ,rust-base64-0.12)
+ ("rust-console-error-panic-hook" ,rust-console-error-panic-hook-0.1)
+ ("rust-crc" ,rust-crc-1)
+ ("rust-darling" ,rust-darling-0.10)
+ ("rust-dashmap" ,rust-dashmap-3)
+ ("rust-either" ,rust-either-1)
+ ("rust-fxhash" ,rust-fxhash-0.2)
+ ("rust-is-macro" ,rust-is-macro-0.1)
+ ("rust-jemallocator" ,rust-jemallocator-0.3)
+ ("rust-log" ,rust-log-0.4)
+ ("rust-mimalloc" ,rust-mimalloc-0.1)
+ ("rust-napi" ,rust-napi-0.5)
+ ("rust-napi-build" ,rust-napi-build-0.2)
+ ("rust-napi-derive" ,rust-napi-derive-0.5)
+ ("rust-nom" ,rust-nom-5)
+ ("rust-once-cell" ,rust-once-cell-1)
+ ("rust-parking-lot" ,rust-parking-lot-0.7)
+ ("rust-path-clean" ,rust-path-clean-0.1)
+ ("rust-petgraph" ,rust-petgraph-0.5)
+ ("rust-proc-macro2" ,rust-proc-macro2-1)
+ ("rust-radix-fmt" ,rust-radix-fmt-1)
+ ("rust-regex" ,rust-regex-1)
+ ("rust-relative-path" ,rust-relative-path-1)
+ ("rust-retain-mut" ,rust-retain-mut-0.1)
+ ("rust-scoped-tls" ,rust-scoped-tls-1.0)
+ ("rust-st-map" ,rust-st-map-0.1)
+ ("rust-string-cache" ,rust-string-cache-0.8)
+ ("rust-walkdir" ,rust-walkdir-2)
+ ("rust-wasm-bindgen-futures" ,rust-wasm-bindgen-futures-0.4))
+ #:cargo-development-inputs
+ (("rust-anyhow" ,rust-anyhow-1.0)
+ ("rust-env-logger" ,rust-env-logger-0.7)
+ ("rust-num-bigint" ,rust-num-bigint-0.2)
+ ("rust-pretty-assertions" ,rust-pretty-assertions-0.6)
+ ("rust-pretty-env-logger" ,rust-pretty-env-logger-0.3)
+ ("rust-serde" ,rust-serde-1)
+ ("rust-serde-json" ,rust-serde-json-1)
+ ("rust-sourcemap" ,rust-sourcemap-6)
+ ("rust-string-cache-codegen" ,rust-string-cache-codegen-0.5)
+ ("rust-tempfile" ,rust-tempfile-3))
+ #:tests? #f ;; tests env_query_chrome_71 and project_env fail
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'enable-unstable-features
+ (lambda _
+ (setenv "RUSTC_BOOTSTRAP" "1")
+ (substitute* "ecmascript/jsdoc/src/lib.rs"
+ (("pub use self" all)
+ (string-append "#![feature(non_exhaustive)]\n" all)))
+ (substitute* "ecmascript/parser/src/lib.rs"
+ (("//! es2019" all)
+ (string-append "#![feature(non_exhaustive)]
+#![feature(mem_take)]
+#![feature(proc_macro_hygiene)]
+" all)))
+ (substitute* "ecmascript/transforms/src/lib.rs"
+ (("#!\\[cfg_attr" all)
+ (string-append "#![feature(mem_take)]\n" all)))
+ #t))
+ (add-after 'enable-unstable-features 'patch-build-failures
+ (lambda _
+ (chmod ".cargo/config" 420)
+ (substitute* "ecmascript/transforms/macros/src/lib.rs"
+ (("use proc_macro::")
+ "extern crate proc_macro;\nuse proc_macro::"))
+ (substitute* "common/src/errors/emitter.rs"
+ ((" #\\[cfg\\(feature = \"tty-emitter\"\\)\\]\n") ""))
+ #t)))))
+ (home-page "https://swc.rs/")
+ (synopsis "Typescript/javascript compiler")
+ (description "@code{rust-swc} is a typescript/javascript compiler. It
+consumes a javascript or typescript file which uses recently added features
+like async-await and emits javascript code which can be executed on old
+browsers.")
+ (license (list license:expat
+ license:asl2.0))))
+
(define-public rust-syn-test-suite-0
(package
(name "rust-syn-test-suite")
- 144/189: gnu: Add rust-trust-dns-rustls-0.19., (continued)
- 144/189: gnu: Add rust-trust-dns-rustls-0.19., guix-commits, 2020/09/21
- 145/189: gnu: Add rust-trust-dns-native-tls-0.19., guix-commits, 2020/09/21
- 152/189: gnu: Add rust-dashmap-3., guix-commits, 2020/09/21
- 153/189: gnu: Add rust-h2-0.2., guix-commits, 2020/09/21
- 155/189: gnu: Add rust-parking-lot-core-0.8., guix-commits, 2020/09/21
- 158/189: gnu: Add rust-mysqlclient-sys-0.2., guix-commits, 2020/09/21
- 160/189: gnu: Add rust-r2d2., guix-commits, 2020/09/21
- 164/189: gnu: Add rust-libflate-lz77-1., guix-commits, 2020/09/21
- 163/189: gnu: Add rust-libflate-0.1., guix-commits, 2020/09/21
- 168/189: gnu: Add rust-static-map-macro-0.2., guix-commits, 2020/09/21
- 189/189: gnu: Add rust-swc-1.,
guix-commits <=
- 170/189: gnu: Add rust-trust-dns-https-0.19., guix-commits, 2020/09/21
- 165/189: gnu: Add rust-libflate-1., guix-commits, 2020/09/21
- 173/189: gnu: Add rust-hyper-tls-0.4., guix-commits, 2020/09/21
- 169/189: gnu: Add rust-napi-derive-0.5., guix-commits, 2020/09/21
- 161/189: gnu: Add rust-diesel-1., guix-commits, 2020/09/21
- 179/189: gnu: Add rust-napi-build-0.2., guix-commits, 2020/09/21
- 187/189: gnu: Add rust-st-map-0.1., guix-commits, 2020/09/21
- 162/189: gnu: Add rust-semver-0.10., guix-commits, 2020/09/21
- 177/189: gnu: rust-syn-1: Update to 1.0.40., guix-commits, 2020/09/21
- 185/189: gnu: Add rust-fluid-attributes-0.4., guix-commits, 2020/09/21