diff options
-rw-r--r-- | gnu/packages/rust-apps.scm | 136 |
1 files changed, 90 insertions, 46 deletions
diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm index ee86907e95..f9c14dbdbd 100644 --- a/gnu/packages/rust-apps.scm +++ b/gnu/packages/rust-apps.scm @@ -1084,7 +1084,7 @@ touchscreen devices.") (define-public rust-swc (package (name "rust-swc") - (version "1.2.24") + (version "1.2.124") (source (origin (method git-fetch) @@ -1094,81 +1094,125 @@ touchscreen devices.") (file-name (git-file-name name version)) (sha256 (base32 - "1w9al035x0gmard80vqvah8sy8szs6bnd1ynnyssiiylzg7vhyyv")))) + "1cb65vl437sy7shflsazi2k4sz53v3r85dj8rb32ny1j6njczj4h")) + (modules '((guix build utils))) + (snippet + '(begin (substitute* (find-files "." "^Cargo\\.toml$") + (("\"=([[:digit:]]+(\\.[[:digit:]]+)*)" _ version) + (string-append "\"^" version))))))) (build-system cargo-build-system) (arguments - `(#:cargo-inputs - (("rust-ansi-term" ,rust-ansi-term-0.12) - ("rust-base64" ,rust-base64-0.12) + `(#:install-source? #f + #:cargo-build-flags + '("--release" "-p" "swc_cli") + #:cargo-test-flags + '("--release" "-p" "swc_cli") + #:cargo-inputs + (("rust-abi-stable" ,rust-abi-stable-0.10) + ("rust-ahash" ,rust-ahash-0.7) + ("rust-ansi-term" ,rust-ansi-term-0.12) + ("rust-anyhow" ,rust-anyhow-1) + ("rust-arrayvec" ,rust-arrayvec-0.5) + ("rust-arbitrary" ,rust-arbitrary-1) + ("rust-auto-impl" ,rust-auto-impl-0.5) + ("rust-auto-impl" ,rust-auto-impl-0.4) + ("rust-backtrace" ,rust-backtrace-0.3) + ("rust-bincode" ,rust-bincode-1) + ("rust-bitflags" ,rust-bitflags-1) + ("rust-browserslist-rs" ,rust-browserslist-rs-0.6) + ("rust-cfg-if" ,rust-cfg-if-0.1) ("rust-console-error-panic-hook" ,rust-console-error-panic-hook-0.1) + ("rust-copyless" ,rust-copyless-0.1) ("rust-crc" ,rust-crc-1) ("rust-darling" ,rust-darling-0.10) - ("rust-dashmap" ,rust-dashmap-3) + ("rust-dashmap" ,rust-dashmap-4) + ("rust-debug-unreachable" ,rust-debug-unreachable-0.1) + ("rust-difference" ,rust-difference-2) ("rust-either" ,rust-either-1) - ("rust-fxhash" ,rust-fxhash-0.2) + ("rust-glob" ,rust-glob-0.3) + ("rust-hex" ,rust-hex-0.4) + ("rust-indexmap" ,rust-indexmap-1) + ("rust-inflector" ,rust-inflector-0.11) ("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-lexical" ,rust-lexical-5) + ("rust-libloading" ,rust-libloading-0.7) + ("rust-lru" ,rust-lru-0.7) + ("rust-mimalloc-rust" ,rust-mimalloc-rust-0.1) + ("rust-napi" ,rust-napi-2) + ("rust-napi-build" ,rust-napi-build-1) + ("rust-napi-derive" ,rust-napi-derive-2) ("rust-nom" ,rust-nom-5) + ("rust-normpath" ,rust-normpath-0.2) + ("rust-num-bigint" ,rust-num-bigint-0.2) ("rust-once-cell" ,rust-once-cell-1) - ("rust-ordered-float" ,rust-ordered-float-1) + ("rust-ordered-float" ,rust-ordered-float-2) + ("rust-owning-ref" ,rust-owning-ref-0.4) + ("rust-parking-lot" ,rust-parking-lot-0.11) ("rust-parking-lot" ,rust-parking-lot-0.7) + ("rust-parking-lot-core" ,rust-parking-lot-core-0.8) ("rust-path-clean" ,rust-path-clean-0.1) + ("rust-paw" ,rust-paw-1) ("rust-petgraph" ,rust-petgraph-0.5) ("rust-phf" ,rust-phf-0.8) + ("rust-pmutil" ,rust-pmutil-0.5) + ("rust-pretty-assertions" ,rust-pretty-assertions-0.7) + ("rust-pretty-assertions" ,rust-pretty-assertions-0.6) ("rust-proc-macro2" ,rust-proc-macro2-1) + ("rust-quote" ,rust-quote-1) + ("rust-rayon" ,rust-rayon-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-rustc-hash" ,rust-rustc-hash-1) ("rust-scoped-tls" ,rust-scoped-tls-1) + ("rust-semver" ,rust-semver-0.9) + ("rust-serde" ,rust-serde-1) + ("rust-serde-json" ,rust-serde-json-1) + ("rust-serde-regex" ,rust-serde-regex-1) + ("rust-sha-1" ,rust-sha-1-0.9) + ("rust-smallvec" ,rust-smallvec-1) + ("rust-sourcemap" ,rust-sourcemap-6) ("rust-st-map" ,rust-st-map-0.1) ("rust-string-cache" ,rust-string-cache-0.8) + ("rust-string-cache-codegen" ,rust-string-cache-codegen-0.5) + ("rust-structopt" ,rust-structopt-0.3) + ("rust-syn" ,rust-syn-1) + ("rust-termcolor" ,rust-termcolor-1) + ("rust-tracing" ,rust-tracing-0.1) + ("rust-tracing-subscriber" ,rust-tracing-subscriber-0.3) + ("rust-typed-arena" ,rust-typed-arena-2) ("rust-walkdir" ,rust-walkdir-2) - ("rust-wasm-bindgen-futures" ,rust-wasm-bindgen-futures-0.4)) + ("rust-wasm-bindgen" ,rust-wasm-bindgen-0.2) + ("rust-wasm-bindgen-futures" ,rust-wasm-bindgen-futures-0.4) + ("rust-unicode-width" ,rust-unicode-width-0.1) + ("rust-unicode-xid" ,rust-unicode-xid-0.2) + ("rust-url" ,rust-url-2)) #:cargo-development-inputs - (("rust-anyhow" ,rust-anyhow-1) + (("rust-ansi-term" ,rust-ansi-term-0.12) + ("rust-anyhow" ,rust-anyhow-1) + ("rust-dashmap" ,rust-dashmap-4) ("rust-env-logger" ,rust-env-logger-0.7) - ("rust-num-bigint" ,rust-num-bigint-0.2) + ("rust-hex" ,rust-hex-0.4) + ("rust-ntest" ,rust-ntest-0.7) + ("rust-path-clean" ,rust-path-clean-0.1) + ("rust-pretty-assertions" ,rust-pretty-assertions-0.7) ("rust-pretty-assertions" ,rust-pretty-assertions-0.6) - ("rust-pretty-env-logger" ,rust-pretty-env-logger-0.3) + ("rust-reqwest" ,rust-reqwest-0.11) ("rust-serde" ,rust-serde-1) ("rust-serde-json" ,rust-serde-json-1) + ("rust-sha-1" ,rust-sha-1-0.9) ("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 + ("rust-tempfile" ,rust-tempfile-3) + ("rust-url" ,rust-url-2) + ("rust-walkdir" ,rust-walkdir-2)) #: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))))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + (install-file "target/release/swc" bin))))))) (home-page "https://swc.rs/") (synopsis "Typescript/javascript compiler") (description "@code{rust-swc} is a typescript/javascript compiler. It |