3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/tools/rust/svd2rust/default.nix

27 lines
703 B
Nix
Raw Normal View History

2021-05-18 19:01:24 +01:00
{ lib, stdenv, fetchFromGitHub, rustPlatform, libiconv }:
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-05-18 19:01:24 +01: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 ];
};
}