diff options
author | Akshay <[email protected]> | 2020-08-22 16:46:26 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2020-08-22 16:46:26 +0100 |
commit | 70eeba1f481d625db311ea4d961453d3e1b90ea7 (patch) | |
tree | ded265527d9d9d1c9978b69bfd7b84a7717f807f | |
parent | 9e684bc6100b5db438108f78eea1c11155a47092 (diff) |
init
-rw-r--r-- | Cargo.lock | 999 | ||||
-rw-r--r-- | Cargo.nix | 2664 | ||||
-rw-r--r-- | Cargo.toml | 16 | ||||
-rw-r--r-- | default.nix | 4 | ||||
-rw-r--r-- | nix/nixpkgs.nix | 27 | ||||
-rw-r--r-- | nix/sources.json | 50 | ||||
-rw-r--r-- | nix/sources.nix | 134 | ||||
-rw-r--r-- | shell.nix | 15 | ||||
-rw-r--r-- | src/main.rs | 97 |
9 files changed, 4006 insertions, 0 deletions
diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..74c1be3 --- /dev/null +++ b/Cargo.lock | |||
@@ -0,0 +1,999 @@ | |||
1 | # This file is automatically @generated by Cargo. | ||
2 | # It is not intended for manual editing. | ||
3 | [[package]] | ||
4 | name = "aho-corasick" | ||
5 | version = "0.7.13" | ||
6 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
7 | checksum = "043164d8ba5c4c3035fec9bbee8647c0261d788f3474306f93bb65901cae0e86" | ||
8 | dependencies = [ | ||
9 | "memchr", | ||
10 | ] | ||
11 | |||
12 | [[package]] | ||
13 | name = "arc-swap" | ||
14 | version = "0.4.7" | ||
15 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
16 | checksum = "4d25d88fd6b8041580a654f9d0c581a047baee2b3efee13275f2fc392fc75034" | ||
17 | |||
18 | [[package]] | ||
19 | name = "atty" | ||
20 | version = "0.2.14" | ||
21 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
22 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" | ||
23 | dependencies = [ | ||
24 | "hermit-abi", | ||
25 | "libc", | ||
26 | "winapi 0.3.9", | ||
27 | ] | ||
28 | |||
29 | [[package]] | ||
30 | name = "autocfg" | ||
31 | version = "0.1.7" | ||
32 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
33 | checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" | ||
34 | |||
35 | [[package]] | ||
36 | name = "autocfg" | ||
37 | version = "1.0.1" | ||
38 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
39 | checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" | ||
40 | |||
41 | [[package]] | ||
42 | name = "bitflags" | ||
43 | version = "1.2.1" | ||
44 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
45 | checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" | ||
46 | |||
47 | [[package]] | ||
48 | name = "bytes" | ||
49 | version = "0.5.6" | ||
50 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
51 | checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" | ||
52 | |||
53 | [[package]] | ||
54 | name = "cfg-if" | ||
55 | version = "0.1.10" | ||
56 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
57 | checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" | ||
58 | |||
59 | [[package]] | ||
60 | name = "cloudabi" | ||
61 | version = "0.0.3" | ||
62 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
63 | checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" | ||
64 | dependencies = [ | ||
65 | "bitflags", | ||
66 | ] | ||
67 | |||
68 | [[package]] | ||
69 | name = "env_logger" | ||
70 | version = "0.7.1" | ||
71 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
72 | checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" | ||
73 | dependencies = [ | ||
74 | "atty", | ||
75 | "humantime", | ||
76 | "log", | ||
77 | "regex", | ||
78 | "termcolor", | ||
79 | ] | ||
80 | |||
81 | [[package]] | ||
82 | name = "fallible-iterator" | ||
83 | version = "0.2.0" | ||
84 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
85 | checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" | ||
86 | |||
87 | [[package]] | ||
88 | name = "fallible-streaming-iterator" | ||
89 | version = "0.1.9" | ||
90 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
91 | checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" | ||
92 | |||
93 | [[package]] | ||
94 | name = "fnv" | ||
95 | version = "1.0.7" | ||
96 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
97 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" | ||
98 | |||
99 | [[package]] | ||
100 | name = "fuchsia-cprng" | ||
101 | version = "0.1.1" | ||
102 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
103 | checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" | ||
104 | |||
105 | [[package]] | ||
106 | name = "fuchsia-zircon" | ||
107 | version = "0.3.3" | ||
108 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
109 | checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" | ||
110 | dependencies = [ | ||
111 | "bitflags", | ||
112 | "fuchsia-zircon-sys", | ||
113 | ] | ||
114 | |||
115 | [[package]] | ||
116 | name = "fuchsia-zircon-sys" | ||
117 | version = "0.3.3" | ||
118 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
119 | checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" | ||
120 | |||
121 | [[package]] | ||
122 | name = "futures-channel" | ||
123 | version = "0.3.5" | ||
124 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
125 | checksum = "f366ad74c28cca6ba456d95e6422883cfb4b252a83bed929c83abfdbbf2967d5" | ||
126 | dependencies = [ | ||
127 | "futures-core", | ||
128 | ] | ||
129 | |||
130 | [[package]] | ||
131 | name = "futures-core" | ||
132 | version = "0.3.5" | ||
133 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
134 | checksum = "59f5fff90fd5d971f936ad674802482ba441b6f09ba5e15fd8b39145582ca399" | ||
135 | |||
136 | [[package]] | ||
137 | name = "futures-macro" | ||
138 | version = "0.3.5" | ||
139 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
140 | checksum = "d0b5a30a4328ab5473878237c447333c093297bded83a4983d10f4deea240d39" | ||
141 | dependencies = [ | ||
142 | "proc-macro-hack", | ||
143 | "proc-macro2", | ||
144 | "quote", | ||
145 | "syn", | ||
146 | ] | ||
147 | |||
148 | [[package]] | ||
149 | name = "futures-sink" | ||
150 | version = "0.3.5" | ||
151 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
152 | checksum = "3f2032893cb734c7a05d85ce0cc8b8c4075278e93b24b66f9de99d6eb0fa8acc" | ||
153 | |||
154 | [[package]] | ||
155 | name = "futures-task" | ||
156 | version = "0.3.5" | ||
157 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
158 | checksum = "bdb66b5f09e22019b1ab0830f7785bcea8e7a42148683f99214f73f8ec21a626" | ||
159 | dependencies = [ | ||
160 | "once_cell", | ||
161 | ] | ||
162 | |||
163 | [[package]] | ||
164 | name = "futures-util" | ||
165 | version = "0.3.5" | ||
166 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
167 | checksum = "8764574ff08b701a084482c3c7031349104b07ac897393010494beaa18ce32c6" | ||
168 | dependencies = [ | ||
169 | "futures-core", | ||
170 | "futures-macro", | ||
171 | "futures-task", | ||
172 | "pin-project", | ||
173 | "pin-utils", | ||
174 | "proc-macro-hack", | ||
175 | "proc-macro-nested", | ||
176 | "slab", | ||
177 | ] | ||
178 | |||
179 | [[package]] | ||
180 | name = "h2" | ||
181 | version = "0.2.6" | ||
182 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
183 | checksum = "993f9e0baeed60001cf565546b0d3dbe6a6ad23f2bd31644a133c641eccf6d53" | ||
184 | dependencies = [ | ||
185 | "bytes", | ||
186 | "fnv", | ||
187 | "futures-core", | ||
188 | "futures-sink", | ||
189 | "futures-util", | ||
190 | "http", | ||
191 | "indexmap", | ||
192 | "slab", | ||
193 | "tokio", | ||
194 | "tokio-util", | ||
195 | "tracing", | ||
196 | ] | ||
197 | |||
198 | [[package]] | ||
199 | name = "hashbrown" | ||
200 | version = "0.8.2" | ||
201 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
202 | checksum = "e91b62f79061a0bc2e046024cb7ba44b08419ed238ecbd9adbd787434b9e8c25" | ||
203 | dependencies = [ | ||
204 | "autocfg 1.0.1", | ||
205 | ] | ||
206 | |||
207 | [[package]] | ||
208 | name = "hedge" | ||
209 | version = "0.1.0" | ||
210 | dependencies = [ | ||
211 | "futures-util", | ||
212 | "hyper", | ||
213 | "nanoid", | ||
214 | "pretty_env_logger", | ||
215 | "rusqlite", | ||
216 | "tokio", | ||
217 | "url", | ||
218 | ] | ||
219 | |||
220 | [[package]] | ||
221 | name = "hermit-abi" | ||
222 | version = "0.1.15" | ||
223 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
224 | checksum = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9" | ||
225 | dependencies = [ | ||
226 | "libc", | ||
227 | ] | ||
228 | |||
229 | [[package]] | ||
230 | name = "http" | ||
231 | version = "0.2.1" | ||
232 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
233 | checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" | ||
234 | dependencies = [ | ||
235 | "bytes", | ||
236 | "fnv", | ||
237 | "itoa", | ||
238 | ] | ||
239 | |||
240 | [[package]] | ||
241 | name = "http-body" | ||
242 | version = "0.3.1" | ||
243 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
244 | checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" | ||
245 | dependencies = [ | ||
246 | "bytes", | ||
247 | "http", | ||
248 | ] | ||
249 | |||
250 | [[package]] | ||
251 | name = "httparse" | ||
252 | version = "1.3.4" | ||
253 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
254 | checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" | ||
255 | |||
256 | [[package]] | ||
257 | name = "humantime" | ||
258 | version = "1.3.0" | ||
259 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
260 | checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" | ||
261 | dependencies = [ | ||
262 | "quick-error", | ||
263 | ] | ||
264 | |||
265 | [[package]] | ||
266 | name = "hyper" | ||
267 | version = "0.13.7" | ||
268 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
269 | checksum = "3e68a8dd9716185d9e64ea473ea6ef63529252e3e27623295a0378a19665d5eb" | ||
270 | dependencies = [ | ||
271 | "bytes", | ||
272 | "futures-channel", | ||
273 | "futures-core", | ||
274 | "futures-util", | ||
275 | "h2", | ||
276 | "http", | ||
277 | "http-body", | ||
278 | "httparse", | ||
279 | "itoa", | ||
280 | "pin-project", | ||
281 | "socket2", | ||
282 | "time", | ||
283 | "tokio", | ||
284 | "tower-service", | ||
285 | "tracing", | ||
286 | "want", | ||
287 | ] | ||
288 | |||
289 | [[package]] | ||
290 | name = "idna" | ||
291 | version = "0.2.0" | ||
292 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
293 | checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" | ||
294 | dependencies = [ | ||
295 | "matches", | ||
296 | "unicode-bidi", | ||
297 | "unicode-normalization", | ||
298 | ] | ||
299 | |||
300 | [[package]] | ||
301 | name = "indexmap" | ||
302 | version = "1.5.1" | ||
303 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
304 | checksum = "86b45e59b16c76b11bf9738fd5d38879d3bd28ad292d7b313608becb17ae2df9" | ||
305 | dependencies = [ | ||
306 | "autocfg 1.0.1", | ||
307 | "hashbrown", | ||
308 | ] | ||
309 | |||
310 | [[package]] | ||
311 | name = "iovec" | ||
312 | version = "0.1.4" | ||
313 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
314 | checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" | ||
315 | dependencies = [ | ||
316 | "libc", | ||
317 | ] | ||
318 | |||
319 | [[package]] | ||
320 | name = "itoa" | ||
321 | version = "0.4.6" | ||
322 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
323 | checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" | ||
324 | |||
325 | [[package]] | ||
326 | name = "kernel32-sys" | ||
327 | version = "0.2.2" | ||
328 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
329 | checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" | ||
330 | dependencies = [ | ||
331 | "winapi 0.2.8", | ||
332 | "winapi-build", | ||
333 | ] | ||
334 | |||
335 | [[package]] | ||
336 | name = "lazy_static" | ||
337 | version = "1.4.0" | ||
338 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
339 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" | ||
340 | |||
341 | [[package]] | ||
342 | name = "libc" | ||
343 | version = "0.2.76" | ||
344 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
345 | checksum = "755456fae044e6fa1ebbbd1b3e902ae19e73097ed4ed87bb79934a867c007bc3" | ||
346 | |||
347 | [[package]] | ||
348 | name = "libsqlite3-sys" | ||
349 | version = "0.20.0" | ||
350 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
351 | checksum = "e3a245984b1b06c291f46e27ebda9f369a94a1ab8461d0e845e23f9ced01f5db" | ||
352 | dependencies = [ | ||
353 | "pkg-config", | ||
354 | "vcpkg", | ||
355 | ] | ||
356 | |||
357 | [[package]] | ||
358 | name = "linked-hash-map" | ||
359 | version = "0.5.3" | ||
360 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
361 | checksum = "8dd5a6d5999d9907cda8ed67bbd137d3af8085216c2ac62de5be860bd41f304a" | ||
362 | |||
363 | [[package]] | ||
364 | name = "log" | ||
365 | version = "0.4.11" | ||
366 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
367 | checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b" | ||
368 | dependencies = [ | ||
369 | "cfg-if", | ||
370 | ] | ||
371 | |||
372 | [[package]] | ||
373 | name = "lru-cache" | ||
374 | version = "0.1.2" | ||
375 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
376 | checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" | ||
377 | dependencies = [ | ||
378 | "linked-hash-map", | ||
379 | ] | ||
380 | |||
381 | [[package]] | ||
382 | name = "matches" | ||
383 | version = "0.1.8" | ||
384 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
385 | checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" | ||
386 | |||
387 | [[package]] | ||
388 | name = "memchr" | ||
389 | version = "2.3.3" | ||
390 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
391 | checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" | ||
392 | |||
393 | [[package]] | ||
394 | name = "mio" | ||
395 | version = "0.6.22" | ||
396 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
397 | checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" | ||
398 | dependencies = [ | ||
399 | "cfg-if", | ||
400 | "fuchsia-zircon", | ||
401 | "fuchsia-zircon-sys", | ||
402 | "iovec", | ||
403 | "kernel32-sys", | ||
404 | "libc", | ||
405 | "log", | ||
406 | "miow 0.2.1", | ||
407 | "net2", | ||
408 | "slab", | ||
409 | "winapi 0.2.8", | ||
410 | ] | ||
411 | |||
412 | [[package]] | ||
413 | name = "mio-named-pipes" | ||
414 | version = "0.1.7" | ||
415 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
416 | checksum = "0840c1c50fd55e521b247f949c241c9997709f23bd7f023b9762cd561e935656" | ||
417 | dependencies = [ | ||
418 | "log", | ||
419 | "mio", | ||
420 | "miow 0.3.5", | ||
421 | "winapi 0.3.9", | ||
422 | ] | ||
423 | |||
424 | [[package]] | ||
425 | name = "mio-uds" | ||
426 | version = "0.6.8" | ||
427 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
428 | checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" | ||
429 | dependencies = [ | ||
430 | "iovec", | ||
431 | "libc", | ||
432 | "mio", | ||
433 | ] | ||
434 | |||
435 | [[package]] | ||
436 | name = "miow" | ||
437 | version = "0.2.1" | ||
438 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
439 | checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" | ||
440 | dependencies = [ | ||
441 | "kernel32-sys", | ||
442 | "net2", | ||
443 | "winapi 0.2.8", | ||
444 | "ws2_32-sys", | ||
445 | ] | ||
446 | |||
447 | [[package]] | ||
448 | name = "miow" | ||
449 | version = "0.3.5" | ||
450 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
451 | checksum = "07b88fb9795d4d36d62a012dfbf49a8f5cf12751f36d31a9dbe66d528e58979e" | ||
452 | dependencies = [ | ||
453 | "socket2", | ||
454 | "winapi 0.3.9", | ||
455 | ] | ||
456 | |||
457 | [[package]] | ||
458 | name = "nanoid" | ||
459 | version = "0.3.0" | ||
460 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
461 | checksum = "a6226bc4e142124cb44e309a37a04cd9bb10e740d8642855441d3b14808f635e" | ||
462 | dependencies = [ | ||
463 | "rand", | ||
464 | ] | ||
465 | |||
466 | [[package]] | ||
467 | name = "net2" | ||
468 | version = "0.2.34" | ||
469 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
470 | checksum = "2ba7c918ac76704fb42afcbbb43891e72731f3dcca3bef2a19786297baf14af7" | ||
471 | dependencies = [ | ||
472 | "cfg-if", | ||
473 | "libc", | ||
474 | "winapi 0.3.9", | ||
475 | ] | ||
476 | |||
477 | [[package]] | ||
478 | name = "num_cpus" | ||
479 | version = "1.13.0" | ||
480 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
481 | checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" | ||
482 | dependencies = [ | ||
483 | "hermit-abi", | ||
484 | "libc", | ||
485 | ] | ||
486 | |||
487 | [[package]] | ||
488 | name = "once_cell" | ||
489 | version = "1.4.1" | ||
490 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
491 | checksum = "260e51e7efe62b592207e9e13a68e43692a7a279171d6ba57abd208bf23645ad" | ||
492 | |||
493 | [[package]] | ||
494 | name = "percent-encoding" | ||
495 | version = "2.1.0" | ||
496 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
497 | checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" | ||
498 | |||
499 | [[package]] | ||
500 | name = "pin-project" | ||
501 | version = "0.4.23" | ||
502 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
503 | checksum = "ca4433fff2ae79342e497d9f8ee990d174071408f28f726d6d83af93e58e48aa" | ||
504 | dependencies = [ | ||
505 | "pin-project-internal", | ||
506 | ] | ||
507 | |||
508 | [[package]] | ||
509 | name = "pin-project-internal" | ||
510 | version = "0.4.23" | ||
511 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
512 | checksum = "2c0e815c3ee9a031fdf5af21c10aa17c573c9c6a566328d99e3936c34e36461f" | ||
513 | dependencies = [ | ||
514 | "proc-macro2", | ||
515 | "quote", | ||
516 | "syn", | ||
517 | ] | ||
518 | |||
519 | [[package]] | ||
520 | name = "pin-project-lite" | ||
521 | version = "0.1.7" | ||
522 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
523 | checksum = "282adbf10f2698a7a77f8e983a74b2d18176c19a7fd32a45446139ae7b02b715" | ||
524 | |||
525 | [[package]] | ||
526 | name = "pin-utils" | ||
527 | version = "0.1.0" | ||
528 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
529 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" | ||
530 | |||
531 | [[package]] | ||
532 | name = "pkg-config" | ||
533 | version = "0.3.18" | ||
534 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
535 | checksum = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33" | ||
536 | |||
537 | [[package]] | ||
538 | name = "pretty_env_logger" | ||
539 | version = "0.4.0" | ||
540 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
541 | checksum = "926d36b9553851b8b0005f1275891b392ee4d2d833852c417ed025477350fb9d" | ||
542 | dependencies = [ | ||
543 | "env_logger", | ||
544 | "log", | ||
545 | ] | ||
546 | |||
547 | [[package]] | ||
548 | name = "proc-macro-hack" | ||
549 | version = "0.5.18" | ||
550 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
551 | checksum = "99c605b9a0adc77b7211c6b1f722dcb613d68d66859a44f3d485a6da332b0598" | ||
552 | |||
553 | [[package]] | ||
554 | name = "proc-macro-nested" | ||
555 | version = "0.1.6" | ||
556 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
557 | checksum = "eba180dafb9038b050a4c280019bbedf9f2467b61e5d892dcad585bb57aadc5a" | ||
558 | |||
559 | [[package]] | ||
560 | name = "proc-macro2" | ||
561 | version = "1.0.19" | ||
562 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
563 | checksum = "04f5f085b5d71e2188cb8271e5da0161ad52c3f227a661a3c135fdf28e258b12" | ||
564 | dependencies = [ | ||
565 | "unicode-xid", | ||
566 | ] | ||
567 | |||
568 | [[package]] | ||
569 | name = "quick-error" | ||
570 | version = "1.2.3" | ||
571 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
572 | checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" | ||
573 | |||
574 | [[package]] | ||
575 | name = "quote" | ||
576 | version = "1.0.7" | ||
577 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
578 | checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" | ||
579 | dependencies = [ | ||
580 | "proc-macro2", | ||
581 | ] | ||
582 | |||
583 | [[package]] | ||
584 | name = "rand" | ||
585 | version = "0.6.5" | ||
586 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
587 | checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" | ||
588 | dependencies = [ | ||
589 | "autocfg 0.1.7", | ||
590 | "libc", | ||
591 | "rand_chacha", | ||
592 | "rand_core 0.4.2", | ||
593 | "rand_hc", | ||
594 | "rand_isaac", | ||
595 | "rand_jitter", | ||
596 | "rand_os", | ||
597 | "rand_pcg", | ||
598 | "rand_xorshift", | ||
599 | "winapi 0.3.9", | ||
600 | ] | ||
601 | |||
602 | [[package]] | ||
603 | name = "rand_chacha" | ||
604 | version = "0.1.1" | ||
605 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
606 | checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" | ||
607 | dependencies = [ | ||
608 | "autocfg 0.1.7", | ||
609 | "rand_core 0.3.1", | ||
610 | ] | ||
611 | |||
612 | [[package]] | ||
613 | name = "rand_core" | ||
614 | version = "0.3.1" | ||
615 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
616 | checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" | ||
617 | dependencies = [ | ||
618 | "rand_core 0.4.2", | ||
619 | ] | ||
620 | |||
621 | [[package]] | ||
622 | name = "rand_core" | ||
623 | version = "0.4.2" | ||
624 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
625 | checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" | ||
626 | |||
627 | [[package]] | ||
628 | name = "rand_hc" | ||
629 | version = "0.1.0" | ||
630 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
631 | checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" | ||
632 | dependencies = [ | ||
633 | "rand_core 0.3.1", | ||
634 | ] | ||
635 | |||
636 | [[package]] | ||
637 | name = "rand_isaac" | ||
638 | version = "0.1.1" | ||
639 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
640 | checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" | ||
641 | dependencies = [ | ||
642 | "rand_core 0.3.1", | ||
643 | ] | ||
644 | |||
645 | [[package]] | ||
646 | name = "rand_jitter" | ||
647 | version = "0.1.4" | ||
648 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
649 | checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" | ||
650 | dependencies = [ | ||
651 | "libc", | ||
652 | "rand_core 0.4.2", | ||
653 | "winapi 0.3.9", | ||
654 | ] | ||
655 | |||
656 | [[package]] | ||
657 | name = "rand_os" | ||
658 | version = "0.1.3" | ||
659 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
660 | checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" | ||
661 | dependencies = [ | ||
662 | "cloudabi", | ||
663 | "fuchsia-cprng", | ||
664 | "libc", | ||
665 | "rand_core 0.4.2", | ||
666 | "rdrand", | ||
667 | "winapi 0.3.9", | ||
668 | ] | ||
669 | |||
670 | [[package]] | ||
671 | name = "rand_pcg" | ||
672 | version = "0.1.2" | ||
673 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
674 | checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" | ||
675 | dependencies = [ | ||
676 | "autocfg 0.1.7", | ||
677 | "rand_core 0.4.2", | ||
678 | ] | ||
679 | |||
680 | [[package]] | ||
681 | name = "rand_xorshift" | ||
682 | version = "0.1.1" | ||
683 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
684 | checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" | ||
685 | dependencies = [ | ||
686 | "rand_core 0.3.1", | ||
687 | ] | ||
688 | |||
689 | [[package]] | ||
690 | name = "rdrand" | ||
691 | version = "0.4.0" | ||
692 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
693 | checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" | ||
694 | dependencies = [ | ||
695 | "rand_core 0.3.1", | ||
696 | ] | ||
697 | |||
698 | [[package]] | ||
699 | name = "redox_syscall" | ||
700 | version = "0.1.57" | ||
701 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
702 | checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" | ||
703 | |||
704 | [[package]] | ||
705 | name = "regex" | ||
706 | version = "1.3.9" | ||
707 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
708 | checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" | ||
709 | dependencies = [ | ||
710 | "aho-corasick", | ||
711 | "memchr", | ||
712 | "regex-syntax", | ||
713 | "thread_local", | ||
714 | ] | ||
715 | |||
716 | [[package]] | ||
717 | name = "regex-syntax" | ||
718 | version = "0.6.18" | ||
719 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
720 | checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" | ||
721 | |||
722 | [[package]] | ||
723 | name = "rusqlite" | ||
724 | version = "0.24.0" | ||
725 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
726 | checksum = "4c78c3275d9d6eb684d2db4b2388546b32fdae0586c20a82f3905d21ea78b9ef" | ||
727 | dependencies = [ | ||
728 | "bitflags", | ||
729 | "fallible-iterator", | ||
730 | "fallible-streaming-iterator", | ||
731 | "libsqlite3-sys", | ||
732 | "lru-cache", | ||
733 | "memchr", | ||
734 | "smallvec", | ||
735 | ] | ||
736 | |||
737 | [[package]] | ||
738 | name = "signal-hook-registry" | ||
739 | version = "1.2.1" | ||
740 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
741 | checksum = "a3e12110bc539e657a646068aaf5eb5b63af9d0c1f7b29c97113fad80e15f035" | ||
742 | dependencies = [ | ||
743 | "arc-swap", | ||
744 | "libc", | ||
745 | ] | ||
746 | |||
747 | [[package]] | ||
748 | name = "slab" | ||
749 | version = "0.4.2" | ||
750 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
751 | checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" | ||
752 | |||
753 | [[package]] | ||
754 | name = "smallvec" | ||
755 | version = "1.4.2" | ||
756 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
757 | checksum = "fbee7696b84bbf3d89a1c2eccff0850e3047ed46bfcd2e92c29a2d074d57e252" | ||
758 | |||
759 | [[package]] | ||
760 | name = "socket2" | ||
761 | version = "0.3.12" | ||
762 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
763 | checksum = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918" | ||
764 | dependencies = [ | ||
765 | "cfg-if", | ||
766 | "libc", | ||
767 | "redox_syscall", | ||
768 | "winapi 0.3.9", | ||
769 | ] | ||
770 | |||
771 | [[package]] | ||
772 | name = "syn" | ||
773 | version = "1.0.39" | ||
774 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
775 | checksum = "891d8d6567fe7c7f8835a3a98af4208f3846fba258c1bc3c31d6e506239f11f9" | ||
776 | dependencies = [ | ||
777 | "proc-macro2", | ||
778 | "quote", | ||
779 | "unicode-xid", | ||
780 | ] | ||
781 | |||
782 | [[package]] | ||
783 | name = "termcolor" | ||
784 | version = "1.1.0" | ||
785 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
786 | checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f" | ||
787 | dependencies = [ | ||
788 | "winapi-util", | ||
789 | ] | ||
790 | |||
791 | [[package]] | ||
792 | name = "thread_local" | ||
793 | version = "1.0.1" | ||
794 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
795 | checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" | ||
796 | dependencies = [ | ||
797 | "lazy_static", | ||
798 | ] | ||
799 | |||
800 | [[package]] | ||
801 | name = "time" | ||
802 | version = "0.1.43" | ||
803 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
804 | checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" | ||
805 | dependencies = [ | ||
806 | "libc", | ||
807 | "winapi 0.3.9", | ||
808 | ] | ||
809 | |||
810 | [[package]] | ||
811 | name = "tinyvec" | ||
812 | version = "0.3.4" | ||
813 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
814 | checksum = "238ce071d267c5710f9d31451efec16c5ee22de34df17cc05e56cbc92e967117" | ||
815 | |||
816 | [[package]] | ||
817 | name = "tokio" | ||
818 | version = "0.2.22" | ||
819 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
820 | checksum = "5d34ca54d84bf2b5b4d7d31e901a8464f7b60ac145a284fba25ceb801f2ddccd" | ||
821 | dependencies = [ | ||
822 | "bytes", | ||
823 | "fnv", | ||
824 | "futures-core", | ||
825 | "iovec", | ||
826 | "lazy_static", | ||
827 | "libc", | ||
828 | "memchr", | ||
829 | "mio", | ||
830 | "mio-named-pipes", | ||
831 | "mio-uds", | ||
832 | "num_cpus", | ||
833 | "pin-project-lite", | ||
834 | "signal-hook-registry", | ||
835 | "slab", | ||
836 | "tokio-macros", | ||
837 | "winapi 0.3.9", | ||
838 | ] | ||
839 | |||
840 | [[package]] | ||
841 | name = "tokio-macros" | ||
842 | version = "0.2.5" | ||
843 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
844 | checksum = "f0c3acc6aa564495a0f2e1d59fab677cd7f81a19994cfc7f3ad0e64301560389" | ||
845 | dependencies = [ | ||
846 | "proc-macro2", | ||
847 | "quote", | ||
848 | "syn", | ||
849 | ] | ||
850 | |||
851 | [[package]] | ||
852 | name = "tokio-util" | ||
853 | version = "0.3.1" | ||
854 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
855 | checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" | ||
856 | dependencies = [ | ||
857 | "bytes", | ||
858 | "futures-core", | ||
859 | "futures-sink", | ||
860 | "log", | ||
861 | "pin-project-lite", | ||
862 | "tokio", | ||
863 | ] | ||
864 | |||
865 | [[package]] | ||
866 | name = "tower-service" | ||
867 | version = "0.3.0" | ||
868 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
869 | checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" | ||
870 | |||
871 | [[package]] | ||
872 | name = "tracing" | ||
873 | version = "0.1.19" | ||
874 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
875 | checksum = "6d79ca061b032d6ce30c660fded31189ca0b9922bf483cd70759f13a2d86786c" | ||
876 | dependencies = [ | ||
877 | "cfg-if", | ||
878 | "log", | ||
879 | "tracing-core", | ||
880 | ] | ||
881 | |||
882 | [[package]] | ||
883 | name = "tracing-core" | ||
884 | version = "0.1.14" | ||
885 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
886 | checksum = "db63662723c316b43ca36d833707cc93dff82a02ba3d7e354f342682cc8b3545" | ||
887 | dependencies = [ | ||
888 | "lazy_static", | ||
889 | ] | ||
890 | |||
891 | [[package]] | ||
892 | name = "try-lock" | ||
893 | version = "0.2.3" | ||
894 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
895 | checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" | ||
896 | |||
897 | [[package]] | ||
898 | name = "unicode-bidi" | ||
899 | version = "0.3.4" | ||
900 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
901 | checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" | ||
902 | dependencies = [ | ||
903 | "matches", | ||
904 | ] | ||
905 | |||
906 | [[package]] | ||
907 | name = "unicode-normalization" | ||
908 | version = "0.1.13" | ||
909 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
910 | checksum = "6fb19cf769fa8c6a80a162df694621ebeb4dafb606470b2b2fce0be40a98a977" | ||
911 | dependencies = [ | ||
912 | "tinyvec", | ||
913 | ] | ||
914 | |||
915 | [[package]] | ||
916 | name = "unicode-xid" | ||
917 | version = "0.2.1" | ||
918 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
919 | checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" | ||
920 | |||
921 | [[package]] | ||
922 | name = "url" | ||
923 | version = "2.1.1" | ||
924 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
925 | checksum = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" | ||
926 | dependencies = [ | ||
927 | "idna", | ||
928 | "matches", | ||
929 | "percent-encoding", | ||
930 | ] | ||
931 | |||
932 | [[package]] | ||
933 | name = "vcpkg" | ||
934 | version = "0.2.10" | ||
935 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
936 | checksum = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c" | ||
937 | |||
938 | [[package]] | ||
939 | name = "want" | ||
940 | version = "0.3.0" | ||
941 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
942 | checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" | ||
943 | dependencies = [ | ||
944 | "log", | ||
945 | "try-lock", | ||
946 | ] | ||
947 | |||
948 | [[package]] | ||
949 | name = "winapi" | ||
950 | version = "0.2.8" | ||
951 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
952 | checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" | ||
953 | |||
954 | [[package]] | ||
955 | name = "winapi" | ||
956 | version = "0.3.9" | ||
957 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
958 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" | ||
959 | dependencies = [ | ||
960 | "winapi-i686-pc-windows-gnu", | ||
961 | "winapi-x86_64-pc-windows-gnu", | ||
962 | ] | ||
963 | |||
964 | [[package]] | ||
965 | name = "winapi-build" | ||
966 | version = "0.1.1" | ||
967 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
968 | checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" | ||
969 | |||
970 | [[package]] | ||
971 | name = "winapi-i686-pc-windows-gnu" | ||
972 | version = "0.4.0" | ||
973 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
974 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" | ||
975 | |||
976 | [[package]] | ||
977 | name = "winapi-util" | ||
978 | version = "0.1.5" | ||
979 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
980 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" | ||
981 | dependencies = [ | ||
982 | "winapi 0.3.9", | ||
983 | ] | ||
984 | |||
985 | [[package]] | ||
986 | name = "winapi-x86_64-pc-windows-gnu" | ||
987 | version = "0.4.0" | ||
988 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
989 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" | ||
990 | |||
991 | [[package]] | ||
992 | name = "ws2_32-sys" | ||
993 | version = "0.2.1" | ||
994 | source = "registry+https://github.com/rust-lang/crates.io-index" | ||
995 | checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" | ||
996 | dependencies = [ | ||
997 | "winapi 0.2.8", | ||
998 | "winapi-build", | ||
999 | ] | ||
diff --git a/Cargo.nix b/Cargo.nix new file mode 100644 index 0000000..0d06dc6 --- /dev/null +++ b/Cargo.nix | |||
@@ -0,0 +1,2664 @@ | |||
1 | |||
2 | # This file was @generated by crate2nix 0.8.0 with the command: | ||
3 | # "generate" | ||
4 | # See https://github.com/kolloch/crate2nix for more info. | ||
5 | |||
6 | { nixpkgs ? <nixpkgs> | ||
7 | , pkgs ? import nixpkgs { config = {}; } | ||
8 | , lib ? pkgs.lib | ||
9 | , stdenv ? pkgs.stdenv | ||
10 | , buildRustCrate ? pkgs.buildRustCrate | ||
11 | # This is used as the `crateOverrides` argument for `buildRustCrate`. | ||
12 | , defaultCrateOverrides ? pkgs.defaultCrateOverrides | ||
13 | # The features to enable for the root_crate or the workspace_members. | ||
14 | , rootFeatures ? [ "default" ] | ||
15 | # If true, throw errors instead of issueing deprecation warnings. | ||
16 | , strictDeprecation ? false | ||
17 | # Whether to perform release builds: longer compile times, faster binaries. | ||
18 | , release ? true | ||
19 | }: | ||
20 | |||
21 | rec { | ||
22 | # | ||
23 | # "public" attributes that we attempt to keep stable with new versions of crate2nix. | ||
24 | # | ||
25 | |||
26 | rootCrate = rec { | ||
27 | packageId = "hedge"; | ||
28 | |||
29 | # Use this attribute to refer to the derivation building your root crate package. | ||
30 | # You can override the features with rootCrate.build.override { features = [ "default" "feature1" ... ]; }. | ||
31 | build = internal.buildRustCrateWithFeatures { | ||
32 | inherit packageId; | ||
33 | }; | ||
34 | |||
35 | # Debug support which might change between releases. | ||
36 | # File a bug if you depend on any for non-debug work! | ||
37 | debug = internal.debugCrate { inherit packageId; }; | ||
38 | }; | ||
39 | root_crate = | ||
40 | internal.deprecationWarning | ||
41 | "root_crate is deprecated since crate2nix 0.4. Please use rootCrate instead." | ||
42 | rootCrate.build; | ||
43 | # Refer your crate build derivation by name here. | ||
44 | # You can override the features with | ||
45 | # workspaceMembers."${crateName}".build.override { features = [ "default" "feature1" ... ]; }. | ||
46 | workspaceMembers = { | ||
47 | "hedge" = rec { | ||
48 | packageId = "hedge"; | ||
49 | build = internal.buildRustCrateWithFeatures { | ||
50 | packageId = "hedge"; | ||
51 | }; | ||
52 | |||
53 | # Debug support which might change between releases. | ||
54 | # File a bug if you depend on any for non-debug work! | ||
55 | debug = internal.debugCrate { inherit packageId; }; | ||
56 | }; | ||
57 | }; | ||
58 | workspace_members = | ||
59 | internal.deprecationWarning | ||
60 | "workspace_members is deprecated in crate2nix 0.4. Please use workspaceMembers instead." | ||
61 | lib.mapAttrs (n: v: v.build) workspaceMembers; | ||
62 | |||
63 | # | ||
64 | # "internal" ("private") attributes that may change in every new version of crate2nix. | ||
65 | # | ||
66 | |||
67 | internal = rec { | ||
68 | # Build and dependency information for crates. | ||
69 | # Many of the fields are passed one-to-one to buildRustCrate. | ||
70 | # | ||
71 | # Noteworthy: | ||
72 | # * `dependencies`/`buildDependencies`: similar to the corresponding fields for buildRustCrate. | ||
73 | # but with additional information which is used during dependency/feature resolution. | ||
74 | # * `resolvedDependencies`: the selected default features reported by cargo - only included for debugging. | ||
75 | # * `devDependencies` as of now not used by `buildRustCrate` but used to | ||
76 | # inject test dependencies into the build | ||
77 | |||
78 | crates = { | ||
79 | "aho-corasick" = rec { | ||
80 | crateName = "aho-corasick"; | ||
81 | version = "0.7.13"; | ||
82 | edition = "2015"; | ||
83 | sha256 = "11hfmqf90rdvjdpk0x1lixw1s9n08y3fxfy9zqsk0k2wpbc68c84"; | ||
84 | libName = "aho_corasick"; | ||
85 | authors = [ | ||
86 | "Andrew Gallant <[email protected]>" | ||
87 | ]; | ||
88 | dependencies = [ | ||
89 | { | ||
90 | name = "memchr"; | ||
91 | packageId = "memchr"; | ||
92 | usesDefaultFeatures = false; | ||
93 | } | ||
94 | ]; | ||
95 | features = { | ||
96 | "default" = [ "std" ]; | ||
97 | "std" = [ "memchr/use_std" ]; | ||
98 | }; | ||
99 | resolvedDefaultFeatures = [ "default" "std" ]; | ||
100 | }; | ||
101 | "arc-swap" = rec { | ||
102 | crateName = "arc-swap"; | ||
103 | version = "0.4.7"; | ||
104 | edition = "2015"; | ||
105 | sha256 = "0d2hqwpkkz7jflrf3ziy5gpblix0h72x1yalls01a15qss7xh9ad"; | ||
106 | authors = [ | ||
107 | "Michal 'vorner' Vaner <[email protected]>" | ||
108 | ]; | ||
109 | features = { | ||
110 | }; | ||
111 | }; | ||
112 | "atty" = rec { | ||
113 | crateName = "atty"; | ||
114 | version = "0.2.14"; | ||
115 | edition = "2015"; | ||
116 | sha256 = "1s7yslcs6a28c5vz7jwj63lkfgyx8mx99fdirlhi9lbhhzhrpcyr"; | ||
117 | authors = [ | ||
118 | "softprops <[email protected]>" | ||
119 | ]; | ||
120 | dependencies = [ | ||
121 | { | ||
122 | name = "hermit-abi"; | ||
123 | packageId = "hermit-abi"; | ||
124 | target = { target, features }: (target."os" == "hermit"); | ||
125 | } | ||
126 | { | ||
127 | name = "libc"; | ||
128 | packageId = "libc"; | ||
129 | usesDefaultFeatures = false; | ||
130 | target = { target, features }: target."unix"; | ||
131 | } | ||
132 | { | ||
133 | name = "winapi"; | ||
134 | packageId = "winapi 0.3.9"; | ||
135 | target = { target, features }: target."windows"; | ||
136 | features = [ "consoleapi" "processenv" "minwinbase" "minwindef" "winbase" ]; | ||
137 | } | ||
138 | ]; | ||
139 | |||
140 | }; | ||
141 | "autocfg" = rec { | ||
142 | crateName = "autocfg"; | ||
143 | version = "1.0.1"; | ||
144 | edition = "2015"; | ||
145 | sha256 = "0jj6i9zn4gjl03kjvziqdji6rwx8ykz8zk2ngpc331z2g3fk3c6d"; | ||
146 | authors = [ | ||
147 | "Josh Stone <[email protected]>" | ||
148 | ]; | ||
149 | |||
150 | }; | ||
151 | "bitflags" = rec { | ||
152 | crateName = "bitflags"; | ||
153 | version = "1.2.1"; | ||
154 | edition = "2015"; | ||
155 | sha256 = "14qnd5nq8p2almk79m4m8ydqhd413yaxsyjp5xd19g3mikzf47fg"; | ||
156 | authors = [ | ||
157 | "The Rust Project Developers" | ||
158 | ]; | ||
159 | features = { | ||
160 | }; | ||
161 | resolvedDefaultFeatures = [ "default" ]; | ||
162 | }; | ||
163 | "bytes" = rec { | ||
164 | crateName = "bytes"; | ||
165 | version = "0.5.6"; | ||
166 | edition = "2018"; | ||
167 | sha256 = "0f5s7xq6qzmdh22ygsy8v0sp02m51y0radvq4i4y8cizy1lfqk0f"; | ||
168 | authors = [ | ||
169 | "Carl Lerche <[email protected]>" | ||
170 | "Sean McArthur <[email protected]>" | ||
171 | ]; | ||
172 | features = { | ||
173 | "default" = [ "std" ]; | ||
174 | }; | ||
175 | resolvedDefaultFeatures = [ "default" "std" ]; | ||
176 | }; | ||
177 | "cfg-if" = rec { | ||
178 | crateName = "cfg-if"; | ||
179 | version = "0.1.10"; | ||
180 | edition = "2018"; | ||
181 | sha256 = "08h80ihs74jcyp24cd75wwabygbbdgl05k6p5dmq8akbr78vv1a7"; | ||
182 | authors = [ | ||
183 | "Alex Crichton <[email protected]>" | ||
184 | ]; | ||
185 | features = { | ||
186 | "rustc-dep-of-std" = [ "core" "compiler_builtins" ]; | ||
187 | }; | ||
188 | }; | ||
189 | "env_logger" = rec { | ||
190 | crateName = "env_logger"; | ||
191 | version = "0.7.1"; | ||
192 | edition = "2018"; | ||
193 | sha256 = "0djx8h8xfib43g5w94r1m1mkky5spcw4wblzgnhiyg5vnfxknls4"; | ||
194 | authors = [ | ||
195 | "The Rust Project Developers" | ||
196 | ]; | ||
197 | dependencies = [ | ||
198 | { | ||
199 | name = "atty"; | ||
200 | packageId = "atty"; | ||
201 | optional = true; | ||
202 | } | ||
203 | { | ||
204 | name = "humantime"; | ||
205 | packageId = "humantime"; | ||
206 | optional = true; | ||
207 | } | ||
208 | { | ||
209 | name = "log"; | ||
210 | packageId = "log"; | ||
211 | features = [ "std" ]; | ||
212 | } | ||
213 | { | ||
214 | name = "regex"; | ||
215 | packageId = "regex"; | ||
216 | optional = true; | ||
217 | } | ||
218 | { | ||
219 | name = "termcolor"; | ||
220 | packageId = "termcolor"; | ||
221 | optional = true; | ||
222 | } | ||
223 | ]; | ||
224 | features = { | ||
225 | "default" = [ "termcolor" "atty" "humantime" "regex" ]; | ||
226 | }; | ||
227 | resolvedDefaultFeatures = [ "atty" "default" "humantime" "regex" "termcolor" ]; | ||
228 | }; | ||
229 | "fallible-iterator" = rec { | ||
230 | crateName = "fallible-iterator"; | ||
231 | version = "0.2.0"; | ||
232 | edition = "2018"; | ||
233 | sha256 = "1xq759lsr8gqss7hva42azn3whgrbrs2sd9xpn92c5ickxm1fhs4"; | ||
234 | authors = [ | ||
235 | "Steven Fackler <[email protected]>" | ||
236 | ]; | ||
237 | features = { | ||
238 | "default" = [ "std" ]; | ||
239 | }; | ||
240 | resolvedDefaultFeatures = [ "default" "std" ]; | ||
241 | }; | ||
242 | "fallible-streaming-iterator" = rec { | ||
243 | crateName = "fallible-streaming-iterator"; | ||
244 | version = "0.1.9"; | ||
245 | edition = "2015"; | ||
246 | sha256 = "0nj6j26p71bjy8h42x6jahx1hn0ng6mc2miwpgwnp8vnwqf4jq3k"; | ||
247 | authors = [ | ||
248 | "Steven Fackler <[email protected]>" | ||
249 | ]; | ||
250 | features = { | ||
251 | }; | ||
252 | }; | ||
253 | "fnv" = rec { | ||
254 | crateName = "fnv"; | ||
255 | version = "1.0.7"; | ||
256 | edition = "2015"; | ||
257 | sha256 = "1hc2mcqha06aibcaza94vbi81j6pr9a1bbxrxjfhc91zin8yr7iz"; | ||
258 | libPath = "lib.rs"; | ||
259 | authors = [ | ||
260 | "Alex Crichton <[email protected]>" | ||
261 | ]; | ||
262 | features = { | ||
263 | "default" = [ "std" ]; | ||
264 | }; | ||
265 | resolvedDefaultFeatures = [ "default" "std" ]; | ||
266 | }; | ||
267 | "fuchsia-zircon" = rec { | ||
268 | crateName = "fuchsia-zircon"; | ||
269 | version = "0.3.3"; | ||
270 | edition = "2015"; | ||
271 | sha256 = "10jxc5ks1x06gpd0xg51kcjrxr35nj6qhx2zlc5n7bmskv3675rf"; | ||
272 | authors = [ | ||
273 | "Raph Levien <[email protected]>" | ||
274 | ]; | ||
275 | dependencies = [ | ||
276 | { | ||
277 | name = "bitflags"; | ||
278 | packageId = "bitflags"; | ||
279 | } | ||
280 | { | ||
281 | name = "fuchsia-zircon-sys"; | ||
282 | packageId = "fuchsia-zircon-sys"; | ||
283 | } | ||
284 | ]; | ||
285 | |||
286 | }; | ||
287 | "fuchsia-zircon-sys" = rec { | ||
288 | crateName = "fuchsia-zircon-sys"; | ||
289 | version = "0.3.3"; | ||
290 | edition = "2015"; | ||
291 | sha256 = "19zp2085qsyq2bh1gvcxq1lb8w6v6jj9kbdkhpdjrl95fypakjix"; | ||
292 | authors = [ | ||
293 | "Raph Levien <[email protected]>" | ||
294 | ]; | ||
295 | |||
296 | }; | ||
297 | "futures-channel" = rec { | ||
298 | crateName = "futures-channel"; | ||
299 | version = "0.3.5"; | ||
300 | edition = "2018"; | ||
301 | sha256 = "1mb756zxpgrsr0lxkgl358jlpyrwi0i68pnrasj6pjlcq9sasrpk"; | ||
302 | authors = [ | ||
303 | "Alex Crichton <[email protected]>" | ||
304 | ]; | ||
305 | dependencies = [ | ||
306 | { | ||
307 | name = "futures-core"; | ||
308 | packageId = "futures-core"; | ||
309 | usesDefaultFeatures = false; | ||
310 | } | ||
311 | ]; | ||
312 | features = { | ||
313 | "alloc" = [ "futures-core/alloc" ]; | ||
314 | "cfg-target-has-atomic" = [ "futures-core/cfg-target-has-atomic" ]; | ||
315 | "default" = [ "std" ]; | ||
316 | "sink" = [ "futures-sink" ]; | ||
317 | "std" = [ "alloc" "futures-core/std" ]; | ||
318 | "unstable" = [ "futures-core/unstable" ]; | ||
319 | }; | ||
320 | resolvedDefaultFeatures = [ "alloc" "default" "std" ]; | ||
321 | }; | ||
322 | "futures-core" = rec { | ||
323 | crateName = "futures-core"; | ||
324 | version = "0.3.5"; | ||
325 | edition = "2018"; | ||
326 | sha256 = "16d35ic4b4dkv1gy39cvy2v4391b9014hrxd6vwp3nfm1zwzzxar"; | ||
327 | authors = [ | ||
328 | "Alex Crichton <[email protected]>" | ||
329 | ]; | ||
330 | features = { | ||
331 | "default" = [ "std" ]; | ||
332 | "std" = [ "alloc" ]; | ||
333 | }; | ||
334 | resolvedDefaultFeatures = [ "alloc" "default" "std" ]; | ||
335 | }; | ||
336 | "futures-macro" = rec { | ||
337 | crateName = "futures-macro"; | ||
338 | version = "0.3.5"; | ||
339 | edition = "2018"; | ||
340 | sha256 = "0f8d4kmdxx0h7nca90zdpnbk429w6d3w8dw2hxrm9ar88c5a7dfh"; | ||
341 | procMacro = true; | ||
342 | authors = [ | ||
343 | "Taylor Cramer <[email protected]>" | ||
344 | "Taiki Endo <[email protected]>" | ||
345 | ]; | ||
346 | dependencies = [ | ||
347 | { | ||
348 | name = "proc-macro-hack"; | ||
349 | packageId = "proc-macro-hack"; | ||
350 | } | ||
351 | { | ||
352 | name = "proc-macro2"; | ||
353 | packageId = "proc-macro2"; | ||
354 | } | ||
355 | { | ||
356 | name = "quote"; | ||
357 | packageId = "quote"; | ||
358 | } | ||
359 | { | ||
360 | name = "syn"; | ||
361 | packageId = "syn"; | ||
362 | features = [ "full" ]; | ||
363 | } | ||
364 | ]; | ||
365 | |||
366 | }; | ||
367 | "futures-sink" = rec { | ||
368 | crateName = "futures-sink"; | ||
369 | version = "0.3.5"; | ||
370 | edition = "2018"; | ||
371 | sha256 = "1k4azaq6x7g9kmpvc91vx5w541y4p340rkl5bnhcfd5p7j4k481z"; | ||
372 | authors = [ | ||
373 | "Alex Crichton <[email protected]>" | ||
374 | ]; | ||
375 | features = { | ||
376 | "default" = [ "std" ]; | ||
377 | "std" = [ "alloc" ]; | ||
378 | }; | ||
379 | resolvedDefaultFeatures = [ "alloc" "default" "std" ]; | ||
380 | }; | ||
381 | "futures-task" = rec { | ||
382 | crateName = "futures-task"; | ||
383 | version = "0.3.5"; | ||
384 | edition = "2018"; | ||
385 | sha256 = "09m647nghwsg46ckys2846jfga6fbdwgfc08mfqij87215gnpdmx"; | ||
386 | authors = [ | ||
387 | "Alex Crichton <[email protected]>" | ||
388 | ]; | ||
389 | dependencies = [ | ||
390 | { | ||
391 | name = "once_cell"; | ||
392 | packageId = "once_cell"; | ||
393 | optional = true; | ||
394 | usesDefaultFeatures = false; | ||
395 | features = [ "std" ]; | ||
396 | } | ||
397 | ]; | ||
398 | features = { | ||
399 | "default" = [ "std" ]; | ||
400 | "std" = [ "alloc" "once_cell" ]; | ||
401 | }; | ||
402 | resolvedDefaultFeatures = [ "alloc" "once_cell" "std" ]; | ||
403 | }; | ||
404 | "futures-util" = rec { | ||
405 | crateName = "futures-util"; | ||
406 | version = "0.3.5"; | ||
407 | edition = "2018"; | ||
408 | sha256 = "1iijrqcamgll0h0r6ww9mh3ln4292c1wghw28h41lw4by17mfr47"; | ||
409 | authors = [ | ||
410 | "Alex Crichton <[email protected]>" | ||
411 | ]; | ||
412 | dependencies = [ | ||
413 | { | ||
414 | name = "futures-core"; | ||
415 | packageId = "futures-core"; | ||
416 | usesDefaultFeatures = false; | ||
417 | } | ||
418 | { | ||
419 | name = "futures-macro"; | ||
420 | packageId = "futures-macro"; | ||
421 | optional = true; | ||
422 | usesDefaultFeatures = false; | ||
423 | } | ||
424 | { | ||
425 | name = "futures-task"; | ||
426 | packageId = "futures-task"; | ||
427 | usesDefaultFeatures = false; | ||
428 | } | ||
429 | { | ||
430 | name = "pin-project"; | ||
431 | packageId = "pin-project"; | ||
432 | } | ||
433 | { | ||
434 | name = "pin-utils"; | ||
435 | packageId = "pin-utils"; | ||
436 | } | ||
437 | { | ||
438 | name = "proc-macro-hack"; | ||
439 | packageId = "proc-macro-hack"; | ||
440 | optional = true; | ||
441 | } | ||
442 | { | ||
443 | name = "proc-macro-nested"; | ||
444 | packageId = "proc-macro-nested"; | ||
445 | optional = true; | ||
446 | } | ||
447 | { | ||
448 | name = "slab"; | ||
449 | packageId = "slab"; | ||
450 | optional = true; | ||
451 | } | ||
452 | ]; | ||
453 | features = { | ||
454 | "alloc" = [ "futures-core/alloc" "futures-task/alloc" ]; | ||
455 | "async-await-macro" = [ "async-await" "futures-macro" "proc-macro-hack" "proc-macro-nested" ]; | ||
456 | "cfg-target-has-atomic" = [ "futures-core/cfg-target-has-atomic" "futures-task/cfg-target-has-atomic" ]; | ||
457 | "channel" = [ "std" "futures-channel" ]; | ||
458 | "compat" = [ "std" "futures_01" ]; | ||
459 | "default" = [ "std" "async-await" "async-await-macro" ]; | ||
460 | "io" = [ "std" "futures-io" "memchr" ]; | ||
461 | "io-compat" = [ "io" "compat" "tokio-io" ]; | ||
462 | "read-initializer" = [ "io" "futures-io/read-initializer" "futures-io/unstable" ]; | ||
463 | "sink" = [ "futures-sink" ]; | ||
464 | "std" = [ "alloc" "futures-core/std" "futures-task/std" "slab" ]; | ||
465 | "unstable" = [ "futures-core/unstable" "futures-task/unstable" ]; | ||
466 | "write-all-vectored" = [ "io" ]; | ||
467 | }; | ||
468 | resolvedDefaultFeatures = [ "alloc" "async-await" "async-await-macro" "default" "futures-macro" "proc-macro-hack" "proc-macro-nested" "slab" "std" ]; | ||
469 | }; | ||
470 | "h2" = rec { | ||
471 | crateName = "h2"; | ||
472 | version = "0.2.6"; | ||
473 | edition = "2018"; | ||
474 | sha256 = "0lvdrzn43iikl521dlrb7z96lsmy7l6nnm35ylf00q7dmq5rwgwr"; | ||
475 | authors = [ | ||
476 | "Carl Lerche <[email protected]>" | ||
477 | "Sean McArthur <[email protected]>" | ||
478 | ]; | ||
479 | dependencies = [ | ||
480 | { | ||
481 | name = "bytes"; | ||
482 | packageId = "bytes"; | ||
483 | } | ||
484 | { | ||
485 | name = "fnv"; | ||
486 | packageId = "fnv"; | ||
487 | } | ||
488 | { | ||
489 | name = "futures-core"; | ||
490 | packageId = "futures-core"; | ||
491 | usesDefaultFeatures = false; | ||
492 | } | ||
493 | { | ||
494 | name = "futures-sink"; | ||
495 | packageId = "futures-sink"; | ||
496 | usesDefaultFeatures = false; | ||
497 | } | ||
498 | { | ||
499 | name = "futures-util"; | ||
500 | packageId = "futures-util"; | ||
501 | usesDefaultFeatures = false; | ||
502 | } | ||
503 | { | ||
504 | name = "http"; | ||
505 | packageId = "http"; | ||
506 | } | ||
507 | { | ||
508 | name = "indexmap"; | ||
509 | packageId = "indexmap"; | ||
510 | } | ||
511 | { | ||
512 | name = "slab"; | ||
513 | packageId = "slab"; | ||
514 | } | ||
515 | { | ||
516 | name = "tokio"; | ||
517 | packageId = "tokio"; | ||
518 | features = [ "io-util" ]; | ||
519 | } | ||
520 | { | ||
521 | name = "tokio-util"; | ||
522 | packageId = "tokio-util"; | ||
523 | features = [ "codec" ]; | ||
524 | } | ||
525 | { | ||
526 | name = "tracing"; | ||
527 | packageId = "tracing"; | ||
528 | usesDefaultFeatures = false; | ||
529 | features = [ "std" "log" ]; | ||
530 | } | ||
531 | ]; | ||
532 | devDependencies = [ | ||
533 | { | ||
534 | name = "tokio"; | ||
535 | packageId = "tokio"; | ||
536 | features = [ "dns" "macros" "rt-core" "sync" "tcp" ]; | ||
537 | } | ||
538 | ]; | ||
539 | features = { | ||
540 | }; | ||
541 | }; | ||
542 | "hashbrown" = rec { | ||
543 | crateName = "hashbrown"; | ||
544 | version = "0.8.2"; | ||
545 | edition = "2018"; | ||
546 | sha256 = "09cckr5l71ypvfdbvv1qsag4222blixwn9300hpbr831j3vn46z9"; | ||
547 | authors = [ | ||
548 | "Amanieu d'Antras <[email protected]>" | ||
549 | ]; | ||
550 | buildDependencies = [ | ||
551 | { | ||
552 | name = "autocfg"; | ||
553 | packageId = "autocfg"; | ||
554 | } | ||
555 | ]; | ||
556 | features = { | ||
557 | "ahash-compile-time-rng" = [ "ahash/compile-time-rng" ]; | ||
558 | "default" = [ "ahash" "inline-more" ]; | ||
559 | "rustc-dep-of-std" = [ "nightly" "core" "compiler_builtins" "alloc" "rustc-internal-api" ]; | ||
560 | }; | ||
561 | resolvedDefaultFeatures = [ "raw" ]; | ||
562 | }; | ||
563 | "hedge" = rec { | ||
564 | crateName = "hedge"; | ||
565 | version = "0.1.0"; | ||
566 | edition = "2018"; | ||
567 | crateBin = [ | ||
568 | { name = "hedge"; path = "src/main.rs"; } | ||
569 | ]; | ||
570 | src = (builtins.filterSource sourceFilter ./.); | ||
571 | authors = [ | ||
572 | "Akshay <[email protected]>" | ||
573 | ]; | ||
574 | dependencies = [ | ||
575 | { | ||
576 | name = "futures-util"; | ||
577 | packageId = "futures-util"; | ||
578 | } | ||
579 | { | ||
580 | name = "hyper"; | ||
581 | packageId = "hyper"; | ||
582 | } | ||
583 | { | ||
584 | name = "pretty_env_logger"; | ||
585 | packageId = "pretty_env_logger"; | ||
586 | } | ||
587 | { | ||
588 | name = "rusqlite"; | ||
589 | packageId = "rusqlite"; | ||
590 | } | ||
591 | { | ||
592 | name = "tokio"; | ||
593 | packageId = "tokio"; | ||
594 | features = [ "full" ]; | ||
595 | } | ||
596 | ]; | ||
597 | |||
598 | }; | ||
599 | "hermit-abi" = rec { | ||
600 | crateName = "hermit-abi"; | ||
601 | version = "0.1.15"; | ||
602 | edition = "2018"; | ||
603 | sha256 = "1ac5bij39rhzs8zngfxi109dh0h3v0jl5ng8595f9yg7nsbd3vix"; | ||
604 | authors = [ | ||
605 | "Stefan Lankes" | ||
606 | ]; | ||
607 | dependencies = [ | ||
608 | { | ||
609 | name = "libc"; | ||
610 | packageId = "libc"; | ||
611 | usesDefaultFeatures = false; | ||
612 | } | ||
613 | ]; | ||
614 | features = { | ||
615 | "rustc-dep-of-std" = [ "core" "compiler_builtins/rustc-dep-of-std" "libc/rustc-dep-of-std" ]; | ||
616 | }; | ||
617 | resolvedDefaultFeatures = [ "default" ]; | ||
618 | }; | ||
619 | "http" = rec { | ||
620 | crateName = "http"; | ||
621 | version = "0.2.1"; | ||
622 | edition = "2018"; | ||
623 | sha256 = "1y827q7j0gvs8z2x12biaik9db6nb902lpqv889cbcj84sbnkm98"; | ||
624 | authors = [ | ||
625 | "Alex Crichton <[email protected]>" | ||
626 | "Carl Lerche <[email protected]>" | ||
627 | "Sean McArthur <[email protected]>" | ||
628 | ]; | ||
629 | dependencies = [ | ||
630 | { | ||
631 | name = "bytes"; | ||
632 | packageId = "bytes"; | ||
633 | } | ||
634 | { | ||
635 | name = "fnv"; | ||
636 | packageId = "fnv"; | ||
637 | } | ||
638 | { | ||
639 | name = "itoa"; | ||
640 | packageId = "itoa"; | ||
641 | } | ||
642 | ]; | ||
643 | |||
644 | }; | ||
645 | "http-body" = rec { | ||
646 | crateName = "http-body"; | ||
647 | version = "0.3.1"; | ||
648 | edition = "2018"; | ||
649 | sha256 = "06qi0ni45lb92w3ml260c0bxbq5zd4snjmz0a9k69xq6021zzm8k"; | ||
650 | authors = [ | ||
651 | "Carl Lerche <[email protected]>" | ||
652 | "Lucio Franco <[email protected]>" | ||
653 | "Sean McArthur <[email protected]>" | ||
654 | ]; | ||
655 | dependencies = [ | ||
656 | { | ||
657 | name = "bytes"; | ||
658 | packageId = "bytes"; | ||
659 | } | ||
660 | { | ||
661 | name = "http"; | ||
662 | packageId = "http"; | ||
663 | } | ||
664 | ]; | ||
665 | |||
666 | }; | ||
667 | "httparse" = rec { | ||
668 | crateName = "httparse"; | ||
669 | version = "1.3.4"; | ||
670 | edition = "2015"; | ||
671 | sha256 = "1yf23ldnjwfkkhkca7f4w15mky9961gjz28dlwyybhphc7l9l5yd"; | ||
672 | authors = [ | ||
673 | "Sean McArthur <[email protected]>" | ||
674 | ]; | ||
675 | features = { | ||
676 | "default" = [ "std" ]; | ||
677 | }; | ||
678 | resolvedDefaultFeatures = [ "default" "std" ]; | ||
679 | }; | ||
680 | "humantime" = rec { | ||
681 | crateName = "humantime"; | ||
682 | version = "1.3.0"; | ||
683 | edition = "2015"; | ||
684 | sha256 = "0krwgbf35pd46xvkqg14j070vircsndabahahlv3rwhflpy4q06z"; | ||
685 | authors = [ | ||
686 | "Paul Colomiets <[email protected]>" | ||
687 | ]; | ||
688 | dependencies = [ | ||
689 | { | ||
690 | name = "quick-error"; | ||
691 | packageId = "quick-error"; | ||
692 | } | ||
693 | ]; | ||
694 | |||
695 | }; | ||
696 | "hyper" = rec { | ||
697 | crateName = "hyper"; | ||
698 | version = "0.13.7"; | ||
699 | edition = "2018"; | ||
700 | sha256 = "1symcnba2y03b8lj6xp2wd994lk3xyk3wizacjg5s60njzfshs1y"; | ||
701 | authors = [ | ||
702 | "Sean McArthur <[email protected]>" | ||
703 | ]; | ||
704 | dependencies = [ | ||
705 | { | ||
706 | name = "bytes"; | ||
707 | packageId = "bytes"; | ||
708 | } | ||
709 | { | ||
710 | name = "futures-channel"; | ||
711 | packageId = "futures-channel"; | ||
712 | } | ||
713 | { | ||
714 | name = "futures-core"; | ||
715 | packageId = "futures-core"; | ||
716 | usesDefaultFeatures = false; | ||
717 | } | ||
718 | { | ||
719 | name = "futures-util"; | ||
720 | packageId = "futures-util"; | ||
721 | usesDefaultFeatures = false; | ||
722 | } | ||
723 | { | ||
724 | name = "h2"; | ||
725 | packageId = "h2"; | ||
726 | } | ||
727 | { | ||
728 | name = "http"; | ||
729 | packageId = "http"; | ||
730 | } | ||
731 | { | ||
732 | name = "http-body"; | ||
733 | packageId = "http-body"; | ||
734 | } | ||
735 | { | ||
736 | name = "httparse"; | ||
737 | packageId = "httparse"; | ||
738 | } | ||
739 | { | ||
740 | name = "itoa"; | ||
741 | packageId = "itoa"; | ||
742 | } | ||
743 | { | ||
744 | name = "pin-project"; | ||
745 | packageId = "pin-project"; | ||
746 | } | ||
747 | { | ||
748 | name = "socket2"; | ||
749 | packageId = "socket2"; | ||
750 | optional = true; | ||
751 | } | ||
752 | { | ||
753 | name = "time"; | ||
754 | packageId = "time"; | ||
755 | } | ||
756 | { | ||
757 | name = "tokio"; | ||
758 | packageId = "tokio"; | ||
759 | features = [ "sync" ]; | ||
760 | } | ||
761 | { | ||
762 | name = "tower-service"; | ||
763 | packageId = "tower-service"; | ||
764 | } | ||
765 | { | ||
766 | name = "tracing"; | ||
767 | packageId = "tracing"; | ||
768 | usesDefaultFeatures = false; | ||
769 | features = [ "log" "std" ]; | ||
770 | } | ||
771 | { | ||
772 | name = "want"; | ||
773 | packageId = "want"; | ||
774 | } | ||
775 | ]; | ||
776 | devDependencies = [ | ||
777 | { | ||
778 | name = "futures-util"; | ||
779 | packageId = "futures-util"; | ||
780 | usesDefaultFeatures = false; | ||
781 | features = [ "alloc" ]; | ||
782 | } | ||
783 | { | ||
784 | name = "tokio"; | ||
785 | packageId = "tokio"; | ||
786 | features = [ "fs" "macros" "io-std" "rt-util" "sync" "time" "test-util" ]; | ||
787 | } | ||
788 | ]; | ||
789 | features = { | ||
790 | "default" = [ "runtime" "stream" ]; | ||
791 | "runtime" = [ "tcp" "tokio/rt-core" ]; | ||
792 | "tcp" = [ "socket2" "tokio/blocking" "tokio/tcp" "tokio/time" ]; | ||
793 | }; | ||
794 | resolvedDefaultFeatures = [ "default" "runtime" "socket2" "stream" "tcp" ]; | ||
795 | }; | ||
796 | "indexmap" = rec { | ||
797 | crateName = "indexmap"; | ||
798 | version = "1.5.1"; | ||
799 | edition = "2018"; | ||
800 | sha256 = "1y9dmqbwpgh86qqpnb99mllbvlvri39xb3vkz4dv2xkcn5cmxd46"; | ||
801 | authors = [ | ||
802 | "bluss" | ||
803 | "Josh Stone <[email protected]>" | ||
804 | ]; | ||
805 | dependencies = [ | ||
806 | { | ||
807 | name = "hashbrown"; | ||
808 | packageId = "hashbrown"; | ||
809 | usesDefaultFeatures = false; | ||
810 | features = [ "raw" ]; | ||
811 | } | ||
812 | ]; | ||
813 | buildDependencies = [ | ||
814 | { | ||
815 | name = "autocfg"; | ||
816 | packageId = "autocfg"; | ||
817 | } | ||
818 | ]; | ||
819 | features = { | ||
820 | "serde-1" = [ "serde" ]; | ||
821 | }; | ||
822 | }; | ||
823 | "iovec" = rec { | ||
824 | crateName = "iovec"; | ||
825 | version = "0.1.4"; | ||
826 | edition = "2015"; | ||
827 | sha256 = "0ph73qygwx8i0mblrf110cj59l00gkmsgrpzz1rm85syz5pymcxj"; | ||
828 | authors = [ | ||
829 | "Carl Lerche <[email protected]>" | ||
830 | ]; | ||
831 | dependencies = [ | ||
832 | { | ||
833 | name = "libc"; | ||
834 | packageId = "libc"; | ||
835 | target = { target, features }: target."unix"; | ||
836 | } | ||
837 | ]; | ||
838 | |||
839 | }; | ||
840 | "itoa" = rec { | ||
841 | crateName = "itoa"; | ||
842 | version = "0.4.6"; | ||
843 | edition = "2015"; | ||
844 | sha256 = "1rnpb7rr8df76gnlk07b9086cn7fc0dxxy1ghh00q6nip7bklvyw"; | ||
845 | authors = [ | ||
846 | "David Tolnay <[email protected]>" | ||
847 | ]; | ||
848 | features = { | ||
849 | "default" = [ "std" ]; | ||
850 | }; | ||
851 | resolvedDefaultFeatures = [ "default" "std" ]; | ||
852 | }; | ||
853 | "kernel32-sys" = rec { | ||
854 | crateName = "kernel32-sys"; | ||
855 | version = "0.2.2"; | ||
856 | edition = "2015"; | ||
857 | sha256 = "1389av0601a9yz8dvx5zha9vmkd6ik7ax0idpb032d28555n41vm"; | ||
858 | libName = "kernel32"; | ||
859 | authors = [ | ||
860 | "Peter Atashian <[email protected]>" | ||
861 | ]; | ||
862 | dependencies = [ | ||
863 | { | ||
864 | name = "winapi"; | ||
865 | packageId = "winapi 0.2.8"; | ||
866 | } | ||
867 | ]; | ||
868 | buildDependencies = [ | ||
869 | { | ||
870 | name = "winapi-build"; | ||
871 | packageId = "winapi-build"; | ||
872 | } | ||
873 | ]; | ||
874 | |||
875 | }; | ||
876 | "lazy_static" = rec { | ||
877 | crateName = "lazy_static"; | ||
878 | version = "1.4.0"; | ||
879 | edition = "2015"; | ||
880 | sha256 = "0in6ikhw8mgl33wjv6q6xfrb5b9jr16q8ygjy803fay4zcisvaz2"; | ||
881 | authors = [ | ||
882 | "Marvin Löbel <[email protected]>" | ||
883 | ]; | ||
884 | features = { | ||
885 | "spin_no_std" = [ "spin" ]; | ||
886 | }; | ||
887 | }; | ||
888 | "libc" = rec { | ||
889 | crateName = "libc"; | ||
890 | version = "0.2.76"; | ||
891 | edition = "2015"; | ||
892 | sha256 = "1hvv01y8cjlkg6xqgvflgq4p77p15a83w6xxpcggmrj4w3x5cm3m"; | ||
893 | authors = [ | ||
894 | "The Rust Project Developers" | ||
895 | ]; | ||
896 | features = { | ||
897 | "default" = [ "std" ]; | ||
898 | "rustc-dep-of-std" = [ "align" "rustc-std-workspace-core" ]; | ||
899 | "use_std" = [ "std" ]; | ||
900 | }; | ||
901 | resolvedDefaultFeatures = [ "default" "std" ]; | ||
902 | }; | ||
903 | "libsqlite3-sys" = rec { | ||
904 | crateName = "libsqlite3-sys"; | ||
905 | version = "0.20.0"; | ||
906 | edition = "2018"; | ||
907 | sha256 = "1nzm07nrqgz28pld0qc4mfhr96inkzdfn9vfyj8w41hv9fc4b8p3"; | ||
908 | authors = [ | ||
909 | "The rusqlite developers" | ||
910 | ]; | ||
911 | buildDependencies = [ | ||
912 | { | ||
913 | name = "pkg-config"; | ||
914 | packageId = "pkg-config"; | ||
915 | optional = true; | ||
916 | } | ||
917 | { | ||
918 | name = "vcpkg"; | ||
919 | packageId = "vcpkg"; | ||
920 | optional = true; | ||
921 | target = {target, features}: (target."env" == "msvc"); | ||
922 | } | ||
923 | ]; | ||
924 | features = { | ||
925 | "buildtime_bindgen" = [ "bindgen" "pkg-config" "vcpkg" ]; | ||
926 | "bundled" = [ "cc" "bundled_bindings" ]; | ||
927 | "bundled-windows" = [ "cc" "bundled_bindings" ]; | ||
928 | "default" = [ "min_sqlite_version_3_6_8" ]; | ||
929 | "min_sqlite_version_3_6_23" = [ "pkg-config" "vcpkg" ]; | ||
930 | "min_sqlite_version_3_6_8" = [ "pkg-config" "vcpkg" ]; | ||
931 | "min_sqlite_version_3_7_16" = [ "pkg-config" "vcpkg" ]; | ||
932 | "min_sqlite_version_3_7_7" = [ "pkg-config" "vcpkg" ]; | ||
933 | "preupdate_hook" = [ "buildtime_bindgen" ]; | ||
934 | "session" = [ "preupdate_hook" "buildtime_bindgen" ]; | ||
935 | }; | ||
936 | resolvedDefaultFeatures = [ "default" "min_sqlite_version_3_6_8" "pkg-config" "vcpkg" ]; | ||
937 | }; | ||
938 | "linked-hash-map" = rec { | ||
939 | crateName = "linked-hash-map"; | ||
940 | version = "0.5.3"; | ||
941 | edition = "2015"; | ||
942 | sha256 = "0jih3za0p1mywlnwcakc462q1byk6z8vnrzdm36hg6cxk7asdmcd"; | ||
943 | authors = [ | ||
944 | "Stepan Koltsov <[email protected]>" | ||
945 | "Andrew Paseltiner <[email protected]>" | ||
946 | ]; | ||
947 | features = { | ||
948 | "heapsize_impl" = [ "heapsize" ]; | ||
949 | "serde_impl" = [ "serde" "serde_test" ]; | ||
950 | }; | ||
951 | }; | ||
952 | "log" = rec { | ||
953 | crateName = "log"; | ||
954 | version = "0.4.11"; | ||
955 | edition = "2015"; | ||
956 | sha256 = "12xzqaflpiljn5cmxsbnbv9sjaj13ykhwsvll0gysbx4blbyvasg"; | ||
957 | authors = [ | ||
958 | "The Rust Project Developers" | ||
959 | ]; | ||
960 | dependencies = [ | ||
961 | { | ||
962 | name = "cfg-if"; | ||
963 | packageId = "cfg-if"; | ||
964 | } | ||
965 | ]; | ||
966 | features = { | ||
967 | "kv_unstable_sval" = [ "kv_unstable" "sval/fmt" ]; | ||
968 | }; | ||
969 | resolvedDefaultFeatures = [ "std" ]; | ||
970 | }; | ||
971 | "lru-cache" = rec { | ||
972 | crateName = "lru-cache"; | ||
973 | version = "0.1.2"; | ||
974 | edition = "2015"; | ||
975 | sha256 = "071viv6g2p3akwqmfb3c8vsycs5n7kr17b70l7la071jv0d4zqii"; | ||
976 | authors = [ | ||
977 | "Stepan Koltsov <[email protected]>" | ||
978 | ]; | ||
979 | dependencies = [ | ||
980 | { | ||
981 | name = "linked-hash-map"; | ||
982 | packageId = "linked-hash-map"; | ||
983 | } | ||
984 | ]; | ||
985 | features = { | ||
986 | "heapsize_impl" = [ "heapsize" "linked-hash-map/heapsize_impl" ]; | ||
987 | }; | ||
988 | }; | ||
989 | "memchr" = rec { | ||
990 | crateName = "memchr"; | ||
991 | version = "2.3.3"; | ||
992 | edition = "2015"; | ||
993 | sha256 = "0074pvsfl938ndl5js14ibc7i9q0k3zp390z843w8nlyv4bxha1p"; | ||
994 | authors = [ | ||
995 | "Andrew Gallant <[email protected]>" | ||
996 | "bluss" | ||
997 | ]; | ||
998 | features = { | ||
999 | "default" = [ "std" ]; | ||
1000 | "use_std" = [ "std" ]; | ||
1001 | }; | ||
1002 | resolvedDefaultFeatures = [ "default" "std" "use_std" ]; | ||
1003 | }; | ||
1004 | "mio" = rec { | ||
1005 | crateName = "mio"; | ||
1006 | version = "0.6.22"; | ||
1007 | edition = "2015"; | ||
1008 | sha256 = "0c64razhyam9892kgxsshmkqs6smrd11087nxb48nhjn4q4lgqzw"; | ||
1009 | authors = [ | ||
1010 | "Carl Lerche <[email protected]>" | ||
1011 | ]; | ||
1012 | dependencies = [ | ||
1013 | { | ||
1014 | name = "cfg-if"; | ||
1015 | packageId = "cfg-if"; | ||
1016 | } | ||
1017 | { | ||
1018 | name = "fuchsia-zircon"; | ||
1019 | packageId = "fuchsia-zircon"; | ||
1020 | target = { target, features }: (target."os" == "fuchsia"); | ||
1021 | } | ||
1022 | { | ||
1023 | name = "fuchsia-zircon-sys"; | ||
1024 | packageId = "fuchsia-zircon-sys"; | ||
1025 | target = { target, features }: (target."os" == "fuchsia"); | ||
1026 | } | ||
1027 | { | ||
1028 | name = "iovec"; | ||
1029 | packageId = "iovec"; | ||
1030 | } | ||
1031 | { | ||
1032 | name = "kernel32-sys"; | ||
1033 | packageId = "kernel32-sys"; | ||
1034 | target = { target, features }: target."windows"; | ||
1035 | } | ||
1036 | { | ||
1037 | name = "libc"; | ||
1038 | packageId = "libc"; | ||
1039 | target = { target, features }: target."unix"; | ||
1040 | } | ||
1041 | { | ||
1042 | name = "log"; | ||
1043 | packageId = "log"; | ||
1044 | } | ||
1045 | { | ||
1046 | name = "miow"; | ||
1047 | packageId = "miow 0.2.1"; | ||
1048 | target = { target, features }: target."windows"; | ||
1049 | } | ||
1050 | { | ||
1051 | name = "net2"; | ||
1052 | packageId = "net2"; | ||
1053 | } | ||
1054 | { | ||
1055 | name = "slab"; | ||
1056 | packageId = "slab"; | ||
1057 | } | ||
1058 | { | ||
1059 | name = "winapi"; | ||
1060 | packageId = "winapi 0.2.8"; | ||
1061 | target = { target, features }: target."windows"; | ||
1062 | } | ||
1063 | ]; | ||
1064 | features = { | ||
1065 | "default" = [ "with-deprecated" ]; | ||
1066 | }; | ||
1067 | resolvedDefaultFeatures = [ "default" "with-deprecated" ]; | ||
1068 | }; | ||
1069 | "mio-named-pipes" = rec { | ||
1070 | crateName = "mio-named-pipes"; | ||
1071 | version = "0.1.7"; | ||
1072 | edition = "2018"; | ||
1073 | sha256 = "0mjnjcg5dkb2jwxh4zxx4fgp15wr3hj9r53z4hdm4pnm1z2w2h08"; | ||
1074 | authors = [ | ||
1075 | "Brendan Molloy <[email protected]>" | ||
1076 | "Alex Crichton <[email protected]>" | ||
1077 | ]; | ||
1078 | dependencies = [ | ||
1079 | { | ||
1080 | name = "log"; | ||
1081 | packageId = "log"; | ||
1082 | target = { target, features }: target."windows"; | ||
1083 | } | ||
1084 | { | ||
1085 | name = "mio"; | ||
1086 | packageId = "mio"; | ||
1087 | target = { target, features }: target."windows"; | ||
1088 | } | ||
1089 | { | ||
1090 | name = "miow"; | ||
1091 | packageId = "miow 0.3.5"; | ||
1092 | target = { target, features }: target."windows"; | ||
1093 | } | ||
1094 | { | ||
1095 | name = "winapi"; | ||
1096 | packageId = "winapi 0.3.9"; | ||
1097 | target = { target, features }: target."windows"; | ||
1098 | features = [ "winerror" "ioapiset" "minwinbase" "winbase" ]; | ||
1099 | } | ||
1100 | ]; | ||
1101 | |||
1102 | }; | ||
1103 | "mio-uds" = rec { | ||
1104 | crateName = "mio-uds"; | ||
1105 | version = "0.6.8"; | ||
1106 | edition = "2015"; | ||
1107 | sha256 = "1w36w09gd8as1mah80wdy0kgpshmphmljj68gij34hvdnag6kjxg"; | ||
1108 | authors = [ | ||
1109 | "Alex Crichton <[email protected]>" | ||
1110 | ]; | ||
1111 | dependencies = [ | ||
1112 | { | ||
1113 | name = "iovec"; | ||
1114 | packageId = "iovec"; | ||
1115 | target = { target, features }: target."unix"; | ||
1116 | } | ||
1117 | { | ||
1118 | name = "libc"; | ||
1119 | packageId = "libc"; | ||
1120 | target = { target, features }: target."unix"; | ||
1121 | } | ||
1122 | { | ||
1123 | name = "mio"; | ||
1124 | packageId = "mio"; | ||
1125 | target = { target, features }: target."unix"; | ||
1126 | } | ||
1127 | ]; | ||
1128 | |||
1129 | }; | ||
1130 | "miow 0.2.1" = rec { | ||
1131 | crateName = "miow"; | ||
1132 | version = "0.2.1"; | ||
1133 | edition = "2015"; | ||
1134 | sha256 = "06g9b8sqlh5gxakwqq4rrib07afwanfnxgxajrldwcgk3hxjy7wc"; | ||
1135 | authors = [ | ||
1136 | "Alex Crichton <[email protected]>" | ||
1137 | ]; | ||
1138 | dependencies = [ | ||
1139 | { | ||
1140 | name = "kernel32-sys"; | ||
1141 | packageId = "kernel32-sys"; | ||
1142 | } | ||
1143 | { | ||
1144 | name = "net2"; | ||
1145 | packageId = "net2"; | ||
1146 | usesDefaultFeatures = false; | ||
1147 | } | ||
1148 | { | ||
1149 | name = "winapi"; | ||
1150 | packageId = "winapi 0.2.8"; | ||
1151 | } | ||
1152 | { | ||
1153 | name = "ws2_32-sys"; | ||
1154 | packageId = "ws2_32-sys"; | ||
1155 | } | ||
1156 | ]; | ||
1157 | |||
1158 | }; | ||
1159 | "miow 0.3.5" = rec { | ||
1160 | crateName = "miow"; | ||
1161 | version = "0.3.5"; | ||
1162 | edition = "2018"; | ||
1163 | sha256 = "17lpb2754vg6vflk2vgka4kz2p4gkbsgnb815bb3ckaxg6wqzf07"; | ||
1164 | authors = [ | ||
1165 | "Alex Crichton <[email protected]>" | ||
1166 | ]; | ||
1167 | dependencies = [ | ||
1168 | { | ||
1169 | name = "socket2"; | ||
1170 | packageId = "socket2"; | ||
1171 | } | ||
1172 | { | ||
1173 | name = "winapi"; | ||
1174 | packageId = "winapi 0.3.9"; | ||
1175 | features = [ "std" "fileapi" "handleapi" "ioapiset" "minwindef" "namedpipeapi" "ntdef" "synchapi" "winerror" "winsock2" "ws2def" "ws2ipdef" ]; | ||
1176 | } | ||
1177 | ]; | ||
1178 | |||
1179 | }; | ||
1180 | "net2" = rec { | ||
1181 | crateName = "net2"; | ||
1182 | version = "0.2.34"; | ||
1183 | edition = "2015"; | ||
1184 | sha256 = "1xsay6x9fqkq34mfyfyavkrk29z7j4wb9fzw5as4yw3nmhcck9rb"; | ||
1185 | authors = [ | ||
1186 | "Alex Crichton <[email protected]>" | ||
1187 | ]; | ||
1188 | dependencies = [ | ||
1189 | { | ||
1190 | name = "cfg-if"; | ||
1191 | packageId = "cfg-if"; | ||
1192 | } | ||
1193 | { | ||
1194 | name = "libc"; | ||
1195 | packageId = "libc"; | ||
1196 | target = { target, features }: ((target."os" == "redox") || target."unix" || (target."os" == "wasi")); | ||
1197 | } | ||
1198 | { | ||
1199 | name = "winapi"; | ||
1200 | packageId = "winapi 0.3.9"; | ||
1201 | target = { target, features }: target."windows"; | ||
1202 | features = [ "handleapi" "winsock2" "ws2def" "ws2ipdef" "ws2tcpip" ]; | ||
1203 | } | ||
1204 | ]; | ||
1205 | features = { | ||
1206 | "default" = [ "duration" ]; | ||
1207 | }; | ||
1208 | resolvedDefaultFeatures = [ "default" "duration" ]; | ||
1209 | }; | ||
1210 | "num_cpus" = rec { | ||
1211 | crateName = "num_cpus"; | ||
1212 | version = "1.13.0"; | ||
1213 | edition = "2015"; | ||
1214 | sha256 = "1cv6yxhz2zbnwn8pn1yn8grg7zsnd523947fby41a737aqvryj85"; | ||
1215 | authors = [ | ||
1216 | "Sean McArthur <[email protected]>" | ||
1217 | ]; | ||
1218 | dependencies = [ | ||
1219 | { | ||
1220 | name = "hermit-abi"; | ||
1221 | packageId = "hermit-abi"; | ||
1222 | target = { target, features }: (((target."arch" == "x86_64") || (target."arch" == "aarch64")) && (target."os" == "hermit")); | ||
1223 | } | ||
1224 | { | ||
1225 | name = "libc"; | ||
1226 | packageId = "libc"; | ||
1227 | } | ||
1228 | ]; | ||
1229 | |||
1230 | }; | ||
1231 | "once_cell" = rec { | ||
1232 | crateName = "once_cell"; | ||
1233 | version = "1.4.1"; | ||
1234 | edition = "2018"; | ||
1235 | sha256 = "1ba56vr8n85xgajnn78pg6iag4inwil3mqg90wi5jaz6xzkm23i6"; | ||
1236 | authors = [ | ||
1237 | "Aleksey Kladov <[email protected]>" | ||
1238 | ]; | ||
1239 | features = { | ||
1240 | "default" = [ "std" ]; | ||
1241 | }; | ||
1242 | resolvedDefaultFeatures = [ "std" ]; | ||
1243 | }; | ||
1244 | "pin-project" = rec { | ||
1245 | crateName = "pin-project"; | ||
1246 | version = "0.4.23"; | ||
1247 | edition = "2018"; | ||
1248 | sha256 = "1aj8ivjr7bw3dmnp53zj10a0fx6ij3lqx7vx94p38ydfybzk6i6a"; | ||
1249 | authors = [ | ||
1250 | "Taiki Endo <[email protected]>" | ||
1251 | ]; | ||
1252 | dependencies = [ | ||
1253 | { | ||
1254 | name = "pin-project-internal"; | ||
1255 | packageId = "pin-project-internal"; | ||
1256 | usesDefaultFeatures = false; | ||
1257 | } | ||
1258 | ]; | ||
1259 | |||
1260 | }; | ||
1261 | "pin-project-internal" = rec { | ||
1262 | crateName = "pin-project-internal"; | ||
1263 | version = "0.4.23"; | ||
1264 | edition = "2018"; | ||
1265 | sha256 = "07s66r7c6dirkvcjhqsndaf3qmvwl45c28dgypyk38797rf823ic"; | ||
1266 | procMacro = true; | ||
1267 | authors = [ | ||
1268 | "Taiki Endo <[email protected]>" | ||
1269 | ]; | ||
1270 | dependencies = [ | ||
1271 | { | ||
1272 | name = "proc-macro2"; | ||
1273 | packageId = "proc-macro2"; | ||
1274 | } | ||
1275 | { | ||
1276 | name = "quote"; | ||
1277 | packageId = "quote"; | ||
1278 | } | ||
1279 | { | ||
1280 | name = "syn"; | ||
1281 | packageId = "syn"; | ||
1282 | features = [ "full" "visit-mut" ]; | ||
1283 | } | ||
1284 | ]; | ||
1285 | |||
1286 | }; | ||
1287 | "pin-project-lite" = rec { | ||
1288 | crateName = "pin-project-lite"; | ||
1289 | version = "0.1.7"; | ||
1290 | edition = "2018"; | ||
1291 | sha256 = "05dp09xswfb18i2jmlvzkb0pd0fin9s3m64fgyksg6161zqxnai8"; | ||
1292 | authors = [ | ||
1293 | "Taiki Endo <[email protected]>" | ||
1294 | ]; | ||
1295 | |||
1296 | }; | ||
1297 | "pin-utils" = rec { | ||
1298 | crateName = "pin-utils"; | ||
1299 | version = "0.1.0"; | ||
1300 | edition = "2018"; | ||
1301 | sha256 = "117ir7vslsl2z1a7qzhws4pd01cg2d3338c47swjyvqv2n60v1wb"; | ||
1302 | authors = [ | ||
1303 | "Josef Brandl <[email protected]>" | ||
1304 | ]; | ||
1305 | |||
1306 | }; | ||
1307 | "pkg-config" = rec { | ||
1308 | crateName = "pkg-config"; | ||
1309 | version = "0.3.18"; | ||
1310 | edition = "2015"; | ||
1311 | sha256 = "0cxc4yd9qb40944a2svgci41bws68f1hqvyljhrldwbadda94r6k"; | ||
1312 | authors = [ | ||
1313 | "Alex Crichton <[email protected]>" | ||
1314 | ]; | ||
1315 | |||
1316 | }; | ||
1317 | "pretty_env_logger" = rec { | ||
1318 | crateName = "pretty_env_logger"; | ||
1319 | version = "0.4.0"; | ||
1320 | edition = "2015"; | ||
1321 | sha256 = "17gva1rlf9fhgr0jr19kv39f8bir3f4pa4jz02qbhl9qanwkcvcj"; | ||
1322 | authors = [ | ||
1323 | "Sean McArthur <sean@seanmonstar>" | ||
1324 | ]; | ||
1325 | dependencies = [ | ||
1326 | { | ||
1327 | name = "env_logger"; | ||
1328 | packageId = "env_logger"; | ||
1329 | } | ||
1330 | { | ||
1331 | name = "log"; | ||
1332 | packageId = "log"; | ||
1333 | } | ||
1334 | ]; | ||
1335 | |||
1336 | }; | ||
1337 | "proc-macro-hack" = rec { | ||
1338 | crateName = "proc-macro-hack"; | ||
1339 | version = "0.5.18"; | ||
1340 | edition = "2018"; | ||
1341 | sha256 = "16055crxm9l5skrl96l5cs6xc4xnvhiggcf625r7pixdl2whbilr"; | ||
1342 | procMacro = true; | ||
1343 | authors = [ | ||
1344 | "David Tolnay <[email protected]>" | ||
1345 | ]; | ||
1346 | |||
1347 | }; | ||
1348 | "proc-macro-nested" = rec { | ||
1349 | crateName = "proc-macro-nested"; | ||
1350 | version = "0.1.6"; | ||
1351 | edition = "2015"; | ||
1352 | sha256 = "0nnwm9bvp1fmr8nqjp8ynrkj97yzpsdh3062li8b0f4hzgd818gb"; | ||
1353 | authors = [ | ||
1354 | "David Tolnay <[email protected]>" | ||
1355 | ]; | ||
1356 | |||
1357 | }; | ||
1358 | "proc-macro2" = rec { | ||
1359 | crateName = "proc-macro2"; | ||
1360 | version = "1.0.19"; | ||
1361 | edition = "2018"; | ||
1362 | sha256 = "04lb4n7g5z9mq6in39i7yb1m5bb107dfawc2rf4227npnn2z1x84"; | ||
1363 | authors = [ | ||
1364 | "Alex Crichton <[email protected]>" | ||
1365 | "David Tolnay <[email protected]>" | ||
1366 | ]; | ||
1367 | dependencies = [ | ||
1368 | { | ||
1369 | name = "unicode-xid"; | ||
1370 | packageId = "unicode-xid"; | ||
1371 | } | ||
1372 | ]; | ||
1373 | features = { | ||
1374 | "default" = [ "proc-macro" ]; | ||
1375 | }; | ||
1376 | resolvedDefaultFeatures = [ "default" "proc-macro" ]; | ||
1377 | }; | ||
1378 | "quick-error" = rec { | ||
1379 | crateName = "quick-error"; | ||
1380 | version = "1.2.3"; | ||
1381 | edition = "2015"; | ||
1382 | sha256 = "1q6za3v78hsspisc197bg3g7rpc989qycy8ypr8ap8igv10ikl51"; | ||
1383 | authors = [ | ||
1384 | "Paul Colomiets <[email protected]>" | ||
1385 | "Colin Kiegel <[email protected]>" | ||
1386 | ]; | ||
1387 | |||
1388 | }; | ||
1389 | "quote" = rec { | ||
1390 | crateName = "quote"; | ||
1391 | version = "1.0.7"; | ||
1392 | edition = "2018"; | ||
1393 | sha256 = "0drzd6pq7whq7qhdvvs8wn6pbb0hhc12pz8wv80fb05ixhbksmma"; | ||
1394 | authors = [ | ||
1395 | "David Tolnay <[email protected]>" | ||
1396 | ]; | ||
1397 | dependencies = [ | ||
1398 | { | ||
1399 | name = "proc-macro2"; | ||
1400 | packageId = "proc-macro2"; | ||
1401 | usesDefaultFeatures = false; | ||
1402 | } | ||
1403 | ]; | ||
1404 | features = { | ||
1405 | "default" = [ "proc-macro" ]; | ||
1406 | "proc-macro" = [ "proc-macro2/proc-macro" ]; | ||
1407 | }; | ||
1408 | resolvedDefaultFeatures = [ "default" "proc-macro" ]; | ||
1409 | }; | ||
1410 | "redox_syscall" = rec { | ||
1411 | crateName = "redox_syscall"; | ||
1412 | version = "0.1.57"; | ||
1413 | edition = "2015"; | ||
1414 | sha256 = "1kh59fpwy33w9nwd5iyc283yglq8pf2s41hnhvl48iax9mz0zk21"; | ||
1415 | libName = "syscall"; | ||
1416 | authors = [ | ||
1417 | "Jeremy Soller <[email protected]>" | ||
1418 | ]; | ||
1419 | |||
1420 | }; | ||
1421 | "regex" = rec { | ||
1422 | crateName = "regex"; | ||
1423 | version = "1.3.9"; | ||
1424 | edition = "2015"; | ||
1425 | sha256 = "1rnqga94ypykl2apgj26l2j1s9bvr2ix4dlzs323n6abyky80dww"; | ||
1426 | authors = [ | ||
1427 | "The Rust Project Developers" | ||
1428 | ]; | ||
1429 | dependencies = [ | ||
1430 | { | ||
1431 | name = "aho-corasick"; | ||
1432 | packageId = "aho-corasick"; | ||
1433 | optional = true; | ||
1434 | } | ||
1435 | { | ||
1436 | name = "memchr"; | ||
1437 | packageId = "memchr"; | ||
1438 | optional = true; | ||
1439 | } | ||
1440 | { | ||
1441 | name = "regex-syntax"; | ||
1442 | packageId = "regex-syntax"; | ||
1443 | usesDefaultFeatures = false; | ||
1444 | } | ||
1445 | { | ||
1446 | name = "thread_local"; | ||
1447 | packageId = "thread_local"; | ||
1448 | optional = true; | ||
1449 | } | ||
1450 | ]; | ||
1451 | features = { | ||
1452 | "default" = [ "std" "perf" "unicode" "regex-syntax/default" ]; | ||
1453 | "perf" = [ "perf-cache" "perf-dfa" "perf-inline" "perf-literal" ]; | ||
1454 | "perf-cache" = [ "thread_local" ]; | ||
1455 | "perf-literal" = [ "aho-corasick" "memchr" ]; | ||
1456 | "unicode" = [ "unicode-age" "unicode-bool" "unicode-case" "unicode-gencat" "unicode-perl" "unicode-script" "unicode-segment" "regex-syntax/unicode" ]; | ||
1457 | "unicode-age" = [ "regex-syntax/unicode-age" ]; | ||
1458 | "unicode-bool" = [ "regex-syntax/unicode-bool" ]; | ||
1459 | "unicode-case" = [ "regex-syntax/unicode-case" ]; | ||
1460 | "unicode-gencat" = [ "regex-syntax/unicode-gencat" ]; | ||
1461 | "unicode-perl" = [ "regex-syntax/unicode-perl" ]; | ||
1462 | "unicode-script" = [ "regex-syntax/unicode-script" ]; | ||
1463 | "unicode-segment" = [ "regex-syntax/unicode-segment" ]; | ||
1464 | "unstable" = [ "pattern" ]; | ||
1465 | "use_std" = [ "std" ]; | ||
1466 | }; | ||
1467 | resolvedDefaultFeatures = [ "aho-corasick" "default" "memchr" "perf" "perf-cache" "perf-dfa" "perf-inline" "perf-literal" "std" "thread_local" "unicode" "unicode-age" "unicode-bool" "unicode-case" "unicode-gencat" "unicode-perl" "unicode-script" "unicode-segment" ]; | ||
1468 | }; | ||
1469 | "regex-syntax" = rec { | ||
1470 | crateName = "regex-syntax"; | ||
1471 | version = "0.6.18"; | ||
1472 | edition = "2015"; | ||
1473 | sha256 = "1s648w7rwpxnq9iqwbyy43ar4al07906jpz0jxlql23bgjwjwh96"; | ||
1474 | authors = [ | ||
1475 | "The Rust Project Developers" | ||
1476 | ]; | ||
1477 | features = { | ||
1478 | "default" = [ "unicode" ]; | ||
1479 | "unicode" = [ "unicode-age" "unicode-bool" "unicode-case" "unicode-gencat" "unicode-perl" "unicode-script" "unicode-segment" ]; | ||
1480 | }; | ||
1481 | resolvedDefaultFeatures = [ "default" "unicode" "unicode-age" "unicode-bool" "unicode-case" "unicode-gencat" "unicode-perl" "unicode-script" "unicode-segment" ]; | ||
1482 | }; | ||
1483 | "rusqlite" = rec { | ||
1484 | crateName = "rusqlite"; | ||
1485 | version = "0.24.0"; | ||
1486 | edition = "2018"; | ||
1487 | sha256 = "1vxrg3m22pchyf10mhl60npgsckbaj426jyvsa2bcvlxblkw6y2c"; | ||
1488 | authors = [ | ||
1489 | "The rusqlite developers" | ||
1490 | ]; | ||
1491 | dependencies = [ | ||
1492 | { | ||
1493 | name = "bitflags"; | ||
1494 | packageId = "bitflags"; | ||
1495 | } | ||
1496 | { | ||
1497 | name = "fallible-iterator"; | ||
1498 | packageId = "fallible-iterator"; | ||
1499 | } | ||
1500 | { | ||
1501 | name = "fallible-streaming-iterator"; | ||
1502 | packageId = "fallible-streaming-iterator"; | ||
1503 | } | ||
1504 | { | ||
1505 | name = "libsqlite3-sys"; | ||
1506 | packageId = "libsqlite3-sys"; | ||
1507 | } | ||
1508 | { | ||
1509 | name = "lru-cache"; | ||
1510 | packageId = "lru-cache"; | ||
1511 | } | ||
1512 | { | ||
1513 | name = "memchr"; | ||
1514 | packageId = "memchr"; | ||
1515 | } | ||
1516 | { | ||
1517 | name = "smallvec"; | ||
1518 | packageId = "smallvec"; | ||
1519 | } | ||
1520 | ]; | ||
1521 | features = { | ||
1522 | "array" = [ "vtab" ]; | ||
1523 | "backup" = [ "libsqlite3-sys/min_sqlite_version_3_6_23" ]; | ||
1524 | "blob" = [ "libsqlite3-sys/min_sqlite_version_3_7_7" ]; | ||
1525 | "buildtime_bindgen" = [ "libsqlite3-sys/buildtime_bindgen" ]; | ||
1526 | "bundled" = [ "libsqlite3-sys/bundled" "modern_sqlite" ]; | ||
1527 | "bundled-full" = [ "array" "backup" "blob" "bundled" "chrono" "collation" "column_decltype" "csvtab" "extra_check" "functions" "hooks" "i128_blob" "limits" "load_extension" "serde_json" "series" "trace" "unlock_notify" "url" "uuid" "vtab" "window" ]; | ||
1528 | "bundled-windows" = [ "libsqlite3-sys/bundled-windows" ]; | ||
1529 | "csvtab" = [ "csv" "vtab" ]; | ||
1530 | "functions" = [ "libsqlite3-sys/min_sqlite_version_3_7_7" ]; | ||
1531 | "i128_blob" = [ "byteorder" ]; | ||
1532 | "in_gecko" = [ "modern_sqlite" "libsqlite3-sys/in_gecko" ]; | ||
1533 | "modern_sqlite" = [ "libsqlite3-sys/bundled_bindings" ]; | ||
1534 | "series" = [ "vtab" ]; | ||
1535 | "session" = [ "libsqlite3-sys/session" "hooks" ]; | ||
1536 | "sqlcipher" = [ "libsqlite3-sys/sqlcipher" ]; | ||
1537 | "trace" = [ "libsqlite3-sys/min_sqlite_version_3_6_23" ]; | ||
1538 | "unlock_notify" = [ "libsqlite3-sys/unlock_notify" ]; | ||
1539 | "vtab" = [ "libsqlite3-sys/min_sqlite_version_3_7_7" "lazy_static" ]; | ||
1540 | "wasm32-wasi-vfs" = [ "libsqlite3-sys/wasm32-wasi-vfs" ]; | ||
1541 | "window" = [ "functions" ]; | ||
1542 | "with-asan" = [ "libsqlite3-sys/with-asan" ]; | ||
1543 | }; | ||
1544 | }; | ||
1545 | "signal-hook-registry" = rec { | ||
1546 | crateName = "signal-hook-registry"; | ||
1547 | version = "1.2.1"; | ||
1548 | edition = "2015"; | ||
1549 | sha256 = "0dgh2l7diyhkf74jjyqz1jfsyqsvxgssls30cix6b7jkph823qd3"; | ||
1550 | authors = [ | ||
1551 | "Michal 'vorner' Vaner <[email protected]>" | ||
1552 | "Masaki Hara <[email protected]>" | ||
1553 | ]; | ||
1554 | dependencies = [ | ||
1555 | { | ||
1556 | name = "arc-swap"; | ||
1557 | packageId = "arc-swap"; | ||
1558 | } | ||
1559 | { | ||
1560 | name = "libc"; | ||
1561 | packageId = "libc"; | ||
1562 | } | ||
1563 | ]; | ||
1564 | |||
1565 | }; | ||
1566 | "slab" = rec { | ||
1567 | crateName = "slab"; | ||
1568 | version = "0.4.2"; | ||
1569 | edition = "2015"; | ||
1570 | sha256 = "1y59xsa27jk84sxzswjk60xcjf8b4fm5960jwpznrrcmasyva4f1"; | ||
1571 | authors = [ | ||
1572 | "Carl Lerche <[email protected]>" | ||
1573 | ]; | ||
1574 | |||
1575 | }; | ||
1576 | "smallvec" = rec { | ||
1577 | crateName = "smallvec"; | ||
1578 | version = "1.4.2"; | ||
1579 | edition = "2018"; | ||
1580 | sha256 = "0lp2ax6hfbcsqa92xkdz8vnlfc0fhpqczv62l64kvgsbp2b7dvpv"; | ||
1581 | authors = [ | ||
1582 | "The Servo Project Developers" | ||
1583 | ]; | ||
1584 | features = { | ||
1585 | }; | ||
1586 | }; | ||
1587 | "socket2" = rec { | ||
1588 | crateName = "socket2"; | ||
1589 | version = "0.3.12"; | ||
1590 | edition = "2018"; | ||
1591 | sha256 = "062921z4yc29mwzxx982nwd1kb8lnfqyvhncydbf7p3pys9qf203"; | ||
1592 | authors = [ | ||
1593 | "Alex Crichton <[email protected]>" | ||
1594 | ]; | ||
1595 | dependencies = [ | ||
1596 | { | ||
1597 | name = "cfg-if"; | ||
1598 | packageId = "cfg-if"; | ||
1599 | target = { target, features }: (target."unix" || (target."os" == "redox")); | ||
1600 | } | ||
1601 | { | ||
1602 | name = "libc"; | ||
1603 | packageId = "libc"; | ||
1604 | target = { target, features }: (target."unix" || (target."os" == "redox")); | ||
1605 | } | ||
1606 | { | ||
1607 | name = "redox_syscall"; | ||
1608 | packageId = "redox_syscall"; | ||
1609 | target = { target, features }: (target."os" == "redox"); | ||
1610 | } | ||
1611 | { | ||
1612 | name = "winapi"; | ||
1613 | packageId = "winapi 0.3.9"; | ||
1614 | target = { target, features }: target."windows"; | ||
1615 | features = [ "handleapi" "ws2def" "ws2ipdef" "ws2tcpip" "minwindef" ]; | ||
1616 | } | ||
1617 | ]; | ||
1618 | features = { | ||
1619 | }; | ||
1620 | }; | ||
1621 | "syn" = rec { | ||
1622 | crateName = "syn"; | ||
1623 | version = "1.0.39"; | ||
1624 | edition = "2018"; | ||
1625 | sha256 = "1y8ikwihdrfn64ybrhaqlbxlcf4g43s8mad36n47yz7ycxjqs7c9"; | ||
1626 | authors = [ | ||
1627 | "David Tolnay <[email protected]>" | ||
1628 | ]; | ||
1629 | dependencies = [ | ||
1630 | { | ||
1631 | name = "proc-macro2"; | ||
1632 | packageId = "proc-macro2"; | ||
1633 | usesDefaultFeatures = false; | ||
1634 | } | ||
1635 | { | ||
1636 | name = "quote"; | ||
1637 | packageId = "quote"; | ||
1638 | optional = true; | ||
1639 | usesDefaultFeatures = false; | ||
1640 | } | ||
1641 | { | ||
1642 | name = "unicode-xid"; | ||
1643 | packageId = "unicode-xid"; | ||
1644 | } | ||
1645 | ]; | ||
1646 | features = { | ||
1647 | "default" = [ "derive" "parsing" "printing" "clone-impls" "proc-macro" ]; | ||
1648 | "printing" = [ "quote" ]; | ||
1649 | "proc-macro" = [ "proc-macro2/proc-macro" "quote/proc-macro" ]; | ||
1650 | "test" = [ "syn-test-suite/all-features" ]; | ||
1651 | }; | ||
1652 | resolvedDefaultFeatures = [ "clone-impls" "default" "derive" "full" "parsing" "printing" "proc-macro" "quote" "visit-mut" ]; | ||
1653 | }; | ||
1654 | "termcolor" = rec { | ||
1655 | crateName = "termcolor"; | ||
1656 | version = "1.1.0"; | ||
1657 | edition = "2018"; | ||
1658 | sha256 = "0pyp8vc0gx7124y80ixdl6plbfn1yjhw04i875k5fz2dk8lglsxv"; | ||
1659 | authors = [ | ||
1660 | "Andrew Gallant <[email protected]>" | ||
1661 | ]; | ||
1662 | dependencies = [ | ||
1663 | { | ||
1664 | name = "winapi-util"; | ||
1665 | packageId = "winapi-util"; | ||
1666 | target = { target, features }: target."windows"; | ||
1667 | } | ||
1668 | ]; | ||
1669 | |||
1670 | }; | ||
1671 | "thread_local" = rec { | ||
1672 | crateName = "thread_local"; | ||
1673 | version = "1.0.1"; | ||
1674 | edition = "2015"; | ||
1675 | sha256 = "054vlrr1vsdy1h4b7n99mr24pnj8928ig9qwzg36wnkld4dns36l"; | ||
1676 | authors = [ | ||
1677 | "Amanieu d'Antras <[email protected]>" | ||
1678 | ]; | ||
1679 | dependencies = [ | ||
1680 | { | ||
1681 | name = "lazy_static"; | ||
1682 | packageId = "lazy_static"; | ||
1683 | } | ||
1684 | ]; | ||
1685 | |||
1686 | }; | ||
1687 | "time" = rec { | ||
1688 | crateName = "time"; | ||
1689 | version = "0.1.43"; | ||
1690 | edition = "2015"; | ||
1691 | sha256 = "0f14wrgxj7ya2v4msg5mni7046bsm2angm7cn3pd3yv04gpm12na"; | ||
1692 | authors = [ | ||
1693 | "The Rust Project Developers" | ||
1694 | ]; | ||
1695 | dependencies = [ | ||
1696 | { | ||
1697 | name = "libc"; | ||
1698 | packageId = "libc"; | ||
1699 | } | ||
1700 | { | ||
1701 | name = "winapi"; | ||
1702 | packageId = "winapi 0.3.9"; | ||
1703 | target = { target, features }: target."windows"; | ||
1704 | features = [ "std" "minwinbase" "minwindef" "ntdef" "profileapi" "sysinfoapi" "timezoneapi" ]; | ||
1705 | } | ||
1706 | ]; | ||
1707 | devDependencies = [ | ||
1708 | { | ||
1709 | name = "winapi"; | ||
1710 | packageId = "winapi 0.3.9"; | ||
1711 | features = [ "std" "processthreadsapi" "winbase" ]; | ||
1712 | } | ||
1713 | ]; | ||
1714 | |||
1715 | }; | ||
1716 | "tokio" = rec { | ||
1717 | crateName = "tokio"; | ||
1718 | version = "0.2.22"; | ||
1719 | edition = "2018"; | ||
1720 | sha256 = "1kfw5lgq1sswlbxq98j5q45bdxv4hhd907nksysbbwjbv1acld2x"; | ||
1721 | authors = [ | ||
1722 | "Tokio Contributors <[email protected]>" | ||
1723 | ]; | ||
1724 | dependencies = [ | ||
1725 | { | ||
1726 | name = "bytes"; | ||
1727 | packageId = "bytes"; | ||
1728 | } | ||
1729 | { | ||
1730 | name = "fnv"; | ||
1731 | packageId = "fnv"; | ||
1732 | optional = true; | ||
1733 | } | ||
1734 | { | ||
1735 | name = "futures-core"; | ||
1736 | packageId = "futures-core"; | ||
1737 | optional = true; | ||
1738 | } | ||
1739 | { | ||
1740 | name = "iovec"; | ||
1741 | packageId = "iovec"; | ||
1742 | optional = true; | ||
1743 | } | ||
1744 | { | ||
1745 | name = "lazy_static"; | ||
1746 | packageId = "lazy_static"; | ||
1747 | optional = true; | ||
1748 | } | ||
1749 | { | ||
1750 | name = "libc"; | ||
1751 | packageId = "libc"; | ||
1752 | optional = true; | ||
1753 | target = { target, features }: target."unix"; | ||
1754 | } | ||
1755 | { | ||
1756 | name = "memchr"; | ||
1757 | packageId = "memchr"; | ||
1758 | optional = true; | ||
1759 | } | ||
1760 | { | ||
1761 | name = "mio"; | ||
1762 | packageId = "mio"; | ||
1763 | optional = true; | ||
1764 | } | ||
1765 | { | ||
1766 | name = "mio-named-pipes"; | ||
1767 | packageId = "mio-named-pipes"; | ||
1768 | optional = true; | ||
1769 | target = { target, features }: target."windows"; | ||
1770 | } | ||
1771 | { | ||
1772 | name = "mio-uds"; | ||
1773 | packageId = "mio-uds"; | ||
1774 | optional = true; | ||
1775 | target = { target, features }: target."unix"; | ||
1776 | } | ||
1777 | { | ||
1778 | name = "num_cpus"; | ||
1779 | packageId = "num_cpus"; | ||
1780 | optional = true; | ||
1781 | } | ||
1782 | { | ||
1783 | name = "pin-project-lite"; | ||
1784 | packageId = "pin-project-lite"; | ||
1785 | } | ||
1786 | { | ||
1787 | name = "signal-hook-registry"; | ||
1788 | packageId = "signal-hook-registry"; | ||
1789 | optional = true; | ||
1790 | target = { target, features }: target."unix"; | ||
1791 | } | ||
1792 | { | ||
1793 | name = "slab"; | ||
1794 | packageId = "slab"; | ||
1795 | optional = true; | ||
1796 | } | ||
1797 | { | ||
1798 | name = "tokio-macros"; | ||
1799 | packageId = "tokio-macros"; | ||
1800 | optional = true; | ||
1801 | } | ||
1802 | { | ||
1803 | name = "winapi"; | ||
1804 | packageId = "winapi 0.3.9"; | ||
1805 | optional = true; | ||
1806 | usesDefaultFeatures = false; | ||
1807 | target = { target, features }: target."windows"; | ||
1808 | } | ||
1809 | ]; | ||
1810 | features = { | ||
1811 | "blocking" = [ "rt-core" ]; | ||
1812 | "dns" = [ "rt-core" ]; | ||
1813 | "fs" = [ "rt-core" "io-util" ]; | ||
1814 | "full" = [ "blocking" "dns" "fs" "io-driver" "io-util" "io-std" "macros" "net" "process" "rt-core" "rt-util" "rt-threaded" "signal" "stream" "sync" "time" ]; | ||
1815 | "io-driver" = [ "mio" "lazy_static" ]; | ||
1816 | "io-std" = [ "rt-core" ]; | ||
1817 | "io-util" = [ "memchr" ]; | ||
1818 | "macros" = [ "tokio-macros" ]; | ||
1819 | "net" = [ "dns" "tcp" "udp" "uds" ]; | ||
1820 | "process" = [ "io-driver" "libc" "mio-named-pipes" "signal" "winapi/consoleapi" "winapi/minwindef" "winapi/threadpoollegacyapiset" "winapi/winerror" ]; | ||
1821 | "rt-threaded" = [ "num_cpus" "rt-core" ]; | ||
1822 | "signal" = [ "io-driver" "lazy_static" "libc" "mio-uds" "signal-hook-registry" "winapi/consoleapi" "winapi/minwindef" ]; | ||
1823 | "stream" = [ "futures-core" ]; | ||
1824 | "sync" = [ "fnv" ]; | ||
1825 | "tcp" = [ "io-driver" "iovec" ]; | ||
1826 | "time" = [ "slab" ]; | ||
1827 | "udp" = [ "io-driver" ]; | ||
1828 | "uds" = [ "io-driver" "mio-uds" "libc" ]; | ||
1829 | }; | ||
1830 | resolvedDefaultFeatures = [ "blocking" "default" "dns" "fnv" "fs" "full" "futures-core" "io-driver" "io-std" "io-util" "iovec" "lazy_static" "libc" "macros" "memchr" "mio" "mio-named-pipes" "mio-uds" "net" "num_cpus" "process" "rt-core" "rt-threaded" "rt-util" "signal" "signal-hook-registry" "slab" "stream" "sync" "tcp" "time" "tokio-macros" "udp" "uds" "winapi" ]; | ||
1831 | }; | ||
1832 | "tokio-macros" = rec { | ||
1833 | crateName = "tokio-macros"; | ||
1834 | version = "0.2.5"; | ||
1835 | edition = "2018"; | ||
1836 | sha256 = "1283aq0l7rnh79zzqk4r34dgimvwcymrzmg1yah9ai2nmb3arhzh"; | ||
1837 | procMacro = true; | ||
1838 | authors = [ | ||
1839 | "Tokio Contributors <[email protected]>" | ||
1840 | ]; | ||
1841 | dependencies = [ | ||
1842 | { | ||
1843 | name = "proc-macro2"; | ||
1844 | packageId = "proc-macro2"; | ||
1845 | } | ||
1846 | { | ||
1847 | name = "quote"; | ||
1848 | packageId = "quote"; | ||
1849 | } | ||
1850 | { | ||
1851 | name = "syn"; | ||
1852 | packageId = "syn"; | ||
1853 | features = [ "full" ]; | ||
1854 | } | ||
1855 | ]; | ||
1856 | |||
1857 | }; | ||
1858 | "tokio-util" = rec { | ||
1859 | crateName = "tokio-util"; | ||
1860 | version = "0.3.1"; | ||
1861 | edition = "2018"; | ||
1862 | sha256 = "16b48dl6sbc9x944jgjvsd65ab1w2c2qcziddbrbwv1b3y4l50my"; | ||
1863 | authors = [ | ||
1864 | "Tokio Contributors <[email protected]>" | ||
1865 | ]; | ||
1866 | dependencies = [ | ||
1867 | { | ||
1868 | name = "bytes"; | ||
1869 | packageId = "bytes"; | ||
1870 | } | ||
1871 | { | ||
1872 | name = "futures-core"; | ||
1873 | packageId = "futures-core"; | ||
1874 | } | ||
1875 | { | ||
1876 | name = "futures-sink"; | ||
1877 | packageId = "futures-sink"; | ||
1878 | } | ||
1879 | { | ||
1880 | name = "log"; | ||
1881 | packageId = "log"; | ||
1882 | } | ||
1883 | { | ||
1884 | name = "pin-project-lite"; | ||
1885 | packageId = "pin-project-lite"; | ||
1886 | } | ||
1887 | { | ||
1888 | name = "tokio"; | ||
1889 | packageId = "tokio"; | ||
1890 | } | ||
1891 | ]; | ||
1892 | devDependencies = [ | ||
1893 | { | ||
1894 | name = "tokio"; | ||
1895 | packageId = "tokio"; | ||
1896 | features = [ "full" ]; | ||
1897 | } | ||
1898 | ]; | ||
1899 | features = { | ||
1900 | "codec" = [ "tokio/stream" ]; | ||
1901 | "compat" = [ "futures-io" ]; | ||
1902 | "full" = [ "codec" "udp" "compat" ]; | ||
1903 | "udp" = [ "tokio/udp" ]; | ||
1904 | }; | ||
1905 | resolvedDefaultFeatures = [ "codec" "default" ]; | ||
1906 | }; | ||
1907 | "tower-service" = rec { | ||
1908 | crateName = "tower-service"; | ||
1909 | version = "0.3.0"; | ||
1910 | edition = "2018"; | ||
1911 | sha256 = "0q4q53w82w1wd71x7vbspg2l3jicb6al2w1qdwxmnjrz8jzvd1z9"; | ||
1912 | authors = [ | ||
1913 | "Tower Maintainers <[email protected]>" | ||
1914 | ]; | ||
1915 | |||
1916 | }; | ||
1917 | "tracing" = rec { | ||
1918 | crateName = "tracing"; | ||
1919 | version = "0.1.19"; | ||
1920 | edition = "2018"; | ||
1921 | sha256 = "0v3qhqnkmwar0zbkqj5z4achpjl9279xw3v61kinqb833c3clybd"; | ||
1922 | authors = [ | ||
1923 | "Eliza Weisman <[email protected]>" | ||
1924 | "Tokio Contributors <[email protected]>" | ||
1925 | ]; | ||
1926 | dependencies = [ | ||
1927 | { | ||
1928 | name = "cfg-if"; | ||
1929 | packageId = "cfg-if"; | ||
1930 | } | ||
1931 | { | ||
1932 | name = "log"; | ||
1933 | packageId = "log"; | ||
1934 | optional = true; | ||
1935 | } | ||
1936 | { | ||
1937 | name = "tracing-core"; | ||
1938 | packageId = "tracing-core"; | ||
1939 | usesDefaultFeatures = false; | ||
1940 | } | ||
1941 | ]; | ||
1942 | devDependencies = [ | ||
1943 | { | ||
1944 | name = "log"; | ||
1945 | packageId = "log"; | ||
1946 | } | ||
1947 | ]; | ||
1948 | features = { | ||
1949 | "attributes" = [ "tracing-attributes" ]; | ||
1950 | "default" = [ "std" "attributes" ]; | ||
1951 | "log-always" = [ "log" ]; | ||
1952 | "std" = [ "tracing-core/std" ]; | ||
1953 | }; | ||
1954 | resolvedDefaultFeatures = [ "log" "std" ]; | ||
1955 | }; | ||
1956 | "tracing-core" = rec { | ||
1957 | crateName = "tracing-core"; | ||
1958 | version = "0.1.14"; | ||
1959 | edition = "2018"; | ||
1960 | sha256 = "0i9mig6849il9wspwgds08mgipwkrh3kg0vdlcyb85n34ckncqyv"; | ||
1961 | authors = [ | ||
1962 | "Tokio Contributors <[email protected]>" | ||
1963 | ]; | ||
1964 | dependencies = [ | ||
1965 | { | ||
1966 | name = "lazy_static"; | ||
1967 | packageId = "lazy_static"; | ||
1968 | optional = true; | ||
1969 | } | ||
1970 | ]; | ||
1971 | features = { | ||
1972 | "default" = [ "std" ]; | ||
1973 | "std" = [ "lazy_static" ]; | ||
1974 | }; | ||
1975 | resolvedDefaultFeatures = [ "lazy_static" "std" ]; | ||
1976 | }; | ||
1977 | "try-lock" = rec { | ||
1978 | crateName = "try-lock"; | ||
1979 | version = "0.2.3"; | ||
1980 | edition = "2015"; | ||
1981 | sha256 = "0hkn1ksmg5hdqgqdw1ahy5qk69f4crh2psf0v61qphyrf777nm2r"; | ||
1982 | authors = [ | ||
1983 | "Sean McArthur <[email protected]>" | ||
1984 | ]; | ||
1985 | |||
1986 | }; | ||
1987 | "unicode-xid" = rec { | ||
1988 | crateName = "unicode-xid"; | ||
1989 | version = "0.2.1"; | ||
1990 | edition = "2015"; | ||
1991 | sha256 = "0r6mknipyy9vpz8mwmxvkx65ff2ha1n2pxqjj6f46lcn8yrhpzpp"; | ||
1992 | authors = [ | ||
1993 | "erick.tryzelaar <[email protected]>" | ||
1994 | "kwantam <[email protected]>" | ||
1995 | ]; | ||
1996 | features = { | ||
1997 | }; | ||
1998 | resolvedDefaultFeatures = [ "default" ]; | ||
1999 | }; | ||
2000 | "vcpkg" = rec { | ||
2001 | crateName = "vcpkg"; | ||
2002 | version = "0.2.10"; | ||
2003 | edition = "2015"; | ||
2004 | sha256 = "132hlmsc4maava91vl4lh677sl1c7vr8ccl53fnr5w41y6dh4m34"; | ||
2005 | authors = [ | ||
2006 | "Jim McGrath <[email protected]>" | ||
2007 | ]; | ||
2008 | |||
2009 | }; | ||
2010 | "want" = rec { | ||
2011 | crateName = "want"; | ||
2012 | version = "0.3.0"; | ||
2013 | edition = "2018"; | ||
2014 | sha256 = "181b2zmwfq389x9n2g1n37cvcvvdand832zz6v8i1l8wrdlaks0w"; | ||
2015 | authors = [ | ||
2016 | "Sean McArthur <[email protected]>" | ||
2017 | ]; | ||
2018 | dependencies = [ | ||
2019 | { | ||
2020 | name = "log"; | ||
2021 | packageId = "log"; | ||
2022 | } | ||
2023 | { | ||
2024 | name = "try-lock"; | ||
2025 | packageId = "try-lock"; | ||
2026 | } | ||
2027 | ]; | ||
2028 | |||
2029 | }; | ||
2030 | "winapi 0.2.8" = rec { | ||
2031 | crateName = "winapi"; | ||
2032 | version = "0.2.8"; | ||
2033 | edition = "2015"; | ||
2034 | sha256 = "0yh816lh6lf56dpsgxy189c2ai1z3j8mw9si6izqb6wsjkbcjz8n"; | ||
2035 | authors = [ | ||
2036 | "Peter Atashian <[email protected]>" | ||
2037 | ]; | ||
2038 | |||
2039 | }; | ||
2040 | "winapi 0.3.9" = rec { | ||
2041 | crateName = "winapi"; | ||
2042 | version = "0.3.9"; | ||
2043 | edition = "2015"; | ||
2044 | sha256 = "06gl025x418lchw1wxj64ycr7gha83m44cjr5sarhynd9xkrm0sw"; | ||
2045 | authors = [ | ||
2046 | "Peter Atashian <[email protected]>" | ||
2047 | ]; | ||
2048 | dependencies = [ | ||
2049 | { | ||
2050 | name = "winapi-i686-pc-windows-gnu"; | ||
2051 | packageId = "winapi-i686-pc-windows-gnu"; | ||
2052 | target = { target, features }: (stdenv.hostPlatform.config == "i686-pc-windows-gnu"); | ||
2053 | } | ||
2054 | { | ||
2055 | name = "winapi-x86_64-pc-windows-gnu"; | ||
2056 | packageId = "winapi-x86_64-pc-windows-gnu"; | ||
2057 | target = { target, features }: (stdenv.hostPlatform.config == "x86_64-pc-windows-gnu"); | ||
2058 | } | ||
2059 | ]; | ||
2060 | features = { | ||
2061 | "debug" = [ "impl-debug" ]; | ||
2062 | }; | ||
2063 | resolvedDefaultFeatures = [ "consoleapi" "errhandlingapi" "fileapi" "handleapi" "ioapiset" "minwinbase" "minwindef" "namedpipeapi" "ntdef" "processenv" "profileapi" "std" "synchapi" "sysinfoapi" "threadpoollegacyapiset" "timezoneapi" "winbase" "wincon" "winerror" "winnt" "winsock2" "ws2def" "ws2ipdef" "ws2tcpip" ]; | ||
2064 | }; | ||
2065 | "winapi-build" = rec { | ||
2066 | crateName = "winapi-build"; | ||
2067 | version = "0.1.1"; | ||
2068 | edition = "2015"; | ||
2069 | sha256 = "1g4rqsgjky0a7530qajn2bbfcrl2v0zb39idgdws9b1l7gp5wc9d"; | ||
2070 | libName = "build"; | ||
2071 | authors = [ | ||
2072 | "Peter Atashian <[email protected]>" | ||
2073 | ]; | ||
2074 | |||
2075 | }; | ||
2076 | "winapi-i686-pc-windows-gnu" = rec { | ||
2077 | crateName = "winapi-i686-pc-windows-gnu"; | ||
2078 | version = "0.4.0"; | ||
2079 | edition = "2015"; | ||
2080 | sha256 = "1dmpa6mvcvzz16zg6d5vrfy4bxgg541wxrcip7cnshi06v38ffxc"; | ||
2081 | authors = [ | ||
2082 | "Peter Atashian <[email protected]>" | ||
2083 | ]; | ||
2084 | |||
2085 | }; | ||
2086 | "winapi-util" = rec { | ||
2087 | crateName = "winapi-util"; | ||
2088 | version = "0.1.5"; | ||
2089 | edition = "2018"; | ||
2090 | sha256 = "0y71bp7f6d536czj40dhqk0d55wfbbwqfp2ymqf1an5ibgl6rv3h"; | ||
2091 | authors = [ | ||
2092 | "Andrew Gallant <[email protected]>" | ||
2093 | ]; | ||
2094 | dependencies = [ | ||
2095 | { | ||
2096 | name = "winapi"; | ||
2097 | packageId = "winapi 0.3.9"; | ||
2098 | target = { target, features }: target."windows"; | ||
2099 | features = [ "std" "consoleapi" "errhandlingapi" "fileapi" "minwindef" "processenv" "winbase" "wincon" "winerror" "winnt" ]; | ||
2100 | } | ||
2101 | ]; | ||
2102 | |||
2103 | }; | ||
2104 | "winapi-x86_64-pc-windows-gnu" = rec { | ||
2105 | crateName = "winapi-x86_64-pc-windows-gnu"; | ||
2106 | version = "0.4.0"; | ||
2107 | edition = "2015"; | ||
2108 | sha256 = "0gqq64czqb64kskjryj8isp62m2sgvx25yyj3kpc2myh85w24bki"; | ||
2109 | authors = [ | ||
2110 | "Peter Atashian <[email protected]>" | ||
2111 | ]; | ||
2112 | |||
2113 | }; | ||
2114 | "ws2_32-sys" = rec { | ||
2115 | crateName = "ws2_32-sys"; | ||
2116 | version = "0.2.1"; | ||
2117 | edition = "2015"; | ||
2118 | sha256 = "0ppscg5qfqaw0gzwv2a4nhn5bn01ff9iwn6ysqnzm4n8s3myz76m"; | ||
2119 | libName = "ws2_32"; | ||
2120 | authors = [ | ||
2121 | "Peter Atashian <[email protected]>" | ||
2122 | ]; | ||
2123 | dependencies = [ | ||
2124 | { | ||
2125 | name = "winapi"; | ||
2126 | packageId = "winapi 0.2.8"; | ||
2127 | } | ||
2128 | ]; | ||
2129 | buildDependencies = [ | ||
2130 | { | ||
2131 | name = "winapi-build"; | ||
2132 | packageId = "winapi-build"; | ||
2133 | } | ||
2134 | ]; | ||
2135 | |||
2136 | }; | ||
2137 | }; | ||
2138 | |||
2139 | # | ||
2140 | # crate2nix/default.nix (excerpt start) | ||
2141 | # | ||
2142 | |||
2143 | /* Target (platform) data for conditional dependencies. | ||
2144 | This corresponds roughly to what buildRustCrate is setting. | ||
2145 | */ | ||
2146 | defaultTarget = { | ||
2147 | unix = true; | ||
2148 | windows = false; | ||
2149 | fuchsia = true; | ||
2150 | test = false; | ||
2151 | |||
2152 | # This doesn't appear to be officially documented anywhere yet. | ||
2153 | # See https://github.com/rust-lang-nursery/rust-forge/issues/101. | ||
2154 | os = if stdenv.hostPlatform.isDarwin | ||
2155 | then "macos" | ||
2156 | else stdenv.hostPlatform.parsed.kernel.name; | ||
2157 | arch = stdenv.hostPlatform.parsed.cpu.name; | ||
2158 | family = "unix"; | ||
2159 | env = "gnu"; | ||
2160 | endian = | ||
2161 | if stdenv.hostPlatform.parsed.cpu.significantByte.name == "littleEndian" | ||
2162 | then "little" else "big"; | ||
2163 | pointer_width = toString stdenv.hostPlatform.parsed.cpu.bits; | ||
2164 | vendor = stdenv.hostPlatform.parsed.vendor.name; | ||
2165 | debug_assertions = false; | ||
2166 | }; | ||
2167 | |||
2168 | /* Filters common temp files and build files. */ | ||
2169 | # TODO(pkolloch): Substitute with gitignore filter | ||
2170 | sourceFilter = name: type: | ||
2171 | let | ||
2172 | baseName = builtins.baseNameOf (builtins.toString name); | ||
2173 | in | ||
2174 | ! ( | ||
2175 | # Filter out git | ||
2176 | baseName == ".gitignore" | ||
2177 | || (type == "directory" && baseName == ".git") | ||
2178 | |||
2179 | # Filter out build results | ||
2180 | || ( | ||
2181 | type == "directory" && ( | ||
2182 | baseName == "target" | ||
2183 | || baseName == "_site" | ||
2184 | || baseName == ".sass-cache" | ||
2185 | || baseName == ".jekyll-metadata" | ||
2186 | || baseName == "build-artifacts" | ||
2187 | ) | ||
2188 | ) | ||
2189 | |||
2190 | # Filter out nix-build result symlinks | ||
2191 | || ( | ||
2192 | type == "symlink" && lib.hasPrefix "result" baseName | ||
2193 | ) | ||
2194 | |||
2195 | # Filter out IDE config | ||
2196 | || ( | ||
2197 | type == "directory" && ( | ||
2198 | baseName == ".idea" || baseName == ".vscode" | ||
2199 | ) | ||
2200 | ) || lib.hasSuffix ".iml" baseName | ||
2201 | |||
2202 | # Filter out nix build files | ||
2203 | || baseName == "Cargo.nix" | ||
2204 | |||
2205 | # Filter out editor backup / swap files. | ||
2206 | || lib.hasSuffix "~" baseName | ||
2207 | || builtins.match "^\\.sw[a-z]$$" baseName != null | ||
2208 | || builtins.match "^\\..*\\.sw[a-z]$$" baseName != null | ||
2209 | || lib.hasSuffix ".tmp" baseName | ||
2210 | || lib.hasSuffix ".bak" baseName | ||
2211 | || baseName == "tests.nix" | ||
2212 | ); | ||
2213 | |||
2214 | /* Returns a crate which depends on successful test execution | ||
2215 | of crate given as the second argument. | ||
2216 | |||
2217 | testCrateFlags: list of flags to pass to the test exectuable | ||
2218 | testInputs: list of packages that should be available during test execution | ||
2219 | */ | ||
2220 | crateWithTest = { crate, testCrate, testCrateFlags, testInputs }: | ||
2221 | assert builtins.typeOf testCrateFlags == "list"; | ||
2222 | assert builtins.typeOf testInputs == "list"; | ||
2223 | let | ||
2224 | # override the `crate` so that it will build and execute tests instead of | ||
2225 | # building the actual lib and bin targets We just have to pass `--test` | ||
2226 | # to rustc and it will do the right thing. We execute the tests and copy | ||
2227 | # their log and the test executables to $out for later inspection. | ||
2228 | test = let | ||
2229 | drv = testCrate.override ( | ||
2230 | _: { | ||
2231 | buildTests = true; | ||
2232 | } | ||
2233 | ); | ||
2234 | in | ||
2235 | pkgs.runCommand "run-tests-${testCrate.name}" { | ||
2236 | inherit testCrateFlags; | ||
2237 | buildInputs = testInputs; | ||
2238 | } '' | ||
2239 | set -ex | ||
2240 | cd ${crate.src} | ||
2241 | for file in ${drv}/tests/*; do | ||
2242 | $file $testCrateFlags 2>&1 | tee -a $out | ||
2243 | done | ||
2244 | ''; | ||
2245 | in | ||
2246 | crate.overrideAttrs ( | ||
2247 | old: { | ||
2248 | checkPhase = '' | ||
2249 | test -e ${test} | ||
2250 | ''; | ||
2251 | passthru = (old.passthru or {}) // { | ||
2252 | inherit test; | ||
2253 | }; | ||
2254 | } | ||
2255 | ); | ||
2256 | |||
2257 | /* A restricted overridable version of builtRustCratesWithFeatures. */ | ||
2258 | buildRustCrateWithFeatures = | ||
2259 | { packageId | ||
2260 | , features ? rootFeatures | ||
2261 | , crateOverrides ? defaultCrateOverrides | ||
2262 | , buildRustCrateFunc ? ( | ||
2263 | if crateOverrides == pkgs.defaultCrateOverrides | ||
2264 | then buildRustCrate | ||
2265 | else buildRustCrate.override { | ||
2266 | defaultCrateOverrides = crateOverrides; | ||
2267 | } | ||
2268 | ) | ||
2269 | , runTests ? false | ||
2270 | , testCrateFlags ? [] | ||
2271 | , testInputs ? [] | ||
2272 | }: | ||
2273 | lib.makeOverridable | ||
2274 | ( | ||
2275 | { features, crateOverrides, runTests, testCrateFlags, testInputs }: | ||
2276 | let | ||
2277 | builtRustCrates = builtRustCratesWithFeatures { | ||
2278 | inherit packageId features buildRustCrateFunc; | ||
2279 | runTests = false; | ||
2280 | }; | ||
2281 | builtTestRustCrates = builtRustCratesWithFeatures { | ||
2282 | inherit packageId features buildRustCrateFunc; | ||
2283 | runTests = true; | ||
2284 | }; | ||
2285 | drv = builtRustCrates.${packageId}; | ||
2286 | testDrv = builtTestRustCrates.${packageId}; | ||
2287 | in | ||
2288 | if runTests then | ||
2289 | crateWithTest { | ||
2290 | crate = drv; | ||
2291 | testCrate = testDrv; | ||
2292 | inherit testCrateFlags testInputs; | ||
2293 | } | ||
2294 | else drv | ||
2295 | ) | ||
2296 | { inherit features crateOverrides runTests testCrateFlags testInputs; }; | ||
2297 | |||
2298 | /* Returns an attr set with packageId mapped to the result of buildRustCrateFunc | ||
2299 | for the corresponding crate. | ||
2300 | */ | ||
2301 | builtRustCratesWithFeatures = | ||
2302 | { packageId | ||
2303 | , features | ||
2304 | , crateConfigs ? crates | ||
2305 | , buildRustCrateFunc | ||
2306 | , runTests | ||
2307 | , target ? defaultTarget | ||
2308 | } @ args: | ||
2309 | assert (builtins.isAttrs crateConfigs); | ||
2310 | assert (builtins.isString packageId); | ||
2311 | assert (builtins.isList features); | ||
2312 | assert (builtins.isAttrs target); | ||
2313 | assert (builtins.isBool runTests); | ||
2314 | let | ||
2315 | rootPackageId = packageId; | ||
2316 | mergedFeatures = mergePackageFeatures ( | ||
2317 | args // { | ||
2318 | inherit rootPackageId; | ||
2319 | target = target // { test = runTests; }; | ||
2320 | } | ||
2321 | ); | ||
2322 | |||
2323 | buildByPackageId = packageId: buildByPackageIdImpl packageId; | ||
2324 | |||
2325 | # Memoize built packages so that reappearing packages are only built once. | ||
2326 | builtByPackageId = | ||
2327 | lib.mapAttrs (packageId: value: buildByPackageId packageId) crateConfigs; | ||
2328 | |||
2329 | buildByPackageIdImpl = packageId: | ||
2330 | let | ||
2331 | features = mergedFeatures."${packageId}" or []; | ||
2332 | crateConfig' = crateConfigs."${packageId}"; | ||
2333 | crateConfig = | ||
2334 | builtins.removeAttrs crateConfig' [ "resolvedDefaultFeatures" "devDependencies" ]; | ||
2335 | devDependencies = | ||
2336 | lib.optionals | ||
2337 | (runTests && packageId == rootPackageId) | ||
2338 | (crateConfig'.devDependencies or []); | ||
2339 | dependencies = | ||
2340 | dependencyDerivations { | ||
2341 | inherit builtByPackageId features target; | ||
2342 | dependencies = | ||
2343 | (crateConfig.dependencies or []) | ||
2344 | ++ devDependencies; | ||
2345 | }; | ||
2346 | buildDependencies = | ||
2347 | dependencyDerivations { | ||
2348 | inherit builtByPackageId features target; | ||
2349 | dependencies = crateConfig.buildDependencies or []; | ||
2350 | }; | ||
2351 | |||
2352 | filterEnabledDependenciesForThis = dependencies: filterEnabledDependencies { | ||
2353 | inherit dependencies features target; | ||
2354 | }; | ||
2355 | |||
2356 | dependenciesWithRenames = | ||
2357 | lib.filter (d: d ? "rename") ( | ||
2358 | filterEnabledDependenciesForThis | ||
2359 | ( | ||
2360 | (crateConfig.buildDependencies or []) | ||
2361 | ++ (crateConfig.dependencies or []) | ||
2362 | ++ devDependencies | ||
2363 | ) | ||
2364 | ); | ||
2365 | |||
2366 | crateRenames = | ||
2367 | builtins.listToAttrs | ||
2368 | (map (d: { name = d.name; value = d.rename; }) dependenciesWithRenames); | ||
2369 | in | ||
2370 | buildRustCrateFunc ( | ||
2371 | crateConfig // { | ||
2372 | src = crateConfig.src or ( | ||
2373 | pkgs.fetchurl { | ||
2374 | name = "${crateConfig.crateName}-${crateConfig.version}.tar.gz"; | ||
2375 | url = "https://crates.io/api/v1/crates/${crateConfig.crateName}/${crateConfig.version}/download"; | ||
2376 | sha256 = crateConfig.sha256; | ||
2377 | } | ||
2378 | ); | ||
2379 | inherit features dependencies buildDependencies crateRenames release; | ||
2380 | } | ||
2381 | ); | ||
2382 | in | ||
2383 | builtByPackageId; | ||
2384 | |||
2385 | /* Returns the actual derivations for the given dependencies. */ | ||
2386 | dependencyDerivations = | ||
2387 | { builtByPackageId | ||
2388 | , features | ||
2389 | , dependencies | ||
2390 | , target | ||
2391 | }: | ||
2392 | assert (builtins.isAttrs builtByPackageId); | ||
2393 | assert (builtins.isList features); | ||
2394 | assert (builtins.isList dependencies); | ||
2395 | assert (builtins.isAttrs target); | ||
2396 | let | ||
2397 | enabledDependencies = filterEnabledDependencies { | ||
2398 | inherit dependencies features target; | ||
2399 | }; | ||
2400 | depDerivation = dependency: builtByPackageId.${dependency.packageId}; | ||
2401 | in | ||
2402 | map depDerivation enabledDependencies; | ||
2403 | |||
2404 | /* Returns a sanitized version of val with all values substituted that cannot | ||
2405 | be serialized as JSON. | ||
2406 | */ | ||
2407 | sanitizeForJson = val: | ||
2408 | if builtins.isAttrs val | ||
2409 | then lib.mapAttrs (n: v: sanitizeForJson v) val | ||
2410 | else if builtins.isList val | ||
2411 | then builtins.map sanitizeForJson val | ||
2412 | else if builtins.isFunction val | ||
2413 | then "function" | ||
2414 | else val; | ||
2415 | |||
2416 | /* Returns various tools to debug a crate. */ | ||
2417 | debugCrate = { packageId, target ? defaultTarget }: | ||
2418 | assert (builtins.isString packageId); | ||
2419 | let | ||
2420 | debug = rec { | ||
2421 | # The built tree as passed to buildRustCrate. | ||
2422 | buildTree = buildRustCrateWithFeatures { | ||
2423 | buildRustCrateFunc = lib.id; | ||
2424 | inherit packageId; | ||
2425 | }; | ||
2426 | sanitizedBuildTree = sanitizeForJson buildTree; | ||
2427 | dependencyTree = sanitizeForJson ( | ||
2428 | buildRustCrateWithFeatures { | ||
2429 | buildRustCrateFunc = crate: { | ||
2430 | "01_crateName" = crate.crateName or false; | ||
2431 | "02_features" = crate.features or []; | ||
2432 | "03_dependencies" = crate.dependencies or []; | ||
2433 | }; | ||
2434 | inherit packageId; | ||
2435 | } | ||
2436 | ); | ||
2437 | mergedPackageFeatures = mergePackageFeatures { | ||
2438 | features = rootFeatures; | ||
2439 | inherit packageId target; | ||
2440 | }; | ||
2441 | diffedDefaultPackageFeatures = diffDefaultPackageFeatures { | ||
2442 | inherit packageId target; | ||
2443 | }; | ||
2444 | }; | ||
2445 | in | ||
2446 | { internal = debug; }; | ||
2447 | |||
2448 | /* Returns differences between cargo default features and crate2nix default | ||
2449 | features. | ||
2450 | |||
2451 | This is useful for verifying the feature resolution in crate2nix. | ||
2452 | */ | ||
2453 | diffDefaultPackageFeatures = | ||
2454 | { crateConfigs ? crates | ||
2455 | , packageId | ||
2456 | , target | ||
2457 | }: | ||
2458 | assert (builtins.isAttrs crateConfigs); | ||
2459 | let | ||
2460 | prefixValues = prefix: lib.mapAttrs (n: v: { "${prefix}" = v; }); | ||
2461 | mergedFeatures = | ||
2462 | prefixValues | ||
2463 | "crate2nix" | ||
2464 | (mergePackageFeatures { inherit crateConfigs packageId target; features = [ "default" ]; }); | ||
2465 | configs = prefixValues "cargo" crateConfigs; | ||
2466 | combined = lib.foldAttrs (a: b: a // b) {} [ mergedFeatures configs ]; | ||
2467 | onlyInCargo = | ||
2468 | builtins.attrNames | ||
2469 | (lib.filterAttrs (n: v: !(v ? "crate2nix") && (v ? "cargo")) combined); | ||
2470 | onlyInCrate2Nix = | ||
2471 | builtins.attrNames | ||
2472 | (lib.filterAttrs (n: v: (v ? "crate2nix") && !(v ? "cargo")) combined); | ||
2473 | differentFeatures = lib.filterAttrs | ||
2474 | ( | ||
2475 | n: v: | ||
2476 | (v ? "crate2nix") | ||
2477 | && (v ? "cargo") | ||
2478 | && (v.crate2nix.features or []) != (v."cargo".resolved_default_features or []) | ||
2479 | ) | ||
2480 | combined; | ||
2481 | in | ||
2482 | builtins.toJSON { | ||
2483 | inherit onlyInCargo onlyInCrate2Nix differentFeatures; | ||
2484 | }; | ||
2485 | |||
2486 | /* Returns an attrset mapping packageId to the list of enabled features. | ||
2487 | |||
2488 | If multiple paths to a dependency enable different features, the | ||
2489 | corresponding feature sets are merged. Features in rust are additive. | ||
2490 | */ | ||
2491 | mergePackageFeatures = | ||
2492 | { crateConfigs ? crates | ||
2493 | , packageId | ||
2494 | , rootPackageId ? packageId | ||
2495 | , features ? rootFeatures | ||
2496 | , dependencyPath ? [ crates.${packageId}.crateName ] | ||
2497 | , featuresByPackageId ? {} | ||
2498 | , target | ||
2499 | # Adds devDependencies to the crate with rootPackageId. | ||
2500 | , runTests ? false | ||
2501 | , ... | ||
2502 | } @ args: | ||
2503 | assert (builtins.isAttrs crateConfigs); | ||
2504 | assert (builtins.isString packageId); | ||
2505 | assert (builtins.isString rootPackageId); | ||
2506 | assert (builtins.isList features); | ||
2507 | assert (builtins.isList dependencyPath); | ||
2508 | assert (builtins.isAttrs featuresByPackageId); | ||
2509 | assert (builtins.isAttrs target); | ||
2510 | assert (builtins.isBool runTests); | ||
2511 | let | ||
2512 | crateConfig = crateConfigs."${packageId}" or (builtins.throw "Package not found: ${packageId}"); | ||
2513 | expandedFeatures = expandFeatures (crateConfig.features or {}) features; | ||
2514 | |||
2515 | depWithResolvedFeatures = dependency: | ||
2516 | let | ||
2517 | packageId = dependency.packageId; | ||
2518 | features = dependencyFeatures expandedFeatures dependency; | ||
2519 | in | ||
2520 | { inherit packageId features; }; | ||
2521 | |||
2522 | resolveDependencies = cache: path: dependencies: | ||
2523 | assert (builtins.isAttrs cache); | ||
2524 | assert (builtins.isList dependencies); | ||
2525 | let | ||
2526 | enabledDependencies = filterEnabledDependencies { | ||
2527 | inherit dependencies target; | ||
2528 | features = expandedFeatures; | ||
2529 | }; | ||
2530 | directDependencies = map depWithResolvedFeatures enabledDependencies; | ||
2531 | foldOverCache = op: lib.foldl op cache directDependencies; | ||
2532 | in | ||
2533 | foldOverCache | ||
2534 | ( | ||
2535 | cache: { packageId, features }: | ||
2536 | let | ||
2537 | cacheFeatures = cache.${packageId} or []; | ||
2538 | combinedFeatures = sortedUnique (cacheFeatures ++ features); | ||
2539 | in | ||
2540 | if cache ? ${packageId} && cache.${packageId} == combinedFeatures | ||
2541 | then cache | ||
2542 | else mergePackageFeatures { | ||
2543 | features = combinedFeatures; | ||
2544 | featuresByPackageId = cache; | ||
2545 | inherit crateConfigs packageId target runTests rootPackageId; | ||
2546 | } | ||
2547 | ); | ||
2548 | |||
2549 | cacheWithSelf = | ||
2550 | let | ||
2551 | cacheFeatures = featuresByPackageId.${packageId} or []; | ||
2552 | combinedFeatures = sortedUnique (cacheFeatures ++ expandedFeatures); | ||
2553 | in | ||
2554 | featuresByPackageId // { | ||
2555 | "${packageId}" = combinedFeatures; | ||
2556 | }; | ||
2557 | |||
2558 | cacheWithDependencies = | ||
2559 | resolveDependencies cacheWithSelf "dep" ( | ||
2560 | crateConfig.dependencies or [] | ||
2561 | ++ lib.optionals | ||
2562 | (runTests && packageId == rootPackageId) | ||
2563 | (crateConfig.devDependencies or []) | ||
2564 | ); | ||
2565 | |||
2566 | cacheWithAll = | ||
2567 | resolveDependencies | ||
2568 | cacheWithDependencies "build" | ||
2569 | (crateConfig.buildDependencies or []); | ||
2570 | in | ||
2571 | cacheWithAll; | ||
2572 | |||
2573 | /* Returns the enabled dependencies given the enabled features. */ | ||
2574 | filterEnabledDependencies = { dependencies, features, target }: | ||
2575 | assert (builtins.isList dependencies); | ||
2576 | assert (builtins.isList features); | ||
2577 | assert (builtins.isAttrs target); | ||
2578 | |||
2579 | lib.filter | ||
2580 | ( | ||
2581 | dep: | ||
2582 | let | ||
2583 | targetFunc = dep.target or (features: true); | ||
2584 | in | ||
2585 | targetFunc { inherit features target; } | ||
2586 | && ( | ||
2587 | !(dep.optional or false) | ||
2588 | || builtins.any (doesFeatureEnableDependency dep) features | ||
2589 | ) | ||
2590 | ) | ||
2591 | dependencies; | ||
2592 | |||
2593 | /* Returns whether the given feature should enable the given dependency. */ | ||
2594 | doesFeatureEnableDependency = { name, rename ? null, ... }: feature: | ||
2595 | let | ||
2596 | prefix = "${name}/"; | ||
2597 | len = builtins.stringLength prefix; | ||
2598 | startsWithPrefix = builtins.substring 0 len feature == prefix; | ||
2599 | in | ||
2600 | (rename == null && feature == name) | ||
2601 | || (rename != null && rename == feature) | ||
2602 | || startsWithPrefix; | ||
2603 | |||
2604 | /* Returns the expanded features for the given inputFeatures by applying the | ||
2605 | rules in featureMap. | ||
2606 | |||
2607 | featureMap is an attribute set which maps feature names to lists of further | ||
2608 | feature names to enable in case this feature is selected. | ||
2609 | */ | ||
2610 | expandFeatures = featureMap: inputFeatures: | ||
2611 | assert (builtins.isAttrs featureMap); | ||
2612 | assert (builtins.isList inputFeatures); | ||
2613 | let | ||
2614 | expandFeature = feature: | ||
2615 | assert (builtins.isString feature); | ||
2616 | [ feature ] ++ (expandFeatures featureMap (featureMap."${feature}" or [])); | ||
2617 | outFeatures = builtins.concatMap expandFeature inputFeatures; | ||
2618 | in | ||
2619 | sortedUnique outFeatures; | ||
2620 | |||
2621 | /* | ||
2622 | Returns the actual features for the given dependency. | ||
2623 | |||
2624 | features: The features of the crate that refers this dependency. | ||
2625 | */ | ||
2626 | dependencyFeatures = features: dependency: | ||
2627 | assert (builtins.isList features); | ||
2628 | assert (builtins.isAttrs dependency); | ||
2629 | let | ||
2630 | defaultOrNil = if dependency.usesDefaultFeatures or true | ||
2631 | then [ "default" ] | ||
2632 | else []; | ||
2633 | explicitFeatures = dependency.features or []; | ||
2634 | additionalDependencyFeatures = | ||
2635 | let | ||
2636 | dependencyPrefix = (dependency.rename or dependency.name) + "/"; | ||
2637 | dependencyFeatures = | ||
2638 | builtins.filter (f: lib.hasPrefix dependencyPrefix f) features; | ||
2639 | in | ||
2640 | builtins.map (lib.removePrefix dependencyPrefix) dependencyFeatures; | ||
2641 | in | ||
2642 | defaultOrNil ++ explicitFeatures ++ additionalDependencyFeatures; | ||
2643 | |||
2644 | /* Sorts and removes duplicates from a list of strings. */ | ||
2645 | sortedUnique = features: | ||
2646 | assert (builtins.isList features); | ||
2647 | assert (builtins.all builtins.isString features); | ||
2648 | let | ||
2649 | outFeaturesSet = lib.foldl (set: feature: set // { "${feature}" = 1; }) {} features; | ||
2650 | outFeaturesUnique = builtins.attrNames outFeaturesSet; | ||
2651 | in | ||
2652 | builtins.sort (a: b: a < b) outFeaturesUnique; | ||
2653 | |||
2654 | deprecationWarning = message: value: | ||
2655 | if strictDeprecation | ||
2656 | then builtins.throw "strictDeprecation enabled, aborting: ${message}" | ||
2657 | else builtins.trace message value; | ||
2658 | |||
2659 | # | ||
2660 | # crate2nix/default.nix (excerpt end) | ||
2661 | # | ||
2662 | |||
2663 | }; | ||
2664 | } | ||
diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..3eb3ef1 --- /dev/null +++ b/Cargo.toml | |||
@@ -0,0 +1,16 @@ | |||
1 | [package] | ||
2 | name = "hedge" | ||
3 | version = "0.1.0" | ||
4 | authors = ["Akshay <[email protected]>"] | ||
5 | edition = "2018" | ||
6 | |||
7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
8 | |||
9 | [dependencies] | ||
10 | hyper = "0.13" | ||
11 | tokio = { version = "0.2", features = ["full"] } | ||
12 | pretty_env_logger = "0.4" | ||
13 | futures-util = "0.3.5" | ||
14 | rusqlite = "0.24.0" | ||
15 | nanoid = "0.3.0" | ||
16 | url = "2.1.1" | ||
diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..fcc28fa --- /dev/null +++ b/default.nix | |||
@@ -0,0 +1,4 @@ | |||
1 | { pkgs ? import ./nix/nixpkgs.nix }: | ||
2 | |||
3 | let cargoNix = pkgs.callPackage ./Cargo.nix {}; | ||
4 | in cargoNix.rootCrate.build | ||
diff --git a/nix/nixpkgs.nix b/nix/nixpkgs.nix new file mode 100644 index 0000000..b5675fb --- /dev/null +++ b/nix/nixpkgs.nix | |||
@@ -0,0 +1,27 @@ | |||
1 | |||
2 | let | ||
3 | # Manage this with https://github.com/nmattia/niv | ||
4 | # or define { nixpkgs = ...; nixpkgs-mozilla = ...; } | ||
5 | # yourself. | ||
6 | sources = import ./sources.nix; | ||
7 | |||
8 | rustChannelsOverlay = import "${sources.nixpkgs-mozilla}/rust-overlay.nix"; | ||
9 | # Useful if you also want to provide that in a nix-shell since some rust tools depend | ||
10 | # on that. | ||
11 | rustChannelsSrcOverlay = import "${sources.nixpkgs-mozilla}/rust-src-overlay.nix"; | ||
12 | |||
13 | in import sources.nixpkgs { | ||
14 | overlays = [ | ||
15 | rustChannelsOverlay | ||
16 | rustChannelsSrcOverlay | ||
17 | (self: super: { | ||
18 | # Replace "latest.rustChannels.stable" with the version of the rust tools that | ||
19 | # you would like. Look at the documentation of nixpkgs-mozilla for examples. | ||
20 | # | ||
21 | # NOTE: "rust" instead of "rustc" is not a typo: It will include more than needed | ||
22 | # but also the much needed "rust-std". | ||
23 | rustc = super.latest.rustChannels.stable.rust; | ||
24 | inherit (super.latest.rustChannels.stable) cargo rust rust-fmt rust-std clippy; | ||
25 | }) | ||
26 | ]; | ||
27 | } | ||
diff --git a/nix/sources.json b/nix/sources.json new file mode 100644 index 0000000..0f22db7 --- /dev/null +++ b/nix/sources.json | |||
@@ -0,0 +1,50 @@ | |||
1 | { | ||
2 | "httpie": { | ||
3 | "branch": "master", | ||
4 | "description": "As easy as /aitch-tee-tee-pie/ 🥧 Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. https://twitter.com/clihttp", | ||
5 | "homepage": "https://httpie.org", | ||
6 | "owner": "httpie", | ||
7 | "repo": "httpie", | ||
8 | "rev": "100872b5cf493b355453a9dff89f39b0c124d524", | ||
9 | "sha256": "10raamh8ri4b4ir17avvlm5ckaly3755555is14glnfj70sdf25g", | ||
10 | "type": "tarball", | ||
11 | "url": "https://github.com/httpie/httpie/archive/100872b5cf493b355453a9dff89f39b0c124d524.tar.gz", | ||
12 | "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" | ||
13 | }, | ||
14 | "niv": { | ||
15 | "branch": "master", | ||
16 | "description": "Easy dependency management for Nix projects", | ||
17 | "homepage": "https://github.com/nmattia/niv", | ||
18 | "owner": "nmattia", | ||
19 | "repo": "niv", | ||
20 | "rev": "89ae775e9dfc2571f912156dd2f8627e14d4d507", | ||
21 | "sha256": "0ssw6byyn79fpyzswi28s5b85x66xh4xsfhmcfl5mkdxxpmyy0ns", | ||
22 | "type": "tarball", | ||
23 | "url": "https://github.com/nmattia/niv/archive/89ae775e9dfc2571f912156dd2f8627e14d4d507.tar.gz", | ||
24 | "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" | ||
25 | }, | ||
26 | "nixpkgs": { | ||
27 | "branch": "nixos-20.03", | ||
28 | "description": "A read-only mirror of NixOS/nixpkgs tracking the released channels. Send issues and PRs to", | ||
29 | "homepage": "https://github.com/NixOS/nixpkgs", | ||
30 | "owner": "NixOS", | ||
31 | "repo": "nixpkgs-channels", | ||
32 | "rev": "64fec31a24b50c774cdc45d4d7fa8d29b79dc165", | ||
33 | "sha256": "101vn3lf87xl9wbhc5qn1xmh13d3dpcass536c960fs3ghanf0h3", | ||
34 | "type": "tarball", | ||
35 | "url": "https://github.com/NixOS/nixpkgs-channels/archive/64fec31a24b50c774cdc45d4d7fa8d29b79dc165.tar.gz", | ||
36 | "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" | ||
37 | }, | ||
38 | "nixpkgs-mozilla": { | ||
39 | "branch": "master", | ||
40 | "description": "mozilla related nixpkgs (extends nixos/nixpkgs repo)", | ||
41 | "homepage": null, | ||
42 | "owner": "mozilla", | ||
43 | "repo": "nixpkgs-mozilla", | ||
44 | "rev": "efda5b357451dbb0431f983cca679ae3cd9b9829", | ||
45 | "sha256": "11wqrg86g3qva67vnk81ynvqyfj0zxk83cbrf0p9hsvxiwxs8469", | ||
46 | "type": "tarball", | ||
47 | "url": "https://github.com/mozilla/nixpkgs-mozilla/archive/efda5b357451dbb0431f983cca679ae3cd9b9829.tar.gz", | ||
48 | "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" | ||
49 | } | ||
50 | } | ||
diff --git a/nix/sources.nix b/nix/sources.nix new file mode 100644 index 0000000..8a725cb --- /dev/null +++ b/nix/sources.nix | |||
@@ -0,0 +1,134 @@ | |||
1 | # This file has been generated by Niv. | ||
2 | |||
3 | let | ||
4 | |||
5 | # | ||
6 | # The fetchers. fetch_<type> fetches specs of type <type>. | ||
7 | # | ||
8 | |||
9 | fetch_file = pkgs: spec: | ||
10 | if spec.builtin or true then | ||
11 | builtins_fetchurl { inherit (spec) url sha256; } | ||
12 | else | ||
13 | pkgs.fetchurl { inherit (spec) url sha256; }; | ||
14 | |||
15 | fetch_tarball = pkgs: spec: | ||
16 | if spec.builtin or true then | ||
17 | builtins_fetchTarball { inherit (spec) url sha256; } | ||
18 | else | ||
19 | pkgs.fetchzip { inherit (spec) url sha256; }; | ||
20 | |||
21 | fetch_git = spec: | ||
22 | builtins.fetchGit { url = spec.repo; inherit (spec) rev ref; }; | ||
23 | |||
24 | fetch_builtin-tarball = spec: | ||
25 | builtins.trace | ||
26 | '' | ||
27 | WARNING: | ||
28 | The niv type "builtin-tarball" will soon be deprecated. You should | ||
29 | instead use `builtin = true`. | ||
30 | |||
31 | $ niv modify <package> -a type=tarball -a builtin=true | ||
32 | '' | ||
33 | builtins_fetchTarball { inherit (spec) url sha256; }; | ||
34 | |||
35 | fetch_builtin-url = spec: | ||
36 | builtins.trace | ||
37 | '' | ||
38 | WARNING: | ||
39 | The niv type "builtin-url" will soon be deprecated. You should | ||
40 | instead use `builtin = true`. | ||
41 | |||
42 | $ niv modify <package> -a type=file -a builtin=true | ||
43 | '' | ||
44 | (builtins_fetchurl { inherit (spec) url sha256; }); | ||
45 | |||
46 | # | ||
47 | # Various helpers | ||
48 | # | ||
49 | |||
50 | # The set of packages used when specs are fetched using non-builtins. | ||
51 | mkPkgs = sources: | ||
52 | let | ||
53 | sourcesNixpkgs = | ||
54 | import (builtins_fetchTarball { inherit (sources.nixpkgs) url sha256; }) {}; | ||
55 | hasNixpkgsPath = builtins.any (x: x.prefix == "nixpkgs") builtins.nixPath; | ||
56 | hasThisAsNixpkgsPath = <nixpkgs> == ./.; | ||
57 | in | ||
58 | if builtins.hasAttr "nixpkgs" sources | ||
59 | then sourcesNixpkgs | ||
60 | else if hasNixpkgsPath && ! hasThisAsNixpkgsPath then | ||
61 | import <nixpkgs> {} | ||
62 | else | ||
63 | abort | ||
64 | '' | ||
65 | Please specify either <nixpkgs> (through -I or NIX_PATH=nixpkgs=...) or | ||
66 | add a package called "nixpkgs" to your sources.json. | ||
67 | ''; | ||
68 | |||
69 | # The actual fetching function. | ||
70 | fetch = pkgs: name: spec: | ||
71 | |||
72 | if ! builtins.hasAttr "type" spec then | ||
73 | abort "ERROR: niv spec ${name} does not have a 'type' attribute" | ||
74 | else if spec.type == "file" then fetch_file pkgs spec | ||
75 | else if spec.type == "tarball" then fetch_tarball pkgs spec | ||
76 | else if spec.type == "git" then fetch_git spec | ||
77 | else if spec.type == "builtin-tarball" then fetch_builtin-tarball spec | ||
78 | else if spec.type == "builtin-url" then fetch_builtin-url spec | ||
79 | else | ||
80 | abort "ERROR: niv spec ${name} has unknown type ${builtins.toJSON spec.type}"; | ||
81 | |||
82 | # Ports of functions for older nix versions | ||
83 | |||
84 | # a Nix version of mapAttrs if the built-in doesn't exist | ||
85 | mapAttrs = builtins.mapAttrs or ( | ||
86 | f: set: with builtins; | ||
87 | listToAttrs (map (attr: { name = attr; value = f attr set.${attr}; }) (attrNames set)) | ||
88 | ); | ||
89 | |||
90 | # fetchTarball version that is compatible between all the versions of Nix | ||
91 | builtins_fetchTarball = { url, sha256 }@attrs: | ||
92 | let | ||
93 | inherit (builtins) lessThan nixVersion fetchTarball; | ||
94 | in | ||
95 | if lessThan nixVersion "1.12" then | ||
96 | fetchTarball { inherit url; } | ||
97 | else | ||
98 | fetchTarball attrs; | ||
99 | |||
100 | # fetchurl version that is compatible between all the versions of Nix | ||
101 | builtins_fetchurl = { url, sha256 }@attrs: | ||
102 | let | ||
103 | inherit (builtins) lessThan nixVersion fetchurl; | ||
104 | in | ||
105 | if lessThan nixVersion "1.12" then | ||
106 | fetchurl { inherit url; } | ||
107 | else | ||
108 | fetchurl attrs; | ||
109 | |||
110 | # Create the final "sources" from the config | ||
111 | mkSources = config: | ||
112 | mapAttrs ( | ||
113 | name: spec: | ||
114 | if builtins.hasAttr "outPath" spec | ||
115 | then abort | ||
116 | "The values in sources.json should not have an 'outPath' attribute" | ||
117 | else | ||
118 | spec // { outPath = fetch config.pkgs name spec; } | ||
119 | ) config.sources; | ||
120 | |||
121 | # The "config" used by the fetchers | ||
122 | mkConfig = | ||
123 | { sourcesFile ? ./sources.json | ||
124 | , sources ? builtins.fromJSON (builtins.readFile sourcesFile) | ||
125 | , pkgs ? mkPkgs sources | ||
126 | }: rec { | ||
127 | # The sources, i.e. the attribute set of spec name to spec | ||
128 | inherit sources; | ||
129 | |||
130 | # The "pkgs" (evaluated nixpkgs) to use for e.g. non-builtin fetchers | ||
131 | inherit pkgs; | ||
132 | }; | ||
133 | in | ||
134 | mkSources (mkConfig {}) // { __functor = _: settings: mkSources (mkConfig settings); } | ||
diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..580f53e --- /dev/null +++ b/shell.nix | |||
@@ -0,0 +1,15 @@ | |||
1 | { | ||
2 | nixpkgs ? ./nix/nixpkgs.nix | ||
3 | , pkgs ? import nixpkgs | ||
4 | }: | ||
5 | |||
6 | pkgs.mkShell { | ||
7 | buildInputs = [ | ||
8 | pkgs.cargo | ||
9 | pkgs.rustc | ||
10 | pkgs.git | ||
11 | pkgs.shellcheck | ||
12 | pkgs.sqlite | ||
13 | pkgs.httpie | ||
14 | ]; | ||
15 | } | ||
diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..801da3c --- /dev/null +++ b/src/main.rs | |||
@@ -0,0 +1,97 @@ | |||
1 | use futures_util::TryStreamExt; | ||
2 | use hyper::service::{make_service_fn, service_fn}; | ||
3 | use hyper::{Body, Method, Request, Response, Server, StatusCode}; | ||
4 | use nanoid::nanoid; | ||
5 | use rusqlite::{params, Connection, OpenFlags, Result, NO_PARAMS}; | ||
6 | use url::form_urlencoded; | ||
7 | |||
8 | use std::collections::HashMap; | ||
9 | use std::path::{Path, PathBuf}; | ||
10 | use std::str::from_utf8; | ||
11 | |||
12 | fn shorten<S: AsRef<str>>(url: S, conn: &mut Connection) -> Result<String> { | ||
13 | let mut stmt = conn.prepare("select * from urls where link = ?1")?; | ||
14 | let mut rows = stmt.query(params![url.as_ref().to_string()])?; | ||
15 | if let Some(row) = rows.next()? { | ||
16 | return row.get(1); | ||
17 | } else { | ||
18 | let new_id = nanoid!(4); | ||
19 | conn.execute( | ||
20 | "insert into urls (link, shortlink) values (?1, ?2)", | ||
21 | params![url.as_ref().to_string(), new_id], | ||
22 | )?; | ||
23 | return Ok(new_id); | ||
24 | } | ||
25 | } | ||
26 | |||
27 | fn get_link<S: AsRef<str>>(url: S, conn: &mut Connection) -> Result<Option<String>> { | ||
28 | eprintln!("{}", url.as_ref()); | ||
29 | let url = url.as_ref(); | ||
30 | let mut stmt = conn.prepare("select * from urls where shortlink = ?1")?; | ||
31 | let mut rows = stmt.query(params![url.to_string()])?; | ||
32 | if let Some(row) = rows.next()? { | ||
33 | return Ok(row.get(0)?); | ||
34 | } else { | ||
35 | return Ok(None); | ||
36 | } | ||
37 | } | ||
38 | |||
39 | async fn shortner_service(req: Request<Body>) -> Result<Response<Body>, hyper::Error> { | ||
40 | let mut conn = init_db("./urls.db_3").unwrap(); | ||
41 | |||
42 | match req.method() { | ||
43 | &Method::POST => { | ||
44 | let b = hyper::body::to_bytes(req).await?; | ||
45 | let params = form_urlencoded::parse(b.as_ref()) | ||
46 | .into_owned() | ||
47 | .collect::<HashMap<String, String>>(); | ||
48 | |||
49 | if let Some(n) = params.get("shorten") { | ||
50 | let shortlink = shorten(n, &mut conn).unwrap(); | ||
51 | return Ok(Response::new(Body::from(shortlink))); | ||
52 | } else { | ||
53 | return Ok(Response::new(Body::from("invalid form"))); | ||
54 | }; | ||
55 | } | ||
56 | &Method::GET => { | ||
57 | let shortlink = req.uri().path().to_string(); | ||
58 | let link = get_link(&shortlink[1..], &mut conn); | ||
59 | if let Some(l) = link.unwrap() { | ||
60 | return Ok(Response::new(Body::from(l))); | ||
61 | } else { | ||
62 | return Ok(Response::new(Body::from("not found!"))); | ||
63 | } | ||
64 | } | ||
65 | _ => unimplemented!(), | ||
66 | } | ||
67 | } | ||
68 | |||
69 | fn init_db<P: AsRef<Path>>(p: P) -> Result<Connection> { | ||
70 | let conn = Connection::open_with_flags( | ||
71 | p, | ||
72 | OpenFlags::SQLITE_OPEN_CREATE | OpenFlags::SQLITE_OPEN_READ_WRITE, | ||
73 | )?; | ||
74 | conn.execute( | ||
75 | "CREATE TABLE IF NOT EXISTS urls ( | ||
76 | link TEXT PRIMARY KEY, | ||
77 | shortlink TEXT NOT NULL | ||
78 | )", | ||
79 | params![], | ||
80 | )?; | ||
81 | return Ok(conn); | ||
82 | } | ||
83 | |||
84 | #[tokio::main] | ||
85 | async fn main() -> Result<()> { | ||
86 | let addr = ([127, 0, 0, 1], 3000).into(); | ||
87 | |||
88 | let service = | ||
89 | make_service_fn(|_| async { Ok::<_, hyper::Error>(service_fn(shortner_service)) }); | ||
90 | |||
91 | let server = Server::bind(&addr).serve(service); | ||
92 | |||
93 | println!("Listening on http://{}", addr); | ||
94 | |||
95 | server.await.unwrap(); | ||
96 | Ok(()) | ||
97 | } | ||