From 5dca5eef84e70826b06fcf03ec4b7f08a70801c4 Mon Sep 17 00:00:00 2001 From: John Soo Date: Fri, 20 Dec 2019 08:24:23 -0800 Subject: [PATCH 255/263] gnu: Add rust-ref-cast-0.2. * gnu/packages/crates-io.scm (rust-ref-cast-0.2): New variable. --- gnu/packages/crates-io.scm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 62bc03797b..9ecefa66ce 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -7858,6 +7858,32 @@ system calls.") (properties '((hidden? . #t))) (license license:expat))) +(define-public rust-ref-cast-0.2 + (package + (name "rust-ref-cast") + (version "0.2.6") + (source + (origin + (method url-fetch) + (uri (crate-uri "ref-cast" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0jgj1zxaikqm030flpifbp517fy4z21lly6ysbwyciii39bkzcf1")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t + #:cargo-inputs + (("rust-ref-cast-impl" ,rust-ref-cast-impl-0.2)))) + (home-page "https://github.com/dtolnay/ref-cast") + (synopsis + "Safely cast &T to &U") + (description + "Safely cast &T to &U where the struct U contains a single field of type +T.") + (license `(,license:asl2.0 ,license:expat)))) + (define-public rust-ref-cast-impl-0.2 (package (name "rust-ref-cast-impl") -- 2.24.1