depot/third_party/nixpkgs/pkgs/development/tools/rust/svd2rust/default.nix
Default email 3e2acf8aff Project import generated by Copybara.
GitOrigin-RevId: d42cd445dde587e9a993cd9434cb43da07c4c5de
2021-05-20 18:08:51 -05:00

26 lines
703 B
Nix

{ lib, stdenv, fetchFromGitHub, rustPlatform, libiconv }:
with rustPlatform;
buildRustPackage rec {
pname = "svd2rust";
version = "0.18.0";
src = fetchFromGitHub {
owner = "rust-embedded";
repo = "svd2rust";
rev = "v${version}";
sha256 = "1p0zq3q4g9lr0ghavp7v1dwsqq19lkljkm1i2hsb1sk3pxa1f69n";
};
cargoPatches = [ ./cargo-lock.patch ];
cargoSha256 = "0c0f86x17fzav5q76z3ha3g00rbgyz2lm5a5v28ggy0jmg9xgsv6";
buildInputs = lib.optional stdenv.isDarwin libiconv;
meta = with lib; {
description = "Generate Rust register maps (`struct`s) from SVD files";
homepage = "https://github.com/rust-embedded/svd2rust";
license = with licenses; [ mit asl20 ];
};
}