From 0844fd45b4d77e3f7f1cece76cc232979ad20b8f Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 23 Aug 2020 13:04:34 +0530 Subject: untrack Cargo.nix --- Cargo.nix | 2664 ------------------------------------------------------------- 1 file changed, 2664 deletions(-) delete mode 100644 Cargo.nix diff --git a/Cargo.nix b/Cargo.nix deleted file mode 100644 index 0d06dc6..0000000 --- a/Cargo.nix +++ /dev/null @@ -1,2664 +0,0 @@ - -# This file was @generated by crate2nix 0.8.0 with the command: -# "generate" -# See https://github.com/kolloch/crate2nix for more info. - -{ nixpkgs ? -, pkgs ? import nixpkgs { config = {}; } -, lib ? pkgs.lib -, stdenv ? pkgs.stdenv -, buildRustCrate ? pkgs.buildRustCrate - # This is used as the `crateOverrides` argument for `buildRustCrate`. -, defaultCrateOverrides ? pkgs.defaultCrateOverrides - # The features to enable for the root_crate or the workspace_members. -, rootFeatures ? [ "default" ] - # If true, throw errors instead of issueing deprecation warnings. -, strictDeprecation ? false - # Whether to perform release builds: longer compile times, faster binaries. -, release ? true -}: - -rec { - # - # "public" attributes that we attempt to keep stable with new versions of crate2nix. - # - - rootCrate = rec { - packageId = "hedge"; - - # Use this attribute to refer to the derivation building your root crate package. - # You can override the features with rootCrate.build.override { features = [ "default" "feature1" ... ]; }. - build = internal.buildRustCrateWithFeatures { - inherit packageId; - }; - - # Debug support which might change between releases. - # File a bug if you depend on any for non-debug work! - debug = internal.debugCrate { inherit packageId; }; - }; - root_crate = - internal.deprecationWarning - "root_crate is deprecated since crate2nix 0.4. Please use rootCrate instead." - rootCrate.build; - # Refer your crate build derivation by name here. - # You can override the features with - # workspaceMembers."${crateName}".build.override { features = [ "default" "feature1" ... ]; }. - workspaceMembers = { - "hedge" = rec { - packageId = "hedge"; - build = internal.buildRustCrateWithFeatures { - packageId = "hedge"; - }; - - # Debug support which might change between releases. - # File a bug if you depend on any for non-debug work! - debug = internal.debugCrate { inherit packageId; }; - }; - }; - workspace_members = - internal.deprecationWarning - "workspace_members is deprecated in crate2nix 0.4. Please use workspaceMembers instead." - lib.mapAttrs (n: v: v.build) workspaceMembers; - - # - # "internal" ("private") attributes that may change in every new version of crate2nix. - # - - internal = rec { - # Build and dependency information for crates. - # Many of the fields are passed one-to-one to buildRustCrate. - # - # Noteworthy: - # * `dependencies`/`buildDependencies`: similar to the corresponding fields for buildRustCrate. - # but with additional information which is used during dependency/feature resolution. - # * `resolvedDependencies`: the selected default features reported by cargo - only included for debugging. - # * `devDependencies` as of now not used by `buildRustCrate` but used to - # inject test dependencies into the build - - crates = { - "aho-corasick" = rec { - crateName = "aho-corasick"; - version = "0.7.13"; - edition = "2015"; - sha256 = "11hfmqf90rdvjdpk0x1lixw1s9n08y3fxfy9zqsk0k2wpbc68c84"; - libName = "aho_corasick"; - authors = [ - "Andrew Gallant " - ]; - dependencies = [ - { - name = "memchr"; - packageId = "memchr"; - usesDefaultFeatures = false; - } - ]; - features = { - "default" = [ "std" ]; - "std" = [ "memchr/use_std" ]; - }; - resolvedDefaultFeatures = [ "default" "std" ]; - }; - "arc-swap" = rec { - crateName = "arc-swap"; - version = "0.4.7"; - edition = "2015"; - sha256 = "0d2hqwpkkz7jflrf3ziy5gpblix0h72x1yalls01a15qss7xh9ad"; - authors = [ - "Michal 'vorner' Vaner " - ]; - features = { - }; - }; - "atty" = rec { - crateName = "atty"; - version = "0.2.14"; - edition = "2015"; - sha256 = "1s7yslcs6a28c5vz7jwj63lkfgyx8mx99fdirlhi9lbhhzhrpcyr"; - authors = [ - "softprops " - ]; - dependencies = [ - { - name = "hermit-abi"; - packageId = "hermit-abi"; - target = { target, features }: (target."os" == "hermit"); - } - { - name = "libc"; - packageId = "libc"; - usesDefaultFeatures = false; - target = { target, features }: target."unix"; - } - { - name = "winapi"; - packageId = "winapi 0.3.9"; - target = { target, features }: target."windows"; - features = [ "consoleapi" "processenv" "minwinbase" "minwindef" "winbase" ]; - } - ]; - - }; - "autocfg" = rec { - crateName = "autocfg"; - version = "1.0.1"; - edition = "2015"; - sha256 = "0jj6i9zn4gjl03kjvziqdji6rwx8ykz8zk2ngpc331z2g3fk3c6d"; - authors = [ - "Josh Stone " - ]; - - }; - "bitflags" = rec { - crateName = "bitflags"; - version = "1.2.1"; - edition = "2015"; - sha256 = "14qnd5nq8p2almk79m4m8ydqhd413yaxsyjp5xd19g3mikzf47fg"; - authors = [ - "The Rust Project Developers" - ]; - features = { - }; - resolvedDefaultFeatures = [ "default" ]; - }; - "bytes" = rec { - crateName = "bytes"; - version = "0.5.6"; - edition = "2018"; - sha256 = "0f5s7xq6qzmdh22ygsy8v0sp02m51y0radvq4i4y8cizy1lfqk0f"; - authors = [ - "Carl Lerche " - "Sean McArthur " - ]; - features = { - "default" = [ "std" ]; - }; - resolvedDefaultFeatures = [ "default" "std" ]; - }; - "cfg-if" = rec { - crateName = "cfg-if"; - version = "0.1.10"; - edition = "2018"; - sha256 = "08h80ihs74jcyp24cd75wwabygbbdgl05k6p5dmq8akbr78vv1a7"; - authors = [ - "Alex Crichton " - ]; - features = { - "rustc-dep-of-std" = [ "core" "compiler_builtins" ]; - }; - }; - "env_logger" = rec { - crateName = "env_logger"; - version = "0.7.1"; - edition = "2018"; - sha256 = "0djx8h8xfib43g5w94r1m1mkky5spcw4wblzgnhiyg5vnfxknls4"; - authors = [ - "The Rust Project Developers" - ]; - dependencies = [ - { - name = "atty"; - packageId = "atty"; - optional = true; - } - { - name = "humantime"; - packageId = "humantime"; - optional = true; - } - { - name = "log"; - packageId = "log"; - features = [ "std" ]; - } - { - name = "regex"; - packageId = "regex"; - optional = true; - } - { - name = "termcolor"; - packageId = "termcolor"; - optional = true; - } - ]; - features = { - "default" = [ "termcolor" "atty" "humantime" "regex" ]; - }; - resolvedDefaultFeatures = [ "atty" "default" "humantime" "regex" "termcolor" ]; - }; - "fallible-iterator" = rec { - crateName = "fallible-iterator"; - version = "0.2.0"; - edition = "2018"; - sha256 = "1xq759lsr8gqss7hva42azn3whgrbrs2sd9xpn92c5ickxm1fhs4"; - authors = [ - "Steven Fackler " - ]; - features = { - "default" = [ "std" ]; - }; - resolvedDefaultFeatures = [ "default" "std" ]; - }; - "fallible-streaming-iterator" = rec { - crateName = "fallible-streaming-iterator"; - version = "0.1.9"; - edition = "2015"; - sha256 = "0nj6j26p71bjy8h42x6jahx1hn0ng6mc2miwpgwnp8vnwqf4jq3k"; - authors = [ - "Steven Fackler " - ]; - features = { - }; - }; - "fnv" = rec { - crateName = "fnv"; - version = "1.0.7"; - edition = "2015"; - sha256 = "1hc2mcqha06aibcaza94vbi81j6pr9a1bbxrxjfhc91zin8yr7iz"; - libPath = "lib.rs"; - authors = [ - "Alex Crichton " - ]; - features = { - "default" = [ "std" ]; - }; - resolvedDefaultFeatures = [ "default" "std" ]; - }; - "fuchsia-zircon" = rec { - crateName = "fuchsia-zircon"; - version = "0.3.3"; - edition = "2015"; - sha256 = "10jxc5ks1x06gpd0xg51kcjrxr35nj6qhx2zlc5n7bmskv3675rf"; - authors = [ - "Raph Levien " - ]; - dependencies = [ - { - name = "bitflags"; - packageId = "bitflags"; - } - { - name = "fuchsia-zircon-sys"; - packageId = "fuchsia-zircon-sys"; - } - ]; - - }; - "fuchsia-zircon-sys" = rec { - crateName = "fuchsia-zircon-sys"; - version = "0.3.3"; - edition = "2015"; - sha256 = "19zp2085qsyq2bh1gvcxq1lb8w6v6jj9kbdkhpdjrl95fypakjix"; - authors = [ - "Raph Levien " - ]; - - }; - "futures-channel" = rec { - crateName = "futures-channel"; - version = "0.3.5"; - edition = "2018"; - sha256 = "1mb756zxpgrsr0lxkgl358jlpyrwi0i68pnrasj6pjlcq9sasrpk"; - authors = [ - "Alex Crichton " - ]; - dependencies = [ - { - name = "futures-core"; - packageId = "futures-core"; - usesDefaultFeatures = false; - } - ]; - features = { - "alloc" = [ "futures-core/alloc" ]; - "cfg-target-has-atomic" = [ "futures-core/cfg-target-has-atomic" ]; - "default" = [ "std" ]; - "sink" = [ "futures-sink" ]; - "std" = [ "alloc" "futures-core/std" ]; - "unstable" = [ "futures-core/unstable" ]; - }; - resolvedDefaultFeatures = [ "alloc" "default" "std" ]; - }; - "futures-core" = rec { - crateName = "futures-core"; - version = "0.3.5"; - edition = "2018"; - sha256 = "16d35ic4b4dkv1gy39cvy2v4391b9014hrxd6vwp3nfm1zwzzxar"; - authors = [ - "Alex Crichton " - ]; - features = { - "default" = [ "std" ]; - "std" = [ "alloc" ]; - }; - resolvedDefaultFeatures = [ "alloc" "default" "std" ]; - }; - "futures-macro" = rec { - crateName = "futures-macro"; - version = "0.3.5"; - edition = "2018"; - sha256 = "0f8d4kmdxx0h7nca90zdpnbk429w6d3w8dw2hxrm9ar88c5a7dfh"; - procMacro = true; - authors = [ - "Taylor Cramer " - "Taiki Endo " - ]; - dependencies = [ - { - name = "proc-macro-hack"; - packageId = "proc-macro-hack"; - } - { - name = "proc-macro2"; - packageId = "proc-macro2"; - } - { - name = "quote"; - packageId = "quote"; - } - { - name = "syn"; - packageId = "syn"; - features = [ "full" ]; - } - ]; - - }; - "futures-sink" = rec { - crateName = "futures-sink"; - version = "0.3.5"; - edition = "2018"; - sha256 = "1k4azaq6x7g9kmpvc91vx5w541y4p340rkl5bnhcfd5p7j4k481z"; - authors = [ - "Alex Crichton " - ]; - features = { - "default" = [ "std" ]; - "std" = [ "alloc" ]; - }; - resolvedDefaultFeatures = [ "alloc" "default" "std" ]; - }; - "futures-task" = rec { - crateName = "futures-task"; - version = "0.3.5"; - edition = "2018"; - sha256 = "09m647nghwsg46ckys2846jfga6fbdwgfc08mfqij87215gnpdmx"; - authors = [ - "Alex Crichton " - ]; - dependencies = [ - { - name = "once_cell"; - packageId = "once_cell"; - optional = true; - usesDefaultFeatures = false; - features = [ "std" ]; - } - ]; - features = { - "default" = [ "std" ]; - "std" = [ "alloc" "once_cell" ]; - }; - resolvedDefaultFeatures = [ "alloc" "once_cell" "std" ]; - }; - "futures-util" = rec { - crateName = "futures-util"; - version = "0.3.5"; - edition = "2018"; - sha256 = "1iijrqcamgll0h0r6ww9mh3ln4292c1wghw28h41lw4by17mfr47"; - authors = [ - "Alex Crichton " - ]; - dependencies = [ - { - name = "futures-core"; - packageId = "futures-core"; - usesDefaultFeatures = false; - } - { - name = "futures-macro"; - packageId = "futures-macro"; - optional = true; - usesDefaultFeatures = false; - } - { - name = "futures-task"; - packageId = "futures-task"; - usesDefaultFeatures = false; - } - { - name = "pin-project"; - packageId = "pin-project"; - } - { - name = "pin-utils"; - packageId = "pin-utils"; - } - { - name = "proc-macro-hack"; - packageId = "proc-macro-hack"; - optional = true; - } - { - name = "proc-macro-nested"; - packageId = "proc-macro-nested"; - optional = true; - } - { - name = "slab"; - packageId = "slab"; - optional = true; - } - ]; - features = { - "alloc" = [ "futures-core/alloc" "futures-task/alloc" ]; - "async-await-macro" = [ "async-await" "futures-macro" "proc-macro-hack" "proc-macro-nested" ]; - "cfg-target-has-atomic" = [ "futures-core/cfg-target-has-atomic" "futures-task/cfg-target-has-atomic" ]; - "channel" = [ "std" "futures-channel" ]; - "compat" = [ "std" "futures_01" ]; - "default" = [ "std" "async-await" "async-await-macro" ]; - "io" = [ "std" "futures-io" "memchr" ]; - "io-compat" = [ "io" "compat" "tokio-io" ]; - "read-initializer" = [ "io" "futures-io/read-initializer" "futures-io/unstable" ]; - "sink" = [ "futures-sink" ]; - "std" = [ "alloc" "futures-core/std" "futures-task/std" "slab" ]; - "unstable" = [ "futures-core/unstable" "futures-task/unstable" ]; - "write-all-vectored" = [ "io" ]; - }; - resolvedDefaultFeatures = [ "alloc" "async-await" "async-await-macro" "default" "futures-macro" "proc-macro-hack" "proc-macro-nested" "slab" "std" ]; - }; - "h2" = rec { - crateName = "h2"; - version = "0.2.6"; - edition = "2018"; - sha256 = "0lvdrzn43iikl521dlrb7z96lsmy7l6nnm35ylf00q7dmq5rwgwr"; - authors = [ - "Carl Lerche " - "Sean McArthur " - ]; - dependencies = [ - { - name = "bytes"; - packageId = "bytes"; - } - { - name = "fnv"; - packageId = "fnv"; - } - { - name = "futures-core"; - packageId = "futures-core"; - usesDefaultFeatures = false; - } - { - name = "futures-sink"; - packageId = "futures-sink"; - usesDefaultFeatures = false; - } - { - name = "futures-util"; - packageId = "futures-util"; - usesDefaultFeatures = false; - } - { - name = "http"; - packageId = "http"; - } - { - name = "indexmap"; - packageId = "indexmap"; - } - { - name = "slab"; - packageId = "slab"; - } - { - name = "tokio"; - packageId = "tokio"; - features = [ "io-util" ]; - } - { - name = "tokio-util"; - packageId = "tokio-util"; - features = [ "codec" ]; - } - { - name = "tracing"; - packageId = "tracing"; - usesDefaultFeatures = false; - features = [ "std" "log" ]; - } - ]; - devDependencies = [ - { - name = "tokio"; - packageId = "tokio"; - features = [ "dns" "macros" "rt-core" "sync" "tcp" ]; - } - ]; - features = { - }; - }; - "hashbrown" = rec { - crateName = "hashbrown"; - version = "0.8.2"; - edition = "2018"; - sha256 = "09cckr5l71ypvfdbvv1qsag4222blixwn9300hpbr831j3vn46z9"; - authors = [ - "Amanieu d'Antras " - ]; - buildDependencies = [ - { - name = "autocfg"; - packageId = "autocfg"; - } - ]; - features = { - "ahash-compile-time-rng" = [ "ahash/compile-time-rng" ]; - "default" = [ "ahash" "inline-more" ]; - "rustc-dep-of-std" = [ "nightly" "core" "compiler_builtins" "alloc" "rustc-internal-api" ]; - }; - resolvedDefaultFeatures = [ "raw" ]; - }; - "hedge" = rec { - crateName = "hedge"; - version = "0.1.0"; - edition = "2018"; - crateBin = [ - { name = "hedge"; path = "src/main.rs"; } - ]; - src = (builtins.filterSource sourceFilter ./.); - authors = [ - "Akshay " - ]; - dependencies = [ - { - name = "futures-util"; - packageId = "futures-util"; - } - { - name = "hyper"; - packageId = "hyper"; - } - { - name = "pretty_env_logger"; - packageId = "pretty_env_logger"; - } - { - name = "rusqlite"; - packageId = "rusqlite"; - } - { - name = "tokio"; - packageId = "tokio"; - features = [ "full" ]; - } - ]; - - }; - "hermit-abi" = rec { - crateName = "hermit-abi"; - version = "0.1.15"; - edition = "2018"; - sha256 = "1ac5bij39rhzs8zngfxi109dh0h3v0jl5ng8595f9yg7nsbd3vix"; - authors = [ - "Stefan Lankes" - ]; - dependencies = [ - { - name = "libc"; - packageId = "libc"; - usesDefaultFeatures = false; - } - ]; - features = { - "rustc-dep-of-std" = [ "core" "compiler_builtins/rustc-dep-of-std" "libc/rustc-dep-of-std" ]; - }; - resolvedDefaultFeatures = [ "default" ]; - }; - "http" = rec { - crateName = "http"; - version = "0.2.1"; - edition = "2018"; - sha256 = "1y827q7j0gvs8z2x12biaik9db6nb902lpqv889cbcj84sbnkm98"; - authors = [ - "Alex Crichton " - "Carl Lerche " - "Sean McArthur " - ]; - dependencies = [ - { - name = "bytes"; - packageId = "bytes"; - } - { - name = "fnv"; - packageId = "fnv"; - } - { - name = "itoa"; - packageId = "itoa"; - } - ]; - - }; - "http-body" = rec { - crateName = "http-body"; - version = "0.3.1"; - edition = "2018"; - sha256 = "06qi0ni45lb92w3ml260c0bxbq5zd4snjmz0a9k69xq6021zzm8k"; - authors = [ - "Carl Lerche " - "Lucio Franco " - "Sean McArthur " - ]; - dependencies = [ - { - name = "bytes"; - packageId = "bytes"; - } - { - name = "http"; - packageId = "http"; - } - ]; - - }; - "httparse" = rec { - crateName = "httparse"; - version = "1.3.4"; - edition = "2015"; - sha256 = "1yf23ldnjwfkkhkca7f4w15mky9961gjz28dlwyybhphc7l9l5yd"; - authors = [ - "Sean McArthur " - ]; - features = { - "default" = [ "std" ]; - }; - resolvedDefaultFeatures = [ "default" "std" ]; - }; - "humantime" = rec { - crateName = "humantime"; - version = "1.3.0"; - edition = "2015"; - sha256 = "0krwgbf35pd46xvkqg14j070vircsndabahahlv3rwhflpy4q06z"; - authors = [ - "Paul Colomiets " - ]; - dependencies = [ - { - name = "quick-error"; - packageId = "quick-error"; - } - ]; - - }; - "hyper" = rec { - crateName = "hyper"; - version = "0.13.7"; - edition = "2018"; - sha256 = "1symcnba2y03b8lj6xp2wd994lk3xyk3wizacjg5s60njzfshs1y"; - authors = [ - "Sean McArthur " - ]; - dependencies = [ - { - name = "bytes"; - packageId = "bytes"; - } - { - name = "futures-channel"; - packageId = "futures-channel"; - } - { - name = "futures-core"; - packageId = "futures-core"; - usesDefaultFeatures = false; - } - { - name = "futures-util"; - packageId = "futures-util"; - usesDefaultFeatures = false; - } - { - name = "h2"; - packageId = "h2"; - } - { - name = "http"; - packageId = "http"; - } - { - name = "http-body"; - packageId = "http-body"; - } - { - name = "httparse"; - packageId = "httparse"; - } - { - name = "itoa"; - packageId = "itoa"; - } - { - name = "pin-project"; - packageId = "pin-project"; - } - { - name = "socket2"; - packageId = "socket2"; - optional = true; - } - { - name = "time"; - packageId = "time"; - } - { - name = "tokio"; - packageId = "tokio"; - features = [ "sync" ]; - } - { - name = "tower-service"; - packageId = "tower-service"; - } - { - name = "tracing"; - packageId = "tracing"; - usesDefaultFeatures = false; - features = [ "log" "std" ]; - } - { - name = "want"; - packageId = "want"; - } - ]; - devDependencies = [ - { - name = "futures-util"; - packageId = "futures-util"; - usesDefaultFeatures = false; - features = [ "alloc" ]; - } - { - name = "tokio"; - packageId = "tokio"; - features = [ "fs" "macros" "io-std" "rt-util" "sync" "time" "test-util" ]; - } - ]; - features = { - "default" = [ "runtime" "stream" ]; - "runtime" = [ "tcp" "tokio/rt-core" ]; - "tcp" = [ "socket2" "tokio/blocking" "tokio/tcp" "tokio/time" ]; - }; - resolvedDefaultFeatures = [ "default" "runtime" "socket2" "stream" "tcp" ]; - }; - "indexmap" = rec { - crateName = "indexmap"; - version = "1.5.1"; - edition = "2018"; - sha256 = "1y9dmqbwpgh86qqpnb99mllbvlvri39xb3vkz4dv2xkcn5cmxd46"; - authors = [ - "bluss" - "Josh Stone " - ]; - dependencies = [ - { - name = "hashbrown"; - packageId = "hashbrown"; - usesDefaultFeatures = false; - features = [ "raw" ]; - } - ]; - buildDependencies = [ - { - name = "autocfg"; - packageId = "autocfg"; - } - ]; - features = { - "serde-1" = [ "serde" ]; - }; - }; - "iovec" = rec { - crateName = "iovec"; - version = "0.1.4"; - edition = "2015"; - sha256 = "0ph73qygwx8i0mblrf110cj59l00gkmsgrpzz1rm85syz5pymcxj"; - authors = [ - "Carl Lerche " - ]; - dependencies = [ - { - name = "libc"; - packageId = "libc"; - target = { target, features }: target."unix"; - } - ]; - - }; - "itoa" = rec { - crateName = "itoa"; - version = "0.4.6"; - edition = "2015"; - sha256 = "1rnpb7rr8df76gnlk07b9086cn7fc0dxxy1ghh00q6nip7bklvyw"; - authors = [ - "David Tolnay " - ]; - features = { - "default" = [ "std" ]; - }; - resolvedDefaultFeatures = [ "default" "std" ]; - }; - "kernel32-sys" = rec { - crateName = "kernel32-sys"; - version = "0.2.2"; - edition = "2015"; - sha256 = "1389av0601a9yz8dvx5zha9vmkd6ik7ax0idpb032d28555n41vm"; - libName = "kernel32"; - authors = [ - "Peter Atashian " - ]; - dependencies = [ - { - name = "winapi"; - packageId = "winapi 0.2.8"; - } - ]; - buildDependencies = [ - { - name = "winapi-build"; - packageId = "winapi-build"; - } - ]; - - }; - "lazy_static" = rec { - crateName = "lazy_static"; - version = "1.4.0"; - edition = "2015"; - sha256 = "0in6ikhw8mgl33wjv6q6xfrb5b9jr16q8ygjy803fay4zcisvaz2"; - authors = [ - "Marvin Löbel " - ]; - features = { - "spin_no_std" = [ "spin" ]; - }; - }; - "libc" = rec { - crateName = "libc"; - version = "0.2.76"; - edition = "2015"; - sha256 = "1hvv01y8cjlkg6xqgvflgq4p77p15a83w6xxpcggmrj4w3x5cm3m"; - authors = [ - "The Rust Project Developers" - ]; - features = { - "default" = [ "std" ]; - "rustc-dep-of-std" = [ "align" "rustc-std-workspace-core" ]; - "use_std" = [ "std" ]; - }; - resolvedDefaultFeatures = [ "default" "std" ]; - }; - "libsqlite3-sys" = rec { - crateName = "libsqlite3-sys"; - version = "0.20.0"; - edition = "2018"; - sha256 = "1nzm07nrqgz28pld0qc4mfhr96inkzdfn9vfyj8w41hv9fc4b8p3"; - authors = [ - "The rusqlite developers" - ]; - buildDependencies = [ - { - name = "pkg-config"; - packageId = "pkg-config"; - optional = true; - } - { - name = "vcpkg"; - packageId = "vcpkg"; - optional = true; - target = {target, features}: (target."env" == "msvc"); - } - ]; - features = { - "buildtime_bindgen" = [ "bindgen" "pkg-config" "vcpkg" ]; - "bundled" = [ "cc" "bundled_bindings" ]; - "bundled-windows" = [ "cc" "bundled_bindings" ]; - "default" = [ "min_sqlite_version_3_6_8" ]; - "min_sqlite_version_3_6_23" = [ "pkg-config" "vcpkg" ]; - "min_sqlite_version_3_6_8" = [ "pkg-config" "vcpkg" ]; - "min_sqlite_version_3_7_16" = [ "pkg-config" "vcpkg" ]; - "min_sqlite_version_3_7_7" = [ "pkg-config" "vcpkg" ]; - "preupdate_hook" = [ "buildtime_bindgen" ]; - "session" = [ "preupdate_hook" "buildtime_bindgen" ]; - }; - resolvedDefaultFeatures = [ "default" "min_sqlite_version_3_6_8" "pkg-config" "vcpkg" ]; - }; - "linked-hash-map" = rec { - crateName = "linked-hash-map"; - version = "0.5.3"; - edition = "2015"; - sha256 = "0jih3za0p1mywlnwcakc462q1byk6z8vnrzdm36hg6cxk7asdmcd"; - authors = [ - "Stepan Koltsov " - "Andrew Paseltiner " - ]; - features = { - "heapsize_impl" = [ "heapsize" ]; - "serde_impl" = [ "serde" "serde_test" ]; - }; - }; - "log" = rec { - crateName = "log"; - version = "0.4.11"; - edition = "2015"; - sha256 = "12xzqaflpiljn5cmxsbnbv9sjaj13ykhwsvll0gysbx4blbyvasg"; - authors = [ - "The Rust Project Developers" - ]; - dependencies = [ - { - name = "cfg-if"; - packageId = "cfg-if"; - } - ]; - features = { - "kv_unstable_sval" = [ "kv_unstable" "sval/fmt" ]; - }; - resolvedDefaultFeatures = [ "std" ]; - }; - "lru-cache" = rec { - crateName = "lru-cache"; - version = "0.1.2"; - edition = "2015"; - sha256 = "071viv6g2p3akwqmfb3c8vsycs5n7kr17b70l7la071jv0d4zqii"; - authors = [ - "Stepan Koltsov " - ]; - dependencies = [ - { - name = "linked-hash-map"; - packageId = "linked-hash-map"; - } - ]; - features = { - "heapsize_impl" = [ "heapsize" "linked-hash-map/heapsize_impl" ]; - }; - }; - "memchr" = rec { - crateName = "memchr"; - version = "2.3.3"; - edition = "2015"; - sha256 = "0074pvsfl938ndl5js14ibc7i9q0k3zp390z843w8nlyv4bxha1p"; - authors = [ - "Andrew Gallant " - "bluss" - ]; - features = { - "default" = [ "std" ]; - "use_std" = [ "std" ]; - }; - resolvedDefaultFeatures = [ "default" "std" "use_std" ]; - }; - "mio" = rec { - crateName = "mio"; - version = "0.6.22"; - edition = "2015"; - sha256 = "0c64razhyam9892kgxsshmkqs6smrd11087nxb48nhjn4q4lgqzw"; - authors = [ - "Carl Lerche " - ]; - dependencies = [ - { - name = "cfg-if"; - packageId = "cfg-if"; - } - { - name = "fuchsia-zircon"; - packageId = "fuchsia-zircon"; - target = { target, features }: (target."os" == "fuchsia"); - } - { - name = "fuchsia-zircon-sys"; - packageId = "fuchsia-zircon-sys"; - target = { target, features }: (target."os" == "fuchsia"); - } - { - name = "iovec"; - packageId = "iovec"; - } - { - name = "kernel32-sys"; - packageId = "kernel32-sys"; - target = { target, features }: target."windows"; - } - { - name = "libc"; - packageId = "libc"; - target = { target, features }: target."unix"; - } - { - name = "log"; - packageId = "log"; - } - { - name = "miow"; - packageId = "miow 0.2.1"; - target = { target, features }: target."windows"; - } - { - name = "net2"; - packageId = "net2"; - } - { - name = "slab"; - packageId = "slab"; - } - { - name = "winapi"; - packageId = "winapi 0.2.8"; - target = { target, features }: target."windows"; - } - ]; - features = { - "default" = [ "with-deprecated" ]; - }; - resolvedDefaultFeatures = [ "default" "with-deprecated" ]; - }; - "mio-named-pipes" = rec { - crateName = "mio-named-pipes"; - version = "0.1.7"; - edition = "2018"; - sha256 = "0mjnjcg5dkb2jwxh4zxx4fgp15wr3hj9r53z4hdm4pnm1z2w2h08"; - authors = [ - "Brendan Molloy " - "Alex Crichton " - ]; - dependencies = [ - { - name = "log"; - packageId = "log"; - target = { target, features }: target."windows"; - } - { - name = "mio"; - packageId = "mio"; - target = { target, features }: target."windows"; - } - { - name = "miow"; - packageId = "miow 0.3.5"; - target = { target, features }: target."windows"; - } - { - name = "winapi"; - packageId = "winapi 0.3.9"; - target = { target, features }: target."windows"; - features = [ "winerror" "ioapiset" "minwinbase" "winbase" ]; - } - ]; - - }; - "mio-uds" = rec { - crateName = "mio-uds"; - version = "0.6.8"; - edition = "2015"; - sha256 = "1w36w09gd8as1mah80wdy0kgpshmphmljj68gij34hvdnag6kjxg"; - authors = [ - "Alex Crichton " - ]; - dependencies = [ - { - name = "iovec"; - packageId = "iovec"; - target = { target, features }: target."unix"; - } - { - name = "libc"; - packageId = "libc"; - target = { target, features }: target."unix"; - } - { - name = "mio"; - packageId = "mio"; - target = { target, features }: target."unix"; - } - ]; - - }; - "miow 0.2.1" = rec { - crateName = "miow"; - version = "0.2.1"; - edition = "2015"; - sha256 = "06g9b8sqlh5gxakwqq4rrib07afwanfnxgxajrldwcgk3hxjy7wc"; - authors = [ - "Alex Crichton " - ]; - dependencies = [ - { - name = "kernel32-sys"; - packageId = "kernel32-sys"; - } - { - name = "net2"; - packageId = "net2"; - usesDefaultFeatures = false; - } - { - name = "winapi"; - packageId = "winapi 0.2.8"; - } - { - name = "ws2_32-sys"; - packageId = "ws2_32-sys"; - } - ]; - - }; - "miow 0.3.5" = rec { - crateName = "miow"; - version = "0.3.5"; - edition = "2018"; - sha256 = "17lpb2754vg6vflk2vgka4kz2p4gkbsgnb815bb3ckaxg6wqzf07"; - authors = [ - "Alex Crichton " - ]; - dependencies = [ - { - name = "socket2"; - packageId = "socket2"; - } - { - name = "winapi"; - packageId = "winapi 0.3.9"; - features = [ "std" "fileapi" "handleapi" "ioapiset" "minwindef" "namedpipeapi" "ntdef" "synchapi" "winerror" "winsock2" "ws2def" "ws2ipdef" ]; - } - ]; - - }; - "net2" = rec { - crateName = "net2"; - version = "0.2.34"; - edition = "2015"; - sha256 = "1xsay6x9fqkq34mfyfyavkrk29z7j4wb9fzw5as4yw3nmhcck9rb"; - authors = [ - "Alex Crichton " - ]; - dependencies = [ - { - name = "cfg-if"; - packageId = "cfg-if"; - } - { - name = "libc"; - packageId = "libc"; - target = { target, features }: ((target."os" == "redox") || target."unix" || (target."os" == "wasi")); - } - { - name = "winapi"; - packageId = "winapi 0.3.9"; - target = { target, features }: target."windows"; - features = [ "handleapi" "winsock2" "ws2def" "ws2ipdef" "ws2tcpip" ]; - } - ]; - features = { - "default" = [ "duration" ]; - }; - resolvedDefaultFeatures = [ "default" "duration" ]; - }; - "num_cpus" = rec { - crateName = "num_cpus"; - version = "1.13.0"; - edition = "2015"; - sha256 = "1cv6yxhz2zbnwn8pn1yn8grg7zsnd523947fby41a737aqvryj85"; - authors = [ - "Sean McArthur " - ]; - dependencies = [ - { - name = "hermit-abi"; - packageId = "hermit-abi"; - target = { target, features }: (((target."arch" == "x86_64") || (target."arch" == "aarch64")) && (target."os" == "hermit")); - } - { - name = "libc"; - packageId = "libc"; - } - ]; - - }; - "once_cell" = rec { - crateName = "once_cell"; - version = "1.4.1"; - edition = "2018"; - sha256 = "1ba56vr8n85xgajnn78pg6iag4inwil3mqg90wi5jaz6xzkm23i6"; - authors = [ - "Aleksey Kladov " - ]; - features = { - "default" = [ "std" ]; - }; - resolvedDefaultFeatures = [ "std" ]; - }; - "pin-project" = rec { - crateName = "pin-project"; - version = "0.4.23"; - edition = "2018"; - sha256 = "1aj8ivjr7bw3dmnp53zj10a0fx6ij3lqx7vx94p38ydfybzk6i6a"; - authors = [ - "Taiki Endo " - ]; - dependencies = [ - { - name = "pin-project-internal"; - packageId = "pin-project-internal"; - usesDefaultFeatures = false; - } - ]; - - }; - "pin-project-internal" = rec { - crateName = "pin-project-internal"; - version = "0.4.23"; - edition = "2018"; - sha256 = "07s66r7c6dirkvcjhqsndaf3qmvwl45c28dgypyk38797rf823ic"; - procMacro = true; - authors = [ - "Taiki Endo " - ]; - dependencies = [ - { - name = "proc-macro2"; - packageId = "proc-macro2"; - } - { - name = "quote"; - packageId = "quote"; - } - { - name = "syn"; - packageId = "syn"; - features = [ "full" "visit-mut" ]; - } - ]; - - }; - "pin-project-lite" = rec { - crateName = "pin-project-lite"; - version = "0.1.7"; - edition = "2018"; - sha256 = "05dp09xswfb18i2jmlvzkb0pd0fin9s3m64fgyksg6161zqxnai8"; - authors = [ - "Taiki Endo " - ]; - - }; - "pin-utils" = rec { - crateName = "pin-utils"; - version = "0.1.0"; - edition = "2018"; - sha256 = "117ir7vslsl2z1a7qzhws4pd01cg2d3338c47swjyvqv2n60v1wb"; - authors = [ - "Josef Brandl " - ]; - - }; - "pkg-config" = rec { - crateName = "pkg-config"; - version = "0.3.18"; - edition = "2015"; - sha256 = "0cxc4yd9qb40944a2svgci41bws68f1hqvyljhrldwbadda94r6k"; - authors = [ - "Alex Crichton " - ]; - - }; - "pretty_env_logger" = rec { - crateName = "pretty_env_logger"; - version = "0.4.0"; - edition = "2015"; - sha256 = "17gva1rlf9fhgr0jr19kv39f8bir3f4pa4jz02qbhl9qanwkcvcj"; - authors = [ - "Sean McArthur " - ]; - dependencies = [ - { - name = "env_logger"; - packageId = "env_logger"; - } - { - name = "log"; - packageId = "log"; - } - ]; - - }; - "proc-macro-hack" = rec { - crateName = "proc-macro-hack"; - version = "0.5.18"; - edition = "2018"; - sha256 = "16055crxm9l5skrl96l5cs6xc4xnvhiggcf625r7pixdl2whbilr"; - procMacro = true; - authors = [ - "David Tolnay " - ]; - - }; - "proc-macro-nested" = rec { - crateName = "proc-macro-nested"; - version = "0.1.6"; - edition = "2015"; - sha256 = "0nnwm9bvp1fmr8nqjp8ynrkj97yzpsdh3062li8b0f4hzgd818gb"; - authors = [ - "David Tolnay " - ]; - - }; - "proc-macro2" = rec { - crateName = "proc-macro2"; - version = "1.0.19"; - edition = "2018"; - sha256 = "04lb4n7g5z9mq6in39i7yb1m5bb107dfawc2rf4227npnn2z1x84"; - authors = [ - "Alex Crichton " - "David Tolnay " - ]; - dependencies = [ - { - name = "unicode-xid"; - packageId = "unicode-xid"; - } - ]; - features = { - "default" = [ "proc-macro" ]; - }; - resolvedDefaultFeatures = [ "default" "proc-macro" ]; - }; - "quick-error" = rec { - crateName = "quick-error"; - version = "1.2.3"; - edition = "2015"; - sha256 = "1q6za3v78hsspisc197bg3g7rpc989qycy8ypr8ap8igv10ikl51"; - authors = [ - "Paul Colomiets " - "Colin Kiegel " - ]; - - }; - "quote" = rec { - crateName = "quote"; - version = "1.0.7"; - edition = "2018"; - sha256 = "0drzd6pq7whq7qhdvvs8wn6pbb0hhc12pz8wv80fb05ixhbksmma"; - authors = [ - "David Tolnay " - ]; - dependencies = [ - { - name = "proc-macro2"; - packageId = "proc-macro2"; - usesDefaultFeatures = false; - } - ]; - features = { - "default" = [ "proc-macro" ]; - "proc-macro" = [ "proc-macro2/proc-macro" ]; - }; - resolvedDefaultFeatures = [ "default" "proc-macro" ]; - }; - "redox_syscall" = rec { - crateName = "redox_syscall"; - version = "0.1.57"; - edition = "2015"; - sha256 = "1kh59fpwy33w9nwd5iyc283yglq8pf2s41hnhvl48iax9mz0zk21"; - libName = "syscall"; - authors = [ - "Jeremy Soller " - ]; - - }; - "regex" = rec { - crateName = "regex"; - version = "1.3.9"; - edition = "2015"; - sha256 = "1rnqga94ypykl2apgj26l2j1s9bvr2ix4dlzs323n6abyky80dww"; - authors = [ - "The Rust Project Developers" - ]; - dependencies = [ - { - name = "aho-corasick"; - packageId = "aho-corasick"; - optional = true; - } - { - name = "memchr"; - packageId = "memchr"; - optional = true; - } - { - name = "regex-syntax"; - packageId = "regex-syntax"; - usesDefaultFeatures = false; - } - { - name = "thread_local"; - packageId = "thread_local"; - optional = true; - } - ]; - features = { - "default" = [ "std" "perf" "unicode" "regex-syntax/default" ]; - "perf" = [ "perf-cache" "perf-dfa" "perf-inline" "perf-literal" ]; - "perf-cache" = [ "thread_local" ]; - "perf-literal" = [ "aho-corasick" "memchr" ]; - "unicode" = [ "unicode-age" "unicode-bool" "unicode-case" "unicode-gencat" "unicode-perl" "unicode-script" "unicode-segment" "regex-syntax/unicode" ]; - "unicode-age" = [ "regex-syntax/unicode-age" ]; - "unicode-bool" = [ "regex-syntax/unicode-bool" ]; - "unicode-case" = [ "regex-syntax/unicode-case" ]; - "unicode-gencat" = [ "regex-syntax/unicode-gencat" ]; - "unicode-perl" = [ "regex-syntax/unicode-perl" ]; - "unicode-script" = [ "regex-syntax/unicode-script" ]; - "unicode-segment" = [ "regex-syntax/unicode-segment" ]; - "unstable" = [ "pattern" ]; - "use_std" = [ "std" ]; - }; - 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" ]; - }; - "regex-syntax" = rec { - crateName = "regex-syntax"; - version = "0.6.18"; - edition = "2015"; - sha256 = "1s648w7rwpxnq9iqwbyy43ar4al07906jpz0jxlql23bgjwjwh96"; - authors = [ - "The Rust Project Developers" - ]; - features = { - "default" = [ "unicode" ]; - "unicode" = [ "unicode-age" "unicode-bool" "unicode-case" "unicode-gencat" "unicode-perl" "unicode-script" "unicode-segment" ]; - }; - resolvedDefaultFeatures = [ "default" "unicode" "unicode-age" "unicode-bool" "unicode-case" "unicode-gencat" "unicode-perl" "unicode-script" "unicode-segment" ]; - }; - "rusqlite" = rec { - crateName = "rusqlite"; - version = "0.24.0"; - edition = "2018"; - sha256 = "1vxrg3m22pchyf10mhl60npgsckbaj426jyvsa2bcvlxblkw6y2c"; - authors = [ - "The rusqlite developers" - ]; - dependencies = [ - { - name = "bitflags"; - packageId = "bitflags"; - } - { - name = "fallible-iterator"; - packageId = "fallible-iterator"; - } - { - name = "fallible-streaming-iterator"; - packageId = "fallible-streaming-iterator"; - } - { - name = "libsqlite3-sys"; - packageId = "libsqlite3-sys"; - } - { - name = "lru-cache"; - packageId = "lru-cache"; - } - { - name = "memchr"; - packageId = "memchr"; - } - { - name = "smallvec"; - packageId = "smallvec"; - } - ]; - features = { - "array" = [ "vtab" ]; - "backup" = [ "libsqlite3-sys/min_sqlite_version_3_6_23" ]; - "blob" = [ "libsqlite3-sys/min_sqlite_version_3_7_7" ]; - "buildtime_bindgen" = [ "libsqlite3-sys/buildtime_bindgen" ]; - "bundled" = [ "libsqlite3-sys/bundled" "modern_sqlite" ]; - "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" ]; - "bundled-windows" = [ "libsqlite3-sys/bundled-windows" ]; - "csvtab" = [ "csv" "vtab" ]; - "functions" = [ "libsqlite3-sys/min_sqlite_version_3_7_7" ]; - "i128_blob" = [ "byteorder" ]; - "in_gecko" = [ "modern_sqlite" "libsqlite3-sys/in_gecko" ]; - "modern_sqlite" = [ "libsqlite3-sys/bundled_bindings" ]; - "series" = [ "vtab" ]; - "session" = [ "libsqlite3-sys/session" "hooks" ]; - "sqlcipher" = [ "libsqlite3-sys/sqlcipher" ]; - "trace" = [ "libsqlite3-sys/min_sqlite_version_3_6_23" ]; - "unlock_notify" = [ "libsqlite3-sys/unlock_notify" ]; - "vtab" = [ "libsqlite3-sys/min_sqlite_version_3_7_7" "lazy_static" ]; - "wasm32-wasi-vfs" = [ "libsqlite3-sys/wasm32-wasi-vfs" ]; - "window" = [ "functions" ]; - "with-asan" = [ "libsqlite3-sys/with-asan" ]; - }; - }; - "signal-hook-registry" = rec { - crateName = "signal-hook-registry"; - version = "1.2.1"; - edition = "2015"; - sha256 = "0dgh2l7diyhkf74jjyqz1jfsyqsvxgssls30cix6b7jkph823qd3"; - authors = [ - "Michal 'vorner' Vaner " - "Masaki Hara " - ]; - dependencies = [ - { - name = "arc-swap"; - packageId = "arc-swap"; - } - { - name = "libc"; - packageId = "libc"; - } - ]; - - }; - "slab" = rec { - crateName = "slab"; - version = "0.4.2"; - edition = "2015"; - sha256 = "1y59xsa27jk84sxzswjk60xcjf8b4fm5960jwpznrrcmasyva4f1"; - authors = [ - "Carl Lerche " - ]; - - }; - "smallvec" = rec { - crateName = "smallvec"; - version = "1.4.2"; - edition = "2018"; - sha256 = "0lp2ax6hfbcsqa92xkdz8vnlfc0fhpqczv62l64kvgsbp2b7dvpv"; - authors = [ - "The Servo Project Developers" - ]; - features = { - }; - }; - "socket2" = rec { - crateName = "socket2"; - version = "0.3.12"; - edition = "2018"; - sha256 = "062921z4yc29mwzxx982nwd1kb8lnfqyvhncydbf7p3pys9qf203"; - authors = [ - "Alex Crichton " - ]; - dependencies = [ - { - name = "cfg-if"; - packageId = "cfg-if"; - target = { target, features }: (target."unix" || (target."os" == "redox")); - } - { - name = "libc"; - packageId = "libc"; - target = { target, features }: (target."unix" || (target."os" == "redox")); - } - { - name = "redox_syscall"; - packageId = "redox_syscall"; - target = { target, features }: (target."os" == "redox"); - } - { - name = "winapi"; - packageId = "winapi 0.3.9"; - target = { target, features }: target."windows"; - features = [ "handleapi" "ws2def" "ws2ipdef" "ws2tcpip" "minwindef" ]; - } - ]; - features = { - }; - }; - "syn" = rec { - crateName = "syn"; - version = "1.0.39"; - edition = "2018"; - sha256 = "1y8ikwihdrfn64ybrhaqlbxlcf4g43s8mad36n47yz7ycxjqs7c9"; - authors = [ - "David Tolnay " - ]; - dependencies = [ - { - name = "proc-macro2"; - packageId = "proc-macro2"; - usesDefaultFeatures = false; - } - { - name = "quote"; - packageId = "quote"; - optional = true; - usesDefaultFeatures = false; - } - { - name = "unicode-xid"; - packageId = "unicode-xid"; - } - ]; - features = { - "default" = [ "derive" "parsing" "printing" "clone-impls" "proc-macro" ]; - "printing" = [ "quote" ]; - "proc-macro" = [ "proc-macro2/proc-macro" "quote/proc-macro" ]; - "test" = [ "syn-test-suite/all-features" ]; - }; - resolvedDefaultFeatures = [ "clone-impls" "default" "derive" "full" "parsing" "printing" "proc-macro" "quote" "visit-mut" ]; - }; - "termcolor" = rec { - crateName = "termcolor"; - version = "1.1.0"; - edition = "2018"; - sha256 = "0pyp8vc0gx7124y80ixdl6plbfn1yjhw04i875k5fz2dk8lglsxv"; - authors = [ - "Andrew Gallant " - ]; - dependencies = [ - { - name = "winapi-util"; - packageId = "winapi-util"; - target = { target, features }: target."windows"; - } - ]; - - }; - "thread_local" = rec { - crateName = "thread_local"; - version = "1.0.1"; - edition = "2015"; - sha256 = "054vlrr1vsdy1h4b7n99mr24pnj8928ig9qwzg36wnkld4dns36l"; - authors = [ - "Amanieu d'Antras " - ]; - dependencies = [ - { - name = "lazy_static"; - packageId = "lazy_static"; - } - ]; - - }; - "time" = rec { - crateName = "time"; - version = "0.1.43"; - edition = "2015"; - sha256 = "0f14wrgxj7ya2v4msg5mni7046bsm2angm7cn3pd3yv04gpm12na"; - authors = [ - "The Rust Project Developers" - ]; - dependencies = [ - { - name = "libc"; - packageId = "libc"; - } - { - name = "winapi"; - packageId = "winapi 0.3.9"; - target = { target, features }: target."windows"; - features = [ "std" "minwinbase" "minwindef" "ntdef" "profileapi" "sysinfoapi" "timezoneapi" ]; - } - ]; - devDependencies = [ - { - name = "winapi"; - packageId = "winapi 0.3.9"; - features = [ "std" "processthreadsapi" "winbase" ]; - } - ]; - - }; - "tokio" = rec { - crateName = "tokio"; - version = "0.2.22"; - edition = "2018"; - sha256 = "1kfw5lgq1sswlbxq98j5q45bdxv4hhd907nksysbbwjbv1acld2x"; - authors = [ - "Tokio Contributors " - ]; - dependencies = [ - { - name = "bytes"; - packageId = "bytes"; - } - { - name = "fnv"; - packageId = "fnv"; - optional = true; - } - { - name = "futures-core"; - packageId = "futures-core"; - optional = true; - } - { - name = "iovec"; - packageId = "iovec"; - optional = true; - } - { - name = "lazy_static"; - packageId = "lazy_static"; - optional = true; - } - { - name = "libc"; - packageId = "libc"; - optional = true; - target = { target, features }: target."unix"; - } - { - name = "memchr"; - packageId = "memchr"; - optional = true; - } - { - name = "mio"; - packageId = "mio"; - optional = true; - } - { - name = "mio-named-pipes"; - packageId = "mio-named-pipes"; - optional = true; - target = { target, features }: target."windows"; - } - { - name = "mio-uds"; - packageId = "mio-uds"; - optional = true; - target = { target, features }: target."unix"; - } - { - name = "num_cpus"; - packageId = "num_cpus"; - optional = true; - } - { - name = "pin-project-lite"; - packageId = "pin-project-lite"; - } - { - name = "signal-hook-registry"; - packageId = "signal-hook-registry"; - optional = true; - target = { target, features }: target."unix"; - } - { - name = "slab"; - packageId = "slab"; - optional = true; - } - { - name = "tokio-macros"; - packageId = "tokio-macros"; - optional = true; - } - { - name = "winapi"; - packageId = "winapi 0.3.9"; - optional = true; - usesDefaultFeatures = false; - target = { target, features }: target."windows"; - } - ]; - features = { - "blocking" = [ "rt-core" ]; - "dns" = [ "rt-core" ]; - "fs" = [ "rt-core" "io-util" ]; - "full" = [ "blocking" "dns" "fs" "io-driver" "io-util" "io-std" "macros" "net" "process" "rt-core" "rt-util" "rt-threaded" "signal" "stream" "sync" "time" ]; - "io-driver" = [ "mio" "lazy_static" ]; - "io-std" = [ "rt-core" ]; - "io-util" = [ "memchr" ]; - "macros" = [ "tokio-macros" ]; - "net" = [ "dns" "tcp" "udp" "uds" ]; - "process" = [ "io-driver" "libc" "mio-named-pipes" "signal" "winapi/consoleapi" "winapi/minwindef" "winapi/threadpoollegacyapiset" "winapi/winerror" ]; - "rt-threaded" = [ "num_cpus" "rt-core" ]; - "signal" = [ "io-driver" "lazy_static" "libc" "mio-uds" "signal-hook-registry" "winapi/consoleapi" "winapi/minwindef" ]; - "stream" = [ "futures-core" ]; - "sync" = [ "fnv" ]; - "tcp" = [ "io-driver" "iovec" ]; - "time" = [ "slab" ]; - "udp" = [ "io-driver" ]; - "uds" = [ "io-driver" "mio-uds" "libc" ]; - }; - 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" ]; - }; - "tokio-macros" = rec { - crateName = "tokio-macros"; - version = "0.2.5"; - edition = "2018"; - sha256 = "1283aq0l7rnh79zzqk4r34dgimvwcymrzmg1yah9ai2nmb3arhzh"; - procMacro = true; - authors = [ - "Tokio Contributors " - ]; - dependencies = [ - { - name = "proc-macro2"; - packageId = "proc-macro2"; - } - { - name = "quote"; - packageId = "quote"; - } - { - name = "syn"; - packageId = "syn"; - features = [ "full" ]; - } - ]; - - }; - "tokio-util" = rec { - crateName = "tokio-util"; - version = "0.3.1"; - edition = "2018"; - sha256 = "16b48dl6sbc9x944jgjvsd65ab1w2c2qcziddbrbwv1b3y4l50my"; - authors = [ - "Tokio Contributors " - ]; - dependencies = [ - { - name = "bytes"; - packageId = "bytes"; - } - { - name = "futures-core"; - packageId = "futures-core"; - } - { - name = "futures-sink"; - packageId = "futures-sink"; - } - { - name = "log"; - packageId = "log"; - } - { - name = "pin-project-lite"; - packageId = "pin-project-lite"; - } - { - name = "tokio"; - packageId = "tokio"; - } - ]; - devDependencies = [ - { - name = "tokio"; - packageId = "tokio"; - features = [ "full" ]; - } - ]; - features = { - "codec" = [ "tokio/stream" ]; - "compat" = [ "futures-io" ]; - "full" = [ "codec" "udp" "compat" ]; - "udp" = [ "tokio/udp" ]; - }; - resolvedDefaultFeatures = [ "codec" "default" ]; - }; - "tower-service" = rec { - crateName = "tower-service"; - version = "0.3.0"; - edition = "2018"; - sha256 = "0q4q53w82w1wd71x7vbspg2l3jicb6al2w1qdwxmnjrz8jzvd1z9"; - authors = [ - "Tower Maintainers " - ]; - - }; - "tracing" = rec { - crateName = "tracing"; - version = "0.1.19"; - edition = "2018"; - sha256 = "0v3qhqnkmwar0zbkqj5z4achpjl9279xw3v61kinqb833c3clybd"; - authors = [ - "Eliza Weisman " - "Tokio Contributors " - ]; - dependencies = [ - { - name = "cfg-if"; - packageId = "cfg-if"; - } - { - name = "log"; - packageId = "log"; - optional = true; - } - { - name = "tracing-core"; - packageId = "tracing-core"; - usesDefaultFeatures = false; - } - ]; - devDependencies = [ - { - name = "log"; - packageId = "log"; - } - ]; - features = { - "attributes" = [ "tracing-attributes" ]; - "default" = [ "std" "attributes" ]; - "log-always" = [ "log" ]; - "std" = [ "tracing-core/std" ]; - }; - resolvedDefaultFeatures = [ "log" "std" ]; - }; - "tracing-core" = rec { - crateName = "tracing-core"; - version = "0.1.14"; - edition = "2018"; - sha256 = "0i9mig6849il9wspwgds08mgipwkrh3kg0vdlcyb85n34ckncqyv"; - authors = [ - "Tokio Contributors " - ]; - dependencies = [ - { - name = "lazy_static"; - packageId = "lazy_static"; - optional = true; - } - ]; - features = { - "default" = [ "std" ]; - "std" = [ "lazy_static" ]; - }; - resolvedDefaultFeatures = [ "lazy_static" "std" ]; - }; - "try-lock" = rec { - crateName = "try-lock"; - version = "0.2.3"; - edition = "2015"; - sha256 = "0hkn1ksmg5hdqgqdw1ahy5qk69f4crh2psf0v61qphyrf777nm2r"; - authors = [ - "Sean McArthur " - ]; - - }; - "unicode-xid" = rec { - crateName = "unicode-xid"; - version = "0.2.1"; - edition = "2015"; - sha256 = "0r6mknipyy9vpz8mwmxvkx65ff2ha1n2pxqjj6f46lcn8yrhpzpp"; - authors = [ - "erick.tryzelaar " - "kwantam " - ]; - features = { - }; - resolvedDefaultFeatures = [ "default" ]; - }; - "vcpkg" = rec { - crateName = "vcpkg"; - version = "0.2.10"; - edition = "2015"; - sha256 = "132hlmsc4maava91vl4lh677sl1c7vr8ccl53fnr5w41y6dh4m34"; - authors = [ - "Jim McGrath " - ]; - - }; - "want" = rec { - crateName = "want"; - version = "0.3.0"; - edition = "2018"; - sha256 = "181b2zmwfq389x9n2g1n37cvcvvdand832zz6v8i1l8wrdlaks0w"; - authors = [ - "Sean McArthur " - ]; - dependencies = [ - { - name = "log"; - packageId = "log"; - } - { - name = "try-lock"; - packageId = "try-lock"; - } - ]; - - }; - "winapi 0.2.8" = rec { - crateName = "winapi"; - version = "0.2.8"; - edition = "2015"; - sha256 = "0yh816lh6lf56dpsgxy189c2ai1z3j8mw9si6izqb6wsjkbcjz8n"; - authors = [ - "Peter Atashian " - ]; - - }; - "winapi 0.3.9" = rec { - crateName = "winapi"; - version = "0.3.9"; - edition = "2015"; - sha256 = "06gl025x418lchw1wxj64ycr7gha83m44cjr5sarhynd9xkrm0sw"; - authors = [ - "Peter Atashian " - ]; - dependencies = [ - { - name = "winapi-i686-pc-windows-gnu"; - packageId = "winapi-i686-pc-windows-gnu"; - target = { target, features }: (stdenv.hostPlatform.config == "i686-pc-windows-gnu"); - } - { - name = "winapi-x86_64-pc-windows-gnu"; - packageId = "winapi-x86_64-pc-windows-gnu"; - target = { target, features }: (stdenv.hostPlatform.config == "x86_64-pc-windows-gnu"); - } - ]; - features = { - "debug" = [ "impl-debug" ]; - }; - 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" ]; - }; - "winapi-build" = rec { - crateName = "winapi-build"; - version = "0.1.1"; - edition = "2015"; - sha256 = "1g4rqsgjky0a7530qajn2bbfcrl2v0zb39idgdws9b1l7gp5wc9d"; - libName = "build"; - authors = [ - "Peter Atashian " - ]; - - }; - "winapi-i686-pc-windows-gnu" = rec { - crateName = "winapi-i686-pc-windows-gnu"; - version = "0.4.0"; - edition = "2015"; - sha256 = "1dmpa6mvcvzz16zg6d5vrfy4bxgg541wxrcip7cnshi06v38ffxc"; - authors = [ - "Peter Atashian " - ]; - - }; - "winapi-util" = rec { - crateName = "winapi-util"; - version = "0.1.5"; - edition = "2018"; - sha256 = "0y71bp7f6d536czj40dhqk0d55wfbbwqfp2ymqf1an5ibgl6rv3h"; - authors = [ - "Andrew Gallant " - ]; - dependencies = [ - { - name = "winapi"; - packageId = "winapi 0.3.9"; - target = { target, features }: target."windows"; - features = [ "std" "consoleapi" "errhandlingapi" "fileapi" "minwindef" "processenv" "winbase" "wincon" "winerror" "winnt" ]; - } - ]; - - }; - "winapi-x86_64-pc-windows-gnu" = rec { - crateName = "winapi-x86_64-pc-windows-gnu"; - version = "0.4.0"; - edition = "2015"; - sha256 = "0gqq64czqb64kskjryj8isp62m2sgvx25yyj3kpc2myh85w24bki"; - authors = [ - "Peter Atashian " - ]; - - }; - "ws2_32-sys" = rec { - crateName = "ws2_32-sys"; - version = "0.2.1"; - edition = "2015"; - sha256 = "0ppscg5qfqaw0gzwv2a4nhn5bn01ff9iwn6ysqnzm4n8s3myz76m"; - libName = "ws2_32"; - authors = [ - "Peter Atashian " - ]; - dependencies = [ - { - name = "winapi"; - packageId = "winapi 0.2.8"; - } - ]; - buildDependencies = [ - { - name = "winapi-build"; - packageId = "winapi-build"; - } - ]; - - }; - }; - - # -# crate2nix/default.nix (excerpt start) -# - - /* Target (platform) data for conditional dependencies. - This corresponds roughly to what buildRustCrate is setting. - */ - defaultTarget = { - unix = true; - windows = false; - fuchsia = true; - test = false; - - # This doesn't appear to be officially documented anywhere yet. - # See https://github.com/rust-lang-nursery/rust-forge/issues/101. - os = if stdenv.hostPlatform.isDarwin - then "macos" - else stdenv.hostPlatform.parsed.kernel.name; - arch = stdenv.hostPlatform.parsed.cpu.name; - family = "unix"; - env = "gnu"; - endian = - if stdenv.hostPlatform.parsed.cpu.significantByte.name == "littleEndian" - then "little" else "big"; - pointer_width = toString stdenv.hostPlatform.parsed.cpu.bits; - vendor = stdenv.hostPlatform.parsed.vendor.name; - debug_assertions = false; - }; - - /* Filters common temp files and build files. */ - # TODO(pkolloch): Substitute with gitignore filter - sourceFilter = name: type: - let - baseName = builtins.baseNameOf (builtins.toString name); - in - ! ( - # Filter out git - baseName == ".gitignore" - || (type == "directory" && baseName == ".git") - - # Filter out build results - || ( - type == "directory" && ( - baseName == "target" - || baseName == "_site" - || baseName == ".sass-cache" - || baseName == ".jekyll-metadata" - || baseName == "build-artifacts" - ) - ) - - # Filter out nix-build result symlinks - || ( - type == "symlink" && lib.hasPrefix "result" baseName - ) - - # Filter out IDE config - || ( - type == "directory" && ( - baseName == ".idea" || baseName == ".vscode" - ) - ) || lib.hasSuffix ".iml" baseName - - # Filter out nix build files - || baseName == "Cargo.nix" - - # Filter out editor backup / swap files. - || lib.hasSuffix "~" baseName - || builtins.match "^\\.sw[a-z]$$" baseName != null - || builtins.match "^\\..*\\.sw[a-z]$$" baseName != null - || lib.hasSuffix ".tmp" baseName - || lib.hasSuffix ".bak" baseName - || baseName == "tests.nix" - ); - - /* Returns a crate which depends on successful test execution - of crate given as the second argument. - - testCrateFlags: list of flags to pass to the test exectuable - testInputs: list of packages that should be available during test execution - */ - crateWithTest = { crate, testCrate, testCrateFlags, testInputs }: - assert builtins.typeOf testCrateFlags == "list"; - assert builtins.typeOf testInputs == "list"; - let - # override the `crate` so that it will build and execute tests instead of - # building the actual lib and bin targets We just have to pass `--test` - # to rustc and it will do the right thing. We execute the tests and copy - # their log and the test executables to $out for later inspection. - test = let - drv = testCrate.override ( - _: { - buildTests = true; - } - ); - in - pkgs.runCommand "run-tests-${testCrate.name}" { - inherit testCrateFlags; - buildInputs = testInputs; - } '' - set -ex - cd ${crate.src} - for file in ${drv}/tests/*; do - $file $testCrateFlags 2>&1 | tee -a $out - done - ''; - in - crate.overrideAttrs ( - old: { - checkPhase = '' - test -e ${test} - ''; - passthru = (old.passthru or {}) // { - inherit test; - }; - } - ); - - /* A restricted overridable version of builtRustCratesWithFeatures. */ - buildRustCrateWithFeatures = - { packageId - , features ? rootFeatures - , crateOverrides ? defaultCrateOverrides - , buildRustCrateFunc ? ( - if crateOverrides == pkgs.defaultCrateOverrides - then buildRustCrate - else buildRustCrate.override { - defaultCrateOverrides = crateOverrides; - } - ) - , runTests ? false - , testCrateFlags ? [] - , testInputs ? [] - }: - lib.makeOverridable - ( - { features, crateOverrides, runTests, testCrateFlags, testInputs }: - let - builtRustCrates = builtRustCratesWithFeatures { - inherit packageId features buildRustCrateFunc; - runTests = false; - }; - builtTestRustCrates = builtRustCratesWithFeatures { - inherit packageId features buildRustCrateFunc; - runTests = true; - }; - drv = builtRustCrates.${packageId}; - testDrv = builtTestRustCrates.${packageId}; - in - if runTests then - crateWithTest { - crate = drv; - testCrate = testDrv; - inherit testCrateFlags testInputs; - } - else drv - ) - { inherit features crateOverrides runTests testCrateFlags testInputs; }; - - /* Returns an attr set with packageId mapped to the result of buildRustCrateFunc - for the corresponding crate. - */ - builtRustCratesWithFeatures = - { packageId - , features - , crateConfigs ? crates - , buildRustCrateFunc - , runTests - , target ? defaultTarget - } @ args: - assert (builtins.isAttrs crateConfigs); - assert (builtins.isString packageId); - assert (builtins.isList features); - assert (builtins.isAttrs target); - assert (builtins.isBool runTests); - let - rootPackageId = packageId; - mergedFeatures = mergePackageFeatures ( - args // { - inherit rootPackageId; - target = target // { test = runTests; }; - } - ); - - buildByPackageId = packageId: buildByPackageIdImpl packageId; - - # Memoize built packages so that reappearing packages are only built once. - builtByPackageId = - lib.mapAttrs (packageId: value: buildByPackageId packageId) crateConfigs; - - buildByPackageIdImpl = packageId: - let - features = mergedFeatures."${packageId}" or []; - crateConfig' = crateConfigs."${packageId}"; - crateConfig = - builtins.removeAttrs crateConfig' [ "resolvedDefaultFeatures" "devDependencies" ]; - devDependencies = - lib.optionals - (runTests && packageId == rootPackageId) - (crateConfig'.devDependencies or []); - dependencies = - dependencyDerivations { - inherit builtByPackageId features target; - dependencies = - (crateConfig.dependencies or []) - ++ devDependencies; - }; - buildDependencies = - dependencyDerivations { - inherit builtByPackageId features target; - dependencies = crateConfig.buildDependencies or []; - }; - - filterEnabledDependenciesForThis = dependencies: filterEnabledDependencies { - inherit dependencies features target; - }; - - dependenciesWithRenames = - lib.filter (d: d ? "rename") ( - filterEnabledDependenciesForThis - ( - (crateConfig.buildDependencies or []) - ++ (crateConfig.dependencies or []) - ++ devDependencies - ) - ); - - crateRenames = - builtins.listToAttrs - (map (d: { name = d.name; value = d.rename; }) dependenciesWithRenames); - in - buildRustCrateFunc ( - crateConfig // { - src = crateConfig.src or ( - pkgs.fetchurl { - name = "${crateConfig.crateName}-${crateConfig.version}.tar.gz"; - url = "https://crates.io/api/v1/crates/${crateConfig.crateName}/${crateConfig.version}/download"; - sha256 = crateConfig.sha256; - } - ); - inherit features dependencies buildDependencies crateRenames release; - } - ); - in - builtByPackageId; - - /* Returns the actual derivations for the given dependencies. */ - dependencyDerivations = - { builtByPackageId - , features - , dependencies - , target - }: - assert (builtins.isAttrs builtByPackageId); - assert (builtins.isList features); - assert (builtins.isList dependencies); - assert (builtins.isAttrs target); - let - enabledDependencies = filterEnabledDependencies { - inherit dependencies features target; - }; - depDerivation = dependency: builtByPackageId.${dependency.packageId}; - in - map depDerivation enabledDependencies; - - /* Returns a sanitized version of val with all values substituted that cannot - be serialized as JSON. - */ - sanitizeForJson = val: - if builtins.isAttrs val - then lib.mapAttrs (n: v: sanitizeForJson v) val - else if builtins.isList val - then builtins.map sanitizeForJson val - else if builtins.isFunction val - then "function" - else val; - - /* Returns various tools to debug a crate. */ - debugCrate = { packageId, target ? defaultTarget }: - assert (builtins.isString packageId); - let - debug = rec { - # The built tree as passed to buildRustCrate. - buildTree = buildRustCrateWithFeatures { - buildRustCrateFunc = lib.id; - inherit packageId; - }; - sanitizedBuildTree = sanitizeForJson buildTree; - dependencyTree = sanitizeForJson ( - buildRustCrateWithFeatures { - buildRustCrateFunc = crate: { - "01_crateName" = crate.crateName or false; - "02_features" = crate.features or []; - "03_dependencies" = crate.dependencies or []; - }; - inherit packageId; - } - ); - mergedPackageFeatures = mergePackageFeatures { - features = rootFeatures; - inherit packageId target; - }; - diffedDefaultPackageFeatures = diffDefaultPackageFeatures { - inherit packageId target; - }; - }; - in - { internal = debug; }; - - /* Returns differences between cargo default features and crate2nix default - features. - - This is useful for verifying the feature resolution in crate2nix. - */ - diffDefaultPackageFeatures = - { crateConfigs ? crates - , packageId - , target - }: - assert (builtins.isAttrs crateConfigs); - let - prefixValues = prefix: lib.mapAttrs (n: v: { "${prefix}" = v; }); - mergedFeatures = - prefixValues - "crate2nix" - (mergePackageFeatures { inherit crateConfigs packageId target; features = [ "default" ]; }); - configs = prefixValues "cargo" crateConfigs; - combined = lib.foldAttrs (a: b: a // b) {} [ mergedFeatures configs ]; - onlyInCargo = - builtins.attrNames - (lib.filterAttrs (n: v: !(v ? "crate2nix") && (v ? "cargo")) combined); - onlyInCrate2Nix = - builtins.attrNames - (lib.filterAttrs (n: v: (v ? "crate2nix") && !(v ? "cargo")) combined); - differentFeatures = lib.filterAttrs - ( - n: v: - (v ? "crate2nix") - && (v ? "cargo") - && (v.crate2nix.features or []) != (v."cargo".resolved_default_features or []) - ) - combined; - in - builtins.toJSON { - inherit onlyInCargo onlyInCrate2Nix differentFeatures; - }; - - /* Returns an attrset mapping packageId to the list of enabled features. - - If multiple paths to a dependency enable different features, the - corresponding feature sets are merged. Features in rust are additive. - */ - mergePackageFeatures = - { crateConfigs ? crates - , packageId - , rootPackageId ? packageId - , features ? rootFeatures - , dependencyPath ? [ crates.${packageId}.crateName ] - , featuresByPackageId ? {} - , target - # Adds devDependencies to the crate with rootPackageId. - , runTests ? false - , ... - } @ args: - assert (builtins.isAttrs crateConfigs); - assert (builtins.isString packageId); - assert (builtins.isString rootPackageId); - assert (builtins.isList features); - assert (builtins.isList dependencyPath); - assert (builtins.isAttrs featuresByPackageId); - assert (builtins.isAttrs target); - assert (builtins.isBool runTests); - let - crateConfig = crateConfigs."${packageId}" or (builtins.throw "Package not found: ${packageId}"); - expandedFeatures = expandFeatures (crateConfig.features or {}) features; - - depWithResolvedFeatures = dependency: - let - packageId = dependency.packageId; - features = dependencyFeatures expandedFeatures dependency; - in - { inherit packageId features; }; - - resolveDependencies = cache: path: dependencies: - assert (builtins.isAttrs cache); - assert (builtins.isList dependencies); - let - enabledDependencies = filterEnabledDependencies { - inherit dependencies target; - features = expandedFeatures; - }; - directDependencies = map depWithResolvedFeatures enabledDependencies; - foldOverCache = op: lib.foldl op cache directDependencies; - in - foldOverCache - ( - cache: { packageId, features }: - let - cacheFeatures = cache.${packageId} or []; - combinedFeatures = sortedUnique (cacheFeatures ++ features); - in - if cache ? ${packageId} && cache.${packageId} == combinedFeatures - then cache - else mergePackageFeatures { - features = combinedFeatures; - featuresByPackageId = cache; - inherit crateConfigs packageId target runTests rootPackageId; - } - ); - - cacheWithSelf = - let - cacheFeatures = featuresByPackageId.${packageId} or []; - combinedFeatures = sortedUnique (cacheFeatures ++ expandedFeatures); - in - featuresByPackageId // { - "${packageId}" = combinedFeatures; - }; - - cacheWithDependencies = - resolveDependencies cacheWithSelf "dep" ( - crateConfig.dependencies or [] - ++ lib.optionals - (runTests && packageId == rootPackageId) - (crateConfig.devDependencies or []) - ); - - cacheWithAll = - resolveDependencies - cacheWithDependencies "build" - (crateConfig.buildDependencies or []); - in - cacheWithAll; - - /* Returns the enabled dependencies given the enabled features. */ - filterEnabledDependencies = { dependencies, features, target }: - assert (builtins.isList dependencies); - assert (builtins.isList features); - assert (builtins.isAttrs target); - - lib.filter - ( - dep: - let - targetFunc = dep.target or (features: true); - in - targetFunc { inherit features target; } - && ( - !(dep.optional or false) - || builtins.any (doesFeatureEnableDependency dep) features - ) - ) - dependencies; - - /* Returns whether the given feature should enable the given dependency. */ - doesFeatureEnableDependency = { name, rename ? null, ... }: feature: - let - prefix = "${name}/"; - len = builtins.stringLength prefix; - startsWithPrefix = builtins.substring 0 len feature == prefix; - in - (rename == null && feature == name) - || (rename != null && rename == feature) - || startsWithPrefix; - - /* Returns the expanded features for the given inputFeatures by applying the - rules in featureMap. - - featureMap is an attribute set which maps feature names to lists of further - feature names to enable in case this feature is selected. - */ - expandFeatures = featureMap: inputFeatures: - assert (builtins.isAttrs featureMap); - assert (builtins.isList inputFeatures); - let - expandFeature = feature: - assert (builtins.isString feature); - [ feature ] ++ (expandFeatures featureMap (featureMap."${feature}" or [])); - outFeatures = builtins.concatMap expandFeature inputFeatures; - in - sortedUnique outFeatures; - - /* - Returns the actual features for the given dependency. - - features: The features of the crate that refers this dependency. - */ - dependencyFeatures = features: dependency: - assert (builtins.isList features); - assert (builtins.isAttrs dependency); - let - defaultOrNil = if dependency.usesDefaultFeatures or true - then [ "default" ] - else []; - explicitFeatures = dependency.features or []; - additionalDependencyFeatures = - let - dependencyPrefix = (dependency.rename or dependency.name) + "/"; - dependencyFeatures = - builtins.filter (f: lib.hasPrefix dependencyPrefix f) features; - in - builtins.map (lib.removePrefix dependencyPrefix) dependencyFeatures; - in - defaultOrNil ++ explicitFeatures ++ additionalDependencyFeatures; - - /* Sorts and removes duplicates from a list of strings. */ - sortedUnique = features: - assert (builtins.isList features); - assert (builtins.all builtins.isString features); - let - outFeaturesSet = lib.foldl (set: feature: set // { "${feature}" = 1; }) {} features; - outFeaturesUnique = builtins.attrNames outFeaturesSet; - in - builtins.sort (a: b: a < b) outFeaturesUnique; - - deprecationWarning = message: value: - if strictDeprecation - then builtins.throw "strictDeprecation enabled, aborting: ${message}" - else builtins.trace message value; - - # - # crate2nix/default.nix (excerpt end) - # - - }; -} -- cgit v1.2.3