66815c4d9d7eef2fca9ebd276d4280e23042af27 — Daniël de Kok 2 months ago 0ec5927
alpino-tokenize: init at 0.1.0
3 files changed, 1170 insertions(+), 0 deletions(-)

M default.nix
A pkgs/alpino-tokenize/Cargo.nix
A pkgs/alpino-tokenize/default.nix
M default.nix => default.nix +1 -0
@@ 3,6 3,7 @@
 rec {
   # Homegrown software
   alpinocorpus = pkgs.callPackage ./pkgs/alpinocorpus {};
+  alpino-tokenize = pkgs.callPackage ./pkgs/alpino-tokenize {};
   citar = pkgs.callPackage ./pkgs/citar {};
   conllx-utils = pkgs.callPackage ./pkgs/conllx-utils {};
   dact = pkgs.libsForQt5.callPackage ./pkgs/dact { alpinocorpus = alpinocorpus; };

A pkgs/alpino-tokenize/Cargo.nix => pkgs/alpino-tokenize/Cargo.nix +1110 -0
@@ 0,0 1,1110 @@
+
+# Generated by crate2nix 0.6.0-alpha.0 with the command:
+#   "generate"
+# See https://github.com/kolloch/crate2nix for more info.
+
+{ pkgs? import <nixpkgs> { config = {}; },
+  lib? pkgs.lib,
+  callPackage? pkgs.callPackage,
+  stdenv? pkgs.stdenv,
+  buildRustCrate? pkgs.buildRustCrate,
+  fetchurl? pkgs.fetchurl,
+  fetchCrate? pkgs.fetchCrate,
+  # The features to enable for the root_crate or the workspace_members.
+  rootFeatures? ["default"]}:
+
+rec {
+  #
+  # "public" attributes that we attempt to keep stable with new versions of crate2nix.
+  #
+
+  
+  # Refer your crate build derivation by name here.
+  # You can override the features with
+  # workspaceMembers."${crateName}".build.override { features = [ "default" "feature1" ... ]; }.
+  workspaceMembers = {
+    "alpino-tokenize" = {
+      packageId = "alpino-tokenize 0.1.0 (path+file:///Users/daniel/git/alpino-tokenizer/alpino-tokenize)";
+      build = buildRustCrateWithFeatures {
+        packageId = "alpino-tokenize 0.1.0 (path+file:///Users/daniel/git/alpino-tokenizer/alpino-tokenize)";
+        features = rootFeatures;
+      };
+    };
+    "alpino-tokenizer" = {
+      packageId = "alpino-tokenizer 0.1.0 (path+file:///Users/daniel/git/alpino-tokenizer/alpino-tokenizer)";
+      build = buildRustCrateWithFeatures {
+        packageId = "alpino-tokenizer 0.1.0 (path+file:///Users/daniel/git/alpino-tokenizer/alpino-tokenizer)";
+        features = rootFeatures;
+      };
+    };
+    "alpino-tokenizer-sys" = {
+      packageId = "alpino-tokenizer-sys 0.1.0 (path+file:///Users/daniel/git/alpino-tokenizer/alpino-tokenizer-sys)";
+      build = buildRustCrateWithFeatures {
+        packageId = "alpino-tokenizer-sys 0.1.0 (path+file:///Users/daniel/git/alpino-tokenizer/alpino-tokenizer-sys)";
+        features = rootFeatures;
+      };
+    };
+  };
+  workspace_members =
+    builtins.trace
+      "workspace_members is deprecated in crate2nix 0.4. Please use workspaceMembers instead."
+      lib.mapAttrs (n: v: v.build) workspaceMembers;
+
+  #
+  # "private" attributes that may change in every new version of crate2nix.
+  #
+
+  # Build and dependency information for crates.
+  # Many of the fields are passed one-to-one to buildRustCrate.
+  #
+  # Noteworthy:
+  # * `crateBin = [{name = ","; path = ",";}];`: a hack to disable building the binary.
+  # * `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.
+
+  crates = {
+    "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "aho-corasick";
+        version = "0.7.6";
+        edition = "2015";
+        sha256 = "1srdggg7iawz7rfyb79qfnz6vmzkgl6g6gabyd9ad6pbx7zzj8gz";
+        libName = "aho_corasick";
+        authors = [
+          "Andrew Gallant <jamslam@gmail.com>"
+        ];
+        dependencies = {
+          "memchr" = {
+            packageId = "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)";
+            usesDefaultFeatures = false;
+          };
+        };
+        features = {
+          "default" = [ "std" ];
+          "std" = [ "memchr/use_std" ];
+        };
+        resolvedDefaultFeatures = [ "default" "std" ];
+      };
+    "alpino-tokenize 0.1.0 (path+file:///Users/daniel/git/alpino-tokenizer/alpino-tokenize)"
+      = rec {
+        crateName = "alpino-tokenize";
+        version = "0.1.0";
+        edition = "2018";
+        src = (builtins.filterSource sourceFilter ./alpino-tokenize);
+        authors = [
+          "Daniël de Kok <me@danieldk.eu>"
+        ];
+        dependencies = {
+          "alpino-tokenizer" = "alpino-tokenizer 0.1.0 (path+file:///Users/daniel/git/alpino-tokenizer/alpino-tokenizer)";
+          "clap" = "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)";
+          "conllx" = "conllx 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)";
+          "lazy_static" = "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)";
+          "regex" = "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)";
+          "stdinout" = "stdinout 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)";
+        };
+        features = {
+        };
+      };
+    "alpino-tokenizer 0.1.0 (path+file:///Users/daniel/git/alpino-tokenizer/alpino-tokenizer)"
+      = rec {
+        crateName = "alpino-tokenizer";
+        version = "0.1.0";
+        edition = "2018";
+        src = (builtins.filterSource sourceFilter ./alpino-tokenizer);
+        authors = [
+          "Daniël de Kok <me@danieldk.eu>"
+        ];
+        dependencies = {
+          "alpino-tokenizer-sys" = "alpino-tokenizer-sys 0.1.0 (path+file:///Users/daniel/git/alpino-tokenizer/alpino-tokenizer-sys)";
+          "lazy_static" = "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)";
+          "libc" = "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)";
+          "regex" = "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)";
+          "widestring" = "widestring 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)";
+        };
+        features = {
+        };
+      };
+    "alpino-tokenizer-sys 0.1.0 (path+file:///Users/daniel/git/alpino-tokenizer/alpino-tokenizer-sys)"
+      = rec {
+        crateName = "alpino-tokenizer-sys";
+        version = "0.1.0";
+        edition = "2018";
+        src = (builtins.filterSource sourceFilter ./alpino-tokenizer-sys);
+        authors = [
+          "Daniël de Kok <me@danieldk.eu>"
+        ];
+        dependencies = {
+          "widestring" = "widestring 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)";
+        };
+        buildDependencies = {
+          "cc" = "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)";
+        };
+        features = {
+        };
+      };
+    "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "ansi_term";
+        version = "0.11.0";
+        edition = "2015";
+        sha256 = "08fk0p2xvkqpmz3zlrwnf6l8sj2vngw464rvzspzp31sbgxbwm4v";
+        authors = [
+          "ogham@bsago.me"
+          "Ryan Scheel (Havvy) <ryan.havvy@gmail.com>"
+          "Josh Triplett <josh@joshtriplett.org>"
+        ];
+        dependencies = {
+          "winapi" = {
+            packageId = "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)";
+            target = (target."os" == "windows");
+            features = [ "errhandlingapi" "consoleapi" "processenv" ];
+          };
+        };
+        features = {
+        };
+      };
+    "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "atty";
+        version = "0.2.13";
+        edition = "2015";
+        sha256 = "0a1ii8h9fvvrq05bz7j135zjjz1sjz6n2invn2ngxqri0jxgmip2";
+        authors = [
+          "softprops <d.tangren@gmail.com>"
+        ];
+        dependencies = {
+          "libc" = {
+            packageId = "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)";
+            usesDefaultFeatures = false;
+            target = target."unix";
+          };
+          "winapi" = {
+            packageId = "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)";
+            target = target."windows";
+            features = [ "consoleapi" "processenv" "minwinbase" "minwindef" "winbase" ];
+          };
+        };
+        features = {
+        };
+      };
+    "backtrace 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "backtrace";
+        version = "0.3.38";
+        edition = "2018";
+        sha256 = "0k41sw74xd19s9lsqab1rf94wi8l7ppfarib8hpd0y7q2iym5j41";
+        authors = [
+          "The Rust Project Developers"
+        ];
+        dependencies = {
+          "backtrace-sys" = {
+            packageId = "backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)";
+            optional = true;
+          };
+          "cfg-if" = "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)";
+          "libc" = {
+            packageId = "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)";
+            usesDefaultFeatures = false;
+          };
+          "rustc-demangle" = "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)";
+        };
+        features = {
+          "default" = [ "std" "libunwind" "libbacktrace" "dladdr" "dbghelp" ];
+          "gimli-symbolize" = [ "addr2line" "findshlibs" "memmap" "goblin" ];
+          "libbacktrace" = [ "backtrace-sys" ];
+          "rustc-dep-of-std" = [ "backtrace-sys/rustc-dep-of-std" "cfg-if/rustc-dep-of-std" "core" "compiler_builtins" "libc/rustc-dep-of-std" "rustc-demangle/rustc-dep-of-std" ];
+          "serialize-rustc" = [ "rustc-serialize" ];
+          "serialize-serde" = [ "serde" ];
+          "verify-winapi" = [ "winapi/dbghelp" "winapi/handleapi" "winapi/libloaderapi" "winapi/minwindef" "winapi/processthreadsapi" "winapi/synchapi" "winapi/winbase" "winapi/winnt" ];
+        };
+        resolvedDefaultFeatures = [ "backtrace-sys" "dbghelp" "default" "dladdr" "libbacktrace" "libunwind" "std" ];
+      };
+    "backtrace-sys 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "backtrace-sys";
+        version = "0.1.31";
+        edition = "2015";
+        sha256 = "1gv41cypl4y5r32za4gx2fks43d76sp1r3yb5524i4gs50lrkypv";
+        authors = [
+          "Alex Crichton <alex@alexcrichton.com>"
+        ];
+        dependencies = {
+          "libc" = {
+            packageId = "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)";
+            usesDefaultFeatures = false;
+          };
+        };
+        buildDependencies = {
+          "cc" = "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)";
+        };
+        features = {
+          "rustc-dep-of-std" = [ "core" "compiler_builtins" ];
+        };
+      };
+    "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "bitflags";
+        version = "1.2.0";
+        edition = "2015";
+        sha256 = "0cybfqfkplbznkvm0cjn6wv7vpp718i47ld4g84qrb0lwa0jpmcg";
+        authors = [
+          "The Rust Project Developers"
+        ];
+        features = {
+        };
+        resolvedDefaultFeatures = [ "default" ];
+      };
+    "cc 1.0.45 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "cc";
+        version = "1.0.45";
+        edition = "2018";
+        # Hack to suppress building binaries
+        crateBin = [{name = ","; path = ",";}];
+        sha256 = "0qhw9k5av9x6yvv4jfrji576wy90vgdnr76cifs8xqm70scdl2sm";
+        authors = [
+          "Alex Crichton <alex@alexcrichton.com>"
+        ];
+        features = {
+          "parallel" = [ "num_cpus" "jobserver" ];
+        };
+      };
+    "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "cfg-if";
+        version = "0.1.10";
+        edition = "2018";
+        sha256 = "0x52qzpbyl2f2jqs7kkqzgfki2cpq99gpfjjigdp8pwwfqk01007";
+        authors = [
+          "Alex Crichton <alex@alexcrichton.com>"
+        ];
+        features = {
+          "rustc-dep-of-std" = [ "core" "compiler_builtins" ];
+        };
+      };
+    "clap 2.33.0 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "clap";
+        version = "2.33.0";
+        edition = "2015";
+        sha256 = "054n9ngh6pkknpmd4acgdsp40iw6f5jzq8a4h2b76gnbvk6p5xjh";
+        authors = [
+          "Kevin K. <kbknapp@gmail.com>"
+        ];
+        dependencies = {
+          "ansi_term" = {
+            packageId = "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)";
+            optional = true;
+            target = (!target."windows");
+          };
+          "atty" = {
+            packageId = "atty 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)";
+            optional = true;
+          };
+          "bitflags" = "bitflags 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)";
+          "strsim" = {
+            packageId = "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)";
+            optional = true;
+          };
+          "textwrap" = "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)";
+          "unicode-width" = "unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)";
+          "vec_map" = {
+            packageId = "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)";
+            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" ];
+      };
+    "conllx 0.12.1 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "conllx";
+        version = "0.12.1";
+        edition = "2018";
+        sha256 = "1av3hdakxra33szd2i582xnh53d9zr2kpfj3xnna24vrj3ga1c0f";
+        authors = [
+          "Daniël de Kok <me@danieldk.eu>"
+        ];
+        dependencies = {
+          "failure" = "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)";
+          "itertools" = "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)";
+          "petgraph" = "petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)";
+        };
+        features = {
+        };
+      };
+    "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "either";
+        version = "1.5.3";
+        edition = "2015";
+        sha256 = "040fgh0jahqra9ascwb986zgll1ss88ky9bfvn0zfay42zsyz83n";
+        authors = [
+          "bluss"
+        ];
+        features = {
+          "default" = [ "use_std" ];
+        };
+      };
+    "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "failure";
+        version = "0.1.5";
+        edition = "2015";
+        sha256 = "1msaj1c0fg12dzyf4fhxqlx1gfx41lj2smdjmkc9hkrgajk2g3kx";
+        authors = [
+          "Without Boats <boats@mozilla.com>"
+        ];
+        dependencies = {
+          "backtrace" = {
+            packageId = "backtrace 0.3.38 (registry+https://github.com/rust-lang/crates.io-index)";
+            optional = true;
+          };
+          "failure_derive" = {
+            packageId = "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)";
+            optional = true;
+          };
+        };
+        features = {
+          "default" = [ "std" "derive" ];
+          "derive" = [ "failure_derive" ];
+          "std" = [ "backtrace" ];
+        };
+        resolvedDefaultFeatures = [ "backtrace" "default" "derive" "failure_derive" "std" ];
+      };
+    "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "failure_derive";
+        version = "0.1.5";
+        edition = "2015";
+        sha256 = "1wzk484b87r4qszcvdl2bkniv5ls4r2f2dshz7hmgiv6z4ln12g0";
+        procMacro = true;
+        authors = [
+          "Without Boats <woboats@gmail.com>"
+        ];
+        dependencies = {
+          "proc-macro2" = "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)";
+          "quote" = "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)";
+          "syn" = "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)";
+          "synstructure" = "synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)";
+        };
+        features = {
+        };
+      };
+    "fixedbitset 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "fixedbitset";
+        version = "0.1.9";
+        edition = "2015";
+        sha256 = "1bkb5aq7h9p4rzlgxagnda1f0dd11q0qz41bmdy11z18q1p8igy1";
+        authors = [
+          "bluss"
+        ];
+        features = {
+        };
+      };
+    "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "itertools";
+        version = "0.8.0";
+        edition = "2015";
+        sha256 = "0xpz59yf03vyj540i7sqypn2aqfid08c4vzyg0l6rqm08da77n7n";
+        authors = [
+          "bluss"
+        ];
+        dependencies = {
+          "either" = {
+            packageId = "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)";
+            usesDefaultFeatures = false;
+          };
+        };
+        features = {
+          "default" = [ "use_std" ];
+        };
+        resolvedDefaultFeatures = [ "default" "use_std" ];
+      };
+    "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "lazy_static";
+        version = "1.4.0";
+        edition = "2015";
+        sha256 = "13h6sdghdcy7vcqsm2gasfw3qg7ssa0fl3sw7lq6pdkbk52wbyfr";
+        authors = [
+          "Marvin Löbel <loebel.marvin@gmail.com>"
+        ];
+        features = {
+          "spin_no_std" = [ "spin" ];
+        };
+      };
+    "libc 0.2.62 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "libc";
+        version = "0.2.62";
+        edition = "2015";
+        sha256 = "1vsb4pyn6gl6sri6cv5hin5wjfgk7lk2bshzmxb1xnkckjhz4gbx";
+        authors = [
+          "The Rust Project Developers"
+        ];
+        features = {
+          "default" = [ "std" ];
+          "rustc-dep-of-std" = [ "align" "rustc-std-workspace-core" ];
+          "use_std" = [ "std" ];
+        };
+        resolvedDefaultFeatures = [ "default" "std" ];
+      };
+    "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "memchr";
+        version = "2.2.1";
+        edition = "2015";
+        sha256 = "1mj5z8lhz6jbapslpq8a39pwcsl1p0jmgp7wgcj7nv4pcqhya7a0";
+        authors = [
+          "Andrew Gallant <jamslam@gmail.com>"
+          "bluss"
+        ];
+        features = {
+          "default" = [ "use_std" ];
+        };
+        resolvedDefaultFeatures = [ "default" "use_std" ];
+      };
+    "ordermap 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "ordermap";
+        version = "0.3.5";
+        edition = "2015";
+        sha256 = "0b6vxfyh627yqm6war3392g1hhi4dbn49ibx2qv6mv490jdhv7d3";
+        authors = [
+          "bluss"
+        ];
+        features = {
+          "serde-1" = [ "serde" ];
+        };
+      };
+    "petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "petgraph";
+        version = "0.4.13";
+        edition = "2015";
+        sha256 = "0a8k12b9vd0bndwqhafa853w186axdw05bv4kqjimyaz67428g1i";
+        authors = [
+          "bluss"
+          "mitchmindtree"
+        ];
+        dependencies = {
+          "fixedbitset" = "fixedbitset 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)";
+          "ordermap" = {
+            packageId = "ordermap 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)";
+            optional = true;
+          };
+        };
+        features = {
+          "all" = [ "unstable" "quickcheck" "stable_graph" "graphmap" ];
+          "default" = [ "graphmap" "stable_graph" ];
+          "graphmap" = [ "ordermap" ];
+          "serde-1" = [ "serde" "serde_derive" ];
+          "unstable" = [ "generate" ];
+        };
+        resolvedDefaultFeatures = [ "default" "graphmap" "ordermap" "stable_graph" ];
+      };
+    "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "proc-macro2";
+        version = "0.4.30";
+        edition = "2015";
+        sha256 = "0iifv51wrm6r4r2gghw6rray3nv53zcap355bbz1nsmbhj5s09b9";
+        authors = [
+          "Alex Crichton <alex@alexcrichton.com>"
+        ];
+        dependencies = {
+          "unicode-xid" = "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)";
+        };
+        features = {
+          "default" = [ "proc-macro" ];
+        };
+        resolvedDefaultFeatures = [ "default" "proc-macro" ];
+      };
+    "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "quote";
+        version = "0.6.13";
+        edition = "2015";
+        sha256 = "1hrvsin40i4q8swrhlj9057g7nsp0lg02h8zbzmgz14av9mzv8g8";
+        authors = [
+          "David Tolnay <dtolnay@gmail.com>"
+        ];
+        dependencies = {
+          "proc-macro2" = {
+            packageId = "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)";
+            usesDefaultFeatures = false;
+          };
+        };
+        features = {
+          "default" = [ "proc-macro" ];
+          "proc-macro" = [ "proc-macro2/proc-macro" ];
+        };
+        resolvedDefaultFeatures = [ "default" "proc-macro" ];
+      };
+    "regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "regex";
+        version = "1.3.1";
+        edition = "2015";
+        sha256 = "0508b01q7iwky5gzp1cc3lpz6al1qam8skgcvkfgxr67nikiz7jn";
+        authors = [
+          "The Rust Project Developers"
+        ];
+        dependencies = {
+          "aho-corasick" = {
+            packageId = "aho-corasick 0.7.6 (registry+https://github.com/rust-lang/crates.io-index)";
+            optional = true;
+          };
+          "memchr" = {
+            packageId = "memchr 2.2.1 (registry+https://github.com/rust-lang/crates.io-index)";
+            optional = true;
+          };
+          "regex-syntax" = {
+            packageId = "regex-syntax 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)";
+            usesDefaultFeatures = false;
+          };
+          "thread_local" = {
+            packageId = "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)";
+            optional = true;
+          };
+        };
+        features = {
+          "default" = [ "std" "perf" "unicode" ];
+          "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" ];
+          "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 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "regex-syntax";
+        version = "0.6.12";
+        edition = "2015";
+        sha256 = "1lqhddhwzpgq8zfkxhm241n7g4m3yc11fb4098dkgawbxvybr53v";
+        authors = [
+          "The Rust Project Developers"
+        ];
+        features = {
+          "default" = [ "unicode" ];
+          "unicode" = [ "unicode-age" "unicode-bool" "unicode-case" "unicode-gencat" "unicode-perl" "unicode-script" "unicode-segment" ];
+        };
+        resolvedDefaultFeatures = [ "unicode-age" "unicode-bool" "unicode-case" "unicode-gencat" "unicode-perl" "unicode-script" "unicode-segment" ];
+      };
+    "rustc-demangle 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "rustc-demangle";
+        version = "0.1.16";
+        edition = "2015";
+        sha256 = "0zmn448d0f898ahfkz7cir0fi0vk84dabjpw84mk6a1r6nf9vzmi";
+        authors = [
+          "Alex Crichton <alex@alexcrichton.com>"
+        ];
+        features = {
+          "rustc-dep-of-std" = [ "core" "compiler_builtins" ];
+        };
+      };
+    "stdinout 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "stdinout";
+        version = "0.4.0";
+        edition = "2015";
+        sha256 = "197vgpiml8img4n1dgpa4gx7qi8kf87y3gbhlndqp72rifhk7jdd";
+        authors = [
+          "Daniël de Kok <me@danieldk.eu>"
+        ];
+        features = {
+        };
+      };
+    "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "strsim";
+        version = "0.8.0";
+        edition = "2015";
+        sha256 = "0d3jsdz22wgjyxdakqnvdgmwjdvkximz50d9zfk4qlalw635qcvy";
+        authors = [
+          "Danny Guo <dannyguo91@gmail.com>"
+        ];
+        features = {
+        };
+      };
+    "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "syn";
+        version = "0.15.44";
+        edition = "2015";
+        sha256 = "09v11h141grmsnamd5j14mn8vpnfng6p60kdmsm8akz9m0qn7s1n";
+        authors = [
+          "David Tolnay <dtolnay@gmail.com>"
+        ];
+        dependencies = {
+          "proc-macro2" = {
+            packageId = "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)";
+            usesDefaultFeatures = false;
+          };
+          "quote" = {
+            packageId = "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)";
+            optional = true;
+            usesDefaultFeatures = false;
+          };
+          "unicode-xid" = "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)";
+        };
+        features = {
+          "default" = [ "derive" "parsing" "printing" "clone-impls" "proc-macro" ];
+          "printing" = [ "quote" ];
+          "proc-macro" = [ "proc-macro2/proc-macro" "quote/proc-macro" ];
+        };
+        resolvedDefaultFeatures = [ "clone-impls" "default" "derive" "extra-traits" "parsing" "printing" "proc-macro" "quote" "visit" ];
+      };
+    "synstructure 0.10.2 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "synstructure";
+        version = "0.10.2";
+        edition = "2015";
+        sha256 = "0bp29grjsim99xm1l6h38mbl98gnk47lf82rawlmws5zn4asdpj4";
+        authors = [
+          "Nika Layzell <nika@thelayzells.com>"
+        ];
+        dependencies = {
+          "proc-macro2" = "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)";
+          "quote" = "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)";
+          "syn" = {
+            packageId = "syn 0.15.44 (registry+https://github.com/rust-lang/crates.io-index)";
+            features = [ "visit" "extra-traits" ];
+          };
+          "unicode-xid" = "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)";
+        };
+        features = {
+        };
+      };
+    "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "textwrap";
+        version = "0.11.0";
+        edition = "2015";
+        sha256 = "0s25qh49n7kjayrdj4q3v0jk0jc6vy88rdw0bvgfxqlscpqpxi7d";
+        authors = [
+          "Martin Geisler <martin@geisler.net>"
+        ];
+        dependencies = {
+          "unicode-width" = "unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)";
+        };
+        features = {
+        };
+      };
+    "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "thread_local";
+        version = "0.3.6";
+        edition = "2015";
+        sha256 = "02rksdwjmz2pw9bmgbb4c0bgkbq5z6nvg510sq1s6y2j1gam0c7i";
+        authors = [
+          "Amanieu d'Antras <amanieu@gmail.com>"
+        ];
+        dependencies = {
+          "lazy_static" = "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)";
+        };
+        features = {
+        };
+      };
+    "unicode-width 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "unicode-width";
+        version = "0.1.6";
+        edition = "2015";
+        sha256 = "1mss965j7d8pv7z7zg6qfkcb7lyhxkxvbh8akzr4xxxx3vzazwsi";
+        authors = [
+          "kwantam <kwantam@gmail.com>"
+        ];
+        features = {
+          "rustc-dep-of-std" = [ "std" "core" "compiler_builtins" ];
+        };
+        resolvedDefaultFeatures = [ "default" ];
+      };
+    "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "unicode-xid";
+        version = "0.1.0";
+        edition = "2015";
+        sha256 = "05wdmwlfzxhq3nhsxn6wx4q8dhxzzfb9szsz6wiw092m1rjj01zj";
+        authors = [
+          "erick.tryzelaar <erick.tryzelaar@gmail.com>"
+          "kwantam <kwantam@gmail.com>"
+        ];
+        features = {
+        };
+        resolvedDefaultFeatures = [ "default" ];
+      };
+    "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "vec_map";
+        version = "0.8.1";
+        edition = "2015";
+        sha256 = "1jj2nrg8h3l53d43rwkpkikq5a5x15ms4rf1rw92hp5lrqhi8mpi";
+        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" ];
+        };
+      };
+    "widestring 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "widestring";
+        version = "0.4.0";
+        edition = "2015";
+        sha256 = "12j8w7jsn60wr1wir2dnspn3b0480my2ksa95f3qxyvb8h1q7xnj";
+        authors = [
+          "Kathryn Long <squeeself@gmail.com>"
+        ];
+        features = {
+        };
+      };
+    "winapi 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "winapi";
+        version = "0.3.8";
+        edition = "2015";
+        sha256 = "084ialbgww1vxry341fmkg5crgpvab3w52ahx1wa54yqjgym0vxs";
+        authors = [
+          "Peter Atashian <retep998@gmail.com>"
+        ];
+        dependencies = {
+          "winapi-i686-pc-windows-gnu" = {
+            packageId = "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)";
+            target = (stdenv.hostPlatform.config == "i686-pc-windows-gnu");
+          };
+          "winapi-x86_64-pc-windows-gnu" = {
+            packageId = "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)";
+            target = (stdenv.hostPlatform.config == "x86_64-pc-windows-gnu");
+          };
+        };
+        features = {
+          "debug" = [ "impl-debug" ];
+        };
+        resolvedDefaultFeatures = [ "consoleapi" "errhandlingapi" "minwinbase" "minwindef" "processenv" "winbase" ];
+      };
+    "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "winapi-i686-pc-windows-gnu";
+        version = "0.4.0";
+        edition = "2015";
+        sha256 = "05ihkij18r4gamjpxj4gra24514can762imjzlmak5wlzidplzrp";
+        authors = [
+          "Peter Atashian <retep998@gmail.com>"
+        ];
+        features = {
+        };
+      };
+    "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)"
+      = rec {
+        crateName = "winapi-x86_64-pc-windows-gnu";
+        version = "0.4.0";
+        edition = "2015";
+        sha256 = "0n1ylmlsb8yg1v583i4xy0qmqg42275flvbc51hdqjjfjcl9vlbj";
+        authors = [
+          "Peter Atashian <retep998@gmail.com>"
+        ];
+        features = {
+        };
+      };
+  };
+
+  #
+  # crate2nix/default.nix (excerpt start)
+  # 
+
+  # Target (platform) data for conditional dependencies.
+  # This corresponds to what buildRustCrate is setting.
+  target = {
+      unix = true;
+      windows = 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
+      # lib.hasSuffix ".nix" baseName ||
+
+      # 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"
+    );
+
+  /* A restricted overridable version of  buildRustCrateWithFeaturesImpl. */
+  buildRustCrateWithFeatures = {packageId, features}:
+    lib.makeOverridable
+      (args@{features, ...}:
+        let buildRustCrateArgs = lib.filterAttrs (n: _: n != "features") args;
+        in (buildRustCrateWithFeaturesImpl {inherit packageId features;}).override buildRustCrateArgs)
+      { inherit features; };
+
+  /* Returns a buildRustCrate derivation for the given packageId and features. */
+  buildRustCrateWithFeaturesImpl = { crateConfigs? crates, packageId, features } @ args:
+    assert (builtins.isAttrs crateConfigs);
+    assert (builtins.isString packageId);
+    assert (builtins.isList features);
+
+    let mergedFeatures = mergePackageFeatures args;
+        buildByPackageId = packageId:
+          let features = mergedFeatures."${packageId}" or [];
+              crateConfig = lib.filterAttrs (n: v: n != "resolvedDefaultFeatures") crateConfigs."${packageId}";
+              dependencies =
+                dependencyDerivations buildByPackageId features (crateConfig.dependencies or {});
+              buildDependencies =
+                dependencyDerivations buildByPackageId features (crateConfig.buildDependencies or {});
+              dependenciesWithRenames =
+                lib.filterAttrs (n: v: v ? "rename")
+                  (crateConfig.buildDependencies or {} // crateConfig.dependencies or {});
+              crateRenames =
+                lib.mapAttrs (name: value: value.rename or name) dependenciesWithRenames;
+          in buildRustCrate (crateConfig // { inherit features dependencies buildDependencies crateRenames; });
+    in buildByPackageId packageId;
+
+  /* Returns the actual derivations for the given dependencies. */
+  dependencyDerivations = buildByPackageId: features: dependencies:
+    assert (builtins.isFunction buildByPackageId);
+    assert (builtins.isList features);
+    assert (builtins.isAttrs dependencies);
+
+    let enabledDependencies = filterEnabledDependencies dependencies features;
+        depDerivation = dependencyName: dependency:
+        buildByPackageId (dependencyPackageId dependency);
+    in builtins.attrValues (lib.mapAttrs depDerivation enabledDependencies);
+
+  /* Returns differences between cargo default features and crate2nix default features.
+   *
+   * This is useful for verifying the feature resolution in crate2nix.
+   */
+  diffDefaultPackageFeatures = {crateConfigs ? crates, packageId}:
+    assert (builtins.isAttrs crateConfigs);
+
+    let prefixValues = prefix: lib.mapAttrs (n: v: { "${prefix}" = v; });
+        mergedFeatures =
+          prefixValues
+            "crate2nix"
+            (mergePackageFeatures {inherit crateConfigs packageId; 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 the feature configuration by package id for the given input crate. */
+  mergePackageFeatures = {crateConfigs ? crates, packageId, features} @ args:
+    assert (builtins.isAttrs crateConfigs);
+    assert (builtins.isString packageId);
+    assert (builtins.isList features);
+
+    let packageFeatures = listOfPackageFeatures args;
+        grouped = lib.groupBy (x: x.packageId) packageFeatures;
+    in lib.mapAttrs (n: v: sortedUnique (builtins.concatLists (builtins.map (v: v.features) v))) grouped;
+
+  /* Returns a { packageId, features } attribute set for every package needed for building the
+     package for the given packageId with the given features.
+
+     Returns multiple, potentially conflicting attribute sets for dependencies that are reachable
+     by multiple paths in the dependency tree.
+  */
+  listOfPackageFeatures = {crateConfigs ? crates, packageId, features, dependencyPath? [packageId]} @ args:
+    assert (builtins.isAttrs crateConfigs);
+    assert (builtins.isString packageId);
+    assert (builtins.isList features);
+
+    let
+        crateConfig = crateConfigs."${packageId}" or (builtins.throw "Package not found: ${packageId}");
+        expandedFeatures = expandFeatures (crateConfig.features or {}) features;
+
+        depWithResolvedFeatures = dependencyName: dependency:
+          let packageId = dependencyPackageId dependency;
+              features = dependencyFeatures expandedFeatures dependencyName dependency;
+          in { inherit packageId features; };
+
+        resolveDependencies = path: dependencies:
+          assert (builtins.isAttrs dependencies);
+
+          let enabledDependencies = filterEnabledDependencies dependencies expandedFeatures;
+              directDependencies =
+                builtins.attrValues (lib.mapAttrs depWithResolvedFeatures enabledDependencies);
+          in builtins.concatMap
+            ({packageId, features}: listOfPackageFeatures {
+              # This is purely for debugging.
+              dependencyPath = dependencyPath ++ [path packageId];
+              inherit crateConfigs packageId features;
+            })
+             directDependencies;
+
+        resolvedDependencies = builtins.concatLists
+          [
+            (resolveDependencies "dependencies" (crateConfig.dependencies or {}))
+            (resolveDependencies "buildDependencies" (crateConfig.buildDependencies or {}))
+          ];
+
+    in [{inherit packageId; features = expandedFeatures;}] ++ resolvedDependencies;
+
+  /* Returns the enabled dependencies given the enabled features. */
+  filterEnabledDependencies = dependencies: features:
+    assert (builtins.isAttrs dependencies);
+    assert (builtins.isList features);
+
+    lib.filterAttrs
+      (depName: dep:
+        builtins.isString dep
+        || dep.target or true
+        && (!(dep.optional or false) || builtins.any (doesFeatureEnableDependency depName) features))
+      dependencies;
+
+  /* Returns whether the given feature should enable the given dependency. */
+  doesFeatureEnableDependency = depName: feature:
+    let prefix = "${depName}/";
+        len = builtins.stringLength prefix;
+        startsWithPrefix = builtins.substring 0 len feature == prefix;
+    in feature == depName || 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;
+
+  /* The package ID of the given dependency. */
+  dependencyPackageId = dependency: if builtins.isString dependency then dependency else dependency.packageId;
+
+  /* Returns the actual dependencies for the given dependency. */
+  dependencyFeatures = features: dependencyName: dependency:
+    assert (builtins.isList features);
+    assert (builtins.isString dependencyName);
+    assert (builtins.isAttrs dependency || builtins.isString dependency);
+
+    let defaultOrNil = if builtins.isString dependency || dependency.usesDefaultFeatures or true
+                       then ["default"]
+                       else [];
+        explicitFeatures = if builtins.isString dependency then [] else dependency.features or [];
+        additionalDependencyFeatures =
+
+          let dependencyPrefix = dependencyName+"/";
+              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;
+
+  #
+  # crate2nix/default.nix (excerpt end)
+  # 
+
+}

A pkgs/alpino-tokenize/default.nix => pkgs/alpino-tokenize/default.nix +59 -0
@@ 0,0 1,59 @@
+{ callPackage
+, lib
+, stdenv
+
+, fetchgit, defaultCrateOverrides
+
+# Native build inputs
+, installShellFiles ? null # Available in 19.09 and later.
+}:
+
+let
+  cargo_nix = callPackage ./Cargo.nix {};
+  src = fetchgit {
+    url = "https://git.sr.ht/~danieldk/alpino-tokenizer";
+    rev = "8260b09d925a77f63d8d7b14f68ed5124ba8d94b";
+    sha256 = "1jyrpg050s7yzvyaip3kna7w45dk2w1yccnq99qlmnr0v4zyrllc";
+  };
+in cargo_nix.workspaceMembers.alpino-tokenize.build.override {
+  crateOverrides = defaultCrateOverrides // {
+    alpino-tokenize = attr: {
+      inherit src;
+
+      nativeBuildInputs = lib.optional (!isNull installShellFiles) installShellFiles;
+
+      postBuild = ''
+        for shell in bash fish zsh; do
+          target/bin/alpino-tokenize completions $shell > completions.$shell
+        done
+      '';
+
+      postUnpack = "sourceRoot=$sourceRoot/alpino-tokenize";
+
+      postInstall = ''
+        rm -rf $out/lib
+        rm -f $out/bin/*.d
+      '' + lib.optionalString (!isNull installShellFiles) ''
+        # Install shell completions
+        installShellCompletion completions.{bash,fish,zsh}
+      '';
+
+      meta = with stdenv.lib; {
+        description = "Command-line Rust wrapper around the Alpino tokenizer";
+        license = licenses.lgpl21Plus;
+        maintainers = with maintainers; [ danieldk ];
+        platforms = platforms.unix;
+      };
+    };
+
+    alpino-tokenizer = attr: {
+      inherit src;
+      postUnpack = "sourceRoot=$sourceRoot/alpino-tokenizer";
+    };
+
+    alpino-tokenizer-sys = attr: {
+      inherit src;
+      postUnpack = "sourceRoot=$sourceRoot/alpino-tokenizer-sys";
+    };
+  };
+}