From 8f290c4a7f4afe9ec5cf78ce56f16778b946994b Mon Sep 17 00:00:00 2001 From: Valentin Ignatev Date: Sun, 19 Jan 2020 16:05:30 +0300 Subject: [PATCH 112/275] gnu: Add rust-ref-cast-1.0. * gnu/packages/crates-io.scm (rust-ref-cast-1.0): New variable. --- gnu/packages/crates-io.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 8f93427840..9d64309079 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -10917,6 +10917,33 @@ system calls.") functionality.") (license license:expat))) +(define-public rust-ref-cast-1.0 + (package + (name "rust-ref-cast") + (version "1.0.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "ref-cast" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "1vy378bdzb4kcz13kh96c5n5qw1jinhfrya5j4bf9rxz65x1jzq7")))) + (build-system cargo-build-system) + (arguments + `(#:skip-build? #t + #:cargo-inputs + (("rust-ref-cast-impl" ,rust-ref-cast-impl-1.0)) + #:cargo-development-inputs + (("rust-rustversion" ,rust-rustversion-1.0) + ("rust-trybuild" ,rust-trybuild-1.0)))) + (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 (list license:expat license:asl2.0)))) + (define-public rust-ref-cast-0.2 (package (name "rust-ref-cast") -- 2.25.0