nixpkgs/pkgs/development/tools/rust/svd2rust/default.nix

27 lines
703 B
Nix
Raw Normal View History

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