gnu: Add rust-packed-struct.

* gnu/packages/crates-io.scm (rust-packed-struct): New variable.
This commit is contained in:
Danny Milosavljevic 2020-09-17 19:44:27 +02:00
parent aa9ba865de
commit 7e25147e15
No known key found for this signature in database
GPG key ID: E71A35542C30BAA5

View file

@ -30762,3 +30762,44 @@ (define-public rust-zoneinfo-compiled-0.4
(description
"This package provides a library for parsing compiled zoneinfo files.")
(license license:expat)))
(define-public rust-packed-struct
(package
(name "rust-packed-struct")
(version "0.3.0")
(source
(origin
(method url-fetch)
(uri (crate-uri "packed_struct" version))
(file-name
(string-append name "-" version ".tar.gz"))
(sha256
(base32
"10b2fmxchmcigwagnhi42frj74dl02wyv0xwmbr9839qfh7gijlh"))))
(build-system cargo-build-system)
(arguments
`(#:cargo-inputs
(("rust-serde" ,rust-serde-1)
("rust-serde-derive" ,rust-serde-derive-1))))
(home-page "http://www.hashmismatch.net/libraries/packed-struct/")
(synopsis "Binary-level structure packing and unpacking generator")
(description "This package provides bit-level packing an unpacking
of structs. The library provides a meta-programming approach, using
attributes to define fields and how they should be packed. The resulting
trait implementations provide safe packing, unpacking and runtime debugging
formatters with per-field documentation generated for each structure.
@itemize
@item Plain Rust structures, decorated with attributes
@item MSB or LSB integers of user-defined bit widths
@item Primitive enum code generation helper
@item MSB0 or LSB0 bit positioning
@item Documents the field's packing table
@item Runtime packing visualization
@item Nested packed types
@item Arrays of packed structures as fields
@item Reserved fields, their bits are always 0 or 1
@end itemize")
;; User can choose either license.
(license (list license:expat license:asl2.0))))