2021-01-25 08:26:54 +00:00
|
|
|
{ lib, fetchFromGitHub, rustPlatform }:
|
2019-01-05 20:01:29 +00:00
|
|
|
|
|
|
|
with rustPlatform;
|
|
|
|
|
|
|
|
buildRustPackage rec {
|
2019-08-31 12:41:23 +01:00
|
|
|
pname = "svd2rust";
|
2021-04-28 01:03:36 +01:00
|
|
|
version = "0.18.0";
|
2019-01-05 20:01:29 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rust-embedded";
|
|
|
|
repo = "svd2rust";
|
|
|
|
rev = "v${version}";
|
2021-04-28 01:03:36 +01:00
|
|
|
sha256 = "1p0zq3q4g9lr0ghavp7v1dwsqq19lkljkm1i2hsb1sk3pxa1f69n";
|
2019-01-05 20:01:29 +00:00
|
|
|
};
|
|
|
|
cargoPatches = [ ./cargo-lock.patch ];
|
|
|
|
|
2021-04-28 01:03:36 +01:00
|
|
|
cargoSha256 = "0c0f86x17fzav5q76z3ha3g00rbgyz2lm5a5v28ggy0jmg9xgsv6";
|
2019-01-05 20:01:29 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-01-05 20:01:29 +00:00
|
|
|
description = "Generate Rust register maps (`struct`s) from SVD files";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/rust-embedded/svd2rust";
|
2019-01-05 20:01:29 +00:00
|
|
|
license = with licenses; [ mit asl20 ];
|
|
|
|
};
|
|
|
|
}
|