2021-05-20 23:08:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, libiconv }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
with rustPlatform;
|
|
|
|
|
|
|
|
buildRustPackage rec {
|
|
|
|
pname = "svd2rust";
|
2021-09-22 15:38:15 +00:00
|
|
|
version = "0.19.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rust-embedded";
|
|
|
|
repo = "svd2rust";
|
|
|
|
rev = "v${version}";
|
2021-09-22 15:38:15 +00:00
|
|
|
sha256 = "04mm0l7cv2q5yjxrkpr7p0kxd4nmi0d7m4l436q8p492nvgb75zx";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
cargoPatches = [ ./cargo-lock.patch ];
|
|
|
|
|
2021-09-22 15:38:15 +00:00
|
|
|
cargoSha256 = "1v1qx0r3k86jipyaaggm25pinsqicmzvnzrxd0lr5xk77s1kvgid";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
buildInputs = lib.optional stdenv.isDarwin libiconv;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Generate Rust register maps (`struct`s) from SVD files";
|
|
|
|
homepage = "https://github.com/rust-embedded/svd2rust";
|
|
|
|
license = with licenses; [ mit asl20 ];
|
|
|
|
};
|
|
|
|
}
|