prefetch-npm-deps: remove runtime dependency on nix

authored by Lily Foster and committed by tomf c588edaf 5b0e4242

+355 -201
+317 -182
pkgs/build-support/node/fetch-npm-deps/Cargo.lock
··· 4 4 5 5 [[package]] 6 6 name = "aho-corasick" 7 - version = "1.1.2" 7 + version = "1.1.3" 8 8 source = "registry+https://github.com/rust-lang/crates.io-index" 9 - checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" 9 + checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" 10 10 dependencies = [ 11 11 "memchr", 12 12 ] 13 13 14 14 [[package]] 15 + name = "anstream" 16 + version = "0.6.13" 17 + source = "registry+https://github.com/rust-lang/crates.io-index" 18 + checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" 19 + dependencies = [ 20 + "anstyle", 21 + "anstyle-parse", 22 + "anstyle-query", 23 + "anstyle-wincon", 24 + "colorchoice", 25 + "utf8parse", 26 + ] 27 + 28 + [[package]] 29 + name = "anstyle" 30 + version = "1.0.6" 31 + source = "registry+https://github.com/rust-lang/crates.io-index" 32 + checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" 33 + 34 + [[package]] 35 + name = "anstyle-parse" 36 + version = "0.2.3" 37 + source = "registry+https://github.com/rust-lang/crates.io-index" 38 + checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" 39 + dependencies = [ 40 + "utf8parse", 41 + ] 42 + 43 + [[package]] 44 + name = "anstyle-query" 45 + version = "1.0.2" 46 + source = "registry+https://github.com/rust-lang/crates.io-index" 47 + checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" 48 + dependencies = [ 49 + "windows-sys 0.52.0", 50 + ] 51 + 52 + [[package]] 53 + name = "anstyle-wincon" 54 + version = "3.0.2" 55 + source = "registry+https://github.com/rust-lang/crates.io-index" 56 + checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" 57 + dependencies = [ 58 + "anstyle", 59 + "windows-sys 0.52.0", 60 + ] 61 + 62 + [[package]] 15 63 name = "anyhow" 16 - version = "1.0.75" 64 + version = "1.0.82" 17 65 source = "registry+https://github.com/rust-lang/crates.io-index" 18 - checksum = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" 66 + checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" 19 67 20 68 [[package]] 21 69 name = "async-channel" ··· 30 78 31 79 [[package]] 32 80 name = "autocfg" 33 - version = "1.1.0" 81 + version = "1.2.0" 34 82 source = "registry+https://github.com/rust-lang/crates.io-index" 35 - checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 83 + checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" 36 84 37 85 [[package]] 38 86 name = "backoff" ··· 47 95 48 96 [[package]] 49 97 name = "base64" 50 - version = "0.21.5" 98 + version = "0.22.0" 51 99 source = "registry+https://github.com/rust-lang/crates.io-index" 52 - checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" 100 + checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" 53 101 54 102 [[package]] 55 103 name = "bitflags" ··· 59 107 60 108 [[package]] 61 109 name = "bitflags" 62 - version = "2.4.1" 110 + version = "2.5.0" 63 111 source = "registry+https://github.com/rust-lang/crates.io-index" 64 - checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" 112 + checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" 65 113 66 114 [[package]] 67 115 name = "block-buffer" ··· 74 122 75 123 [[package]] 76 124 name = "bytes" 77 - version = "1.5.0" 125 + version = "1.6.0" 78 126 source = "registry+https://github.com/rust-lang/crates.io-index" 79 - checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" 127 + checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" 128 + 129 + [[package]] 130 + name = "camino" 131 + version = "1.1.6" 132 + source = "registry+https://github.com/rust-lang/crates.io-index" 133 + checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" 80 134 81 135 [[package]] 82 136 name = "castaway" ··· 86 140 87 141 [[package]] 88 142 name = "cc" 89 - version = "1.0.83" 143 + version = "1.0.94" 90 144 source = "registry+https://github.com/rust-lang/crates.io-index" 91 - checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" 92 - dependencies = [ 93 - "libc", 94 - ] 145 + checksum = "17f6e324229dc011159fcc089755d1e2e216a90d43a7dea6853ca740b84f35e7" 95 146 96 147 [[package]] 97 148 name = "cfg-if" ··· 100 151 checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 101 152 102 153 [[package]] 154 + name = "colorchoice" 155 + version = "1.0.0" 156 + source = "registry+https://github.com/rust-lang/crates.io-index" 157 + checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" 158 + 159 + [[package]] 103 160 name = "concurrent-queue" 104 - version = "2.3.0" 161 + version = "2.4.0" 105 162 source = "registry+https://github.com/rust-lang/crates.io-index" 106 - checksum = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" 163 + checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" 107 164 dependencies = [ 108 165 "crossbeam-utils", 109 166 ] 110 167 111 168 [[package]] 112 169 name = "cpufeatures" 113 - version = "0.2.11" 170 + version = "0.2.12" 114 171 source = "registry+https://github.com/rust-lang/crates.io-index" 115 - checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" 172 + checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" 116 173 dependencies = [ 117 174 "libc", 118 175 ] 119 176 120 177 [[package]] 121 178 name = "crossbeam-deque" 122 - version = "0.8.3" 179 + version = "0.8.5" 123 180 source = "registry+https://github.com/rust-lang/crates.io-index" 124 - checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" 181 + checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" 125 182 dependencies = [ 126 - "cfg-if", 127 183 "crossbeam-epoch", 128 184 "crossbeam-utils", 129 185 ] 130 186 131 187 [[package]] 132 188 name = "crossbeam-epoch" 133 - version = "0.9.15" 189 + version = "0.9.18" 134 190 source = "registry+https://github.com/rust-lang/crates.io-index" 135 - checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" 191 + checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" 136 192 dependencies = [ 137 - "autocfg", 138 - "cfg-if", 139 193 "crossbeam-utils", 140 - "memoffset", 141 - "scopeguard", 142 194 ] 143 195 144 196 [[package]] 145 197 name = "crossbeam-utils" 146 - version = "0.8.16" 198 + version = "0.8.19" 147 199 source = "registry+https://github.com/rust-lang/crates.io-index" 148 - checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" 149 - dependencies = [ 150 - "cfg-if", 151 - ] 200 + checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" 152 201 153 202 [[package]] 154 203 name = "crypto-common" ··· 162 211 163 212 [[package]] 164 213 name = "curl" 165 - version = "0.4.44" 214 + version = "0.4.46" 166 215 source = "registry+https://github.com/rust-lang/crates.io-index" 167 - checksum = "509bd11746c7ac09ebd19f0b17782eae80aadee26237658a6b4808afb5c11a22" 216 + checksum = "1e2161dd6eba090ff1594084e95fd67aeccf04382ffea77999ea94ed42ec67b6" 168 217 dependencies = [ 169 218 "curl-sys", 170 219 "libc", ··· 172 221 "openssl-sys", 173 222 "schannel", 174 223 "socket2", 175 - "winapi", 224 + "windows-sys 0.52.0", 176 225 ] 177 226 178 227 [[package]] 179 228 name = "curl-sys" 180 - version = "0.4.68+curl-8.4.0" 229 + version = "0.4.72+curl-8.6.0" 181 230 source = "registry+https://github.com/rust-lang/crates.io-index" 182 - checksum = "b4a0d18d88360e374b16b2273c832b5e57258ffc1d4aa4f96b108e0738d5752f" 231 + checksum = "29cbdc8314c447d11e8fd156dcdd031d9e02a7a976163e396b548c03153bc9ea" 183 232 dependencies = [ 184 233 "cc", 185 234 "libc", ··· 187 236 "openssl-sys", 188 237 "pkg-config", 189 238 "vcpkg", 190 - "windows-sys", 239 + "windows-sys 0.52.0", 191 240 ] 192 241 193 242 [[package]] ··· 202 251 203 252 [[package]] 204 253 name = "either" 205 - version = "1.9.0" 254 + version = "1.11.0" 206 255 source = "registry+https://github.com/rust-lang/crates.io-index" 207 - checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" 256 + checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" 257 + 258 + [[package]] 259 + name = "env_filter" 260 + version = "0.1.0" 261 + source = "registry+https://github.com/rust-lang/crates.io-index" 262 + checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" 263 + dependencies = [ 264 + "log", 265 + "regex", 266 + ] 208 267 209 268 [[package]] 210 269 name = "env_logger" 211 - version = "0.10.1" 270 + version = "0.11.3" 212 271 source = "registry+https://github.com/rust-lang/crates.io-index" 213 - checksum = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" 272 + checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" 214 273 dependencies = [ 274 + "anstream", 275 + "anstyle", 276 + "env_filter", 215 277 "humantime", 216 - "is-terminal", 217 278 "log", 218 - "regex", 219 - "termcolor", 220 279 ] 221 280 222 281 [[package]] 223 282 name = "errno" 224 - version = "0.3.7" 283 + version = "0.3.8" 225 284 source = "registry+https://github.com/rust-lang/crates.io-index" 226 - checksum = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8" 285 + checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" 227 286 dependencies = [ 228 287 "libc", 229 - "windows-sys", 288 + "windows-sys 0.52.0", 230 289 ] 231 290 232 291 [[package]] ··· 246 305 247 306 [[package]] 248 307 name = "fastrand" 249 - version = "2.0.1" 308 + version = "2.0.2" 250 309 source = "registry+https://github.com/rust-lang/crates.io-index" 251 - checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" 310 + checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" 252 311 253 312 [[package]] 254 313 name = "fnv" ··· 258 317 259 318 [[package]] 260 319 name = "form_urlencoded" 261 - version = "1.2.0" 320 + version = "1.2.1" 262 321 source = "registry+https://github.com/rust-lang/crates.io-index" 263 - checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" 322 + checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" 264 323 dependencies = [ 265 324 "percent-encoding", 266 325 ] 267 326 268 327 [[package]] 269 328 name = "futures-core" 270 - version = "0.3.29" 329 + version = "0.3.30" 271 330 source = "registry+https://github.com/rust-lang/crates.io-index" 272 - checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" 331 + checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" 273 332 274 333 [[package]] 275 334 name = "futures-io" 276 - version = "0.3.29" 335 + version = "0.3.30" 277 336 source = "registry+https://github.com/rust-lang/crates.io-index" 278 - checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" 337 + checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" 279 338 280 339 [[package]] 281 340 name = "futures-lite" ··· 304 363 305 364 [[package]] 306 365 name = "getrandom" 307 - version = "0.2.11" 366 + version = "0.2.14" 308 367 source = "registry+https://github.com/rust-lang/crates.io-index" 309 - checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" 368 + checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" 310 369 dependencies = [ 311 370 "cfg-if", 312 371 "libc", ··· 314 373 ] 315 374 316 375 [[package]] 317 - name = "hermit-abi" 318 - version = "0.3.3" 319 - source = "registry+https://github.com/rust-lang/crates.io-index" 320 - checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" 321 - 322 - [[package]] 323 376 name = "http" 324 - version = "0.2.11" 377 + version = "0.2.12" 325 378 source = "registry+https://github.com/rust-lang/crates.io-index" 326 - checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" 379 + checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" 327 380 dependencies = [ 328 381 "bytes", 329 382 "fnv", ··· 338 391 339 392 [[package]] 340 393 name = "idna" 341 - version = "0.4.0" 394 + version = "0.5.0" 342 395 source = "registry+https://github.com/rust-lang/crates.io-index" 343 - checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" 396 + checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" 344 397 dependencies = [ 345 398 "unicode-bidi", 346 399 "unicode-normalization", ··· 356 409 ] 357 410 358 411 [[package]] 359 - name = "is-terminal" 360 - version = "0.4.9" 412 + name = "is_executable" 413 + version = "1.0.1" 361 414 source = "registry+https://github.com/rust-lang/crates.io-index" 362 - checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" 415 + checksum = "fa9acdc6d67b75e626ad644734e8bc6df893d9cd2a834129065d3dd6158ea9c8" 363 416 dependencies = [ 364 - "hermit-abi", 365 - "rustix", 366 - "windows-sys", 417 + "winapi", 367 418 ] 368 419 369 420 [[package]] ··· 393 444 394 445 [[package]] 395 446 name = "itoa" 396 - version = "1.0.9" 447 + version = "1.0.11" 397 448 source = "registry+https://github.com/rust-lang/crates.io-index" 398 - checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" 449 + checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" 399 450 400 451 [[package]] 401 452 name = "libc" 402 - version = "0.2.150" 453 + version = "0.2.153" 403 454 source = "registry+https://github.com/rust-lang/crates.io-index" 404 - checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" 455 + checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" 405 456 406 457 [[package]] 407 458 name = "libz-sys" 408 - version = "1.1.12" 459 + version = "1.1.16" 409 460 source = "registry+https://github.com/rust-lang/crates.io-index" 410 - checksum = "d97137b25e321a73eef1418d1d5d2eda4d77e12813f8e6dead84bc52c5870a7b" 461 + checksum = "5e143b5e666b2695d28f6bca6497720813f699c9602dd7f5cac91008b8ada7f9" 411 462 dependencies = [ 412 463 "cc", 413 464 "libc", ··· 417 468 418 469 [[package]] 419 470 name = "linux-raw-sys" 420 - version = "0.4.11" 471 + version = "0.4.13" 421 472 source = "registry+https://github.com/rust-lang/crates.io-index" 422 - checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" 473 + checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" 423 474 424 475 [[package]] 425 476 name = "log" 426 - version = "0.4.20" 477 + version = "0.4.21" 427 478 source = "registry+https://github.com/rust-lang/crates.io-index" 428 - checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" 479 + checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" 429 480 430 481 [[package]] 431 482 name = "memchr" 432 - version = "2.6.4" 483 + version = "2.7.2" 433 484 source = "registry+https://github.com/rust-lang/crates.io-index" 434 - checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" 485 + checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" 435 486 436 487 [[package]] 437 - name = "memoffset" 438 - version = "0.9.0" 488 + name = "nix-nar" 489 + version = "0.3.0" 439 490 source = "registry+https://github.com/rust-lang/crates.io-index" 440 - checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" 491 + checksum = "d5549158a8b179c4fcd06a19f4bcc557db60c9cbd6771add9563f46c8d0325b5" 441 492 dependencies = [ 442 - "autocfg", 493 + "camino", 494 + "is_executable", 495 + "symlink", 496 + "thiserror", 443 497 ] 444 498 445 499 [[package]] 446 500 name = "once_cell" 447 - version = "1.18.0" 501 + version = "1.19.0" 448 502 source = "registry+https://github.com/rust-lang/crates.io-index" 449 - checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" 503 + checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" 450 504 451 505 [[package]] 452 506 name = "openssl-probe" ··· 456 510 457 511 [[package]] 458 512 name = "openssl-sys" 459 - version = "0.9.95" 513 + version = "0.9.102" 460 514 source = "registry+https://github.com/rust-lang/crates.io-index" 461 - checksum = "40a4130519a360279579c2053038317e40eff64d13fd3f004f9e1b72b8a6aaf9" 515 + checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" 462 516 dependencies = [ 463 517 "cc", 464 518 "libc", ··· 474 528 475 529 [[package]] 476 530 name = "percent-encoding" 477 - version = "2.3.0" 531 + version = "2.3.1" 478 532 source = "registry+https://github.com/rust-lang/crates.io-index" 479 - checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" 533 + checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 480 534 481 535 [[package]] 482 536 name = "pin-project" 483 - version = "1.1.3" 537 + version = "1.1.5" 484 538 source = "registry+https://github.com/rust-lang/crates.io-index" 485 - checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" 539 + checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" 486 540 dependencies = [ 487 541 "pin-project-internal", 488 542 ] 489 543 490 544 [[package]] 491 545 name = "pin-project-internal" 492 - version = "1.1.3" 546 + version = "1.1.5" 493 547 source = "registry+https://github.com/rust-lang/crates.io-index" 494 - checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" 548 + checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" 495 549 dependencies = [ 496 550 "proc-macro2", 497 551 "quote", ··· 500 554 501 555 [[package]] 502 556 name = "pin-project-lite" 503 - version = "0.2.13" 557 + version = "0.2.14" 504 558 source = "registry+https://github.com/rust-lang/crates.io-index" 505 - checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" 559 + checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" 506 560 507 561 [[package]] 508 562 name = "pkg-config" 509 - version = "0.3.27" 563 + version = "0.3.30" 510 564 source = "registry+https://github.com/rust-lang/crates.io-index" 511 - checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" 565 + checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" 512 566 513 567 [[package]] 514 568 name = "polling" ··· 523 577 "libc", 524 578 "log", 525 579 "pin-project-lite", 526 - "windows-sys", 580 + "windows-sys 0.48.0", 527 581 ] 528 582 529 583 [[package]] ··· 543 597 "env_logger", 544 598 "isahc", 545 599 "log", 600 + "nix-nar", 546 601 "rayon", 547 602 "serde", 548 603 "serde_json", ··· 555 610 556 611 [[package]] 557 612 name = "proc-macro2" 558 - version = "1.0.69" 613 + version = "1.0.81" 559 614 source = "registry+https://github.com/rust-lang/crates.io-index" 560 - checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" 615 + checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" 561 616 dependencies = [ 562 617 "unicode-ident", 563 618 ] 564 619 565 620 [[package]] 566 621 name = "quote" 567 - version = "1.0.33" 622 + version = "1.0.36" 568 623 source = "registry+https://github.com/rust-lang/crates.io-index" 569 - checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" 624 + checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" 570 625 dependencies = [ 571 626 "proc-macro2", 572 627 ] ··· 603 658 604 659 [[package]] 605 660 name = "rayon" 606 - version = "1.8.0" 661 + version = "1.10.0" 607 662 source = "registry+https://github.com/rust-lang/crates.io-index" 608 - checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" 663 + checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" 609 664 dependencies = [ 610 665 "either", 611 666 "rayon-core", ··· 613 668 614 669 [[package]] 615 670 name = "rayon-core" 616 - version = "1.12.0" 671 + version = "1.12.1" 617 672 source = "registry+https://github.com/rust-lang/crates.io-index" 618 - checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" 673 + checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" 619 674 dependencies = [ 620 675 "crossbeam-deque", 621 676 "crossbeam-utils", 622 677 ] 623 678 624 679 [[package]] 625 - name = "redox_syscall" 626 - version = "0.4.1" 627 - source = "registry+https://github.com/rust-lang/crates.io-index" 628 - checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" 629 - dependencies = [ 630 - "bitflags 1.3.2", 631 - ] 632 - 633 - [[package]] 634 680 name = "regex" 635 - version = "1.10.2" 681 + version = "1.10.4" 636 682 source = "registry+https://github.com/rust-lang/crates.io-index" 637 - checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" 683 + checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" 638 684 dependencies = [ 639 685 "aho-corasick", 640 686 "memchr", ··· 644 690 645 691 [[package]] 646 692 name = "regex-automata" 647 - version = "0.4.3" 693 + version = "0.4.6" 648 694 source = "registry+https://github.com/rust-lang/crates.io-index" 649 - checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" 695 + checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" 650 696 dependencies = [ 651 697 "aho-corasick", 652 698 "memchr", ··· 655 701 656 702 [[package]] 657 703 name = "regex-syntax" 658 - version = "0.8.2" 704 + version = "0.8.3" 659 705 source = "registry+https://github.com/rust-lang/crates.io-index" 660 - checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" 706 + checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" 661 707 662 708 [[package]] 663 709 name = "rustix" 664 - version = "0.38.25" 710 + version = "0.38.32" 665 711 source = "registry+https://github.com/rust-lang/crates.io-index" 666 - checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" 712 + checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" 667 713 dependencies = [ 668 - "bitflags 2.4.1", 714 + "bitflags 2.5.0", 669 715 "errno", 670 716 "libc", 671 717 "linux-raw-sys", 672 - "windows-sys", 718 + "windows-sys 0.52.0", 673 719 ] 674 720 675 721 [[package]] 676 722 name = "ryu" 677 - version = "1.0.15" 723 + version = "1.0.17" 678 724 source = "registry+https://github.com/rust-lang/crates.io-index" 679 - checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" 725 + checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" 680 726 681 727 [[package]] 682 728 name = "same-file" ··· 689 735 690 736 [[package]] 691 737 name = "schannel" 692 - version = "0.1.22" 738 + version = "0.1.23" 693 739 source = "registry+https://github.com/rust-lang/crates.io-index" 694 - checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" 740 + checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" 695 741 dependencies = [ 696 - "windows-sys", 742 + "windows-sys 0.52.0", 697 743 ] 698 744 699 745 [[package]] 700 - name = "scopeguard" 701 - version = "1.2.0" 702 - source = "registry+https://github.com/rust-lang/crates.io-index" 703 - checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 704 - 705 - [[package]] 706 746 name = "serde" 707 - version = "1.0.193" 747 + version = "1.0.198" 708 748 source = "registry+https://github.com/rust-lang/crates.io-index" 709 - checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" 749 + checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" 710 750 dependencies = [ 711 751 "serde_derive", 712 752 ] 713 753 714 754 [[package]] 715 755 name = "serde_derive" 716 - version = "1.0.193" 756 + version = "1.0.198" 717 757 source = "registry+https://github.com/rust-lang/crates.io-index" 718 - checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" 758 + checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" 719 759 dependencies = [ 720 760 "proc-macro2", 721 761 "quote", ··· 724 764 725 765 [[package]] 726 766 name = "serde_json" 727 - version = "1.0.108" 767 + version = "1.0.116" 728 768 source = "registry+https://github.com/rust-lang/crates.io-index" 729 - checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" 769 + checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" 730 770 dependencies = [ 731 771 "itoa", 732 772 "ryu", ··· 777 817 778 818 [[package]] 779 819 name = "socket2" 780 - version = "0.4.10" 820 + version = "0.5.6" 781 821 source = "registry+https://github.com/rust-lang/crates.io-index" 782 - checksum = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" 822 + checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" 783 823 dependencies = [ 784 824 "libc", 785 - "winapi", 825 + "windows-sys 0.52.0", 786 826 ] 787 827 788 828 [[package]] 829 + name = "symlink" 830 + version = "0.1.0" 831 + source = "registry+https://github.com/rust-lang/crates.io-index" 832 + checksum = "a7973cce6668464ea31f176d85b13c7ab3bba2cb3b77a2ed26abd7801688010a" 833 + 834 + [[package]] 789 835 name = "syn" 790 - version = "2.0.39" 836 + version = "2.0.59" 791 837 source = "registry+https://github.com/rust-lang/crates.io-index" 792 - checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" 838 + checksum = "4a6531ffc7b071655e4ce2e04bd464c4830bb585a61cabb96cf808f05172615a" 793 839 dependencies = [ 794 840 "proc-macro2", 795 841 "quote", ··· 798 844 799 845 [[package]] 800 846 name = "tempfile" 801 - version = "3.8.1" 847 + version = "3.10.1" 802 848 source = "registry+https://github.com/rust-lang/crates.io-index" 803 - checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" 849 + checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" 804 850 dependencies = [ 805 851 "cfg-if", 806 - "fastrand 2.0.1", 807 - "redox_syscall", 852 + "fastrand 2.0.2", 808 853 "rustix", 809 - "windows-sys", 854 + "windows-sys 0.52.0", 855 + ] 856 + 857 + [[package]] 858 + name = "thiserror" 859 + version = "1.0.58" 860 + source = "registry+https://github.com/rust-lang/crates.io-index" 861 + checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" 862 + dependencies = [ 863 + "thiserror-impl", 810 864 ] 811 865 812 866 [[package]] 813 - name = "termcolor" 814 - version = "1.4.0" 867 + name = "thiserror-impl" 868 + version = "1.0.58" 815 869 source = "registry+https://github.com/rust-lang/crates.io-index" 816 - checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" 870 + checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" 817 871 dependencies = [ 818 - "winapi-util", 872 + "proc-macro2", 873 + "quote", 874 + "syn", 819 875 ] 820 876 821 877 [[package]] ··· 883 939 884 940 [[package]] 885 941 name = "unicode-bidi" 886 - version = "0.3.13" 942 + version = "0.3.15" 887 943 source = "registry+https://github.com/rust-lang/crates.io-index" 888 - checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" 944 + checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" 889 945 890 946 [[package]] 891 947 name = "unicode-ident" ··· 895 951 896 952 [[package]] 897 953 name = "unicode-normalization" 898 - version = "0.1.22" 954 + version = "0.1.23" 899 955 source = "registry+https://github.com/rust-lang/crates.io-index" 900 - checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" 956 + checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" 901 957 dependencies = [ 902 958 "tinyvec", 903 959 ] 904 960 905 961 [[package]] 906 962 name = "url" 907 - version = "2.4.1" 963 + version = "2.5.0" 908 964 source = "registry+https://github.com/rust-lang/crates.io-index" 909 - checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" 965 + checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" 910 966 dependencies = [ 911 967 "form_urlencoded", 912 968 "idna", 913 969 "percent-encoding", 914 970 "serde", 915 971 ] 972 + 973 + [[package]] 974 + name = "utf8parse" 975 + version = "0.2.1" 976 + source = "registry+https://github.com/rust-lang/crates.io-index" 977 + checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" 916 978 917 979 [[package]] 918 980 name = "vcpkg" ··· 934 996 935 997 [[package]] 936 998 name = "walkdir" 937 - version = "2.4.0" 999 + version = "2.5.0" 938 1000 source = "registry+https://github.com/rust-lang/crates.io-index" 939 - checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" 1001 + checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" 940 1002 dependencies = [ 941 1003 "same-file", 942 1004 "winapi-util", ··· 985 1047 source = "registry+https://github.com/rust-lang/crates.io-index" 986 1048 checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 987 1049 dependencies = [ 988 - "windows-targets", 1050 + "windows-targets 0.48.5", 1051 + ] 1052 + 1053 + [[package]] 1054 + name = "windows-sys" 1055 + version = "0.52.0" 1056 + source = "registry+https://github.com/rust-lang/crates.io-index" 1057 + checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 1058 + dependencies = [ 1059 + "windows-targets 0.52.5", 989 1060 ] 990 1061 991 1062 [[package]] ··· 994 1065 source = "registry+https://github.com/rust-lang/crates.io-index" 995 1066 checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 996 1067 dependencies = [ 997 - "windows_aarch64_gnullvm", 998 - "windows_aarch64_msvc", 999 - "windows_i686_gnu", 1000 - "windows_i686_msvc", 1001 - "windows_x86_64_gnu", 1002 - "windows_x86_64_gnullvm", 1003 - "windows_x86_64_msvc", 1068 + "windows_aarch64_gnullvm 0.48.5", 1069 + "windows_aarch64_msvc 0.48.5", 1070 + "windows_i686_gnu 0.48.5", 1071 + "windows_i686_msvc 0.48.5", 1072 + "windows_x86_64_gnu 0.48.5", 1073 + "windows_x86_64_gnullvm 0.48.5", 1074 + "windows_x86_64_msvc 0.48.5", 1075 + ] 1076 + 1077 + [[package]] 1078 + name = "windows-targets" 1079 + version = "0.52.5" 1080 + source = "registry+https://github.com/rust-lang/crates.io-index" 1081 + checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" 1082 + dependencies = [ 1083 + "windows_aarch64_gnullvm 0.52.5", 1084 + "windows_aarch64_msvc 0.52.5", 1085 + "windows_i686_gnu 0.52.5", 1086 + "windows_i686_gnullvm", 1087 + "windows_i686_msvc 0.52.5", 1088 + "windows_x86_64_gnu 0.52.5", 1089 + "windows_x86_64_gnullvm 0.52.5", 1090 + "windows_x86_64_msvc 0.52.5", 1004 1091 ] 1005 1092 1006 1093 [[package]] ··· 1010 1097 checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" 1011 1098 1012 1099 [[package]] 1100 + name = "windows_aarch64_gnullvm" 1101 + version = "0.52.5" 1102 + source = "registry+https://github.com/rust-lang/crates.io-index" 1103 + checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" 1104 + 1105 + [[package]] 1013 1106 name = "windows_aarch64_msvc" 1014 1107 version = "0.48.5" 1015 1108 source = "registry+https://github.com/rust-lang/crates.io-index" 1016 1109 checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" 1017 1110 1018 1111 [[package]] 1112 + name = "windows_aarch64_msvc" 1113 + version = "0.52.5" 1114 + source = "registry+https://github.com/rust-lang/crates.io-index" 1115 + checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" 1116 + 1117 + [[package]] 1019 1118 name = "windows_i686_gnu" 1020 1119 version = "0.48.5" 1021 1120 source = "registry+https://github.com/rust-lang/crates.io-index" 1022 1121 checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" 1023 1122 1024 1123 [[package]] 1124 + name = "windows_i686_gnu" 1125 + version = "0.52.5" 1126 + source = "registry+https://github.com/rust-lang/crates.io-index" 1127 + checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" 1128 + 1129 + [[package]] 1130 + name = "windows_i686_gnullvm" 1131 + version = "0.52.5" 1132 + source = "registry+https://github.com/rust-lang/crates.io-index" 1133 + checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" 1134 + 1135 + [[package]] 1025 1136 name = "windows_i686_msvc" 1026 1137 version = "0.48.5" 1027 1138 source = "registry+https://github.com/rust-lang/crates.io-index" 1028 1139 checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" 1029 1140 1030 1141 [[package]] 1142 + name = "windows_i686_msvc" 1143 + version = "0.52.5" 1144 + source = "registry+https://github.com/rust-lang/crates.io-index" 1145 + checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" 1146 + 1147 + [[package]] 1031 1148 name = "windows_x86_64_gnu" 1032 1149 version = "0.48.5" 1033 1150 source = "registry+https://github.com/rust-lang/crates.io-index" 1034 1151 checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" 1035 1152 1036 1153 [[package]] 1154 + name = "windows_x86_64_gnu" 1155 + version = "0.52.5" 1156 + source = "registry+https://github.com/rust-lang/crates.io-index" 1157 + checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" 1158 + 1159 + [[package]] 1037 1160 name = "windows_x86_64_gnullvm" 1038 1161 version = "0.48.5" 1039 1162 source = "registry+https://github.com/rust-lang/crates.io-index" 1040 1163 checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" 1041 1164 1042 1165 [[package]] 1166 + name = "windows_x86_64_gnullvm" 1167 + version = "0.52.5" 1168 + source = "registry+https://github.com/rust-lang/crates.io-index" 1169 + checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" 1170 + 1171 + [[package]] 1043 1172 name = "windows_x86_64_msvc" 1044 1173 version = "0.48.5" 1045 1174 source = "registry+https://github.com/rust-lang/crates.io-index" 1046 1175 checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 1176 + 1177 + [[package]] 1178 + name = "windows_x86_64_msvc" 1179 + version = "0.52.5" 1180 + source = "registry+https://github.com/rust-lang/crates.io-index" 1181 + checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0"
+11 -10
pkgs/build-support/node/fetch-npm-deps/Cargo.toml
··· 6 6 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 7 8 8 [dependencies] 9 - anyhow = "1.0.75" 9 + anyhow = "1.0.82" 10 10 backoff = "0.4.0" 11 - base64 = "0.21.5" 11 + base64 = "0.22.0" 12 12 digest = "0.10.7" 13 - env_logger = "0.10.1" 13 + env_logger = "0.11.3" 14 14 isahc = { version = "1.7.2", default_features = false } 15 - log = "0.4.20" 16 - rayon = "1.8.0" 17 - serde = { version = "1.0.193", features = ["derive"] } 18 - serde_json = "1.0.108" 15 + log = "0.4.21" 16 + nix-nar = "0.3.0" 17 + rayon = "1.10.0" 18 + serde = { version = "1.0.198", features = ["derive"] } 19 + serde_json = "1.0.116" 19 20 sha1 = "0.10.6" 20 21 sha2 = "0.10.8" 21 - tempfile = "3.8.1" 22 - url = { version = "2.4.1", features = ["serde"] } 23 - walkdir = "2.4.0" 22 + tempfile = "3.10.1" 23 + url = { version = "2.5.0", features = ["serde"] } 24 + walkdir = "2.5.0"
+2 -2
pkgs/build-support/node/fetch-npm-deps/default.nix
··· 1 - { lib, stdenvNoCC, rustPlatform, makeWrapper, pkg-config, curl, gnutar, gzip, nix, testers, fetchurl, cacert, prefetch-npm-deps, fetchNpmDeps }: 1 + { lib, stdenvNoCC, rustPlatform, makeWrapper, pkg-config, curl, gnutar, gzip, testers, fetchurl, cacert, prefetch-npm-deps, fetchNpmDeps }: 2 2 3 3 { 4 4 prefetch-npm-deps = rustPlatform.buildRustPackage { ··· 20 20 buildInputs = [ curl ]; 21 21 22 22 postInstall = '' 23 - wrapProgram "$out/bin/prefetch-npm-deps" --prefix PATH : ${lib.makeBinPath [ gnutar gzip nix ]} 23 + wrapProgram "$out/bin/prefetch-npm-deps" --prefix PATH : ${lib.makeBinPath [ gnutar gzip ]} 24 24 ''; 25 25 26 26 passthru.tests =
+1
pkgs/build-support/node/fetch-npm-deps/src/cacache.rs
··· 11 11 }; 12 12 use url::Url; 13 13 14 + #[allow(clippy::struct_field_names)] 14 15 #[derive(Serialize, Deserialize)] 15 16 pub(super) struct Key { 16 17 pub(super) key: String,
+2 -5
pkgs/build-support/node/fetch-npm-deps/src/main.rs
··· 8 8 collections::HashMap, 9 9 env, fs, 10 10 path::{Path, PathBuf}, 11 - process::{self, Command}, 11 + process, 12 12 }; 13 13 use tempfile::tempdir; 14 14 use url::Url; ··· 266 266 fs::write(out.join("package-lock.json"), lock_content)?; 267 267 268 268 if print_hash { 269 - Command::new("nix") 270 - .args(["--experimental-features", "nix-command", "hash", "path"]) 271 - .arg(out.as_os_str()) 272 - .status()?; 269 + println!("{}", util::make_sri_hash(out)?); 273 270 } 274 271 275 272 Ok(())
+1 -1
pkgs/build-support/node/fetch-npm-deps/src/parse/lock.rs
··· 179 179 } 180 180 } 181 181 182 - #[allow(clippy::incorrect_partial_ord_impl_on_ord_type)] 182 + #[allow(clippy::non_canonical_partial_ord_impl)] 183 183 impl PartialOrd for Hash { 184 184 fn partial_cmp(&self, other: &Hash) -> Option<Ordering> { 185 185 let lhs = self.0.split_once('-')?.0;
+21 -1
pkgs/build-support/node/fetch-npm-deps/src/util.rs
··· 1 1 use backoff::{retry, ExponentialBackoff}; 2 + use base64::prelude::{Engine, BASE64_STANDARD}; 3 + use digest::Digest; 2 4 use isahc::{ 3 5 config::{CaCertificate, Configurable, RedirectPolicy, SslOption}, 4 6 Body, Request, RequestExt, 5 7 }; 8 + use nix_nar::{Encoder, NarError}; 6 9 use serde_json::{Map, Value}; 7 - use std::{env, io::Read, path::Path}; 10 + use sha2::Sha256; 11 + use std::{ 12 + env, 13 + io::{self, Read}, 14 + path::Path, 15 + }; 8 16 use url::Url; 9 17 10 18 pub fn get_url(url: &Url) -> Result<Body, isahc::Error> { ··· 64 72 } => err, 65 73 }) 66 74 } 75 + 76 + pub fn make_sri_hash(path: &Path) -> Result<String, NarError> { 77 + let mut encoder = Encoder::new(path)?; 78 + let mut hasher = Sha256::new(); 79 + 80 + io::copy(&mut encoder, &mut hasher)?; 81 + 82 + Ok(format!( 83 + "sha256-{}", 84 + BASE64_STANDARD.encode(hasher.finalize()) 85 + )) 86 + }