colmena/Cargo.nix
2020-12-15 20:58:39 -08:00

2717 lines
85 KiB
Nix
Generated

# This file was @generated by crate2nix 0.9.0-alpha.1 with the command:
# "generate"
# See https://github.com/kolloch/crate2nix for more info.
{ nixpkgs ? <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
# Used for conditional compilation based on CPU feature detection.
, targetFeatures ? []
# Whether to perform release builds: longer compile times, faster binaries.
, release ? true
# Additional crate2nix configuration if it exists.
, crateConfig
? if builtins.pathExists ./crate-config.nix
then pkgs.callPackage ./crate-config.nix {}
else {}
}:
rec {
#
# "public" attributes that we attempt to keep stable with new versions of crate2nix.
#
rootCrate = rec {
packageId = "colmena";
# 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; };
};
# Refer your crate build derivation by name here.
# You can override the features with
# workspaceMembers."${crateName}".build.override { features = [ "default" "feature1" ... ]; }.
workspaceMembers = {
"colmena" = rec {
packageId = "colmena";
build = internal.buildRustCrateWithFeatures {
packageId = "colmena";
};
# Debug support which might change between releases.
# File a bug if you depend on any for non-debug work!
debug = internal.debugCrate { inherit packageId; };
};
};
# A derivation that joins the outputs of all workspace members together.
allWorkspaceMembers = pkgs.symlinkJoin {
name = "all-workspace-members";
paths =
let members = builtins.attrValues workspaceMembers;
in builtins.map (m: m.build) members;
};
#
# "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 = {
"ansi_term" = rec {
crateName = "ansi_term";
version = "0.11.0";
edition = "2015";
sha256 = "16wpvrghvd0353584i1idnsgm0r3vchg8fyrm0x8ayv1rgvbljgf";
authors = [
"ogham@bsago.me"
"Ryan Scheel (Havvy) <ryan.havvy@gmail.com>"
"Josh Triplett <josh@joshtriplett.org>"
];
dependencies = [
{
name = "winapi";
packageId = "winapi";
target = { target, features }: (target."os" == "windows");
features = [ "errhandlingapi" "consoleapi" "processenv" ];
}
];
};
"async-trait" = rec {
crateName = "async-trait";
version = "0.1.42";
edition = "2018";
sha256 = "0gd13pqgw5m6l4bqwjkickq13c4v0jxzxs5i4dwmldrlgvklafld";
procMacro = true;
authors = [
"David Tolnay <dtolnay@gmail.com>"
];
dependencies = [
{
name = "proc-macro2";
packageId = "proc-macro2";
}
{
name = "quote";
packageId = "quote";
}
{
name = "syn";
packageId = "syn";
features = [ "full" "visit-mut" ];
}
];
};
"atty" = rec {
crateName = "atty";
version = "0.2.14";
edition = "2015";
sha256 = "1s7yslcs6a28c5vz7jwj63lkfgyx8mx99fdirlhi9lbhhzhrpcyr";
authors = [
"softprops <d.tangren@gmail.com>"
];
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";
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 <cuviper@gmail.com>"
];
};
"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.6.0";
edition = "2018";
sha256 = "05ivrcbgl4f7z2zzm9hbsi8cy66spi70xlm6fp16zsq4ylsvrp70";
authors = [
"Carl Lerche <me@carllerche.com>"
"Sean McArthur <sean@seanmonstar.com>"
];
features = {
"default" = [ "std" ];
};
resolvedDefaultFeatures = [ "default" "std" ];
};
"cfg-if 0.1.10" = rec {
crateName = "cfg-if";
version = "0.1.10";
edition = "2018";
sha256 = "08h80ihs74jcyp24cd75wwabygbbdgl05k6p5dmq8akbr78vv1a7";
authors = [
"Alex Crichton <alex@alexcrichton.com>"
];
features = {
"rustc-dep-of-std" = [ "core" "compiler_builtins" ];
};
};
"cfg-if 1.0.0" = rec {
crateName = "cfg-if";
version = "1.0.0";
edition = "2018";
sha256 = "1za0vb97n4brpzpv8lsbnzmq5r8f2b0cpqqr0sy8h5bn751xxwds";
authors = [
"Alex Crichton <alex@alexcrichton.com>"
];
features = {
"rustc-dep-of-std" = [ "core" "compiler_builtins" ];
};
};
"clap" = rec {
crateName = "clap";
version = "2.33.3";
edition = "2015";
sha256 = "00i065a58987k1sbzqmlz721rw521zcg08jmsh40gi3khp3qmr9p";
authors = [
"Kevin K. <kbknapp@gmail.com>"
];
dependencies = [
{
name = "ansi_term";
packageId = "ansi_term";
optional = true;
target = { target, features }: (!target."windows");
}
{
name = "atty";
packageId = "atty";
optional = true;
}
{
name = "bitflags";
packageId = "bitflags";
}
{
name = "strsim";
packageId = "strsim";
optional = true;
}
{
name = "textwrap";
packageId = "textwrap";
}
{
name = "unicode-width";
packageId = "unicode-width";
}
{
name = "vec_map";
packageId = "vec_map";
optional = true;
}
];
features = {
"color" = [ "ansi_term" "atty" ];
"default" = [ "suggestions" "color" "vec_map" ];
"doc" = [ "yaml" ];
"lints" = [ "clippy" ];
"suggestions" = [ "strsim" ];
"wrap_help" = [ "term_size" "textwrap/term_size" ];
"yaml" = [ "yaml-rust" ];
};
resolvedDefaultFeatures = [ "ansi_term" "atty" "color" "default" "strsim" "suggestions" "vec_map" ];
};
"colmena" = rec {
crateName = "colmena";
version = "0.1.0";
edition = "2018";
crateBin = [
{ name = "colmena"; path = "src/main.rs"; }
];
src = lib.cleanSourceWith { filter = sourceFilter; src = ./.; };
authors = [
"Zhaofeng Li <hello@zhaofeng.li>"
];
dependencies = [
{
name = "async-trait";
packageId = "async-trait";
}
{
name = "clap";
packageId = "clap";
}
{
name = "console";
packageId = "console";
}
{
name = "futures";
packageId = "futures";
}
{
name = "glob";
packageId = "glob";
}
{
name = "indicatif";
packageId = "indicatif";
}
{
name = "log";
packageId = "log";
}
{
name = "serde";
packageId = "serde";
features = [ "derive" ];
}
{
name = "serde_json";
packageId = "serde_json";
}
{
name = "snafu";
packageId = "snafu";
}
{
name = "tempfile";
packageId = "tempfile";
}
{
name = "tokio";
packageId = "tokio";
features = [ "full" ];
}
];
};
"console" = rec {
crateName = "console";
version = "0.13.0";
edition = "2018";
sha256 = "022ai0jbbawngrx396qppwgzk4pk3v2fdwckzamvz6h154jsn2m5";
authors = [
"Armin Ronacher <armin.ronacher@active-4.com>"
];
dependencies = [
{
name = "encode_unicode";
packageId = "encode_unicode";
target = { target, features }: target."windows";
}
{
name = "lazy_static";
packageId = "lazy_static";
}
{
name = "libc";
packageId = "libc";
}
{
name = "regex";
packageId = "regex";
optional = true;
usesDefaultFeatures = false;
features = [ "std" ];
}
{
name = "terminal_size";
packageId = "terminal_size";
}
{
name = "unicode-width";
packageId = "unicode-width";
optional = true;
}
{
name = "winapi";
packageId = "winapi";
target = { target, features }: target."windows";
features = [ "winbase" "winuser" "consoleapi" "processenv" "wincon" ];
}
{
name = "winapi-util";
packageId = "winapi-util";
optional = true;
target = { target, features }: target."windows";
}
];
features = {
"ansi-parsing" = [ "regex" ];
"default" = [ "unicode-width" "ansi-parsing" "windows-console-colors" ];
"windows-console-colors" = [ "ansi-parsing" "winapi-util" ];
};
resolvedDefaultFeatures = [ "ansi-parsing" "default" "regex" "unicode-width" "winapi-util" "windows-console-colors" ];
};
"doc-comment" = rec {
crateName = "doc-comment";
version = "0.3.3";
edition = "2015";
sha256 = "043sprsf3wl926zmck1bm7gw0jq50mb76lkpk49vasfr6ax1p97y";
libName = "doc_comment";
authors = [
"Guillaume Gomez <guillaume1.gomez@gmail.com>"
];
features = {
};
};
"encode_unicode" = rec {
crateName = "encode_unicode";
version = "0.3.6";
edition = "2015";
sha256 = "07w3vzrhxh9lpjgsg2y5bwzfar2aq35mdznvcp3zjl0ssj7d4mx3";
authors = [
"Torbjørn Birch Moltu <t.b.moltu@lyse.net>"
];
features = {
"default" = [ "std" ];
};
resolvedDefaultFeatures = [ "default" "std" ];
};
"futures" = rec {
crateName = "futures";
version = "0.3.8";
edition = "2018";
sha256 = "1l434mh7p5na5c3c7lih575hszqc515r9idk62fm5rhz1820qfwv";
authors = [
"Alex Crichton <alex@alexcrichton.com>"
];
dependencies = [
{
name = "futures-channel";
packageId = "futures-channel";
usesDefaultFeatures = false;
features = [ "sink" ];
}
{
name = "futures-core";
packageId = "futures-core";
usesDefaultFeatures = false;
}
{
name = "futures-executor";
packageId = "futures-executor";
optional = true;
usesDefaultFeatures = false;
}
{
name = "futures-io";
packageId = "futures-io";
usesDefaultFeatures = false;
}
{
name = "futures-sink";
packageId = "futures-sink";
usesDefaultFeatures = false;
}
{
name = "futures-task";
packageId = "futures-task";
usesDefaultFeatures = false;
}
{
name = "futures-util";
packageId = "futures-util";
usesDefaultFeatures = false;
features = [ "sink" ];
}
];
features = {
"alloc" = [ "futures-core/alloc" "futures-task/alloc" "futures-sink/alloc" "futures-channel/alloc" "futures-util/alloc" ];
"async-await" = [ "futures-util/async-await" "futures-util/async-await-macro" ];
"bilock" = [ "futures-util/bilock" ];
"cfg-target-has-atomic" = [ "futures-core/cfg-target-has-atomic" "futures-task/cfg-target-has-atomic" "futures-channel/cfg-target-has-atomic" "futures-util/cfg-target-has-atomic" ];
"compat" = [ "std" "futures-util/compat" ];
"default" = [ "std" "async-await" "executor" ];
"executor" = [ "std" "futures-executor/std" ];
"io-compat" = [ "compat" "futures-util/io-compat" ];
"read-initializer" = [ "futures-io/read-initializer" "futures-util/read-initializer" ];
"std" = [ "alloc" "futures-core/std" "futures-task/std" "futures-io/std" "futures-sink/std" "futures-util/std" "futures-util/io" "futures-util/channel" ];
"thread-pool" = [ "executor" "futures-executor/thread-pool" ];
"unstable" = [ "futures-core/unstable" "futures-task/unstable" "futures-channel/unstable" "futures-io/unstable" "futures-util/unstable" ];
"write-all-vectored" = [ "futures-util/write-all-vectored" ];
};
resolvedDefaultFeatures = [ "alloc" "async-await" "default" "executor" "futures-executor" "std" ];
};
"futures-channel" = rec {
crateName = "futures-channel";
version = "0.3.8";
edition = "2018";
sha256 = "0r7y228kkhwx9jj3ny5ppmw2gvw0capm6ig8dzppgqd4g9l0jwab";
authors = [
"Alex Crichton <alex@alexcrichton.com>"
];
dependencies = [
{
name = "futures-core";
packageId = "futures-core";
usesDefaultFeatures = false;
}
{
name = "futures-sink";
packageId = "futures-sink";
optional = true;
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" "futures-sink" "sink" "std" ];
};
"futures-core" = rec {
crateName = "futures-core";
version = "0.3.8";
edition = "2018";
sha256 = "0j0pixxv8dmqas1h5cgy92z4r9lpmnlis8ls22v17yrgnwqy2z44";
authors = [
"Alex Crichton <alex@alexcrichton.com>"
];
features = {
"default" = [ "std" ];
"std" = [ "alloc" ];
};
resolvedDefaultFeatures = [ "alloc" "default" "std" ];
};
"futures-executor" = rec {
crateName = "futures-executor";
version = "0.3.8";
edition = "2018";
sha256 = "0r8ayj6g08d1i0hj2v6g5zr3hzlkxpqlkpf1awq0105qd0mjpajc";
authors = [
"Alex Crichton <alex@alexcrichton.com>"
];
dependencies = [
{
name = "futures-core";
packageId = "futures-core";
usesDefaultFeatures = false;
}
{
name = "futures-task";
packageId = "futures-task";
usesDefaultFeatures = false;
}
{
name = "futures-util";
packageId = "futures-util";
usesDefaultFeatures = false;
}
];
features = {
"default" = [ "std" ];
"std" = [ "futures-core/std" "futures-task/std" "futures-util/std" ];
"thread-pool" = [ "std" "num_cpus" ];
};
resolvedDefaultFeatures = [ "std" ];
};
"futures-io" = rec {
crateName = "futures-io";
version = "0.3.8";
edition = "2018";
sha256 = "1frh7d0n96lczy22al3bkgwpq0p1agbgax5kqh9vv8da33738631";
authors = [
"Alex Crichton <alex@alexcrichton.com>"
];
features = {
"default" = [ "std" ];
};
resolvedDefaultFeatures = [ "std" ];
};
"futures-macro" = rec {
crateName = "futures-macro";
version = "0.3.8";
edition = "2018";
sha256 = "0mjmb46zapb59iilsbljpj7l0hq6w19df0f03p3br5qz5xlqlh3p";
procMacro = true;
authors = [
"Taylor Cramer <cramertj@google.com>"
"Taiki Endo <te316e89@gmail.com>"
];
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.8";
edition = "2018";
sha256 = "0gfb1z97q861ki6lqsvpgfn3hnm9w3vkrf82dc00xrff95d1jy7q";
authors = [
"Alex Crichton <alex@alexcrichton.com>"
];
features = {
"default" = [ "std" ];
"std" = [ "alloc" ];
};
resolvedDefaultFeatures = [ "alloc" "std" ];
};
"futures-task" = rec {
crateName = "futures-task";
version = "0.3.8";
edition = "2018";
sha256 = "03ad39v8scy353src2f9dkkvcs24n736iavi8xn45cj8pyslwmbw";
authors = [
"Alex Crichton <alex@alexcrichton.com>"
];
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.8";
edition = "2018";
sha256 = "1lnbhpyrypn9giw6122af0pffxfijfz3zm7phrwzp75rlzscy16k";
authors = [
"Alex Crichton <alex@alexcrichton.com>"
];
dependencies = [
{
name = "futures-channel";
packageId = "futures-channel";
optional = true;
usesDefaultFeatures = false;
features = [ "std" ];
}
{
name = "futures-core";
packageId = "futures-core";
usesDefaultFeatures = false;
}
{
name = "futures-io";
packageId = "futures-io";
optional = true;
usesDefaultFeatures = false;
features = [ "std" ];
}
{
name = "futures-macro";
packageId = "futures-macro";
optional = true;
usesDefaultFeatures = false;
}
{
name = "futures-sink";
packageId = "futures-sink";
optional = true;
usesDefaultFeatures = false;
}
{
name = "futures-task";
packageId = "futures-task";
usesDefaultFeatures = false;
}
{
name = "memchr";
packageId = "memchr";
optional = true;
}
{
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" "channel" "futures-channel" "futures-io" "futures-macro" "futures-sink" "io" "memchr" "proc-macro-hack" "proc-macro-nested" "sink" "slab" "std" ];
};
"getrandom" = rec {
crateName = "getrandom";
version = "0.1.15";
edition = "2018";
sha256 = "1rj7psnlrnmsgyj6x2ag4c6367laq4g8kfd6pzamac99xk07nn7w";
authors = [
"The Rand Project Developers"
];
dependencies = [
{
name = "cfg-if";
packageId = "cfg-if 0.1.10";
}
{
name = "libc";
packageId = "libc";
usesDefaultFeatures = false;
target = { target, features }: target."unix";
}
{
name = "wasi";
packageId = "wasi";
target = { target, features }: (target."os" == "wasi");
}
];
features = {
"rustc-dep-of-std" = [ "compiler_builtins" "core" ];
"test-in-browser" = [ "wasm-bindgen" ];
};
resolvedDefaultFeatures = [ "std" ];
};
"glob" = rec {
crateName = "glob";
version = "0.3.0";
edition = "2015";
sha256 = "0x25wfr7vg3mzxc9x05dcphvd3nwlcmbnxrvwcvrrdwplcrrk4cv";
authors = [
"The Rust Project Developers"
];
};
"hermit-abi" = rec {
crateName = "hermit-abi";
version = "0.1.17";
edition = "2018";
sha256 = "1s1ss7xypnbpjglmj5k39svzsmni1rqp57a91qi5pyv0yxjmbjjs";
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" ];
};
"indicatif" = rec {
crateName = "indicatif";
version = "0.15.0";
edition = "2018";
sha256 = "1r4n50mclyi4c7b9c9mlma1rhchjamw71r3z8vgqcmp24mhvbakv";
authors = [
"Armin Ronacher <armin.ronacher@active-4.com>"
];
dependencies = [
{
name = "console";
packageId = "console";
}
{
name = "lazy_static";
packageId = "lazy_static";
}
{
name = "number_prefix";
packageId = "number_prefix";
}
{
name = "regex";
packageId = "regex";
usesDefaultFeatures = false;
features = [ "std" ];
}
];
features = {
"improved_unicode" = [ "unicode-segmentation" "unicode-width" "console/unicode-width" ];
"with_rayon" = [ "rayon" ];
};
resolvedDefaultFeatures = [ "default" ];
};
"instant" = rec {
crateName = "instant";
version = "0.1.9";
edition = "2018";
sha256 = "1v659qqm55misvjijfbl1p7azjp4yynjbwldan8836ynpgp4w4k1";
authors = [
"sebcrozet <developer@crozet.re>"
];
dependencies = [
{
name = "cfg-if";
packageId = "cfg-if 1.0.0";
}
];
features = {
"now" = [ "time" ];
"wasm-bindgen" = [ "js-sys" "wasm-bindgen_rs" "web-sys" ];
};
};
"itoa" = rec {
crateName = "itoa";
version = "0.4.6";
edition = "2015";
sha256 = "1rnpb7rr8df76gnlk07b9086cn7fc0dxxy1ghh00q6nip7bklvyw";
authors = [
"David Tolnay <dtolnay@gmail.com>"
];
features = {
"default" = [ "std" ];
};
};
"lazy_static" = rec {
crateName = "lazy_static";
version = "1.4.0";
edition = "2015";
sha256 = "0in6ikhw8mgl33wjv6q6xfrb5b9jr16q8ygjy803fay4zcisvaz2";
authors = [
"Marvin Löbel <loebel.marvin@gmail.com>"
];
features = {
"spin_no_std" = [ "spin" ];
};
};
"libc" = rec {
crateName = "libc";
version = "0.2.81";
edition = "2015";
sha256 = "1jsk82v5snd286ba92lir5snrxl18qm3kjkagz8c97hn0q9q50hl";
authors = [
"The Rust Project Developers"
];
features = {
"default" = [ "std" ];
"rustc-dep-of-std" = [ "align" "rustc-std-workspace-core" ];
"use_std" = [ "std" ];
};
resolvedDefaultFeatures = [ "align" "default" "std" ];
};
"lock_api" = rec {
crateName = "lock_api";
version = "0.4.2";
edition = "2018";
sha256 = "04hkhfq308agxg9wwmzh7ncfiyyyhn0d49n07abppzdj6p8zz5nx";
authors = [
"Amanieu d'Antras <amanieu@gmail.com>"
];
dependencies = [
{
name = "scopeguard";
packageId = "scopeguard";
usesDefaultFeatures = false;
}
];
features = {
};
};
"log" = rec {
crateName = "log";
version = "0.4.11";
edition = "2015";
sha256 = "12xzqaflpiljn5cmxsbnbv9sjaj13ykhwsvll0gysbx4blbyvasg";
authors = [
"The Rust Project Developers"
];
dependencies = [
{
name = "cfg-if";
packageId = "cfg-if 0.1.10";
}
];
features = {
"kv_unstable_sval" = [ "kv_unstable" "sval/fmt" ];
};
};
"memchr" = rec {
crateName = "memchr";
version = "2.3.4";
edition = "2015";
sha256 = "098m9clfs495illlw00hv2gg67mhm7jflld3msyclvi5m9xc9q8f";
authors = [
"Andrew Gallant <jamslam@gmail.com>"
"bluss"
];
features = {
"default" = [ "std" ];
"use_std" = [ "std" ];
};
resolvedDefaultFeatures = [ "default" "std" ];
};
"mio" = rec {
crateName = "mio";
version = "0.7.6";
edition = "2018";
sha256 = "12qsvmsmpijnghgci5i0liskvwxrbg2dz6hc09kgvwaf0s3whfzk";
authors = [
"Carl Lerche <me@carllerche.com>"
];
dependencies = [
{
name = "libc";
packageId = "libc";
target = { target, features }: target."unix";
}
{
name = "log";
packageId = "log";
}
{
name = "miow";
packageId = "miow";
target = { target, features }: target."windows";
}
{
name = "ntapi";
packageId = "ntapi";
target = { target, features }: target."windows";
}
{
name = "winapi";
packageId = "winapi";
target = { target, features }: target."windows";
features = [ "winsock2" "mswsock" ];
}
];
features = {
"os-ext" = [ "os-poll" ];
"os-util" = [ "os-ext" ];
"pipe" = [ "os-ext" ];
"tcp" = [ "net" ];
"udp" = [ "net" ];
"uds" = [ "net" ];
};
resolvedDefaultFeatures = [ "default" "net" "os-ext" "os-poll" "os-util" "tcp" "udp" "uds" ];
};
"miow" = rec {
crateName = "miow";
version = "0.3.6";
edition = "2018";
sha256 = "15sqdhh29dqgw5xh59clwv6scbsbvdkbmdc16hbfvyq7b2sw2css";
authors = [
"Alex Crichton <alex@alexcrichton.com>"
];
dependencies = [
{
name = "socket2";
packageId = "socket2";
}
{
name = "winapi";
packageId = "winapi";
features = [ "std" "fileapi" "handleapi" "ioapiset" "minwindef" "namedpipeapi" "ntdef" "synchapi" "winerror" "winsock2" "ws2def" "ws2ipdef" ];
}
];
};
"ntapi" = rec {
crateName = "ntapi";
version = "0.3.6";
edition = "2018";
sha256 = "0i5daj9sr8wyi5jkpwpybln2jqpn59z0mqfc0dpdidipwh1bjsrz";
authors = [
"MSxDOS <melcodos@gmail.com>"
];
dependencies = [
{
name = "winapi";
packageId = "winapi";
features = [ "cfg" "evntrace" "in6addr" "inaddr" "minwinbase" "ntsecapi" "windef" "winioctl" ];
}
];
features = {
"default" = [ "user" ];
"impl-default" = [ "winapi/impl-default" ];
};
resolvedDefaultFeatures = [ "default" "user" ];
};
"num_cpus" = rec {
crateName = "num_cpus";
version = "1.13.0";
edition = "2015";
sha256 = "1cv6yxhz2zbnwn8pn1yn8grg7zsnd523947fby41a737aqvryj85";
authors = [
"Sean McArthur <sean@seanmonstar.com>"
];
dependencies = [
{
name = "hermit-abi";
packageId = "hermit-abi";
target = { target, features }: (((target."arch" == "x86_64") || (target."arch" == "aarch64")) && (target."os" == "hermit"));
}
{
name = "libc";
packageId = "libc";
}
];
};
"number_prefix" = rec {
crateName = "number_prefix";
version = "0.3.0";
edition = "2015";
sha256 = "0slm4mqmpgs6hvz22ycny9lvyvl9ivs80a1lncslp7lszz02zc0p";
authors = [
"Benjamin Sago <ogham@bsago.me>"
];
features = {
"default" = [ "std" ];
};
resolvedDefaultFeatures = [ "default" "std" ];
};
"once_cell" = rec {
crateName = "once_cell";
version = "1.5.2";
edition = "2018";
sha256 = "183zs1dbmsv24mkafjypf9qwjrx46an58vb004a162l113sl3g8k";
authors = [
"Aleksey Kladov <aleksey.kladov@gmail.com>"
];
features = {
"default" = [ "std" ];
"std" = [ "alloc" ];
};
resolvedDefaultFeatures = [ "alloc" "default" "std" ];
};
"parking_lot" = rec {
crateName = "parking_lot";
version = "0.11.1";
edition = "2018";
sha256 = "1sqmgaia8zfd5fbnqw2w13ijh7crk3lf9vw4cb52vwlx0an48xvd";
authors = [
"Amanieu d'Antras <amanieu@gmail.com>"
];
dependencies = [
{
name = "instant";
packageId = "instant";
}
{
name = "lock_api";
packageId = "lock_api";
}
{
name = "parking_lot_core";
packageId = "parking_lot_core";
}
];
features = {
"deadlock_detection" = [ "parking_lot_core/deadlock_detection" ];
"nightly" = [ "parking_lot_core/nightly" "lock_api/nightly" ];
"owning_ref" = [ "lock_api/owning_ref" ];
"serde" = [ "lock_api/serde" ];
"stdweb" = [ "instant/stdweb" ];
"wasm-bindgen" = [ "instant/wasm-bindgen" ];
};
resolvedDefaultFeatures = [ "default" ];
};
"parking_lot_core" = rec {
crateName = "parking_lot_core";
version = "0.8.1";
edition = "2018";
sha256 = "1l6fhxks1xc8vbcwlz2119canmaql5hfhny51552hibl8awdkinp";
authors = [
"Amanieu d'Antras <amanieu@gmail.com>"
];
dependencies = [
{
name = "cfg-if";
packageId = "cfg-if 1.0.0";
}
{
name = "instant";
packageId = "instant";
}
{
name = "libc";
packageId = "libc";
target = { target, features }: target."unix";
}
{
name = "redox_syscall";
packageId = "redox_syscall";
target = { target, features }: (target."os" == "redox");
}
{
name = "smallvec";
packageId = "smallvec";
}
{
name = "winapi";
packageId = "winapi";
target = { target, features }: target."windows";
features = [ "winnt" "ntstatus" "minwindef" "winerror" "winbase" "errhandlingapi" "handleapi" ];
}
];
features = {
"deadlock_detection" = [ "petgraph" "thread-id" "backtrace" ];
};
};
"pin-project" = rec {
crateName = "pin-project";
version = "1.0.2";
edition = "2018";
sha256 = "19qw2nm2kk38v9j16nsm8j3fkh0g8pjq0k4cplx7i2f4q8vj5k4w";
authors = [
"Taiki Endo <te316e89@gmail.com>"
];
dependencies = [
{
name = "pin-project-internal";
packageId = "pin-project-internal";
usesDefaultFeatures = false;
}
];
};
"pin-project-internal" = rec {
crateName = "pin-project-internal";
version = "1.0.2";
edition = "2018";
sha256 = "0pwy3m32scf3ypjb9ai151lmaa27vyj06lc64i28l0r31fzx5s7q";
procMacro = true;
authors = [
"Taiki Endo <te316e89@gmail.com>"
];
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.2.0";
edition = "2018";
sha256 = "070klqy200alrhxb79fxarrrrn0vbwg95dmqw9062vhqxibky1kb";
authors = [
"Taiki Endo <te316e89@gmail.com>"
];
};
"pin-utils" = rec {
crateName = "pin-utils";
version = "0.1.0";
edition = "2018";
sha256 = "117ir7vslsl2z1a7qzhws4pd01cg2d3338c47swjyvqv2n60v1wb";
authors = [
"Josef Brandl <mail@josefbrandl.de>"
];
};
"ppv-lite86" = rec {
crateName = "ppv-lite86";
version = "0.2.10";
edition = "2018";
sha256 = "0ms8198kclg4h96ggbziixxmsdl847s648kmbx11zlmjsqjccx5c";
authors = [
"The CryptoCorrosion Contributors"
];
features = {
"default" = [ "std" ];
};
resolvedDefaultFeatures = [ "simd" "std" ];
};
"proc-macro-hack" = rec {
crateName = "proc-macro-hack";
version = "0.5.19";
edition = "2018";
sha256 = "1rg0kzsj7lj00qj602d3h77spwfz48vixn1wbjp7a4yrq65w9w6v";
procMacro = true;
authors = [
"David Tolnay <dtolnay@gmail.com>"
];
};
"proc-macro-nested" = rec {
crateName = "proc-macro-nested";
version = "0.1.6";
edition = "2015";
sha256 = "0nnwm9bvp1fmr8nqjp8ynrkj97yzpsdh3062li8b0f4hzgd818gb";
authors = [
"David Tolnay <dtolnay@gmail.com>"
];
};
"proc-macro2" = rec {
crateName = "proc-macro2";
version = "1.0.24";
edition = "2018";
sha256 = "0wcabxzrddcjmryndw8fpyxcq6rw63m701vx86xxf03y3bp081qy";
authors = [
"Alex Crichton <alex@alexcrichton.com>"
"David Tolnay <dtolnay@gmail.com>"
];
dependencies = [
{
name = "unicode-xid";
packageId = "unicode-xid";
}
];
features = {
"default" = [ "proc-macro" ];
};
resolvedDefaultFeatures = [ "default" "proc-macro" ];
};
"quote" = rec {
crateName = "quote";
version = "1.0.7";
edition = "2018";
sha256 = "0drzd6pq7whq7qhdvvs8wn6pbb0hhc12pz8wv80fb05ixhbksmma";
authors = [
"David Tolnay <dtolnay@gmail.com>"
];
dependencies = [
{
name = "proc-macro2";
packageId = "proc-macro2";
usesDefaultFeatures = false;
}
];
features = {
"default" = [ "proc-macro" ];
"proc-macro" = [ "proc-macro2/proc-macro" ];
};
resolvedDefaultFeatures = [ "default" "proc-macro" ];
};
"rand" = rec {
crateName = "rand";
version = "0.7.3";
edition = "2018";
sha256 = "00sdaimkbz491qgi6qxkv582yivl32m2jd401kzbn94vsiwicsva";
authors = [
"The Rand Project Developers"
"The Rust Project Developers"
];
dependencies = [
{
name = "getrandom";
packageId = "getrandom";
rename = "getrandom_package";
optional = true;
}
{
name = "libc";
packageId = "libc";
optional = true;
usesDefaultFeatures = false;
target = { target, features }: target."unix";
}
{
name = "rand_chacha";
packageId = "rand_chacha";
usesDefaultFeatures = false;
target = { target, features }: (!(target."os" == "emscripten"));
}
{
name = "rand_core";
packageId = "rand_core";
}
{
name = "rand_hc";
packageId = "rand_hc";
target = { target, features }: (target."os" == "emscripten");
}
];
devDependencies = [
{
name = "rand_hc";
packageId = "rand_hc";
}
];
features = {
"alloc" = [ "rand_core/alloc" ];
"default" = [ "std" ];
"getrandom" = [ "getrandom_package" "rand_core/getrandom" ];
"nightly" = [ "simd_support" ];
"simd_support" = [ "packed_simd" ];
"small_rng" = [ "rand_pcg" ];
"std" = [ "rand_core/std" "rand_chacha/std" "alloc" "getrandom" "libc" ];
"stdweb" = [ "getrandom_package/stdweb" ];
"wasm-bindgen" = [ "getrandom_package/wasm-bindgen" ];
};
resolvedDefaultFeatures = [ "alloc" "default" "getrandom" "getrandom_package" "libc" "std" ];
};
"rand_chacha" = rec {
crateName = "rand_chacha";
version = "0.2.2";
edition = "2018";
sha256 = "00il36fkdbsmpr99p9ksmmp6dn1md7rmnwmz0rr77jbrca2yvj7l";
authors = [
"The Rand Project Developers"
"The Rust Project Developers"
"The CryptoCorrosion Contributors"
];
dependencies = [
{
name = "ppv-lite86";
packageId = "ppv-lite86";
usesDefaultFeatures = false;
features = [ "simd" ];
}
{
name = "rand_core";
packageId = "rand_core";
}
];
features = {
"default" = [ "std" "simd" ];
"std" = [ "ppv-lite86/std" ];
};
resolvedDefaultFeatures = [ "std" ];
};
"rand_core" = rec {
crateName = "rand_core";
version = "0.5.1";
edition = "2018";
sha256 = "06bdvx08v3rkz451cm7z59xwwqn1rkfh6v9ay77b14f8dwlybgch";
authors = [
"The Rand Project Developers"
"The Rust Project Developers"
];
dependencies = [
{
name = "getrandom";
packageId = "getrandom";
optional = true;
}
];
features = {
"serde1" = [ "serde" ];
"std" = [ "alloc" "getrandom" "getrandom/std" ];
};
resolvedDefaultFeatures = [ "alloc" "getrandom" "std" ];
};
"rand_hc" = rec {
crateName = "rand_hc";
version = "0.2.0";
edition = "2018";
sha256 = "0g31sqwpmsirdlwr0svnacr4dbqyz339im4ssl9738cjgfpjjcfa";
authors = [
"The Rand Project Developers"
];
dependencies = [
{
name = "rand_core";
packageId = "rand_core";
}
];
};
"redox_syscall" = rec {
crateName = "redox_syscall";
version = "0.1.57";
edition = "2015";
sha256 = "1kh59fpwy33w9nwd5iyc283yglq8pf2s41hnhvl48iax9mz0zk21";
libName = "syscall";
authors = [
"Jeremy Soller <jackpot51@gmail.com>"
];
};
"regex" = rec {
crateName = "regex";
version = "1.4.2";
edition = "2015";
sha256 = "172bw2yryv65whn3n5vkww4kgk0bq08lx0zbln8xwia7xl9jrkrq";
authors = [
"The Rust Project Developers"
];
dependencies = [
{
name = "regex-syntax";
packageId = "regex-syntax";
usesDefaultFeatures = false;
}
];
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 = [ "std" ];
};
"regex-syntax" = rec {
crateName = "regex-syntax";
version = "0.6.21";
edition = "2015";
sha256 = "12d176jkgw9749g07zjxz0n78nyvb2nqx3j4sp5aqyphvji1n61v";
authors = [
"The Rust Project Developers"
];
features = {
"default" = [ "unicode" ];
"unicode" = [ "unicode-age" "unicode-bool" "unicode-case" "unicode-gencat" "unicode-perl" "unicode-script" "unicode-segment" ];
};
};
"remove_dir_all" = rec {
crateName = "remove_dir_all";
version = "0.5.3";
edition = "2015";
sha256 = "1rzqbsgkmr053bxxl04vmvsd1njyz0nxvly97aip6aa2cmb15k9s";
authors = [
"Aaronepower <theaaronepower@gmail.com>"
];
dependencies = [
{
name = "winapi";
packageId = "winapi";
target = { target, features }: target."windows";
features = [ "std" "errhandlingapi" "winerror" "fileapi" "winbase" ];
}
];
};
"ryu" = rec {
crateName = "ryu";
version = "1.0.5";
edition = "2018";
sha256 = "0vpqv1dj7fksa6hm3zpk5rbsjs0ifbfy7xwzsyyil0rx37a03lvi";
authors = [
"David Tolnay <dtolnay@gmail.com>"
];
features = {
};
};
"scopeguard" = rec {
crateName = "scopeguard";
version = "1.1.0";
edition = "2015";
sha256 = "1kbqm85v43rq92vx7hfiay6pmcga03vrjbbfwqpyj3pwsg3b16nj";
authors = [
"bluss"
];
features = {
"default" = [ "use_std" ];
};
};
"serde" = rec {
crateName = "serde";
version = "1.0.118";
edition = "2015";
sha256 = "0028kv3dh3ix5g7jfws22zb9hcqq4cnpwn2lnlpam1wxhmil5ih6";
authors = [
"Erick Tryzelaar <erick.tryzelaar@gmail.com>"
"David Tolnay <dtolnay@gmail.com>"
];
dependencies = [
{
name = "serde_derive";
packageId = "serde_derive";
optional = true;
}
];
devDependencies = [
{
name = "serde_derive";
packageId = "serde_derive";
}
];
features = {
"default" = [ "std" ];
"derive" = [ "serde_derive" ];
};
resolvedDefaultFeatures = [ "default" "derive" "serde_derive" "std" ];
};
"serde_derive" = rec {
crateName = "serde_derive";
version = "1.0.118";
edition = "2015";
sha256 = "1pvj4v8k107ichsnm7jgm9kxyi2lf971x52bmxhm5mcwd4k3akf8";
procMacro = true;
authors = [
"Erick Tryzelaar <erick.tryzelaar@gmail.com>"
"David Tolnay <dtolnay@gmail.com>"
];
dependencies = [
{
name = "proc-macro2";
packageId = "proc-macro2";
}
{
name = "quote";
packageId = "quote";
}
{
name = "syn";
packageId = "syn";
features = [ "visit" ];
}
];
features = {
};
resolvedDefaultFeatures = [ "default" ];
};
"serde_json" = rec {
crateName = "serde_json";
version = "1.0.60";
edition = "2018";
sha256 = "0yapc7xxk8dx12691yj0l13008rgvknmc6krvk8jwj7y4x6yh00m";
authors = [
"Erick Tryzelaar <erick.tryzelaar@gmail.com>"
"David Tolnay <dtolnay@gmail.com>"
];
dependencies = [
{
name = "itoa";
packageId = "itoa";
usesDefaultFeatures = false;
}
{
name = "ryu";
packageId = "ryu";
}
{
name = "serde";
packageId = "serde";
usesDefaultFeatures = false;
}
];
features = {
"alloc" = [ "serde/alloc" ];
"default" = [ "std" ];
"preserve_order" = [ "indexmap" ];
"std" = [ "serde/std" ];
};
resolvedDefaultFeatures = [ "default" "std" ];
};
"signal-hook-registry" = rec {
crateName = "signal-hook-registry";
version = "1.2.2";
edition = "2015";
sha256 = "1ar0dd9q1w952knhs0fx7qfh4iq5jvcvwkw1xg5fmmandh6flcnf";
authors = [
"Michal 'vorner' Vaner <vorner@vorner.cz>"
"Masaki Hara <ackie.h.gmai@gmail.com>"
];
dependencies = [
{
name = "libc";
packageId = "libc";
}
];
};
"slab" = rec {
crateName = "slab";
version = "0.4.2";
edition = "2015";
sha256 = "1y59xsa27jk84sxzswjk60xcjf8b4fm5960jwpznrrcmasyva4f1";
authors = [
"Carl Lerche <me@carllerche.com>"
];
};
"smallvec" = rec {
crateName = "smallvec";
version = "1.5.1";
edition = "2018";
sha256 = "0xcxvc2lh2fj02d91v4dx1l4q14m5rb4yac788bhwxvxdl2lylmf";
authors = [
"The Servo Project Developers"
];
features = {
};
};
"snafu" = rec {
crateName = "snafu";
version = "0.6.10";
edition = "2018";
sha256 = "19wwqxwb85pl040qk5xylj0vlznib3xzy9hcv2q0h8qv4qy2vcga";
authors = [
"Jake Goulding <jake.goulding@gmail.com>"
];
dependencies = [
{
name = "doc-comment";
packageId = "doc-comment";
usesDefaultFeatures = false;
}
{
name = "snafu-derive";
packageId = "snafu-derive";
}
];
features = {
"backtraces" = [ "std" "backtrace" ];
"backtraces-impl-backtrace-crate" = [ "backtraces" ];
"default" = [ "std" "guide" ];
"futures" = [ "futures-core-crate" "pin-project" ];
"futures-01" = [ "futures-01-crate" ];
"internal-dev-dependencies" = [ "futures-crate" ];
"unstable-backtraces-impl-std" = [ "backtraces" "snafu-derive/unstable-backtraces-impl-std" ];
};
resolvedDefaultFeatures = [ "default" "guide" "std" ];
};
"snafu-derive" = rec {
crateName = "snafu-derive";
version = "0.6.10";
edition = "2018";
sha256 = "0nri7ma06g5kimpcdcm8359a55nmps5f3kcngy0j6bin7jhfy20m";
procMacro = true;
authors = [
"Jake Goulding <jake.goulding@gmail.com>"
];
dependencies = [
{
name = "proc-macro2";
packageId = "proc-macro2";
}
{
name = "quote";
packageId = "quote";
}
{
name = "syn";
packageId = "syn";
features = [ "full" ];
}
];
features = {
};
};
"socket2" = rec {
crateName = "socket2";
version = "0.3.17";
edition = "2018";
sha256 = "00k98q2ab98j9ffmmsh0wlwck2apy83a7v5bfy122apfpmx98a9c";
authors = [
"Alex Crichton <alex@alexcrichton.com>"
];
dependencies = [
{
name = "cfg-if";
packageId = "cfg-if 1.0.0";
target = { target, features }: (target."unix" || (target."os" == "redox"));
}
{
name = "libc";
packageId = "libc";
target = { target, features }: (target."unix" || (target."os" == "redox"));
features = [ "align" ];
}
{
name = "redox_syscall";
packageId = "redox_syscall";
target = { target, features }: (target."os" == "redox");
}
{
name = "winapi";
packageId = "winapi";
target = { target, features }: target."windows";
features = [ "handleapi" "ws2def" "ws2ipdef" "ws2tcpip" "minwindef" ];
}
];
features = {
};
};
"strsim" = rec {
crateName = "strsim";
version = "0.8.0";
edition = "2015";
sha256 = "0sjsm7hrvjdifz661pjxq5w4hf190hx53fra8dfvamacvff139cf";
authors = [
"Danny Guo <dannyguo91@gmail.com>"
];
};
"syn" = rec {
crateName = "syn";
version = "1.0.54";
edition = "2018";
sha256 = "0i3z22zvzzsmrsbhi0ivpmv71fgxkcywjnf3alid8srxlrbzjals";
authors = [
"David Tolnay <dtolnay@gmail.com>"
];
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" "visit-mut" ];
};
"tempfile" = rec {
crateName = "tempfile";
version = "3.1.0";
edition = "2018";
sha256 = "1a9cfdqw70n7bcnkx05aih9xdba8lqazmqlkjpkmn2la6gcj8vks";
authors = [
"Steven Allen <steven@stebalien.com>"
"The Rust Project Developers"
"Ashley Mannix <ashleymannix@live.com.au>"
"Jason White <jasonaw0@gmail.com>"
];
dependencies = [
{
name = "cfg-if";
packageId = "cfg-if 0.1.10";
}
{
name = "libc";
packageId = "libc";
target = { target, features }: target."unix";
}
{
name = "rand";
packageId = "rand";
}
{
name = "redox_syscall";
packageId = "redox_syscall";
target = { target, features }: (target."os" == "redox");
}
{
name = "remove_dir_all";
packageId = "remove_dir_all";
}
{
name = "winapi";
packageId = "winapi";
target = { target, features }: target."windows";
features = [ "fileapi" "handleapi" "winbase" ];
}
];
};
"terminal_size" = rec {
crateName = "terminal_size";
version = "0.1.15";
edition = "2018";
sha256 = "1qfb07d040wh3m4yfnbxknda7i5fr56ypnwdwdgmzb1zpn1x3ljb";
authors = [
"Andrew Chin <achin@eminence32.net>"
];
dependencies = [
{
name = "libc";
packageId = "libc";
target = { target, features }: (!target."windows");
}
{
name = "winapi";
packageId = "winapi";
target = { target, features }: target."windows";
features = [ "handleapi" "processenv" "winbase" "wincon" "winnt" ];
}
];
};
"textwrap" = rec {
crateName = "textwrap";
version = "0.11.0";
edition = "2015";
sha256 = "0q5hky03ik3y50s9sz25r438bc4nwhqc6dqwynv4wylc807n29nk";
authors = [
"Martin Geisler <martin@geisler.net>"
];
dependencies = [
{
name = "unicode-width";
packageId = "unicode-width";
}
];
};
"tokio" = rec {
crateName = "tokio";
version = "0.3.6";
edition = "2018";
sha256 = "0z78l7kn4y2qvghsp9dyqgvr1kjvv63pjq3d8nzi31q74lfa42vj";
authors = [
"Tokio Contributors <team@tokio.rs>"
];
dependencies = [
{
name = "bytes";
packageId = "bytes";
optional = true;
}
{
name = "futures-core";
packageId = "futures-core";
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 = "num_cpus";
packageId = "num_cpus";
optional = true;
}
{
name = "once_cell";
packageId = "once_cell";
optional = true;
}
{
name = "parking_lot";
packageId = "parking_lot";
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";
optional = true;
usesDefaultFeatures = false;
target = { target, features }: target."windows";
}
];
buildDependencies = [
{
name = "autocfg";
packageId = "autocfg";
}
];
devDependencies = [
{
name = "libc";
packageId = "libc";
target = {target, features}: target."unix";
}
];
features = {
"full" = [ "fs" "io-util" "io-std" "macros" "net" "parking_lot" "process" "rt" "rt-multi-thread" "signal" "stream" "sync" "time" ];
"io-util" = [ "memchr" "bytes" ];
"macros" = [ "tokio-macros" ];
"net" = [ "libc" "mio/os-poll" "mio/os-util" "mio/tcp" "mio/udp" "mio/uds" ];
"process" = [ "bytes" "once_cell" "libc" "mio/os-poll" "mio/os-util" "mio/uds" "signal-hook-registry" "winapi/threadpoollegacyapiset" ];
"rt" = [ "slab" ];
"rt-multi-thread" = [ "num_cpus" "rt" ];
"signal" = [ "once_cell" "libc" "mio/os-poll" "mio/uds" "mio/os-util" "signal-hook-registry" "winapi/consoleapi" ];
"stream" = [ "futures-core" ];
};
resolvedDefaultFeatures = [ "bytes" "default" "fs" "full" "futures-core" "io-std" "io-util" "libc" "macros" "memchr" "mio" "net" "num_cpus" "once_cell" "parking_lot" "process" "rt" "rt-multi-thread" "signal" "signal-hook-registry" "slab" "stream" "sync" "time" "tokio-macros" "winapi" ];
};
"tokio-macros" = rec {
crateName = "tokio-macros";
version = "0.3.1";
edition = "2018";
sha256 = "0iaw1k9qcn3fjgl4qcqwl8if8jjdkldam4cn0j8qybfwnpdhzlr1";
procMacro = true;
authors = [
"Tokio Contributors <team@tokio.rs>"
];
dependencies = [
{
name = "proc-macro2";
packageId = "proc-macro2";
}
{
name = "quote";
packageId = "quote";
}
{
name = "syn";
packageId = "syn";
features = [ "full" ];
}
];
};
"unicode-width" = rec {
crateName = "unicode-width";
version = "0.1.8";
edition = "2015";
sha256 = "1qxizyi6xbcqyi4z79p523ywvmgsfcgfqb3zv3c8i6x1jcc5jdwk";
authors = [
"kwantam <kwantam@gmail.com>"
"Manish Goregaokar <manishsmail@gmail.com>"
];
features = {
"rustc-dep-of-std" = [ "std" "core" "compiler_builtins" ];
};
resolvedDefaultFeatures = [ "default" ];
};
"unicode-xid" = rec {
crateName = "unicode-xid";
version = "0.2.1";
edition = "2015";
sha256 = "0r6mknipyy9vpz8mwmxvkx65ff2ha1n2pxqjj6f46lcn8yrhpzpp";
authors = [
"erick.tryzelaar <erick.tryzelaar@gmail.com>"
"kwantam <kwantam@gmail.com>"
];
features = {
};
resolvedDefaultFeatures = [ "default" ];
};
"vec_map" = rec {
crateName = "vec_map";
version = "0.8.2";
edition = "2015";
sha256 = "1481w9g1dw9rxp3l6snkdqihzyrd2f8vispzqmwjwsdyhw8xzggi";
authors = [
"Alex Crichton <alex@alexcrichton.com>"
"Jorge Aparicio <japaricious@gmail.com>"
"Alexis Beingessner <a.beingessner@gmail.com>"
"Brian Anderson <>"
"tbu- <>"
"Manish Goregaokar <>"
"Aaron Turon <aturon@mozilla.com>"
"Adolfo Ochagavía <>"
"Niko Matsakis <>"
"Steven Fackler <>"
"Chase Southwood <csouth3@illinois.edu>"
"Eduard Burtescu <>"
"Florian Wilkens <>"
"Félix Raimundo <>"
"Tibor Benke <>"
"Markus Siemens <markus@m-siemens.de>"
"Josh Branchaud <jbranchaud@gmail.com>"
"Huon Wilson <dbau.pp@gmail.com>"
"Corey Farwell <coref@rwell.org>"
"Aaron Liblong <>"
"Nick Cameron <nrc@ncameron.org>"
"Patrick Walton <pcwalton@mimiga.net>"
"Felix S Klock II <>"
"Andrew Paseltiner <apaseltiner@gmail.com>"
"Sean McArthur <sean.monstar@gmail.com>"
"Vadim Petrochenkov <>"
];
features = {
"eders" = [ "serde" ];
};
};
"wasi" = rec {
crateName = "wasi";
version = "0.9.0+wasi-snapshot-preview1";
edition = "2018";
sha256 = "06g5v3vrdapfzvfq662cij7v8a1flwr2my45nnncdv2galrdzkfc";
authors = [
"The Cranelift Project Developers"
];
features = {
"default" = [ "std" ];
"rustc-dep-of-std" = [ "compiler_builtins" "core" "rustc-std-workspace-alloc" ];
};
resolvedDefaultFeatures = [ "default" "std" ];
};
"winapi" = rec {
crateName = "winapi";
version = "0.3.9";
edition = "2015";
sha256 = "06gl025x418lchw1wxj64ycr7gha83m44cjr5sarhynd9xkrm0sw";
authors = [
"Peter Atashian <retep998@gmail.com>"
];
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 = [ "cfg" "consoleapi" "errhandlingapi" "evntrace" "fileapi" "handleapi" "in6addr" "inaddr" "ioapiset" "minwinbase" "minwindef" "mswsock" "namedpipeapi" "ntdef" "ntsecapi" "ntstatus" "processenv" "std" "synchapi" "threadpoollegacyapiset" "winbase" "wincon" "windef" "winerror" "winioctl" "winnt" "winsock2" "winuser" "ws2def" "ws2ipdef" "ws2tcpip" ];
};
"winapi-i686-pc-windows-gnu" = rec {
crateName = "winapi-i686-pc-windows-gnu";
version = "0.4.0";
edition = "2015";
sha256 = "1dmpa6mvcvzz16zg6d5vrfy4bxgg541wxrcip7cnshi06v38ffxc";
authors = [
"Peter Atashian <retep998@gmail.com>"
];
};
"winapi-util" = rec {
crateName = "winapi-util";
version = "0.1.5";
edition = "2018";
sha256 = "0y71bp7f6d536czj40dhqk0d55wfbbwqfp2ymqf1an5ibgl6rv3h";
authors = [
"Andrew Gallant <jamslam@gmail.com>"
];
dependencies = [
{
name = "winapi";
packageId = "winapi";
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 <retep998@gmail.com>"
];
};
};
#
# 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
export RUST_BACKTRACE=1
# recreate a file hierarchy as when running tests with cargo
# the source for test data
${pkgs.xorg.lndir}/bin/lndir ${crate.src}
# build outputs
testRoot=target/debug
mkdir -p $testRoot
# executables of the crate
# we copy to prevent std::env::current_exe() to resolve to a store location
for i in ${crate}/bin/*; do
cp "$i" "$testRoot"
done
chmod +w -R .
# test harness executables are suffixed with a hash, like cargo does
# this allows to prevent name collision with the main
# executables of the crate
hash=$(basename $out)
for file in ${drv}/tests/*; do
f=$testRoot/$(basename $file)-$hash
cp $file $f
$f $testCrateFlags 2>&1 | tee -a $out
done
'';
in
pkgs.runCommand "${crate.name}-linked"
{
inherit (crate) outputs crateName;
passthru = (crate.passthru or { }) // {
inherit test;
};
} ''
echo tested by ${test}
${lib.concatMapStringsSep "\n" (output: "ln -s ${crate.${output}} ${"$"}${output}") crate.outputs}
'';
/* A restricted overridable version of builtRustCratesWithFeatures. */
buildRustCrateWithFeatures =
{ packageId
, features ? rootFeatures
, crateOverrides ? defaultCrateOverrides
, buildRustCrateFunc ? null
, runTests ? false
, testCrateFlags ? [ ]
, testInputs ? [ ]
}:
lib.makeOverridable
(
{ features
, crateOverrides
, runTests
, testCrateFlags
, testInputs
}:
let
buildRustCrateFuncOverriden =
if buildRustCrateFunc != null
then buildRustCrateFunc
else
(
if crateOverrides == pkgs.defaultCrateOverrides
then buildRustCrate
else
buildRustCrate.override {
defaultCrateOverrides = crateOverrides;
}
);
builtRustCrates = builtRustCratesWithFeatures {
inherit packageId features;
buildRustCrateFunc = buildRustCrateFuncOverriden;
runTests = false;
};
builtTestRustCrates = builtRustCratesWithFeatures {
inherit packageId features;
buildRustCrateFunc = buildRustCrateFuncOverriden;
runTests = true;
};
drv = builtRustCrates.${packageId};
testDrv = builtTestRustCrates.${packageId};
derivation =
if runTests then
crateWithTest
{
crate = drv;
testCrate = testDrv;
inherit testCrateFlags testInputs;
}
else drv;
in
derivation
)
{ 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
)
);
# Crate renames have the form:
#
# {
# crate_name = [
# { version = "1.2.3"; rename = "crate_name01"; }
# ];
# # ...
# }
crateRenames =
let
grouped =
lib.groupBy
(dependency: dependency.name)
dependenciesWithRenames;
versionAndRename = dep:
let
package = builtByPackageId."${dep.packageId}";
in
{ inherit (dep) rename; version = package.version; };
in
lib.mapAttrs (name: choices: builtins.map versionAndRename choices) grouped;
in
buildRustCrateFunc
(
crateConfig // {
src = crateConfig.src or (
pkgs.fetchurl rec {
name = "${crateConfig.crateName}-${crateConfig.version}.tar.gz";
# https://www.pietroalbini.org/blog/downloading-crates-io/
# Not rate-limited, CDN URL.
url = "https://static.crates.io/crates/${crateConfig.crateName}/${crateConfig.crateName}-${crateConfig.version}.crate";
sha256 =
assert (lib.assertMsg (crateConfig ? sha256) "Missing sha256 for ${name}");
crateConfig.sha256;
}
);
extraRustcOpts = lib.lists.optional (targetFeatures != [ ]) "-C target-feature=${stdenv.lib.concatMapStringsSep "," (x: "+${x}") targetFeatures}";
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 = lib.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)
#
};
}