gnu: rust-swc: Update to 1.2.124.

* gnu/packages/rust-apps.scm (rust-swc): Update to 1.2.124.
[source]: Add snippet to not hardcode dependency versions.
[arguments]: Don't install package source. Don't skip tests. Add
cargo-build-flags and cargo-test-flags to only build the swc_cli binary.
Remove custom 'enable-unstable-phases, 'patch-build-failures phases. Use
custom 'install phase.
[cargo-inputs]: Add rust-abi-stable-0.10, rust-ahash-0.7,
rust-ansi-term-0.12, rust-anyhow-1, rust-arrayvec-0.5, rust-arbitrary-1,
rust-auto-impl-0.5, rust-auto-impl-0.4, rust-backtrace-0.3,
rust-bincode-1, rust-bitflags-1, rust-browserslist-0.6, rust-cfg-if-0.1,
rust-copyless-0.1, rust-debug-unreachable-0.1, rust-difference-2,
rust-glob-0.3, rust-hex-0.4, rust-indexmap-1, rust-inflector-0.11,
rust-lexical-5, rust-libloading-0.7, rust-lru-0.7,
rust-mimalloc-rust-0.1, rust-normpath-0.2, rust-num-bigint-0.2,
rust-owning-ref-0.4, rust-parking-lot-0.11, rust-parking-lot-core-0.8,
rust-paw-0.8, rust-pmutil-0.5, rust-pretty-assertions-0.7,
rust-pretty-assertions-0.6, rust-quote-1, rust-rayon-1,
rust-rustc-hash-1, rust-semver-0.9, rust-serde-1, rust-serde-json-1,
rust-serde-regex-1, rust-sha-1-0.9, rust-smallvec-1, rust-sourcemap-6,
rust-string-cache-codegen-0.5, rust-structopt-0.3, rust-syn-1,
rust-termcolor-1, rust-tracing-0.1, rust-tracing-subscriber-0.3,
rust-typed-arena-2, rust-wasm-bindgen-0.2,
rust-wasm-bindgen-futures-0.4, rust-unicode-width-0.1,
rust-unicode-xid-0.2, rust-url-2.  Replace rust-dashmap-3 with 4,
rust-napi-0.5 with 2, rust-napi-build-0.2 with 1, rust-napi-derive-0.5
with 2, rust-ordered-float-1 with 2. Remove rust-fxhash-0.2,
rust-jemallocator-0.3, rust-log-0.4, rust-mimalloc-0.1.
[cargo-development-inputs]: Add rust-ansi-term-0.12, rust-dashmap-4,
rust-hex-0.4, rust-ntest-0.7, rust-path-clean-0.1,
rust-pretty-assertions-0.7, rust-reqwest-0.11, rust-sha-1-0.9,
rust-url-2, rust-walkdir-2.  Remove rust-num-bigint-0.2,
rust-pretty-env-logger-0.3, rust-string-cache-codegen-0.5,
rust-tempfile-3.
This commit is contained in:
Efraim Flashner 2023-10-03 10:11:10 +03:00
parent b587d0bf36
commit cf300075a5
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -1084,7 +1084,7 @@ (define-public rot8
(define-public rust-swc (define-public rust-swc
(package (package
(name "rust-swc") (name "rust-swc")
(version "1.2.24") (version "1.2.124")
(source (source
(origin (origin
(method git-fetch) (method git-fetch)
@ -1094,81 +1094,125 @@ (define-public rust-swc
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 (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) (build-system cargo-build-system)
(arguments (arguments
`(#:cargo-inputs `(#:install-source? #f
(("rust-ansi-term" ,rust-ansi-term-0.12) #:cargo-build-flags
("rust-base64" ,rust-base64-0.12) '("--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-console-error-panic-hook" ,rust-console-error-panic-hook-0.1)
("rust-copyless" ,rust-copyless-0.1)
("rust-crc" ,rust-crc-1) ("rust-crc" ,rust-crc-1)
("rust-darling" ,rust-darling-0.10) ("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-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-is-macro" ,rust-is-macro-0.1)
("rust-jemallocator" ,rust-jemallocator-0.3) ("rust-lexical" ,rust-lexical-5)
("rust-log" ,rust-log-0.4) ("rust-libloading" ,rust-libloading-0.7)
("rust-mimalloc" ,rust-mimalloc-0.1) ("rust-lru" ,rust-lru-0.7)
("rust-napi" ,rust-napi-0.5) ("rust-mimalloc-rust" ,rust-mimalloc-rust-0.1)
("rust-napi-build" ,rust-napi-build-0.2) ("rust-napi" ,rust-napi-2)
("rust-napi-derive" ,rust-napi-derive-0.5) ("rust-napi-build" ,rust-napi-build-1)
("rust-napi-derive" ,rust-napi-derive-2)
("rust-nom" ,rust-nom-5) ("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-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" ,rust-parking-lot-0.7)
("rust-parking-lot-core" ,rust-parking-lot-core-0.8)
("rust-path-clean" ,rust-path-clean-0.1) ("rust-path-clean" ,rust-path-clean-0.1)
("rust-paw" ,rust-paw-1)
("rust-petgraph" ,rust-petgraph-0.5) ("rust-petgraph" ,rust-petgraph-0.5)
("rust-phf" ,rust-phf-0.8) ("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-proc-macro2" ,rust-proc-macro2-1)
("rust-quote" ,rust-quote-1)
("rust-rayon" ,rust-rayon-1)
("rust-radix-fmt" ,rust-radix-fmt-1) ("rust-radix-fmt" ,rust-radix-fmt-1)
("rust-regex" ,rust-regex-1) ("rust-regex" ,rust-regex-1)
("rust-relative-path" ,rust-relative-path-1) ("rust-relative-path" ,rust-relative-path-1)
("rust-retain-mut" ,rust-retain-mut-0.1) ("rust-retain-mut" ,rust-retain-mut-0.1)
("rust-rustc-hash" ,rust-rustc-hash-1)
("rust-scoped-tls" ,rust-scoped-tls-1) ("rust-scoped-tls" ,rust-scoped-tls-1)
("rust-st-map" ,rust-st-map-0.1) ("rust-semver" ,rust-semver-0.9)
("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)
("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" ,rust-serde-1)
("rust-serde-json" ,rust-serde-json-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-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-string-cache-codegen" ,rust-string-cache-codegen-0.5)
("rust-tempfile" ,rust-tempfile-3)) ("rust-structopt" ,rust-structopt-0.3)
#:tests? #f ;; tests env_query_chrome_71 and project_env fail ("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" ,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-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-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-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-tempfile" ,rust-tempfile-3)
("rust-url" ,rust-url-2)
("rust-walkdir" ,rust-walkdir-2))
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(add-after 'unpack 'enable-unstable-features (replace 'install
(lambda _ (lambda* (#:key outputs #:allow-other-keys)
(setenv "RUSTC_BOOTSTRAP" "1") (let* ((out (assoc-ref outputs "out"))
(substitute* "ecmascript/jsdoc/src/lib.rs" (bin (string-append out "/bin")))
(("pub use self" all) (install-file "target/release/swc" bin)))))))
(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/") (home-page "https://swc.rs/")
(synopsis "Typescript/javascript compiler") (synopsis "Typescript/javascript compiler")
(description "@code{rust-swc} is a typescript/javascript compiler. It (description "@code{rust-swc} is a typescript/javascript compiler. It