nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 20.03 28 lines 733 B view raw
1{ stdenv, fetchFromGitHub, rustPlatform }: 2 3with rustPlatform; 4 5buildRustPackage rec { 6 pname = "svd2rust"; 7 version = "0.14.0"; 8 9 src = fetchFromGitHub { 10 owner = "rust-embedded"; 11 repo = "svd2rust"; 12 rev = "v${version}"; 13 sha256 = "1a0ldmjkhyv5c52gcq8p8avkj0cgj1b367w6hm85bxdf5j4y8rra"; 14 }; 15 cargoPatches = [ ./cargo-lock.patch ]; 16 17 cargoSha256 = "03rfb8swxbcc9qm4mhxz5nm4b1gw7g7389wrdc91abxl4mw733ac"; 18 19 # doc tests fail due to missing dependency 20 doCheck = false; 21 22 meta = with stdenv.lib; { 23 description = "Generate Rust register maps (`struct`s) from SVD files"; 24 homepage = https://github.com/rust-embedded/svd2rust; 25 license = with licenses; [ mit asl20 ]; 26 platforms = platforms.all; 27 }; 28}