From 1ee22f1053963972440ad55ead69d4a4ceef02e5 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 22 Sep 2020 11:32:13 +0300 Subject: [PATCH] gnu: Add rust-scopeguard-1. * gnu/packages/crates-io.scm (rust-scopeguard-1): New variable. (rust-scopeguard-1.0): Inherit from rust-scopeguard-1. --- gnu/packages/crates-io.scm | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 6f5387c766..aa248258bf 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -22627,8 +22627,32 @@ (define-public rust-scoped-tls-0.1 (base32 "0a2bn9d2mb07c6l16sadijy4p540g498zddfxyiq4rsqpwrglbrk")))))) +(define-public rust-scopeguard-1 + (package + (name "rust-scopeguard") + (version "1.1.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "scopeguard" version)) + (file-name (string-append name "-" version ".crate")) + (sha256 + (base32 + "1kbqm85v43rq92vx7hfiay6pmcga03vrjbbfwqpyj3pwsg3b16nj")))) + (build-system cargo-build-system) + (home-page "https://github.com/bluss/scopeguard") + (synopsis "Scope guard which will run a closure even out of scope") + (description "This package provides a RAII scope guard that will run a +given closure when it goes out of scope, even if the code between panics +(assuming unwinding panic). Defines the macros @code{defer!}, +@code{defer_on_unwind!}, @code{defer_on_success!} as shorthands for guards +with one of the implemented strategies.") + (license (list license:asl2.0 + license:expat)))) + (define-public rust-scopeguard-1.0 (package + (inherit rust-scopeguard-1) (name "rust-scopeguard") (version "1.0.0") (source @@ -22639,17 +22663,7 @@ (define-public rust-scopeguard-1.0 (sha256 (base32 "03aay84r1f6w87ckbpj6cc4rnsxkxcfs13n5ynxjia0qkgjiabml")))) - (build-system cargo-build-system) - (arguments '(#:skip-build? #t)) - (home-page "https://github.com/bluss/scopeguard") - (synopsis "Scope guard which will run a closure even out of scope") - (description "This package provides a RAII scope guard that will run a -given closure when it goes out of scope, even if the code between panics -(assuming unwinding panic). Defines the macros @code{defer!}, -@code{defer_on_unwind!}, @code{defer_on_success!} as shorthands for guards -with one of the implemented strategies.") - (license (list license:asl2.0 - license:expat)))) + (arguments '(#:skip-build? #t)))) (define-public rust-scopeguard-0.3 (package