Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Merge pull request #53462 from astro/svd2rust

svd2rust: init at 0.14.0

authored by

Ryan Mulligan and committed by
GitHub
3b8ee87c d7aed7bf

+313
+283
pkgs/development/tools/rust/svd2rust/cargo-lock.patch
··· 1 + diff --git a/Cargo.lock b/Cargo.lock 2 + new file mode 100644 3 + --- /dev/null 4 + +++ b/Cargo.lock 5 + @@ -0,0 +1,278 @@ 6 + +[[package]] 7 + +name = "ansi_term" 8 + +version = "0.11.0" 9 + +source = "registry+https://github.com/rust-lang/crates.io-index" 10 + +dependencies = [ 11 + + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 12 + +] 13 + + 14 + +[[package]] 15 + +name = "atty" 16 + +version = "0.2.11" 17 + +source = "registry+https://github.com/rust-lang/crates.io-index" 18 + +dependencies = [ 19 + + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", 20 + + "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", 21 + + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 22 + +] 23 + + 24 + +[[package]] 25 + +name = "autocfg" 26 + +version = "0.1.1" 27 + +source = "registry+https://github.com/rust-lang/crates.io-index" 28 + + 29 + +[[package]] 30 + +name = "backtrace" 31 + +version = "0.3.13" 32 + +source = "registry+https://github.com/rust-lang/crates.io-index" 33 + +dependencies = [ 34 + + "autocfg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 35 + + "backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)", 36 + + "cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", 37 + + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", 38 + + "rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)", 39 + + "winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 40 + +] 41 + + 42 + +[[package]] 43 + +name = "backtrace-sys" 44 + +version = "0.1.28" 45 + +source = "registry+https://github.com/rust-lang/crates.io-index" 46 + +dependencies = [ 47 + + "cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)", 48 + + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", 49 + +] 50 + + 51 + +[[package]] 52 + +name = "bitflags" 53 + +version = "0.7.0" 54 + +source = "registry+https://github.com/rust-lang/crates.io-index" 55 + + 56 + +[[package]] 57 + +name = "bitflags" 58 + +version = "1.0.4" 59 + +source = "registry+https://github.com/rust-lang/crates.io-index" 60 + + 61 + +[[package]] 62 + +name = "cast" 63 + +version = "0.2.2" 64 + +source = "registry+https://github.com/rust-lang/crates.io-index" 65 + + 66 + +[[package]] 67 + +name = "cc" 68 + +version = "1.0.28" 69 + +source = "registry+https://github.com/rust-lang/crates.io-index" 70 + + 71 + +[[package]] 72 + +name = "cfg-if" 73 + +version = "0.1.6" 74 + +source = "registry+https://github.com/rust-lang/crates.io-index" 75 + + 76 + +[[package]] 77 + +name = "clap" 78 + +version = "2.32.0" 79 + +source = "registry+https://github.com/rust-lang/crates.io-index" 80 + +dependencies = [ 81 + + "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", 82 + + "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", 83 + + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 84 + + "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 85 + + "textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", 86 + + "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 87 + + "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", 88 + +] 89 + + 90 + +[[package]] 91 + +name = "either" 92 + +version = "1.5.0" 93 + +source = "registry+https://github.com/rust-lang/crates.io-index" 94 + + 95 + +[[package]] 96 + +name = "error-chain" 97 + +version = "0.11.0" 98 + +source = "registry+https://github.com/rust-lang/crates.io-index" 99 + +dependencies = [ 100 + + "backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", 101 + +] 102 + + 103 + +[[package]] 104 + +name = "inflections" 105 + +version = "1.1.1" 106 + +source = "registry+https://github.com/rust-lang/crates.io-index" 107 + + 108 + +[[package]] 109 + +name = "libc" 110 + +version = "0.2.46" 111 + +source = "registry+https://github.com/rust-lang/crates.io-index" 112 + + 113 + +[[package]] 114 + +name = "quote" 115 + +version = "0.3.15" 116 + +source = "registry+https://github.com/rust-lang/crates.io-index" 117 + + 118 + +[[package]] 119 + +name = "redox_syscall" 120 + +version = "0.1.50" 121 + +source = "registry+https://github.com/rust-lang/crates.io-index" 122 + + 123 + +[[package]] 124 + +name = "redox_termios" 125 + +version = "0.1.1" 126 + +source = "registry+https://github.com/rust-lang/crates.io-index" 127 + +dependencies = [ 128 + + "redox_syscall 0.1.50 (registry+https://github.com/rust-lang/crates.io-index)", 129 + +] 130 + + 131 + +[[package]] 132 + +name = "rustc-demangle" 133 + +version = "0.1.13" 134 + +source = "registry+https://github.com/rust-lang/crates.io-index" 135 + + 136 + +[[package]] 137 + +name = "strsim" 138 + +version = "0.7.0" 139 + +source = "registry+https://github.com/rust-lang/crates.io-index" 140 + + 141 + +[[package]] 142 + +name = "svd-parser" 143 + +version = "0.6.0" 144 + +source = "registry+https://github.com/rust-lang/crates.io-index" 145 + +dependencies = [ 146 + + "either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", 147 + + "xmltree 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", 148 + +] 149 + + 150 + +[[package]] 151 + +name = "svd2rust" 152 + +version = "0.14.0" 153 + +dependencies = [ 154 + + "cast 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", 155 + + "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", 156 + + "either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", 157 + + "error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", 158 + + "inflections 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 159 + + "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", 160 + + "svd-parser 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", 161 + + "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", 162 + +] 163 + + 164 + +[[package]] 165 + +name = "syn" 166 + +version = "0.11.11" 167 + +source = "registry+https://github.com/rust-lang/crates.io-index" 168 + +dependencies = [ 169 + + "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", 170 + + "synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", 171 + + "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 172 + +] 173 + + 174 + +[[package]] 175 + +name = "synom" 176 + +version = "0.11.3" 177 + +source = "registry+https://github.com/rust-lang/crates.io-index" 178 + +dependencies = [ 179 + + "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", 180 + +] 181 + + 182 + +[[package]] 183 + +name = "termion" 184 + +version = "1.5.1" 185 + +source = "registry+https://github.com/rust-lang/crates.io-index" 186 + +dependencies = [ 187 + + "libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)", 188 + + "redox_syscall 0.1.50 (registry+https://github.com/rust-lang/crates.io-index)", 189 + + "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", 190 + +] 191 + + 192 + +[[package]] 193 + +name = "textwrap" 194 + +version = "0.10.0" 195 + +source = "registry+https://github.com/rust-lang/crates.io-index" 196 + +dependencies = [ 197 + + "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", 198 + +] 199 + + 200 + +[[package]] 201 + +name = "unicode-width" 202 + +version = "0.1.5" 203 + +source = "registry+https://github.com/rust-lang/crates.io-index" 204 + + 205 + +[[package]] 206 + +name = "unicode-xid" 207 + +version = "0.0.4" 208 + +source = "registry+https://github.com/rust-lang/crates.io-index" 209 + + 210 + +[[package]] 211 + +name = "vec_map" 212 + +version = "0.8.1" 213 + +source = "registry+https://github.com/rust-lang/crates.io-index" 214 + + 215 + +[[package]] 216 + +name = "winapi" 217 + +version = "0.3.6" 218 + +source = "registry+https://github.com/rust-lang/crates.io-index" 219 + +dependencies = [ 220 + + "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 221 + + "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", 222 + +] 223 + + 224 + +[[package]] 225 + +name = "winapi-i686-pc-windows-gnu" 226 + +version = "0.4.0" 227 + +source = "registry+https://github.com/rust-lang/crates.io-index" 228 + + 229 + +[[package]] 230 + +name = "winapi-x86_64-pc-windows-gnu" 231 + +version = "0.4.0" 232 + +source = "registry+https://github.com/rust-lang/crates.io-index" 233 + + 234 + +[[package]] 235 + +name = "xml-rs" 236 + +version = "0.3.6" 237 + +source = "registry+https://github.com/rust-lang/crates.io-index" 238 + +dependencies = [ 239 + + "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", 240 + +] 241 + + 242 + +[[package]] 243 + +name = "xmltree" 244 + +version = "0.3.2" 245 + +source = "registry+https://github.com/rust-lang/crates.io-index" 246 + +dependencies = [ 247 + + "xml-rs 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", 248 + +] 249 + + 250 + +[metadata] 251 + +"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" 252 + +"checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" 253 + +"checksum autocfg 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4e5f34df7a019573fb8bdc7e24a2bfebe51a2a1d6bfdbaeccedb3c41fc574727" 254 + +"checksum backtrace 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "b5b493b66e03090ebc4343eb02f94ff944e0cbc9ac6571491d170ba026741eb5" 255 + +"checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6" 256 + +"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" 257 + +"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" 258 + +"checksum cast 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "926013f2860c46252efceabb19f4a6b308197505082c609025aa6706c011d427" 259 + +"checksum cc 1.0.28 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4a8b715cb4597106ea87c7c84b2f1d452c7492033765df7f32651e66fcf749" 260 + +"checksum cfg-if 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "082bb9b28e00d3c9d39cc03e64ce4cea0f1bb9b3fde493f0cbc008472d22bdf4" 261 + +"checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e" 262 + +"checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0" 263 + +"checksum error-chain 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff511d5dc435d703f4971bc399647c9bc38e20cb41452e3b9feb4765419ed3f3" 264 + +"checksum inflections 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a257582fdcde896fd96463bf2d40eefea0580021c0712a0e2b028b60b47a837a" 265 + +"checksum libc 0.2.46 (registry+https://github.com/rust-lang/crates.io-index)" = "023a4cd09b2ff695f9734c1934145a315594b7986398496841c7031a5a1bbdbd" 266 + +"checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" 267 + +"checksum redox_syscall 0.1.50 (registry+https://github.com/rust-lang/crates.io-index)" = "52ee9a534dc1301776eff45b4fa92d2c39b1d8c3d3357e6eb593e0d795506fc2" 268 + +"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" 269 + +"checksum rustc-demangle 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "adacaae16d02b6ec37fdc7acfcddf365978de76d1983d3ee22afc260e1ca9619" 270 + +"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" 271 + +"checksum svd-parser 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f22b4579485b26262f36086d6b74903befc043a57f8377dfcf05bcf5335cb251" 272 + +"checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" 273 + +"checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" 274 + +"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" 275 + +"checksum textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "307686869c93e71f94da64286f9a9524c0f308a9e1c87a583de8e9c9039ad3f6" 276 + +"checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" 277 + +"checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" 278 + +"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" 279 + +"checksum winapi 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "92c1eb33641e276cfa214a0522acad57be5c56b10cb348b3c5117db75f3ac4b0" 280 + +"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 281 + +"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 282 + +"checksum xml-rs 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "7ec6c39eaa68382c8e31e35239402c0a9489d4141a8ceb0c716099a0b515b562" 283 + +"checksum xmltree 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "472a9d37c7c53ab2391161df5b89b1f3bf76dab6ab150d7941ecbdd832282082"
+28
pkgs/development/tools/rust/svd2rust/default.nix
··· 1 + { stdenv, fetchFromGitHub, rustPlatform }: 2 + 3 + with rustPlatform; 4 + 5 + buildRustPackage rec { 6 + name = "svd2rust-${version}"; 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 = "0wsiaa6q9hr9x1cbg6sc8ajg846jjci5qwhdga4d408fmqav72ih"; 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 + }
+2
pkgs/top-level/all-packages.nix
··· 7553 7553 7554 7554 metaBuildEnv = callPackage ../development/compilers/meta-environment/meta-build-env { }; 7555 7555 7556 + svd2rust = callPackage ../development/tools/rust/svd2rust { }; 7557 + 7556 7558 swift = callPackage ../development/compilers/swift { }; 7557 7559 7558 7560 swiProlog = callPackage ../development/compilers/swi-prolog { };