gnu: Add rust-cxx-1.

* gnu/packages/crates-io.scm (rust-cxx-1): New variable.
(rust-cxx-0.5): Inherit from rust-cxx-1.
This commit is contained in:
Efraim Flashner 2021-06-10 23:21:46 +03:00
parent 6093a2b46a
commit f358398cdc
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -11006,8 +11006,42 @@ (define-public rust-custom-derive-0.1
attributes.")
(license (list license:asl2.0 license:expat))))
(define-public rust-cxx-1
(package
(name "rust-cxx")
(version "1.0.49")
(source
(origin
(method url-fetch)
(uri (crate-uri "cxx" version))
(file-name
(string-append name "-" version ".tar.gz"))
(sha256
(base32
"0xj29zzd45bkk797902h22kppzmrzm7v9a2wijfiqr964vhrldk5"))))
(build-system cargo-build-system)
(arguments
`(#:tests? #f ; Cannot compile cxx-test-suite.
#:rust ,rust-1.48 ; or newer
#:cargo-inputs
(("rust-cc" ,rust-cc-1)
("rust-cxxbridge-flags" ,rust-cxxbridge-flags-1)
("rust-cxxbridge-macro" ,rust-cxxbridge-macro-1)
("rust-link-cplusplus" ,rust-link-cplusplus-1))
#:cargo-development-inputs
(("rust-cxx-build" ,rust-cxx-build-1)
("rust-cxx-gen" ,rust-cxx-gen-0.7)
("rust-cxx-test-suite" ,rust-cxx-test-suite-0.0.0)
("rust-rustversion" ,rust-rustversion-1)
("rust-trybuild" ,rust-trybuild-1))))
(home-page "https://cxx.rs")
(synopsis "Safe interop between Rust and C++")
(description "This package provides a safe interop between Rust and C++.")
(license (list license:expat license:asl2.0))))
(define-public rust-cxx-0.5
(package
(inherit rust-cxx-1)
(name "rust-cxx")
(version "0.5.10")
(source
@ -11019,7 +11053,6 @@ (define-public rust-cxx-0.5
(sha256
(base32
"1alj19zf8jm5j8c8hynqb36f0vyjqs8yhwmxpcapfmb5lav4ipgb"))))
(build-system cargo-build-system)
(arguments
`(#:tests? #f ; Cannot compile cxx-test-suite.
#:cargo-inputs
@ -11032,7 +11065,7 @@ (define-public rust-cxx-0.5
("rust-cxx-gen" ,rust-cxx-gen-0.6)
("rust-cxx-test-suite" ,rust-cxx-test-suite-0.0.0)
("rust-rustversion" ,rust-rustversion-1)
("rust-trybuild" ,rust-trybuild-1))))
("rust-trybuild" ,rust-trybuild-1))))))
(define-public rust-cxx-build-1
(package