summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support')
-rwxr-xr-xpkgs/build-support/appimage/appimage-exec.sh3
-rw-r--r--pkgs/build-support/appimage/default.nix11
-rw-r--r--pkgs/build-support/bintools-wrapper/macos-sierra-reexport-hack.bash2
-rw-r--r--pkgs/build-support/build-bazel-package/default.nix120
-rw-r--r--pkgs/build-support/build-fhs-userenv-bubblewrap/default.nix3
-rw-r--r--pkgs/build-support/build-maven.nix85
-rw-r--r--pkgs/build-support/build-pecl.nix2
-rw-r--r--pkgs/build-support/cc-wrapper/add-hardening.sh4
-rw-r--r--pkgs/build-support/cc-wrapper/cc-wrapper.sh31
-rw-r--r--pkgs/build-support/cc-wrapper/default.nix13
-rw-r--r--pkgs/build-support/cc-wrapper/fortran-hook.sh2
-rw-r--r--pkgs/build-support/cc-wrapper/setup-hook.sh2
-rw-r--r--pkgs/build-support/coq/default.nix14
-rw-r--r--pkgs/build-support/docker/default.nix233
-rw-r--r--pkgs/build-support/docker/examples.nix151
-rw-r--r--pkgs/build-support/dotnet/build-dotnet-module/default.nix321
-rw-r--r--pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-build-hook.sh42
-rw-r--r--pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-check-hook.sh10
-rw-r--r--pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh38
-rw-r--r--pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-fixup-hook.sh25
-rw-r--r--pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-install-hook.sh60
-rw-r--r--pkgs/build-support/dotnet/make-nuget-deps/default.nix2
-rw-r--r--pkgs/build-support/dotnet/nuget-to-nix/default.nix10
-rwxr-xr-xpkgs/build-support/dotnet/nuget-to-nix/nuget-to-nix.sh88
-rw-r--r--pkgs/build-support/emacs/generic.nix2
-rw-r--r--pkgs/build-support/emacs/melpa.nix23
-rw-r--r--pkgs/build-support/emacs/package-build-dont-use-mtime.patch40
-rw-r--r--pkgs/build-support/fake-nss/default.nix6
-rw-r--r--pkgs/build-support/fetchgit/default.nix14
-rw-r--r--pkgs/build-support/fetchgit/tests.nix16
-rw-r--r--pkgs/build-support/fetchgithub/default.nix6
-rw-r--r--pkgs/build-support/fetchgitlab/default.nix2
-rw-r--r--pkgs/build-support/fetchmavenartifact/default.nix6
-rw-r--r--pkgs/build-support/fetchnextcloudapp/default.nix47
-rw-r--r--pkgs/build-support/fetchpatch/default.nix7
-rw-r--r--pkgs/build-support/fetchpatch/tests.nix10
-rw-r--r--pkgs/build-support/fetchurl/default.nix22
-rw-r--r--pkgs/build-support/fetchurl/tests.nix4
-rw-r--r--pkgs/build-support/fetchzip/default.nix17
-rw-r--r--pkgs/build-support/flutter/default.nix5
-rw-r--r--pkgs/build-support/kernel/make-initrd-ng.nix2
-rw-r--r--pkgs/build-support/make-impure-test.nix96
-rw-r--r--pkgs/build-support/make-symlinks/builder.sh9
-rw-r--r--pkgs/build-support/make-symlinks/default.nix7
-rw-r--r--pkgs/build-support/mkshell/default.nix15
-rw-r--r--pkgs/build-support/node/build-npm-package/default.nix56
-rw-r--r--pkgs/build-support/node/build-npm-package/hooks/default.nix35
-rw-r--r--pkgs/build-support/node/build-npm-package/hooks/npm-build-hook.sh38
-rw-r--r--pkgs/build-support/node/build-npm-package/hooks/npm-config-hook.sh115
-rw-r--r--pkgs/build-support/node/build-npm-package/hooks/npm-install-hook.sh43
-rw-r--r--pkgs/build-support/node/fetch-npm-deps/.gitignore1
-rw-r--r--pkgs/build-support/node/fetch-npm-deps/Cargo.lock689
-rw-r--r--pkgs/build-support/node/fetch-npm-deps/Cargo.toml19
-rw-r--r--pkgs/build-support/node/fetch-npm-deps/default.nix165
-rw-r--r--pkgs/build-support/node/fetch-npm-deps/src/cacache.rs116
-rw-r--r--pkgs/build-support/node/fetch-npm-deps/src/main.rs467
-rw-r--r--pkgs/build-support/node/fetch-npm-deps/src/tests.rs141
-rw-r--r--pkgs/build-support/node/fetch-yarn-deps/default.nix19
-rw-r--r--pkgs/build-support/ocaml/default.nix36
-rw-r--r--pkgs/build-support/portable-service/default.nix111
-rw-r--r--pkgs/build-support/references-by-popularity/default.nix1
-rw-r--r--pkgs/build-support/release/default.nix2
-rw-r--r--pkgs/build-support/release/maven-build.nix7
-rwxr-xr-x[-rw-r--r--]pkgs/build-support/remove-references-to/remove-references-to.sh2
-rw-r--r--pkgs/build-support/rust/build-rust-crate/configure-crate.nix21
-rw-r--r--pkgs/build-support/rust/build-rust-crate/lib.sh6
-rw-r--r--pkgs/build-support/rust/build-rust-package/default.nix14
-rw-r--r--pkgs/build-support/rust/carnix.nix259
-rw-r--r--pkgs/build-support/rust/crates-io.nix7756
-rw-r--r--pkgs/build-support/rust/default-crate-overrides.nix6
-rwxr-xr-xpkgs/build-support/rust/fetch-cargo-tarball/cargo-vendor-normalise.py4
-rw-r--r--pkgs/build-support/rust/fetch-cargo-tarball/default.nix15
-rw-r--r--pkgs/build-support/rust/fetchcrate.nix35
-rw-r--r--pkgs/build-support/rust/hooks/cargo-nextest-hook.sh54
-rw-r--r--pkgs/build-support/rust/hooks/cargo-setup-hook.sh14
-rw-r--r--pkgs/build-support/rust/hooks/default.nix50
-rw-r--r--pkgs/build-support/rust/lib/default.nix20
-rw-r--r--pkgs/build-support/setup-hooks/auto-patchelf.py7
-rw-r--r--pkgs/build-support/setup-hooks/auto-patchelf.sh2
-rw-r--r--pkgs/build-support/setup-hooks/make-binary-wrapper/default.nix6
-rw-r--r--pkgs/build-support/setup-hooks/multiple-outputs.sh2
-rw-r--r--pkgs/build-support/setup-hooks/patch-ppd-files/default.nix25
-rw-r--r--pkgs/build-support/setup-hooks/patch-ppd-files/patch-ppd-hook.sh183
-rw-r--r--pkgs/build-support/setup-hooks/patch-ppd-files/patch-ppd-lines.awk50
-rw-r--r--pkgs/build-support/setup-hooks/patch-ppd-files/test.nix40
-rw-r--r--pkgs/build-support/setup-hooks/patch-ppd-files/test.ppd22
-rw-r--r--pkgs/build-support/setup-hooks/patch-rc-path-hooks/default.nix60
-rw-r--r--pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-bash.sh50
-rw-r--r--pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-csh.sh57
-rw-r--r--pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-fish.sh50
-rw-r--r--pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-posix.sh39
-rw-r--r--pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/default.nix442
-rw-r--r--pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.bash2
-rw-r--r--pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.csh.in1
-rw-r--r--pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.fish9
-rw-r--r--pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.sh.in2
-rw-r--r--pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-bash21
-rw-r--r--pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-csh13
-rw-r--r--pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-fish13
-rw-r--r--pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-posix21
-rw-r--r--pkgs/build-support/setup-hooks/postgresql-test-hook/default.nix5
-rw-r--r--pkgs/build-support/setup-hooks/wrap-gapps-hook/default.nix5
-rw-r--r--pkgs/build-support/skaware/build-skaware-man-pages.nix45
-rw-r--r--pkgs/build-support/skaware/build-skaware-package.nix117
-rw-r--r--pkgs/build-support/skaware/clean-packaging.nix53
-rw-r--r--pkgs/build-support/src-only/default.nix2
-rw-r--r--pkgs/build-support/testers/default.nix56
-rw-r--r--pkgs/build-support/testers/expect-failure.sh62
-rw-r--r--pkgs/build-support/testers/test/default.nix174
-rw-r--r--pkgs/build-support/trivial-builders.nix61
-rw-r--r--pkgs/build-support/trivial-builders/test/link-farm.nix45
-rw-r--r--pkgs/build-support/writers/default.nix17
-rw-r--r--pkgs/build-support/writers/test.nix12
113 files changed, 4885 insertions, 8831 deletions
diff --git a/pkgs/build-support/appimage/appimage-exec.sh b/pkgs/build-support/appimage/appimage-exec.sh
index 4ff6802e645..b91d13c4a23 100755
--- a/pkgs/build-support/appimage/appimage-exec.sh
+++ b/pkgs/build-support/appimage/appimage-exec.sh
@@ -7,6 +7,9 @@ fi
 
 PATH="@path@:$PATH"
 apprun_opt=true
+OWD=$(readlink -f .)
+# can be read by appimages: https://docs.appimage.org/packaging-guide/environment-variables.html
+export OWD
 
 # src : AppImage
 # dest : let's unpack() create the directory
diff --git a/pkgs/build-support/appimage/default.nix b/pkgs/build-support/appimage/default.nix
index 17d5bca6566..bcda40c800f 100644
--- a/pkgs/build-support/appimage/default.nix
+++ b/pkgs/build-support/appimage/default.nix
@@ -61,6 +61,14 @@ rec {
     (args // {
       inherit name extraPkgs;
       src = extract { inherit name src; };
+
+      # passthru src to make nix-update work
+      # hack to keep the origin position (unsafeGetAttrPos)
+      passthru = lib.pipe args [
+        lib.attrNames
+        (lib.remove "src")
+        (removeAttrs args)
+      ] // args.passthru or { };
     });
 
   defaultFhsEnvArgs = {
@@ -71,7 +79,6 @@ rec {
       gtk3
       bashInteractive
       gnome.zenity
-      python2
       xorg.xrandr
       which
       perl
@@ -156,11 +163,13 @@ rec {
       wayland
       mesa
       libxkbcommon
+      vulkan-loader
 
       flac
       freeglut
       libjpeg
       libpng12
+      libpulseaudio
       libsamplerate
       libmikmod
       libtheora
diff --git a/pkgs/build-support/bintools-wrapper/macos-sierra-reexport-hack.bash b/pkgs/build-support/bintools-wrapper/macos-sierra-reexport-hack.bash
index 71b9471cbc8..255071adf68 100644
--- a/pkgs/build-support/bintools-wrapper/macos-sierra-reexport-hack.bash
+++ b/pkgs/build-support/bintools-wrapper/macos-sierra-reexport-hack.bash
@@ -136,7 +136,7 @@ while (( "${#norm[@]}" )); do
                 norm=("${norm[@]:1}")
             else
                 echo "ld-wrapper: Internal Error: Invalid normalized argument" >&2
-                exit -1
+                exit 255
             fi
             ;;
     esac
diff --git a/pkgs/build-support/build-bazel-package/default.nix b/pkgs/build-support/build-bazel-package/default.nix
index f379334786b..14f7ac38d3f 100644
--- a/pkgs/build-support/build-bazel-package/default.nix
+++ b/pkgs/build-support/build-bazel-package/default.nix
@@ -13,35 +13,37 @@ args@{
 , bazel ? bazelPkg
 , bazelFlags ? []
 , bazelBuildFlags ? []
+, bazelTestFlags ? []
 , bazelFetchFlags ? []
 , bazelTarget
+, bazelTestTargets ? []
 , buildAttrs
 , fetchAttrs
 
-# Newer versions of Bazel are moving away from built-in rules_cc and instead
-# allow fetching it as an external dependency in a WORKSPACE file[1]. If
-# removed in the fixed-output fetch phase, building will fail to download it.
-# This can be seen e.g. in #73097
-#
-# This option allows configuring the removal of rules_cc in cases where a
-# project depends on it via an external dependency.
-#
-# [1]: https://github.com/bazelbuild/rules_cc
+  # Newer versions of Bazel are moving away from built-in rules_cc and instead
+  # allow fetching it as an external dependency in a WORKSPACE file[1]. If
+  # removed in the fixed-output fetch phase, building will fail to download it.
+  # This can be seen e.g. in #73097
+  #
+  # This option allows configuring the removal of rules_cc in cases where a
+  # project depends on it via an external dependency.
+  #
+  # [1]: https://github.com/bazelbuild/rules_cc
 , removeRulesCC ? true
 , removeLocalConfigCc ? true
 , removeLocal ? true
 
-# Use build --nobuild instead of fetch. This allows fetching the dependencies
-# required for the build as configured, rather than fetching all the dependencies
-# which may not work in some situations (e.g. Java code which ends up relying on
-# Debian-specific /usr/share/java paths, but doesn't in the configured build).
+  # Use build --nobuild instead of fetch. This allows fetching the dependencies
+  # required for the build as configured, rather than fetching all the dependencies
+  # which may not work in some situations (e.g. Java code which ends up relying on
+  # Debian-specific /usr/share/java paths, but doesn't in the configured build).
 , fetchConfigured ? true
 
-# Don’t add Bazel --copt and --linkopt from NIX_CFLAGS_COMPILE /
-# NIX_LDFLAGS. This is necessary when using a custom toolchain which
-# Bazel wants all headers / libraries to come from, like when using
-# CROSSTOOL. Weirdly, we can still get the flags through the wrapped
-# compiler.
+  # Don’t add Bazel --copt and --linkopt from NIX_CFLAGS_COMPILE /
+  # NIX_LDFLAGS. This is necessary when using a custom toolchain which
+  # Bazel wants all headers / libraries to come from, like when using
+  # CROSSTOOL. Weirdly, we can still get the flags through the wrapped
+  # compiler.
 , dontAddBazelOpts ? false
 , ...
 }:
@@ -50,13 +52,33 @@ let
   fArgs = removeAttrs args [ "buildAttrs" "fetchAttrs" "removeRulesCC" ];
   fBuildAttrs = fArgs // buildAttrs;
   fFetchAttrs = fArgs // removeAttrs fetchAttrs [ "sha256" ];
-
-in stdenv.mkDerivation (fBuildAttrs // {
-  inherit name bazelFlags bazelBuildFlags bazelFetchFlags bazelTarget;
+  bazelCmd = { cmd, additionalFlags, targets }:
+    lib.optionalString (targets != [ ]) ''
+      # See footnote called [USER and BAZEL_USE_CPP_ONLY_TOOLCHAIN variables]
+      BAZEL_USE_CPP_ONLY_TOOLCHAIN=1 \
+      USER=homeless-shelter \
+      bazel \
+        --batch \
+        --output_base="$bazelOut" \
+        --output_user_root="$bazelUserRoot" \
+        ${cmd} \
+        --curses=no \
+        -j $NIX_BUILD_CORES \
+        "''${copts[@]}" \
+        "''${host_copts[@]}" \
+        "''${linkopts[@]}" \
+        "''${host_linkopts[@]}" \
+        $bazelFlags \
+        ${lib.strings.concatStringsSep " " additionalFlags} \
+        ${lib.strings.concatStringsSep " " targets}
+    '';
+in
+stdenv.mkDerivation (fBuildAttrs // {
+  inherit name bazelFlags bazelBuildFlags bazelTestFlags bazelFetchFlags bazelTarget bazelTestTargets;
 
   deps = stdenv.mkDerivation (fFetchAttrs // {
     name = "${name}-deps.tar.gz";
-    inherit bazelFlags bazelBuildFlags bazelFetchFlags bazelTarget;
+    inherit bazelFlags bazelBuildFlags bazelTestFlags bazelFetchFlags bazelTarget bazelTestTargets;
 
     impureEnvVars = lib.fetchers.proxyImpureEnvVars ++ fFetchAttrs.impureEnvVars or [];
 
@@ -77,26 +99,21 @@ in stdenv.mkDerivation (fBuildAttrs // {
     buildPhase = fFetchAttrs.buildPhase or ''
       runHook preBuild
 
-      # Bazel computes the default value of output_user_root before parsing the
-      # flag. The computation of the default value involves getting the $USER
-      # from the environment. I don't have that variable when building with
-      # sandbox enabled. Code here
-      # https://github.com/bazelbuild/bazel/blob/9323c57607d37f9c949b60e293b573584906da46/src/main/cpp/startup_options.cc#L123-L124
-      #
-      # On macOS Bazel will use the system installed Xcode or CLT toolchain instead of the one in the PATH unless we pass BAZEL_USE_CPP_ONLY_TOOLCHAIN
-
+      # See footnote called [USER and BAZEL_USE_CPP_ONLY_TOOLCHAIN variables].
       # We disable multithreading for the fetching phase since it can lead to timeouts with many dependencies/threads:
       # https://github.com/bazelbuild/bazel/issues/6502
       BAZEL_USE_CPP_ONLY_TOOLCHAIN=1 \
       USER=homeless-shelter \
       bazel \
+        --batch \
         --output_base="$bazelOut" \
         --output_user_root="$bazelUserRoot" \
         ${if fetchConfigured then "build --nobuild" else "fetch"} \
         --loading_phase_threads=1 \
         $bazelFlags \
         $bazelFetchFlags \
-        $bazelTarget
+        ${bazelTarget} \
+        ${lib.strings.concatStringsSep " " bazelTestTargets}
 
       runHook postBuild
     '';
@@ -188,7 +205,7 @@ in stdenv.mkDerivation (fBuildAttrs // {
     # the wrappers are expecting will not be set. So instead of relying on the
     # wrappers picking them up, pass them in explicitly via `--copt`, `--linkopt`
     # and related flags.
-    #
+
     copts=()
     host_copts=()
     linkopts=()
@@ -208,22 +225,29 @@ in stdenv.mkDerivation (fBuildAttrs // {
       done
     fi
 
-    BAZEL_USE_CPP_ONLY_TOOLCHAIN=1 \
-    USER=homeless-shelter \
-    bazel \
-      --output_base="$bazelOut" \
-      --output_user_root="$bazelUserRoot" \
-      build \
-      --curses=no \
-      -j $NIX_BUILD_CORES \
-      "''${copts[@]}" \
-      "''${host_copts[@]}" \
-      "''${linkopts[@]}" \
-      "''${host_linkopts[@]}" \
-      $bazelFlags \
-      $bazelBuildFlags \
-      $bazelTarget
-
+    ${
+      bazelCmd {
+        cmd = "test";
+        additionalFlags =
+          ["--test_output=errors"] ++  bazelTestFlags;
+        targets = bazelTestTargets;
+      }
+    }
+    ${
+      bazelCmd {
+        cmd = "build";
+        additionalFlags = bazelBuildFlags;
+        targets = [bazelTarget];
+      }
+    }
     runHook postBuild
   '';
 })
+
+# [USER and BAZEL_USE_CPP_ONLY_TOOLCHAIN variables]:
+#   Bazel computes the default value of output_user_root before parsing the
+#   flag. The computation of the default value involves getting the $USER
+#   from the environment. Code here :
+#   https://github.com/bazelbuild/bazel/blob/9323c57607d37f9c949b60e293b573584906da46/src/main/cpp/startup_options.cc#L123-L124
+#
+#   On macOS Bazel will use the system installed Xcode or CLT toolchain instead of the one in the PATH unless we pass BAZEL_USE_CPP_ONLY_TOOLCHAIN.
diff --git a/pkgs/build-support/build-fhs-userenv-bubblewrap/default.nix b/pkgs/build-support/build-fhs-userenv-bubblewrap/default.nix
index f66ad38f7b8..c539d671e98 100644
--- a/pkgs/build-support/build-fhs-userenv-bubblewrap/default.nix
+++ b/pkgs/build-support/build-fhs-userenv-bubblewrap/default.nix
@@ -34,6 +34,7 @@ let
       "static"
       "nix" # mainly for nixUnstable users, but also for access to nix/netrc
       # Shells
+      "shells"
       "bashrc"
       "zshenv"
       "zshrc"
@@ -71,7 +72,7 @@ let
       "pki"
     ];
   in concatStringsSep "\n  "
-  (map (file: "--ro-bind-try $(${coreutils}/bin/readlink -f /etc/${file}) /etc/${file}") files);
+  (map (file: "--ro-bind-try $(${coreutils}/bin/readlink -m /etc/${file}) /etc/${file}") files);
 
   # Create this on the fly instead of linking from /nix
   # The container might have to modify it and re-run ldconfig if there are
diff --git a/pkgs/build-support/build-maven.nix b/pkgs/build-support/build-maven.nix
index f47e3ebc61c..7ac8afdde22 100644
--- a/pkgs/build-support/build-maven.nix
+++ b/pkgs/build-support/build-maven.nix
@@ -1,52 +1,60 @@
-{ stdenv, maven, runCommand, writeText, fetchurl, lib, requireFile }:
-/* Takes an info file generated by mvn2nix
- * (https://github.com/NixOS/mvn2nix-maven-plugin) and builds the maven
- * project with it.
- *
- * repo: A local maven repository with the project's dependencies.
- *
- * settings: A settings.xml to pass to maven to use the repo.
- *
- * build: A simple build derivation that uses mvn compile and package to build
- *        the project.
- */
-infoFile: let
+{ stdenv, maven, runCommand, writeText, fetchurl, lib, requireFile, linkFarm }:
+# Takes an info file generated by mvn2nix
+# (https://github.com/NixOS/mvn2nix-maven-plugin) and builds the maven
+# project with it.
+#
+# repo: A local maven repository with the project's dependencies.
+#
+# settings: A settings.xml to pass to maven to use the repo.
+#
+# build: A simple build derivation that uses mvn compile and package to build
+#        the project.
+#
+# @example
+#     project = pkgs.buildMaven ./project-info.json
+infoFile:
+let
   info = lib.importJSON infoFile;
 
-  script = writeText "build-maven-repository.sh" ''
-    ${lib.concatStrings (map (dep: let
+  dependencies = lib.flatten (map (dep:
+    let
       inherit (dep) sha1 groupId artifactId version metadata repository-id;
-
       versionDir = dep.unresolved-version or version;
       authenticated = dep.authenticated or false;
       url = dep.url or "";
 
-      fetch = if (url != "") then ((if authenticated then requireFile else fetchurl) {
-        inherit url sha1;
-      }) else "";
+      fetch = if (url != "") then
+        ((if authenticated then requireFile else fetchurl) {
+          inherit url sha1;
+        })
+      else
+        "";
 
       fetchMetadata = (if authenticated then requireFile else fetchurl) {
         inherit (metadata) url sha1;
       };
-    in ''
-      dir=$out/$(echo ${groupId} | sed 's|\.|/|g')/${artifactId}/${versionDir}
-      mkdir -p $dir
 
-      ${lib.optionalString (fetch != "") ''
-        ln -sv ${fetch} $dir/${fetch.name}
-      ''}
-      ${lib.optionalString (dep ? metadata) ''
-        ln -svf ${fetchMetadata} $dir/maven-metadata-${repository-id}.xml
-        ${lib.optionalString (fetch != "") ''
-          ln -sv ${fetch} $dir/$(echo ${fetch.name} | sed 's|${version}|${dep.unresolved-version}|')
-        ''}
-      ''}
-    '') info.dependencies)}
-  '';
+      layout = "${
+          builtins.replaceStrings [ "." ] [ "/" ] groupId
+        }/${artifactId}/${versionDir}";
+    in lib.optional (url != "") {
+      layout = "${layout}/${fetch.name}";
+      drv = fetch;
+    } ++ lib.optionals (dep ? metadata) ([{
+      layout = "${layout}/maven-metadata-${repository-id}.xml";
+      drv = fetchMetadata;
+    }] ++ lib.optional (fetch != "") {
+      layout = "${layout}/${
+          builtins.replaceStrings [ version ] [ dep.unresolved-version ]
+          fetch.name
+        }";
+      drv = fetch;
+    })) info.dependencies);
 
-  repo = runCommand "maven-repository" {} ''
-    bash ${script}
-  '';
+  repo = linkFarm "maven-repository" (lib.forEach dependencies (dependency: {
+    name = dependency.layout;
+    path = dependency.drv;
+  }));
 
   settings = writeText "settings.xml" ''
     <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
@@ -65,9 +73,8 @@ in {
     name = "${info.project.artifactId}-${info.project.version}.jar";
 
     src = builtins.filterSource (path: type:
-      (toString path) != (toString (src + "/target")) &&
-        (toString path) != (toString (src + "/.git"))
-    ) src;
+      (toString path) != (toString (src + "/target")) && (toString path)
+      != (toString (src + "/.git"))) src;
 
     buildInputs = [ maven ];
 
diff --git a/pkgs/build-support/build-pecl.nix b/pkgs/build-support/build-pecl.nix
index 8168c7a3de1..d30a073d2fb 100644
--- a/pkgs/build-support/build-pecl.nix
+++ b/pkgs/build-support/build-pecl.nix
@@ -9,7 +9,7 @@
 , postPhpize ? ""
 , makeFlags ? [ ]
 , src ? fetchurl {
-    url = "http://pecl.php.net/get/${pname}-${version}.tgz";
+    url = "https://pecl.php.net/get/${pname}-${version}.tgz";
     inherit (args) sha256;
   }
 , ...
diff --git a/pkgs/build-support/cc-wrapper/add-hardening.sh b/pkgs/build-support/cc-wrapper/add-hardening.sh
index e5d296f6c9c..b23fda1fed7 100644
--- a/pkgs/build-support/cc-wrapper/add-hardening.sh
+++ b/pkgs/build-support/cc-wrapper/add-hardening.sh
@@ -38,7 +38,9 @@ for flag in "${!hardeningEnableMap[@]}"; do
   case $flag in
     fortify)
       if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling fortify >&2; fi
-      hardeningCFlags+=('-O2' '-D_FORTIFY_SOURCE=2')
+      # Use -U_FORTIFY_SOURCE to avoid warnings on toolchains that explicitly
+      # set -D_FORTIFY_SOURCE=0 (like 'clang -fsanitize=address').
+      hardeningCFlags+=('-O2' '-U_FORTIFY_SOURCE' '-D_FORTIFY_SOURCE=2')
       ;;
     stackprotector)
       if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling stackprotector >&2; fi
diff --git a/pkgs/build-support/cc-wrapper/cc-wrapper.sh b/pkgs/build-support/cc-wrapper/cc-wrapper.sh
index 83b6817798f..cf9a351f395 100644
--- a/pkgs/build-support/cc-wrapper/cc-wrapper.sh
+++ b/pkgs/build-support/cc-wrapper/cc-wrapper.sh
@@ -122,6 +122,31 @@ fi
 
 if [[ "$isCxx" = 1 ]]; then
     if [[ "$cxxInclude" = 1 ]]; then
+        #
+        # The motivation for this comment is to explain the reason for appending
+        # the C++ stdlib to NIX_CFLAGS_COMPILE, which I initially thought should
+        # change and later realized it shouldn't in:
+        #
+        #   https://github.com/NixOS/nixpkgs/pull/185569#issuecomment-1234959249
+        #
+        # NIX_CFLAGS_COMPILE contains dependencies added using "-isystem", and
+        # NIX_CXXSTDLIB_COMPILE adds the C++ stdlib using "-isystem". Appending
+        # NIX_CXXSTDLIB_COMPILE to NIX_CLAGS_COMPILE emulates this part of the
+        # include lookup order from GCC/Clang:
+        #
+        # > 4. Directories specified with -isystem options are scanned in
+        # >    left-to-right order.
+        # > 5. Standard system directories are scanned.
+        # > 6. Directories specified with -idirafter options are scanned
+        # >    in left-to-right order.
+        #
+        # NIX_CXX_STDLIB_COMPILE acts as the "standard system directories" that
+        # are otherwise missing from CC in nixpkgs, so should be added last.
+        #
+        # This means that the C standard library should never be present inside
+        # NIX_CFLAGS_COMPILE, because it MUST come after the C++ stdlib. It is
+        # added automatically by cc-wrapper later using "-idirafter".
+        #
         NIX_CFLAGS_COMPILE_@suffixSalt@+=" $NIX_CXXSTDLIB_COMPILE_@suffixSalt@"
     fi
     if [[ "$cxxLibrary" = 1 ]]; then
@@ -194,6 +219,12 @@ fi
 PATH="$path_backup"
 # Old bash workaround, see above.
 
+# if a cc-wrapper-hook exists, run it.
+if [[ -e @out@/nix-support/cc-wrapper-hook ]]; then
+    compiler=@prog@
+    source @out@/nix-support/cc-wrapper-hook
+fi
+
 if (( "${NIX_CC_USE_RESPONSE_FILE:-@use_response_file_by_default@}" >= 1 )); then
     exec @prog@ @<(printf "%q\n" \
        ${extraBefore+"${extraBefore[@]}"} \
diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix
index ec6bd785597..a59505d0825 100644
--- a/pkgs/build-support/cc-wrapper/default.nix
+++ b/pkgs/build-support/cc-wrapper/default.nix
@@ -251,19 +251,12 @@ stdenv.mkDerivation {
       wrap ${targetPrefix}gdc $wrapper $ccPath/${targetPrefix}gdc
     ''
 
-    + optionalString cc.langFortran or false (''
+    + optionalString cc.langFortran or false ''
       wrap ${targetPrefix}gfortran $wrapper $ccPath/${targetPrefix}gfortran
       ln -sv ${targetPrefix}gfortran $out/bin/${targetPrefix}g77
       ln -sv ${targetPrefix}gfortran $out/bin/${targetPrefix}f77
       export named_fc=${targetPrefix}gfortran
     ''
-    # Darwin aarch64 fortran compilations seem to fail otherwise, see:
-    # https://github.com/NixOS/nixpkgs/issues/140041
-    + (if (stdenvNoCC.isDarwin && stdenvNoCC.isAarch64) then ''
-      export fortran_hardening="pic strictoverflow relro bindnow"
-    '' else ''
-      export fortran_hardening="pic strictoverflow relro bindnow stackprotector"
-    ''))
 
     + optionalString cc.langJava or false ''
       wrap ${targetPrefix}gcj $wrapper $ccPath/${targetPrefix}gcj
@@ -373,10 +366,10 @@ stdenv.mkDerivation {
       touch "$out/nix-support/libcxx-ldflags"
     ''
     + optionalString (libcxx == null && (useGccForLibs && gccForLibs.langCC or false)) ''
-      for dir in ${gccForLibs}/include/c++/*; do
+      for dir in ${gccForLibs}${lib.optionalString (hostPlatform != targetPlatform) "/${targetPlatform.config}"}/include/c++/*; do
         echo "-isystem $dir" >> $out/nix-support/libcxx-cxxflags
       done
-      for dir in ${gccForLibs}/include/c++/*/${targetPlatform.config}; do
+      for dir in ${gccForLibs}${lib.optionalString (hostPlatform != targetPlatform) "/${targetPlatform.config}"}/include/c++/*/${targetPlatform.config}; do
         echo "-isystem $dir" >> $out/nix-support/libcxx-cxxflags
       done
     ''
diff --git a/pkgs/build-support/cc-wrapper/fortran-hook.sh b/pkgs/build-support/cc-wrapper/fortran-hook.sh
index 59e493e1836..d72f314c01c 100644
--- a/pkgs/build-support/cc-wrapper/fortran-hook.sh
+++ b/pkgs/build-support/cc-wrapper/fortran-hook.sh
@@ -5,7 +5,7 @@ export FC${role_post}=@named_fc@
 
 # If unset, assume the default hardening flags.
 # These are different for fortran.
-: ${NIX_HARDENING_ENABLE="@fortran_hardening@"}
+: ${NIX_HARDENING_ENABLE="stackprotector pic strictoverflow relro bindnow"}
 export NIX_HARDENING_ENABLE
 
 unset -v role_post
diff --git a/pkgs/build-support/cc-wrapper/setup-hook.sh b/pkgs/build-support/cc-wrapper/setup-hook.sh
index 6a913cc4eac..be01c51a71f 100644
--- a/pkgs/build-support/cc-wrapper/setup-hook.sh
+++ b/pkgs/build-support/cc-wrapper/setup-hook.sh
@@ -109,8 +109,6 @@ export NIX_CC${role_post}=@out@
 
 export CC${role_post}=@named_cc@
 export CXX${role_post}=@named_cxx@
-export CC${role_post}=@named_cc@
-export CXX${role_post}=@named_cxx@
 
 # If unset, assume the default hardening flags.
 : ${NIX_HARDENING_ENABLE="fortify stackprotector pic strictoverflow format relro bindnow"}
diff --git a/pkgs/build-support/coq/default.nix b/pkgs/build-support/coq/default.nix
index 0dc5c999ea3..e0ba7b3e08c 100644
--- a/pkgs/build-support/coq/default.nix
+++ b/pkgs/build-support/coq/default.nix
@@ -30,8 +30,8 @@ in
   dropAttrs ? [],
   keepAttrs ? [],
   dropDerivationAttrs ? [],
-  useDune2ifVersion ? (x: false),
-  useDune2 ? false,
+  useDuneifVersion ? (x: false),
+  useDune ? false,
   opam-name ? (concatStringsSep "-" (namePrefix ++ [ pname ])),
   ...
 }@args:
@@ -44,7 +44,7 @@ let
     "extraBuildInputs" "extraNativeBuildInputs"
     "overrideBuildInputs" "overrideNativeBuildInputs"
     "namePrefix"
-    "meta" "useDune2ifVersion" "useDune2" "opam-name"
+    "meta" "useDuneifVersion" "useDune" "opam-name"
     "extraInstallFlags" "setCOQBIN" "mlPlugin"
     "dropAttrs" "dropDerivationAttrs" "keepAttrs" ] ++ dropAttrs) keepAttrs;
   fetch = import ../coq/meta-fetch/default.nix
@@ -65,7 +65,7 @@ let
     ] "") + optionalString (v == null) "-broken";
   append-version = p: n: p + display-pkg n "" coqPackages.${n}.version + "-";
   prefix-name = foldl append-version "" namePrefix;
-  useDune2 = args.useDune2 or (useDune2ifVersion fetched.version);
+  useDune = args.useDune or (useDuneifVersion fetched.version);
   coqlib-flags = switch coq.coq-version [
     { case = v: versions.isLe "8.6" v && v != "dev" ;
       out = [ "COQLIB=$(out)/lib/coq/${coq.coq-version}/" ]; }
@@ -85,8 +85,8 @@ stdenv.mkDerivation (removeAttrs ({
 
   nativeBuildInputs = args.overrideNativeBuildInputs
     or ([ which coq.ocamlPackages.findlib ]
-        ++ optional useDune2 coq.ocamlPackages.dune_2
-        ++ optional (useDune2 || mlPlugin) coq.ocamlPackages.ocaml
+        ++ optional useDune coq.ocamlPackages.dune_3
+        ++ optional (useDune || mlPlugin) coq.ocamlPackages.ocaml
         ++ (args.nativeBuildInputs or []) ++ extraNativeBuildInputs);
   buildInputs = args.overrideBuildInputs
     or ([ coq ] ++ (args.buildInputs or []) ++ extraBuildInputs);
@@ -107,7 +107,7 @@ stdenv.mkDerivation (removeAttrs ({
     coqlib-flags ++ docdir-flags ++
     extraInstallFlags;
 })
-// (optionalAttrs useDune2 {
+// (optionalAttrs useDune {
   buildPhase = ''
     runHook preBuild
     dune build -p ${opam-name} ''${enableParallelBuilding:+-j $NIX_BUILD_CORES}
diff --git a/pkgs/build-support/docker/default.nix b/pkgs/build-support/docker/default.nix
index 6876e9e7358..48c780e2dbe 100644
--- a/pkgs/build-support/docker/default.nix
+++ b/pkgs/build-support/docker/default.nix
@@ -30,6 +30,7 @@
 , vmTools
 , writeReferencesToFile
 , writeScript
+, writeShellScriptBin
 , writeText
 , writeTextDir
 , writePython3
@@ -73,12 +74,12 @@ let
   # Reference: https://github.com/opencontainers/image-spec/blob/master/config.md#properties
   # For the mapping from Nixpkgs system parameters to GOARCH, we can reuse the
   # mapping from the go package.
-  defaultArch = go.GOARCH;
+  defaultArchitecture = go.GOARCH;
 
 in
 rec {
   examples = callPackage ./examples.nix {
-    inherit buildImage buildLayeredImage fakeNss pullImage shadowSetup buildImageWithNixDb;
+    inherit buildImage buildLayeredImage fakeNss pullImage shadowSetup buildImageWithNixDb streamNixShellImage;
   };
 
   tests = {
@@ -100,8 +101,8 @@ rec {
     , imageDigest
     , sha256
     , os ? "linux"
-    , arch ? defaultArch
-
+    , # Image architecture, defaults to the architecture of the `hostPlatform` when unset
+      arch ? defaultArchitecture
       # This is used to set name to the pulled image
     , finalImageName ? imageName
       # This used to set a tag to the pulled image
@@ -513,6 +514,8 @@ rec {
       keepContentsDirlinks ? false
     , # Docker config; e.g. what command to run on the container.
       config ? null
+    , # Image architecture, defaults to the architecture of the `hostPlatform` when unset
+      architecture ? defaultArchitecture
     , # Optional bash script to run on the files prior to fixturizing the layer.
       extraCommands ? ""
     , uid ? 0
@@ -545,12 +548,15 @@ rec {
       baseJson =
         let
           pure = writeText "${baseName}-config.json" (builtins.toJSON {
-            inherit created config;
-            architecture = defaultArch;
+            inherit created config architecture;
+            preferLocalBuild = true;
             os = "linux";
           });
           impure = runCommand "${baseName}-config.json"
-            { nativeBuildInputs = [ jq ]; }
+            {
+              nativeBuildInputs = [ jq ];
+              preferLocalBuild = true;
+            }
             ''
               jq ".created = \"$(TZ=utc date --iso-8601="seconds")\"" ${pure} > $out
             '';
@@ -794,6 +800,7 @@ rec {
 
   # This provides the ca bundle in common locations
   caCertificates = runCommand "ca-certificates" { } ''
+    mkdir -p $out/etc/ssl/certs $out/etc/pki/tls/certs
     # Old NixOS compatibility.
     ln -s ${cacert}/etc/ssl/certs/ca-bundle.crt $out/etc/ssl/certs/ca-bundle.crt
     # NixOS canonical location + Debian/Ubuntu/Arch/Gentoo compatibility.
@@ -832,6 +839,8 @@ rec {
       contents ? [ ]
     , # Docker config; e.g. what command to run on the container.
       config ? { }
+    , # Image architecture, defaults to the architecture of the `hostPlatform` when unset
+      architecture ? defaultArchitecture
     , # Time of creation of the image. Passing "now" will make the
       # created date be the time of building.
       created ? "1970-01-01T00:00:01Z"
@@ -863,8 +872,7 @@ rec {
 
         streamScript = writePython3 "stream" { } ./stream_layered_image.py;
         baseJson = writeText "${baseName}-base.json" (builtins.toJSON {
-          inherit config;
-          architecture = defaultArch;
+          inherit config architecture;
           os = "linux";
         });
 
@@ -924,6 +932,7 @@ rec {
           {
             inherit fromImage maxLayers created;
             imageName = lib.toLower name;
+            preferLocalBuild = true;
             passthru.imageTag =
               if tag != null
               then tag
@@ -983,36 +992,38 @@ rec {
           # following lines, double-check that your code behaves properly
           # when the number of layers equals:
           #      maxLayers-1, maxLayers, and maxLayers+1, 0
-          store_layers="$(
-            paths |
-              jq -sR '
-                rtrimstr("\n") | split("\n")
-                  | (.[:$maxLayers-1] | map([.])) + [ .[$maxLayers-1:] ]
-                  | map(select(length > 0))
+          paths |
+            jq -sR '
+              rtrimstr("\n") | split("\n")
+                | (.[:$maxLayers-1] | map([.])) + [ .[$maxLayers-1:] ]
+                | map(select(length > 0))
               ' \
-                --argjson maxLayers "$availableLayers"
-          )"
+              --argjson maxLayers "$availableLayers" > store_layers.json
 
+          # The index on $store_layers is necessary because the --slurpfile
+          # automatically reads the file as an array.
           cat ${baseJson} | jq '
             . + {
               "store_dir": $store_dir,
               "from_image": $from_image,
-              "store_layers": $store_layers,
+              "store_layers": $store_layers[0],
               "customisation_layer", $customisation_layer,
               "repo_tag": $repo_tag,
               "created": $created
             }
             ' --arg store_dir "${storeDir}" \
               --argjson from_image ${if fromImage == null then "null" else "'\"${fromImage}\"'"} \
-              --argjson store_layers "$store_layers" \
+              --slurpfile store_layers store_layers.json \
               --arg customisation_layer ${customisationLayer} \
               --arg repo_tag "$imageName:$imageTag" \
               --arg created "$created" |
             tee $out
         '';
+
         result = runCommand "stream-${baseName}"
           {
             inherit (conf) imageName;
+            preferLocalBuild = true;
             passthru = passthru // {
               inherit (conf) imageTag;
 
@@ -1026,4 +1037,188 @@ rec {
         '';
       in
       result;
+
+  # This function streams a docker image that behaves like a nix-shell for a derivation
+  streamNixShellImage =
+    { # The derivation whose environment this docker image should be based on
+      drv
+    , # Image Name
+      name ? drv.name + "-env"
+    , # Image tag, the Nix's output hash will be used if null
+      tag ? null
+    , # User id to run the container as. Defaults to 1000, because many
+      # binaries don't like to be run as root
+      uid ? 1000
+    , # Group id to run the container as, see also uid
+      gid ? 1000
+    , # The home directory of the user
+      homeDirectory ? "/build"
+    , # The path to the bash binary to use as the shell. See `NIX_BUILD_SHELL` in `man nix-shell`
+      shell ? bashInteractive + "/bin/bash"
+    , # Run this command in the environment of the derivation, in an interactive shell. See `--command` in `man nix-shell`
+      command ? null
+    , # Same as `command`, but runs the command in a non-interactive shell instead. See `--run` in `man nix-shell`
+      run ? null
+    }:
+      assert lib.assertMsg (! (drv.drvAttrs.__structuredAttrs or false))
+        "streamNixShellImage: Does not work with the derivation ${drv.name} because it uses __structuredAttrs";
+      assert lib.assertMsg (command == null || run == null)
+        "streamNixShellImage: Can't specify both command and run";
+      let
+
+        # A binary that calls the command to build the derivation
+        builder = writeShellScriptBin "buildDerivation" ''
+          exec ${lib.escapeShellArg (stringValue drv.drvAttrs.builder)} ${lib.escapeShellArgs (map stringValue drv.drvAttrs.args)}
+        '';
+
+        staticPath = "${dirOf shell}:${lib.makeBinPath [ builder ]}";
+
+        # https://github.com/NixOS/nix/blob/2.8.0/src/nix-build/nix-build.cc#L493-L526
+        rcfile = writeText "nix-shell-rc" ''
+          unset PATH
+          dontAddDisableDepTrack=1
+          # TODO: https://github.com/NixOS/nix/blob/2.8.0/src/nix-build/nix-build.cc#L506
+          [ -e $stdenv/setup ] && source $stdenv/setup
+          PATH=${staticPath}:"$PATH"
+          SHELL=${lib.escapeShellArg shell}
+          BASH=${lib.escapeShellArg shell}
+          set +e
+          [ -n "$PS1" -a -z "$NIX_SHELL_PRESERVE_PROMPT" ] && PS1='\n\[\033[1;32m\][nix-shell:\w]\$\[\033[0m\] '
+          if [ "$(type -t runHook)" = function ]; then
+            runHook shellHook
+          fi
+          unset NIX_ENFORCE_PURITY
+          shopt -u nullglob
+          shopt -s execfail
+          ${optionalString (command != null || run != null) ''
+            ${optionalString (command != null) command}
+            ${optionalString (run != null) run}
+            exit
+          ''}
+        '';
+
+        # https://github.com/NixOS/nix/blob/2.8.0/src/libstore/globals.hh#L464-L465
+        sandboxBuildDir = "/build";
+
+        # This function closely mirrors what this Nix code does:
+        # https://github.com/NixOS/nix/blob/2.8.0/src/libexpr/primops.cc#L1102
+        # https://github.com/NixOS/nix/blob/2.8.0/src/libexpr/eval.cc#L1981-L2036
+        stringValue = value:
+          # We can't just use `toString` on all derivation attributes because that
+          # would not put path literals in the closure. So we explicitly copy
+          # those into the store here
+          if builtins.typeOf value == "path" then "${value}"
+          else if builtins.typeOf value == "list" then toString (map stringValue value)
+          else toString value;
+
+        # https://github.com/NixOS/nix/blob/2.8.0/src/libstore/build/local-derivation-goal.cc#L992-L1004
+        drvEnv = lib.mapAttrs' (name: value:
+          let str = stringValue value;
+          in if lib.elem name (drv.drvAttrs.passAsFile or [])
+          then lib.nameValuePair "${name}Path" (writeText "pass-as-text-${name}" str)
+          else lib.nameValuePair name str
+        ) drv.drvAttrs //
+          # A mapping from output name to the nix store path where they should end up
+          # https://github.com/NixOS/nix/blob/2.8.0/src/libexpr/primops.cc#L1253
+          lib.genAttrs drv.outputs (output: builtins.unsafeDiscardStringContext drv.${output}.outPath);
+
+        # Environment variables set in the image
+        envVars = {
+
+          # Root certificates for internet access
+          SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
+
+          # https://github.com/NixOS/nix/blob/2.8.0/src/libstore/build/local-derivation-goal.cc#L1027-L1030
+          # PATH = "/path-not-set";
+          # Allows calling bash and `buildDerivation` as the Cmd
+          PATH = staticPath;
+
+          # https://github.com/NixOS/nix/blob/2.8.0/src/libstore/build/local-derivation-goal.cc#L1032-L1038
+          HOME = homeDirectory;
+
+          # https://github.com/NixOS/nix/blob/2.8.0/src/libstore/build/local-derivation-goal.cc#L1040-L1044
+          NIX_STORE = storeDir;
+
+          # https://github.com/NixOS/nix/blob/2.8.0/src/libstore/build/local-derivation-goal.cc#L1046-L1047
+          # TODO: Make configurable?
+          NIX_BUILD_CORES = "1";
+
+        } // drvEnv // {
+
+          # https://github.com/NixOS/nix/blob/2.8.0/src/libstore/build/local-derivation-goal.cc#L1008-L1010
+          NIX_BUILD_TOP = sandboxBuildDir;
+
+          # https://github.com/NixOS/nix/blob/2.8.0/src/libstore/build/local-derivation-goal.cc#L1012-L1013
+          TMPDIR = sandboxBuildDir;
+          TEMPDIR = sandboxBuildDir;
+          TMP = sandboxBuildDir;
+          TEMP = sandboxBuildDir;
+
+          # https://github.com/NixOS/nix/blob/2.8.0/src/libstore/build/local-derivation-goal.cc#L1015-L1019
+          PWD = sandboxBuildDir;
+
+          # https://github.com/NixOS/nix/blob/2.8.0/src/libstore/build/local-derivation-goal.cc#L1071-L1074
+          # We don't set it here because the output here isn't handled in any special way
+          # NIX_LOG_FD = "2";
+
+          # https://github.com/NixOS/nix/blob/2.8.0/src/libstore/build/local-derivation-goal.cc#L1076-L1077
+          TERM = "xterm-256color";
+        };
+
+
+      in streamLayeredImage {
+        inherit name tag;
+        contents = [
+          binSh
+          usrBinEnv
+          (fakeNss.override {
+            # Allows programs to look up the build user's home directory
+            # https://github.com/NixOS/nix/blob/ffe155abd36366a870482625543f9bf924a58281/src/libstore/build/local-derivation-goal.cc#L906-L910
+            # Slightly differs however: We use the passed-in homeDirectory instead of sandboxBuildDir.
+            # We're doing this because it's arguably a bug in Nix that sandboxBuildDir is used here: https://github.com/NixOS/nix/issues/6379
+            extraPasswdLines = [
+              "nixbld:x:${toString uid}:${toString gid}:Build user:${homeDirectory}:/noshell"
+            ];
+            extraGroupLines = [
+              "nixbld:!:${toString gid}:"
+            ];
+          })
+        ];
+
+        fakeRootCommands = ''
+          # Effectively a single-user installation of Nix, giving the user full
+          # control over the Nix store. Needed for building the derivation this
+          # shell is for, but also in case one wants to use Nix inside the
+          # image
+          mkdir -p ./nix/{store,var/nix} ./etc/nix
+          chown -R ${toString uid}:${toString gid} ./nix ./etc/nix
+
+          # Gives the user control over the build directory
+          mkdir -p .${sandboxBuildDir}
+          chown -R ${toString uid}:${toString gid} .${sandboxBuildDir}
+        '';
+
+        # Run this image as the given uid/gid
+        config.User = "${toString uid}:${toString gid}";
+        config.Cmd =
+          # https://github.com/NixOS/nix/blob/2.8.0/src/nix-build/nix-build.cc#L185-L186
+          # https://github.com/NixOS/nix/blob/2.8.0/src/nix-build/nix-build.cc#L534-L536
+          if run == null
+          then [ shell "--rcfile" rcfile ]
+          else [ shell rcfile ];
+        config.WorkingDir = sandboxBuildDir;
+        config.Env = lib.mapAttrsToList (name: value: "${name}=${value}") envVars;
+      };
+
+  # Wrapper around streamNixShellImage to build an image from the result
+  buildNixShellImage = { drv, ... }@args:
+    let
+      stream = streamNixShellImage args;
+    in
+    runCommand "${drv.name}-env.tar.gz"
+      {
+        inherit (stream) imageName;
+        passthru = { inherit (stream) imageTag; };
+        nativeBuildInputs = [ pigz ];
+      } "${stream} | pigz -nT > $out";
 }
diff --git a/pkgs/build-support/docker/examples.nix b/pkgs/build-support/docker/examples.nix
index ff3934941c7..5784e650dc2 100644
--- a/pkgs/build-support/docker/examples.nix
+++ b/pkgs/build-support/docker/examples.nix
@@ -7,7 +7,7 @@
 #  $ nix-build '<nixpkgs>' -A dockerTools.examples.redis
 #  $ docker load < result
 
-{ pkgs, buildImage, buildLayeredImage, fakeNss, pullImage, shadowSetup, buildImageWithNixDb, pkgsCross }:
+{ pkgs, buildImage, buildLayeredImage, fakeNss, pullImage, shadowSetup, buildImageWithNixDb, pkgsCross, streamNixShellImage }:
 
 let
   nixosLib = import ../../../nixos/lib {
@@ -92,10 +92,11 @@ rec {
     ];
 
     extraCommands = ''
+      mkdir -p tmp/nginx_client_body
+
       # nginx still tries to read this directory even if error_log
       # directive is specifying another file :/
       mkdir -p var/log/nginx
-      mkdir -p var/cache/nginx
     '';
 
     config = {
@@ -698,4 +699,150 @@ rec {
     tag = "latest";
     contents = [ pkgs.bashInteractive ./test-dummy ];
   };
+
+  build-image-with-architecture = buildImage {
+    name = "build-image-with-architecture";
+    tag = "latest";
+    architecture = "arm64";
+    # Not recommended. Use `buildEnv` between copy and packages to avoid file duplication.
+    copyToRoot = [ pkgs.bashInteractive ./test-dummy ];
+  };
+
+  layered-image-with-architecture = pkgs.dockerTools.streamLayeredImage {
+    name = "layered-image-with-architecture";
+    tag = "latest";
+    architecture = "arm64";
+    contents = [ pkgs.bashInteractive ./test-dummy ];
+  };
+
+  # ensure that caCertificates builds
+  image-with-certs = buildImage {
+    name = "image-with-certs";
+    tag = "latest";
+
+    copyToRoot = pkgs.buildEnv {
+      name = "image-with-certs-root";
+      paths = [
+        pkgs.coreutils
+        pkgs.dockerTools.caCertificates
+      ];
+    };
+
+    config = {
+    };
+  };
+
+  nix-shell-basic = streamNixShellImage {
+    name = "nix-shell-basic";
+    tag = "latest";
+    drv = pkgs.hello;
+  };
+
+  nix-shell-hook = streamNixShellImage {
+    name = "nix-shell-hook";
+    tag = "latest";
+    drv = pkgs.mkShell {
+      shellHook = ''
+        echo "This is the shell hook!"
+        exit
+      '';
+    };
+  };
+
+  nix-shell-inputs = streamNixShellImage {
+    name = "nix-shell-inputs";
+    tag = "latest";
+    drv = pkgs.mkShell {
+      nativeBuildInputs = [
+        pkgs.hello
+      ];
+    };
+    command = ''
+      hello
+    '';
+  };
+
+  nix-shell-pass-as-file = streamNixShellImage {
+    name = "nix-shell-pass-as-file";
+    tag = "latest";
+    drv = pkgs.mkShell {
+      str = "this is a string";
+      passAsFile = [ "str" ];
+    };
+    command = ''
+      cat "$strPath"
+    '';
+  };
+
+  nix-shell-run = streamNixShellImage {
+    name = "nix-shell-run";
+    tag = "latest";
+    drv = pkgs.mkShell {};
+    run = ''
+      case "$-" in
+      *i*) echo This shell is interactive ;;
+      *) echo This shell is not interactive ;;
+      esac
+    '';
+  };
+
+  nix-shell-command = streamNixShellImage {
+    name = "nix-shell-command";
+    tag = "latest";
+    drv = pkgs.mkShell {};
+    command = ''
+      case "$-" in
+      *i*) echo This shell is interactive ;;
+      *) echo This shell is not interactive ;;
+      esac
+    '';
+  };
+
+  nix-shell-writable-home = streamNixShellImage {
+    name = "nix-shell-writable-home";
+    tag = "latest";
+    drv = pkgs.mkShell {};
+    run = ''
+      if [[ "$HOME" != "$(eval "echo ~$(whoami)")" ]]; then
+        echo "\$HOME ($HOME) is not the same as ~\$(whoami) ($(eval "echo ~$(whoami)"))"
+        exit 1
+      fi
+
+      if ! touch $HOME/test-file; then
+        echo "home directory is not writable"
+        exit 1
+      fi
+      echo "home directory is writable"
+    '';
+  };
+
+  nix-shell-nonexistent-home = streamNixShellImage {
+    name = "nix-shell-nonexistent-home";
+    tag = "latest";
+    drv = pkgs.mkShell {};
+    homeDirectory = "/homeless-shelter";
+    run = ''
+      if [[ "$HOME" != "$(eval "echo ~$(whoami)")" ]]; then
+        echo "\$HOME ($HOME) is not the same as ~\$(whoami) ($(eval "echo ~$(whoami)"))"
+        exit 1
+      fi
+
+      if -e $HOME; then
+        echo "home directory exists"
+        exit 1
+      fi
+      echo "home directory doesn't exist"
+    '';
+  };
+
+  nix-shell-build-derivation = streamNixShellImage {
+    name = "nix-shell-build-derivation";
+    tag = "latest";
+    drv = pkgs.hello;
+    run = ''
+      buildDerivation
+      $out/bin/hello
+    '';
+  };
+
 }
diff --git a/pkgs/build-support/dotnet/build-dotnet-module/default.nix b/pkgs/build-support/dotnet/build-dotnet-module/default.nix
index 2a166089bae..5e8d76defe7 100644
--- a/pkgs/build-support/dotnet/build-dotnet-module/default.nix
+++ b/pkgs/build-support/dotnet/build-dotnet-module/default.nix
@@ -1,18 +1,18 @@
 { lib
 , stdenvNoCC
 , callPackage
+, writeShellScript
+, writeText
+, srcOnly
 , linkFarmFromDrvs
+, symlinkJoin
+, makeWrapper
 , dotnetCorePackages
 , dotnetPackages
 , mkNugetSource
 , mkNugetDeps
-, srcOnly
-, writeShellScript
-, writeText
-, makeWrapper
 , nuget-to-nix
 , cacert
-, symlinkJoin
 , coreutils
 }:
 
@@ -20,88 +20,92 @@
 , pname ? name
 , enableParallelBuilding ? true
 , doCheck ? false
-# Flags to pass to `makeWrapper`. This is done to avoid double wrapping.
-, makeWrapperArgs ? []
-
-# Flags to pass to `dotnet restore`.
-, dotnetRestoreFlags ? []
-# Flags to pass to `dotnet build`.
-, dotnetBuildFlags ? []
-# Flags to pass to `dotnet test`, if running tests is enabled.
-, dotnetTestFlags ? []
-# Flags to pass to `dotnet install`.
-, dotnetInstallFlags ? []
-# Flags to pass to `dotnet pack`.
-, dotnetPackFlags ? []
-# Flags to pass to dotnet in all phases.
-, dotnetFlags ? []
-
-# The path to publish the project to. When unset, the directory "$out/lib/$pname" is used.
+  # Flags to pass to `makeWrapper`. This is done to avoid double wrapping.
+, makeWrapperArgs ? [ ]
+
+  # Flags to pass to `dotnet restore`.
+, dotnetRestoreFlags ? [ ]
+  # Flags to pass to `dotnet build`.
+, dotnetBuildFlags ? [ ]
+  # Flags to pass to `dotnet test`, if running tests is enabled.
+, dotnetTestFlags ? [ ]
+  # Flags to pass to `dotnet install`.
+, dotnetInstallFlags ? [ ]
+  # Flags to pass to `dotnet pack`.
+, dotnetPackFlags ? [ ]
+  # Flags to pass to dotnet in all phases.
+, dotnetFlags ? [ ]
+
+  # The path to publish the project to. When unset, the directory "$out/lib/$pname" is used.
 , installPath ? null
-# The binaries that should get installed to `$out/bin`, relative to `$out/lib/$pname/`. These get wrapped accordingly.
-# Unfortunately, dotnet has no method for doing this automatically.
-# If unset, all executables in the projects root will get installed. This may cause bloat!
+  # The binaries that should get installed to `$out/bin`, relative to `$out/lib/$pname/`. These get wrapped accordingly.
+  # Unfortunately, dotnet has no method for doing this automatically.
+  # If unset, all executables in the projects root will get installed. This may cause bloat!
 , executables ? null
-# Packs a project as a `nupkg`, and installs it to `$out/share`. If set to `true`, the derivation can be used as a dependency for another dotnet project by adding it to `projectReferences`.
+  # Packs a project as a `nupkg`, and installs it to `$out/share`. If set to `true`, the derivation can be used as a dependency for another dotnet project by adding it to `projectReferences`.
 , packNupkg ? false
-# The packages project file, which contains instructions on how to compile it. This can be an array of multiple project files as well.
+  # The packages project file, which contains instructions on how to compile it. This can be an array of multiple project files as well.
 , projectFile ? null
-# The NuGet dependency file. This locks all NuGet dependency versions, as otherwise they cannot be deterministically fetched.
-# This can be generated by running the `passthru.fetch-deps` script.
+  # The NuGet dependency file. This locks all NuGet dependency versions, as otherwise they cannot be deterministically fetched.
+  # This can be generated by running the `passthru.fetch-deps` script.
 , nugetDeps ? null
-# A list of derivations containing nupkg packages for local project references.
-# Referenced derivations can be built with `buildDotnetModule` with `packNupkg=true` flag.
-# Since we are sharing them as nugets they must be added to csproj/fsproj files as `PackageReference` as well.
-# For example, your project has a local dependency:
-#     <ProjectReference Include="../foo/bar.fsproj" />
-# To enable discovery through `projectReferences` you would need to add a line:
-#     <ProjectReference Include="../foo/bar.fsproj" />
-#     <PackageReference Include="bar" Version="*" Condition=" '$(ContinuousIntegrationBuild)'=='true' "/>
-, projectReferences ? []
-# Libraries that need to be available at runtime should be passed through this.
-# These get wrapped into `LD_LIBRARY_PATH`.
-, runtimeDeps ? []
-
-# Tests to disable. This gets passed to `dotnet test --filter "FullyQualifiedName!={}"`, to ensure compatibility with all frameworks.
-# See https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-test#filter-option-details for more details.
-, disabledTests ? []
-# The project file to run unit tests against. This is usually referenced in the regular project file, but sometimes it needs to be manually set.
-# It gets restored and build, but not installed. You may need to regenerate your nuget lockfile after setting this.
+  # A list of derivations containing nupkg packages for local project references.
+  # Referenced derivations can be built with `buildDotnetModule` with `packNupkg=true` flag.
+  # Since we are sharing them as nugets they must be added to csproj/fsproj files as `PackageReference` as well.
+  # For example, your project has a local dependency:
+  #     <ProjectReference Include="../foo/bar.fsproj" />
+  # To enable discovery through `projectReferences` you would need to add a line:
+  #     <ProjectReference Include="../foo/bar.fsproj" />
+  #     <PackageReference Include="bar" Version="*" Condition=" '$(ContinuousIntegrationBuild)'=='true' "/>
+, projectReferences ? [ ]
+  # Libraries that need to be available at runtime should be passed through this.
+  # These get wrapped into `LD_LIBRARY_PATH`.
+, runtimeDeps ? [ ]
+
+  # Tests to disable. This gets passed to `dotnet test --filter "FullyQualifiedName!={}"`, to ensure compatibility with all frameworks.
+  # See https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-test#filter-option-details for more details.
+, disabledTests ? [ ]
+  # The project file to run unit tests against. This is usually referenced in the regular project file, but sometimes it needs to be manually set.
+  # It gets restored and build, but not installed. You may need to regenerate your nuget lockfile after setting this.
 , testProjectFile ? ""
 
-# The type of build to perform. This is passed to `dotnet` with the `--configuration` flag. Possible values are `Release`, `Debug`, etc.
+  # The type of build to perform. This is passed to `dotnet` with the `--configuration` flag. Possible values are `Release`, `Debug`, etc.
 , buildType ? "Release"
-# If set to true, builds the application as a self-contained - removing the runtime dependency on dotnet
+  # If set to true, builds the application as a self-contained - removing the runtime dependency on dotnet
 , selfContainedBuild ? false
-# The dotnet SDK to use.
+  # The dotnet SDK to use.
 , dotnet-sdk ? dotnetCorePackages.sdk_6_0
-# The dotnet runtime to use.
+  # The dotnet runtime to use.
 , dotnet-runtime ? dotnetCorePackages.runtime_6_0
-# The dotnet SDK to run tests against. This can differentiate from the SDK compiled against.
+  # The dotnet SDK to run tests against. This can differentiate from the SDK compiled against.
 , dotnet-test-sdk ? dotnet-sdk
-, ... } @ args:
-
-assert projectFile == null -> throw "Defining the `projectFile` attribute is required. This is usually an `.csproj`, or `.sln` file.";
-
-# TODO: Automatically generate a dependency file when a lockfile is present.
-# This file is unfortunately almost never present, as Microsoft recommands not to push this in upstream repositories.
-assert nugetDeps == null -> throw "Defining the `nugetDeps` attribute is required, as to lock the NuGet dependencies. This file can be generated by running the `passthru.fetch-deps` script.";
+, ...
+} @ args:
 
 let
+  platforms =
+    if args ? meta.platforms
+    then lib.intersectLists args.meta.platforms dotnet-sdk.meta.platforms
+    else dotnet-sdk.meta.platforms;
+
   inherit (callPackage ./hooks {
     inherit dotnet-sdk dotnet-test-sdk disabledTests nuget-source dotnet-runtime runtimeDeps buildType;
   }) dotnetConfigureHook dotnetBuildHook dotnetCheckHook dotnetInstallHook dotnetFixupHook;
 
-  localDeps = if (projectReferences != [])
+  localDeps =
+    if (projectReferences != [ ])
     then linkFarmFromDrvs "${name}-project-references" projectReferences
     else null;
 
-  _nugetDeps = if lib.isDerivation nugetDeps
-    then nugetDeps
-    else mkNugetDeps { inherit name; nugetDeps = import nugetDeps; };
+  _nugetDeps =
+    if (nugetDeps != null) then
+      if lib.isDerivation nugetDeps
+      then nugetDeps
+      else mkNugetDeps { inherit name; nugetDeps = import nugetDeps; }
+    else throw "Defining the `nugetDeps` attribute is required, as to lock the NuGet dependencies. This file can be generated by running the `passthru.fetch-deps` script.";
 
   # contains the actual package dependencies
-  _dependenciesSource = mkNugetSource {
+  dependenciesSource = mkNugetSource {
     name = "${name}-dependencies-source";
     description = "A Nuget source with the dependencies for ${name}";
     deps = [ _nugetDeps ] ++ lib.optional (localDeps != null) localDeps;
@@ -110,22 +114,23 @@ let
   # this contains all the nuget packages that are implictly referenced by the dotnet
   # build system. having them as separate deps allows us to avoid having to regenerate
   # a packages dependencies when the dotnet-sdk version changes
-  _sdkDeps = mkNugetDeps {
+  sdkDeps = mkNugetDeps {
     name = "dotnet-sdk-${dotnet-sdk.version}-deps";
     nugetDeps = dotnet-sdk.passthru.packages;
   };
 
-  _sdkSource = mkNugetSource {
+  sdkSource = mkNugetSource {
     name = "dotnet-sdk-${dotnet-sdk.version}-source";
-    deps = [ _sdkDeps ];
+    deps = [ sdkDeps ];
   };
 
   nuget-source = symlinkJoin {
     name = "${name}-nuget-source";
-    paths = [ _dependenciesSource _sdkSource ];
+    paths = [ dependenciesSource sdkSource ];
   };
-in stdenvNoCC.mkDerivation (args // {
-  nativeBuildInputs = args.nativeBuildInputs or [] ++ [
+in
+stdenvNoCC.mkDerivation (args // {
+  nativeBuildInputs = args.nativeBuildInputs or [ ] ++ [
     dotnetConfigureHook
     dotnetBuildHook
     dotnetCheckHook
@@ -150,74 +155,110 @@ in stdenvNoCC.mkDerivation (args // {
   passthru = {
     inherit nuget-source;
 
-    fetch-deps = let
-      # Because this list is rather long its put in its own store path to maintain readability of the generated script
-      exclusions = writeText "nuget-package-exclusions" (lib.concatStringsSep "\n" (dotnet-sdk.passthru.packages { fetchNuGet = attrs: attrs.pname; }));
-
-      runtimeIds = map (system: dotnet-sdk.systemToDotnetRid system) (args.meta.platforms or dotnet-sdk.meta.platforms);
-
-      # Derivations may set flags such as `--runtime <rid>` based on the host platform to avoid restoring/building nuget dependencies they dont have or dont need.
-      # This introduces an issue; In this script we loop over all platforms from `meta` and add the RID flag for it, as to fetch all required dependencies.
-      # The script would inherit the RID flag from the derivation based on the platform building the script, and set the flag for any iteration we do over the RIDs.
-      # That causes conflicts. To circumvent it we remove all occurances of the flag.
-      flags =
-        let
-          hasRid = flag: lib.any (v: v) (map (rid: lib.hasInfix rid flag) (lib.attrValues dotnet-sdk.runtimeIdentifierMap));
-        in
-        builtins.filter (flag: !(hasRid flag)) (dotnetFlags ++ dotnetRestoreFlags);
-
-    in writeShellScript "fetch-${pname}-deps" ''
-      set -euo pipefail
-
-      export PATH="${lib.makeBinPath [ coreutils dotnet-sdk nuget-to-nix ]}"
-
-      case "''${1-}" in
-          --help|-h)
-              echo "usage: $0 <output path> [--help]"
-              echo "    <output path>  The path to write the lockfile to"
-              echo "    --help         Show this help message"
-              exit
-              ;;
-      esac
-
-      deps_file="$(realpath "''${1:-$(mktemp -t "XXXXXX-${pname}-deps.nix")}")"
-      export HOME=$(mktemp -td "XXXXXX-${pname}-home")
-      mkdir -p "$HOME/nuget_pkgs"
-
-      store_src="${srcOnly args}"
-      src="$(mktemp -td "XXXXXX-${pname}-src")"
-      cp -rT "$store_src" "$src"
-      chmod -R +w "$src"
-      trap "rm -rf $src $HOME" EXIT
-
-      cd "$src"
-      echo "Restoring project..."
-
-      export DOTNET_NOLOGO=1
-      export DOTNET_CLI_TELEMETRY_OPTOUT=1
-
-      for rid in "${lib.concatStringsSep "\" \"" runtimeIds}"; do
-          for project in "${lib.concatStringsSep "\" \"" ((lib.toList projectFile) ++ lib.optionals (testProjectFile != "") (lib.toList testProjectFile))}"; do
-              dotnet restore "$project" \
-                  -p:ContinuousIntegrationBuild=true \
-                  -p:Deterministic=true \
-                  --packages "$HOME/nuget_pkgs" \
-                  --runtime "$rid" \
-                  ${lib.optionalString (!enableParallelBuilding) "--disable-parallel"} \
-                  ${lib.optionalString (flags != []) (toString flags)}
-          done
-      done
-
-      echo "Succesfully restored project"
-
-      echo "Writing lockfile..."
-      echo -e "# This file was automatically generated by passthru.fetch-deps.\n# Please dont edit it manually, your changes might get overwritten!\n" > "$deps_file"
-      nuget-to-nix "$HOME/nuget_pkgs" "${exclusions}" >> "$deps_file"
-      echo "Succesfully wrote lockfile to: $deps_file"
-    '';
-  } // args.passthru or {};
-
-  meta = {
-    platforms = dotnet-sdk.meta.platforms;
-  } // args.meta or {};
+    fetch-deps =
+      let
+        # Derivations may set flags such as `--runtime <rid>` based on the host platform to avoid restoring/building nuget dependencies they dont have or dont need.
+        # This introduces an issue; In this script we loop over all platforms from `meta` and add the RID flag for it, as to fetch all required dependencies.
+        # The script would inherit the RID flag from the derivation based on the platform building the script, and set the flag for any iteration we do over the RIDs.
+        # That causes conflicts. To circumvent it we remove all occurances of the flag.
+        flags =
+          let
+            hasRid = flag: lib.any (v: v) (map (rid: lib.hasInfix rid flag) (lib.attrValues dotnet-sdk.runtimeIdentifierMap));
+          in
+          builtins.filter (flag: !(hasRid flag)) (dotnetFlags ++ dotnetRestoreFlags);
+
+        runtimeIds = map (system: dotnet-sdk.systemToDotnetRid system) platforms;
+      in
+      writeShellScript "fetch-${pname}-deps" ''
+        set -euo pipefail
+
+        export PATH="${lib.makeBinPath [ coreutils dotnet-sdk (nuget-to-nix.override { inherit dotnet-sdk; }) ]}"
+
+        for arg in "$@"; do
+            case "$arg" in
+                --keep-sources|-k)
+                    keepSources=1
+                    shift
+                    ;;
+                --help|-h)
+                    echo "usage: $0 [--keep-sources] [--help] <output path>"
+                    echo "    <output path>   The path to write the lockfile to. A temporary file is used if this is not set"
+                    echo "    --keep-sources  Dont remove temporary directories upon exit, useful for debugging"
+                    echo "    --help          Show this help message"
+                    exit
+                    ;;
+            esac
+        done
+
+        export tmp=$(mktemp -td "${pname}-tmp-XXXXXX")
+        HOME=$tmp/home
+
+        exitTrap() {
+            test -n "''${ranTrap-}" && return
+            ranTrap=1
+
+            if test -n "''${keepSources-}"; then
+                echo -e "Path to the source: $tmp/src\nPath to the fake home: $tmp/home"
+            else
+                rm -rf "$tmp"
+            fi
+
+            # Since mktemp is used this will be empty if the script didnt succesfully complete
+            if ! test -s "$depsFile"; then
+              rm -rf "$depsFile"
+            fi
+        }
+
+        trap exitTrap EXIT INT TERM
+
+        dotnetRestore() {
+            local -r project="''${1-}"
+            local -r rid="$2"
+
+            dotnet restore ''${project-} \
+                -p:ContinuousIntegrationBuild=true \
+                -p:Deterministic=true \
+                --packages "$tmp/nuget_pkgs" \
+                --runtime "$rid" \
+                --no-cache \
+                --force \
+                ${lib.optionalString (!enableParallelBuilding) "--disable-parallel"} \
+                ${lib.optionalString (flags != []) (toString flags)}
+        }
+
+        declare -a projectFiles=( ${toString (lib.toList projectFile)} )
+        declare -a testProjectFiles=( ${toString (lib.toList testProjectFile)} )
+
+        export DOTNET_NOLOGO=1
+        export DOTNET_CLI_TELEMETRY_OPTOUT=1
+
+        depsFile=$(realpath "''${1:-$(mktemp -t "${pname}-deps-XXXXXX.nix")}")
+        mkdir -p "$tmp/nuget_pkgs"
+
+        storeSrc="${srcOnly args}"
+        src=$tmp/src
+        cp -rT "$storeSrc" "$src"
+        chmod -R +w "$src"
+
+        cd "$src"
+        echo "Restoring project..."
+
+        for rid in "${lib.concatStringsSep "\" \"" runtimeIds}"; do
+            (( ''${#projectFiles[@]} == 0 )) && dotnetRestore "" "$rid"
+
+            for project in ''${projectFiles[@]-} ''${testProjectFiles[@]-}; do
+                dotnetRestore "$project" "$rid"
+            done
+        done
+
+        echo "Succesfully restored project"
+
+        echo "Writing lockfile..."
+        echo -e "# This file was automatically generated by passthru.fetch-deps.\n# Please dont edit it manually, your changes might get overwritten!\n" > "$depsFile"
+        nuget-to-nix "$tmp/nuget_pkgs" "${sdkDeps}" >> "$depsFile"
+        echo "Succesfully wrote lockfile to $depsFile"
+      '';
+  } // args.passthru or { };
+
+  meta = (args.meta or { }) // { inherit platforms; };
 })
diff --git a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-build-hook.sh b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-build-hook.sh
index c7a6d8c17ab..9199b8d02a8 100644
--- a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-build-hook.sh
+++ b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-build-hook.sh
@@ -7,11 +7,11 @@ dotnetBuildHook() {
     runHook preBuild
 
     if [ "${enableParallelBuilding-}" ]; then
-        maxCpuFlag="$NIX_BUILD_CORES"
-        parallelBuildFlag="true"
+        local -r maxCpuFlag="$NIX_BUILD_CORES"
+        local -r parallelBuildFlag="true"
     else
-        maxCpuFlag="1"
-        parallelBuildFlag="false"
+        local -r maxCpuFlag="1"
+        local -r parallelBuildFlag="false"
     fi
 
     if [ "${selfContainedBuild-}" ]; then
@@ -21,22 +21,28 @@ dotnetBuildHook() {
     fi
 
     if [ "${version-}" ]; then
-        versionFlag="-p:Version=${version-}"
+        local -r versionFlag="-p:Version=${version-}"
     fi
 
-    for project in ${projectFile[@]} ${testProjectFile[@]}; do
-        env \
-            dotnet build "$project" \
-                -maxcpucount:$maxCpuFlag \
-                -p:BuildInParallel=$parallelBuildFlag \
-                -p:ContinuousIntegrationBuild=true \
-                -p:Deterministic=true \
-                -p:UseAppHost=true \
-                --configuration "@buildType@" \
-                --no-restore \
-                ${versionFlag-} \
-                ${dotnetBuildFlags[@]}  \
-                ${dotnetFlags[@]}
+    dotnetBuild() {
+        local -r project="${1-}"
+        env dotnet build ${project-} \
+            -maxcpucount:$maxCpuFlag \
+            -p:BuildInParallel=$parallelBuildFlag \
+            -p:ContinuousIntegrationBuild=true \
+            -p:Deterministic=true \
+            -p:UseAppHost=true \
+            --configuration "@buildType@" \
+            --no-restore \
+            ${versionFlag-} \
+            ${dotnetBuildFlags[@]}  \
+            ${dotnetFlags[@]}
+    }
+
+    (( "${#projectFile[@]}" == 0 )) && dotnetBuild
+
+    for project in ${projectFile[@]} ${testProjectFile[@]-}; do
+        dotnetBuild "$project"
     done
 
     runHook postBuild
diff --git a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-check-hook.sh b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-check-hook.sh
index bc7b1b5c3d8..0c0e5d310ea 100644
--- a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-check-hook.sh
+++ b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-check-hook.sh
@@ -7,10 +7,16 @@ dotnetCheckHook() {
     runHook preCheck
 
     if [ "${disabledTests-}" ]; then
-        disabledTestsFlag="--filter FullyQualifiedName!=@disabledTests@"
+        local -r disabledTestsFlag="--filter FullyQualifiedName!=@disabledTests@"
     fi
 
-    for project in ${testProjectFile[@]}; do
+    if [ "${enableParallelBuilding-}" ]; then
+        local -r maxCpuFlag="$NIX_BUILD_CORES"
+    else
+        local -r maxCpuFlag="1"
+    fi
+
+    for project in ${testProjectFile[@]-}; do
         env "LD_LIBRARY_PATH=@libraryPath@" \
             dotnet test "$project" \
               -maxcpucount:$maxCpuFlag \
diff --git a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh
index 3e8c1418950..3479f58bb38 100644
--- a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh
+++ b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-configure-hook.sh
@@ -10,18 +10,36 @@ dotnetConfigureHook() {
     runHook preConfigure
 
     if [ -z "${enableParallelBuilding-}" ]; then
-        parallelFlag="--disable-parallel"
+        local -r parallelFlag="--disable-parallel"
     fi
 
-    for project in ${projectFile[@]} ${testProjectFile[@]}; do
-        env \
-            dotnet restore "$project" \
-                -p:ContinuousIntegrationBuild=true \
-                -p:Deterministic=true \
-                --source "@nugetSource@/lib" \
-                ${parallelFlag-} \
-                ${dotnetRestoreFlags[@]} \
-                ${dotnetFlags[@]}
+    dotnetRestore() {
+        local -r project="${1-}"
+        env dotnet restore ${project-} \
+            -p:ContinuousIntegrationBuild=true \
+            -p:Deterministic=true \
+            --source "@nugetSource@/lib" \
+            ${parallelFlag-} \
+            ${dotnetRestoreFlags[@]} \
+            ${dotnetFlags[@]}
+    }
+
+    (( "${#projectFile[@]}" == 0 )) && dotnetRestore
+
+    # Generate a NuGet.config file to make sure everything,
+    # including things like <Sdk /> dependencies, is restored from the proper source
+cat <<EOF > "./NuGet.config"
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+  <packageSources>
+    <clear />
+    <add key="nugetSource" value="@nugetSource@/lib" />
+  </packageSources>
+</configuration>
+EOF
+
+    for project in ${projectFile[@]} ${testProjectFile[@]-}; do
+        dotnetRestore "$project"
     done
 
     runHook postConfigure
diff --git a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-fixup-hook.sh b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-fixup-hook.sh
index 0a881fae9cf..59df9b319af 100644
--- a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-fixup-hook.sh
+++ b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-fixup-hook.sh
@@ -5,38 +5,37 @@ makeWrapperArgs=( ${makeWrapperArgs-} )
 # the second is the destination for the wrapper.
 wrapDotnetProgram() {
     if [ ! "${selfContainedBuild-}" ]; then
-        dotnetRootFlag=("--set" "DOTNET_ROOT" "@dotnetRuntime@")
+        local -r dotnetRootFlag=("--set" "DOTNET_ROOT" "@dotnetRuntime@")
     fi
 
     makeWrapper "$1" "$2" \
-        "${dotnetRootFlag[@]}" \
         --suffix "LD_LIBRARY_PATH" : "@runtimeDeps@" \
+        "${dotnetRootFlag[@]}" \
         "${gappsWrapperArgs[@]}" \
         "${makeWrapperArgs[@]}"
 
-    echo "Installed wrapper to: "$2""
+    echo "installed wrapper to "$2""
 }
 
 dotnetFixupHook() {
     echo "Executing dotnetFixupPhase"
 
-    if [ "${executables}" ]; then
+    if [ "${executables-}" ]; then
         for executable in ${executables[@]}; do
-            execPath="$out/lib/${pname}/$executable"
+            path="$out/lib/$pname/$executable"
 
-            if [[ -f "$execPath" && -x "$execPath" ]]; then
-                wrapDotnetProgram "$execPath" "$out/bin/$(basename "$executable")"
+            if test -x "$path"; then
+                wrapDotnetProgram "$path" "$out/bin/$(basename "$executable")"
             else
-                echo "Specified binary \"$executable\" is either not an executable, or does not exist!"
+                echo "Specified binary \"$executable\" is either not an executable or does not exist!"
+                echo "Looked in $path"
                 exit 1
             fi
         done
     else
-        for executable in $out/lib/${pname}/*; do
-            if [[ -f "$executable" && -x "$executable" && "$executable" != *"dll"* ]]; then
-                wrapDotnetProgram "$executable" "$out/bin/$(basename "$executable")"
-            fi
-        done
+        while IFS= read -d '' executable; do
+            wrapDotnetProgram "$executable" "$out/bin/$(basename "$executable")" \;
+        done < <(find "$out/lib/$pname" ! -name "*.dll" -executable -type f -print0)
     fi
 
     echo "Finished dotnetFixupPhase"
diff --git a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-install-hook.sh b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-install-hook.sh
index fd88ea32ec0..217e79e41b4 100644
--- a/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-install-hook.sh
+++ b/pkgs/build-support/dotnet/build-dotnet-module/hooks/dotnet-install-hook.sh
@@ -12,33 +12,49 @@ dotnetInstallHook() {
         dotnetInstallFlags+=("--no-self-contained")
     fi
 
-    for project in ${projectFile[@]}; do
-        env \
-            dotnet publish "$project" \
-                -p:ContinuousIntegrationBuild=true \
-                -p:Deterministic=true \
-                -p:UseAppHost=true \
-                --output "$out/lib/${pname}" \
-                --configuration "@buildType@" \
-                --no-build \
-                ${dotnetInstallFlags[@]}  \
-                ${dotnetFlags[@]}
-    done
+    dotnetPublish() {
+        local -r project="${1-}"
+        env dotnet publish ${project-} \
+            -p:ContinuousIntegrationBuild=true \
+            -p:Deterministic=true \
+            -p:UseAppHost=true \
+            --output "$out/lib/${pname}" \
+            --configuration "@buildType@" \
+            --no-build \
+            ${dotnetInstallFlags[@]}  \
+            ${dotnetFlags[@]}
+    }
 
-    if [[ "${packNupkg-}" ]]; then
+    dotnetPack() {
+        local -r project="${1-}"
+         env dotnet pack ${project-} \
+             -p:ContinuousIntegrationBuild=true \
+             -p:Deterministic=true \
+             --output "$out/share" \
+             --configuration "@buildType@" \
+             --no-build \
+             ${dotnetPackFlags[@]}  \
+             ${dotnetFlags[@]}
+    }
+
+    if (( "${#projectFile[@]}" == 0 )); then
+        dotnetPublish
+    else
         for project in ${projectFile[@]}; do
-            env \
-                dotnet pack "$project" \
-                    -p:ContinuousIntegrationBuild=true \
-                    -p:Deterministic=true \
-                    --output "$out/share" \
-                    --configuration "@buildType@" \
-                    --no-build \
-                    ${dotnetPackFlags[@]}  \
-                    ${dotnetFlags[@]}
+            dotnetPublish "$project"
         done
     fi
 
+    if [[ "${packNupkg-}" ]]; then
+        if (( "${#projectFile[@]}" == 0 )); then
+            dotnetPack
+        else
+            for project in ${projectFile[@]}; do
+                dotnetPack "$project"
+            done
+        fi
+    fi
+
     runHook postInstall
 
     echo "Finished dotnetInstallHook"
diff --git a/pkgs/build-support/dotnet/make-nuget-deps/default.nix b/pkgs/build-support/dotnet/make-nuget-deps/default.nix
index edbea45c52a..723646c5fdc 100644
--- a/pkgs/build-support/dotnet/make-nuget-deps/default.nix
+++ b/pkgs/build-support/dotnet/make-nuget-deps/default.nix
@@ -4,7 +4,7 @@ linkFarmFromDrvs "${name}-nuget-deps" (nugetDeps {
   fetchNuGet = { pname, version, sha256
     , url ? "https://www.nuget.org/api/v2/package/${pname}/${version}" }:
     fetchurl {
-      name = "${pname}-${version}.nupkg";
+      name = "${pname}.${version}.nupkg";
       inherit url sha256;
     };
 })
diff --git a/pkgs/build-support/dotnet/nuget-to-nix/default.nix b/pkgs/build-support/dotnet/nuget-to-nix/default.nix
index e3a3e45ac20..3fdda4ac68d 100644
--- a/pkgs/build-support/dotnet/nuget-to-nix/default.nix
+++ b/pkgs/build-support/dotnet/nuget-to-nix/default.nix
@@ -4,11 +4,12 @@
 , substituteAll
 , nix
 , coreutils
-, findutils
-, gnused
 , jq
+, yq
 , curl
 , gnugrep
+, gawk
+, dotnet-sdk
 }:
 
 runCommandLocal "nuget-to-nix" {
@@ -19,11 +20,12 @@ runCommandLocal "nuget-to-nix" {
     binPath = lib.makeBinPath [
       nix
       coreutils
-      findutils
-      gnused
       jq
+      yq
       curl
       gnugrep
+      gawk
+      dotnet-sdk
     ];
   };
 
diff --git a/pkgs/build-support/dotnet/nuget-to-nix/nuget-to-nix.sh b/pkgs/build-support/dotnet/nuget-to-nix/nuget-to-nix.sh
index ca0a63b3cd2..390c96751fa 100755
--- a/pkgs/build-support/dotnet/nuget-to-nix/nuget-to-nix.sh
+++ b/pkgs/build-support/dotnet/nuget-to-nix/nuget-to-nix.sh
@@ -3,42 +3,82 @@
 set -euo pipefail
 
 export PATH="@binPath@"
+# used for glob ordering of package names
+export LC_ALL=C
 
 if [ $# -eq 0 ]; then
-  >&2 echo "Usage: $0 <packages directory> [path to file with a list of excluded packages] > deps.nix"
+  >&2 echo "Usage: $0 <packages directory> [path to excluded package source] > deps.nix"
   exit 1
 fi
 
 pkgs=$1
-exclusions="${2:-/dev/null}"
-tmpfile=$(mktemp /tmp/nuget-to-nix.XXXXXX)
-trap "rm -f ${tmpfile}" EXIT
+tmp=$(realpath "$(mktemp -td nuget-to-nix.XXXXXX)")
+trap 'rm -r "$tmp"' EXIT
+excluded_source=$(realpath "${2:-$tmp/empty}")
 
-declare -A nuget_sources_cache
+export DOTNET_NOLOGO=1
+export DOTNET_CLI_TELEMETRY_OPTOUT=1
+
+mapfile -t sources < <(dotnet nuget list source --format short | awk '/^E / { print $2 }')
+
+declare -A base_addresses
+
+for index in "${sources[@]}"; do
+  base_addresses[$index]=$(
+    curl --compressed --netrc -fsL "$index" | \
+      jq -r '.resources[] | select(."@type" == "PackageBaseAddress/3.0.0")."@id"')
+done
 
 echo "{ fetchNuGet }: ["
 
-while read pkg_spec; do
-  { read pkg_name; read pkg_version; } < <(
-    # Build version part should be ignored: `3.0.0-beta2.20059.3+77df2220` -> `3.0.0-beta2.20059.3`
-    sed -nE 's/.*<id>([^<]*).*/\1/p; s/.*<version>([^<+]*).*/\1/p' "$pkg_spec")
+cd "$pkgs"
+for package in *; do
+  cd "$package"
+  for version in *; do
+    id=$(xq -r .package.metadata.id "$version/$package".nuspec)
 
-  if grep "$pkg_name" "$exclusions" > /dev/null; then
-    continue
-  fi
+    if [[ -e "$excluded_source/$id.$version".nupkg ]]; then
+      continue
+    fi
 
-  pkg_sha256="$(nix-hash --type sha256 --flat --base32 "$(dirname "$pkg_spec")"/*.nupkg)"
+    used_source="$(jq -r '.source' "$version"/.nupkg.metadata)"
+    for source in "${sources[@]}"; do
+      url="${base_addresses[$source]}$package/$version/$package.$version.nupkg"
+      if [[ "$source" == "$used_source" ]]; then
+        sha256="$(nix-hash --type sha256 --flat --base32 "$version/$package.$version".nupkg)"
+        found=true
+        break
+      else
+        if sha256=$(nix-prefetch-url "$url" 2>"$tmp"/error); then
+          # If multiple remote sources are enabled, nuget will try them all
+          # concurrently and use the one that responds first. We always use the
+          # first source that has the package.
+          echo "$package $version is available at $url, but was restored from $used_source" 1>&2
+          found=true
+          break
+        else
+          if ! grep -q 'HTTP error 404' "$tmp/error"; then
+            cat "$tmp/error" 1>&2
+            exit 1
+          fi
+        fi
+      fi
+    done
 
-  pkg_src="$(jq --raw-output '.source' "$(dirname "$pkg_spec")/.nupkg.metadata")"
-  if [[ $pkg_src != https://api.nuget.org/* ]] && [[ ! -d $pkg_src ]]; then
-    pkg_source_url="${nuget_sources_cache[$pkg_src]:=$(curl -n --fail "$pkg_src" | jq --raw-output '.resources[] | select(."@type" == "PackageBaseAddress/3.0.0")."@id"')}"
-    pkg_url="$pkg_source_url${pkg_name,,}/${pkg_version,,}/${pkg_name,,}.${pkg_version,,}.nupkg"
-    echo "  (fetchNuGet { pname = \"$pkg_name\"; version = \"$pkg_version\"; sha256 = \"$pkg_sha256\"; url = \"$pkg_url\"; })" >> ${tmpfile}
-  else
-    echo "  (fetchNuGet { pname = \"$pkg_name\"; version = \"$pkg_version\"; sha256 = \"$pkg_sha256\"; })" >> ${tmpfile}
-  fi
-done < <(find $1 -name '*.nuspec')
+    if ! ${found-false}; then
+      echo "couldn't find $package $version" >&2
+      exit 1
+    fi
 
-LC_ALL=C sort --ignore-case ${tmpfile}
+    if [[ "$source" != https://api.nuget.org/v3/index.json ]]; then
+      echo "  (fetchNuGet { pname = \"$id\"; version = \"$version\"; sha256 = \"$sha256\"; url = \"$url\"; })"
+    else
+      echo "  (fetchNuGet { pname = \"$id\"; version = \"$version\"; sha256 = \"$sha256\"; })"
+    fi
+  done
+  cd ..
+done
 
-echo "]"
+cat << EOL
+]
+EOL
diff --git a/pkgs/build-support/emacs/generic.nix b/pkgs/build-support/emacs/generic.nix
index 1b81dbcf9ed..e3d1505dde8 100644
--- a/pkgs/build-support/emacs/generic.nix
+++ b/pkgs/build-support/emacs/generic.nix
@@ -85,7 +85,7 @@ stdenv.mkDerivation ({
     addEmacsVars "$out"
 
     find $out/share/emacs -type f -name '*.el' -print0 \
-      | xargs -0 -n 1 -I {} -P $NIX_BUILD_CORES sh -c \
+      | xargs -0 -I {} -n 1 -P $NIX_BUILD_CORES sh -c \
           "emacs --batch --eval '(setq large-file-warning-threshold nil)' -f batch-native-compile {} || true"
   '';
 }
diff --git a/pkgs/build-support/emacs/melpa.nix b/pkgs/build-support/emacs/melpa.nix
index 924e6d95f14..85bc8aa37b3 100644
--- a/pkgs/build-support/emacs/melpa.nix
+++ b/pkgs/build-support/emacs/melpa.nix
@@ -35,11 +35,24 @@ import ./generic.nix { inherit lib stdenv emacs texinfo writeText gcc; } ({
     then pname
     else ename;
 
-  packageBuild = fetchFromGitHub {
-    owner = "melpa";
-    repo = "package-build";
-    rev = "35017a2d87376c70c3239f48bdbac7efca85aa10";
-    sha256 = "07hdmam85452v4r2vaabj1qfyami1hgbh0jgj9dcwbkpr0y1gvqj";
+  packageBuild = stdenv.mkDerivation {
+    name = "package-build";
+    src = fetchFromGitHub {
+      owner = "melpa";
+      repo = "package-build";
+      rev = "c3c535e93d9dc92acd21ebc4b15016b5c3b90e7d";
+      sha256 = "17z0wbqdd6fspbj43yq8biff6wfggk74xgnaf1xx6ynsp1i74is5";
+    };
+
+    patches = [ ./package-build-dont-use-mtime.patch ];
+
+    dontConfigure = true;
+    dontBuild = true;
+
+    installPhase = "
+      mkdir -p $out
+      cp -r * $out
+    ";
   };
 
   elpa2nix = ./elpa2nix.el;
diff --git a/pkgs/build-support/emacs/package-build-dont-use-mtime.patch b/pkgs/build-support/emacs/package-build-dont-use-mtime.patch
new file mode 100644
index 00000000000..fe94de57a30
--- /dev/null
+++ b/pkgs/build-support/emacs/package-build-dont-use-mtime.patch
@@ -0,0 +1,40 @@
+diff --git a/package-build.el b/package-build.el
+index e572045..9eb0f82 100644
+--- a/package-build.el
++++ b/package-build.el
+@@ -415,7 +415,7 @@ (defun package-build--write-pkg-file (desc dir)
+       (princ ";; Local Variables:\n;; no-byte-compile: t\n;; End:\n"
+              (current-buffer)))))
+ 
+-(defun package-build--create-tar (name version directory mtime)
++(defun package-build--create-tar (name version directory)
+   "Create a tar file containing the contents of VERSION of package NAME.
+ DIRECTORY is a temporary directory that contains the directory
+ that is put in the tarball.  MTIME is used as the modification
+@@ -434,7 +434,7 @@ (defun package-build--create-tar (name version directory mtime)
+        ;; prevent a reproducable tarball as described at
+        ;; https://reproducible-builds.org/docs/archives.
+        "--sort=name"
+-       (format "--mtime=@%d" mtime)
++       "--mtime=@0"
+        "--owner=0" "--group=0" "--numeric-owner"
+        "--pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime"))
+     (when (and package-build-verbose noninteractive)
+@@ -848,12 +848,11 @@ (defun package-build--build-multi-file-package (rcp version commit files source-
+                            (package-build--desc-from-library
+                             name version commit files 'tar)
+                            (error "%s[-pkg].el matching package name is missing"
+-                                  name))))
+-               (mtime (package-build--get-commit-time rcp commit)))
++                                  name)))))
+           (package-build--copy-package-files files source-dir target)
+           (package-build--write-pkg-file desc target)
+           (package-build--generate-info-files files source-dir target)
+-          (package-build--create-tar name version tmp-dir mtime)
++          (package-build--create-tar name version tmp-dir)
+           (package-build--write-pkg-readme name files source-dir)
+           (package-build--write-archive-entry desc))
+       (delete-directory tmp-dir t nil))))
+-- 
+2.37.2
+
diff --git a/pkgs/build-support/fake-nss/default.nix b/pkgs/build-support/fake-nss/default.nix
index 9e0b60133e0..7d85ec5fc0a 100644
--- a/pkgs/build-support/fake-nss/default.nix
+++ b/pkgs/build-support/fake-nss/default.nix
@@ -2,17 +2,17 @@
 # Useful when packaging binaries that insist on using nss to look up
 # username/groups (like nginx).
 # /bin/sh is fine to not exist, and provided by another shim.
-{ symlinkJoin, writeTextDir, runCommand }:
+{ lib, symlinkJoin, writeTextDir, runCommand, extraPasswdLines ? [], extraGroupLines ? [] }:
 symlinkJoin {
   name = "fake-nss";
   paths = [
     (writeTextDir "etc/passwd" ''
       root:x:0:0:root user:/var/empty:/bin/sh
-      nobody:x:65534:65534:nobody:/var/empty:/bin/sh
+      ${lib.concatStrings (map (line: line + "\n") extraPasswdLines)}nobody:x:65534:65534:nobody:/var/empty:/bin/sh
     '')
     (writeTextDir "etc/group" ''
       root:x:0:
-      nobody:x:65534:
+      ${lib.concatStrings (map (line: line + "\n") extraGroupLines)}nobody:x:65534:
     '')
     (writeTextDir "etc/nsswitch.conf" ''
       hosts: files dns
diff --git a/pkgs/build-support/fetchgit/default.nix b/pkgs/build-support/fetchgit/default.nix
index f516c3d5a03..1fec0c88747 100644
--- a/pkgs/build-support/fetchgit/default.nix
+++ b/pkgs/build-support/fetchgit/default.nix
@@ -15,7 +15,7 @@ in
 { url, rev ? "HEAD", md5 ? "", sha256 ? "", hash ? "", leaveDotGit ? deepClone
 , fetchSubmodules ? true, deepClone ? false
 , branchName ? null
-, sparseCheckout ? ""
+, sparseCheckout ? []
 , nonConeMode ? false
 , name ? urlToName url rev
 , # Shell code executed after the file has been fetched
@@ -55,13 +55,16 @@ in
 */
 
 assert deepClone -> leaveDotGit;
-assert nonConeMode -> (sparseCheckout != "");
+assert nonConeMode -> !(sparseCheckout == "" || sparseCheckout == []);
 
 if md5 != "" then
   throw "fetchgit does not support md5 anymore, please use sha256"
 else if hash != "" && sha256 != "" then
   throw "Only one of sha256 or hash can be set"
 else
+# Added 2022-11-12
+lib.warnIf (builtins.isString sparseCheckout)
+  "Please provide directories/patterns for sparse checkout as a list of strings. Support for passing a (multi-line) string is deprecated and will be removed in the next release."
 stdenvNoCC.mkDerivation {
   inherit name;
   builder = ./builder.sh;
@@ -79,7 +82,12 @@ stdenvNoCC.mkDerivation {
   else
     lib.fakeSha256;
 
-  inherit url rev leaveDotGit fetchLFS fetchSubmodules deepClone branchName sparseCheckout nonConeMode postFetch;
+  # git-sparse-checkout(1) says:
+  # > When the --stdin option is provided, the directories or patterns are read
+  # > from standard in as a newline-delimited list instead of from the arguments.
+  sparseCheckout = if builtins.isString sparseCheckout then sparseCheckout else builtins.concatStringsSep "\n" sparseCheckout;
+
+  inherit url rev leaveDotGit fetchLFS fetchSubmodules deepClone branchName nonConeMode postFetch;
 
   postHook = if netrcPhase == null then null else ''
     ${netrcPhase}
diff --git a/pkgs/build-support/fetchgit/tests.nix b/pkgs/build-support/fetchgit/tests.nix
index 62fe3f77bbd..a18be65327b 100644
--- a/pkgs/build-support/fetchgit/tests.nix
+++ b/pkgs/build-support/fetchgit/tests.nix
@@ -12,10 +12,10 @@
     name = "nix-source";
     url = "https://github.com/NixOS/nix";
     rev = "9d9dbe6ed05854e03811c361a3380e09183f4f4a";
-    sparseCheckout = ''
-      src
-      tests
-    '';
+    sparseCheckout = [
+      "src"
+      "tests"
+    ];
     sha256 = "sha256-g1PHGTWgAcd/+sXHo1o6AjVWCvC6HiocOfMbMh873LQ=";
   };
 
@@ -23,10 +23,10 @@
     name = "nix-source";
     url = "https://github.com/NixOS/nix";
     rev = "9d9dbe6ed05854e03811c361a3380e09183f4f4a";
-    sparseCheckout = ''
-      src
-      tests
-    '';
+    sparseCheckout = [
+      "src"
+      "tests"
+    ];
     nonConeMode = true;
     sha256 = "sha256-FknO6C/PSnMPfhUqObD4vsW4PhkwdmPa9blNzcNvJQ4=";
   };
diff --git a/pkgs/build-support/fetchgithub/default.nix b/pkgs/build-support/fetchgithub/default.nix
index cfb6a6ca7cd..b1a85e9f691 100644
--- a/pkgs/build-support/fetchgithub/default.nix
+++ b/pkgs/build-support/fetchgithub/default.nix
@@ -3,7 +3,7 @@
 { owner, repo, rev, name ? "source"
 , fetchSubmodules ? false, leaveDotGit ? null
 , deepClone ? false, private ? false, forceFetchGit ? false
-, sparseCheckout ? ""
+, sparseCheckout ? []
 , githubBase ? "github.com", varPrefix ? null
 , meta ? { }
 , ... # For hash agility
@@ -24,7 +24,7 @@ let
   };
   passthruAttrs = removeAttrs args [ "owner" "repo" "rev" "fetchSubmodules" "forceFetchGit" "private" "githubBase" "varPrefix" ];
   varBase = "NIX${if varPrefix == null then "" else "_${varPrefix}"}_GITHUB_PRIVATE_";
-  useFetchGit = fetchSubmodules || (leaveDotGit == true) || deepClone || forceFetchGit || (sparseCheckout != "");
+  useFetchGit = fetchSubmodules || (leaveDotGit == true) || deepClone || forceFetchGit || !(sparseCheckout == "" || sparseCheckout == []);
   # We prefer fetchzip in cases we don't need submodules as the hash
   # is more stable in that case.
   fetcher = if useFetchGit then fetchgit else fetchzip;
@@ -59,4 +59,4 @@ let
   ) // privateAttrs // passthruAttrs // { inherit name; };
 in
 
-fetcher fetcherArgs // { meta = newMeta; inherit rev; }
+fetcher fetcherArgs // { meta = newMeta; inherit rev owner repo; }
diff --git a/pkgs/build-support/fetchgitlab/default.nix b/pkgs/build-support/fetchgitlab/default.nix
index 264bbcf3f76..5cdd04fc46c 100644
--- a/pkgs/build-support/fetchgitlab/default.nix
+++ b/pkgs/build-support/fetchgitlab/default.nix
@@ -10,7 +10,7 @@ let
   slug = lib.concatStringsSep "/" ((lib.optional (group != null) group) ++ [ owner repo ]);
   escapedSlug = lib.replaceStrings [ "." "/" ] [ "%2E" "%2F" ] slug;
   escapedRev = lib.replaceStrings [ "+" "%" "/" ] [ "%2B" "%25" "%2F" ] rev;
-  passthruAttrs = removeAttrs args [ "protocol" "domain" "owner" "group" "repo" "rev" ];
+  passthruAttrs = removeAttrs args [ "protocol" "domain" "owner" "group" "repo" "rev" "fetchSubmodules" "leaveDotGit" "deepClone" ];
 
   useFetchGit = deepClone || fetchSubmodules || leaveDotGit;
   fetcher = if useFetchGit then fetchgit else fetchzip;
diff --git a/pkgs/build-support/fetchmavenartifact/default.nix b/pkgs/build-support/fetchmavenartifact/default.nix
index 4274b4b52bf..efdbd0decf9 100644
--- a/pkgs/build-support/fetchmavenartifact/default.nix
+++ b/pkgs/build-support/fetchmavenartifact/default.nix
@@ -39,14 +39,14 @@ assert (repos != []) || (url != "") || (urls != []);
 let
   name_ =
     lib.concatStrings [
-      (lib.replaceChars ["."] ["_"] groupId) "_"
-      (lib.replaceChars ["."] ["_"] artifactId) "-"
+      (lib.replaceStrings ["."] ["_"] groupId) "_"
+      (lib.replaceStrings ["."] ["_"] artifactId) "-"
       version
     ];
   mkJarUrl = repoUrl:
     lib.concatStringsSep "/" [
       (lib.removeSuffix "/" repoUrl)
-      (lib.replaceChars ["."] ["/"] groupId)
+      (lib.replaceStrings ["."] ["/"] groupId)
       artifactId
       version
       "${artifactId}-${version}${lib.optionalString (!isNull classifier) "-${classifier}"}.jar"
diff --git a/pkgs/build-support/fetchnextcloudapp/default.nix b/pkgs/build-support/fetchnextcloudapp/default.nix
index 1997c80c8a1..a7a3066ffab 100644
--- a/pkgs/build-support/fetchnextcloudapp/default.nix
+++ b/pkgs/build-support/fetchnextcloudapp/default.nix
@@ -1,32 +1,27 @@
-{ stdenv, fetchurl, ... }:
-{ name
-, url
-, version
+{ stdenv, fetchzip, applyPatches, ... }:
+{ url
 , sha256
 , patches ? [ ]
+, name ? null
+, version ? null
 }:
-stdenv.mkDerivation {
-  pname = "nc-app-${name}";
-  inherit version patches;
-
-  src = fetchurl {
+if name != null || version != null then throw ''
+  `pkgs.fetchNextcloudApp` has been changed to use `fetchzip`.
+  To update, please
+  * remove `name`/`version`
+  * update the hash
+''
+else applyPatches {
+  inherit patches;
+  src = fetchzip {
     inherit url sha256;
+    postFetch = ''
+      pushd $out &>/dev/null
+      if [ ! -f ./appinfo/info.xml ]; then
+        echo "appinfo/info.xml doesn't exist in $out, aborting!"
+        exit 1
+      fi
+      popd &>/dev/null
+    '';
   };
-
-  unpackPhase = ''
-    tar -xzpf $src
-  '';
-
-  installPhase = ''
-    approot="$(dirname $(dirname $(find -path '*/appinfo/info.xml' | head -n 1)))"
-
-    if [ -d "$approot" ];
-    then
-      mv "$approot/" $out
-      chmod -R a-w $out
-    else
-      echo "Could not find appinfo/info.xml"
-      exit 1;
-    fi
-  '';
 }
diff --git a/pkgs/build-support/fetchpatch/default.nix b/pkgs/build-support/fetchpatch/default.nix
index d46162c97ff..3ebe797f736 100644
--- a/pkgs/build-support/fetchpatch/default.nix
+++ b/pkgs/build-support/fetchpatch/default.nix
@@ -4,11 +4,8 @@
 # often change with updating of git or cgit.
 # stripLen acts as the -p parameter when applying a patch.
 
-{ lib, fetchurl, buildPackages }:
-let
-  # 0.3.4 would change hashes: https://github.com/NixOS/nixpkgs/issues/25154
-  patchutils = buildPackages.patchutils_0_3_3;
-in
+{ lib, fetchurl, patchutils }:
+
 { relative ? null
 , stripLen ? 0
 , extraPrefix ? null
diff --git a/pkgs/build-support/fetchpatch/tests.nix b/pkgs/build-support/fetchpatch/tests.nix
index a42b7cd7d14..38bbb8ba69d 100644
--- a/pkgs/build-support/fetchpatch/tests.nix
+++ b/pkgs/build-support/fetchpatch/tests.nix
@@ -1,15 +1,19 @@
 { testers, fetchpatch, ... }:
 
+let
+  isFetchpatch2 = fetchpatch.version == 2;
+in
+
 {
   simple = testers.invalidateFetcherByDrvHash fetchpatch {
     url = "https://github.com/facebook/zstd/pull/2724/commits/e1f85dbca3a0ed5ef06c8396912a0914db8dea6a.patch";
-    sha256 = "sha256-PuYAqnJWAE+L9bsroOnnBGJhERW8LHrGSLtIEkKU9vg=";
+    sha256 = if isFetchpatch2 then "sha256-01BrkHLye4KOdqCw3tv7AJzIF6578pl2fl270TJFTmw=" else "sha256-PuYAqnJWAE+L9bsroOnnBGJhERW8LHrGSLtIEkKU9vg=";
   };
 
   relative = testers.invalidateFetcherByDrvHash fetchpatch {
     url = "https://github.com/boostorg/math/commit/7d482f6ebc356e6ec455ccb5f51a23971bf6ce5b.patch";
     relative = "include";
-    sha256 = "sha256-KlmIbixcds6GyKYt1fx5BxDIrU7msrgDdYo9Va/KJR4=";
+    sha256 = if isFetchpatch2 then "sha256-1TtmuKeNIl/Yp+sfzBMR8Ue78tPIgjqGgjasa5IN52o=" else "sha256-KlmIbixcds6GyKYt1fx5BxDIrU7msrgDdYo9Va/KJR4=";
   };
 
   full = testers.invalidateFetcherByDrvHash fetchpatch {
@@ -19,6 +23,6 @@
     extraPrefix = "foo/bar/";
     excludes = [ "foo/bar/bernoulli_no_atomic_mp.cpp" ];
     revert = true;
-    sha256 = "sha256-+UKmEbr2rIAweCav/hR/7d4ZrYV84ht/domTrHtm8sM=";
+    sha256 = if isFetchpatch2 then "sha256-+UKmEbr2rIAweCav/hR/7d4ZrYV84ht/domTrHtm8sM=" else "sha256-+UKmEbr2rIAweCav/hR/7d4ZrYV84ht/domTrHtm8sM=";
   };
 }
diff --git a/pkgs/build-support/fetchurl/default.nix b/pkgs/build-support/fetchurl/default.nix
index a85d53adb82..28d2519f423 100644
--- a/pkgs/build-support/fetchurl/default.nix
+++ b/pkgs/build-support/fetchurl/default.nix
@@ -57,6 +57,10 @@ in
   # first element of `urls').
   name ? ""
 
+  # for versioned downloads optionally take pname + version.
+, pname ? ""
+, version ? ""
+
 , # SRI hash.
   hash ? ""
 
@@ -130,12 +134,16 @@ let
     else throw "fetchurl requires a hash for fixed-output derivation: ${lib.concatStringsSep ", " urls_}";
 in
 
-stdenvNoCC.mkDerivation {
-  name =
-    if showURLs then "urls"
-    else if name != "" then name
-    else baseNameOf (toString (builtins.head urls_));
-
+stdenvNoCC.mkDerivation ((
+  if (pname != "" && version != "") then
+    { inherit pname version; }
+  else
+    { name =
+      if showURLs then "urls"
+      else if name != "" then name
+      else baseNameOf (toString (builtins.head urls_));
+    }
+) // {
   builder = ./builder.sh;
 
   nativeBuildInputs = [ curl ] ++ nativeBuildInputs;
@@ -177,4 +185,4 @@ stdenvNoCC.mkDerivation {
 
   inherit meta;
   passthru = { inherit url; } // passthru;
-}
+})
diff --git a/pkgs/build-support/fetchurl/tests.nix b/pkgs/build-support/fetchurl/tests.nix
index fc7fb25e158..e348d77db0b 100644
--- a/pkgs/build-support/fetchurl/tests.nix
+++ b/pkgs/build-support/fetchurl/tests.nix
@@ -1,8 +1,8 @@
-{ invalidateFetcherByDrvHash, fetchurl, jq, moreutils, ... }: {
+{ testers, fetchurl, jq, moreutils, ... }: {
   # Tests that we can send custom headers with spaces in them
   header =
     let headerValue = "Test '\" <- These are some quotes";
-    in invalidateFetcherByDrvHash fetchurl {
+    in testers.invalidateFetcherByDrvHash fetchurl {
       url = "https://httpbin.org/headers";
       sha256 = builtins.hashString "sha256" (headerValue + "\n");
       curlOptsList = [ "-H" "Hello: ${headerValue}" ];
diff --git a/pkgs/build-support/fetchzip/default.nix b/pkgs/build-support/fetchzip/default.nix
index 6fa93db5eee..e980f9d6521 100644
--- a/pkgs/build-support/fetchzip/default.nix
+++ b/pkgs/build-support/fetchzip/default.nix
@@ -14,6 +14,8 @@
 , extraPostFetch ? ""
 , postFetch ? ""
 , name ? "source"
+, pname ? ""
+, version ? ""
 , nativeBuildInputs ? [ ]
 , # Allows to set the extension for the intermediate downloaded
   # file. This can be used as a hint for the unpackCmdHooks to select
@@ -23,14 +25,23 @@
 
 
 lib.warnIf (extraPostFetch != "") "use 'postFetch' instead of 'extraPostFetch' with 'fetchzip' and 'fetchFromGitHub'."
-(fetchurl (let
+
+(let
   tmpFilename =
     if extension != null
     then "download.${extension}"
     else baseNameOf (if url != "" then url else builtins.head urls);
-in {
-  inherit name;
+in
 
+fetchurl ((
+  if (pname != "" && version != "") then
+    {
+      name = "${pname}-${version}";
+      inherit pname version;
+    }
+  else
+    { inherit name; }
+) // {
   recursiveHash = true;
 
   downloadToTemp = true;
diff --git a/pkgs/build-support/flutter/default.nix b/pkgs/build-support/flutter/default.nix
index 691b2c5c6e6..68a6675cf54 100644
--- a/pkgs/build-support/flutter/default.nix
+++ b/pkgs/build-support/flutter/default.nix
@@ -88,7 +88,8 @@ let
       # so we can use lock, diff yaml
       cp "pubspec.yaml" "$RES"
       cp "pubspec.lock" "$RES"
-      mv .dart_tool .flutter-plugins .flutter-plugins-dependencies .packages "$RES/f"
+      [[ -e .packages ]] && mv .packages "$RES/f"
+      mv .dart_tool .flutter-plugins .flutter-plugins-dependencies "$RES/f"
 
       # replace paths with placeholders
       find "$RES" -type f -exec sed -i \
@@ -119,7 +120,7 @@ let
       find "$RES/.pub-cache" -iname "*.json" -exec sed -r 's|.*_fetchedAt.*|    "_fetchedAt": "'"$DART_DATE"'",|g' -i {} +
       replace_line_matching "$RES/f/.dart_tool/package_config.json" '"generated"' '"generated": "'"$DART_DATE"'",'
       replace_line_matching "$RES/f/.flutter-plugins-dependencies" '"date_created"' '"date_created": "'"$DART_DATE"'",'
-      remove_line_matching "$RES/f/.packages" "Generated by pub"
+      [[ -e "$RES/f/.packages" ]] && remove_line_matching "$RES/f/.packages" "Generated by pub"
 
       # nuke refs
       find "$RES" -type f -exec nuke-refs {} +
diff --git a/pkgs/build-support/kernel/make-initrd-ng.nix b/pkgs/build-support/kernel/make-initrd-ng.nix
index e762464fc48..dc0e9b87db2 100644
--- a/pkgs/build-support/kernel/make-initrd-ng.nix
+++ b/pkgs/build-support/kernel/make-initrd-ng.nix
@@ -76,7 +76,7 @@ in
 
   nativeBuildInputs = [makeInitrdNGTool cpio] ++ lib.optional makeUInitrd ubootTools ++ lib.optional strip binutils;
 
-  STRIP = if strip then "${(binutils.nativeDrv or binutils).targetPrefix}strip" else null;
+  STRIP = if strip then "${pkgsBuildHost.binutils.targetPrefix}strip" else null;
 }) ''
   mkdir ./root
   make-initrd-ng "$contentsPath" ./root
diff --git a/pkgs/build-support/make-impure-test.nix b/pkgs/build-support/make-impure-test.nix
new file mode 100644
index 00000000000..84d0b30f426
--- /dev/null
+++ b/pkgs/build-support/make-impure-test.nix
@@ -0,0 +1,96 @@
+/* Create tests that run in the nix sandbox with additional access to selected host paths
+
+  This is for example useful for testing hardware where a tests needs access to
+  /sys and optionally more.
+
+  The following example shows a test that accesses the GPU:
+
+  Example:
+    makeImpureTest {
+      name = "opencl";
+      testedPackage = "mypackage"; # Or testPath = "mypackage.impureTests.opencl.testDerivation"
+
+      sandboxPaths = [ "/sys" "/dev/dri" ]; # Defaults to ["/sys"]
+      prepareRunCommands = ""; # (Optional) Setup for the runScript
+      nixFlags = []; # (Optional) nix-build options for the runScript
+
+      testScript = "...";
+    }
+
+  Save as `test.nix` next to a package and reference it from the package:
+    passthru.impureTests = { opencl = callPackage ./test.nix {}; };
+
+  `makeImpureTest` will return here a script that contains the actual nix-build command including all necessary sandbox flags.
+
+  It can be executed like this:
+    $(nix-build -A mypackage.impureTests)
+
+  Rerun an already cached test:
+    $(nix-build -A mypackage.impureTests) --check
+*/
+{ lib
+, stdenv
+, writeShellScript
+
+, name
+, testedPackage ? null
+, testPath ? "${testedPackage}.impureTests.${name}.testDerivation"
+, sandboxPaths ? [ "/sys" ]
+, prepareRunCommands ? ""
+, nixFlags ? [ ]
+, testScript
+, ...
+} @ args:
+
+let
+  sandboxPathsTests = builtins.map (path: "[[ ! -e '${path}' ]]") sandboxPaths;
+  sandboxPathsTest = lib.concatStringsSep " || " sandboxPathsTests;
+  sandboxPathsList = lib.concatStringsSep " " sandboxPaths;
+
+  testDerivation = stdenv.mkDerivation (lib.recursiveUpdate
+    {
+      name = "test-run-${name}";
+
+      requiredSystemFeatures = [ "nixos-test" ];
+
+      buildCommand = ''
+        mkdir -p $out
+
+        if ${sandboxPathsTest}; then
+          echo 'Run this test as *root* with `--option extra-sandbox-paths '"'${sandboxPathsList}'"'`'
+          exit 1
+        fi
+
+        # Run test
+        ${testScript}
+      '';
+
+      passthru.runScript = runScript;
+    }
+    (builtins.removeAttrs args [
+      "lib"
+      "stdenv"
+      "writeShellScript"
+
+      "name"
+      "testedPackage"
+      "testPath"
+      "sandboxPaths"
+      "prepareRunCommands"
+      "nixFlags"
+      "testScript"
+    ])
+  );
+
+  runScript = writeShellScript "run-script-${name}" ''
+    set -euo pipefail
+
+    ${prepareRunCommands}
+
+    sudo nix-build --option extra-sandbox-paths '${sandboxPathsList}' ${lib.escapeShellArgs nixFlags} -A ${testPath} "$@"
+  '';
+in
+# The main output is the run script, inject the derivation for the actual test
+runScript.overrideAttrs (old: {
+  passthru = { inherit testDerivation; };
+})
diff --git a/pkgs/build-support/make-symlinks/builder.sh b/pkgs/build-support/make-symlinks/builder.sh
deleted file mode 100644
index 70f1d2ca1b2..00000000000
--- a/pkgs/build-support/make-symlinks/builder.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-source $stdenv/setup
-
-mkdir $out
-for file in $files
-do
-  subdir=`dirname $file`
-  mkdir -p $out/$subdir
-  ln -s $dir/$file $out/$file
-done
diff --git a/pkgs/build-support/make-symlinks/default.nix b/pkgs/build-support/make-symlinks/default.nix
deleted file mode 100644
index 30584aceb9f..00000000000
--- a/pkgs/build-support/make-symlinks/default.nix
+++ /dev/null
@@ -1,7 +0,0 @@
-{name ? "", stdenv, dir, files}:
-
-stdenv.mkDerivation {
-  inherit dir files;
-  name = if name == "" then dir.name else name;
-  builder = ./builder.sh;
-}
diff --git a/pkgs/build-support/mkshell/default.nix b/pkgs/build-support/mkshell/default.nix
index e7552f43484..39b02a47141 100644
--- a/pkgs/build-support/mkshell/default.nix
+++ b/pkgs/build-support/mkshell/default.nix
@@ -44,12 +44,13 @@ stdenv.mkDerivation ({
   phases = [ "buildPhase" ];
 
   buildPhase = ''
-    echo "------------------------------------------------------------" >>$out
-    echo " WARNING: the existence of this path is not guaranteed." >>$out
-    echo " It is an internal implementation detail for pkgs.mkShell."   >>$out
-    echo "------------------------------------------------------------" >>$out
-    echo >> $out
-    # Record all build inputs as runtime dependencies
-    export >> $out
+    { echo "------------------------------------------------------------";
+      echo " WARNING: the existence of this path is not guaranteed.";
+      echo " It is an internal implementation detail for pkgs.mkShell.";
+      echo "------------------------------------------------------------";
+      echo;
+      # Record all build inputs as runtime dependencies
+      export;
+    } >> "$out"
   '';
 } // rest)
diff --git a/pkgs/build-support/node/build-npm-package/default.nix b/pkgs/build-support/node/build-npm-package/default.nix
new file mode 100644
index 00000000000..26cc678c571
--- /dev/null
+++ b/pkgs/build-support/node/build-npm-package/default.nix
@@ -0,0 +1,56 @@
+{ lib, stdenv, fetchNpmDeps, npmHooks, nodejs }:
+
+{ name ? "${args.pname}-${args.version}"
+, src ? null
+, srcs ? null
+, sourceRoot ? null
+, prePatch ? ""
+, patches ? [ ]
+, postPatch ? ""
+, nativeBuildInputs ? [ ]
+, buildInputs ? [ ]
+  # The output hash of the dependencies for this project.
+  # Can be calculated in advance with prefetch-npm-deps.
+, npmDepsHash ? ""
+  # Whether to make the cache writable prior to installing dependencies.
+  # Don't set this unless npm tries to write to the cache directory, as it can slow down the build.
+, makeCacheWritable ? false
+  # The script to run to build the project.
+, npmBuildScript ? "build"
+  # Flags to pass to all npm commands.
+, npmFlags ? [ ]
+  # Flags to pass to `npm ci` and `npm prune`.
+, npmInstallFlags ? [ ]
+  # Flags to pass to `npm rebuild`.
+, npmRebuildFlags ? [ ]
+  # Flags to pass to `npm run ${npmBuildScript}`.
+, npmBuildFlags ? [ ]
+  # Flags to pass to `npm pack`.
+, npmPackFlags ? [ ]
+, ...
+} @ args:
+
+let
+  npmDeps = fetchNpmDeps {
+    inherit src srcs sourceRoot prePatch patches postPatch;
+    name = "${name}-npm-deps";
+    hash = npmDepsHash;
+  };
+
+  inherit (npmHooks.override { inherit nodejs; }) npmConfigHook npmBuildHook npmInstallHook;
+in
+stdenv.mkDerivation (args // {
+  inherit npmDeps npmBuildScript;
+
+  nativeBuildInputs = nativeBuildInputs ++ [ nodejs npmConfigHook npmBuildHook npmInstallHook ];
+  buildInputs = buildInputs ++ [ nodejs ];
+
+  strictDeps = true;
+
+  # Stripping takes way too long with the amount of files required by a typical Node.js project.
+  dontStrip = args.dontStrip or true;
+
+  passthru = { inherit npmDeps; } // (args.passthru or { });
+
+  meta = (args.meta or { }) // { platforms = args.meta.platforms or nodejs.meta.platforms; };
+})
diff --git a/pkgs/build-support/node/build-npm-package/hooks/default.nix b/pkgs/build-support/node/build-npm-package/hooks/default.nix
new file mode 100644
index 00000000000..ff0930426d4
--- /dev/null
+++ b/pkgs/build-support/node/build-npm-package/hooks/default.nix
@@ -0,0 +1,35 @@
+{ lib, makeSetupHook, nodejs, srcOnly, buildPackages, makeWrapper }:
+
+{
+  npmConfigHook = makeSetupHook
+    {
+      name = "npm-config-hook";
+      substitutions = {
+        nodeSrc = srcOnly nodejs;
+
+        # Specify `diff`, `jq`, and `prefetch-npm-deps` by abspath to ensure that the user's build
+        # inputs do not cause us to find the wrong binaries.
+        diff = "${buildPackages.diffutils}/bin/diff";
+        jq = "${buildPackages.jq}/bin/jq";
+        prefetchNpmDeps = "${buildPackages.prefetch-npm-deps}/bin/prefetch-npm-deps";
+
+        nodeVersion = nodejs.version;
+        nodeVersionMajor = lib.versions.major nodejs.version;
+      };
+    } ./npm-config-hook.sh;
+
+  npmBuildHook = makeSetupHook
+    {
+      name = "npm-build-hook";
+    } ./npm-build-hook.sh;
+
+  npmInstallHook = makeSetupHook
+    {
+      name = "npm-install-hook";
+      deps = [ makeWrapper ];
+      substitutions = {
+        hostNode = "${nodejs}/bin/node";
+        jq = "${buildPackages.jq}/bin/jq";
+      };
+    } ./npm-install-hook.sh;
+}
diff --git a/pkgs/build-support/node/build-npm-package/hooks/npm-build-hook.sh b/pkgs/build-support/node/build-npm-package/hooks/npm-build-hook.sh
new file mode 100644
index 00000000000..7f601512c7e
--- /dev/null
+++ b/pkgs/build-support/node/build-npm-package/hooks/npm-build-hook.sh
@@ -0,0 +1,38 @@
+# shellcheck shell=bash
+
+npmBuildHook() {
+    echo "Executing npmBuildHook"
+
+    runHook preBuild
+
+    if [ -z "${npmBuildScript-}" ]; then
+        echo
+        echo "ERROR: no build script was specified"
+        echo 'Hint: set `npmBuildScript`, override `buildPhase`, or set `dontNpmBuild = true`.'
+        echo
+
+        exit 1
+    fi
+
+    if ! npm run "$npmBuildScript" $npmBuildFlags "${npmBuildFlagsArray[@]}" $npmFlags "${npmFlagsArray[@]}"; then
+        echo
+        echo 'ERROR: `npm build` failed'
+        echo
+        echo "Here are a few things you can try, depending on the error:"
+        echo "1. Make sure your build script ($npmBuildScript) exists"
+        echo "  If there is none, set `dontNpmBuild = true`."
+        echo '2. If the error being thrown is something similar to "error:0308010C:digital envelope routines::unsupported", add `NODE_OPTIONS = "--openssl-legacy-provider"` to your derivation'
+        echo "  See https://github.com/webpack/webpack/issues/14532 for more information."
+        echo
+
+        exit 1
+    fi
+
+    runHook postBuild
+
+    echo "Finished npmBuildHook"
+}
+
+if [ -z "${dontNpmBuild-}" ] && [ -z "${buildPhase-}" ]; then
+    buildPhase=npmBuildHook
+fi
diff --git a/pkgs/build-support/node/build-npm-package/hooks/npm-config-hook.sh b/pkgs/build-support/node/build-npm-package/hooks/npm-config-hook.sh
new file mode 100644
index 00000000000..6fa6a0f940b
--- /dev/null
+++ b/pkgs/build-support/node/build-npm-package/hooks/npm-config-hook.sh
@@ -0,0 +1,115 @@
+# shellcheck shell=bash
+
+npmConfigHook() {
+    echo "Executing npmConfigHook"
+
+    echo "Configuring npm"
+
+    export HOME="$TMPDIR"
+    export npm_config_nodedir="@nodeSrc@"
+
+    if [ -z "${npmDeps-}" ]; then
+        echo
+        echo "ERROR: no dependencies were specified"
+        echo 'Hint: set `npmDeps` if using these hooks individually. If this is happening with `buildNpmPackage`, please open an issue.'
+        echo
+
+        exit 1
+    fi
+
+    local -r cacheLockfile="$npmDeps/package-lock.json"
+    local -r srcLockfile="$PWD/package-lock.json"
+
+    echo "Validating consistency between $srcLockfile and $cacheLockfile"
+
+    if ! @diff@ "$srcLockfile" "$cacheLockfile"; then
+      # If the diff failed, first double-check that the file exists, so we can
+      # give a friendlier error msg.
+      if ! [ -e "$srcLockfile" ]; then
+        echo
+        echo "ERROR: Missing package-lock.json from src. Expected to find it at: $srcLockfile"
+        echo "Hint: You can use the patches attribute to add a package-lock.json manually to the build."
+        echo
+
+        exit 1
+      fi
+
+      if ! [ -e "$cacheLockfile" ]; then
+        echo
+        echo "ERROR: Missing lockfile from cache. Expected to find it at: $cacheLockfile"
+        echo
+
+        exit 1
+      fi
+
+      echo
+      echo "ERROR: npmDepsHash is out of date"
+      echo
+      echo "The package-lock.json in src is not the same as the in $npmDeps."
+      echo
+      echo "To fix the issue:"
+      echo '1. Use `lib.fakeHash` as the npmDepsHash value'
+      echo "2. Build the derivation and wait for it to fail with a hash mismatch"
+      echo "3. Copy the 'got: sha256-' value back into the npmDepsHash field"
+      echo
+
+      exit 1
+    fi
+
+    @prefetchNpmDeps@ --fixup-lockfile "$srcLockfile"
+
+    local cachePath
+
+    if [ -z "${makeCacheWritable-}" ]; then
+        cachePath="$npmDeps"
+    else
+        echo "Making cache writable"
+        cp -r "$npmDeps" "$TMPDIR/cache"
+        chmod -R 700 "$TMPDIR/cache"
+        cachePath="$TMPDIR/cache"
+    fi
+
+    npm config set cache "$cachePath"
+    npm config set offline true
+    npm config set progress false
+
+    echo "Installing dependencies"
+
+    if ! npm ci --ignore-scripts $npmInstallFlags "${npmInstallFlagsArray[@]}" $npmFlags "${npmFlagsArray[@]}"; then
+        echo
+        echo "ERROR: npm failed to install dependencies"
+        echo
+        echo "Here are a few things you can try, depending on the error:"
+        echo '1. Set `makeCacheWritable = true`'
+        echo "  Note that this won't help if npm is complaining about not being able to write to the logs directory -- look above that for the actual error."
+        echo '2. Set `npmFlags = [ "--legacy-peer-deps" ]`'
+        echo
+
+        exit 1
+    fi
+
+    patchShebangs node_modules
+
+    local -r lockfileVersion="$(@jq@ .lockfileVersion package-lock.json)"
+
+    if (( lockfileVersion < 2 )); then
+      # This is required because npm consults a hidden lockfile in node_modules to figure out
+      # what to create bin links for. When using an old lockfile offline, this hidden lockfile
+      # contains insufficent data, making npm silently fail to create links. The hidden lockfile
+      # is bypassed when any file in node_modules is newer than it. Thus, we create a file when
+      # using an old lockfile, so bin links work as expected without having to downgrade Node or npm.
+      touch node_modules/.meow
+    fi
+
+    npm rebuild "${npmRebuildFlags[@]}" "${npmFlags[@]}"
+
+    if (( lockfileVersion < 2 )); then
+      rm node_modules/.meow
+    fi
+
+    patchShebangs node_modules
+
+    echo "Finished npmConfigHook"
+}
+
+postPatchHooks+=(npmConfigHook)
diff --git a/pkgs/build-support/node/build-npm-package/hooks/npm-install-hook.sh b/pkgs/build-support/node/build-npm-package/hooks/npm-install-hook.sh
new file mode 100644
index 00000000000..59ea2da993d
--- /dev/null
+++ b/pkgs/build-support/node/build-npm-package/hooks/npm-install-hook.sh
@@ -0,0 +1,43 @@
+# shellcheck shell=bash
+
+npmInstallHook() {
+    echo "Executing npmInstallHook"
+
+    runHook preInstall
+
+    # `npm pack` writes to cache
+    npm config delete cache
+
+    local -r packageOut="$out/lib/node_modules/$(@jq@ --raw-output '.name' package.json)"
+
+    while IFS= read -r file; do
+        local dest="$packageOut/$(dirname "$file")"
+        mkdir -p "$dest"
+        cp "$file" "$dest"
+    done < <(@jq@ --raw-output '.[0].files | map(.path) | join("\n")' <<< "$(npm pack --json --dry-run $npmPackFlags "${npmPackFlagsArray[@]}" $npmFlags "${npmFlagsArray[@]}")")
+
+    while IFS=" " read -ra bin; do
+        mkdir -p "$out/bin"
+        makeWrapper @hostNode@ "$out/bin/${bin[0]}" --add-flags "$packageOut/${bin[1]}"
+    done < <(@jq@ --raw-output '(.bin | type) as $typ | if $typ == "string" then
+        .name + " " + .bin
+        elif $typ == "object" then .bin | to_entries | map(.key + " " + .value) | join("\n")
+        else "invalid type " + $typ | halt_error end' package.json)
+
+    local -r nodeModulesPath="$packageOut/node_modules"
+
+    if [ ! -d "$nodeModulesPath" ]; then
+        npm prune --omit dev --no-save $npmInstallFlags "${npmInstallFlagsArray[@]}" $npmFlags "${npmFlagsArray[@]}"
+        find node_modules -maxdepth 1 -type d -empty -delete
+
+        cp -r node_modules "$nodeModulesPath"
+    fi
+
+    runHook postInstall
+
+    echo "Finished npmInstallHook"
+}
+
+if [ -z "${dontNpmInstall-}" ] && [ -z "${installPhase-}" ]; then
+    installPhase=npmInstallHook
+fi
diff --git a/pkgs/build-support/node/fetch-npm-deps/.gitignore b/pkgs/build-support/node/fetch-npm-deps/.gitignore
new file mode 100644
index 00000000000..ea8c4bf7f35
--- /dev/null
+++ b/pkgs/build-support/node/fetch-npm-deps/.gitignore
@@ -0,0 +1 @@
+/target
diff --git a/pkgs/build-support/node/fetch-npm-deps/Cargo.lock b/pkgs/build-support/node/fetch-npm-deps/Cargo.lock
new file mode 100644
index 00000000000..ba832d115e6
--- /dev/null
+++ b/pkgs/build-support/node/fetch-npm-deps/Cargo.lock
@@ -0,0 +1,689 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "adler"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
+
+[[package]]
+name = "anyhow"
+version = "1.0.65"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "98161a4e3e2184da77bb14f02184cdd111e83bbbcc9979dfee3c44b9a85f5602"
+
+[[package]]
+name = "autocfg"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
+
+[[package]]
+name = "base64"
+version = "0.13.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd"
+
+[[package]]
+name = "bitflags"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
+
+[[package]]
+name = "block-buffer"
+version = "0.10.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0bf7fe51849ea569fd452f37822f606a5cabb684dc918707a0193fd4664ff324"
+dependencies = [
+ "generic-array",
+]
+
+[[package]]
+name = "bumpalo"
+version = "3.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d"
+
+[[package]]
+name = "cc"
+version = "1.0.73"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11"
+
+[[package]]
+name = "cfg-if"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
+
+[[package]]
+name = "chunked_transfer"
+version = "1.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fff857943da45f546682664a79488be82e69e43c1a7a2307679ab9afb3a66d2e"
+
+[[package]]
+name = "cpufeatures"
+version = "0.2.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dc948ebb96241bb40ab73effeb80d9f93afaad49359d159a5e61be51619fe813"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "crc32fast"
+version = "1.3.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "crossbeam-channel"
+version = "0.5.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521"
+dependencies = [
+ "cfg-if",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-deque"
+version = "0.8.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc"
+dependencies = [
+ "cfg-if",
+ "crossbeam-epoch",
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-epoch"
+version = "0.9.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "045ebe27666471bb549370b4b0b3e51b07f56325befa4284db65fc89c02511b1"
+dependencies = [
+ "autocfg",
+ "cfg-if",
+ "crossbeam-utils",
+ "memoffset",
+ "once_cell",
+ "scopeguard",
+]
+
+[[package]]
+name = "crossbeam-utils"
+version = "0.8.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51887d4adc7b564537b15adcfb307936f8075dfcd5f00dde9a9f1d29383682bc"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+]
+
+[[package]]
+name = "crypto-common"
+version = "0.1.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
+dependencies = [
+ "generic-array",
+ "typenum",
+]
+
+[[package]]
+name = "digest"
+version = "0.10.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "adfbc57365a37acbd2ebf2b64d7e69bb766e2fea813521ed536f5d0520dcf86c"
+dependencies = [
+ "block-buffer",
+ "crypto-common",
+]
+
+[[package]]
+name = "either"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797"
+
+[[package]]
+name = "fastrand"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499"
+dependencies = [
+ "instant",
+]
+
+[[package]]
+name = "flate2"
+version = "1.0.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6"
+dependencies = [
+ "crc32fast",
+ "miniz_oxide",
+]
+
+[[package]]
+name = "form_urlencoded"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8"
+dependencies = [
+ "percent-encoding",
+]
+
+[[package]]
+name = "generic-array"
+version = "0.14.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9"
+dependencies = [
+ "typenum",
+ "version_check",
+]
+
+[[package]]
+name = "hermit-abi"
+version = "0.1.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
+dependencies = [
+ "libc",
+]
+
+[[package]]
+name = "idna"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6"
+dependencies = [
+ "unicode-bidi",
+ "unicode-normalization",
+]
+
+[[package]]
+name = "instant"
+version = "0.1.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "itoa"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6c8af84674fe1f223a982c933a0ee1086ac4d4052aa0fb8060c12c6ad838e754"
+
+[[package]]
+name = "js-sys"
+version = "0.3.59"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2"
+dependencies = [
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "libc"
+version = "0.2.132"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8371e4e5341c3a96db127eb2465ac681ced4c433e01dd0e938adbef26ba93ba5"
+
+[[package]]
+name = "log"
+version = "0.4.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "memoffset"
+version = "0.6.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "miniz_oxide"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc"
+dependencies = [
+ "adler",
+]
+
+[[package]]
+name = "num_cpus"
+version = "1.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1"
+dependencies = [
+ "hermit-abi",
+ "libc",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "074864da206b4973b84eb91683020dbefd6a8c3f0f38e054d93954e891935e4e"
+
+[[package]]
+name = "percent-encoding"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"
+
+[[package]]
+name = "prefetch-npm-deps"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "base64",
+ "digest",
+ "rayon",
+ "serde",
+ "serde_json",
+ "sha1",
+ "sha2",
+ "tempfile",
+ "ureq",
+ "url",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.43"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "rayon"
+version = "1.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bd99e5772ead8baa5215278c9b15bf92087709e9c1b2d1f97cdb5a183c933a7d"
+dependencies = [
+ "autocfg",
+ "crossbeam-deque",
+ "either",
+ "rayon-core",
+]
+
+[[package]]
+name = "rayon-core"
+version = "1.9.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "258bcdb5ac6dad48491bb2992db6b7cf74878b0384908af124823d118c99683f"
+dependencies = [
+ "crossbeam-channel",
+ "crossbeam-deque",
+ "crossbeam-utils",
+ "num_cpus",
+]
+
+[[package]]
+name = "redox_syscall"
+version = "0.2.16"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
+dependencies = [
+ "bitflags",
+]
+
+[[package]]
+name = "remove_dir_all"
+version = "0.5.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
+dependencies = [
+ "winapi",
+]
+
+[[package]]
+name = "ring"
+version = "0.16.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc"
+dependencies = [
+ "cc",
+ "libc",
+ "once_cell",
+ "spin",
+ "untrusted",
+ "web-sys",
+ "winapi",
+]
+
+[[package]]
+name = "rustls"
+version = "0.20.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5aab8ee6c7097ed6057f43c187a62418d0c05a4bd5f18b3571db50ee0f9ce033"
+dependencies = [
+ "log",
+ "ring",
+ "sct",
+ "webpki",
+]
+
+[[package]]
+name = "ryu"
+version = "1.0.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09"
+
+[[package]]
+name = "scopeguard"
+version = "1.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
+
+[[package]]
+name = "sct"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4"
+dependencies = [
+ "ring",
+ "untrusted",
+]
+
+[[package]]
+name = "serde"
+version = "1.0.145"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "728eb6351430bccb993660dfffc5a72f91ccc1295abaa8ce19b27ebe4f75568b"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.145"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "81fa1584d3d1bcacd84c277a0dfe21f5b0f6accf4a23d04d4c6d61f1af522b4c"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.85"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e55a28e3aaef9d5ce0506d0a14dbba8054ddc7e499ef522dd8b26859ec9d4a44"
+dependencies = [
+ "itoa",
+ "ryu",
+ "serde",
+]
+
+[[package]]
+name = "sha1"
+version = "0.10.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest",
+]
+
+[[package]]
+name = "sha2"
+version = "0.10.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest",
+]
+
+[[package]]
+name = "spin"
+version = "0.5.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
+
+[[package]]
+name = "syn"
+version = "1.0.99"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "58dbef6ec655055e20b86b15a8cc6d439cca19b667537ac6a1369572d151ab13"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "tempfile"
+version = "3.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4"
+dependencies = [
+ "cfg-if",
+ "fastrand",
+ "libc",
+ "redox_syscall",
+ "remove_dir_all",
+ "winapi",
+]
+
+[[package]]
+name = "tinyvec"
+version = "1.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50"
+dependencies = [
+ "tinyvec_macros",
+]
+
+[[package]]
+name = "tinyvec_macros"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c"
+
+[[package]]
+name = "typenum"
+version = "1.15.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987"
+
+[[package]]
+name = "unicode-bidi"
+version = "0.3.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992"
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf"
+
+[[package]]
+name = "unicode-normalization"
+version = "0.1.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "854cbdc4f7bc6ae19c820d44abdc3277ac3e1b2b93db20a636825d9322fb60e6"
+dependencies = [
+ "tinyvec",
+]
+
+[[package]]
+name = "untrusted"
+version = "0.7.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
+
+[[package]]
+name = "ureq"
+version = "2.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b97acb4c28a254fd7a4aeec976c46a7fa404eac4d7c134b30c75144846d7cb8f"
+dependencies = [
+ "base64",
+ "chunked_transfer",
+ "flate2",
+ "log",
+ "once_cell",
+ "rustls",
+ "url",
+ "webpki",
+ "webpki-roots",
+]
+
+[[package]]
+name = "url"
+version = "2.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643"
+dependencies = [
+ "form_urlencoded",
+ "idna",
+ "percent-encoding",
+ "serde",
+]
+
+[[package]]
+name = "version_check"
+version = "0.9.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.82"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d"
+dependencies = [
+ "cfg-if",
+ "wasm-bindgen-macro",
+]
+
+[[package]]
+name = "wasm-bindgen-backend"
+version = "0.2.82"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "662cd44805586bd52971b9586b1df85cdbbd9112e4ef4d8f41559c334dc6ac3f"
+dependencies = [
+ "bumpalo",
+ "log",
+ "once_cell",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.82"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b260f13d3012071dfb1512849c033b1925038373aea48ced3012c09df952c602"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.82"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wasm-bindgen-backend",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.82"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a"
+
+[[package]]
+name = "web-sys"
+version = "0.3.59"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed055ab27f941423197eb86b2035720b1a3ce40504df082cac2ecc6ed73335a1"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "webpki"
+version = "0.22.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd"
+dependencies = [
+ "ring",
+ "untrusted",
+]
+
+[[package]]
+name = "webpki-roots"
+version = "0.22.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f1c760f0d366a6c24a02ed7816e23e691f5d92291f94d15e836006fd11b04daf"
+dependencies = [
+ "webpki",
+]
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
diff --git a/pkgs/build-support/node/fetch-npm-deps/Cargo.toml b/pkgs/build-support/node/fetch-npm-deps/Cargo.toml
new file mode 100644
index 00000000000..bebdaad2952
--- /dev/null
+++ b/pkgs/build-support/node/fetch-npm-deps/Cargo.toml
@@ -0,0 +1,19 @@
+[package]
+name = "prefetch-npm-deps"
+version = "0.1.0"
+edition = "2021"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
+anyhow = "1.0.65"
+base64 = "0.13.0"
+digest = "0.10.5"
+rayon = "1.5.3"
+serde = { version = "1.0.145", features = ["derive"] }
+serde_json = "1.0.85"
+sha1 = "0.10.5"
+sha2 = "0.10.6"
+tempfile = "3.3.0"
+ureq = { version = "2.5.0" }
+url = { version = "2.3.1", features = ["serde"] }
diff --git a/pkgs/build-support/node/fetch-npm-deps/default.nix b/pkgs/build-support/node/fetch-npm-deps/default.nix
new file mode 100644
index 00000000000..7d6277df987
--- /dev/null
+++ b/pkgs/build-support/node/fetch-npm-deps/default.nix
@@ -0,0 +1,165 @@
+{ lib, stdenvNoCC, rustPlatform, makeWrapper, Security, gnutar, gzip, testers, fetchurl, prefetch-npm-deps, fetchNpmDeps }:
+
+{
+  prefetch-npm-deps = rustPlatform.buildRustPackage {
+    pname = "prefetch-npm-deps";
+    version = (lib.importTOML ./Cargo.toml).package.version;
+
+    src = lib.cleanSourceWith {
+      src = ./.;
+      filter = name: type:
+        let
+          name' = builtins.baseNameOf name;
+        in
+        name' != "default.nix" && name' != "target";
+    };
+
+    cargoLock.lockFile = ./Cargo.lock;
+
+    nativeBuildInputs = [ makeWrapper ];
+    buildInputs = lib.optional stdenvNoCC.isDarwin Security;
+
+    postInstall = ''
+      wrapProgram "$out/bin/prefetch-npm-deps" --prefix PATH : ${lib.makeBinPath [ gnutar gzip ]}
+    '';
+
+    passthru.tests =
+      let
+        makeTestSrc = { name, src }: stdenvNoCC.mkDerivation {
+          name = "${name}-src";
+
+          inherit src;
+
+          buildCommand = ''
+            mkdir -p $out
+            cp $src $out/package-lock.json
+          '';
+        };
+
+        makeTest = { name, src, hash }: testers.invalidateFetcherByDrvHash fetchNpmDeps {
+          inherit name hash;
+
+          src = makeTestSrc { inherit name src; };
+        };
+      in
+      {
+        lockfileV1 = makeTest {
+          name = "lockfile-v1";
+
+          src = fetchurl {
+            url = "https://raw.githubusercontent.com/jellyfin/jellyfin-web/v10.8.4/package-lock.json";
+            hash = "sha256-uQmc+S+V1co1Rfc4d82PpeXjmd1UqdsG492ADQFcZGA=";
+          };
+
+          hash = "sha256-wca1QvxUw3OrLStfYN9Co6oVBR1LbfcNUKlDqvObps4=";
+        };
+
+        lockfileV2 = makeTest {
+          name = "lockfile-v2";
+
+          src = fetchurl {
+            url = "https://raw.githubusercontent.com/jesec/flood/v4.7.0/package-lock.json";
+            hash = "sha256-qS29tq5QPnGxV+PU40VgMAtdwVLtLyyhG2z9GMeYtC4=";
+          };
+
+          hash = "sha256-tuEfyePwlOy2/mOPdXbqJskO6IowvAP4DWg8xSZwbJw=";
+        };
+
+        hashPrecedence = makeTest {
+          name = "hash-precedence";
+
+          src = fetchurl {
+            url = "https://raw.githubusercontent.com/matrix-org/matrix-appservice-irc/0.34.0/package-lock.json";
+            hash = "sha256-1+0AQw9EmbHiMPA/H8OP8XenhrkhLRYBRhmd1cNPFjk=";
+          };
+
+          hash = "sha256-oItUls7AXcCECuyA+crQO6B0kv4toIr8pBubNwB7kAM=";
+        };
+
+        hostedGitDeps = makeTest {
+          name = "hosted-git-deps";
+
+          src = fetchurl {
+            url = "https://cyberchaos.dev/yuka/trainsearch/-/raw/e3cba6427e8ecfd843d0f697251ddaf5e53c2327/package-lock.json";
+            hash = "sha256-X9mCwPqV5yP0S2GonNvpYnLSLJMd/SUIked+hMRxDpA=";
+          };
+
+          hash = "sha256-tEdElWJ+KBTxBobzXBpPopQSwK2usGW/it1+yfbVzBw=";
+        };
+
+        linkDependencies = makeTest {
+          name = "link-dependencies";
+
+          src = fetchurl {
+            url = "https://raw.githubusercontent.com/evcc-io/evcc/0.106.3/package-lock.json";
+            hash = "sha256-6ZTBMyuyPP/63gpQugggHhKVup6OB4hZ2rmSvPJ0yEs=";
+          };
+
+          hash = "sha256-VzQhArHoznYSXUT7l9HkJV4yoSOmoP8eYTLel1QwmB4=";
+        };
+
+        # This package contains both hosted Git shorthand, and a bundled dependency that happens to override an existing one.
+        etherpadLite1818 = makeTest {
+          name = "etherpad-lite-1.8.18";
+
+          src = fetchurl {
+            url = "https://raw.githubusercontent.com/ether/etherpad-lite/1.8.18/src/package-lock.json";
+            hash = "sha256-1fGNxYJi1I4cXK/jinNG+Y6tPEOhP3QAqWOBEQttS9E=";
+          };
+
+          hash = "sha256-+KA8/orSBJ4EhuSyQO8IKSxsN/FAsYU3lOzq+awuxNQ=";
+        };
+      };
+
+    meta = with lib; {
+      description = "Prefetch dependencies from npm (for use with `fetchNpmDeps`)";
+      maintainers = with maintainers; [ winter ];
+      license = licenses.mit;
+    };
+  };
+
+  fetchNpmDeps =
+    { name ? "npm-deps"
+    , hash ? ""
+    , ...
+    } @ args:
+    let
+      hash_ =
+        if hash != "" then {
+          outputHash = hash;
+        } else {
+          outputHash = "";
+          outputHashAlgo = "sha256";
+        };
+    in
+    stdenvNoCC.mkDerivation (args // {
+      inherit name;
+
+      nativeBuildInputs = [ prefetch-npm-deps ];
+
+      buildPhase = ''
+        runHook preBuild
+
+        if [[ ! -e package-lock.json ]]; then
+          echo
+          echo "ERROR: The package-lock.json file does not exist!"
+          echo
+          echo "package-lock.json is required to make sure that npmDepsHash doesn't change"
+          echo "when packages are updated on npm."
+          echo
+          echo "Hint: You can copy a vendored package-lock.json file via postPatch."
+          echo
+
+          exit 1
+        fi
+
+        prefetch-npm-deps package-lock.json $out
+
+        runHook postBuild
+      '';
+
+      dontInstall = true;
+
+      outputHashMode = "recursive";
+    } // hash_);
+}
diff --git a/pkgs/build-support/node/fetch-npm-deps/src/cacache.rs b/pkgs/build-support/node/fetch-npm-deps/src/cacache.rs
new file mode 100644
index 00000000000..715e115e723
--- /dev/null
+++ b/pkgs/build-support/node/fetch-npm-deps/src/cacache.rs
@@ -0,0 +1,116 @@
+use digest::{Digest, Update};
+use serde::Serialize;
+use sha1::Sha1;
+use sha2::{Sha256, Sha512};
+use std::{
+    fs::{self, File},
+    io::Write,
+    path::PathBuf,
+};
+use url::Url;
+
+#[derive(Serialize)]
+struct Key {
+    key: String,
+    integrity: String,
+    time: u8,
+    size: usize,
+    metadata: Metadata,
+}
+
+#[derive(Serialize)]
+struct Metadata {
+    url: Url,
+    options: Options,
+}
+
+#[derive(Serialize)]
+struct Options {
+    compress: bool,
+}
+
+pub struct Cache(PathBuf);
+
+fn push_hash_segments(path: &mut PathBuf, hash: &str) {
+    path.push(&hash[0..2]);
+    path.push(&hash[2..4]);
+    path.push(&hash[4..]);
+}
+
+impl Cache {
+    pub fn new(path: PathBuf) -> Cache {
+        Cache(path)
+    }
+
+    pub fn put(
+        &self,
+        key: String,
+        url: Url,
+        data: &[u8],
+        integrity: Option<String>,
+    ) -> anyhow::Result<()> {
+        let (algo, hash, integrity) = if let Some(integrity) = integrity {
+            let (algo, hash) = integrity.split_once('-').unwrap();
+
+            (algo.to_string(), base64::decode(hash)?, integrity)
+        } else {
+            let hash = Sha512::new().chain(data).finalize();
+
+            (
+                String::from("sha512"),
+                hash.to_vec(),
+                format!("sha512-{}", base64::encode(hash)),
+            )
+        };
+
+        let content_path = {
+            let mut p = self.0.join("content-v2");
+
+            p.push(algo);
+
+            push_hash_segments(
+                &mut p,
+                &hash
+                    .into_iter()
+                    .map(|x| format!("{:02x}", x))
+                    .collect::<String>(),
+            );
+
+            p
+        };
+
+        fs::create_dir_all(content_path.parent().unwrap())?;
+
+        fs::write(content_path, data)?;
+
+        let index_path = {
+            let mut p = self.0.join("index-v5");
+
+            push_hash_segments(
+                &mut p,
+                &format!("{:x}", Sha256::new().chain(&key).finalize()),
+            );
+
+            p
+        };
+
+        fs::create_dir_all(index_path.parent().unwrap())?;
+
+        let data = serde_json::to_string(&Key {
+            key,
+            integrity,
+            time: 0,
+            size: data.len(),
+            metadata: Metadata {
+                url,
+                options: Options { compress: true },
+            },
+        })?;
+
+        let mut file = File::options().append(true).create(true).open(index_path)?;
+
+        write!(file, "{:x}\t{data}", Sha1::new().chain(&data).finalize())?;
+
+        Ok(())
+    }
+}
diff --git a/pkgs/build-support/node/fetch-npm-deps/src/main.rs b/pkgs/build-support/node/fetch-npm-deps/src/main.rs
new file mode 100644
index 00000000000..3d2204071a6
--- /dev/null
+++ b/pkgs/build-support/node/fetch-npm-deps/src/main.rs
@@ -0,0 +1,467 @@
+#![warn(clippy::pedantic)]
+
+use crate::cacache::Cache;
+use anyhow::{anyhow, Context};
+use rayon::prelude::*;
+use serde::Deserialize;
+use serde_json::{Map, Value};
+use std::{
+    collections::{HashMap, HashSet},
+    env, fmt, fs, io,
+    path::Path,
+    process::{self, Command, Stdio},
+};
+use tempfile::tempdir;
+use url::Url;
+
+mod cacache;
+#[cfg(test)]
+mod tests;
+
+#[derive(Deserialize)]
+struct PackageLock {
+    #[serde(rename = "lockfileVersion")]
+    version: u8,
+    dependencies: Option<HashMap<String, OldPackage>>,
+    packages: Option<HashMap<String, Package>>,
+}
+
+#[derive(Deserialize)]
+struct OldPackage {
+    version: UrlOrString,
+    #[serde(default)]
+    bundled: bool,
+    resolved: Option<UrlOrString>,
+    integrity: Option<String>,
+    dependencies: Option<HashMap<String, OldPackage>>,
+}
+
+#[derive(Debug, Deserialize, PartialEq, Eq)]
+struct Package {
+    resolved: Option<UrlOrString>,
+    integrity: Option<String>,
+}
+
+#[derive(Debug, Deserialize, PartialEq, Eq)]
+#[serde(untagged)]
+enum UrlOrString {
+    Url(Url),
+    String(String),
+}
+
+impl fmt::Display for UrlOrString {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        match self {
+            UrlOrString::Url(url) => url.fmt(f),
+            UrlOrString::String(string) => string.fmt(f),
+        }
+    }
+}
+
+#[allow(clippy::case_sensitive_file_extension_comparisons)]
+fn to_new_packages(
+    old_packages: HashMap<String, OldPackage>,
+    initial_url: &Url,
+) -> anyhow::Result<HashMap<String, Package>> {
+    let mut new = HashMap::new();
+
+    for (name, mut package) in old_packages {
+        // In some cases, a bundled dependency happens to have the same version as a non-bundled one, causing
+        // the bundled one without a URL to override the entry for the non-bundled instance, which prevents the
+        // dependency from being downloaded.
+        if package.bundled {
+            continue;
+        }
+
+        if let UrlOrString::Url(v) = &package.version {
+            for (scheme, host) in [
+                ("github", "github.com"),
+                ("bitbucket", "bitbucket.org"),
+                ("gitlab", "gitlab.com"),
+            ] {
+                if v.scheme() == scheme {
+                    package.version = {
+                        let mut new_url = initial_url.clone();
+
+                        new_url.set_host(Some(host))?;
+
+                        if v.path().ends_with(".git") {
+                            new_url.set_path(v.path());
+                        } else {
+                            new_url.set_path(&format!("{}.git", v.path()));
+                        }
+
+                        new_url.set_fragment(v.fragment());
+
+                        UrlOrString::Url(new_url)
+                    };
+
+                    break;
+                }
+            }
+        }
+
+        new.insert(
+            format!("{name}-{}", package.version),
+            Package {
+                resolved: if matches!(package.version, UrlOrString::Url(_)) {
+                    Some(package.version)
+                } else {
+                    package.resolved
+                },
+                integrity: package.integrity,
+            },
+        );
+
+        if let Some(dependencies) = package.dependencies {
+            new.extend(to_new_packages(dependencies, initial_url)?);
+        }
+    }
+
+    Ok(new)
+}
+
+#[allow(clippy::case_sensitive_file_extension_comparisons)]
+fn get_hosted_git_url(url: &Url) -> Option<Url> {
+    if ["git", "http", "git+ssh", "git+https", "ssh", "https"].contains(&url.scheme()) {
+        let mut s = url.path_segments()?;
+
+        match url.host_str()? {
+            "github.com" => {
+                let user = s.next()?;
+                let mut project = s.next()?;
+                let typ = s.next();
+                let mut commit = s.next();
+
+                if typ.is_none() {
+                    commit = url.fragment();
+                } else if typ.is_some() && typ != Some("tree") {
+                    return None;
+                }
+
+                if project.ends_with(".git") {
+                    project = project.strip_suffix(".git")?;
+                }
+
+                let commit = commit.unwrap();
+
+                Some(
+                    Url::parse(&format!(
+                        "https://codeload.github.com/{user}/{project}/tar.gz/{commit}"
+                    ))
+                    .ok()?,
+                )
+            }
+            "bitbucket.org" => {
+                let user = s.next()?;
+                let mut project = s.next()?;
+                let aux = s.next();
+
+                if aux == Some("get") {
+                    return None;
+                }
+
+                if project.ends_with(".git") {
+                    project = project.strip_suffix(".git")?;
+                }
+
+                let commit = url.fragment()?;
+
+                Some(
+                    Url::parse(&format!(
+                        "https://bitbucket.org/{user}/{project}/get/{commit}.tar.gz"
+                    ))
+                    .ok()?,
+                )
+            }
+            "gitlab.com" => {
+                let path = &url.path()[1..];
+
+                if path.contains("/~/") || path.contains("/archive.tar.gz") {
+                    return None;
+                }
+
+                let user = s.next()?;
+                let mut project = s.next()?;
+
+                if project.ends_with(".git") {
+                    project = project.strip_suffix(".git")?;
+                }
+
+                let commit = url.fragment()?;
+
+                Some(
+                    Url::parse(&format!(
+                    "https://gitlab.com/{user}/{project}/repository/archive.tar.gz?ref={commit}"
+                ))
+                    .ok()?,
+                )
+            }
+            "git.sr.ht" => {
+                let user = s.next()?;
+                let mut project = s.next()?;
+                let aux = s.next();
+
+                if aux == Some("archive") {
+                    return None;
+                }
+
+                if project.ends_with(".git") {
+                    project = project.strip_suffix(".git")?;
+                }
+
+                let commit = url.fragment()?;
+
+                Some(
+                    Url::parse(&format!(
+                        "https://git.sr.ht/{user}/{project}/archive/{commit}.tar.gz"
+                    ))
+                    .ok()?,
+                )
+            }
+            _ => None,
+        }
+    } else {
+        None
+    }
+}
+
+fn get_ideal_hash(integrity: &str) -> anyhow::Result<&str> {
+    let split: Vec<_> = integrity.split_ascii_whitespace().collect();
+
+    if split.len() == 1 {
+        Ok(split[0])
+    } else {
+        for hash in ["sha512-", "sha1-"] {
+            if let Some(h) = split.iter().find(|s| s.starts_with(hash)) {
+                return Ok(h);
+            }
+        }
+
+        Err(anyhow!("not sure which hash to select out of {split:?}"))
+    }
+}
+
+fn get_initial_url() -> anyhow::Result<Url> {
+    Url::parse("git+ssh://git@a.b").context("initial url should be valid")
+}
+
+/// `fixup_lockfile` removes the `integrity` field from Git dependencies.
+///
+/// Git dependencies from specific providers can be retrieved from those providers' automatic tarball features.
+/// When these dependencies are specified with a commit identifier, npm generates a tarball, and inserts the integrity hash of that
+/// tarball into the lockfile.
+///
+/// Thus, we remove this hash, to replace it with our own determinstic copies of dependencies from hosted Git providers.
+fn fixup_lockfile(mut lock: Map<String, Value>) -> anyhow::Result<Option<Map<String, Value>>> {
+    if lock
+        .get("lockfileVersion")
+        .ok_or_else(|| anyhow!("couldn't get lockfile version"))?
+        .as_i64()
+        .ok_or_else(|| anyhow!("lockfile version isn't an int"))?
+        < 2
+    {
+        return Ok(None);
+    }
+
+    let mut fixed = false;
+
+    for package in lock
+        .get_mut("packages")
+        .ok_or_else(|| anyhow!("couldn't get packages"))?
+        .as_object_mut()
+        .ok_or_else(|| anyhow!("packages isn't a map"))?
+        .values_mut()
+    {
+        if let Some(Value::String(resolved)) = package.get("resolved") {
+            if resolved.starts_with("git+ssh://") && package.get("integrity").is_some() {
+                fixed = true;
+
+                package
+                    .as_object_mut()
+                    .ok_or_else(|| anyhow!("package isn't a map"))?
+                    .remove("integrity");
+            }
+        }
+    }
+
+    if fixed {
+        lock.remove("dependencies");
+
+        Ok(Some(lock))
+    } else {
+        Ok(None)
+    }
+}
+
+#[allow(clippy::too_many_lines)]
+fn main() -> anyhow::Result<()> {
+    let args = env::args().collect::<Vec<_>>();
+
+    if args.len() < 2 {
+        println!("usage: {} <path/to/package-lock.json>", args[0]);
+        println!();
+        println!("Prefetches npm dependencies for usage by fetchNpmDeps.");
+
+        process::exit(1);
+    }
+
+    if args[1] == "--fixup-lockfile" {
+        let lock = serde_json::from_str(&fs::read_to_string(&args[2])?)?;
+
+        if let Some(fixed) = fixup_lockfile(lock)? {
+            println!("Fixing lockfile");
+
+            fs::write(&args[2], serde_json::to_string(&fixed)?)?;
+        }
+
+        return Ok(());
+    }
+
+    let lock_content = fs::read_to_string(&args[1])?;
+    let lock: PackageLock = serde_json::from_str(&lock_content)?;
+
+    let out_tempdir;
+
+    let (out, print_hash) = if let Some(path) = args.get(2) {
+        (Path::new(path), false)
+    } else {
+        out_tempdir = tempdir()?;
+
+        (out_tempdir.path(), true)
+    };
+
+    let agent = ureq::agent();
+
+    eprintln!("lockfile version: {}", lock.version);
+
+    let packages = match lock.version {
+        1 => {
+            let initial_url = get_initial_url()?;
+
+            lock.dependencies
+                .map(|p| to_new_packages(p, &initial_url))
+                .transpose()?
+        }
+        2 | 3 => lock.packages,
+        _ => panic!(
+            "We don't support lockfile version {}, please file an issue.",
+            lock.version
+        ),
+    };
+
+    if packages.is_none() {
+        return Ok(());
+    }
+
+    let packages = {
+        let mut seen = HashSet::new();
+        let mut new_packages = HashMap::new();
+
+        for (dep, package) in packages.unwrap().drain() {
+            if let (false, Some(UrlOrString::Url(resolved))) = (dep.is_empty(), &package.resolved) {
+                if !seen.contains(resolved) {
+                    seen.insert(resolved.clone());
+                    new_packages.insert(dep, package);
+                }
+            }
+        }
+
+        new_packages
+    };
+
+    let cache = Cache::new(out.join("_cacache"));
+
+    packages
+        .into_par_iter()
+        .try_for_each(|(dep, mut package)| {
+            eprintln!("{dep}");
+
+            let mut resolved = match package.resolved {
+                Some(UrlOrString::Url(url)) => url,
+                _ => unreachable!(),
+            };
+
+            let mut hosted = false;
+
+            if let Some(hosted_git_url) = get_hosted_git_url(&resolved) {
+                resolved = hosted_git_url;
+                package.integrity = None;
+                hosted = true;
+            }
+
+            let mut data = Vec::new();
+
+            let mut body = agent.get(resolved.as_str()).call()?.into_reader();
+
+            if hosted {
+                let workdir = tempdir()?;
+
+                let tar_path = workdir.path().join("package");
+
+                fs::create_dir(&tar_path)?;
+
+                let mut cmd = Command::new("tar")
+                    .args(["--extract", "--gzip", "--strip-components=1", "-C"])
+                    .arg(&tar_path)
+                    .stdin(Stdio::piped())
+                    .spawn()?;
+
+                io::copy(&mut body, &mut cmd.stdin.take().unwrap())?;
+
+                let exit = cmd.wait()?;
+
+                if !exit.success() {
+                    return Err(anyhow!(
+                        "failed to extract tarball for {dep}: tar exited with status code {}",
+                        exit.code().unwrap()
+                    ));
+                }
+
+                data = Command::new("tar")
+                    .args([
+                        "--sort=name",
+                        "--mtime=@0",
+                        "--owner=0",
+                        "--group=0",
+                        "--numeric-owner",
+                        "--format=gnu",
+                        "-I",
+                        "gzip -n -9",
+                        "--create",
+                        "-C",
+                    ])
+                    .arg(workdir.path())
+                    .arg("package")
+                    .output()?
+                    .stdout;
+            } else {
+                body.read_to_end(&mut data)?;
+            }
+
+            cache
+                .put(
+                    format!("make-fetch-happen:request-cache:{resolved}"),
+                    resolved,
+                    &data,
+                    package
+                        .integrity
+                        .map(|i| Ok::<String, anyhow::Error>(get_ideal_hash(&i)?.to_string()))
+                        .transpose()?,
+                )
+                .map_err(|e| anyhow!("couldn't insert cache entry for {dep}: {e:?}"))?;
+
+            Ok::<_, anyhow::Error>(())
+        })?;
+
+    fs::write(out.join("package-lock.json"), lock_content)?;
+
+    if print_hash {
+        Command::new("nix")
+            .args(["--experimental-features", "nix-command", "hash", "path"])
+            .arg(out.as_os_str())
+            .status()?;
+    }
+
+    Ok(())
+}
diff --git a/pkgs/build-support/node/fetch-npm-deps/src/tests.rs b/pkgs/build-support/node/fetch-npm-deps/src/tests.rs
new file mode 100644
index 00000000000..a3317207c42
--- /dev/null
+++ b/pkgs/build-support/node/fetch-npm-deps/src/tests.rs
@@ -0,0 +1,141 @@
+use super::{
+    fixup_lockfile, get_hosted_git_url, get_ideal_hash, get_initial_url, to_new_packages,
+    OldPackage, Package, UrlOrString,
+};
+use serde_json::json;
+use std::collections::HashMap;
+use url::Url;
+
+#[test]
+fn hosted_git_urls() {
+    for (input, expected) in [
+        (
+            "git+ssh://git@github.com/castlabs/electron-releases.git#fc5f78d046e8d7cdeb66345a2633c383ab41f525",
+            Some("https://codeload.github.com/castlabs/electron-releases/tar.gz/fc5f78d046e8d7cdeb66345a2633c383ab41f525"),
+        ),
+        (
+            "https://user@github.com/foo/bar#fix/bug",
+            Some("https://codeload.github.com/foo/bar/tar.gz/fix/bug")
+        ),
+        (
+            "https://github.com/eligrey/classList.js/archive/1.2.20180112.tar.gz",
+            None
+        ),
+        (
+            "git+ssh://bitbucket.org/foo/bar#branch",
+            Some("https://bitbucket.org/foo/bar/get/branch.tar.gz")
+        ),
+        (
+            "ssh://git@gitlab.com/foo/bar.git#fix/bug",
+            Some("https://gitlab.com/foo/bar/repository/archive.tar.gz?ref=fix/bug")
+        ),
+        (
+            "git+ssh://git.sr.ht/~foo/bar#branch",
+            Some("https://git.sr.ht/~foo/bar/archive/branch.tar.gz")
+        ),
+    ] {
+        assert_eq!(
+            get_hosted_git_url(&Url::parse(input).unwrap()),
+            expected.map(|u| Url::parse(u).unwrap())
+        );
+    }
+}
+
+#[test]
+fn ideal_hashes() {
+    for (input, expected) in [
+        ("sha512-foo sha1-bar", Some("sha512-foo")),
+        ("sha1-bar md5-foo", Some("sha1-bar")),
+        ("sha1-bar", Some("sha1-bar")),
+        ("sha512-foo", Some("sha512-foo")),
+        ("foo-bar sha1-bar", Some("sha1-bar")),
+        ("foo-bar baz-foo", None),
+    ] {
+        assert_eq!(get_ideal_hash(input).ok(), expected);
+    }
+}
+
+#[test]
+fn git_shorthand_v1() -> anyhow::Result<()> {
+    let old = {
+        let mut o = HashMap::new();
+        o.insert(
+            String::from("sqlite3"),
+            OldPackage {
+                version: UrlOrString::Url(
+                    Url::parse(
+                        "github:mapbox/node-sqlite3#593c9d498be2510d286349134537e3bf89401c4a",
+                    )
+                    .unwrap(),
+                ),
+                bundled: false,
+                resolved: None,
+                integrity: None,
+                dependencies: None,
+            },
+        );
+        o
+    };
+
+    let initial_url = get_initial_url()?;
+
+    let new = to_new_packages(old, &initial_url)?;
+
+    assert_eq!(new.len(), 1, "new packages map should contain 1 value");
+    assert_eq!(new.into_values().next().unwrap(), Package {
+        resolved: Some(UrlOrString::Url(Url::parse("git+ssh://git@github.com/mapbox/node-sqlite3.git#593c9d498be2510d286349134537e3bf89401c4a").unwrap())),
+        integrity: None
+    });
+
+    Ok(())
+}
+
+#[test]
+fn lockfile_fixup() -> anyhow::Result<()> {
+    let input = json!({
+        "lockfileVersion": 2,
+        "name": "foo",
+        "packages": {
+            "": {
+
+            },
+            "foo": {
+                "resolved": "https://github.com/NixOS/nixpkgs",
+                "integrity": "aaa"
+            },
+            "bar": {
+                "resolved": "git+ssh://git@github.com/NixOS/nixpkgs.git",
+                "integrity": "bbb"
+            }
+        }
+    });
+
+    let expected = json!({
+        "lockfileVersion": 2,
+        "name": "foo",
+        "packages": {
+            "": {
+
+            },
+            "foo": {
+                "resolved": "https://github.com/NixOS/nixpkgs",
+                "integrity": "aaa"
+            },
+            "bar": {
+                "resolved": "git+ssh://git@github.com/NixOS/nixpkgs.git",
+            }
+        }
+    });
+
+    assert_eq!(
+        fixup_lockfile(input.as_object().unwrap().clone())?,
+        Some(expected.as_object().unwrap().clone())
+    );
+
+    assert_eq!(
+        fixup_lockfile(json!({"lockfileVersion": 1}).as_object().unwrap().clone())?,
+        None
+    );
+
+    Ok(())
+}
diff --git a/pkgs/build-support/node/fetch-yarn-deps/default.nix b/pkgs/build-support/node/fetch-yarn-deps/default.nix
index 6d67b87915a..4cf2507706a 100644
--- a/pkgs/build-support/node/fetch-yarn-deps/default.nix
+++ b/pkgs/build-support/node/fetch-yarn-deps/default.nix
@@ -42,31 +42,36 @@ in {
   fetchYarnDeps = let
     f = {
       name ? "offline",
-      yarnLock,
+      src ? null,
       hash ? "",
       sha256 ? "",
-    }: let
+      ...
+    }@args: let
       hash_ =
         if hash != "" then { outputHashAlgo = null; outputHash = hash; }
         else if sha256 != "" then { outputHashAlgo = "sha256"; outputHash = sha256; }
         else { outputHashAlgo = "sha256"; outputHash = lib.fakeSha256; };
-    in stdenv.mkDerivation {
+    in stdenv.mkDerivation ({
       inherit name;
 
-      dontUnpack = true;
+      dontUnpack = src == null;
       dontInstall = true;
 
       nativeBuildInputs = [ prefetch-yarn-deps ];
       GIT_SSL_CAINFO = "${cacert}/etc/ssl/certs/ca-bundle.crt";
 
       buildPhase = ''
+        runHook preBuild
+
+        yarnLock=''${yarnLock:=$PWD/yarn.lock}
         mkdir -p $out
-        (cd $out; prefetch-yarn-deps --verbose --builder ${yarnLock})
+        (cd $out; prefetch-yarn-deps --verbose --builder $yarnLock)
+
+        runHook postBuild
       '';
 
       outputHashMode = "recursive";
-      inherit (hash_) outputHashAlgo outputHash;
-    };
+    } // hash_ // (removeAttrs args ["src" "name" "hash" "sha256"]));
 
   in lib.setFunctionArgs f (lib.functionArgs f) // {
     tests = callPackage ./tests {};
diff --git a/pkgs/build-support/ocaml/default.nix b/pkgs/build-support/ocaml/default.nix
deleted file mode 100644
index 38029e8a480..00000000000
--- a/pkgs/build-support/ocaml/default.nix
+++ /dev/null
@@ -1,36 +0,0 @@
-{ lib, stdenv, writeText, ocaml, findlib, ocamlbuild, camlp4 }:
-
-{ pname ? args.name, version, nativeBuildInputs ? [],
-  createFindlibDestdir ?  true,
-  dontStrip ? true,
-  minimumSupportedOcamlVersion ? null,
-  hasSharedObjects ? false,
-  setupHook ? null,
-  meta ? {}, ...
-}@args:
-let
-  defaultMeta = {
-    platforms = ocaml.meta.platforms or [];
-  };
-in
-  assert minimumSupportedOcamlVersion != null ->
-          lib.versionOlder minimumSupportedOcamlVersion ocaml.version;
-
-stdenv.mkDerivation (args // {
-  name = "ocaml-${pname}-${version}";
-
-  nativeBuildInputs = [ ocaml findlib ocamlbuild camlp4 ] ++ nativeBuildInputs;
-
-  strictDeps = true;
-
-  setupHook = if setupHook == null && hasSharedObjects
-  then writeText "setupHook.sh" ''
-    export CAML_LD_LIBRARY_PATH="''${CAML_LD_LIBRARY_PATH-}''${CAML_LD_LIBRARY_PATH:+:}''$1/lib/ocaml/${ocaml.version}/site-lib/${pname}/"
-    ''
-  else setupHook;
-
-  inherit createFindlibDestdir;
-  inherit dontStrip;
-
-  meta = defaultMeta // meta;
-})
diff --git a/pkgs/build-support/portable-service/default.nix b/pkgs/build-support/portable-service/default.nix
new file mode 100644
index 00000000000..6389e8d66fb
--- /dev/null
+++ b/pkgs/build-support/portable-service/default.nix
@@ -0,0 +1,111 @@
+{ pkgs, lib, stdenv }:
+/*
+  Create a systemd portable service image
+  https://systemd.io/PORTABLE_SERVICES/
+
+  Example:
+  pkgs.portableService {
+    pname = "demo";
+    version = "1.0";
+    units = [ demo-service demo-socket ];
+  }
+*/
+{
+  # The name and version of the portable service. The resulting image will be
+  # created in result/$pname_$version.raw
+  pname
+, version
+
+  # Units is a list of derivations for systemd unit files. Those files will be
+  # copied to /etc/systemd/system in the resulting image. Note that the unit
+  # names must be prefixed with the name of the portable service.
+, units
+
+  # Basic info about the portable service image, used for the generated
+  # /etc/os-release
+, description ? null
+, homepage ? null
+
+  # A list of attribute sets {object, symlink}. Symlinks will be created
+  # in the root filesystem of the image to objects in the nix store.
+, symlinks ? [ ]
+
+  # A list of additional derivations to be included in the image as-is.
+, contents ? [ ]
+
+  # mksquashfs options
+, squashfsTools ? pkgs.squashfsTools
+, squash-compression ? "xz -Xdict-size 100%"
+, squash-block-size ? "1M"
+}:
+
+let
+  filterNull = lib.filterAttrs (_: v: v != null);
+  envFileGenerator = lib.generators.toKeyValue { };
+
+  rootFsScaffold =
+    let
+      os-release-params = {
+        PORTABLE_ID = pname;
+        PORTABLE_PRETTY_NAME = description;
+        HOME_URL = homepage;
+        ID = "nixos";
+        PRETTY_NAME = "NixOS";
+        BUILD_ID = "rolling";
+      };
+      os-release = pkgs.writeText "os-release"
+        (envFileGenerator (filterNull os-release-params));
+
+    in
+    stdenv.mkDerivation {
+      pname = "root-fs-scaffold";
+      inherit version;
+
+      buildCommand = ''
+        # scaffold a file system layout
+        mkdir -p $out/etc/systemd/system $out/proc $out/sys $out/dev $out/run \
+                 $out/tmp $out/var/tmp $out/var/lib $out/var/cache $out/var/log
+
+        # empty files to mount over with host's version
+        touch $out/etc/resolv.conf $out/etc/machine-id
+
+        # required for portable services
+        cp ${os-release} $out/etc/os-release
+      ''
+      # units **must** be copied to /etc/systemd/system/
+      + (lib.concatMapStringsSep "\n" (u: "cp ${u} $out/etc/systemd/system/${u.name};") units)
+      + (lib.concatMapStringsSep "\n"
+        ({ object, symlink }: ''
+          mkdir -p $(dirname $out/${symlink});
+          ln -s ${object} $out/${symlink};
+        '')
+        symlinks)
+      ;
+    };
+in
+
+assert lib.assertMsg (lib.all (u: lib.hasPrefix pname u.name) units) "Unit names must be prefixed with the service name";
+
+stdenv.mkDerivation {
+  pname = "${pname}-img";
+  inherit version;
+
+  nativeBuildInputs = [ squashfsTools ];
+  closureInfo = pkgs.closureInfo { rootPaths = [ rootFsScaffold ] ++ contents; };
+
+  buildCommand = ''
+    mkdir -p nix/store
+    for i in $(< $closureInfo/store-paths); do
+      cp -a "$i" "''${i:1}"
+    done
+
+    mkdir -p $out
+    # the '.raw' suffix is mandatory by the portable service spec
+    mksquashfs nix ${rootFsScaffold}/* $out/"${pname}_${version}.raw" \
+      -quiet -noappend \
+      -exit-on-error \
+      -keep-as-directory \
+      -all-root -root-mode 755 \
+      -b ${squash-block-size} -comp ${squash-compression}
+  '';
+}
diff --git a/pkgs/build-support/references-by-popularity/default.nix b/pkgs/build-support/references-by-popularity/default.nix
index 4cae2dcf3ca..dfc25275f34 100644
--- a/pkgs/build-support/references-by-popularity/default.nix
+++ b/pkgs/build-support/references-by-popularity/default.nix
@@ -5,6 +5,7 @@ path: runCommand "closure-paths"
 {
   exportReferencesGraph.graph = path;
   __structuredAttrs = true;
+  preferLocalBuild = true;
   PATH = "${coreutils}/bin:${python3}/bin";
   builder = builtins.toFile "builder"
     ''
diff --git a/pkgs/build-support/release/default.nix b/pkgs/build-support/release/default.nix
index d593ec81197..da1078369a5 100644
--- a/pkgs/build-support/release/default.nix
+++ b/pkgs/build-support/release/default.nix
@@ -15,7 +15,7 @@ rec {
     } // args);
 
   mvnBuild = args: import ./maven-build.nix (
-    { inherit stdenv;
+    { inherit lib stdenv;
     } // args);
 
   nixBuild = args: import ./nix-build.nix (
diff --git a/pkgs/build-support/release/maven-build.nix b/pkgs/build-support/release/maven-build.nix
index eaa47647287..daee44b85ac 100644
--- a/pkgs/build-support/release/maven-build.nix
+++ b/pkgs/build-support/release/maven-build.nix
@@ -1,4 +1,5 @@
 { stdenv
+, lib
 , name
 , src
 , doTest ? true
@@ -12,7 +13,11 @@
 } @ args :
 
 let
-  mvnFlags = "-Dmaven.repo.local=$M2_REPO ${if doTest then "" else "-Dmaven.test.skip.exec=true"} ${extraMvnFlags}";
+  mvnFlags = lib.escapeShellArgs [
+    "-Dmaven.repo.local=$M2_REPO"
+    (lib.optionalString (!doTest) "-Dmaven.test.skip.exec=true")
+    "${extraMvnFlags}"
+  ];
 in
 
 stdenv.mkDerivation ( {
diff --git a/pkgs/build-support/remove-references-to/remove-references-to.sh b/pkgs/build-support/remove-references-to/remove-references-to.sh
index d8d38dbd80a..f1b5dde5f07 100644..100755
--- a/pkgs/build-support/remove-references-to/remove-references-to.sh
+++ b/pkgs/build-support/remove-references-to/remove-references-to.sh
@@ -27,7 +27,7 @@ for i in "$@"; do
 done
 
 for target in "${targets[@]}" ; do
-    sed -i -e "s|@storeDir@/$target-|@storeDir@/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" "${regions[@]}"
+    sed -i -e "s|$target|eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee|g" "${regions[@]}"
 done
 
 for region in "${regions[@]}"; do
diff --git a/pkgs/build-support/rust/build-rust-crate/configure-crate.nix b/pkgs/build-support/rust/build-rust-crate/configure-crate.nix
index 5129777c9d5..1c946764c75 100644
--- a/pkgs/build-support/rust/build-rust-crate/configure-crate.nix
+++ b/pkgs/build-support/rust/build-rust-crate/configure-crate.nix
@@ -32,7 +32,7 @@ let version_ = lib.splitString "-" crateVersion;
     completeDepsDir = lib.concatStringsSep " " completeDeps;
     completeBuildDepsDir = lib.concatStringsSep " " completeBuildDeps;
     envFeatures = lib.concatStringsSep " " (
-      map (f: lib.replaceChars ["-"] ["_"] (lib.toUpper f)) crateFeatures
+      map (f: lib.replaceStrings ["-"] ["_"] (lib.toUpper f)) crateFeatures
     );
 in ''
   ${echo_colored colors}
@@ -186,12 +186,27 @@ in ''
      set +e
      EXTRA_BUILD=$(sed -n "s/^cargo:rustc-flags=\(.*\)/\1/p" target/build/${crateName}.opt | tr '\n' ' ' | sort -u)
      EXTRA_FEATURES=$(sed -n "s/^cargo:rustc-cfg=\(.*\)/--cfg \1/p" target/build/${crateName}.opt | tr '\n' ' ')
-     EXTRA_LINK=$(sed -n "s/^cargo:rustc-link-lib=\(.*\)/\1/p" target/build/${crateName}.opt | tr '\n' ' ')
+     EXTRA_LINK_ARGS=$(sed -n "s/^cargo:rustc-link-arg=\(.*\)/-C link-arg=\1/p" target/build/${crateName}.opt | tr '\n' ' ')
+     EXTRA_LINK_ARGS_BINS=$(sed -n "s/^cargo:rustc-link-arg-bins=\(.*\)/-C link-arg=\1/p" target/build/${crateName}.opt | tr '\n' ' ')
+     EXTRA_LINK_ARGS_LIB=$(sed -n "s/^cargo:rustc-link-arg-lib=\(.*\)/-C link-arg=\1/p" target/build/${crateName}.opt | tr '\n' ' ')
+     EXTRA_LINK_LIBS=$(sed -n "s/^cargo:rustc-link-lib=\(.*\)/\1/p" target/build/${crateName}.opt | tr '\n' ' ')
      EXTRA_LINK_SEARCH=$(sed -n "s/^cargo:rustc-link-search=\(.*\)/\1/p" target/build/${crateName}.opt | tr '\n' ' ' | sort -u)
 
+     # We want to read part of every line that has cargo:rustc-env= prefix and
+     # export it as environment variables. This turns out tricky if the lines
+     # have spaces: we can't wrap the command in double quotes as that captures
+     # all the lines in single output. We can't use while read loop because
+     # exporting from inside of it doesn't make it to the outside scope. We
+     # can't use xargs as export is a built-in and does not work from it. As a
+     # last resort then, we change the IFS so that the for loop does not split
+     # on spaces and reset it after we are done. See ticket #199298.
+     #
+     _OLDIFS="$IFS"
+     IFS=$'\n'
      for env in $(sed -n "s/^cargo:rustc-env=\(.*\)/\1/p" target/build/${crateName}.opt); do
-       export $env
+       export "$env"
      done
+     IFS="$_OLDIFS"
 
      CRATENAME=$(echo ${crateName} | sed -e "s/\(.*\)-sys$/\U\1/" -e "s/-/_/g")
      grep -P "^cargo:(?!(rustc-|warning=|rerun-if-changed=|rerun-if-env-changed))" target/build/${crateName}.opt \
diff --git a/pkgs/build-support/rust/build-rust-crate/lib.sh b/pkgs/build-support/rust/build-rust-crate/lib.sh
index 39f7d53f6f7..7f98701b540 100644
--- a/pkgs/build-support/rust/build-rust-crate/lib.sh
+++ b/pkgs/build-support/rust/build-rust-crate/lib.sh
@@ -17,6 +17,8 @@ build_lib() {
     -L dependency=target/deps \
     --cap-lints allow \
     $LINK \
+    $EXTRA_LINK_ARGS \
+    $EXTRA_LINK_ARGS_LIB \
     $LIB_RUSTC_OPTS \
     $BUILD_OUT_DIR \
     $EXTRA_BUILD \
@@ -47,6 +49,8 @@ build_bin() {
     --out-dir target/bin \
     -L dependency=target/deps \
     $LINK \
+    $EXTRA_LINK_ARGS \
+    $EXTRA_LINK_ARGS_BINS \
     $EXTRA_LIB \
     --cap-lints allow \
     $BUILD_OUT_DIR \
@@ -94,7 +98,7 @@ setup_link_paths() {
        done
      fi
   done
-  echo "$EXTRA_LINK" | while read i; do
+  echo "$EXTRA_LINK_LIBS" | while read i; do
      if [[ ! -z "$i" ]]; then
        for library in $i; do
          echo "-l $library" >> target/link
diff --git a/pkgs/build-support/rust/build-rust-package/default.nix b/pkgs/build-support/rust/build-rust-package/default.nix
index 95b6f357e56..679e10a3442 100644
--- a/pkgs/build-support/rust/build-rust-package/default.nix
+++ b/pkgs/build-support/rust/build-rust-package/default.nix
@@ -9,6 +9,7 @@
 , cargoBuildHook
 , cargoCheckHook
 , cargoInstallHook
+, cargoNextestHook
 , cargoSetupHook
 , rustc
 , libiconv
@@ -40,6 +41,7 @@
 , checkNoDefaultFeatures ? buildNoDefaultFeatures
 , buildFeatures ? [ ]
 , checkFeatures ? buildFeatures
+, useNextest ? false
 , depsExtraArgs ? {}
 
 # Toggles whether a custom sysroot is created when the target is a .json file.
@@ -52,8 +54,9 @@
 , buildAndTestSubdir ? null
 , ... } @ args:
 
-assert cargoVendorDir == null && cargoLock == null -> !(args ? cargoSha256) && !(args ? cargoHash)
-  -> throw "cargoSha256, cargoHash, cargoVendorDir, or cargoLock must be set";
+assert cargoVendorDir == null && cargoLock == null
+    -> !(args ? cargoSha256 && args.cargoSha256 != null) && !(args ? cargoHash && args.cargoHash != null)
+    -> throw "cargoSha256, cargoHash, cargoVendorDir, or cargoLock must be set";
 assert buildType == "release" || buildType == "debug";
 
 let
@@ -71,10 +74,6 @@ let
       sha256 = args.cargoSha256;
     } // depsExtraArgs);
 
-  # If we have a cargoSha256 fixed-output derivation, validate it at build time
-  # against the src fixed-output derivation to check consistency.
-  validateCargoDeps = args ? cargoHash || args ? cargoSha256;
-
   target = rust.toRustTargetSpec stdenv.hostPlatform;
   targetIsJSON = lib.hasSuffix ".json" target;
   useSysroot = targetIsJSON && !__internal_dontAddSysroot;
@@ -120,14 +119,13 @@ stdenv.mkDerivation ((removeAttrs args [ "depsExtraArgs" "cargoUpdateHook" "carg
     cacert
     git
     cargoBuildHook
-    cargoCheckHook
+    (if useNextest then cargoNextestHook else cargoCheckHook)
     cargoInstallHook
     cargoSetupHook
     rustc
   ];
 
   buildInputs = buildInputs
-    ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ]
     ++ lib.optionals stdenv.hostPlatform.isMinGW [ windows.pthreads ];
 
   patches = cargoPatches ++ patches;
diff --git a/pkgs/build-support/rust/carnix.nix b/pkgs/build-support/rust/carnix.nix
deleted file mode 100644
index 46bbff92a9c..00000000000
--- a/pkgs/build-support/rust/carnix.nix
+++ /dev/null
@@ -1,259 +0,0 @@
-# Generated by carnix 0.9.10: carnix generate-nix
-{ lib, buildPlatform, buildRustCrate, buildRustCrateHelpers, cratesIO, fetchgit }:
-with buildRustCrateHelpers;
-let inherit (lib.lists) fold;
-    inherit (lib.attrsets) recursiveUpdate;
-in
-rec {
-  crates = cratesIO;
-  carnix = crates.crates.carnix."0.10.0" deps;
-  __all = [ (carnix {}) ];
-  deps.aho_corasick."0.6.10" = {
-    memchr = "2.2.0";
-  };
-  deps.ansi_term."0.11.0" = {
-    winapi = "0.3.6";
-  };
-  deps.argon2rs."0.2.5" = {
-    blake2_rfc = "0.2.18";
-    scoped_threadpool = "0.1.9";
-  };
-  deps.arrayvec."0.4.10" = {
-    nodrop = "0.1.13";
-  };
-  deps.atty."0.2.11" = {
-    termion = "1.5.1";
-    libc = "0.2.50";
-    winapi = "0.3.6";
-  };
-  deps.autocfg."0.1.2" = {};
-  deps.backtrace."0.3.14" = {
-    cfg_if = "0.1.7";
-    rustc_demangle = "0.1.13";
-    autocfg = "0.1.2";
-    backtrace_sys = "0.1.28";
-    libc = "0.2.50";
-    winapi = "0.3.6";
-  };
-  deps.backtrace_sys."0.1.28" = {
-    libc = "0.2.50";
-    cc = "1.0.32";
-  };
-  deps.bitflags."1.0.4" = {};
-  deps.blake2_rfc."0.2.18" = {
-    arrayvec = "0.4.10";
-    constant_time_eq = "0.1.3";
-  };
-  deps.carnix."0.10.0" = {
-    clap = "2.32.0";
-    dirs = "1.0.5";
-    env_logger = "0.6.1";
-    failure = "0.1.5";
-    failure_derive = "0.1.5";
-    itertools = "0.8.0";
-    log = "0.4.6";
-    nom = "3.2.1";
-    regex = "1.1.2";
-    serde = "1.0.89";
-    serde_derive = "1.0.89";
-    serde_json = "1.0.39";
-    tempdir = "0.3.7";
-    toml = "0.5.0";
-    url = "1.7.2";
-  };
-  deps.cc."1.0.32" = {};
-  deps.cfg_if."0.1.7" = {};
-  deps.clap."2.32.0" = {
-    atty = "0.2.11";
-    bitflags = "1.0.4";
-    strsim = "0.7.0";
-    textwrap = "0.10.0";
-    unicode_width = "0.1.5";
-    vec_map = "0.8.1";
-    ansi_term = "0.11.0";
-  };
-  deps.cloudabi."0.0.3" = {
-    bitflags = "1.0.4";
-  };
-  deps.constant_time_eq."0.1.3" = {};
-  deps.dirs."1.0.5" = {
-    redox_users = "0.3.0";
-    libc = "0.2.50";
-    winapi = "0.3.6";
-  };
-  deps.either."1.5.1" = {};
-  deps.env_logger."0.6.1" = {
-    atty = "0.2.11";
-    humantime = "1.2.0";
-    log = "0.4.6";
-    regex = "1.1.2";
-    termcolor = "1.0.4";
-  };
-  deps.failure."0.1.5" = {
-    backtrace = "0.3.14";
-    failure_derive = "0.1.5";
-  };
-  deps.failure_derive."0.1.5" = {
-    proc_macro2 = "0.4.27";
-    quote = "0.6.11";
-    syn = "0.15.29";
-    synstructure = "0.10.1";
-  };
-  deps.fuchsia_cprng."0.1.1" = {};
-  deps.humantime."1.2.0" = {
-    quick_error = "1.2.2";
-  };
-  deps.idna."0.1.5" = {
-    matches = "0.1.8";
-    unicode_bidi = "0.3.4";
-    unicode_normalization = "0.1.8";
-  };
-  deps.itertools."0.8.0" = {
-    either = "1.5.1";
-  };
-  deps.itoa."0.4.3" = {};
-  deps.lazy_static."1.3.0" = {};
-  deps.libc."0.2.50" = {};
-  deps.log."0.4.6" = {
-    cfg_if = "0.1.7";
-  };
-  deps.matches."0.1.8" = {};
-  deps.memchr."1.0.2" = {
-    libc = "0.2.50";
-  };
-  deps.memchr."2.2.0" = {};
-  deps.nodrop."0.1.13" = {};
-  deps.nom."3.2.1" = {
-    memchr = "1.0.2";
-  };
-  deps.percent_encoding."1.0.1" = {};
-  deps.proc_macro2."0.4.27" = {
-    unicode_xid = "0.1.0";
-  };
-  deps.quick_error."1.2.2" = {};
-  deps.quote."0.6.11" = {
-    proc_macro2 = "0.4.27";
-  };
-  deps.rand."0.4.6" = {
-    rand_core = "0.3.1";
-    rdrand = "0.4.0";
-    fuchsia_cprng = "0.1.1";
-    libc = "0.2.50";
-    winapi = "0.3.6";
-  };
-  deps.rand_core."0.3.1" = {
-    rand_core = "0.4.0";
-  };
-  deps.rand_core."0.4.0" = {};
-  deps.rand_os."0.1.3" = {
-    rand_core = "0.4.0";
-    rdrand = "0.4.0";
-    cloudabi = "0.0.3";
-    fuchsia_cprng = "0.1.1";
-    libc = "0.2.50";
-    winapi = "0.3.6";
-  };
-  deps.rdrand."0.4.0" = {
-    rand_core = "0.3.1";
-  };
-  deps.redox_syscall."0.1.51" = {};
-  deps.redox_termios."0.1.1" = {
-    redox_syscall = "0.1.51";
-  };
-  deps.redox_users."0.3.0" = {
-    argon2rs = "0.2.5";
-    failure = "0.1.5";
-    rand_os = "0.1.3";
-    redox_syscall = "0.1.51";
-  };
-  deps.regex."1.1.2" = {
-    aho_corasick = "0.6.10";
-    memchr = "2.2.0";
-    regex_syntax = "0.6.5";
-    thread_local = "0.3.6";
-    utf8_ranges = "1.0.2";
-  };
-  deps.regex_syntax."0.6.5" = {
-    ucd_util = "0.1.3";
-  };
-  deps.remove_dir_all."0.5.1" = {
-    winapi = "0.3.6";
-  };
-  deps.rustc_demangle."0.1.13" = {};
-  deps.ryu."0.2.7" = {};
-  deps.scoped_threadpool."0.1.9" = {};
-  deps.serde."1.0.89" = {};
-  deps.serde_derive."1.0.89" = {
-    proc_macro2 = "0.4.27";
-    quote = "0.6.11";
-    syn = "0.15.29";
-  };
-  deps.serde_json."1.0.39" = {
-    itoa = "0.4.3";
-    ryu = "0.2.7";
-    serde = "1.0.89";
-  };
-  deps.smallvec."0.6.9" = {};
-  deps.strsim."0.7.0" = {};
-  deps.syn."0.15.29" = {
-    proc_macro2 = "0.4.27";
-    quote = "0.6.11";
-    unicode_xid = "0.1.0";
-  };
-  deps.synstructure."0.10.1" = {
-    proc_macro2 = "0.4.27";
-    quote = "0.6.11";
-    syn = "0.15.29";
-    unicode_xid = "0.1.0";
-  };
-  deps.tempdir."0.3.7" = {
-    rand = "0.4.6";
-    remove_dir_all = "0.5.1";
-  };
-  deps.termcolor."1.0.4" = {
-    wincolor = "1.0.1";
-  };
-  deps.termion."1.5.1" = {
-    libc = "0.2.50";
-    redox_syscall = "0.1.51";
-    redox_termios = "0.1.1";
-  };
-  deps.textwrap."0.10.0" = {
-    unicode_width = "0.1.5";
-  };
-  deps.thread_local."0.3.6" = {
-    lazy_static = "1.3.0";
-  };
-  deps.toml."0.5.0" = {
-    serde = "1.0.89";
-  };
-  deps.ucd_util."0.1.3" = {};
-  deps.unicode_bidi."0.3.4" = {
-    matches = "0.1.8";
-  };
-  deps.unicode_normalization."0.1.8" = {
-    smallvec = "0.6.9";
-  };
-  deps.unicode_width."0.1.5" = {};
-  deps.unicode_xid."0.1.0" = {};
-  deps.url."1.7.2" = {
-    idna = "0.1.5";
-    matches = "0.1.8";
-    percent_encoding = "1.0.1";
-  };
-  deps.utf8_ranges."1.0.2" = {};
-  deps.vec_map."0.8.1" = {};
-  deps.winapi."0.3.6" = {
-    winapi_i686_pc_windows_gnu = "0.4.0";
-    winapi_x86_64_pc_windows_gnu = "0.4.0";
-  };
-  deps.winapi_i686_pc_windows_gnu."0.4.0" = {};
-  deps.winapi_util."0.1.2" = {
-    winapi = "0.3.6";
-  };
-  deps.winapi_x86_64_pc_windows_gnu."0.4.0" = {};
-  deps.wincolor."1.0.1" = {
-    winapi = "0.3.6";
-    winapi_util = "0.1.2";
-  };
-}
diff --git a/pkgs/build-support/rust/crates-io.nix b/pkgs/build-support/rust/crates-io.nix
deleted file mode 100644
index 66f98cd9912..00000000000
--- a/pkgs/build-support/rust/crates-io.nix
+++ /dev/null
@@ -1,7756 +0,0 @@
-{ lib, buildRustCrate, buildRustCrateHelpers }:
-with buildRustCrateHelpers;
-let inherit (lib.lists) fold;
-    inherit (lib.attrsets) recursiveUpdate;
-in
-rec {
-# aho-corasick-0.6.10
-
-  crates.aho_corasick."0.6.10" = deps: { features?(features_.aho_corasick."0.6.10" deps {}) }: buildRustCrate {
-    crateName = "aho-corasick";
-    version = "0.6.10";
-    description = "Fast multiple substring searching with finite state machines.";
-    authors = [ "Andrew Gallant <jamslam@gmail.com>" ];
-    sha256 = "0bhasxfpmfmz1460chwsx59vdld05axvmk1nbp3sd48xav3d108p";
-    libName = "aho_corasick";
-    crateBin =
-      [{  name = "aho-corasick-dot";  path = "src/main.rs"; }];
-    dependencies = mapFeatures features ([
-      (crates."memchr"."${deps."aho_corasick"."0.6.10"."memchr"}" deps)
-    ]);
-  };
-  features_.aho_corasick."0.6.10" = deps: f: updateFeatures f ({
-    aho_corasick."0.6.10".default = (f.aho_corasick."0.6.10".default or true);
-    memchr."${deps.aho_corasick."0.6.10".memchr}".default = true;
-  }) [
-    (features_.memchr."${deps."aho_corasick"."0.6.10"."memchr"}" deps)
-  ];
-
-
-# end
-# aho-corasick-0.6.8
-
-  crates.aho_corasick."0.6.8" = deps: { features?(features_.aho_corasick."0.6.8" deps {}) }: buildRustCrate {
-    crateName = "aho-corasick";
-    version = "0.6.8";
-    authors = [ "Andrew Gallant <jamslam@gmail.com>" ];
-    sha256 = "04bz5m32ykyn946iwxgbrl8nwca7ssxsqma140hgmkchaay80nfr";
-    libName = "aho_corasick";
-    crateBin =
-      [{  name = "aho-corasick-dot";  path = "src/main.rs"; }];
-    dependencies = mapFeatures features ([
-      (crates."memchr"."${deps."aho_corasick"."0.6.8"."memchr"}" deps)
-    ]);
-  };
-  features_.aho_corasick."0.6.8" = deps: f: updateFeatures f ({
-    aho_corasick."0.6.8".default = (f.aho_corasick."0.6.8".default or true);
-    memchr."${deps.aho_corasick."0.6.8".memchr}".default = true;
-  }) [
-    (features_.memchr."${deps."aho_corasick"."0.6.8"."memchr"}" deps)
-  ];
-
-
-# end
-# ansi_term-0.11.0
-
-  crates.ansi_term."0.11.0" = deps: { features?(features_.ansi_term."0.11.0" deps {}) }: buildRustCrate {
-    crateName = "ansi_term";
-    version = "0.11.0";
-    authors = [ "ogham@bsago.me" "Ryan Scheel (Havvy) <ryan.havvy@gmail.com>" "Josh Triplett <josh@joshtriplett.org>" ];
-    sha256 = "08fk0p2xvkqpmz3zlrwnf6l8sj2vngw464rvzspzp31sbgxbwm4v";
-    dependencies = (if kernel == "windows" then mapFeatures features ([
-      (crates."winapi"."${deps."ansi_term"."0.11.0"."winapi"}" deps)
-    ]) else []);
-  };
-  features_.ansi_term."0.11.0" = deps: f: updateFeatures f ({
-    ansi_term."0.11.0".default = (f.ansi_term."0.11.0".default or true);
-    winapi = fold recursiveUpdate {} [
-      { "${deps.ansi_term."0.11.0".winapi}"."consoleapi" = true; }
-      { "${deps.ansi_term."0.11.0".winapi}"."errhandlingapi" = true; }
-      { "${deps.ansi_term."0.11.0".winapi}"."processenv" = true; }
-      { "${deps.ansi_term."0.11.0".winapi}".default = true; }
-    ];
-  }) [
-    (features_.winapi."${deps."ansi_term"."0.11.0"."winapi"}" deps)
-  ];
-
-
-# end
-# argon2rs-0.2.5
-
-  crates.argon2rs."0.2.5" = deps: { features?(features_.argon2rs."0.2.5" deps {}) }: buildRustCrate {
-    crateName = "argon2rs";
-    version = "0.2.5";
-    authors = [ "bryant <bryant@defrag.in>" ];
-    sha256 = "1byl9b3wwyrarn8qack21v5fi2qsnn3y5clvikk2apskhmnih1rw";
-    dependencies = mapFeatures features ([
-      (crates."blake2_rfc"."${deps."argon2rs"."0.2.5"."blake2_rfc"}" deps)
-      (crates."scoped_threadpool"."${deps."argon2rs"."0.2.5"."scoped_threadpool"}" deps)
-    ]);
-    features = mkFeatures (features."argon2rs"."0.2.5" or {});
-  };
-  features_.argon2rs."0.2.5" = deps: f: updateFeatures f (rec {
-    argon2rs."0.2.5".default = (f.argon2rs."0.2.5".default or true);
-    blake2_rfc = fold recursiveUpdate {} [
-      { "${deps.argon2rs."0.2.5".blake2_rfc}"."simd_asm" =
-        (f.blake2_rfc."${deps.argon2rs."0.2.5".blake2_rfc}"."simd_asm" or false) ||
-        (argon2rs."0.2.5"."simd" or false) ||
-        (f."argon2rs"."0.2.5"."simd" or false); }
-      { "${deps.argon2rs."0.2.5".blake2_rfc}".default = true; }
-    ];
-    scoped_threadpool."${deps.argon2rs."0.2.5".scoped_threadpool}".default = true;
-  }) [
-    (features_.blake2_rfc."${deps."argon2rs"."0.2.5"."blake2_rfc"}" deps)
-    (features_.scoped_threadpool."${deps."argon2rs"."0.2.5"."scoped_threadpool"}" deps)
-  ];
-
-
-# end
-# arrayvec-0.4.10
-
-  crates.arrayvec."0.4.10" = deps: { features?(features_.arrayvec."0.4.10" deps {}) }: buildRustCrate {
-    crateName = "arrayvec";
-    version = "0.4.10";
-    description = "A vector with fixed capacity, backed by an array (it can be stored on the stack too). Implements fixed capacity ArrayVec and ArrayString.";
-    authors = [ "bluss" ];
-    sha256 = "0qbh825i59w5wfdysqdkiwbwkrsy7lgbd4pwbyb8pxx8wc36iny8";
-    dependencies = mapFeatures features ([
-      (crates."nodrop"."${deps."arrayvec"."0.4.10"."nodrop"}" deps)
-    ]);
-    features = mkFeatures (features."arrayvec"."0.4.10" or {});
-  };
-  features_.arrayvec."0.4.10" = deps: f: updateFeatures f (rec {
-    arrayvec = fold recursiveUpdate {} [
-      { "0.4.10"."serde" =
-        (f.arrayvec."0.4.10"."serde" or false) ||
-        (f.arrayvec."0.4.10".serde-1 or false) ||
-        (arrayvec."0.4.10"."serde-1" or false); }
-      { "0.4.10"."std" =
-        (f.arrayvec."0.4.10"."std" or false) ||
-        (f.arrayvec."0.4.10".default or false) ||
-        (arrayvec."0.4.10"."default" or false); }
-      { "0.4.10".default = (f.arrayvec."0.4.10".default or true); }
-    ];
-    nodrop."${deps.arrayvec."0.4.10".nodrop}".default = (f.nodrop."${deps.arrayvec."0.4.10".nodrop}".default or false);
-  }) [
-    (features_.nodrop."${deps."arrayvec"."0.4.10"."nodrop"}" deps)
-  ];
-
-
-# end
-# arrayvec-0.4.7
-
-  crates.arrayvec."0.4.7" = deps: { features?(features_.arrayvec."0.4.7" deps {}) }: buildRustCrate {
-    crateName = "arrayvec";
-    version = "0.4.7";
-    authors = [ "bluss" ];
-    sha256 = "0fzgv7z1x1qnyd7j32vdcadk4k9wfx897y06mr3bw1yi52iqf4z4";
-    dependencies = mapFeatures features ([
-      (crates."nodrop"."${deps."arrayvec"."0.4.7"."nodrop"}" deps)
-    ]);
-    features = mkFeatures (features."arrayvec"."0.4.7" or {});
-  };
-  features_.arrayvec."0.4.7" = deps: f: updateFeatures f (rec {
-    arrayvec = fold recursiveUpdate {} [
-      { "0.4.7".default = (f.arrayvec."0.4.7".default or true); }
-      { "0.4.7".serde =
-        (f.arrayvec."0.4.7".serde or false) ||
-        (f.arrayvec."0.4.7".serde-1 or false) ||
-        (arrayvec."0.4.7"."serde-1" or false); }
-      { "0.4.7".std =
-        (f.arrayvec."0.4.7".std or false) ||
-        (f.arrayvec."0.4.7".default or false) ||
-        (arrayvec."0.4.7"."default" or false); }
-    ];
-    nodrop."${deps.arrayvec."0.4.7".nodrop}".default = (f.nodrop."${deps.arrayvec."0.4.7".nodrop}".default or false);
-  }) [
-    (features_.nodrop."${deps."arrayvec"."0.4.7"."nodrop"}" deps)
-  ];
-
-
-# end
-# atty-0.2.11
-
-  crates.atty."0.2.11" = deps: { features?(features_.atty."0.2.11" deps {}) }: buildRustCrate {
-    crateName = "atty";
-    version = "0.2.11";
-    authors = [ "softprops <d.tangren@gmail.com>" ];
-    sha256 = "0by1bj2km9jxi4i4g76zzi76fc2rcm9934jpnyrqd95zw344pb20";
-    dependencies = (if kernel == "redox" then mapFeatures features ([
-      (crates."termion"."${deps."atty"."0.2.11"."termion"}" deps)
-    ]) else [])
-      ++ (if (kernel == "linux" || kernel == "darwin") then mapFeatures features ([
-      (crates."libc"."${deps."atty"."0.2.11"."libc"}" deps)
-    ]) else [])
-      ++ (if kernel == "windows" then mapFeatures features ([
-      (crates."winapi"."${deps."atty"."0.2.11"."winapi"}" deps)
-    ]) else []);
-  };
-  features_.atty."0.2.11" = deps: f: updateFeatures f ({
-    atty."0.2.11".default = (f.atty."0.2.11".default or true);
-    libc."${deps.atty."0.2.11".libc}".default = (f.libc."${deps.atty."0.2.11".libc}".default or false);
-    termion."${deps.atty."0.2.11".termion}".default = true;
-    winapi = fold recursiveUpdate {} [
-      { "${deps.atty."0.2.11".winapi}"."consoleapi" = true; }
-      { "${deps.atty."0.2.11".winapi}"."minwinbase" = true; }
-      { "${deps.atty."0.2.11".winapi}"."minwindef" = true; }
-      { "${deps.atty."0.2.11".winapi}"."processenv" = true; }
-      { "${deps.atty."0.2.11".winapi}"."winbase" = true; }
-      { "${deps.atty."0.2.11".winapi}".default = true; }
-    ];
-  }) [
-    (features_.termion."${deps."atty"."0.2.11"."termion"}" deps)
-    (features_.libc."${deps."atty"."0.2.11"."libc"}" deps)
-    (features_.winapi."${deps."atty"."0.2.11"."winapi"}" deps)
-  ];
-
-
-# end
-# autocfg-0.1.2
-
-  crates.autocfg."0.1.2" = deps: { features?(features_.autocfg."0.1.2" deps {}) }: buildRustCrate {
-    crateName = "autocfg";
-    version = "0.1.2";
-    description = "Automatic cfg for Rust compiler features";
-    authors = [ "Josh Stone <cuviper@gmail.com>" ];
-    sha256 = "0dv81dwnp1al3j4ffz007yrjv4w1c7hw09gnf0xs3icxiw6qqfs3";
-  };
-  features_.autocfg."0.1.2" = deps: f: updateFeatures f ({
-    autocfg."0.1.2".default = (f.autocfg."0.1.2".default or true);
-  }) [];
-
-
-# end
-# backtrace-0.3.14
-
-  crates.backtrace."0.3.14" = deps: { features?(features_.backtrace."0.3.14" deps {}) }: buildRustCrate {
-    crateName = "backtrace";
-    version = "0.3.14";
-    description = "A library to acquire a stack trace (backtrace) at runtime in a Rust program.\n";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" "The Rust Project Developers" ];
-    sha256 = "0sp0ib8r5w9sv1g2nkm9yclp16j46yjglw0yhkmh0snf355633mz";
-    dependencies = mapFeatures features ([
-      (crates."cfg_if"."${deps."backtrace"."0.3.14"."cfg_if"}" deps)
-      (crates."rustc_demangle"."${deps."backtrace"."0.3.14"."rustc_demangle"}" deps)
-    ])
-      ++ (if (kernel == "linux" || kernel == "darwin") && !(kernel == "fuchsia") && !(kernel == "emscripten") && !(kernel == "darwin") && !(kernel == "ios") then mapFeatures features ([
-    ]
-      ++ (if features.backtrace."0.3.14".backtrace-sys or false then [ (crates.backtrace_sys."${deps."backtrace"."0.3.14".backtrace_sys}" deps) ] else [])) else [])
-      ++ (if (kernel == "linux" || kernel == "darwin") || abi == "sgx" then mapFeatures features ([
-      (crates."libc"."${deps."backtrace"."0.3.14"."libc"}" deps)
-    ]) else [])
-      ++ (if kernel == "windows" then mapFeatures features ([
-      (crates."winapi"."${deps."backtrace"."0.3.14"."winapi"}" deps)
-    ]) else []);
-
-    buildDependencies = mapFeatures features ([
-      (crates."autocfg"."${deps."backtrace"."0.3.14"."autocfg"}" deps)
-    ]);
-    features = mkFeatures (features."backtrace"."0.3.14" or {});
-  };
-  features_.backtrace."0.3.14" = deps: f: updateFeatures f (rec {
-    autocfg."${deps.backtrace."0.3.14".autocfg}".default = true;
-    backtrace = fold recursiveUpdate {} [
-      { "0.3.14"."addr2line" =
-        (f.backtrace."0.3.14"."addr2line" or false) ||
-        (f.backtrace."0.3.14".gimli-symbolize or false) ||
-        (backtrace."0.3.14"."gimli-symbolize" or false); }
-      { "0.3.14"."backtrace-sys" =
-        (f.backtrace."0.3.14"."backtrace-sys" or false) ||
-        (f.backtrace."0.3.14".libbacktrace or false) ||
-        (backtrace."0.3.14"."libbacktrace" or false); }
-      { "0.3.14"."coresymbolication" =
-        (f.backtrace."0.3.14"."coresymbolication" or false) ||
-        (f.backtrace."0.3.14".default or false) ||
-        (backtrace."0.3.14"."default" or false); }
-      { "0.3.14"."dbghelp" =
-        (f.backtrace."0.3.14"."dbghelp" or false) ||
-        (f.backtrace."0.3.14".default or false) ||
-        (backtrace."0.3.14"."default" or false); }
-      { "0.3.14"."dladdr" =
-        (f.backtrace."0.3.14"."dladdr" or false) ||
-        (f.backtrace."0.3.14".default or false) ||
-        (backtrace."0.3.14"."default" or false); }
-      { "0.3.14"."findshlibs" =
-        (f.backtrace."0.3.14"."findshlibs" or false) ||
-        (f.backtrace."0.3.14".gimli-symbolize or false) ||
-        (backtrace."0.3.14"."gimli-symbolize" or false); }
-      { "0.3.14"."gimli" =
-        (f.backtrace."0.3.14"."gimli" or false) ||
-        (f.backtrace."0.3.14".gimli-symbolize or false) ||
-        (backtrace."0.3.14"."gimli-symbolize" or false); }
-      { "0.3.14"."libbacktrace" =
-        (f.backtrace."0.3.14"."libbacktrace" or false) ||
-        (f.backtrace."0.3.14".default or false) ||
-        (backtrace."0.3.14"."default" or false); }
-      { "0.3.14"."libunwind" =
-        (f.backtrace."0.3.14"."libunwind" or false) ||
-        (f.backtrace."0.3.14".default or false) ||
-        (backtrace."0.3.14"."default" or false); }
-      { "0.3.14"."memmap" =
-        (f.backtrace."0.3.14"."memmap" or false) ||
-        (f.backtrace."0.3.14".gimli-symbolize or false) ||
-        (backtrace."0.3.14"."gimli-symbolize" or false); }
-      { "0.3.14"."object" =
-        (f.backtrace."0.3.14"."object" or false) ||
-        (f.backtrace."0.3.14".gimli-symbolize or false) ||
-        (backtrace."0.3.14"."gimli-symbolize" or false); }
-      { "0.3.14"."rustc-serialize" =
-        (f.backtrace."0.3.14"."rustc-serialize" or false) ||
-        (f.backtrace."0.3.14".serialize-rustc or false) ||
-        (backtrace."0.3.14"."serialize-rustc" or false); }
-      { "0.3.14"."serde" =
-        (f.backtrace."0.3.14"."serde" or false) ||
-        (f.backtrace."0.3.14".serialize-serde or false) ||
-        (backtrace."0.3.14"."serialize-serde" or false); }
-      { "0.3.14"."serde_derive" =
-        (f.backtrace."0.3.14"."serde_derive" or false) ||
-        (f.backtrace."0.3.14".serialize-serde or false) ||
-        (backtrace."0.3.14"."serialize-serde" or false); }
-      { "0.3.14"."std" =
-        (f.backtrace."0.3.14"."std" or false) ||
-        (f.backtrace."0.3.14".default or false) ||
-        (backtrace."0.3.14"."default" or false) ||
-        (f.backtrace."0.3.14".libbacktrace or false) ||
-        (backtrace."0.3.14"."libbacktrace" or false); }
-      { "0.3.14".default = (f.backtrace."0.3.14".default or true); }
-    ];
-    backtrace_sys."${deps.backtrace."0.3.14".backtrace_sys}".default = true;
-    cfg_if."${deps.backtrace."0.3.14".cfg_if}".default = true;
-    libc."${deps.backtrace."0.3.14".libc}".default = (f.libc."${deps.backtrace."0.3.14".libc}".default or false);
-    rustc_demangle."${deps.backtrace."0.3.14".rustc_demangle}".default = true;
-    winapi = fold recursiveUpdate {} [
-      { "${deps.backtrace."0.3.14".winapi}"."dbghelp" = true; }
-      { "${deps.backtrace."0.3.14".winapi}"."minwindef" = true; }
-      { "${deps.backtrace."0.3.14".winapi}"."processthreadsapi" = true; }
-      { "${deps.backtrace."0.3.14".winapi}"."winnt" = true; }
-      { "${deps.backtrace."0.3.14".winapi}".default = true; }
-    ];
-  }) [
-    (features_.cfg_if."${deps."backtrace"."0.3.14"."cfg_if"}" deps)
-    (features_.rustc_demangle."${deps."backtrace"."0.3.14"."rustc_demangle"}" deps)
-    (features_.autocfg."${deps."backtrace"."0.3.14"."autocfg"}" deps)
-    (features_.backtrace_sys."${deps."backtrace"."0.3.14"."backtrace_sys"}" deps)
-    (features_.libc."${deps."backtrace"."0.3.14"."libc"}" deps)
-    (features_.winapi."${deps."backtrace"."0.3.14"."winapi"}" deps)
-  ];
-
-
-# end
-# backtrace-0.3.9
-
-  crates.backtrace."0.3.9" = deps: { features?(features_.backtrace."0.3.9" deps {}) }: buildRustCrate {
-    crateName = "backtrace";
-    version = "0.3.9";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" "The Rust Project Developers" ];
-    sha256 = "137pjkcn89b7fqk78w65ggj92pynmf1hkr1sjz53aga4b50lkmwm";
-    dependencies = mapFeatures features ([
-      (crates."cfg_if"."${deps."backtrace"."0.3.9"."cfg_if"}" deps)
-      (crates."rustc_demangle"."${deps."backtrace"."0.3.9"."rustc_demangle"}" deps)
-    ])
-      ++ (if (kernel == "linux" || kernel == "darwin") && !(kernel == "fuchsia") && !(kernel == "emscripten") && !(kernel == "darwin") && !(kernel == "ios") then mapFeatures features ([
-    ]
-      ++ (if features.backtrace."0.3.9".backtrace-sys or false then [ (crates.backtrace_sys."${deps."backtrace"."0.3.9".backtrace_sys}" deps) ] else [])) else [])
-      ++ (if (kernel == "linux" || kernel == "darwin") then mapFeatures features ([
-      (crates."libc"."${deps."backtrace"."0.3.9"."libc"}" deps)
-    ]) else [])
-      ++ (if kernel == "windows" then mapFeatures features ([
-    ]
-      ++ (if features.backtrace."0.3.9".winapi or false then [ (crates.winapi."${deps."backtrace"."0.3.9".winapi}" deps) ] else [])) else []);
-    features = mkFeatures (features."backtrace"."0.3.9" or {});
-  };
-  features_.backtrace."0.3.9" = deps: f: updateFeatures f (rec {
-    backtrace = fold recursiveUpdate {} [
-      { "0.3.9".addr2line =
-        (f.backtrace."0.3.9".addr2line or false) ||
-        (f.backtrace."0.3.9".gimli-symbolize or false) ||
-        (backtrace."0.3.9"."gimli-symbolize" or false); }
-      { "0.3.9".backtrace-sys =
-        (f.backtrace."0.3.9".backtrace-sys or false) ||
-        (f.backtrace."0.3.9".libbacktrace or false) ||
-        (backtrace."0.3.9"."libbacktrace" or false); }
-      { "0.3.9".coresymbolication =
-        (f.backtrace."0.3.9".coresymbolication or false) ||
-        (f.backtrace."0.3.9".default or false) ||
-        (backtrace."0.3.9"."default" or false); }
-      { "0.3.9".dbghelp =
-        (f.backtrace."0.3.9".dbghelp or false) ||
-        (f.backtrace."0.3.9".default or false) ||
-        (backtrace."0.3.9"."default" or false); }
-      { "0.3.9".default = (f.backtrace."0.3.9".default or true); }
-      { "0.3.9".dladdr =
-        (f.backtrace."0.3.9".dladdr or false) ||
-        (f.backtrace."0.3.9".default or false) ||
-        (backtrace."0.3.9"."default" or false); }
-      { "0.3.9".findshlibs =
-        (f.backtrace."0.3.9".findshlibs or false) ||
-        (f.backtrace."0.3.9".gimli-symbolize or false) ||
-        (backtrace."0.3.9"."gimli-symbolize" or false); }
-      { "0.3.9".gimli =
-        (f.backtrace."0.3.9".gimli or false) ||
-        (f.backtrace."0.3.9".gimli-symbolize or false) ||
-        (backtrace."0.3.9"."gimli-symbolize" or false); }
-      { "0.3.9".libbacktrace =
-        (f.backtrace."0.3.9".libbacktrace or false) ||
-        (f.backtrace."0.3.9".default or false) ||
-        (backtrace."0.3.9"."default" or false); }
-      { "0.3.9".libunwind =
-        (f.backtrace."0.3.9".libunwind or false) ||
-        (f.backtrace."0.3.9".default or false) ||
-        (backtrace."0.3.9"."default" or false); }
-      { "0.3.9".memmap =
-        (f.backtrace."0.3.9".memmap or false) ||
-        (f.backtrace."0.3.9".gimli-symbolize or false) ||
-        (backtrace."0.3.9"."gimli-symbolize" or false); }
-      { "0.3.9".object =
-        (f.backtrace."0.3.9".object or false) ||
-        (f.backtrace."0.3.9".gimli-symbolize or false) ||
-        (backtrace."0.3.9"."gimli-symbolize" or false); }
-      { "0.3.9".rustc-serialize =
-        (f.backtrace."0.3.9".rustc-serialize or false) ||
-        (f.backtrace."0.3.9".serialize-rustc or false) ||
-        (backtrace."0.3.9"."serialize-rustc" or false); }
-      { "0.3.9".serde =
-        (f.backtrace."0.3.9".serde or false) ||
-        (f.backtrace."0.3.9".serialize-serde or false) ||
-        (backtrace."0.3.9"."serialize-serde" or false); }
-      { "0.3.9".serde_derive =
-        (f.backtrace."0.3.9".serde_derive or false) ||
-        (f.backtrace."0.3.9".serialize-serde or false) ||
-        (backtrace."0.3.9"."serialize-serde" or false); }
-      { "0.3.9".winapi =
-        (f.backtrace."0.3.9".winapi or false) ||
-        (f.backtrace."0.3.9".dbghelp or false) ||
-        (backtrace."0.3.9"."dbghelp" or false); }
-    ];
-    backtrace_sys."${deps.backtrace."0.3.9".backtrace_sys}".default = true;
-    cfg_if."${deps.backtrace."0.3.9".cfg_if}".default = true;
-    libc."${deps.backtrace."0.3.9".libc}".default = true;
-    rustc_demangle."${deps.backtrace."0.3.9".rustc_demangle}".default = true;
-    winapi = fold recursiveUpdate {} [
-      { "${deps.backtrace."0.3.9".winapi}"."dbghelp" = true; }
-      { "${deps.backtrace."0.3.9".winapi}"."minwindef" = true; }
-      { "${deps.backtrace."0.3.9".winapi}"."processthreadsapi" = true; }
-      { "${deps.backtrace."0.3.9".winapi}"."std" = true; }
-      { "${deps.backtrace."0.3.9".winapi}"."winnt" = true; }
-      { "${deps.backtrace."0.3.9".winapi}".default = true; }
-    ];
-  }) [
-    (features_.cfg_if."${deps."backtrace"."0.3.9"."cfg_if"}" deps)
-    (features_.rustc_demangle."${deps."backtrace"."0.3.9"."rustc_demangle"}" deps)
-    (features_.backtrace_sys."${deps."backtrace"."0.3.9"."backtrace_sys"}" deps)
-    (features_.libc."${deps."backtrace"."0.3.9"."libc"}" deps)
-    (features_.winapi."${deps."backtrace"."0.3.9"."winapi"}" deps)
-  ];
-
-
-# end
-# backtrace-sys-0.1.24
-
-  crates.backtrace_sys."0.1.24" = deps: { features?(features_.backtrace_sys."0.1.24" deps {}) }: buildRustCrate {
-    crateName = "backtrace-sys";
-    version = "0.1.24";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "15d6jlknykiijcin3vqbx33760w24ss5qw3l1xd3hms5k4vc8305";
-    build = "build.rs";
-    dependencies = mapFeatures features ([
-      (crates."libc"."${deps."backtrace_sys"."0.1.24"."libc"}" deps)
-    ]);
-
-    buildDependencies = mapFeatures features ([
-      (crates."cc"."${deps."backtrace_sys"."0.1.24"."cc"}" deps)
-    ]);
-  };
-  features_.backtrace_sys."0.1.24" = deps: f: updateFeatures f ({
-    backtrace_sys."0.1.24".default = (f.backtrace_sys."0.1.24".default or true);
-    cc."${deps.backtrace_sys."0.1.24".cc}".default = true;
-    libc."${deps.backtrace_sys."0.1.24".libc}".default = true;
-  }) [
-    (features_.libc."${deps."backtrace_sys"."0.1.24"."libc"}" deps)
-    (features_.cc."${deps."backtrace_sys"."0.1.24"."cc"}" deps)
-  ];
-
-
-# end
-# backtrace-sys-0.1.28
-
-  crates.backtrace_sys."0.1.28" = deps: { features?(features_.backtrace_sys."0.1.28" deps {}) }: buildRustCrate {
-    crateName = "backtrace-sys";
-    version = "0.1.28";
-    description = "Bindings to the libbacktrace gcc library\n";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "1bbw8chs0wskxwzz7f3yy7mjqhyqj8lslq8pcjw1rbd2g23c34xl";
-    build = "build.rs";
-    dependencies = mapFeatures features ([
-      (crates."libc"."${deps."backtrace_sys"."0.1.28"."libc"}" deps)
-    ]);
-
-    buildDependencies = mapFeatures features ([
-      (crates."cc"."${deps."backtrace_sys"."0.1.28"."cc"}" deps)
-    ]);
-  };
-  features_.backtrace_sys."0.1.28" = deps: f: updateFeatures f ({
-    backtrace_sys."0.1.28".default = (f.backtrace_sys."0.1.28".default or true);
-    cc."${deps.backtrace_sys."0.1.28".cc}".default = true;
-    libc."${deps.backtrace_sys."0.1.28".libc}".default = (f.libc."${deps.backtrace_sys."0.1.28".libc}".default or false);
-  }) [
-    (features_.libc."${deps."backtrace_sys"."0.1.28"."libc"}" deps)
-    (features_.cc."${deps."backtrace_sys"."0.1.28"."cc"}" deps)
-  ];
-
-
-# end
-# bitflags-1.0.4
-
-  crates.bitflags."1.0.4" = deps: { features?(features_.bitflags."1.0.4" deps {}) }: buildRustCrate {
-    crateName = "bitflags";
-    version = "1.0.4";
-    authors = [ "The Rust Project Developers" ];
-    sha256 = "1g1wmz2001qmfrd37dnd5qiss5njrw26aywmg6yhkmkbyrhjxb08";
-    features = mkFeatures (features."bitflags"."1.0.4" or {});
-  };
-  features_.bitflags."1.0.4" = deps: f: updateFeatures f ({
-    bitflags."1.0.4".default = (f.bitflags."1.0.4".default or true);
-  }) [];
-
-
-# end
-# blake2-rfc-0.2.18
-
-  crates.blake2_rfc."0.2.18" = deps: { features?(features_.blake2_rfc."0.2.18" deps {}) }: buildRustCrate {
-    crateName = "blake2-rfc";
-    version = "0.2.18";
-    authors = [ "Cesar Eduardo Barros <cesarb@cesarb.eti.br>" ];
-    sha256 = "0pyqrik4471ljk16prs0iwb2sam39z0z6axyyjxlqxdmf4wprf0l";
-    dependencies = mapFeatures features ([
-      (crates."arrayvec"."${deps."blake2_rfc"."0.2.18"."arrayvec"}" deps)
-      (crates."constant_time_eq"."${deps."blake2_rfc"."0.2.18"."constant_time_eq"}" deps)
-    ]);
-    features = mkFeatures (features."blake2_rfc"."0.2.18" or {});
-  };
-  features_.blake2_rfc."0.2.18" = deps: f: updateFeatures f (rec {
-    arrayvec."${deps.blake2_rfc."0.2.18".arrayvec}".default = (f.arrayvec."${deps.blake2_rfc."0.2.18".arrayvec}".default or false);
-    blake2_rfc = fold recursiveUpdate {} [
-      { "0.2.18".default = (f.blake2_rfc."0.2.18".default or true); }
-      { "0.2.18".simd =
-        (f.blake2_rfc."0.2.18".simd or false) ||
-        (f.blake2_rfc."0.2.18".simd_opt or false) ||
-        (blake2_rfc."0.2.18"."simd_opt" or false); }
-      { "0.2.18".simd_opt =
-        (f.blake2_rfc."0.2.18".simd_opt or false) ||
-        (f.blake2_rfc."0.2.18".simd_asm or false) ||
-        (blake2_rfc."0.2.18"."simd_asm" or false); }
-      { "0.2.18".std =
-        (f.blake2_rfc."0.2.18".std or false) ||
-        (f.blake2_rfc."0.2.18".default or false) ||
-        (blake2_rfc."0.2.18"."default" or false); }
-    ];
-    constant_time_eq."${deps.blake2_rfc."0.2.18".constant_time_eq}".default = true;
-  }) [
-    (features_.arrayvec."${deps."blake2_rfc"."0.2.18"."arrayvec"}" deps)
-    (features_.constant_time_eq."${deps."blake2_rfc"."0.2.18"."constant_time_eq"}" deps)
-  ];
-
-
-# end
-# carnix-0.10.0
-
-  crates.carnix."0.10.0" = deps: { features?(features_.carnix."0.10.0" deps {}) }: buildRustCrate {
-    crateName = "carnix";
-    version = "0.10.0";
-    description = "Generate Nix expressions from Cargo.lock files (in order to use Nix as a build system for crates).";
-    authors = [ "pe@pijul.org <pe@pijul.org>" ];
-    sha256 = "0hrp22yvrqnhaanr0ckrwihx9j3irhzd2cmb19sp49ksdi25d8ri";
-    crateBin =
-      [{  name = "cargo-generate-nixfile";  path = "src/cargo-generate-nixfile.rs"; }] ++
-      [{  name = "carnix";  path = "src/main.rs"; }];
-    dependencies = mapFeatures features ([
-      (crates."clap"."${deps."carnix"."0.10.0"."clap"}" deps)
-      (crates."dirs"."${deps."carnix"."0.10.0"."dirs"}" deps)
-      (crates."env_logger"."${deps."carnix"."0.10.0"."env_logger"}" deps)
-      (crates."failure"."${deps."carnix"."0.10.0"."failure"}" deps)
-      (crates."failure_derive"."${deps."carnix"."0.10.0"."failure_derive"}" deps)
-      (crates."itertools"."${deps."carnix"."0.10.0"."itertools"}" deps)
-      (crates."log"."${deps."carnix"."0.10.0"."log"}" deps)
-      (crates."nom"."${deps."carnix"."0.10.0"."nom"}" deps)
-      (crates."regex"."${deps."carnix"."0.10.0"."regex"}" deps)
-      (crates."serde"."${deps."carnix"."0.10.0"."serde"}" deps)
-      (crates."serde_derive"."${deps."carnix"."0.10.0"."serde_derive"}" deps)
-      (crates."serde_json"."${deps."carnix"."0.10.0"."serde_json"}" deps)
-      (crates."tempdir"."${deps."carnix"."0.10.0"."tempdir"}" deps)
-      (crates."toml"."${deps."carnix"."0.10.0"."toml"}" deps)
-      (crates."url"."${deps."carnix"."0.10.0"."url"}" deps)
-    ]);
-  };
-  features_.carnix."0.10.0" = deps: f: updateFeatures f ({
-    carnix."0.10.0".default = (f.carnix."0.10.0".default or true);
-    clap."${deps.carnix."0.10.0".clap}".default = true;
-    dirs."${deps.carnix."0.10.0".dirs}".default = true;
-    env_logger."${deps.carnix."0.10.0".env_logger}".default = true;
-    failure."${deps.carnix."0.10.0".failure}".default = true;
-    failure_derive."${deps.carnix."0.10.0".failure_derive}".default = true;
-    itertools."${deps.carnix."0.10.0".itertools}".default = true;
-    log."${deps.carnix."0.10.0".log}".default = true;
-    nom."${deps.carnix."0.10.0".nom}".default = true;
-    regex."${deps.carnix."0.10.0".regex}".default = true;
-    serde."${deps.carnix."0.10.0".serde}".default = true;
-    serde_derive."${deps.carnix."0.10.0".serde_derive}".default = true;
-    serde_json."${deps.carnix."0.10.0".serde_json}".default = true;
-    tempdir."${deps.carnix."0.10.0".tempdir}".default = true;
-    toml."${deps.carnix."0.10.0".toml}".default = true;
-    url."${deps.carnix."0.10.0".url}".default = true;
-  }) [
-    (features_.clap."${deps."carnix"."0.10.0"."clap"}" deps)
-    (features_.dirs."${deps."carnix"."0.10.0"."dirs"}" deps)
-    (features_.env_logger."${deps."carnix"."0.10.0"."env_logger"}" deps)
-    (features_.failure."${deps."carnix"."0.10.0"."failure"}" deps)
-    (features_.failure_derive."${deps."carnix"."0.10.0"."failure_derive"}" deps)
-    (features_.itertools."${deps."carnix"."0.10.0"."itertools"}" deps)
-    (features_.log."${deps."carnix"."0.10.0"."log"}" deps)
-    (features_.nom."${deps."carnix"."0.10.0"."nom"}" deps)
-    (features_.regex."${deps."carnix"."0.10.0"."regex"}" deps)
-    (features_.serde."${deps."carnix"."0.10.0"."serde"}" deps)
-    (features_.serde_derive."${deps."carnix"."0.10.0"."serde_derive"}" deps)
-    (features_.serde_json."${deps."carnix"."0.10.0"."serde_json"}" deps)
-    (features_.tempdir."${deps."carnix"."0.10.0"."tempdir"}" deps)
-    (features_.toml."${deps."carnix"."0.10.0"."toml"}" deps)
-    (features_.url."${deps."carnix"."0.10.0"."url"}" deps)
-  ];
-
-
-# end
-# carnix-0.9.1
-
-  crates.carnix."0.9.1" = deps: { features?(features_.carnix."0.9.1" deps {}) }: buildRustCrate {
-    crateName = "carnix";
-    version = "0.9.1";
-    authors = [ "pe@pijul.org <pe@pijul.org>" ];
-    sha256 = "0dn292d4mjlxif0kclrljzff8rm35cd9d92vycjbzklyhz5d62wi";
-    crateBin =
-      [{  name = "cargo-generate-nixfile";  path = "src/cargo-generate-nixfile.rs"; }] ++
-      [{  name = "carnix";  path = "src/main.rs"; }];
-    dependencies = mapFeatures features ([
-      (crates."clap"."${deps."carnix"."0.9.1"."clap"}" deps)
-      (crates."dirs"."${deps."carnix"."0.9.1"."dirs"}" deps)
-      (crates."env_logger"."${deps."carnix"."0.9.1"."env_logger"}" deps)
-      (crates."error_chain"."${deps."carnix"."0.9.1"."error_chain"}" deps)
-      (crates."itertools"."${deps."carnix"."0.9.1"."itertools"}" deps)
-      (crates."log"."${deps."carnix"."0.9.1"."log"}" deps)
-      (crates."nom"."${deps."carnix"."0.9.1"."nom"}" deps)
-      (crates."regex"."${deps."carnix"."0.9.1"."regex"}" deps)
-      (crates."serde"."${deps."carnix"."0.9.1"."serde"}" deps)
-      (crates."serde_derive"."${deps."carnix"."0.9.1"."serde_derive"}" deps)
-      (crates."serde_json"."${deps."carnix"."0.9.1"."serde_json"}" deps)
-      (crates."tempdir"."${deps."carnix"."0.9.1"."tempdir"}" deps)
-      (crates."toml"."${deps."carnix"."0.9.1"."toml"}" deps)
-    ]);
-  };
-  features_.carnix."0.9.1" = deps: f: updateFeatures f ({
-    carnix."0.9.1".default = (f.carnix."0.9.1".default or true);
-    clap."${deps.carnix."0.9.1".clap}".default = true;
-    dirs."${deps.carnix."0.9.1".dirs}".default = true;
-    env_logger."${deps.carnix."0.9.1".env_logger}".default = true;
-    error_chain."${deps.carnix."0.9.1".error_chain}".default = true;
-    itertools."${deps.carnix."0.9.1".itertools}".default = true;
-    log."${deps.carnix."0.9.1".log}".default = true;
-    nom."${deps.carnix."0.9.1".nom}".default = true;
-    regex."${deps.carnix."0.9.1".regex}".default = true;
-    serde."${deps.carnix."0.9.1".serde}".default = true;
-    serde_derive."${deps.carnix."0.9.1".serde_derive}".default = true;
-    serde_json."${deps.carnix."0.9.1".serde_json}".default = true;
-    tempdir."${deps.carnix."0.9.1".tempdir}".default = true;
-    toml."${deps.carnix."0.9.1".toml}".default = true;
-  }) [
-    (features_.clap."${deps."carnix"."0.9.1"."clap"}" deps)
-    (features_.dirs."${deps."carnix"."0.9.1"."dirs"}" deps)
-    (features_.env_logger."${deps."carnix"."0.9.1"."env_logger"}" deps)
-    (features_.error_chain."${deps."carnix"."0.9.1"."error_chain"}" deps)
-    (features_.itertools."${deps."carnix"."0.9.1"."itertools"}" deps)
-    (features_.log."${deps."carnix"."0.9.1"."log"}" deps)
-    (features_.nom."${deps."carnix"."0.9.1"."nom"}" deps)
-    (features_.regex."${deps."carnix"."0.9.1"."regex"}" deps)
-    (features_.serde."${deps."carnix"."0.9.1"."serde"}" deps)
-    (features_.serde_derive."${deps."carnix"."0.9.1"."serde_derive"}" deps)
-    (features_.serde_json."${deps."carnix"."0.9.1"."serde_json"}" deps)
-    (features_.tempdir."${deps."carnix"."0.9.1"."tempdir"}" deps)
-    (features_.toml."${deps."carnix"."0.9.1"."toml"}" deps)
-  ];
-
-
-# end
-# carnix-0.9.2
-
-  crates.carnix."0.9.2" = deps: { features?(features_.carnix."0.9.2" deps {}) }: buildRustCrate {
-    crateName = "carnix";
-    version = "0.9.2";
-    authors = [ "pe@pijul.org <pe@pijul.org>" ];
-    sha256 = "1r668rjqcwsxjpz2hrr7j3k099c1xsb8vfq1w7y1ps9hap9af42z";
-    crateBin =
-      [{  name = "cargo-generate-nixfile";  path = "src/cargo-generate-nixfile.rs"; }] ++
-      [{  name = "carnix";  path = "src/main.rs"; }];
-    dependencies = mapFeatures features ([
-      (crates."clap"."${deps."carnix"."0.9.2"."clap"}" deps)
-      (crates."dirs"."${deps."carnix"."0.9.2"."dirs"}" deps)
-      (crates."env_logger"."${deps."carnix"."0.9.2"."env_logger"}" deps)
-      (crates."error_chain"."${deps."carnix"."0.9.2"."error_chain"}" deps)
-      (crates."itertools"."${deps."carnix"."0.9.2"."itertools"}" deps)
-      (crates."log"."${deps."carnix"."0.9.2"."log"}" deps)
-      (crates."nom"."${deps."carnix"."0.9.2"."nom"}" deps)
-      (crates."regex"."${deps."carnix"."0.9.2"."regex"}" deps)
-      (crates."serde"."${deps."carnix"."0.9.2"."serde"}" deps)
-      (crates."serde_derive"."${deps."carnix"."0.9.2"."serde_derive"}" deps)
-      (crates."serde_json"."${deps."carnix"."0.9.2"."serde_json"}" deps)
-      (crates."tempdir"."${deps."carnix"."0.9.2"."tempdir"}" deps)
-      (crates."toml"."${deps."carnix"."0.9.2"."toml"}" deps)
-    ]);
-  };
-  features_.carnix."0.9.2" = deps: f: updateFeatures f ({
-    carnix."0.9.2".default = (f.carnix."0.9.2".default or true);
-    clap."${deps.carnix."0.9.2".clap}".default = true;
-    dirs."${deps.carnix."0.9.2".dirs}".default = true;
-    env_logger."${deps.carnix."0.9.2".env_logger}".default = true;
-    error_chain."${deps.carnix."0.9.2".error_chain}".default = true;
-    itertools."${deps.carnix."0.9.2".itertools}".default = true;
-    log."${deps.carnix."0.9.2".log}".default = true;
-    nom."${deps.carnix."0.9.2".nom}".default = true;
-    regex."${deps.carnix."0.9.2".regex}".default = true;
-    serde."${deps.carnix."0.9.2".serde}".default = true;
-    serde_derive."${deps.carnix."0.9.2".serde_derive}".default = true;
-    serde_json."${deps.carnix."0.9.2".serde_json}".default = true;
-    tempdir."${deps.carnix."0.9.2".tempdir}".default = true;
-    toml."${deps.carnix."0.9.2".toml}".default = true;
-  }) [
-    (features_.clap."${deps."carnix"."0.9.2"."clap"}" deps)
-    (features_.dirs."${deps."carnix"."0.9.2"."dirs"}" deps)
-    (features_.env_logger."${deps."carnix"."0.9.2"."env_logger"}" deps)
-    (features_.error_chain."${deps."carnix"."0.9.2"."error_chain"}" deps)
-    (features_.itertools."${deps."carnix"."0.9.2"."itertools"}" deps)
-    (features_.log."${deps."carnix"."0.9.2"."log"}" deps)
-    (features_.nom."${deps."carnix"."0.9.2"."nom"}" deps)
-    (features_.regex."${deps."carnix"."0.9.2"."regex"}" deps)
-    (features_.serde."${deps."carnix"."0.9.2"."serde"}" deps)
-    (features_.serde_derive."${deps."carnix"."0.9.2"."serde_derive"}" deps)
-    (features_.serde_json."${deps."carnix"."0.9.2"."serde_json"}" deps)
-    (features_.tempdir."${deps."carnix"."0.9.2"."tempdir"}" deps)
-    (features_.toml."${deps."carnix"."0.9.2"."toml"}" deps)
-  ];
-
-
-# end
-# carnix-0.9.8
-
-  crates.carnix."0.9.8" = deps: { features?(features_.carnix."0.9.8" deps {}) }: buildRustCrate {
-    crateName = "carnix";
-    version = "0.9.8";
-    authors = [ "pe@pijul.org <pe@pijul.org>" ];
-    sha256 = "0c2k98qjm1yyx5wl0wqs0rrjczp6h62ri1x8a99442clxsyvp4n9";
-    crateBin =
-      [{  name = "cargo-generate-nixfile";  path = "src/cargo-generate-nixfile.rs"; }] ++
-      [{  name = "carnix";  path = "src/main.rs"; }];
-    dependencies = mapFeatures features ([
-      (crates."clap"."${deps."carnix"."0.9.8"."clap"}" deps)
-      (crates."dirs"."${deps."carnix"."0.9.8"."dirs"}" deps)
-      (crates."env_logger"."${deps."carnix"."0.9.8"."env_logger"}" deps)
-      (crates."error_chain"."${deps."carnix"."0.9.8"."error_chain"}" deps)
-      (crates."itertools"."${deps."carnix"."0.9.8"."itertools"}" deps)
-      (crates."log"."${deps."carnix"."0.9.8"."log"}" deps)
-      (crates."nom"."${deps."carnix"."0.9.8"."nom"}" deps)
-      (crates."regex"."${deps."carnix"."0.9.8"."regex"}" deps)
-      (crates."serde"."${deps."carnix"."0.9.8"."serde"}" deps)
-      (crates."serde_derive"."${deps."carnix"."0.9.8"."serde_derive"}" deps)
-      (crates."serde_json"."${deps."carnix"."0.9.8"."serde_json"}" deps)
-      (crates."tempdir"."${deps."carnix"."0.9.8"."tempdir"}" deps)
-      (crates."toml"."${deps."carnix"."0.9.8"."toml"}" deps)
-      (crates."url"."${deps."carnix"."0.9.8"."url"}" deps)
-    ]);
-  };
-  features_.carnix."0.9.8" = deps: f: updateFeatures f ({
-    carnix."0.9.8".default = (f.carnix."0.9.8".default or true);
-    clap."${deps.carnix."0.9.8".clap}".default = true;
-    dirs."${deps.carnix."0.9.8".dirs}".default = true;
-    env_logger."${deps.carnix."0.9.8".env_logger}".default = true;
-    error_chain."${deps.carnix."0.9.8".error_chain}".default = true;
-    itertools."${deps.carnix."0.9.8".itertools}".default = true;
-    log."${deps.carnix."0.9.8".log}".default = true;
-    nom."${deps.carnix."0.9.8".nom}".default = true;
-    regex."${deps.carnix."0.9.8".regex}".default = true;
-    serde."${deps.carnix."0.9.8".serde}".default = true;
-    serde_derive."${deps.carnix."0.9.8".serde_derive}".default = true;
-    serde_json."${deps.carnix."0.9.8".serde_json}".default = true;
-    tempdir."${deps.carnix."0.9.8".tempdir}".default = true;
-    toml."${deps.carnix."0.9.8".toml}".default = true;
-    url."${deps.carnix."0.9.8".url}".default = true;
-  }) [
-    (features_.clap."${deps."carnix"."0.9.8"."clap"}" deps)
-    (features_.dirs."${deps."carnix"."0.9.8"."dirs"}" deps)
-    (features_.env_logger."${deps."carnix"."0.9.8"."env_logger"}" deps)
-    (features_.error_chain."${deps."carnix"."0.9.8"."error_chain"}" deps)
-    (features_.itertools."${deps."carnix"."0.9.8"."itertools"}" deps)
-    (features_.log."${deps."carnix"."0.9.8"."log"}" deps)
-    (features_.nom."${deps."carnix"."0.9.8"."nom"}" deps)
-    (features_.regex."${deps."carnix"."0.9.8"."regex"}" deps)
-    (features_.serde."${deps."carnix"."0.9.8"."serde"}" deps)
-    (features_.serde_derive."${deps."carnix"."0.9.8"."serde_derive"}" deps)
-    (features_.serde_json."${deps."carnix"."0.9.8"."serde_json"}" deps)
-    (features_.tempdir."${deps."carnix"."0.9.8"."tempdir"}" deps)
-    (features_.toml."${deps."carnix"."0.9.8"."toml"}" deps)
-    (features_.url."${deps."carnix"."0.9.8"."url"}" deps)
-  ];
-
-
-# end
-# cc-1.0.25
-
-  crates.cc."1.0.25" = deps: { features?(features_.cc."1.0.25" deps {}) }: buildRustCrate {
-    crateName = "cc";
-    version = "1.0.25";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "0pd8fhjlpr5qan984frkf1c8nxrqp6827wmmfzhm2840229z2hq0";
-    dependencies = mapFeatures features ([
-]);
-    features = mkFeatures (features."cc"."1.0.25" or {});
-  };
-  features_.cc."1.0.25" = deps: f: updateFeatures f (rec {
-    cc = fold recursiveUpdate {} [
-      { "1.0.25".default = (f.cc."1.0.25".default or true); }
-      { "1.0.25".rayon =
-        (f.cc."1.0.25".rayon or false) ||
-        (f.cc."1.0.25".parallel or false) ||
-        (cc."1.0.25"."parallel" or false); }
-    ];
-  }) [];
-
-
-# end
-# cc-1.0.32
-
-  crates.cc."1.0.32" = deps: { features?(features_.cc."1.0.32" deps {}) }: buildRustCrate {
-    crateName = "cc";
-    version = "1.0.32";
-    description = "A build-time dependency for Cargo build scripts to assist in invoking the native\nC compiler to compile native C code into a static archive to be linked into Rust\ncode.\n";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "0mq4ma94yis74dnn98w2wkaad195dr6qwlma4fs590xiv0j15ldx";
-    dependencies = mapFeatures features ([
-]);
-    features = mkFeatures (features."cc"."1.0.32" or {});
-  };
-  features_.cc."1.0.32" = deps: f: updateFeatures f (rec {
-    cc = fold recursiveUpdate {} [
-      { "1.0.32"."rayon" =
-        (f.cc."1.0.32"."rayon" or false) ||
-        (f.cc."1.0.32".parallel or false) ||
-        (cc."1.0.32"."parallel" or false); }
-      { "1.0.32".default = (f.cc."1.0.32".default or true); }
-    ];
-  }) [];
-
-
-# end
-# cfg-if-0.1.6
-
-  crates.cfg_if."0.1.6" = deps: { features?(features_.cfg_if."0.1.6" deps {}) }: buildRustCrate {
-    crateName = "cfg-if";
-    version = "0.1.6";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "11qrix06wagkplyk908i3423ps9m9np6c4vbcq81s9fyl244xv3n";
-  };
-  features_.cfg_if."0.1.6" = deps: f: updateFeatures f ({
-    cfg_if."0.1.6".default = (f.cfg_if."0.1.6".default or true);
-  }) [];
-
-
-# end
-# cfg-if-0.1.7
-
-  crates.cfg_if."0.1.7" = deps: { features?(features_.cfg_if."0.1.7" deps {}) }: buildRustCrate {
-    crateName = "cfg-if";
-    version = "0.1.7";
-    description = "A macro to ergonomically define an item depending on a large number of #[cfg]\nparameters. Structured like an if-else chain, the first matching branch is the\nitem that gets emitted.\n";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "13gvcx1dxjq4mpmpj26hpg3yc97qffkx2zi58ykr1dwr8q2biiig";
-  };
-  features_.cfg_if."0.1.7" = deps: f: updateFeatures f ({
-    cfg_if."0.1.7".default = (f.cfg_if."0.1.7".default or true);
-  }) [];
-
-
-# end
-# clap-2.32.0
-
-  crates.clap."2.32.0" = deps: { features?(features_.clap."2.32.0" deps {}) }: buildRustCrate {
-    crateName = "clap";
-    version = "2.32.0";
-    authors = [ "Kevin K. <kbknapp@gmail.com>" ];
-    sha256 = "1hdjf0janvpjkwrjdjx1mm2aayzr54k72w6mriyr0n5anjkcj1lx";
-    dependencies = mapFeatures features ([
-      (crates."bitflags"."${deps."clap"."2.32.0"."bitflags"}" deps)
-      (crates."textwrap"."${deps."clap"."2.32.0"."textwrap"}" deps)
-      (crates."unicode_width"."${deps."clap"."2.32.0"."unicode_width"}" deps)
-    ]
-      ++ (if features.clap."2.32.0".atty or false then [ (crates.atty."${deps."clap"."2.32.0".atty}" deps) ] else [])
-      ++ (if features.clap."2.32.0".strsim or false then [ (crates.strsim."${deps."clap"."2.32.0".strsim}" deps) ] else [])
-      ++ (if features.clap."2.32.0".vec_map or false then [ (crates.vec_map."${deps."clap"."2.32.0".vec_map}" deps) ] else []))
-      ++ (if !(kernel == "windows") then mapFeatures features ([
-    ]
-      ++ (if features.clap."2.32.0".ansi_term or false then [ (crates.ansi_term."${deps."clap"."2.32.0".ansi_term}" deps) ] else [])) else []);
-    features = mkFeatures (features."clap"."2.32.0" or {});
-  };
-  features_.clap."2.32.0" = deps: f: updateFeatures f (rec {
-    ansi_term."${deps.clap."2.32.0".ansi_term}".default = true;
-    atty."${deps.clap."2.32.0".atty}".default = true;
-    bitflags."${deps.clap."2.32.0".bitflags}".default = true;
-    clap = fold recursiveUpdate {} [
-      { "2.32.0".ansi_term =
-        (f.clap."2.32.0".ansi_term or false) ||
-        (f.clap."2.32.0".color or false) ||
-        (clap."2.32.0"."color" or false); }
-      { "2.32.0".atty =
-        (f.clap."2.32.0".atty or false) ||
-        (f.clap."2.32.0".color or false) ||
-        (clap."2.32.0"."color" or false); }
-      { "2.32.0".clippy =
-        (f.clap."2.32.0".clippy or false) ||
-        (f.clap."2.32.0".lints or false) ||
-        (clap."2.32.0"."lints" or false); }
-      { "2.32.0".color =
-        (f.clap."2.32.0".color or false) ||
-        (f.clap."2.32.0".default or false) ||
-        (clap."2.32.0"."default" or false); }
-      { "2.32.0".default = (f.clap."2.32.0".default or true); }
-      { "2.32.0".strsim =
-        (f.clap."2.32.0".strsim or false) ||
-        (f.clap."2.32.0".suggestions or false) ||
-        (clap."2.32.0"."suggestions" or false); }
-      { "2.32.0".suggestions =
-        (f.clap."2.32.0".suggestions or false) ||
-        (f.clap."2.32.0".default or false) ||
-        (clap."2.32.0"."default" or false); }
-      { "2.32.0".term_size =
-        (f.clap."2.32.0".term_size or false) ||
-        (f.clap."2.32.0".wrap_help or false) ||
-        (clap."2.32.0"."wrap_help" or false); }
-      { "2.32.0".vec_map =
-        (f.clap."2.32.0".vec_map or false) ||
-        (f.clap."2.32.0".default or false) ||
-        (clap."2.32.0"."default" or false); }
-      { "2.32.0".yaml =
-        (f.clap."2.32.0".yaml or false) ||
-        (f.clap."2.32.0".doc or false) ||
-        (clap."2.32.0"."doc" or false); }
-      { "2.32.0".yaml-rust =
-        (f.clap."2.32.0".yaml-rust or false) ||
-        (f.clap."2.32.0".yaml or false) ||
-        (clap."2.32.0"."yaml" or false); }
-    ];
-    strsim."${deps.clap."2.32.0".strsim}".default = true;
-    textwrap = fold recursiveUpdate {} [
-      { "${deps.clap."2.32.0".textwrap}"."term_size" =
-        (f.textwrap."${deps.clap."2.32.0".textwrap}"."term_size" or false) ||
-        (clap."2.32.0"."wrap_help" or false) ||
-        (f."clap"."2.32.0"."wrap_help" or false); }
-      { "${deps.clap."2.32.0".textwrap}".default = true; }
-    ];
-    unicode_width."${deps.clap."2.32.0".unicode_width}".default = true;
-    vec_map."${deps.clap."2.32.0".vec_map}".default = true;
-  }) [
-    (features_.atty."${deps."clap"."2.32.0"."atty"}" deps)
-    (features_.bitflags."${deps."clap"."2.32.0"."bitflags"}" deps)
-    (features_.strsim."${deps."clap"."2.32.0"."strsim"}" deps)
-    (features_.textwrap."${deps."clap"."2.32.0"."textwrap"}" deps)
-    (features_.unicode_width."${deps."clap"."2.32.0"."unicode_width"}" deps)
-    (features_.vec_map."${deps."clap"."2.32.0"."vec_map"}" deps)
-    (features_.ansi_term."${deps."clap"."2.32.0"."ansi_term"}" deps)
-  ];
-
-
-# end
-# cloudabi-0.0.3
-
-  crates.cloudabi."0.0.3" = deps: { features?(features_.cloudabi."0.0.3" deps {}) }: buildRustCrate {
-    crateName = "cloudabi";
-    version = "0.0.3";
-    description = "Low level interface to CloudABI. Contains all syscalls and related types.";
-    authors = [ "Nuxi (https://nuxi.nl/) and contributors" ];
-    sha256 = "1z9lby5sr6vslfd14d6igk03s7awf91mxpsfmsp3prxbxlk0x7h5";
-    libPath = "cloudabi.rs";
-    dependencies = mapFeatures features ([
-    ]
-      ++ (if features.cloudabi."0.0.3".bitflags or false then [ (crates.bitflags."${deps."cloudabi"."0.0.3".bitflags}" deps) ] else []));
-    features = mkFeatures (features."cloudabi"."0.0.3" or {});
-  };
-  features_.cloudabi."0.0.3" = deps: f: updateFeatures f (rec {
-    bitflags."${deps.cloudabi."0.0.3".bitflags}".default = true;
-    cloudabi = fold recursiveUpdate {} [
-      { "0.0.3"."bitflags" =
-        (f.cloudabi."0.0.3"."bitflags" or false) ||
-        (f.cloudabi."0.0.3".default or false) ||
-        (cloudabi."0.0.3"."default" or false); }
-      { "0.0.3".default = (f.cloudabi."0.0.3".default or true); }
-    ];
-  }) [
-    (features_.bitflags."${deps."cloudabi"."0.0.3"."bitflags"}" deps)
-  ];
-
-
-# end
-# constant_time_eq-0.1.3
-
-  crates.constant_time_eq."0.1.3" = deps: { features?(features_.constant_time_eq."0.1.3" deps {}) }: buildRustCrate {
-    crateName = "constant_time_eq";
-    version = "0.1.3";
-    authors = [ "Cesar Eduardo Barros <cesarb@cesarb.eti.br>" ];
-    sha256 = "03qri9hjf049gwqg9q527lybpg918q6y5q4g9a5lma753nff49wd";
-  };
-  features_.constant_time_eq."0.1.3" = deps: f: updateFeatures f ({
-    constant_time_eq."0.1.3".default = (f.constant_time_eq."0.1.3".default or true);
-  }) [];
-
-
-# end
-# dirs-1.0.4
-
-  crates.dirs."1.0.4" = deps: { features?(features_.dirs."1.0.4" deps {}) }: buildRustCrate {
-    crateName = "dirs";
-    version = "1.0.4";
-    authors = [ "Simon Ochsenreither <simon@ochsenreither.de>" ];
-    sha256 = "1hp3nz0350b0gpavb3w5ajqc9l1k59cfrcsr3hcavwlkizdnpv1y";
-    dependencies = (if kernel == "redox" then mapFeatures features ([
-      (crates."redox_users"."${deps."dirs"."1.0.4"."redox_users"}" deps)
-    ]) else [])
-      ++ (if (kernel == "linux" || kernel == "darwin") then mapFeatures features ([
-      (crates."libc"."${deps."dirs"."1.0.4"."libc"}" deps)
-    ]) else [])
-      ++ (if kernel == "windows" then mapFeatures features ([
-      (crates."winapi"."${deps."dirs"."1.0.4"."winapi"}" deps)
-    ]) else []);
-  };
-  features_.dirs."1.0.4" = deps: f: updateFeatures f ({
-    dirs."1.0.4".default = (f.dirs."1.0.4".default or true);
-    libc."${deps.dirs."1.0.4".libc}".default = true;
-    redox_users."${deps.dirs."1.0.4".redox_users}".default = true;
-    winapi = fold recursiveUpdate {} [
-      { "${deps.dirs."1.0.4".winapi}"."knownfolders" = true; }
-      { "${deps.dirs."1.0.4".winapi}"."objbase" = true; }
-      { "${deps.dirs."1.0.4".winapi}"."shlobj" = true; }
-      { "${deps.dirs."1.0.4".winapi}"."winbase" = true; }
-      { "${deps.dirs."1.0.4".winapi}"."winerror" = true; }
-      { "${deps.dirs."1.0.4".winapi}".default = true; }
-    ];
-  }) [
-    (features_.redox_users."${deps."dirs"."1.0.4"."redox_users"}" deps)
-    (features_.libc."${deps."dirs"."1.0.4"."libc"}" deps)
-    (features_.winapi."${deps."dirs"."1.0.4"."winapi"}" deps)
-  ];
-
-
-# end
-# dirs-1.0.5
-
-  crates.dirs."1.0.5" = deps: { features?(features_.dirs."1.0.5" deps {}) }: buildRustCrate {
-    crateName = "dirs";
-    version = "1.0.5";
-    description = "A tiny low-level library that provides platform-specific standard locations of directories for config, cache and other data on Linux, Windows, macOS and Redox by leveraging the mechanisms defined by the XDG base/user directory specifications on Linux, the Known Folder API on Windows, and the Standard Directory guidelines on macOS.";
-    authors = [ "Simon Ochsenreither <simon@ochsenreither.de>" ];
-    sha256 = "1py68zwwrhlj5vbz9f9ansjmhc8y4gs5bpamw9ycmqz030pprwf3";
-    dependencies = (if kernel == "redox" then mapFeatures features ([
-      (crates."redox_users"."${deps."dirs"."1.0.5"."redox_users"}" deps)
-    ]) else [])
-      ++ (if (kernel == "linux" || kernel == "darwin") then mapFeatures features ([
-      (crates."libc"."${deps."dirs"."1.0.5"."libc"}" deps)
-    ]) else [])
-      ++ (if kernel == "windows" then mapFeatures features ([
-      (crates."winapi"."${deps."dirs"."1.0.5"."winapi"}" deps)
-    ]) else []);
-  };
-  features_.dirs."1.0.5" = deps: f: updateFeatures f ({
-    dirs."1.0.5".default = (f.dirs."1.0.5".default or true);
-    libc."${deps.dirs."1.0.5".libc}".default = true;
-    redox_users."${deps.dirs."1.0.5".redox_users}".default = true;
-    winapi = fold recursiveUpdate {} [
-      { "${deps.dirs."1.0.5".winapi}"."knownfolders" = true; }
-      { "${deps.dirs."1.0.5".winapi}"."objbase" = true; }
-      { "${deps.dirs."1.0.5".winapi}"."shlobj" = true; }
-      { "${deps.dirs."1.0.5".winapi}"."winbase" = true; }
-      { "${deps.dirs."1.0.5".winapi}"."winerror" = true; }
-      { "${deps.dirs."1.0.5".winapi}".default = true; }
-    ];
-  }) [
-    (features_.redox_users."${deps."dirs"."1.0.5"."redox_users"}" deps)
-    (features_.libc."${deps."dirs"."1.0.5"."libc"}" deps)
-    (features_.winapi."${deps."dirs"."1.0.5"."winapi"}" deps)
-  ];
-
-
-# end
-# either-1.5.0
-
-  crates.either."1.5.0" = deps: { features?(features_.either."1.5.0" deps {}) }: buildRustCrate {
-    crateName = "either";
-    version = "1.5.0";
-    authors = [ "bluss" ];
-    sha256 = "1f7kl2ln01y02m8fpd2zrdjiwqmgfvl9nxxrfry3k19d1gd2bsvz";
-    dependencies = mapFeatures features ([
-]);
-    features = mkFeatures (features."either"."1.5.0" or {});
-  };
-  features_.either."1.5.0" = deps: f: updateFeatures f (rec {
-    either = fold recursiveUpdate {} [
-      { "1.5.0".default = (f.either."1.5.0".default or true); }
-      { "1.5.0".use_std =
-        (f.either."1.5.0".use_std or false) ||
-        (f.either."1.5.0".default or false) ||
-        (either."1.5.0"."default" or false); }
-    ];
-  }) [];
-
-
-# end
-# either-1.5.1
-
-  crates.either."1.5.1" = deps: { features?(features_.either."1.5.1" deps {}) }: buildRustCrate {
-    crateName = "either";
-    version = "1.5.1";
-    description = "The enum `Either` with variants `Left` and `Right` is a general purpose sum type with two cases.\n";
-    authors = [ "bluss" ];
-    sha256 = "049dmvnyrrhf0fw955jrfazdapdl84x32grwwxllh8in39yv3783";
-    dependencies = mapFeatures features ([
-]);
-    features = mkFeatures (features."either"."1.5.1" or {});
-  };
-  features_.either."1.5.1" = deps: f: updateFeatures f (rec {
-    either = fold recursiveUpdate {} [
-      { "1.5.1"."use_std" =
-        (f.either."1.5.1"."use_std" or false) ||
-        (f.either."1.5.1".default or false) ||
-        (either."1.5.1"."default" or false); }
-      { "1.5.1".default = (f.either."1.5.1".default or true); }
-    ];
-  }) [];
-
-
-# end
-# env_logger-0.5.13
-
-  crates.env_logger."0.5.13" = deps: { features?(features_.env_logger."0.5.13" deps {}) }: buildRustCrate {
-    crateName = "env_logger";
-    version = "0.5.13";
-    authors = [ "The Rust Project Developers" ];
-    sha256 = "1q6vylngcz4bn088b4hvsl879l8yz1k2bma75waljb5p4h4kbb72";
-    dependencies = mapFeatures features ([
-      (crates."atty"."${deps."env_logger"."0.5.13"."atty"}" deps)
-      (crates."humantime"."${deps."env_logger"."0.5.13"."humantime"}" deps)
-      (crates."log"."${deps."env_logger"."0.5.13"."log"}" deps)
-      (crates."termcolor"."${deps."env_logger"."0.5.13"."termcolor"}" deps)
-    ]
-      ++ (if features.env_logger."0.5.13".regex or false then [ (crates.regex."${deps."env_logger"."0.5.13".regex}" deps) ] else []));
-    features = mkFeatures (features."env_logger"."0.5.13" or {});
-  };
-  features_.env_logger."0.5.13" = deps: f: updateFeatures f (rec {
-    atty."${deps.env_logger."0.5.13".atty}".default = true;
-    env_logger = fold recursiveUpdate {} [
-      { "0.5.13".default = (f.env_logger."0.5.13".default or true); }
-      { "0.5.13".regex =
-        (f.env_logger."0.5.13".regex or false) ||
-        (f.env_logger."0.5.13".default or false) ||
-        (env_logger."0.5.13"."default" or false); }
-    ];
-    humantime."${deps.env_logger."0.5.13".humantime}".default = true;
-    log = fold recursiveUpdate {} [
-      { "${deps.env_logger."0.5.13".log}"."std" = true; }
-      { "${deps.env_logger."0.5.13".log}".default = true; }
-    ];
-    regex."${deps.env_logger."0.5.13".regex}".default = true;
-    termcolor."${deps.env_logger."0.5.13".termcolor}".default = true;
-  }) [
-    (features_.atty."${deps."env_logger"."0.5.13"."atty"}" deps)
-    (features_.humantime."${deps."env_logger"."0.5.13"."humantime"}" deps)
-    (features_.log."${deps."env_logger"."0.5.13"."log"}" deps)
-    (features_.regex."${deps."env_logger"."0.5.13"."regex"}" deps)
-    (features_.termcolor."${deps."env_logger"."0.5.13"."termcolor"}" deps)
-  ];
-
-
-# end
-# env_logger-0.6.1
-
-  crates.env_logger."0.6.1" = deps: { features?(features_.env_logger."0.6.1" deps {}) }: buildRustCrate {
-    crateName = "env_logger";
-    version = "0.6.1";
-    description = "A logging implementation for `log` which is configured via an environment\nvariable.\n";
-    authors = [ "The Rust Project Developers" ];
-    sha256 = "1d02i2yaqpnmbgw42pf0hd56ddd9jr4zq5yypbmfvc8rs13x0jql";
-    dependencies = mapFeatures features ([
-      (crates."log"."${deps."env_logger"."0.6.1"."log"}" deps)
-    ]
-      ++ (if features.env_logger."0.6.1".atty or false then [ (crates.atty."${deps."env_logger"."0.6.1".atty}" deps) ] else [])
-      ++ (if features.env_logger."0.6.1".humantime or false then [ (crates.humantime."${deps."env_logger"."0.6.1".humantime}" deps) ] else [])
-      ++ (if features.env_logger."0.6.1".regex or false then [ (crates.regex."${deps."env_logger"."0.6.1".regex}" deps) ] else [])
-      ++ (if features.env_logger."0.6.1".termcolor or false then [ (crates.termcolor."${deps."env_logger"."0.6.1".termcolor}" deps) ] else []));
-    features = mkFeatures (features."env_logger"."0.6.1" or {});
-  };
-  features_.env_logger."0.6.1" = deps: f: updateFeatures f (rec {
-    atty."${deps.env_logger."0.6.1".atty}".default = true;
-    env_logger = fold recursiveUpdate {} [
-      { "0.6.1"."atty" =
-        (f.env_logger."0.6.1"."atty" or false) ||
-        (f.env_logger."0.6.1".default or false) ||
-        (env_logger."0.6.1"."default" or false); }
-      { "0.6.1"."humantime" =
-        (f.env_logger."0.6.1"."humantime" or false) ||
-        (f.env_logger."0.6.1".default or false) ||
-        (env_logger."0.6.1"."default" or false); }
-      { "0.6.1"."regex" =
-        (f.env_logger."0.6.1"."regex" or false) ||
-        (f.env_logger."0.6.1".default or false) ||
-        (env_logger."0.6.1"."default" or false); }
-      { "0.6.1"."termcolor" =
-        (f.env_logger."0.6.1"."termcolor" or false) ||
-        (f.env_logger."0.6.1".default or false) ||
-        (env_logger."0.6.1"."default" or false); }
-      { "0.6.1".default = (f.env_logger."0.6.1".default or true); }
-    ];
-    humantime."${deps.env_logger."0.6.1".humantime}".default = true;
-    log = fold recursiveUpdate {} [
-      { "${deps.env_logger."0.6.1".log}"."std" = true; }
-      { "${deps.env_logger."0.6.1".log}".default = true; }
-    ];
-    regex."${deps.env_logger."0.6.1".regex}".default = true;
-    termcolor."${deps.env_logger."0.6.1".termcolor}".default = true;
-  }) [
-    (features_.atty."${deps."env_logger"."0.6.1"."atty"}" deps)
-    (features_.humantime."${deps."env_logger"."0.6.1"."humantime"}" deps)
-    (features_.log."${deps."env_logger"."0.6.1"."log"}" deps)
-    (features_.regex."${deps."env_logger"."0.6.1"."regex"}" deps)
-    (features_.termcolor."${deps."env_logger"."0.6.1"."termcolor"}" deps)
-  ];
-
-
-# end
-# error-chain-0.12.0
-
-  crates.error_chain."0.12.0" = deps: { features?(features_.error_chain."0.12.0" deps {}) }: buildRustCrate {
-    crateName = "error-chain";
-    version = "0.12.0";
-    authors = [ "Brian Anderson <banderson@mozilla.com>" "Paul Colomiets <paul@colomiets.name>" "Colin Kiegel <kiegel@gmx.de>" "Yamakaky <yamakaky@yamaworld.fr>" ];
-    sha256 = "1m6wk1r6wqg1mn69bxxvk5k081cb4xy6bfhsxb99rv408x9wjcnl";
-    dependencies = mapFeatures features ([
-    ]
-      ++ (if features.error_chain."0.12.0".backtrace or false then [ (crates.backtrace."${deps."error_chain"."0.12.0".backtrace}" deps) ] else []));
-    features = mkFeatures (features."error_chain"."0.12.0" or {});
-  };
-  features_.error_chain."0.12.0" = deps: f: updateFeatures f (rec {
-    backtrace."${deps.error_chain."0.12.0".backtrace}".default = true;
-    error_chain = fold recursiveUpdate {} [
-      { "0.12.0".backtrace =
-        (f.error_chain."0.12.0".backtrace or false) ||
-        (f.error_chain."0.12.0".default or false) ||
-        (error_chain."0.12.0"."default" or false); }
-      { "0.12.0".default = (f.error_chain."0.12.0".default or true); }
-      { "0.12.0".example_generated =
-        (f.error_chain."0.12.0".example_generated or false) ||
-        (f.error_chain."0.12.0".default or false) ||
-        (error_chain."0.12.0"."default" or false); }
-    ];
-  }) [
-    (features_.backtrace."${deps."error_chain"."0.12.0"."backtrace"}" deps)
-  ];
-
-
-# end
-# failure-0.1.3
-
-  crates.failure."0.1.3" = deps: { features?(features_.failure."0.1.3" deps {}) }: buildRustCrate {
-    crateName = "failure";
-    version = "0.1.3";
-    authors = [ "Without Boats <boats@mozilla.com>" ];
-    sha256 = "0cibp01z0clyxrvkl7v7kq6jszsgcg9vwv6d9l6d1drk9jqdss4s";
-    dependencies = mapFeatures features ([
-    ]
-      ++ (if features.failure."0.1.3".backtrace or false then [ (crates.backtrace."${deps."failure"."0.1.3".backtrace}" deps) ] else [])
-      ++ (if features.failure."0.1.3".failure_derive or false then [ (crates.failure_derive."${deps."failure"."0.1.3".failure_derive}" deps) ] else []));
-    features = mkFeatures (features."failure"."0.1.3" or {});
-  };
-  features_.failure."0.1.3" = deps: f: updateFeatures f (rec {
-    backtrace."${deps.failure."0.1.3".backtrace}".default = true;
-    failure = fold recursiveUpdate {} [
-      { "0.1.3".backtrace =
-        (f.failure."0.1.3".backtrace or false) ||
-        (f.failure."0.1.3".std or false) ||
-        (failure."0.1.3"."std" or false); }
-      { "0.1.3".default = (f.failure."0.1.3".default or true); }
-      { "0.1.3".derive =
-        (f.failure."0.1.3".derive or false) ||
-        (f.failure."0.1.3".default or false) ||
-        (failure."0.1.3"."default" or false); }
-      { "0.1.3".failure_derive =
-        (f.failure."0.1.3".failure_derive or false) ||
-        (f.failure."0.1.3".derive or false) ||
-        (failure."0.1.3"."derive" or false); }
-      { "0.1.3".std =
-        (f.failure."0.1.3".std or false) ||
-        (f.failure."0.1.3".default or false) ||
-        (failure."0.1.3"."default" or false); }
-    ];
-    failure_derive."${deps.failure."0.1.3".failure_derive}".default = true;
-  }) [
-    (features_.backtrace."${deps."failure"."0.1.3"."backtrace"}" deps)
-    (features_.failure_derive."${deps."failure"."0.1.3"."failure_derive"}" deps)
-  ];
-
-
-# end
-# failure-0.1.5
-
-  crates.failure."0.1.5" = deps: { features?(features_.failure."0.1.5" deps {}) }: buildRustCrate {
-    crateName = "failure";
-    version = "0.1.5";
-    description = "Experimental error handling abstraction.";
-    authors = [ "Without Boats <boats@mozilla.com>" ];
-    sha256 = "1msaj1c0fg12dzyf4fhxqlx1gfx41lj2smdjmkc9hkrgajk2g3kx";
-    dependencies = mapFeatures features ([
-    ]
-      ++ (if features.failure."0.1.5".backtrace or false then [ (crates.backtrace."${deps."failure"."0.1.5".backtrace}" deps) ] else [])
-      ++ (if features.failure."0.1.5".failure_derive or false then [ (crates.failure_derive."${deps."failure"."0.1.5".failure_derive}" deps) ] else []));
-    features = mkFeatures (features."failure"."0.1.5" or {});
-  };
-  features_.failure."0.1.5" = deps: f: updateFeatures f (rec {
-    backtrace."${deps.failure."0.1.5".backtrace}".default = true;
-    failure = fold recursiveUpdate {} [
-      { "0.1.5"."backtrace" =
-        (f.failure."0.1.5"."backtrace" or false) ||
-        (f.failure."0.1.5".std or false) ||
-        (failure."0.1.5"."std" or false); }
-      { "0.1.5"."derive" =
-        (f.failure."0.1.5"."derive" or false) ||
-        (f.failure."0.1.5".default or false) ||
-        (failure."0.1.5"."default" or false); }
-      { "0.1.5"."failure_derive" =
-        (f.failure."0.1.5"."failure_derive" or false) ||
-        (f.failure."0.1.5".derive or false) ||
-        (failure."0.1.5"."derive" or false); }
-      { "0.1.5"."std" =
-        (f.failure."0.1.5"."std" or false) ||
-        (f.failure."0.1.5".default or false) ||
-        (failure."0.1.5"."default" or false); }
-      { "0.1.5".default = (f.failure."0.1.5".default or true); }
-    ];
-    failure_derive."${deps.failure."0.1.5".failure_derive}".default = true;
-  }) [
-    (features_.backtrace."${deps."failure"."0.1.5"."backtrace"}" deps)
-    (features_.failure_derive."${deps."failure"."0.1.5"."failure_derive"}" deps)
-  ];
-
-
-# end
-# failure_derive-0.1.3
-
-  crates.failure_derive."0.1.3" = deps: { features?(features_.failure_derive."0.1.3" deps {}) }: buildRustCrate {
-    crateName = "failure_derive";
-    version = "0.1.3";
-    authors = [ "Without Boats <woboats@gmail.com>" ];
-    sha256 = "1mh7ad2d17f13g0k29bskp0f9faws0w1q4a5yfzlzi75bw9kidgm";
-    procMacro = true;
-    build = "build.rs";
-    dependencies = mapFeatures features ([
-      (crates."proc_macro2"."${deps."failure_derive"."0.1.3"."proc_macro2"}" deps)
-      (crates."quote"."${deps."failure_derive"."0.1.3"."quote"}" deps)
-      (crates."syn"."${deps."failure_derive"."0.1.3"."syn"}" deps)
-      (crates."synstructure"."${deps."failure_derive"."0.1.3"."synstructure"}" deps)
-    ]);
-    features = mkFeatures (features."failure_derive"."0.1.3" or {});
-  };
-  features_.failure_derive."0.1.3" = deps: f: updateFeatures f ({
-    failure_derive."0.1.3".default = (f.failure_derive."0.1.3".default or true);
-    proc_macro2."${deps.failure_derive."0.1.3".proc_macro2}".default = true;
-    quote."${deps.failure_derive."0.1.3".quote}".default = true;
-    syn."${deps.failure_derive."0.1.3".syn}".default = true;
-    synstructure."${deps.failure_derive."0.1.3".synstructure}".default = true;
-  }) [
-    (features_.proc_macro2."${deps."failure_derive"."0.1.3"."proc_macro2"}" deps)
-    (features_.quote."${deps."failure_derive"."0.1.3"."quote"}" deps)
-    (features_.syn."${deps."failure_derive"."0.1.3"."syn"}" deps)
-    (features_.synstructure."${deps."failure_derive"."0.1.3"."synstructure"}" deps)
-  ];
-
-
-# end
-# failure_derive-0.1.5
-
-  crates.failure_derive."0.1.5" = deps: { features?(features_.failure_derive."0.1.5" deps {}) }: buildRustCrate {
-    crateName = "failure_derive";
-    version = "0.1.5";
-    description = "derives for the failure crate";
-    authors = [ "Without Boats <woboats@gmail.com>" ];
-    sha256 = "1wzk484b87r4qszcvdl2bkniv5ls4r2f2dshz7hmgiv6z4ln12g0";
-    procMacro = true;
-    build = "build.rs";
-    dependencies = mapFeatures features ([
-      (crates."proc_macro2"."${deps."failure_derive"."0.1.5"."proc_macro2"}" deps)
-      (crates."quote"."${deps."failure_derive"."0.1.5"."quote"}" deps)
-      (crates."syn"."${deps."failure_derive"."0.1.5"."syn"}" deps)
-      (crates."synstructure"."${deps."failure_derive"."0.1.5"."synstructure"}" deps)
-    ]);
-    features = mkFeatures (features."failure_derive"."0.1.5" or {});
-  };
-  features_.failure_derive."0.1.5" = deps: f: updateFeatures f ({
-    failure_derive."0.1.5".default = (f.failure_derive."0.1.5".default or true);
-    proc_macro2."${deps.failure_derive."0.1.5".proc_macro2}".default = true;
-    quote."${deps.failure_derive."0.1.5".quote}".default = true;
-    syn."${deps.failure_derive."0.1.5".syn}".default = true;
-    synstructure."${deps.failure_derive."0.1.5".synstructure}".default = true;
-  }) [
-    (features_.proc_macro2."${deps."failure_derive"."0.1.5"."proc_macro2"}" deps)
-    (features_.quote."${deps."failure_derive"."0.1.5"."quote"}" deps)
-    (features_.syn."${deps."failure_derive"."0.1.5"."syn"}" deps)
-    (features_.synstructure."${deps."failure_derive"."0.1.5"."synstructure"}" deps)
-  ];
-
-
-# end
-# fuchsia-cprng-0.1.1
-
-  crates.fuchsia_cprng."0.1.1" = deps: { features?(features_.fuchsia_cprng."0.1.1" deps {}) }: buildRustCrate {
-    crateName = "fuchsia-cprng";
-    version = "0.1.1";
-    description = "Rust crate for the Fuchsia cryptographically secure pseudorandom number generator";
-    authors = [ "Erick Tryzelaar <etryzelaar@google.com>" ];
-    edition = "2018";
-    sha256 = "07apwv9dj716yjlcj29p94vkqn5zmfh7hlrqvrjx3wzshphc95h9";
-  };
-  features_.fuchsia_cprng."0.1.1" = deps: f: updateFeatures f ({
-    fuchsia_cprng."0.1.1".default = (f.fuchsia_cprng."0.1.1".default or true);
-  }) [];
-
-
-# end
-# fuchsia-zircon-0.3.3
-
-  crates.fuchsia_zircon."0.3.3" = deps: { features?(features_.fuchsia_zircon."0.3.3" deps {}) }: buildRustCrate {
-    crateName = "fuchsia-zircon";
-    version = "0.3.3";
-    authors = [ "Raph Levien <raph@google.com>" ];
-    sha256 = "0jrf4shb1699r4la8z358vri8318w4mdi6qzfqy30p2ymjlca4gk";
-    dependencies = mapFeatures features ([
-      (crates."bitflags"."${deps."fuchsia_zircon"."0.3.3"."bitflags"}" deps)
-      (crates."fuchsia_zircon_sys"."${deps."fuchsia_zircon"."0.3.3"."fuchsia_zircon_sys"}" deps)
-    ]);
-  };
-  features_.fuchsia_zircon."0.3.3" = deps: f: updateFeatures f ({
-    bitflags."${deps.fuchsia_zircon."0.3.3".bitflags}".default = true;
-    fuchsia_zircon."0.3.3".default = (f.fuchsia_zircon."0.3.3".default or true);
-    fuchsia_zircon_sys."${deps.fuchsia_zircon."0.3.3".fuchsia_zircon_sys}".default = true;
-  }) [
-    (features_.bitflags."${deps."fuchsia_zircon"."0.3.3"."bitflags"}" deps)
-    (features_.fuchsia_zircon_sys."${deps."fuchsia_zircon"."0.3.3"."fuchsia_zircon_sys"}" deps)
-  ];
-
-
-# end
-# fuchsia-zircon-sys-0.3.3
-
-  crates.fuchsia_zircon_sys."0.3.3" = deps: { features?(features_.fuchsia_zircon_sys."0.3.3" deps {}) }: buildRustCrate {
-    crateName = "fuchsia-zircon-sys";
-    version = "0.3.3";
-    authors = [ "Raph Levien <raph@google.com>" ];
-    sha256 = "08jp1zxrm9jbrr6l26bjal4dbm8bxfy57ickdgibsqxr1n9j3hf5";
-  };
-  features_.fuchsia_zircon_sys."0.3.3" = deps: f: updateFeatures f ({
-    fuchsia_zircon_sys."0.3.3".default = (f.fuchsia_zircon_sys."0.3.3".default or true);
-  }) [];
-
-
-# end
-# humantime-1.1.1
-
-  crates.humantime."1.1.1" = deps: { features?(features_.humantime."1.1.1" deps {}) }: buildRustCrate {
-    crateName = "humantime";
-    version = "1.1.1";
-    authors = [ "Paul Colomiets <paul@colomiets.name>" ];
-    sha256 = "1lzdfsfzdikcp1qb6wcdvnsdv16pmzr7p7cv171vnbnyz2lrwbgn";
-    libPath = "src/lib.rs";
-    dependencies = mapFeatures features ([
-      (crates."quick_error"."${deps."humantime"."1.1.1"."quick_error"}" deps)
-    ]);
-  };
-  features_.humantime."1.1.1" = deps: f: updateFeatures f ({
-    humantime."1.1.1".default = (f.humantime."1.1.1".default or true);
-    quick_error."${deps.humantime."1.1.1".quick_error}".default = true;
-  }) [
-    (features_.quick_error."${deps."humantime"."1.1.1"."quick_error"}" deps)
-  ];
-
-
-# end
-# humantime-1.2.0
-
-  crates.humantime."1.2.0" = deps: { features?(features_.humantime."1.2.0" deps {}) }: buildRustCrate {
-    crateName = "humantime";
-    version = "1.2.0";
-    description = "    A parser and formatter for std::time::{Duration, SystemTime}\n";
-    authors = [ "Paul Colomiets <paul@colomiets.name>" ];
-    sha256 = "0wlcxzz2mhq0brkfbjb12hc6jm17bgm8m6pdgblw4qjwmf26aw28";
-    libPath = "src/lib.rs";
-    dependencies = mapFeatures features ([
-      (crates."quick_error"."${deps."humantime"."1.2.0"."quick_error"}" deps)
-    ]);
-  };
-  features_.humantime."1.2.0" = deps: f: updateFeatures f ({
-    humantime."1.2.0".default = (f.humantime."1.2.0".default or true);
-    quick_error."${deps.humantime."1.2.0".quick_error}".default = true;
-  }) [
-    (features_.quick_error."${deps."humantime"."1.2.0"."quick_error"}" deps)
-  ];
-
-
-# end
-# idna-0.1.5
-
-  crates.idna."0.1.5" = deps: { features?(features_.idna."0.1.5" deps {}) }: buildRustCrate {
-    crateName = "idna";
-    version = "0.1.5";
-    authors = [ "The rust-url developers" ];
-    sha256 = "1gwgl19rz5vzi67rrhamczhxy050f5ynx4ybabfapyalv7z1qmjy";
-    dependencies = mapFeatures features ([
-      (crates."matches"."${deps."idna"."0.1.5"."matches"}" deps)
-      (crates."unicode_bidi"."${deps."idna"."0.1.5"."unicode_bidi"}" deps)
-      (crates."unicode_normalization"."${deps."idna"."0.1.5"."unicode_normalization"}" deps)
-    ]);
-  };
-  features_.idna."0.1.5" = deps: f: updateFeatures f ({
-    idna."0.1.5".default = (f.idna."0.1.5".default or true);
-    matches."${deps.idna."0.1.5".matches}".default = true;
-    unicode_bidi."${deps.idna."0.1.5".unicode_bidi}".default = true;
-    unicode_normalization."${deps.idna."0.1.5".unicode_normalization}".default = true;
-  }) [
-    (features_.matches."${deps."idna"."0.1.5"."matches"}" deps)
-    (features_.unicode_bidi."${deps."idna"."0.1.5"."unicode_bidi"}" deps)
-    (features_.unicode_normalization."${deps."idna"."0.1.5"."unicode_normalization"}" deps)
-  ];
-
-
-# end
-# itertools-0.7.8
-
-  crates.itertools."0.7.8" = deps: { features?(features_.itertools."0.7.8" deps {}) }: buildRustCrate {
-    crateName = "itertools";
-    version = "0.7.8";
-    authors = [ "bluss" ];
-    sha256 = "0ib30cd7d1icjxsa13mji1gry3grp72kx8p33yd84mphdbc3d357";
-    dependencies = mapFeatures features ([
-      (crates."either"."${deps."itertools"."0.7.8"."either"}" deps)
-    ]);
-    features = mkFeatures (features."itertools"."0.7.8" or {});
-  };
-  features_.itertools."0.7.8" = deps: f: updateFeatures f (rec {
-    either."${deps.itertools."0.7.8".either}".default = (f.either."${deps.itertools."0.7.8".either}".default or false);
-    itertools = fold recursiveUpdate {} [
-      { "0.7.8".default = (f.itertools."0.7.8".default or true); }
-      { "0.7.8".use_std =
-        (f.itertools."0.7.8".use_std or false) ||
-        (f.itertools."0.7.8".default or false) ||
-        (itertools."0.7.8"."default" or false); }
-    ];
-  }) [
-    (features_.either."${deps."itertools"."0.7.8"."either"}" deps)
-  ];
-
-
-# end
-# itertools-0.8.0
-
-  crates.itertools."0.8.0" = deps: { features?(features_.itertools."0.8.0" deps {}) }: buildRustCrate {
-    crateName = "itertools";
-    version = "0.8.0";
-    description = "Extra iterator adaptors, iterator methods, free functions, and macros.";
-    authors = [ "bluss" ];
-    sha256 = "0xpz59yf03vyj540i7sqypn2aqfid08c4vzyg0l6rqm08da77n7n";
-    dependencies = mapFeatures features ([
-      (crates."either"."${deps."itertools"."0.8.0"."either"}" deps)
-    ]);
-    features = mkFeatures (features."itertools"."0.8.0" or {});
-  };
-  features_.itertools."0.8.0" = deps: f: updateFeatures f (rec {
-    either."${deps.itertools."0.8.0".either}".default = (f.either."${deps.itertools."0.8.0".either}".default or false);
-    itertools = fold recursiveUpdate {} [
-      { "0.8.0"."use_std" =
-        (f.itertools."0.8.0"."use_std" or false) ||
-        (f.itertools."0.8.0".default or false) ||
-        (itertools."0.8.0"."default" or false); }
-      { "0.8.0".default = (f.itertools."0.8.0".default or true); }
-    ];
-  }) [
-    (features_.either."${deps."itertools"."0.8.0"."either"}" deps)
-  ];
-
-
-# end
-# itoa-0.4.3
-
-  crates.itoa."0.4.3" = deps: { features?(features_.itoa."0.4.3" deps {}) }: buildRustCrate {
-    crateName = "itoa";
-    version = "0.4.3";
-    authors = [ "David Tolnay <dtolnay@gmail.com>" ];
-    sha256 = "0zadimmdgvili3gdwxqg7ljv3r4wcdg1kkdfp9nl15vnm23vrhy1";
-    features = mkFeatures (features."itoa"."0.4.3" or {});
-  };
-  features_.itoa."0.4.3" = deps: f: updateFeatures f (rec {
-    itoa = fold recursiveUpdate {} [
-      { "0.4.3".default = (f.itoa."0.4.3".default or true); }
-      { "0.4.3".std =
-        (f.itoa."0.4.3".std or false) ||
-        (f.itoa."0.4.3".default or false) ||
-        (itoa."0.4.3"."default" or false); }
-    ];
-  }) [];
-
-
-# end
-# lazy_static-1.1.0
-
-  crates.lazy_static."1.1.0" = deps: { features?(features_.lazy_static."1.1.0" deps {}) }: buildRustCrate {
-    crateName = "lazy_static";
-    version = "1.1.0";
-    authors = [ "Marvin Löbel <loebel.marvin@gmail.com>" ];
-    sha256 = "1da2b6nxfc2l547qgl9kd1pn9sh1af96a6qx6xw8xdnv6hh5fag0";
-    build = "build.rs";
-    dependencies = mapFeatures features ([
-]);
-
-    buildDependencies = mapFeatures features ([
-      (crates."version_check"."${deps."lazy_static"."1.1.0"."version_check"}" deps)
-    ]);
-    features = mkFeatures (features."lazy_static"."1.1.0" or {});
-  };
-  features_.lazy_static."1.1.0" = deps: f: updateFeatures f (rec {
-    lazy_static = fold recursiveUpdate {} [
-      { "1.1.0".default = (f.lazy_static."1.1.0".default or true); }
-      { "1.1.0".nightly =
-        (f.lazy_static."1.1.0".nightly or false) ||
-        (f.lazy_static."1.1.0".spin_no_std or false) ||
-        (lazy_static."1.1.0"."spin_no_std" or false); }
-      { "1.1.0".spin =
-        (f.lazy_static."1.1.0".spin or false) ||
-        (f.lazy_static."1.1.0".spin_no_std or false) ||
-        (lazy_static."1.1.0"."spin_no_std" or false); }
-    ];
-    version_check."${deps.lazy_static."1.1.0".version_check}".default = true;
-  }) [
-    (features_.version_check."${deps."lazy_static"."1.1.0"."version_check"}" deps)
-  ];
-
-
-# end
-# lazy_static-1.3.0
-
-  crates.lazy_static."1.3.0" = deps: { features?(features_.lazy_static."1.3.0" deps {}) }: buildRustCrate {
-    crateName = "lazy_static";
-    version = "1.3.0";
-    description = "A macro for declaring lazily evaluated statics in Rust.";
-    authors = [ "Marvin Löbel <loebel.marvin@gmail.com>" ];
-    sha256 = "1vv47va18ydk7dx5paz88g3jy1d3lwbx6qpxkbj8gyfv770i4b1y";
-    dependencies = mapFeatures features ([
-]);
-    features = mkFeatures (features."lazy_static"."1.3.0" or {});
-  };
-  features_.lazy_static."1.3.0" = deps: f: updateFeatures f (rec {
-    lazy_static = fold recursiveUpdate {} [
-      { "1.3.0"."spin" =
-        (f.lazy_static."1.3.0"."spin" or false) ||
-        (f.lazy_static."1.3.0".spin_no_std or false) ||
-        (lazy_static."1.3.0"."spin_no_std" or false); }
-      { "1.3.0".default = (f.lazy_static."1.3.0".default or true); }
-    ];
-  }) [];
-
-
-# end
-# libc-0.2.43
-
-  crates.libc."0.2.43" = deps: { features?(features_.libc."0.2.43" deps {}) }: buildRustCrate {
-    crateName = "libc";
-    version = "0.2.43";
-    authors = [ "The Rust Project Developers" ];
-    sha256 = "0pshydmsq71kl9276zc2928ld50sp524ixcqkcqsgq410dx6c50b";
-    features = mkFeatures (features."libc"."0.2.43" or {});
-  };
-  features_.libc."0.2.43" = deps: f: updateFeatures f (rec {
-    libc = fold recursiveUpdate {} [
-      { "0.2.43".default = (f.libc."0.2.43".default or true); }
-      { "0.2.43".use_std =
-        (f.libc."0.2.43".use_std or false) ||
-        (f.libc."0.2.43".default or false) ||
-        (libc."0.2.43"."default" or false); }
-    ];
-  }) [];
-
-
-# end
-# libc-0.2.50
-
-  crates.libc."0.2.50" = deps: { features?(features_.libc."0.2.50" deps {}) }: buildRustCrate {
-    crateName = "libc";
-    version = "0.2.50";
-    description = "Raw FFI bindings to platform libraries like libc.\n";
-    authors = [ "The Rust Project Developers" ];
-    sha256 = "14y4zm0xp2xbj3l1kxqf2wpl58xb7hglxdbfx5dcxjlchbvk5dzs";
-    build = "build.rs";
-    dependencies = mapFeatures features ([
-]);
-    features = mkFeatures (features."libc"."0.2.50" or {});
-  };
-  features_.libc."0.2.50" = deps: f: updateFeatures f (rec {
-    libc = fold recursiveUpdate {} [
-      { "0.2.50"."align" =
-        (f.libc."0.2.50"."align" or false) ||
-        (f.libc."0.2.50".rustc-dep-of-std or false) ||
-        (libc."0.2.50"."rustc-dep-of-std" or false); }
-      { "0.2.50"."rustc-std-workspace-core" =
-        (f.libc."0.2.50"."rustc-std-workspace-core" or false) ||
-        (f.libc."0.2.50".rustc-dep-of-std or false) ||
-        (libc."0.2.50"."rustc-dep-of-std" or false); }
-      { "0.2.50"."use_std" =
-        (f.libc."0.2.50"."use_std" or false) ||
-        (f.libc."0.2.50".default or false) ||
-        (libc."0.2.50"."default" or false); }
-      { "0.2.50".default = (f.libc."0.2.50".default or true); }
-    ];
-  }) [];
-
-
-# end
-# log-0.4.5
-
-  crates.log."0.4.5" = deps: { features?(features_.log."0.4.5" deps {}) }: buildRustCrate {
-    crateName = "log";
-    version = "0.4.5";
-    authors = [ "The Rust Project Developers" ];
-    sha256 = "1hdcj17al94ga90q7jx2y1rmxi68n3akra1awv3hr3s9b9zipgq6";
-    dependencies = mapFeatures features ([
-      (crates."cfg_if"."${deps."log"."0.4.5"."cfg_if"}" deps)
-    ]);
-    features = mkFeatures (features."log"."0.4.5" or {});
-  };
-  features_.log."0.4.5" = deps: f: updateFeatures f ({
-    cfg_if."${deps.log."0.4.5".cfg_if}".default = true;
-    log."0.4.5".default = (f.log."0.4.5".default or true);
-  }) [
-    (features_.cfg_if."${deps."log"."0.4.5"."cfg_if"}" deps)
-  ];
-
-
-# end
-# log-0.4.6
-
-  crates.log."0.4.6" = deps: { features?(features_.log."0.4.6" deps {}) }: buildRustCrate {
-    crateName = "log";
-    version = "0.4.6";
-    description = "A lightweight logging facade for Rust\n";
-    authors = [ "The Rust Project Developers" ];
-    sha256 = "1nd8dl9mvc9vd6fks5d4gsxaz990xi6rzlb8ymllshmwi153vngr";
-    dependencies = mapFeatures features ([
-      (crates."cfg_if"."${deps."log"."0.4.6"."cfg_if"}" deps)
-    ]);
-    features = mkFeatures (features."log"."0.4.6" or {});
-  };
-  features_.log."0.4.6" = deps: f: updateFeatures f ({
-    cfg_if."${deps.log."0.4.6".cfg_if}".default = true;
-    log."0.4.6".default = (f.log."0.4.6".default or true);
-  }) [
-    (features_.cfg_if."${deps."log"."0.4.6"."cfg_if"}" deps)
-  ];
-
-
-# end
-# matches-0.1.8
-
-  crates.matches."0.1.8" = deps: { features?(features_.matches."0.1.8" deps {}) }: buildRustCrate {
-    crateName = "matches";
-    version = "0.1.8";
-    authors = [ "Simon Sapin <simon.sapin@exyr.org>" ];
-    sha256 = "03hl636fg6xggy0a26200xs74amk3k9n0908rga2szn68agyz3cv";
-    libPath = "lib.rs";
-  };
-  features_.matches."0.1.8" = deps: f: updateFeatures f ({
-    matches."0.1.8".default = (f.matches."0.1.8".default or true);
-  }) [];
-
-
-# end
-# memchr-1.0.2
-
-  crates.memchr."1.0.2" = deps: { features?(features_.memchr."1.0.2" deps {}) }: buildRustCrate {
-    crateName = "memchr";
-    version = "1.0.2";
-    authors = [ "Andrew Gallant <jamslam@gmail.com>" "bluss" ];
-    sha256 = "0dfb8ifl9nrc9kzgd5z91q6qg87sh285q1ih7xgrsglmqfav9lg7";
-    dependencies = mapFeatures features ([
-    ]
-      ++ (if features.memchr."1.0.2".libc or false then [ (crates.libc."${deps."memchr"."1.0.2".libc}" deps) ] else []));
-    features = mkFeatures (features."memchr"."1.0.2" or {});
-  };
-  features_.memchr."1.0.2" = deps: f: updateFeatures f (rec {
-    libc = fold recursiveUpdate {} [
-      { "${deps.memchr."1.0.2".libc}"."use_std" =
-        (f.libc."${deps.memchr."1.0.2".libc}"."use_std" or false) ||
-        (memchr."1.0.2"."use_std" or false) ||
-        (f."memchr"."1.0.2"."use_std" or false); }
-      { "${deps.memchr."1.0.2".libc}".default = (f.libc."${deps.memchr."1.0.2".libc}".default or false); }
-    ];
-    memchr = fold recursiveUpdate {} [
-      { "1.0.2".default = (f.memchr."1.0.2".default or true); }
-      { "1.0.2".libc =
-        (f.memchr."1.0.2".libc or false) ||
-        (f.memchr."1.0.2".default or false) ||
-        (memchr."1.0.2"."default" or false) ||
-        (f.memchr."1.0.2".use_std or false) ||
-        (memchr."1.0.2"."use_std" or false); }
-      { "1.0.2".use_std =
-        (f.memchr."1.0.2".use_std or false) ||
-        (f.memchr."1.0.2".default or false) ||
-        (memchr."1.0.2"."default" or false); }
-    ];
-  }) [
-    (features_.libc."${deps."memchr"."1.0.2"."libc"}" deps)
-  ];
-
-
-# end
-# memchr-2.1.0
-
-  crates.memchr."2.1.0" = deps: { features?(features_.memchr."2.1.0" deps {}) }: buildRustCrate {
-    crateName = "memchr";
-    version = "2.1.0";
-    authors = [ "Andrew Gallant <jamslam@gmail.com>" "bluss" ];
-    sha256 = "02w1fc5z1ccx8fbzgcr0mpk0xf2i9g4vbx9q5c2g8pjddbaqvjjq";
-    dependencies = mapFeatures features ([
-      (crates."cfg_if"."${deps."memchr"."2.1.0"."cfg_if"}" deps)
-    ]
-      ++ (if features.memchr."2.1.0".libc or false then [ (crates.libc."${deps."memchr"."2.1.0".libc}" deps) ] else []));
-
-    buildDependencies = mapFeatures features ([
-      (crates."version_check"."${deps."memchr"."2.1.0"."version_check"}" deps)
-    ]);
-    features = mkFeatures (features."memchr"."2.1.0" or {});
-  };
-  features_.memchr."2.1.0" = deps: f: updateFeatures f (rec {
-    cfg_if."${deps.memchr."2.1.0".cfg_if}".default = true;
-    libc = fold recursiveUpdate {} [
-      { "${deps.memchr."2.1.0".libc}"."use_std" =
-        (f.libc."${deps.memchr."2.1.0".libc}"."use_std" or false) ||
-        (memchr."2.1.0"."use_std" or false) ||
-        (f."memchr"."2.1.0"."use_std" or false); }
-      { "${deps.memchr."2.1.0".libc}".default = (f.libc."${deps.memchr."2.1.0".libc}".default or false); }
-    ];
-    memchr = fold recursiveUpdate {} [
-      { "2.1.0".default = (f.memchr."2.1.0".default or true); }
-      { "2.1.0".libc =
-        (f.memchr."2.1.0".libc or false) ||
-        (f.memchr."2.1.0".default or false) ||
-        (memchr."2.1.0"."default" or false) ||
-        (f.memchr."2.1.0".use_std or false) ||
-        (memchr."2.1.0"."use_std" or false); }
-      { "2.1.0".use_std =
-        (f.memchr."2.1.0".use_std or false) ||
-        (f.memchr."2.1.0".default or false) ||
-        (memchr."2.1.0"."default" or false); }
-    ];
-    version_check."${deps.memchr."2.1.0".version_check}".default = true;
-  }) [
-    (features_.cfg_if."${deps."memchr"."2.1.0"."cfg_if"}" deps)
-    (features_.libc."${deps."memchr"."2.1.0"."libc"}" deps)
-    (features_.version_check."${deps."memchr"."2.1.0"."version_check"}" deps)
-  ];
-
-
-# end
-# memchr-2.2.0
-
-  crates.memchr."2.2.0" = deps: { features?(features_.memchr."2.2.0" deps {}) }: buildRustCrate {
-    crateName = "memchr";
-    version = "2.2.0";
-    description = "Safe interface to memchr.";
-    authors = [ "Andrew Gallant <jamslam@gmail.com>" "bluss" ];
-    sha256 = "11vwg8iig9jyjxq3n1cq15g29ikzw5l7ar87md54k1aisjs0997p";
-    dependencies = mapFeatures features ([
-]);
-    features = mkFeatures (features."memchr"."2.2.0" or {});
-  };
-  features_.memchr."2.2.0" = deps: f: updateFeatures f (rec {
-    memchr = fold recursiveUpdate {} [
-      { "2.2.0"."use_std" =
-        (f.memchr."2.2.0"."use_std" or false) ||
-        (f.memchr."2.2.0".default or false) ||
-        (memchr."2.2.0"."default" or false); }
-      { "2.2.0".default = (f.memchr."2.2.0".default or true); }
-    ];
-  }) [];
-
-
-# end
-# nodrop-0.1.12
-
-  crates.nodrop."0.1.12" = deps: { features?(features_.nodrop."0.1.12" deps {}) }: buildRustCrate {
-    crateName = "nodrop";
-    version = "0.1.12";
-    authors = [ "bluss" ];
-    sha256 = "1b9rxvdg8061gxjc239l9slndf0ds3m6fy2sf3gs8f9kknqgl49d";
-    dependencies = mapFeatures features ([
-]);
-    features = mkFeatures (features."nodrop"."0.1.12" or {});
-  };
-  features_.nodrop."0.1.12" = deps: f: updateFeatures f (rec {
-    nodrop = fold recursiveUpdate {} [
-      { "0.1.12".default = (f.nodrop."0.1.12".default or true); }
-      { "0.1.12".nodrop-union =
-        (f.nodrop."0.1.12".nodrop-union or false) ||
-        (f.nodrop."0.1.12".use_union or false) ||
-        (nodrop."0.1.12"."use_union" or false); }
-      { "0.1.12".std =
-        (f.nodrop."0.1.12".std or false) ||
-        (f.nodrop."0.1.12".default or false) ||
-        (nodrop."0.1.12"."default" or false); }
-    ];
-  }) [];
-
-
-# end
-# nodrop-0.1.13
-
-  crates.nodrop."0.1.13" = deps: { features?(features_.nodrop."0.1.13" deps {}) }: buildRustCrate {
-    crateName = "nodrop";
-    version = "0.1.13";
-    description = "A wrapper type to inhibit drop (destructor). Use std::mem::ManuallyDrop instead!";
-    authors = [ "bluss" ];
-    sha256 = "0gkfx6wihr9z0m8nbdhma5pyvbipznjpkzny2d4zkc05b0vnhinb";
-    dependencies = mapFeatures features ([
-]);
-    features = mkFeatures (features."nodrop"."0.1.13" or {});
-  };
-  features_.nodrop."0.1.13" = deps: f: updateFeatures f (rec {
-    nodrop = fold recursiveUpdate {} [
-      { "0.1.13"."nodrop-union" =
-        (f.nodrop."0.1.13"."nodrop-union" or false) ||
-        (f.nodrop."0.1.13".use_union or false) ||
-        (nodrop."0.1.13"."use_union" or false); }
-      { "0.1.13"."std" =
-        (f.nodrop."0.1.13"."std" or false) ||
-        (f.nodrop."0.1.13".default or false) ||
-        (nodrop."0.1.13"."default" or false); }
-      { "0.1.13".default = (f.nodrop."0.1.13".default or true); }
-    ];
-  }) [];
-
-
-# end
-# nom-3.2.1
-
-  crates.nom."3.2.1" = deps: { features?(features_.nom."3.2.1" deps {}) }: buildRustCrate {
-    crateName = "nom";
-    version = "3.2.1";
-    authors = [ "contact@geoffroycouprie.com" ];
-    sha256 = "1vcllxrz9hdw6j25kn020ka3psz1vkaqh1hm3yfak2240zrxgi07";
-    dependencies = mapFeatures features ([
-      (crates."memchr"."${deps."nom"."3.2.1"."memchr"}" deps)
-    ]);
-    features = mkFeatures (features."nom"."3.2.1" or {});
-  };
-  features_.nom."3.2.1" = deps: f: updateFeatures f (rec {
-    memchr = fold recursiveUpdate {} [
-      { "${deps.nom."3.2.1".memchr}"."use_std" =
-        (f.memchr."${deps.nom."3.2.1".memchr}"."use_std" or false) ||
-        (nom."3.2.1"."std" or false) ||
-        (f."nom"."3.2.1"."std" or false); }
-      { "${deps.nom."3.2.1".memchr}".default = (f.memchr."${deps.nom."3.2.1".memchr}".default or false); }
-    ];
-    nom = fold recursiveUpdate {} [
-      { "3.2.1".compiler_error =
-        (f.nom."3.2.1".compiler_error or false) ||
-        (f.nom."3.2.1".nightly or false) ||
-        (nom."3.2.1"."nightly" or false); }
-      { "3.2.1".default = (f.nom."3.2.1".default or true); }
-      { "3.2.1".lazy_static =
-        (f.nom."3.2.1".lazy_static or false) ||
-        (f.nom."3.2.1".regexp_macros or false) ||
-        (nom."3.2.1"."regexp_macros" or false); }
-      { "3.2.1".regex =
-        (f.nom."3.2.1".regex or false) ||
-        (f.nom."3.2.1".regexp or false) ||
-        (nom."3.2.1"."regexp" or false); }
-      { "3.2.1".regexp =
-        (f.nom."3.2.1".regexp or false) ||
-        (f.nom."3.2.1".regexp_macros or false) ||
-        (nom."3.2.1"."regexp_macros" or false); }
-      { "3.2.1".std =
-        (f.nom."3.2.1".std or false) ||
-        (f.nom."3.2.1".default or false) ||
-        (nom."3.2.1"."default" or false); }
-      { "3.2.1".stream =
-        (f.nom."3.2.1".stream or false) ||
-        (f.nom."3.2.1".default or false) ||
-        (nom."3.2.1"."default" or false); }
-    ];
-  }) [
-    (features_.memchr."${deps."nom"."3.2.1"."memchr"}" deps)
-  ];
-
-
-# end
-# percent-encoding-1.0.1
-
-  crates.percent_encoding."1.0.1" = deps: { features?(features_.percent_encoding."1.0.1" deps {}) }: buildRustCrate {
-    crateName = "percent-encoding";
-    version = "1.0.1";
-    authors = [ "The rust-url developers" ];
-    sha256 = "04ahrp7aw4ip7fmadb0bknybmkfav0kk0gw4ps3ydq5w6hr0ib5i";
-    libPath = "lib.rs";
-  };
-  features_.percent_encoding."1.0.1" = deps: f: updateFeatures f ({
-    percent_encoding."1.0.1".default = (f.percent_encoding."1.0.1".default or true);
-  }) [];
-
-
-# end
-# proc-macro2-0.4.20
-
-  crates.proc_macro2."0.4.20" = deps: { features?(features_.proc_macro2."0.4.20" deps {}) }: buildRustCrate {
-    crateName = "proc-macro2";
-    version = "0.4.20";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "0yr74b00d3wzg21kjvfln7vzzvf9aghbaff4c747i3grbd997ys2";
-    build = "build.rs";
-    dependencies = mapFeatures features ([
-      (crates."unicode_xid"."${deps."proc_macro2"."0.4.20"."unicode_xid"}" deps)
-    ]);
-    features = mkFeatures (features."proc_macro2"."0.4.20" or {});
-  };
-  features_.proc_macro2."0.4.20" = deps: f: updateFeatures f (rec {
-    proc_macro2 = fold recursiveUpdate {} [
-      { "0.4.20".default = (f.proc_macro2."0.4.20".default or true); }
-      { "0.4.20".proc-macro =
-        (f.proc_macro2."0.4.20".proc-macro or false) ||
-        (f.proc_macro2."0.4.20".default or false) ||
-        (proc_macro2."0.4.20"."default" or false) ||
-        (f.proc_macro2."0.4.20".nightly or false) ||
-        (proc_macro2."0.4.20"."nightly" or false); }
-    ];
-    unicode_xid."${deps.proc_macro2."0.4.20".unicode_xid}".default = true;
-  }) [
-    (features_.unicode_xid."${deps."proc_macro2"."0.4.20"."unicode_xid"}" deps)
-  ];
-
-
-# end
-# proc-macro2-0.4.27
-
-  crates.proc_macro2."0.4.27" = deps: { features?(features_.proc_macro2."0.4.27" deps {}) }: buildRustCrate {
-    crateName = "proc-macro2";
-    version = "0.4.27";
-    description = "A stable implementation of the upcoming new `proc_macro` API. Comes with an\noption, off by default, to also reimplement itself in terms of the upstream\nunstable API.\n";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "1cp4c40p3hwn2sz72ssqa62gp5n8w4gbamdqvvadzp5l7gxnq95i";
-    build = "build.rs";
-    dependencies = mapFeatures features ([
-      (crates."unicode_xid"."${deps."proc_macro2"."0.4.27"."unicode_xid"}" deps)
-    ]);
-    features = mkFeatures (features."proc_macro2"."0.4.27" or {});
-  };
-  features_.proc_macro2."0.4.27" = deps: f: updateFeatures f (rec {
-    proc_macro2 = fold recursiveUpdate {} [
-      { "0.4.27"."proc-macro" =
-        (f.proc_macro2."0.4.27"."proc-macro" or false) ||
-        (f.proc_macro2."0.4.27".default or false) ||
-        (proc_macro2."0.4.27"."default" or false); }
-      { "0.4.27".default = (f.proc_macro2."0.4.27".default or true); }
-    ];
-    unicode_xid."${deps.proc_macro2."0.4.27".unicode_xid}".default = true;
-  }) [
-    (features_.unicode_xid."${deps."proc_macro2"."0.4.27"."unicode_xid"}" deps)
-  ];
-
-
-# end
-# quick-error-1.2.2
-
-  crates.quick_error."1.2.2" = deps: { features?(features_.quick_error."1.2.2" deps {}) }: buildRustCrate {
-    crateName = "quick-error";
-    version = "1.2.2";
-    authors = [ "Paul Colomiets <paul@colomiets.name>" "Colin Kiegel <kiegel@gmx.de>" ];
-    sha256 = "192a3adc5phgpibgqblsdx1b421l5yg9bjbmv552qqq9f37h60k5";
-  };
-  features_.quick_error."1.2.2" = deps: f: updateFeatures f ({
-    quick_error."1.2.2".default = (f.quick_error."1.2.2".default or true);
-  }) [];
-
-
-# end
-# quote-0.6.11
-
-  crates.quote."0.6.11" = deps: { features?(features_.quote."0.6.11" deps {}) }: buildRustCrate {
-    crateName = "quote";
-    version = "0.6.11";
-    description = "Quasi-quoting macro quote!(...)";
-    authors = [ "David Tolnay <dtolnay@gmail.com>" ];
-    sha256 = "0agska77z58cypcq4knayzwx7r7n6m756z1cz9cp2z4sv0b846ga";
-    dependencies = mapFeatures features ([
-      (crates."proc_macro2"."${deps."quote"."0.6.11"."proc_macro2"}" deps)
-    ]);
-    features = mkFeatures (features."quote"."0.6.11" or {});
-  };
-  features_.quote."0.6.11" = deps: f: updateFeatures f (rec {
-    proc_macro2 = fold recursiveUpdate {} [
-      { "${deps.quote."0.6.11".proc_macro2}"."proc-macro" =
-        (f.proc_macro2."${deps.quote."0.6.11".proc_macro2}"."proc-macro" or false) ||
-        (quote."0.6.11"."proc-macro" or false) ||
-        (f."quote"."0.6.11"."proc-macro" or false); }
-      { "${deps.quote."0.6.11".proc_macro2}".default = (f.proc_macro2."${deps.quote."0.6.11".proc_macro2}".default or false); }
-    ];
-    quote = fold recursiveUpdate {} [
-      { "0.6.11"."proc-macro" =
-        (f.quote."0.6.11"."proc-macro" or false) ||
-        (f.quote."0.6.11".default or false) ||
-        (quote."0.6.11"."default" or false); }
-      { "0.6.11".default = (f.quote."0.6.11".default or true); }
-    ];
-  }) [
-    (features_.proc_macro2."${deps."quote"."0.6.11"."proc_macro2"}" deps)
-  ];
-
-
-# end
-# quote-0.6.8
-
-  crates.quote."0.6.8" = deps: { features?(features_.quote."0.6.8" deps {}) }: buildRustCrate {
-    crateName = "quote";
-    version = "0.6.8";
-    authors = [ "David Tolnay <dtolnay@gmail.com>" ];
-    sha256 = "0dq6j23w6pmc4l6v490arixdwypy0b82z76nrzaingqhqri4p3mh";
-    dependencies = mapFeatures features ([
-      (crates."proc_macro2"."${deps."quote"."0.6.8"."proc_macro2"}" deps)
-    ]);
-    features = mkFeatures (features."quote"."0.6.8" or {});
-  };
-  features_.quote."0.6.8" = deps: f: updateFeatures f (rec {
-    proc_macro2 = fold recursiveUpdate {} [
-      { "${deps.quote."0.6.8".proc_macro2}"."proc-macro" =
-        (f.proc_macro2."${deps.quote."0.6.8".proc_macro2}"."proc-macro" or false) ||
-        (quote."0.6.8"."proc-macro" or false) ||
-        (f."quote"."0.6.8"."proc-macro" or false); }
-      { "${deps.quote."0.6.8".proc_macro2}".default = (f.proc_macro2."${deps.quote."0.6.8".proc_macro2}".default or false); }
-    ];
-    quote = fold recursiveUpdate {} [
-      { "0.6.8".default = (f.quote."0.6.8".default or true); }
-      { "0.6.8".proc-macro =
-        (f.quote."0.6.8".proc-macro or false) ||
-        (f.quote."0.6.8".default or false) ||
-        (quote."0.6.8"."default" or false); }
-    ];
-  }) [
-    (features_.proc_macro2."${deps."quote"."0.6.8"."proc_macro2"}" deps)
-  ];
-
-
-# end
-# rand-0.4.3
-
-  crates.rand."0.4.3" = deps: { features?(features_.rand."0.4.3" deps {}) }: buildRustCrate {
-    crateName = "rand";
-    version = "0.4.3";
-    authors = [ "The Rust Project Developers" ];
-    sha256 = "1644wri45l147822xy7dgdm4k7myxzs66cb795ga0x7dan11ci4f";
-    dependencies = (if kernel == "fuchsia" then mapFeatures features ([
-      (crates."fuchsia_zircon"."${deps."rand"."0.4.3"."fuchsia_zircon"}" deps)
-    ]) else [])
-      ++ (if (kernel == "linux" || kernel == "darwin") then mapFeatures features ([
-    ]
-      ++ (if features.rand."0.4.3".libc or false then [ (crates.libc."${deps."rand"."0.4.3".libc}" deps) ] else [])) else [])
-      ++ (if kernel == "windows" then mapFeatures features ([
-      (crates."winapi"."${deps."rand"."0.4.3"."winapi"}" deps)
-    ]) else []);
-    features = mkFeatures (features."rand"."0.4.3" or {});
-  };
-  features_.rand."0.4.3" = deps: f: updateFeatures f (rec {
-    fuchsia_zircon."${deps.rand."0.4.3".fuchsia_zircon}".default = true;
-    libc."${deps.rand."0.4.3".libc}".default = true;
-    rand = fold recursiveUpdate {} [
-      { "0.4.3".default = (f.rand."0.4.3".default or true); }
-      { "0.4.3".i128_support =
-        (f.rand."0.4.3".i128_support or false) ||
-        (f.rand."0.4.3".nightly or false) ||
-        (rand."0.4.3"."nightly" or false); }
-      { "0.4.3".libc =
-        (f.rand."0.4.3".libc or false) ||
-        (f.rand."0.4.3".std or false) ||
-        (rand."0.4.3"."std" or false); }
-      { "0.4.3".std =
-        (f.rand."0.4.3".std or false) ||
-        (f.rand."0.4.3".default or false) ||
-        (rand."0.4.3"."default" or false); }
-    ];
-    winapi = fold recursiveUpdate {} [
-      { "${deps.rand."0.4.3".winapi}"."minwindef" = true; }
-      { "${deps.rand."0.4.3".winapi}"."ntsecapi" = true; }
-      { "${deps.rand."0.4.3".winapi}"."profileapi" = true; }
-      { "${deps.rand."0.4.3".winapi}"."winnt" = true; }
-      { "${deps.rand."0.4.3".winapi}".default = true; }
-    ];
-  }) [
-    (features_.fuchsia_zircon."${deps."rand"."0.4.3"."fuchsia_zircon"}" deps)
-    (features_.libc."${deps."rand"."0.4.3"."libc"}" deps)
-    (features_.winapi."${deps."rand"."0.4.3"."winapi"}" deps)
-  ];
-
-
-# end
-# rand-0.4.6
-
-  crates.rand."0.4.6" = deps: { features?(features_.rand."0.4.6" deps {}) }: buildRustCrate {
-    crateName = "rand";
-    version = "0.4.6";
-    description = "Random number generators and other randomness functionality.\n";
-    authors = [ "The Rust Project Developers" ];
-    sha256 = "0c3rmg5q7d6qdi7cbmg5py9alm70wd3xsg0mmcawrnl35qv37zfs";
-    dependencies = (if abi == "sgx" then mapFeatures features ([
-      (crates."rand_core"."${deps."rand"."0.4.6"."rand_core"}" deps)
-      (crates."rdrand"."${deps."rand"."0.4.6"."rdrand"}" deps)
-    ]) else [])
-      ++ (if kernel == "fuchsia" then mapFeatures features ([
-      (crates."fuchsia_cprng"."${deps."rand"."0.4.6"."fuchsia_cprng"}" deps)
-    ]) else [])
-      ++ (if (kernel == "linux" || kernel == "darwin") then mapFeatures features ([
-    ]
-      ++ (if features.rand."0.4.6".libc or false then [ (crates.libc."${deps."rand"."0.4.6".libc}" deps) ] else [])) else [])
-      ++ (if kernel == "windows" then mapFeatures features ([
-      (crates."winapi"."${deps."rand"."0.4.6"."winapi"}" deps)
-    ]) else []);
-    features = mkFeatures (features."rand"."0.4.6" or {});
-  };
-  features_.rand."0.4.6" = deps: f: updateFeatures f (rec {
-    fuchsia_cprng."${deps.rand."0.4.6".fuchsia_cprng}".default = true;
-    libc."${deps.rand."0.4.6".libc}".default = true;
-    rand = fold recursiveUpdate {} [
-      { "0.4.6"."i128_support" =
-        (f.rand."0.4.6"."i128_support" or false) ||
-        (f.rand."0.4.6".nightly or false) ||
-        (rand."0.4.6"."nightly" or false); }
-      { "0.4.6"."libc" =
-        (f.rand."0.4.6"."libc" or false) ||
-        (f.rand."0.4.6".std or false) ||
-        (rand."0.4.6"."std" or false); }
-      { "0.4.6"."std" =
-        (f.rand."0.4.6"."std" or false) ||
-        (f.rand."0.4.6".default or false) ||
-        (rand."0.4.6"."default" or false); }
-      { "0.4.6".default = (f.rand."0.4.6".default or true); }
-    ];
-    rand_core."${deps.rand."0.4.6".rand_core}".default = (f.rand_core."${deps.rand."0.4.6".rand_core}".default or false);
-    rdrand."${deps.rand."0.4.6".rdrand}".default = true;
-    winapi = fold recursiveUpdate {} [
-      { "${deps.rand."0.4.6".winapi}"."minwindef" = true; }
-      { "${deps.rand."0.4.6".winapi}"."ntsecapi" = true; }
-      { "${deps.rand."0.4.6".winapi}"."profileapi" = true; }
-      { "${deps.rand."0.4.6".winapi}"."winnt" = true; }
-      { "${deps.rand."0.4.6".winapi}".default = true; }
-    ];
-  }) [
-    (features_.rand_core."${deps."rand"."0.4.6"."rand_core"}" deps)
-    (features_.rdrand."${deps."rand"."0.4.6"."rdrand"}" deps)
-    (features_.fuchsia_cprng."${deps."rand"."0.4.6"."fuchsia_cprng"}" deps)
-    (features_.libc."${deps."rand"."0.4.6"."libc"}" deps)
-    (features_.winapi."${deps."rand"."0.4.6"."winapi"}" deps)
-  ];
-
-
-# end
-# rand_core-0.3.1
-
-  crates.rand_core."0.3.1" = deps: { features?(features_.rand_core."0.3.1" deps {}) }: buildRustCrate {
-    crateName = "rand_core";
-    version = "0.3.1";
-    description = "Core random number generator traits and tools for implementation.\n";
-    authors = [ "The Rand Project Developers" "The Rust Project Developers" ];
-    sha256 = "0q0ssgpj9x5a6fda83nhmfydy7a6c0wvxm0jhncsmjx8qp8gw91m";
-    dependencies = mapFeatures features ([
-      (crates."rand_core"."${deps."rand_core"."0.3.1"."rand_core"}" deps)
-    ]);
-    features = mkFeatures (features."rand_core"."0.3.1" or {});
-  };
-  features_.rand_core."0.3.1" = deps: f: updateFeatures f (rec {
-    rand_core = fold recursiveUpdate {} [
-      { "${deps.rand_core."0.3.1".rand_core}"."alloc" =
-        (f.rand_core."${deps.rand_core."0.3.1".rand_core}"."alloc" or false) ||
-        (rand_core."0.3.1"."alloc" or false) ||
-        (f."rand_core"."0.3.1"."alloc" or false); }
-      { "${deps.rand_core."0.3.1".rand_core}"."serde1" =
-        (f.rand_core."${deps.rand_core."0.3.1".rand_core}"."serde1" or false) ||
-        (rand_core."0.3.1"."serde1" or false) ||
-        (f."rand_core"."0.3.1"."serde1" or false); }
-      { "${deps.rand_core."0.3.1".rand_core}"."std" =
-        (f.rand_core."${deps.rand_core."0.3.1".rand_core}"."std" or false) ||
-        (rand_core."0.3.1"."std" or false) ||
-        (f."rand_core"."0.3.1"."std" or false); }
-      { "${deps.rand_core."0.3.1".rand_core}".default = true; }
-      { "0.3.1"."std" =
-        (f.rand_core."0.3.1"."std" or false) ||
-        (f.rand_core."0.3.1".default or false) ||
-        (rand_core."0.3.1"."default" or false); }
-      { "0.3.1".default = (f.rand_core."0.3.1".default or true); }
-    ];
-  }) [
-    (features_.rand_core."${deps."rand_core"."0.3.1"."rand_core"}" deps)
-  ];
-
-
-# end
-# rand_core-0.4.0
-
-  crates.rand_core."0.4.0" = deps: { features?(features_.rand_core."0.4.0" deps {}) }: buildRustCrate {
-    crateName = "rand_core";
-    version = "0.4.0";
-    description = "Core random number generator traits and tools for implementation.\n";
-    authors = [ "The Rand Project Developers" "The Rust Project Developers" ];
-    sha256 = "0wb5iwhffibj0pnpznhv1g3i7h1fnhz64s3nz74fz6vsm3q6q3br";
-    dependencies = mapFeatures features ([
-]);
-    features = mkFeatures (features."rand_core"."0.4.0" or {});
-  };
-  features_.rand_core."0.4.0" = deps: f: updateFeatures f (rec {
-    rand_core = fold recursiveUpdate {} [
-      { "0.4.0"."alloc" =
-        (f.rand_core."0.4.0"."alloc" or false) ||
-        (f.rand_core."0.4.0".std or false) ||
-        (rand_core."0.4.0"."std" or false); }
-      { "0.4.0"."serde" =
-        (f.rand_core."0.4.0"."serde" or false) ||
-        (f.rand_core."0.4.0".serde1 or false) ||
-        (rand_core."0.4.0"."serde1" or false); }
-      { "0.4.0"."serde_derive" =
-        (f.rand_core."0.4.0"."serde_derive" or false) ||
-        (f.rand_core."0.4.0".serde1 or false) ||
-        (rand_core."0.4.0"."serde1" or false); }
-      { "0.4.0".default = (f.rand_core."0.4.0".default or true); }
-    ];
-  }) [];
-
-
-# end
-# rand_os-0.1.3
-
-  crates.rand_os."0.1.3" = deps: { features?(features_.rand_os."0.1.3" deps {}) }: buildRustCrate {
-    crateName = "rand_os";
-    version = "0.1.3";
-    description = "OS backed Random Number Generator";
-    authors = [ "The Rand Project Developers" ];
-    sha256 = "0ywwspizgs9g8vzn6m5ix9yg36n15119d6n792h7mk4r5vs0ww4j";
-    dependencies = mapFeatures features ([
-      (crates."rand_core"."${deps."rand_os"."0.1.3"."rand_core"}" deps)
-    ])
-      ++ (if abi == "sgx" then mapFeatures features ([
-      (crates."rdrand"."${deps."rand_os"."0.1.3"."rdrand"}" deps)
-    ]) else [])
-      ++ (if kernel == "cloudabi" then mapFeatures features ([
-      (crates."cloudabi"."${deps."rand_os"."0.1.3"."cloudabi"}" deps)
-    ]) else [])
-      ++ (if kernel == "fuchsia" then mapFeatures features ([
-      (crates."fuchsia_cprng"."${deps."rand_os"."0.1.3"."fuchsia_cprng"}" deps)
-    ]) else [])
-      ++ (if (kernel == "linux" || kernel == "darwin") then mapFeatures features ([
-      (crates."libc"."${deps."rand_os"."0.1.3"."libc"}" deps)
-    ]) else [])
-      ++ (if kernel == "windows" then mapFeatures features ([
-      (crates."winapi"."${deps."rand_os"."0.1.3"."winapi"}" deps)
-    ]) else [])
-      ++ (if kernel == "wasm32-unknown-unknown" then mapFeatures features ([
-]) else []);
-  };
-  features_.rand_os."0.1.3" = deps: f: updateFeatures f ({
-    cloudabi."${deps.rand_os."0.1.3".cloudabi}".default = true;
-    fuchsia_cprng."${deps.rand_os."0.1.3".fuchsia_cprng}".default = true;
-    libc."${deps.rand_os."0.1.3".libc}".default = true;
-    rand_core = fold recursiveUpdate {} [
-      { "${deps.rand_os."0.1.3".rand_core}"."std" = true; }
-      { "${deps.rand_os."0.1.3".rand_core}".default = true; }
-    ];
-    rand_os."0.1.3".default = (f.rand_os."0.1.3".default or true);
-    rdrand."${deps.rand_os."0.1.3".rdrand}".default = true;
-    winapi = fold recursiveUpdate {} [
-      { "${deps.rand_os."0.1.3".winapi}"."minwindef" = true; }
-      { "${deps.rand_os."0.1.3".winapi}"."ntsecapi" = true; }
-      { "${deps.rand_os."0.1.3".winapi}"."winnt" = true; }
-      { "${deps.rand_os."0.1.3".winapi}".default = true; }
-    ];
-  }) [
-    (features_.rand_core."${deps."rand_os"."0.1.3"."rand_core"}" deps)
-    (features_.rdrand."${deps."rand_os"."0.1.3"."rdrand"}" deps)
-    (features_.cloudabi."${deps."rand_os"."0.1.3"."cloudabi"}" deps)
-    (features_.fuchsia_cprng."${deps."rand_os"."0.1.3"."fuchsia_cprng"}" deps)
-    (features_.libc."${deps."rand_os"."0.1.3"."libc"}" deps)
-    (features_.winapi."${deps."rand_os"."0.1.3"."winapi"}" deps)
-  ];
-
-
-# end
-# rdrand-0.4.0
-
-  crates.rdrand."0.4.0" = deps: { features?(features_.rdrand."0.4.0" deps {}) }: buildRustCrate {
-    crateName = "rdrand";
-    version = "0.4.0";
-    description = "An implementation of random number generator based on rdrand and rdseed instructions";
-    authors = [ "Simonas Kazlauskas <rdrand@kazlauskas.me>" ];
-    sha256 = "15hrcasn0v876wpkwab1dwbk9kvqwrb3iv4y4dibb6yxnfvzwajk";
-    dependencies = mapFeatures features ([
-      (crates."rand_core"."${deps."rdrand"."0.4.0"."rand_core"}" deps)
-    ]);
-    features = mkFeatures (features."rdrand"."0.4.0" or {});
-  };
-  features_.rdrand."0.4.0" = deps: f: updateFeatures f (rec {
-    rand_core."${deps.rdrand."0.4.0".rand_core}".default = (f.rand_core."${deps.rdrand."0.4.0".rand_core}".default or false);
-    rdrand = fold recursiveUpdate {} [
-      { "0.4.0"."std" =
-        (f.rdrand."0.4.0"."std" or false) ||
-        (f.rdrand."0.4.0".default or false) ||
-        (rdrand."0.4.0"."default" or false); }
-      { "0.4.0".default = (f.rdrand."0.4.0".default or true); }
-    ];
-  }) [
-    (features_.rand_core."${deps."rdrand"."0.4.0"."rand_core"}" deps)
-  ];
-
-
-# end
-# redox_syscall-0.1.40
-
-  crates.redox_syscall."0.1.40" = deps: { features?(features_.redox_syscall."0.1.40" deps {}) }: buildRustCrate {
-    crateName = "redox_syscall";
-    version = "0.1.40";
-    authors = [ "Jeremy Soller <jackpot51@gmail.com>" ];
-    sha256 = "132rnhrq49l3z7gjrwj2zfadgw6q0355s6a7id7x7c0d7sk72611";
-    libName = "syscall";
-  };
-  features_.redox_syscall."0.1.40" = deps: f: updateFeatures f ({
-    redox_syscall."0.1.40".default = (f.redox_syscall."0.1.40".default or true);
-  }) [];
-
-
-# end
-# redox_syscall-0.1.51
-
-  crates.redox_syscall."0.1.51" = deps: { features?(features_.redox_syscall."0.1.51" deps {}) }: buildRustCrate {
-    crateName = "redox_syscall";
-    version = "0.1.51";
-    description = "A Rust library to access raw Redox system calls";
-    authors = [ "Jeremy Soller <jackpot51@gmail.com>" ];
-    sha256 = "1a61cv7yydx64vpyvzr0z0hwzdvy4gcvcnfc6k70zpkngj5sz3ip";
-    libName = "syscall";
-  };
-  features_.redox_syscall."0.1.51" = deps: f: updateFeatures f ({
-    redox_syscall."0.1.51".default = (f.redox_syscall."0.1.51".default or true);
-  }) [];
-
-
-# end
-# redox_termios-0.1.1
-
-  crates.redox_termios."0.1.1" = deps: { features?(features_.redox_termios."0.1.1" deps {}) }: buildRustCrate {
-    crateName = "redox_termios";
-    version = "0.1.1";
-    authors = [ "Jeremy Soller <jackpot51@gmail.com>" ];
-    sha256 = "04s6yyzjca552hdaqlvqhp3vw0zqbc304md5czyd3axh56iry8wh";
-    libPath = "src/lib.rs";
-    dependencies = mapFeatures features ([
-      (crates."redox_syscall"."${deps."redox_termios"."0.1.1"."redox_syscall"}" deps)
-    ]);
-  };
-  features_.redox_termios."0.1.1" = deps: f: updateFeatures f ({
-    redox_syscall."${deps.redox_termios."0.1.1".redox_syscall}".default = true;
-    redox_termios."0.1.1".default = (f.redox_termios."0.1.1".default or true);
-  }) [
-    (features_.redox_syscall."${deps."redox_termios"."0.1.1"."redox_syscall"}" deps)
-  ];
-
-
-# end
-# redox_users-0.2.0
-
-  crates.redox_users."0.2.0" = deps: { features?(features_.redox_users."0.2.0" deps {}) }: buildRustCrate {
-    crateName = "redox_users";
-    version = "0.2.0";
-    authors = [ "Jose Narvaez <goyox86@gmail.com>" "Wesley Hershberger <mggmugginsmc@gmail.com>" ];
-    sha256 = "0s9jrh378jk8rfi1xfwxvh2r1gv6rn3bq6n7sbajkrqqq0xzijvf";
-    dependencies = mapFeatures features ([
-      (crates."argon2rs"."${deps."redox_users"."0.2.0"."argon2rs"}" deps)
-      (crates."failure"."${deps."redox_users"."0.2.0"."failure"}" deps)
-      (crates."rand"."${deps."redox_users"."0.2.0"."rand"}" deps)
-      (crates."redox_syscall"."${deps."redox_users"."0.2.0"."redox_syscall"}" deps)
-    ]);
-  };
-  features_.redox_users."0.2.0" = deps: f: updateFeatures f ({
-    argon2rs."${deps.redox_users."0.2.0".argon2rs}".default = (f.argon2rs."${deps.redox_users."0.2.0".argon2rs}".default or false);
-    failure."${deps.redox_users."0.2.0".failure}".default = true;
-    rand."${deps.redox_users."0.2.0".rand}".default = true;
-    redox_syscall."${deps.redox_users."0.2.0".redox_syscall}".default = true;
-    redox_users."0.2.0".default = (f.redox_users."0.2.0".default or true);
-  }) [
-    (features_.argon2rs."${deps."redox_users"."0.2.0"."argon2rs"}" deps)
-    (features_.failure."${deps."redox_users"."0.2.0"."failure"}" deps)
-    (features_.rand."${deps."redox_users"."0.2.0"."rand"}" deps)
-    (features_.redox_syscall."${deps."redox_users"."0.2.0"."redox_syscall"}" deps)
-  ];
-
-
-# end
-# redox_users-0.3.0
-
-  crates.redox_users."0.3.0" = deps: { features?(features_.redox_users."0.3.0" deps {}) }: buildRustCrate {
-    crateName = "redox_users";
-    version = "0.3.0";
-    description = "A Rust library to access Redox users and groups functionality";
-    authors = [ "Jose Narvaez <goyox86@gmail.com>" "Wesley Hershberger <mggmugginsmc@gmail.com>" ];
-    sha256 = "051rzqgk5hn7rf24nwgbb32zfdn8qp2kwqvdp0772ia85p737p4j";
-    dependencies = mapFeatures features ([
-      (crates."argon2rs"."${deps."redox_users"."0.3.0"."argon2rs"}" deps)
-      (crates."failure"."${deps."redox_users"."0.3.0"."failure"}" deps)
-      (crates."rand_os"."${deps."redox_users"."0.3.0"."rand_os"}" deps)
-      (crates."redox_syscall"."${deps."redox_users"."0.3.0"."redox_syscall"}" deps)
-    ]);
-  };
-  features_.redox_users."0.3.0" = deps: f: updateFeatures f ({
-    argon2rs."${deps.redox_users."0.3.0".argon2rs}".default = (f.argon2rs."${deps.redox_users."0.3.0".argon2rs}".default or false);
-    failure."${deps.redox_users."0.3.0".failure}".default = true;
-    rand_os."${deps.redox_users."0.3.0".rand_os}".default = true;
-    redox_syscall."${deps.redox_users."0.3.0".redox_syscall}".default = true;
-    redox_users."0.3.0".default = (f.redox_users."0.3.0".default or true);
-  }) [
-    (features_.argon2rs."${deps."redox_users"."0.3.0"."argon2rs"}" deps)
-    (features_.failure."${deps."redox_users"."0.3.0"."failure"}" deps)
-    (features_.rand_os."${deps."redox_users"."0.3.0"."rand_os"}" deps)
-    (features_.redox_syscall."${deps."redox_users"."0.3.0"."redox_syscall"}" deps)
-  ];
-
-
-# end
-# regex-1.0.5
-
-  crates.regex."1.0.5" = deps: { features?(features_.regex."1.0.5" deps {}) }: buildRustCrate {
-    crateName = "regex";
-    version = "1.0.5";
-    authors = [ "The Rust Project Developers" ];
-    sha256 = "1nb4dva9lhb3v76bdds9qcxldb2xy998sdraqnqaqdr6axfsfp02";
-    dependencies = mapFeatures features ([
-      (crates."aho_corasick"."${deps."regex"."1.0.5"."aho_corasick"}" deps)
-      (crates."memchr"."${deps."regex"."1.0.5"."memchr"}" deps)
-      (crates."regex_syntax"."${deps."regex"."1.0.5"."regex_syntax"}" deps)
-      (crates."thread_local"."${deps."regex"."1.0.5"."thread_local"}" deps)
-      (crates."utf8_ranges"."${deps."regex"."1.0.5"."utf8_ranges"}" deps)
-    ]);
-    features = mkFeatures (features."regex"."1.0.5" or {});
-  };
-  features_.regex."1.0.5" = deps: f: updateFeatures f (rec {
-    aho_corasick."${deps.regex."1.0.5".aho_corasick}".default = true;
-    memchr."${deps.regex."1.0.5".memchr}".default = true;
-    regex = fold recursiveUpdate {} [
-      { "1.0.5".default = (f.regex."1.0.5".default or true); }
-      { "1.0.5".pattern =
-        (f.regex."1.0.5".pattern or false) ||
-        (f.regex."1.0.5".unstable or false) ||
-        (regex."1.0.5"."unstable" or false); }
-      { "1.0.5".use_std =
-        (f.regex."1.0.5".use_std or false) ||
-        (f.regex."1.0.5".default or false) ||
-        (regex."1.0.5"."default" or false); }
-    ];
-    regex_syntax."${deps.regex."1.0.5".regex_syntax}".default = true;
-    thread_local."${deps.regex."1.0.5".thread_local}".default = true;
-    utf8_ranges."${deps.regex."1.0.5".utf8_ranges}".default = true;
-  }) [
-    (features_.aho_corasick."${deps."regex"."1.0.5"."aho_corasick"}" deps)
-    (features_.memchr."${deps."regex"."1.0.5"."memchr"}" deps)
-    (features_.regex_syntax."${deps."regex"."1.0.5"."regex_syntax"}" deps)
-    (features_.thread_local."${deps."regex"."1.0.5"."thread_local"}" deps)
-    (features_.utf8_ranges."${deps."regex"."1.0.5"."utf8_ranges"}" deps)
-  ];
-
-
-# end
-# regex-1.1.2
-
-  crates.regex."1.1.2" = deps: { features?(features_.regex."1.1.2" deps {}) }: buildRustCrate {
-    crateName = "regex";
-    version = "1.1.2";
-    description = "An implementation of regular expressions for Rust. This implementation uses\nfinite automata and guarantees linear time matching on all inputs.\n";
-    authors = [ "The Rust Project Developers" ];
-    sha256 = "1c9nb031z1vw5l6lzfkfra2mah9hb2s1wgq9f1lmgcbkiiprj9xd";
-    dependencies = mapFeatures features ([
-      (crates."aho_corasick"."${deps."regex"."1.1.2"."aho_corasick"}" deps)
-      (crates."memchr"."${deps."regex"."1.1.2"."memchr"}" deps)
-      (crates."regex_syntax"."${deps."regex"."1.1.2"."regex_syntax"}" deps)
-      (crates."thread_local"."${deps."regex"."1.1.2"."thread_local"}" deps)
-      (crates."utf8_ranges"."${deps."regex"."1.1.2"."utf8_ranges"}" deps)
-    ]);
-    features = mkFeatures (features."regex"."1.1.2" or {});
-  };
-  features_.regex."1.1.2" = deps: f: updateFeatures f (rec {
-    aho_corasick."${deps.regex."1.1.2".aho_corasick}".default = true;
-    memchr."${deps.regex."1.1.2".memchr}".default = true;
-    regex = fold recursiveUpdate {} [
-      { "1.1.2"."pattern" =
-        (f.regex."1.1.2"."pattern" or false) ||
-        (f.regex."1.1.2".unstable or false) ||
-        (regex."1.1.2"."unstable" or false); }
-      { "1.1.2"."use_std" =
-        (f.regex."1.1.2"."use_std" or false) ||
-        (f.regex."1.1.2".default or false) ||
-        (regex."1.1.2"."default" or false); }
-      { "1.1.2".default = (f.regex."1.1.2".default or true); }
-    ];
-    regex_syntax."${deps.regex."1.1.2".regex_syntax}".default = true;
-    thread_local."${deps.regex."1.1.2".thread_local}".default = true;
-    utf8_ranges."${deps.regex."1.1.2".utf8_ranges}".default = true;
-  }) [
-    (features_.aho_corasick."${deps."regex"."1.1.2"."aho_corasick"}" deps)
-    (features_.memchr."${deps."regex"."1.1.2"."memchr"}" deps)
-    (features_.regex_syntax."${deps."regex"."1.1.2"."regex_syntax"}" deps)
-    (features_.thread_local."${deps."regex"."1.1.2"."thread_local"}" deps)
-    (features_.utf8_ranges."${deps."regex"."1.1.2"."utf8_ranges"}" deps)
-  ];
-
-
-# end
-# regex-syntax-0.6.2
-
-  crates.regex_syntax."0.6.2" = deps: { features?(features_.regex_syntax."0.6.2" deps {}) }: buildRustCrate {
-    crateName = "regex-syntax";
-    version = "0.6.2";
-    authors = [ "The Rust Project Developers" ];
-    sha256 = "109426mj7nhwr6szdzbcvn1a8g5zy52f9maqxjd9agm8wg87ylyw";
-    dependencies = mapFeatures features ([
-      (crates."ucd_util"."${deps."regex_syntax"."0.6.2"."ucd_util"}" deps)
-    ]);
-  };
-  features_.regex_syntax."0.6.2" = deps: f: updateFeatures f ({
-    regex_syntax."0.6.2".default = (f.regex_syntax."0.6.2".default or true);
-    ucd_util."${deps.regex_syntax."0.6.2".ucd_util}".default = true;
-  }) [
-    (features_.ucd_util."${deps."regex_syntax"."0.6.2"."ucd_util"}" deps)
-  ];
-
-
-# end
-# regex-syntax-0.6.5
-
-  crates.regex_syntax."0.6.5" = deps: { features?(features_.regex_syntax."0.6.5" deps {}) }: buildRustCrate {
-    crateName = "regex-syntax";
-    version = "0.6.5";
-    description = "A regular expression parser.";
-    authors = [ "The Rust Project Developers" ];
-    sha256 = "0aaaba1fan2qfyc31wzdmgmbmyirc27zgcbz41ba5wm1lb2d8kli";
-    dependencies = mapFeatures features ([
-      (crates."ucd_util"."${deps."regex_syntax"."0.6.5"."ucd_util"}" deps)
-    ]);
-  };
-  features_.regex_syntax."0.6.5" = deps: f: updateFeatures f ({
-    regex_syntax."0.6.5".default = (f.regex_syntax."0.6.5".default or true);
-    ucd_util."${deps.regex_syntax."0.6.5".ucd_util}".default = true;
-  }) [
-    (features_.ucd_util."${deps."regex_syntax"."0.6.5"."ucd_util"}" deps)
-  ];
-
-
-# end
-# remove_dir_all-0.5.1
-
-  crates.remove_dir_all."0.5.1" = deps: { features?(features_.remove_dir_all."0.5.1" deps {}) }: buildRustCrate {
-    crateName = "remove_dir_all";
-    version = "0.5.1";
-    authors = [ "Aaronepower <theaaronepower@gmail.com>" ];
-    sha256 = "1chx3yvfbj46xjz4bzsvps208l46hfbcy0sm98gpiya454n4rrl7";
-    dependencies = (if kernel == "windows" then mapFeatures features ([
-      (crates."winapi"."${deps."remove_dir_all"."0.5.1"."winapi"}" deps)
-    ]) else []);
-  };
-  features_.remove_dir_all."0.5.1" = deps: f: updateFeatures f ({
-    remove_dir_all."0.5.1".default = (f.remove_dir_all."0.5.1".default or true);
-    winapi = fold recursiveUpdate {} [
-      { "${deps.remove_dir_all."0.5.1".winapi}"."errhandlingapi" = true; }
-      { "${deps.remove_dir_all."0.5.1".winapi}"."fileapi" = true; }
-      { "${deps.remove_dir_all."0.5.1".winapi}"."std" = true; }
-      { "${deps.remove_dir_all."0.5.1".winapi}"."winbase" = true; }
-      { "${deps.remove_dir_all."0.5.1".winapi}"."winerror" = true; }
-      { "${deps.remove_dir_all."0.5.1".winapi}".default = true; }
-    ];
-  }) [
-    (features_.winapi."${deps."remove_dir_all"."0.5.1"."winapi"}" deps)
-  ];
-
-
-# end
-# rustc-demangle-0.1.13
-
-  crates.rustc_demangle."0.1.13" = deps: { features?(features_.rustc_demangle."0.1.13" deps {}) }: buildRustCrate {
-    crateName = "rustc-demangle";
-    version = "0.1.13";
-    description = "Rust compiler symbol demangling.\n";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "0sr6cr02araqnlqwc5ghvnafjmkw11vzjswqaz757lvyrcl8xcy6";
-  };
-  features_.rustc_demangle."0.1.13" = deps: f: updateFeatures f ({
-    rustc_demangle."0.1.13".default = (f.rustc_demangle."0.1.13".default or true);
-  }) [];
-
-
-# end
-# rustc-demangle-0.1.9
-
-  crates.rustc_demangle."0.1.9" = deps: { features?(features_.rustc_demangle."0.1.9" deps {}) }: buildRustCrate {
-    crateName = "rustc-demangle";
-    version = "0.1.9";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "00ma4r9haq0zv5krps617mym6y74056pfcivyld0kpci156vfaax";
-  };
-  features_.rustc_demangle."0.1.9" = deps: f: updateFeatures f ({
-    rustc_demangle."0.1.9".default = (f.rustc_demangle."0.1.9".default or true);
-  }) [];
-
-
-# end
-# ryu-0.2.6
-
-  crates.ryu."0.2.6" = deps: { features?(features_.ryu."0.2.6" deps {}) }: buildRustCrate {
-    crateName = "ryu";
-    version = "0.2.6";
-    authors = [ "David Tolnay <dtolnay@gmail.com>" ];
-    sha256 = "1vdh6z4aysc9kiiqhl7vxkqz3fykcnp24kgfizshlwfsz2j0p9dr";
-    build = "build.rs";
-    dependencies = mapFeatures features ([
-]);
-    features = mkFeatures (features."ryu"."0.2.6" or {});
-  };
-  features_.ryu."0.2.6" = deps: f: updateFeatures f ({
-    ryu."0.2.6".default = (f.ryu."0.2.6".default or true);
-  }) [];
-
-
-# end
-# ryu-0.2.7
-
-  crates.ryu."0.2.7" = deps: { features?(features_.ryu."0.2.7" deps {}) }: buildRustCrate {
-    crateName = "ryu";
-    version = "0.2.7";
-    description = "Fast floating point to string conversion";
-    authors = [ "David Tolnay <dtolnay@gmail.com>" ];
-    sha256 = "0m8szf1m87wfqkwh1f9zp9bn2mb0m9nav028xxnd0hlig90b44bd";
-    build = "build.rs";
-    dependencies = mapFeatures features ([
-]);
-    features = mkFeatures (features."ryu"."0.2.7" or {});
-  };
-  features_.ryu."0.2.7" = deps: f: updateFeatures f ({
-    ryu."0.2.7".default = (f.ryu."0.2.7".default or true);
-  }) [];
-
-
-# end
-# scoped_threadpool-0.1.9
-
-  crates.scoped_threadpool."0.1.9" = deps: { features?(features_.scoped_threadpool."0.1.9" deps {}) }: buildRustCrate {
-    crateName = "scoped_threadpool";
-    version = "0.1.9";
-    authors = [ "Marvin Löbel <loebel.marvin@gmail.com>" ];
-    sha256 = "1arqj2skcfr46s1lcyvnlmfr5456kg5nhn8k90xyfjnxkp5yga2v";
-    features = mkFeatures (features."scoped_threadpool"."0.1.9" or {});
-  };
-  features_.scoped_threadpool."0.1.9" = deps: f: updateFeatures f ({
-    scoped_threadpool."0.1.9".default = (f.scoped_threadpool."0.1.9".default or true);
-  }) [];
-
-
-# end
-# serde-1.0.80
-
-  crates.serde."1.0.80" = deps: { features?(features_.serde."1.0.80" deps {}) }: buildRustCrate {
-    crateName = "serde";
-    version = "1.0.80";
-    authors = [ "Erick Tryzelaar <erick.tryzelaar@gmail.com>" "David Tolnay <dtolnay@gmail.com>" ];
-    sha256 = "0vyciw2qhrws4hz87pfnsjdfzzdw2sclxqxq394g3a219a2rdcxz";
-    build = "build.rs";
-    dependencies = mapFeatures features ([
-]);
-    features = mkFeatures (features."serde"."1.0.80" or {});
-  };
-  features_.serde."1.0.80" = deps: f: updateFeatures f (rec {
-    serde = fold recursiveUpdate {} [
-      { "1.0.80".default = (f.serde."1.0.80".default or true); }
-      { "1.0.80".serde_derive =
-        (f.serde."1.0.80".serde_derive or false) ||
-        (f.serde."1.0.80".derive or false) ||
-        (serde."1.0.80"."derive" or false); }
-      { "1.0.80".std =
-        (f.serde."1.0.80".std or false) ||
-        (f.serde."1.0.80".default or false) ||
-        (serde."1.0.80"."default" or false); }
-      { "1.0.80".unstable =
-        (f.serde."1.0.80".unstable or false) ||
-        (f.serde."1.0.80".alloc or false) ||
-        (serde."1.0.80"."alloc" or false); }
-    ];
-  }) [];
-
-
-# end
-# serde-1.0.84
-
-  crates.serde."1.0.84" = deps: { features?(features_.serde."1.0.84" deps {}) }: buildRustCrate {
-    crateName = "serde";
-    version = "1.0.84";
-    authors = [ "Erick Tryzelaar <erick.tryzelaar@gmail.com>" "David Tolnay <dtolnay@gmail.com>" ];
-    sha256 = "1x40cvvkbkz592jflwbfbxhim3wxdqp9dy0qxjw13ra7q57b29gy";
-    build = "build.rs";
-    dependencies = mapFeatures features ([
-]);
-    features = mkFeatures (features."serde"."1.0.84" or {});
-  };
-  features_.serde."1.0.84" = deps: f: updateFeatures f (rec {
-    serde = fold recursiveUpdate {} [
-      { "1.0.84".default = (f.serde."1.0.84".default or true); }
-      { "1.0.84".serde_derive =
-        (f.serde."1.0.84".serde_derive or false) ||
-        (f.serde."1.0.84".derive or false) ||
-        (serde."1.0.84"."derive" or false); }
-      { "1.0.84".std =
-        (f.serde."1.0.84".std or false) ||
-        (f.serde."1.0.84".default or false) ||
-        (serde."1.0.84"."default" or false); }
-      { "1.0.84".unstable =
-        (f.serde."1.0.84".unstable or false) ||
-        (f.serde."1.0.84".alloc or false) ||
-        (serde."1.0.84"."alloc" or false); }
-    ];
-  }) [];
-
-
-# end
-# serde-1.0.89
-
-  crates.serde."1.0.89" = deps: { features?(features_.serde."1.0.89" deps {}) }: buildRustCrate {
-    crateName = "serde";
-    version = "1.0.89";
-    description = "A generic serialization/deserialization framework";
-    authors = [ "Erick Tryzelaar <erick.tryzelaar@gmail.com>" "David Tolnay <dtolnay@gmail.com>" ];
-    sha256 = "14pidc6skkm92vhp431wi1aam5vv5g6rmsimik38wzb0qy72c71g";
-    build = "build.rs";
-    dependencies = mapFeatures features ([
-]);
-    features = mkFeatures (features."serde"."1.0.89" or {});
-  };
-  features_.serde."1.0.89" = deps: f: updateFeatures f (rec {
-    serde = fold recursiveUpdate {} [
-      { "1.0.89"."serde_derive" =
-        (f.serde."1.0.89"."serde_derive" or false) ||
-        (f.serde."1.0.89".derive or false) ||
-        (serde."1.0.89"."derive" or false); }
-      { "1.0.89"."std" =
-        (f.serde."1.0.89"."std" or false) ||
-        (f.serde."1.0.89".default or false) ||
-        (serde."1.0.89"."default" or false); }
-      { "1.0.89"."unstable" =
-        (f.serde."1.0.89"."unstable" or false) ||
-        (f.serde."1.0.89".alloc or false) ||
-        (serde."1.0.89"."alloc" or false); }
-      { "1.0.89".default = (f.serde."1.0.89".default or true); }
-    ];
-  }) [];
-
-
-# end
-# serde_derive-1.0.80
-
-  crates.serde_derive."1.0.80" = deps: { features?(features_.serde_derive."1.0.80" deps {}) }: buildRustCrate {
-    crateName = "serde_derive";
-    version = "1.0.80";
-    authors = [ "Erick Tryzelaar <erick.tryzelaar@gmail.com>" "David Tolnay <dtolnay@gmail.com>" ];
-    sha256 = "1akvzhbnnqhd92lfj7vp43scs1vdml7x27c82l5yh0kz7xf7jaky";
-    procMacro = true;
-    dependencies = mapFeatures features ([
-      (crates."proc_macro2"."${deps."serde_derive"."1.0.80"."proc_macro2"}" deps)
-      (crates."quote"."${deps."serde_derive"."1.0.80"."quote"}" deps)
-      (crates."syn"."${deps."serde_derive"."1.0.80"."syn"}" deps)
-    ]);
-    features = mkFeatures (features."serde_derive"."1.0.80" or {});
-  };
-  features_.serde_derive."1.0.80" = deps: f: updateFeatures f ({
-    proc_macro2."${deps.serde_derive."1.0.80".proc_macro2}".default = true;
-    quote."${deps.serde_derive."1.0.80".quote}".default = true;
-    serde_derive."1.0.80".default = (f.serde_derive."1.0.80".default or true);
-    syn = fold recursiveUpdate {} [
-      { "${deps.serde_derive."1.0.80".syn}"."visit" = true; }
-      { "${deps.serde_derive."1.0.80".syn}".default = true; }
-    ];
-  }) [
-    (features_.proc_macro2."${deps."serde_derive"."1.0.80"."proc_macro2"}" deps)
-    (features_.quote."${deps."serde_derive"."1.0.80"."quote"}" deps)
-    (features_.syn."${deps."serde_derive"."1.0.80"."syn"}" deps)
-  ];
-
-
-# end
-# serde_derive-1.0.89
-
-  crates.serde_derive."1.0.89" = deps: { features?(features_.serde_derive."1.0.89" deps {}) }: buildRustCrate {
-    crateName = "serde_derive";
-    version = "1.0.89";
-    description = "Macros 1.1 implementation of #[derive(Serialize, Deserialize)]";
-    authors = [ "Erick Tryzelaar <erick.tryzelaar@gmail.com>" "David Tolnay <dtolnay@gmail.com>" ];
-    sha256 = "0wxbxq9sccrd939pfnrgfzykkwl9gag2yf7vxhg2c2p9kx36d3wm";
-    procMacro = true;
-    dependencies = mapFeatures features ([
-      (crates."proc_macro2"."${deps."serde_derive"."1.0.89"."proc_macro2"}" deps)
-      (crates."quote"."${deps."serde_derive"."1.0.89"."quote"}" deps)
-      (crates."syn"."${deps."serde_derive"."1.0.89"."syn"}" deps)
-    ]);
-    features = mkFeatures (features."serde_derive"."1.0.89" or {});
-  };
-  features_.serde_derive."1.0.89" = deps: f: updateFeatures f ({
-    proc_macro2."${deps.serde_derive."1.0.89".proc_macro2}".default = true;
-    quote."${deps.serde_derive."1.0.89".quote}".default = true;
-    serde_derive."1.0.89".default = (f.serde_derive."1.0.89".default or true);
-    syn = fold recursiveUpdate {} [
-      { "${deps.serde_derive."1.0.89".syn}"."visit" = true; }
-      { "${deps.serde_derive."1.0.89".syn}".default = true; }
-    ];
-  }) [
-    (features_.proc_macro2."${deps."serde_derive"."1.0.89"."proc_macro2"}" deps)
-    (features_.quote."${deps."serde_derive"."1.0.89"."quote"}" deps)
-    (features_.syn."${deps."serde_derive"."1.0.89"."syn"}" deps)
-  ];
-
-
-# end
-# serde_json-1.0.32
-
-  crates.serde_json."1.0.32" = deps: { features?(features_.serde_json."1.0.32" deps {}) }: buildRustCrate {
-    crateName = "serde_json";
-    version = "1.0.32";
-    authors = [ "Erick Tryzelaar <erick.tryzelaar@gmail.com>" "David Tolnay <dtolnay@gmail.com>" ];
-    sha256 = "1dqkvizi02j1bs5c21kw20idf4aa5399g29ndwl6vkmmrqkr1gr0";
-    dependencies = mapFeatures features ([
-      (crates."itoa"."${deps."serde_json"."1.0.32"."itoa"}" deps)
-      (crates."ryu"."${deps."serde_json"."1.0.32"."ryu"}" deps)
-      (crates."serde"."${deps."serde_json"."1.0.32"."serde"}" deps)
-    ]);
-    features = mkFeatures (features."serde_json"."1.0.32" or {});
-  };
-  features_.serde_json."1.0.32" = deps: f: updateFeatures f (rec {
-    itoa."${deps.serde_json."1.0.32".itoa}".default = true;
-    ryu."${deps.serde_json."1.0.32".ryu}".default = true;
-    serde."${deps.serde_json."1.0.32".serde}".default = true;
-    serde_json = fold recursiveUpdate {} [
-      { "1.0.32".default = (f.serde_json."1.0.32".default or true); }
-      { "1.0.32".indexmap =
-        (f.serde_json."1.0.32".indexmap or false) ||
-        (f.serde_json."1.0.32".preserve_order or false) ||
-        (serde_json."1.0.32"."preserve_order" or false); }
-    ];
-  }) [
-    (features_.itoa."${deps."serde_json"."1.0.32"."itoa"}" deps)
-    (features_.ryu."${deps."serde_json"."1.0.32"."ryu"}" deps)
-    (features_.serde."${deps."serde_json"."1.0.32"."serde"}" deps)
-  ];
-
-
-# end
-# serde_json-1.0.39
-
-  crates.serde_json."1.0.39" = deps: { features?(features_.serde_json."1.0.39" deps {}) }: buildRustCrate {
-    crateName = "serde_json";
-    version = "1.0.39";
-    description = "A JSON serialization file format";
-    authors = [ "Erick Tryzelaar <erick.tryzelaar@gmail.com>" "David Tolnay <dtolnay@gmail.com>" ];
-    sha256 = "07ydv06hn8x0yl0rc94l2wl9r2xz1fqd97n1s6j3bgdc6gw406a8";
-    dependencies = mapFeatures features ([
-      (crates."itoa"."${deps."serde_json"."1.0.39"."itoa"}" deps)
-      (crates."ryu"."${deps."serde_json"."1.0.39"."ryu"}" deps)
-      (crates."serde"."${deps."serde_json"."1.0.39"."serde"}" deps)
-    ]);
-    features = mkFeatures (features."serde_json"."1.0.39" or {});
-  };
-  features_.serde_json."1.0.39" = deps: f: updateFeatures f (rec {
-    itoa."${deps.serde_json."1.0.39".itoa}".default = true;
-    ryu."${deps.serde_json."1.0.39".ryu}".default = true;
-    serde."${deps.serde_json."1.0.39".serde}".default = true;
-    serde_json = fold recursiveUpdate {} [
-      { "1.0.39"."indexmap" =
-        (f.serde_json."1.0.39"."indexmap" or false) ||
-        (f.serde_json."1.0.39".preserve_order or false) ||
-        (serde_json."1.0.39"."preserve_order" or false); }
-      { "1.0.39".default = (f.serde_json."1.0.39".default or true); }
-    ];
-  }) [
-    (features_.itoa."${deps."serde_json"."1.0.39"."itoa"}" deps)
-    (features_.ryu."${deps."serde_json"."1.0.39"."ryu"}" deps)
-    (features_.serde."${deps."serde_json"."1.0.39"."serde"}" deps)
-  ];
-
-
-# end
-# smallvec-0.6.9
-
-  crates.smallvec."0.6.9" = deps: { features?(features_.smallvec."0.6.9" deps {}) }: buildRustCrate {
-    crateName = "smallvec";
-    version = "0.6.9";
-    description = "'Small vector' optimization: store up to a small number of items on the stack";
-    authors = [ "Simon Sapin <simon.sapin@exyr.org>" ];
-    sha256 = "0p96l51a2pq5y0vn48nhbm6qslbc6k8h28cxm0pmzkqmj7xynz6w";
-    libPath = "lib.rs";
-    dependencies = mapFeatures features ([
-]);
-    features = mkFeatures (features."smallvec"."0.6.9" or {});
-  };
-  features_.smallvec."0.6.9" = deps: f: updateFeatures f (rec {
-    smallvec = fold recursiveUpdate {} [
-      { "0.6.9"."std" =
-        (f.smallvec."0.6.9"."std" or false) ||
-        (f.smallvec."0.6.9".default or false) ||
-        (smallvec."0.6.9"."default" or false); }
-      { "0.6.9".default = (f.smallvec."0.6.9".default or true); }
-    ];
-  }) [];
-
-
-# end
-# strsim-0.7.0
-
-  crates.strsim."0.7.0" = deps: { features?(features_.strsim."0.7.0" deps {}) }: buildRustCrate {
-    crateName = "strsim";
-    version = "0.7.0";
-    authors = [ "Danny Guo <dannyguo91@gmail.com>" ];
-    sha256 = "0fy0k5f2705z73mb3x9459bpcvrx4ky8jpr4zikcbiwan4bnm0iv";
-  };
-  features_.strsim."0.7.0" = deps: f: updateFeatures f ({
-    strsim."0.7.0".default = (f.strsim."0.7.0".default or true);
-  }) [];
-
-
-# end
-# syn-0.15.13
-
-  crates.syn."0.15.13" = deps: { features?(features_.syn."0.15.13" deps {}) }: buildRustCrate {
-    crateName = "syn";
-    version = "0.15.13";
-    authors = [ "David Tolnay <dtolnay@gmail.com>" ];
-    sha256 = "1zvnppl08f2njpkl3m10h221sdl4vsm7v6vyq63dxk16nn37b1bh";
-    dependencies = mapFeatures features ([
-      (crates."proc_macro2"."${deps."syn"."0.15.13"."proc_macro2"}" deps)
-      (crates."unicode_xid"."${deps."syn"."0.15.13"."unicode_xid"}" deps)
-    ]
-      ++ (if features.syn."0.15.13".quote or false then [ (crates.quote."${deps."syn"."0.15.13".quote}" deps) ] else []));
-    features = mkFeatures (features."syn"."0.15.13" or {});
-  };
-  features_.syn."0.15.13" = deps: f: updateFeatures f (rec {
-    proc_macro2 = fold recursiveUpdate {} [
-      { "${deps.syn."0.15.13".proc_macro2}"."proc-macro" =
-        (f.proc_macro2."${deps.syn."0.15.13".proc_macro2}"."proc-macro" or false) ||
-        (syn."0.15.13"."proc-macro" or false) ||
-        (f."syn"."0.15.13"."proc-macro" or false); }
-      { "${deps.syn."0.15.13".proc_macro2}".default = (f.proc_macro2."${deps.syn."0.15.13".proc_macro2}".default or false); }
-    ];
-    quote = fold recursiveUpdate {} [
-      { "${deps.syn."0.15.13".quote}"."proc-macro" =
-        (f.quote."${deps.syn."0.15.13".quote}"."proc-macro" or false) ||
-        (syn."0.15.13"."proc-macro" or false) ||
-        (f."syn"."0.15.13"."proc-macro" or false); }
-      { "${deps.syn."0.15.13".quote}".default = (f.quote."${deps.syn."0.15.13".quote}".default or false); }
-    ];
-    syn = fold recursiveUpdate {} [
-      { "0.15.13".clone-impls =
-        (f.syn."0.15.13".clone-impls or false) ||
-        (f.syn."0.15.13".default or false) ||
-        (syn."0.15.13"."default" or false); }
-      { "0.15.13".default = (f.syn."0.15.13".default or true); }
-      { "0.15.13".derive =
-        (f.syn."0.15.13".derive or false) ||
-        (f.syn."0.15.13".default or false) ||
-        (syn."0.15.13"."default" or false); }
-      { "0.15.13".parsing =
-        (f.syn."0.15.13".parsing or false) ||
-        (f.syn."0.15.13".default or false) ||
-        (syn."0.15.13"."default" or false); }
-      { "0.15.13".printing =
-        (f.syn."0.15.13".printing or false) ||
-        (f.syn."0.15.13".default or false) ||
-        (syn."0.15.13"."default" or false); }
-      { "0.15.13".proc-macro =
-        (f.syn."0.15.13".proc-macro or false) ||
-        (f.syn."0.15.13".default or false) ||
-        (syn."0.15.13"."default" or false); }
-      { "0.15.13".quote =
-        (f.syn."0.15.13".quote or false) ||
-        (f.syn."0.15.13".printing or false) ||
-        (syn."0.15.13"."printing" or false); }
-    ];
-    unicode_xid."${deps.syn."0.15.13".unicode_xid}".default = true;
-  }) [
-    (features_.proc_macro2."${deps."syn"."0.15.13"."proc_macro2"}" deps)
-    (features_.quote."${deps."syn"."0.15.13"."quote"}" deps)
-    (features_.unicode_xid."${deps."syn"."0.15.13"."unicode_xid"}" deps)
-  ];
-
-
-# end
-# syn-0.15.29
-
-  crates.syn."0.15.29" = deps: { features?(features_.syn."0.15.29" deps {}) }: buildRustCrate {
-    crateName = "syn";
-    version = "0.15.29";
-    description = "Parser for Rust source code";
-    authors = [ "David Tolnay <dtolnay@gmail.com>" ];
-    sha256 = "0wrd6awgc6f1iwfn2v9fvwyd2yddgxdjv9s106kvwg1ljbw3fajw";
-    dependencies = mapFeatures features ([
-      (crates."proc_macro2"."${deps."syn"."0.15.29"."proc_macro2"}" deps)
-      (crates."unicode_xid"."${deps."syn"."0.15.29"."unicode_xid"}" deps)
-    ]
-      ++ (if features.syn."0.15.29".quote or false then [ (crates.quote."${deps."syn"."0.15.29".quote}" deps) ] else []));
-    features = mkFeatures (features."syn"."0.15.29" or {});
-  };
-  features_.syn."0.15.29" = deps: f: updateFeatures f (rec {
-    proc_macro2 = fold recursiveUpdate {} [
-      { "${deps.syn."0.15.29".proc_macro2}"."proc-macro" =
-        (f.proc_macro2."${deps.syn."0.15.29".proc_macro2}"."proc-macro" or false) ||
-        (syn."0.15.29"."proc-macro" or false) ||
-        (f."syn"."0.15.29"."proc-macro" or false); }
-      { "${deps.syn."0.15.29".proc_macro2}".default = (f.proc_macro2."${deps.syn."0.15.29".proc_macro2}".default or false); }
-    ];
-    quote = fold recursiveUpdate {} [
-      { "${deps.syn."0.15.29".quote}"."proc-macro" =
-        (f.quote."${deps.syn."0.15.29".quote}"."proc-macro" or false) ||
-        (syn."0.15.29"."proc-macro" or false) ||
-        (f."syn"."0.15.29"."proc-macro" or false); }
-      { "${deps.syn."0.15.29".quote}".default = (f.quote."${deps.syn."0.15.29".quote}".default or false); }
-    ];
-    syn = fold recursiveUpdate {} [
-      { "0.15.29"."clone-impls" =
-        (f.syn."0.15.29"."clone-impls" or false) ||
-        (f.syn."0.15.29".default or false) ||
-        (syn."0.15.29"."default" or false); }
-      { "0.15.29"."derive" =
-        (f.syn."0.15.29"."derive" or false) ||
-        (f.syn."0.15.29".default or false) ||
-        (syn."0.15.29"."default" or false); }
-      { "0.15.29"."parsing" =
-        (f.syn."0.15.29"."parsing" or false) ||
-        (f.syn."0.15.29".default or false) ||
-        (syn."0.15.29"."default" or false); }
-      { "0.15.29"."printing" =
-        (f.syn."0.15.29"."printing" or false) ||
-        (f.syn."0.15.29".default or false) ||
-        (syn."0.15.29"."default" or false); }
-      { "0.15.29"."proc-macro" =
-        (f.syn."0.15.29"."proc-macro" or false) ||
-        (f.syn."0.15.29".default or false) ||
-        (syn."0.15.29"."default" or false); }
-      { "0.15.29"."quote" =
-        (f.syn."0.15.29"."quote" or false) ||
-        (f.syn."0.15.29".printing or false) ||
-        (syn."0.15.29"."printing" or false); }
-      { "0.15.29".default = (f.syn."0.15.29".default or true); }
-    ];
-    unicode_xid."${deps.syn."0.15.29".unicode_xid}".default = true;
-  }) [
-    (features_.proc_macro2."${deps."syn"."0.15.29"."proc_macro2"}" deps)
-    (features_.quote."${deps."syn"."0.15.29"."quote"}" deps)
-    (features_.unicode_xid."${deps."syn"."0.15.29"."unicode_xid"}" deps)
-  ];
-
-
-# end
-# synstructure-0.10.0
-
-  crates.synstructure."0.10.0" = deps: { features?(features_.synstructure."0.10.0" deps {}) }: buildRustCrate {
-    crateName = "synstructure";
-    version = "0.10.0";
-    authors = [ "Nika Layzell <nika@thelayzells.com>" ];
-    sha256 = "1alb4hsbm5qf4jy7nmdkqrh3jagqk1xj88w0pmz67f16dvgpf0qf";
-    dependencies = mapFeatures features ([
-      (crates."proc_macro2"."${deps."synstructure"."0.10.0"."proc_macro2"}" deps)
-      (crates."quote"."${deps."synstructure"."0.10.0"."quote"}" deps)
-      (crates."syn"."${deps."synstructure"."0.10.0"."syn"}" deps)
-      (crates."unicode_xid"."${deps."synstructure"."0.10.0"."unicode_xid"}" deps)
-    ]);
-    features = mkFeatures (features."synstructure"."0.10.0" or {});
-  };
-  features_.synstructure."0.10.0" = deps: f: updateFeatures f ({
-    proc_macro2."${deps.synstructure."0.10.0".proc_macro2}".default = true;
-    quote."${deps.synstructure."0.10.0".quote}".default = true;
-    syn = fold recursiveUpdate {} [
-      { "${deps.synstructure."0.10.0".syn}"."extra-traits" = true; }
-      { "${deps.synstructure."0.10.0".syn}"."visit" = true; }
-      { "${deps.synstructure."0.10.0".syn}".default = true; }
-    ];
-    synstructure."0.10.0".default = (f.synstructure."0.10.0".default or true);
-    unicode_xid."${deps.synstructure."0.10.0".unicode_xid}".default = true;
-  }) [
-    (features_.proc_macro2."${deps."synstructure"."0.10.0"."proc_macro2"}" deps)
-    (features_.quote."${deps."synstructure"."0.10.0"."quote"}" deps)
-    (features_.syn."${deps."synstructure"."0.10.0"."syn"}" deps)
-    (features_.unicode_xid."${deps."synstructure"."0.10.0"."unicode_xid"}" deps)
-  ];
-
-
-# end
-# synstructure-0.10.1
-
-  crates.synstructure."0.10.1" = deps: { features?(features_.synstructure."0.10.1" deps {}) }: buildRustCrate {
-    crateName = "synstructure";
-    version = "0.10.1";
-    description = "Helper methods and macros for custom derives";
-    authors = [ "Nika Layzell <nika@thelayzells.com>" ];
-    sha256 = "0mx2vwd0d0f7hanz15nkp0ikkfjsx9rfkph7pynxyfbj45ank4g3";
-    dependencies = mapFeatures features ([
-      (crates."proc_macro2"."${deps."synstructure"."0.10.1"."proc_macro2"}" deps)
-      (crates."quote"."${deps."synstructure"."0.10.1"."quote"}" deps)
-      (crates."syn"."${deps."synstructure"."0.10.1"."syn"}" deps)
-      (crates."unicode_xid"."${deps."synstructure"."0.10.1"."unicode_xid"}" deps)
-    ]);
-    features = mkFeatures (features."synstructure"."0.10.1" or {});
-  };
-  features_.synstructure."0.10.1" = deps: f: updateFeatures f ({
-    proc_macro2."${deps.synstructure."0.10.1".proc_macro2}".default = true;
-    quote."${deps.synstructure."0.10.1".quote}".default = true;
-    syn = fold recursiveUpdate {} [
-      { "${deps.synstructure."0.10.1".syn}"."extra-traits" = true; }
-      { "${deps.synstructure."0.10.1".syn}"."visit" = true; }
-      { "${deps.synstructure."0.10.1".syn}".default = true; }
-    ];
-    synstructure."0.10.1".default = (f.synstructure."0.10.1".default or true);
-    unicode_xid."${deps.synstructure."0.10.1".unicode_xid}".default = true;
-  }) [
-    (features_.proc_macro2."${deps."synstructure"."0.10.1"."proc_macro2"}" deps)
-    (features_.quote."${deps."synstructure"."0.10.1"."quote"}" deps)
-    (features_.syn."${deps."synstructure"."0.10.1"."syn"}" deps)
-    (features_.unicode_xid."${deps."synstructure"."0.10.1"."unicode_xid"}" deps)
-  ];
-
-
-# end
-# tempdir-0.3.7
-
-  crates.tempdir."0.3.7" = deps: { features?(features_.tempdir."0.3.7" deps {}) }: buildRustCrate {
-    crateName = "tempdir";
-    version = "0.3.7";
-    authors = [ "The Rust Project Developers" ];
-    sha256 = "0y53sxybyljrr7lh0x0ysrsa7p7cljmwv9v80acy3rc6n97g67vy";
-    dependencies = mapFeatures features ([
-      (crates."rand"."${deps."tempdir"."0.3.7"."rand"}" deps)
-      (crates."remove_dir_all"."${deps."tempdir"."0.3.7"."remove_dir_all"}" deps)
-    ]);
-  };
-  features_.tempdir."0.3.7" = deps: f: updateFeatures f ({
-    rand."${deps.tempdir."0.3.7".rand}".default = true;
-    remove_dir_all."${deps.tempdir."0.3.7".remove_dir_all}".default = true;
-    tempdir."0.3.7".default = (f.tempdir."0.3.7".default or true);
-  }) [
-    (features_.rand."${deps."tempdir"."0.3.7"."rand"}" deps)
-    (features_.remove_dir_all."${deps."tempdir"."0.3.7"."remove_dir_all"}" deps)
-  ];
-
-
-# end
-# termcolor-1.0.4
-
-  crates.termcolor."1.0.4" = deps: { features?(features_.termcolor."1.0.4" deps {}) }: buildRustCrate {
-    crateName = "termcolor";
-    version = "1.0.4";
-    authors = [ "Andrew Gallant <jamslam@gmail.com>" ];
-    sha256 = "0xydrjc0bxg08llcbcmkka29szdrfklk4vh6l6mdd67ajifqw1mv";
-    dependencies = (if kernel == "windows" then mapFeatures features ([
-      (crates."wincolor"."${deps."termcolor"."1.0.4"."wincolor"}" deps)
-    ]) else []);
-  };
-  features_.termcolor."1.0.4" = deps: f: updateFeatures f ({
-    termcolor."1.0.4".default = (f.termcolor."1.0.4".default or true);
-    wincolor."${deps.termcolor."1.0.4".wincolor}".default = true;
-  }) [
-    (features_.wincolor."${deps."termcolor"."1.0.4"."wincolor"}" deps)
-  ];
-
-
-# end
-# termion-1.5.1
-
-  crates.termion."1.5.1" = deps: { features?(features_.termion."1.5.1" deps {}) }: buildRustCrate {
-    crateName = "termion";
-    version = "1.5.1";
-    authors = [ "ticki <Ticki@users.noreply.github.com>" "gycos <alexandre.bury@gmail.com>" "IGI-111 <igi-111@protonmail.com>" ];
-    sha256 = "02gq4vd8iws1f3gjrgrgpajsk2bk43nds5acbbb4s8dvrdvr8nf1";
-    dependencies = (if !(kernel == "redox") then mapFeatures features ([
-      (crates."libc"."${deps."termion"."1.5.1"."libc"}" deps)
-    ]) else [])
-      ++ (if kernel == "redox" then mapFeatures features ([
-      (crates."redox_syscall"."${deps."termion"."1.5.1"."redox_syscall"}" deps)
-      (crates."redox_termios"."${deps."termion"."1.5.1"."redox_termios"}" deps)
-    ]) else []);
-  };
-  features_.termion."1.5.1" = deps: f: updateFeatures f ({
-    libc."${deps.termion."1.5.1".libc}".default = true;
-    redox_syscall."${deps.termion."1.5.1".redox_syscall}".default = true;
-    redox_termios."${deps.termion."1.5.1".redox_termios}".default = true;
-    termion."1.5.1".default = (f.termion."1.5.1".default or true);
-  }) [
-    (features_.libc."${deps."termion"."1.5.1"."libc"}" deps)
-    (features_.redox_syscall."${deps."termion"."1.5.1"."redox_syscall"}" deps)
-    (features_.redox_termios."${deps."termion"."1.5.1"."redox_termios"}" deps)
-  ];
-
-
-# end
-# textwrap-0.10.0
-
-  crates.textwrap."0.10.0" = deps: { features?(features_.textwrap."0.10.0" deps {}) }: buildRustCrate {
-    crateName = "textwrap";
-    version = "0.10.0";
-    authors = [ "Martin Geisler <martin@geisler.net>" ];
-    sha256 = "1s8d5cna12smhgj0x2y1xphklyk2an1yzbadnj89p1vy5vnjpsas";
-    dependencies = mapFeatures features ([
-      (crates."unicode_width"."${deps."textwrap"."0.10.0"."unicode_width"}" deps)
-    ]);
-  };
-  features_.textwrap."0.10.0" = deps: f: updateFeatures f ({
-    textwrap."0.10.0".default = (f.textwrap."0.10.0".default or true);
-    unicode_width."${deps.textwrap."0.10.0".unicode_width}".default = true;
-  }) [
-    (features_.unicode_width."${deps."textwrap"."0.10.0"."unicode_width"}" deps)
-  ];
-
-
-# end
-# thread_local-0.3.6
-
-  crates.thread_local."0.3.6" = deps: { features?(features_.thread_local."0.3.6" deps {}) }: buildRustCrate {
-    crateName = "thread_local";
-    version = "0.3.6";
-    authors = [ "Amanieu d'Antras <amanieu@gmail.com>" ];
-    sha256 = "02rksdwjmz2pw9bmgbb4c0bgkbq5z6nvg510sq1s6y2j1gam0c7i";
-    dependencies = mapFeatures features ([
-      (crates."lazy_static"."${deps."thread_local"."0.3.6"."lazy_static"}" deps)
-    ]);
-  };
-  features_.thread_local."0.3.6" = deps: f: updateFeatures f ({
-    lazy_static."${deps.thread_local."0.3.6".lazy_static}".default = true;
-    thread_local."0.3.6".default = (f.thread_local."0.3.6".default or true);
-  }) [
-    (features_.lazy_static."${deps."thread_local"."0.3.6"."lazy_static"}" deps)
-  ];
-
-
-# end
-# toml-0.4.10
-
-  crates.toml."0.4.10" = deps: { features?(features_.toml."0.4.10" deps {}) }: buildRustCrate {
-    crateName = "toml";
-    version = "0.4.10";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "0fs4kxl86w3kmgwcgcv23nk79zagayz1spg281r83w0ywf88d6f1";
-    dependencies = mapFeatures features ([
-      (crates."serde"."${deps."toml"."0.4.10"."serde"}" deps)
-    ]);
-  };
-  features_.toml."0.4.10" = deps: f: updateFeatures f ({
-    serde."${deps.toml."0.4.10".serde}".default = true;
-    toml."0.4.10".default = (f.toml."0.4.10".default or true);
-  }) [
-    (features_.serde."${deps."toml"."0.4.10"."serde"}" deps)
-  ];
-
-
-# end
-# toml-0.4.8
-
-  crates.toml."0.4.8" = deps: { features?(features_.toml."0.4.8" deps {}) }: buildRustCrate {
-    crateName = "toml";
-    version = "0.4.8";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "1xm3chgsvi3qqi7vj8sb5xvnbfpkqyl4fiwh7y2cl6r4brwlmif1";
-    dependencies = mapFeatures features ([
-      (crates."serde"."${deps."toml"."0.4.8"."serde"}" deps)
-    ]);
-  };
-  features_.toml."0.4.8" = deps: f: updateFeatures f ({
-    serde."${deps.toml."0.4.8".serde}".default = true;
-    toml."0.4.8".default = (f.toml."0.4.8".default or true);
-  }) [
-    (features_.serde."${deps."toml"."0.4.8"."serde"}" deps)
-  ];
-
-
-# end
-# toml-0.5.0
-
-  crates.toml."0.5.0" = deps: { features?(features_.toml."0.5.0" deps {}) }: buildRustCrate {
-    crateName = "toml";
-    version = "0.5.0";
-    description = "A native Rust encoder and decoder of TOML-formatted files and streams. Provides\nimplementations of the standard Serialize/Deserialize traits for TOML data to\nfacilitate deserializing and serializing Rust structures.\n";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "0l2lqzbn5g9l376k01isq1nhb14inkr4c50qbjbdzh5qysz7dyk5";
-    dependencies = mapFeatures features ([
-      (crates."serde"."${deps."toml"."0.5.0"."serde"}" deps)
-    ]);
-    features = mkFeatures (features."toml"."0.5.0" or {});
-  };
-  features_.toml."0.5.0" = deps: f: updateFeatures f (rec {
-    serde."${deps.toml."0.5.0".serde}".default = true;
-    toml = fold recursiveUpdate {} [
-      { "0.5.0"."linked-hash-map" =
-        (f.toml."0.5.0"."linked-hash-map" or false) ||
-        (f.toml."0.5.0".preserve_order or false) ||
-        (toml."0.5.0"."preserve_order" or false); }
-      { "0.5.0".default = (f.toml."0.5.0".default or true); }
-    ];
-  }) [
-    (features_.serde."${deps."toml"."0.5.0"."serde"}" deps)
-  ];
-
-
-# end
-# toml2nix-0.1.1
-
-  crates.toml2nix."0.1.1" = deps: { features?(features_.toml2nix."0.1.1" deps {}) }: buildRustCrate {
-    crateName = "toml2nix";
-    version = "0.1.1";
-    authors = [ "Pierre-Étienne Meunier <pierre-etienne.meunier@inria.fr>" ];
-    sha256 = "167qyylp0s76h7r0n99as3jwry5mrn5q1wxh2sdwh51d5qnnw6b2";
-    dependencies = mapFeatures features ([
-      (crates."toml"."${deps."toml2nix"."0.1.1"."toml"}" deps)
-    ]);
-  };
-  features_.toml2nix."0.1.1" = deps: f: updateFeatures f ({
-    toml."${deps.toml2nix."0.1.1".toml}".default = true;
-    toml2nix."0.1.1".default = (f.toml2nix."0.1.1".default or true);
-  }) [
-    (features_.toml."${deps."toml2nix"."0.1.1"."toml"}" deps)
-  ];
-
-
-# end
-# ucd-util-0.1.1
-
-  crates.ucd_util."0.1.1" = deps: { features?(features_.ucd_util."0.1.1" deps {}) }: buildRustCrate {
-    crateName = "ucd-util";
-    version = "0.1.1";
-    authors = [ "Andrew Gallant <jamslam@gmail.com>" ];
-    sha256 = "02a8h3siipx52b832xc8m8rwasj6nx9jpiwfldw8hp6k205hgkn0";
-  };
-  features_.ucd_util."0.1.1" = deps: f: updateFeatures f ({
-    ucd_util."0.1.1".default = (f.ucd_util."0.1.1".default or true);
-  }) [];
-
-
-# end
-# ucd-util-0.1.3
-
-  crates.ucd_util."0.1.3" = deps: { features?(features_.ucd_util."0.1.3" deps {}) }: buildRustCrate {
-    crateName = "ucd-util";
-    version = "0.1.3";
-    description = "A small utility library for working with the Unicode character database.\n";
-    authors = [ "Andrew Gallant <jamslam@gmail.com>" ];
-    sha256 = "1n1qi3jywq5syq90z9qd8qzbn58pcjgv1sx4sdmipm4jf9zanz15";
-  };
-  features_.ucd_util."0.1.3" = deps: f: updateFeatures f ({
-    ucd_util."0.1.3".default = (f.ucd_util."0.1.3".default or true);
-  }) [];
-
-
-# end
-# unicode-bidi-0.3.4
-
-  crates.unicode_bidi."0.3.4" = deps: { features?(features_.unicode_bidi."0.3.4" deps {}) }: buildRustCrate {
-    crateName = "unicode-bidi";
-    version = "0.3.4";
-    authors = [ "The Servo Project Developers" ];
-    sha256 = "0lcd6jasrf8p9p0q20qyf10c6xhvw40m2c4rr105hbk6zy26nj1q";
-    libName = "unicode_bidi";
-    dependencies = mapFeatures features ([
-      (crates."matches"."${deps."unicode_bidi"."0.3.4"."matches"}" deps)
-    ]);
-    features = mkFeatures (features."unicode_bidi"."0.3.4" or {});
-  };
-  features_.unicode_bidi."0.3.4" = deps: f: updateFeatures f (rec {
-    matches."${deps.unicode_bidi."0.3.4".matches}".default = true;
-    unicode_bidi = fold recursiveUpdate {} [
-      { "0.3.4".default = (f.unicode_bidi."0.3.4".default or true); }
-      { "0.3.4".flame =
-        (f.unicode_bidi."0.3.4".flame or false) ||
-        (f.unicode_bidi."0.3.4".flame_it or false) ||
-        (unicode_bidi."0.3.4"."flame_it" or false); }
-      { "0.3.4".flamer =
-        (f.unicode_bidi."0.3.4".flamer or false) ||
-        (f.unicode_bidi."0.3.4".flame_it or false) ||
-        (unicode_bidi."0.3.4"."flame_it" or false); }
-      { "0.3.4".serde =
-        (f.unicode_bidi."0.3.4".serde or false) ||
-        (f.unicode_bidi."0.3.4".with_serde or false) ||
-        (unicode_bidi."0.3.4"."with_serde" or false); }
-    ];
-  }) [
-    (features_.matches."${deps."unicode_bidi"."0.3.4"."matches"}" deps)
-  ];
-
-
-# end
-# unicode-normalization-0.1.7
-
-  crates.unicode_normalization."0.1.7" = deps: { features?(features_.unicode_normalization."0.1.7" deps {}) }: buildRustCrate {
-    crateName = "unicode-normalization";
-    version = "0.1.7";
-    authors = [ "kwantam <kwantam@gmail.com>" ];
-    sha256 = "1da2hv800pd0wilmn4idwpgv5p510hjxizjcfv6xzb40xcsjd8gs";
-  };
-  features_.unicode_normalization."0.1.7" = deps: f: updateFeatures f ({
-    unicode_normalization."0.1.7".default = (f.unicode_normalization."0.1.7".default or true);
-  }) [];
-
-
-# end
-# unicode-normalization-0.1.8
-
-  crates.unicode_normalization."0.1.8" = deps: { features?(features_.unicode_normalization."0.1.8" deps {}) }: buildRustCrate {
-    crateName = "unicode-normalization";
-    version = "0.1.8";
-    description = "This crate provides functions for normalization of\nUnicode strings, including Canonical and Compatible\nDecomposition and Recomposition, as described in\nUnicode Standard Annex #15.\n";
-    authors = [ "kwantam <kwantam@gmail.com>" ];
-    sha256 = "1pb26i2xd5zz0icabyqahikpca0iwj2jd4145pczc4bb7p641dsz";
-    dependencies = mapFeatures features ([
-      (crates."smallvec"."${deps."unicode_normalization"."0.1.8"."smallvec"}" deps)
-    ]);
-  };
-  features_.unicode_normalization."0.1.8" = deps: f: updateFeatures f ({
-    smallvec."${deps.unicode_normalization."0.1.8".smallvec}".default = true;
-    unicode_normalization."0.1.8".default = (f.unicode_normalization."0.1.8".default or true);
-  }) [
-    (features_.smallvec."${deps."unicode_normalization"."0.1.8"."smallvec"}" deps)
-  ];
-
-
-# end
-# unicode-width-0.1.5
-
-  crates.unicode_width."0.1.5" = deps: { features?(features_.unicode_width."0.1.5" deps {}) }: buildRustCrate {
-    crateName = "unicode-width";
-    version = "0.1.5";
-    authors = [ "kwantam <kwantam@gmail.com>" ];
-    sha256 = "0886lc2aymwgy0lhavwn6s48ik3c61ykzzd3za6prgnw51j7bi4w";
-    features = mkFeatures (features."unicode_width"."0.1.5" or {});
-  };
-  features_.unicode_width."0.1.5" = deps: f: updateFeatures f ({
-    unicode_width."0.1.5".default = (f.unicode_width."0.1.5".default or true);
-  }) [];
-
-
-# end
-# unicode-xid-0.1.0
-
-  crates.unicode_xid."0.1.0" = deps: { features?(features_.unicode_xid."0.1.0" deps {}) }: buildRustCrate {
-    crateName = "unicode-xid";
-    version = "0.1.0";
-    authors = [ "erick.tryzelaar <erick.tryzelaar@gmail.com>" "kwantam <kwantam@gmail.com>" ];
-    sha256 = "05wdmwlfzxhq3nhsxn6wx4q8dhxzzfb9szsz6wiw092m1rjj01zj";
-    features = mkFeatures (features."unicode_xid"."0.1.0" or {});
-  };
-  features_.unicode_xid."0.1.0" = deps: f: updateFeatures f ({
-    unicode_xid."0.1.0".default = (f.unicode_xid."0.1.0".default or true);
-  }) [];
-
-
-# end
-# url-1.7.2
-
-  crates.url."1.7.2" = deps: { features?(features_.url."1.7.2" deps {}) }: buildRustCrate {
-    crateName = "url";
-    version = "1.7.2";
-    authors = [ "The rust-url developers" ];
-    sha256 = "0qzrjzd9r1niv7037x4cgnv98fs1vj0k18lpxx890ipc47x5gc09";
-    dependencies = mapFeatures features ([
-      (crates."idna"."${deps."url"."1.7.2"."idna"}" deps)
-      (crates."matches"."${deps."url"."1.7.2"."matches"}" deps)
-      (crates."percent_encoding"."${deps."url"."1.7.2"."percent_encoding"}" deps)
-    ]);
-    features = mkFeatures (features."url"."1.7.2" or {});
-  };
-  features_.url."1.7.2" = deps: f: updateFeatures f (rec {
-    idna."${deps.url."1.7.2".idna}".default = true;
-    matches."${deps.url."1.7.2".matches}".default = true;
-    percent_encoding."${deps.url."1.7.2".percent_encoding}".default = true;
-    url = fold recursiveUpdate {} [
-      { "1.7.2".default = (f.url."1.7.2".default or true); }
-      { "1.7.2".encoding =
-        (f.url."1.7.2".encoding or false) ||
-        (f.url."1.7.2".query_encoding or false) ||
-        (url."1.7.2"."query_encoding" or false); }
-      { "1.7.2".heapsize =
-        (f.url."1.7.2".heapsize or false) ||
-        (f.url."1.7.2".heap_size or false) ||
-        (url."1.7.2"."heap_size" or false); }
-    ];
-  }) [
-    (features_.idna."${deps."url"."1.7.2"."idna"}" deps)
-    (features_.matches."${deps."url"."1.7.2"."matches"}" deps)
-    (features_.percent_encoding."${deps."url"."1.7.2"."percent_encoding"}" deps)
-  ];
-
-
-# end
-# utf8-ranges-1.0.1
-
-  crates.utf8_ranges."1.0.1" = deps: { features?(features_.utf8_ranges."1.0.1" deps {}) }: buildRustCrate {
-    crateName = "utf8-ranges";
-    version = "1.0.1";
-    authors = [ "Andrew Gallant <jamslam@gmail.com>" ];
-    sha256 = "1s56ihd2c8ba6191078wivvv59247szaiszrh8x2rxqfsxlfrnpp";
-  };
-  features_.utf8_ranges."1.0.1" = deps: f: updateFeatures f ({
-    utf8_ranges."1.0.1".default = (f.utf8_ranges."1.0.1".default or true);
-  }) [];
-
-
-# end
-# utf8-ranges-1.0.2
-
-  crates.utf8_ranges."1.0.2" = deps: { features?(features_.utf8_ranges."1.0.2" deps {}) }: buildRustCrate {
-    crateName = "utf8-ranges";
-    version = "1.0.2";
-    description = "Convert ranges of Unicode codepoints to UTF-8 byte ranges.";
-    authors = [ "Andrew Gallant <jamslam@gmail.com>" ];
-    sha256 = "1my02laqsgnd8ib4dvjgd4rilprqjad6pb9jj9vi67csi5qs2281";
-  };
-  features_.utf8_ranges."1.0.2" = deps: f: updateFeatures f ({
-    utf8_ranges."1.0.2".default = (f.utf8_ranges."1.0.2".default or true);
-  }) [];
-
-
-# end
-# vec_map-0.8.1
-
-  crates.vec_map."0.8.1" = deps: { features?(features_.vec_map."0.8.1" deps {}) }: buildRustCrate {
-    crateName = "vec_map";
-    version = "0.8.1";
-    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 <>" ];
-    sha256 = "1jj2nrg8h3l53d43rwkpkikq5a5x15ms4rf1rw92hp5lrqhi8mpi";
-    dependencies = mapFeatures features ([
-]);
-    features = mkFeatures (features."vec_map"."0.8.1" or {});
-  };
-  features_.vec_map."0.8.1" = deps: f: updateFeatures f (rec {
-    vec_map = fold recursiveUpdate {} [
-      { "0.8.1".default = (f.vec_map."0.8.1".default or true); }
-      { "0.8.1".serde =
-        (f.vec_map."0.8.1".serde or false) ||
-        (f.vec_map."0.8.1".eders or false) ||
-        (vec_map."0.8.1"."eders" or false); }
-    ];
-  }) [];
-
-
-# end
-# version_check-0.1.5
-
-  crates.version_check."0.1.5" = deps: { features?(features_.version_check."0.1.5" deps {}) }: buildRustCrate {
-    crateName = "version_check";
-    version = "0.1.5";
-    authors = [ "Sergio Benitez <sb@sergio.bz>" ];
-    sha256 = "1yrx9xblmwbafw2firxyqbj8f771kkzfd24n3q7xgwiqyhi0y8qd";
-  };
-  features_.version_check."0.1.5" = deps: f: updateFeatures f ({
-    version_check."0.1.5".default = (f.version_check."0.1.5".default or true);
-  }) [];
-
-
-# end
-# winapi-0.3.6
-
-  crates.winapi."0.3.6" = deps: { features?(features_.winapi."0.3.6" deps {}) }: buildRustCrate {
-    crateName = "winapi";
-    version = "0.3.6";
-    authors = [ "Peter Atashian <retep998@gmail.com>" ];
-    sha256 = "1d9jfp4cjd82sr1q4dgdlrkvm33zhhav9d7ihr0nivqbncr059m4";
-    build = "build.rs";
-    dependencies = (if kernel == "i686-pc-windows-gnu" then mapFeatures features ([
-      (crates."winapi_i686_pc_windows_gnu"."${deps."winapi"."0.3.6"."winapi_i686_pc_windows_gnu"}" deps)
-    ]) else [])
-      ++ (if kernel == "x86_64-pc-windows-gnu" then mapFeatures features ([
-      (crates."winapi_x86_64_pc_windows_gnu"."${deps."winapi"."0.3.6"."winapi_x86_64_pc_windows_gnu"}" deps)
-    ]) else []);
-    features = mkFeatures (features."winapi"."0.3.6" or {});
-  };
-  features_.winapi."0.3.6" = deps: f: updateFeatures f ({
-    winapi."0.3.6".default = (f.winapi."0.3.6".default or true);
-    winapi_i686_pc_windows_gnu."${deps.winapi."0.3.6".winapi_i686_pc_windows_gnu}".default = true;
-    winapi_x86_64_pc_windows_gnu."${deps.winapi."0.3.6".winapi_x86_64_pc_windows_gnu}".default = true;
-  }) [
-    (features_.winapi_i686_pc_windows_gnu."${deps."winapi"."0.3.6"."winapi_i686_pc_windows_gnu"}" deps)
-    (features_.winapi_x86_64_pc_windows_gnu."${deps."winapi"."0.3.6"."winapi_x86_64_pc_windows_gnu"}" deps)
-  ];
-
-
-# end
-# winapi-i686-pc-windows-gnu-0.4.0
-
-  crates.winapi_i686_pc_windows_gnu."0.4.0" = deps: { features?(features_.winapi_i686_pc_windows_gnu."0.4.0" deps {}) }: buildRustCrate {
-    crateName = "winapi-i686-pc-windows-gnu";
-    version = "0.4.0";
-    authors = [ "Peter Atashian <retep998@gmail.com>" ];
-    sha256 = "05ihkij18r4gamjpxj4gra24514can762imjzlmak5wlzidplzrp";
-    build = "build.rs";
-  };
-  features_.winapi_i686_pc_windows_gnu."0.4.0" = deps: f: updateFeatures f ({
-    winapi_i686_pc_windows_gnu."0.4.0".default = (f.winapi_i686_pc_windows_gnu."0.4.0".default or true);
-  }) [];
-
-
-# end
-# winapi-util-0.1.1
-
-  crates.winapi_util."0.1.1" = deps: { features?(features_.winapi_util."0.1.1" deps {}) }: buildRustCrate {
-    crateName = "winapi-util";
-    version = "0.1.1";
-    authors = [ "Andrew Gallant <jamslam@gmail.com>" ];
-    sha256 = "10madanla73aagbklx6y73r2g2vwq9w8a0qcghbbbpn9vfr6a95f";
-    dependencies = (if kernel == "windows" then mapFeatures features ([
-      (crates."winapi"."${deps."winapi_util"."0.1.1"."winapi"}" deps)
-    ]) else []);
-  };
-  features_.winapi_util."0.1.1" = deps: f: updateFeatures f ({
-    winapi = fold recursiveUpdate {} [
-      { "${deps.winapi_util."0.1.1".winapi}"."consoleapi" = true; }
-      { "${deps.winapi_util."0.1.1".winapi}"."errhandlingapi" = true; }
-      { "${deps.winapi_util."0.1.1".winapi}"."fileapi" = true; }
-      { "${deps.winapi_util."0.1.1".winapi}"."minwindef" = true; }
-      { "${deps.winapi_util."0.1.1".winapi}"."processenv" = true; }
-      { "${deps.winapi_util."0.1.1".winapi}"."std" = true; }
-      { "${deps.winapi_util."0.1.1".winapi}"."winbase" = true; }
-      { "${deps.winapi_util."0.1.1".winapi}"."wincon" = true; }
-      { "${deps.winapi_util."0.1.1".winapi}"."winerror" = true; }
-      { "${deps.winapi_util."0.1.1".winapi}".default = true; }
-    ];
-    winapi_util."0.1.1".default = (f.winapi_util."0.1.1".default or true);
-  }) [
-    (features_.winapi."${deps."winapi_util"."0.1.1"."winapi"}" deps)
-  ];
-
-
-# end
-# winapi-util-0.1.2
-
-  crates.winapi_util."0.1.2" = deps: { features?(features_.winapi_util."0.1.2" deps {}) }: buildRustCrate {
-    crateName = "winapi-util";
-    version = "0.1.2";
-    description = "A dumping ground for high level safe wrappers over winapi.";
-    authors = [ "Andrew Gallant <jamslam@gmail.com>" ];
-    sha256 = "07jj7rg7nndd7bqhjin1xphbv8kb5clvhzpqpxkvm3wl84r3mj1h";
-    dependencies = (if kernel == "windows" then mapFeatures features ([
-      (crates."winapi"."${deps."winapi_util"."0.1.2"."winapi"}" deps)
-    ]) else []);
-  };
-  features_.winapi_util."0.1.2" = deps: f: updateFeatures f ({
-    winapi = fold recursiveUpdate {} [
-      { "${deps.winapi_util."0.1.2".winapi}"."consoleapi" = true; }
-      { "${deps.winapi_util."0.1.2".winapi}"."errhandlingapi" = true; }
-      { "${deps.winapi_util."0.1.2".winapi}"."fileapi" = true; }
-      { "${deps.winapi_util."0.1.2".winapi}"."minwindef" = true; }
-      { "${deps.winapi_util."0.1.2".winapi}"."processenv" = true; }
-      { "${deps.winapi_util."0.1.2".winapi}"."std" = true; }
-      { "${deps.winapi_util."0.1.2".winapi}"."winbase" = true; }
-      { "${deps.winapi_util."0.1.2".winapi}"."wincon" = true; }
-      { "${deps.winapi_util."0.1.2".winapi}"."winerror" = true; }
-      { "${deps.winapi_util."0.1.2".winapi}"."winnt" = true; }
-      { "${deps.winapi_util."0.1.2".winapi}".default = true; }
-    ];
-    winapi_util."0.1.2".default = (f.winapi_util."0.1.2".default or true);
-  }) [
-    (features_.winapi."${deps."winapi_util"."0.1.2"."winapi"}" deps)
-  ];
-
-
-# end
-# winapi-x86_64-pc-windows-gnu-0.4.0
-
-  crates.winapi_x86_64_pc_windows_gnu."0.4.0" = deps: { features?(features_.winapi_x86_64_pc_windows_gnu."0.4.0" deps {}) }: buildRustCrate {
-    crateName = "winapi-x86_64-pc-windows-gnu";
-    version = "0.4.0";
-    authors = [ "Peter Atashian <retep998@gmail.com>" ];
-    sha256 = "0n1ylmlsb8yg1v583i4xy0qmqg42275flvbc51hdqjjfjcl9vlbj";
-    build = "build.rs";
-  };
-  features_.winapi_x86_64_pc_windows_gnu."0.4.0" = deps: f: updateFeatures f ({
-    winapi_x86_64_pc_windows_gnu."0.4.0".default = (f.winapi_x86_64_pc_windows_gnu."0.4.0".default or true);
-  }) [];
-
-
-# end
-# wincolor-1.0.1
-
-  crates.wincolor."1.0.1" = deps: { features?(features_.wincolor."1.0.1" deps {}) }: buildRustCrate {
-    crateName = "wincolor";
-    version = "1.0.1";
-    authors = [ "Andrew Gallant <jamslam@gmail.com>" ];
-    sha256 = "0gr7v4krmjba7yq16071rfacz42qbapas7mxk5nphjwb042a8gvz";
-    dependencies = mapFeatures features ([
-      (crates."winapi"."${deps."wincolor"."1.0.1"."winapi"}" deps)
-      (crates."winapi_util"."${deps."wincolor"."1.0.1"."winapi_util"}" deps)
-    ]);
-  };
-  features_.wincolor."1.0.1" = deps: f: updateFeatures f ({
-    winapi = fold recursiveUpdate {} [
-      { "${deps.wincolor."1.0.1".winapi}"."minwindef" = true; }
-      { "${deps.wincolor."1.0.1".winapi}"."wincon" = true; }
-      { "${deps.wincolor."1.0.1".winapi}".default = true; }
-    ];
-    winapi_util."${deps.wincolor."1.0.1".winapi_util}".default = true;
-    wincolor."1.0.1".default = (f.wincolor."1.0.1".default or true);
-  }) [
-    (features_.winapi."${deps."wincolor"."1.0.1"."winapi"}" deps)
-    (features_.winapi_util."${deps."wincolor"."1.0.1"."winapi_util"}" deps)
-  ];
-
-
-# end
-# aho-corasick-0.7.3
-
-  crates.aho_corasick."0.7.3" = deps: { features?(features_.aho_corasick."0.7.3" deps {}) }: buildRustCrate {
-    crateName = "aho-corasick";
-    version = "0.7.3";
-    description = "Fast multiple substring searching.";
-    authors = [ "Andrew Gallant <jamslam@gmail.com>" ];
-    sha256 = "0dn42fbdms4brigqphxrvzbjd1s4knyjlzky30kgvpnrcl4sqqdv";
-    libName = "aho_corasick";
-    dependencies = mapFeatures features ([
-      (crates."memchr"."${deps."aho_corasick"."0.7.3"."memchr"}" deps)
-    ]);
-    features = mkFeatures (features."aho_corasick"."0.7.3" or {});
-  };
-  features_.aho_corasick."0.7.3" = deps: f: updateFeatures f (rec {
-    aho_corasick = fold recursiveUpdate {} [
-      { "0.7.3"."std" =
-        (f.aho_corasick."0.7.3"."std" or false) ||
-        (f.aho_corasick."0.7.3".default or false) ||
-        (aho_corasick."0.7.3"."default" or false); }
-      { "0.7.3".default = (f.aho_corasick."0.7.3".default or true); }
-    ];
-    memchr = fold recursiveUpdate {} [
-      { "${deps.aho_corasick."0.7.3".memchr}"."use_std" =
-        (f.memchr."${deps.aho_corasick."0.7.3".memchr}"."use_std" or false) ||
-        (aho_corasick."0.7.3"."std" or false) ||
-        (f."aho_corasick"."0.7.3"."std" or false); }
-      { "${deps.aho_corasick."0.7.3".memchr}".default = (f.memchr."${deps.aho_corasick."0.7.3".memchr}".default or false); }
-    ];
-  }) [
-    (features_.memchr."${deps."aho_corasick"."0.7.3"."memchr"}" deps)
-  ];
-
-
-# end
-# backtrace-0.3.15
-
-  crates.backtrace."0.3.15" = deps: { features?(features_.backtrace."0.3.15" deps {}) }: buildRustCrate {
-    crateName = "backtrace";
-    version = "0.3.15";
-    description = "A library to acquire a stack trace (backtrace) at runtime in a Rust program.\n";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" "The Rust Project Developers" ];
-    sha256 = "0qgbc07aq9kfixv29s60xx666lmdpgmf27a78fwjlhnfzhqvkn0p";
-    dependencies = mapFeatures features ([
-      (crates."cfg_if"."${deps."backtrace"."0.3.15"."cfg_if"}" deps)
-      (crates."rustc_demangle"."${deps."backtrace"."0.3.15"."rustc_demangle"}" deps)
-    ])
-      ++ (if (kernel == "linux" || kernel == "darwin") && !(kernel == "fuchsia") && !(kernel == "emscripten") && !(kernel == "darwin") && !(kernel == "ios") then mapFeatures features ([
-    ]
-      ++ (if features.backtrace."0.3.15".backtrace-sys or false then [ (crates.backtrace_sys."${deps."backtrace"."0.3.15".backtrace_sys}" deps) ] else [])) else [])
-      ++ (if (kernel == "linux" || kernel == "darwin") || abi == "sgx" then mapFeatures features ([
-      (crates."libc"."${deps."backtrace"."0.3.15"."libc"}" deps)
-    ]) else [])
-      ++ (if kernel == "windows" then mapFeatures features ([
-      (crates."winapi"."${deps."backtrace"."0.3.15"."winapi"}" deps)
-    ]) else []);
-
-    buildDependencies = mapFeatures features ([
-      (crates."autocfg"."${deps."backtrace"."0.3.15"."autocfg"}" deps)
-    ]);
-    features = mkFeatures (features."backtrace"."0.3.15" or {});
-  };
-  features_.backtrace."0.3.15" = deps: f: updateFeatures f (rec {
-    autocfg."${deps.backtrace."0.3.15".autocfg}".default = true;
-    backtrace = fold recursiveUpdate {} [
-      { "0.3.15"."addr2line" =
-        (f.backtrace."0.3.15"."addr2line" or false) ||
-        (f.backtrace."0.3.15".gimli-symbolize or false) ||
-        (backtrace."0.3.15"."gimli-symbolize" or false); }
-      { "0.3.15"."backtrace-sys" =
-        (f.backtrace."0.3.15"."backtrace-sys" or false) ||
-        (f.backtrace."0.3.15".libbacktrace or false) ||
-        (backtrace."0.3.15"."libbacktrace" or false); }
-      { "0.3.15"."coresymbolication" =
-        (f.backtrace."0.3.15"."coresymbolication" or false) ||
-        (f.backtrace."0.3.15".default or false) ||
-        (backtrace."0.3.15"."default" or false); }
-      { "0.3.15"."dbghelp" =
-        (f.backtrace."0.3.15"."dbghelp" or false) ||
-        (f.backtrace."0.3.15".default or false) ||
-        (backtrace."0.3.15"."default" or false); }
-      { "0.3.15"."dladdr" =
-        (f.backtrace."0.3.15"."dladdr" or false) ||
-        (f.backtrace."0.3.15".default or false) ||
-        (backtrace."0.3.15"."default" or false); }
-      { "0.3.15"."findshlibs" =
-        (f.backtrace."0.3.15"."findshlibs" or false) ||
-        (f.backtrace."0.3.15".gimli-symbolize or false) ||
-        (backtrace."0.3.15"."gimli-symbolize" or false); }
-      { "0.3.15"."gimli" =
-        (f.backtrace."0.3.15"."gimli" or false) ||
-        (f.backtrace."0.3.15".gimli-symbolize or false) ||
-        (backtrace."0.3.15"."gimli-symbolize" or false); }
-      { "0.3.15"."libbacktrace" =
-        (f.backtrace."0.3.15"."libbacktrace" or false) ||
-        (f.backtrace."0.3.15".default or false) ||
-        (backtrace."0.3.15"."default" or false); }
-      { "0.3.15"."libunwind" =
-        (f.backtrace."0.3.15"."libunwind" or false) ||
-        (f.backtrace."0.3.15".default or false) ||
-        (backtrace."0.3.15"."default" or false); }
-      { "0.3.15"."memmap" =
-        (f.backtrace."0.3.15"."memmap" or false) ||
-        (f.backtrace."0.3.15".gimli-symbolize or false) ||
-        (backtrace."0.3.15"."gimli-symbolize" or false); }
-      { "0.3.15"."object" =
-        (f.backtrace."0.3.15"."object" or false) ||
-        (f.backtrace."0.3.15".gimli-symbolize or false) ||
-        (backtrace."0.3.15"."gimli-symbolize" or false); }
-      { "0.3.15"."rustc-serialize" =
-        (f.backtrace."0.3.15"."rustc-serialize" or false) ||
-        (f.backtrace."0.3.15".serialize-rustc or false) ||
-        (backtrace."0.3.15"."serialize-rustc" or false); }
-      { "0.3.15"."serde" =
-        (f.backtrace."0.3.15"."serde" or false) ||
-        (f.backtrace."0.3.15".serialize-serde or false) ||
-        (backtrace."0.3.15"."serialize-serde" or false); }
-      { "0.3.15"."serde_derive" =
-        (f.backtrace."0.3.15"."serde_derive" or false) ||
-        (f.backtrace."0.3.15".serialize-serde or false) ||
-        (backtrace."0.3.15"."serialize-serde" or false); }
-      { "0.3.15"."std" =
-        (f.backtrace."0.3.15"."std" or false) ||
-        (f.backtrace."0.3.15".default or false) ||
-        (backtrace."0.3.15"."default" or false) ||
-        (f.backtrace."0.3.15".libbacktrace or false) ||
-        (backtrace."0.3.15"."libbacktrace" or false); }
-      { "0.3.15".default = (f.backtrace."0.3.15".default or true); }
-    ];
-    backtrace_sys."${deps.backtrace."0.3.15".backtrace_sys}".default = true;
-    cfg_if."${deps.backtrace."0.3.15".cfg_if}".default = true;
-    libc."${deps.backtrace."0.3.15".libc}".default = (f.libc."${deps.backtrace."0.3.15".libc}".default or false);
-    rustc_demangle."${deps.backtrace."0.3.15".rustc_demangle}".default = true;
-    winapi = fold recursiveUpdate {} [
-      { "${deps.backtrace."0.3.15".winapi}"."dbghelp" = true; }
-      { "${deps.backtrace."0.3.15".winapi}"."minwindef" = true; }
-      { "${deps.backtrace."0.3.15".winapi}"."processthreadsapi" = true; }
-      { "${deps.backtrace."0.3.15".winapi}"."winnt" = true; }
-      { "${deps.backtrace."0.3.15".winapi}".default = true; }
-    ];
-  }) [
-    (features_.cfg_if."${deps."backtrace"."0.3.15"."cfg_if"}" deps)
-    (features_.rustc_demangle."${deps."backtrace"."0.3.15"."rustc_demangle"}" deps)
-    (features_.autocfg."${deps."backtrace"."0.3.15"."autocfg"}" deps)
-    (features_.backtrace_sys."${deps."backtrace"."0.3.15"."backtrace_sys"}" deps)
-    (features_.libc."${deps."backtrace"."0.3.15"."libc"}" deps)
-    (features_.winapi."${deps."backtrace"."0.3.15"."winapi"}" deps)
-  ];
-
-
-# end
-# bstr-0.1.2
-
-  crates.bstr."0.1.2" = deps: { features?(features_.bstr."0.1.2" deps {}) }: buildRustCrate {
-    crateName = "bstr";
-    version = "0.1.2";
-    description = "A string type that is not required to be valid UTF-8.";
-    authors = [ "Andrew Gallant <jamslam@gmail.com>" ];
-    sha256 = "1m30sssr8qghgf5fg17vvlrcr5mbbnv8fixzzfvzk3nan4bxyckf";
-    dependencies = mapFeatures features ([
-      (crates."memchr"."${deps."bstr"."0.1.2"."memchr"}" deps)
-    ]);
-    features = mkFeatures (features."bstr"."0.1.2" or {});
-  };
-  features_.bstr."0.1.2" = deps: f: updateFeatures f (rec {
-    bstr = fold recursiveUpdate {} [
-      { "0.1.2"."lazy_static" =
-        (f.bstr."0.1.2"."lazy_static" or false) ||
-        (f.bstr."0.1.2".unicode or false) ||
-        (bstr."0.1.2"."unicode" or false); }
-      { "0.1.2"."regex-automata" =
-        (f.bstr."0.1.2"."regex-automata" or false) ||
-        (f.bstr."0.1.2".unicode or false) ||
-        (bstr."0.1.2"."unicode" or false); }
-      { "0.1.2"."serde" =
-        (f.bstr."0.1.2"."serde" or false) ||
-        (f.bstr."0.1.2".serde1-nostd or false) ||
-        (bstr."0.1.2"."serde1-nostd" or false); }
-      { "0.1.2"."serde1-nostd" =
-        (f.bstr."0.1.2"."serde1-nostd" or false) ||
-        (f.bstr."0.1.2".serde1 or false) ||
-        (bstr."0.1.2"."serde1" or false); }
-      { "0.1.2"."std" =
-        (f.bstr."0.1.2"."std" or false) ||
-        (f.bstr."0.1.2".default or false) ||
-        (bstr."0.1.2"."default" or false) ||
-        (f.bstr."0.1.2".serde1 or false) ||
-        (bstr."0.1.2"."serde1" or false); }
-      { "0.1.2"."unicode" =
-        (f.bstr."0.1.2"."unicode" or false) ||
-        (f.bstr."0.1.2".default or false) ||
-        (bstr."0.1.2"."default" or false); }
-      { "0.1.2".default = (f.bstr."0.1.2".default or true); }
-    ];
-    memchr = fold recursiveUpdate {} [
-      { "${deps.bstr."0.1.2".memchr}"."use_std" =
-        (f.memchr."${deps.bstr."0.1.2".memchr}"."use_std" or false) ||
-        (bstr."0.1.2"."std" or false) ||
-        (f."bstr"."0.1.2"."std" or false); }
-      { "${deps.bstr."0.1.2".memchr}".default = (f.memchr."${deps.bstr."0.1.2".memchr}".default or false); }
-    ];
-  }) [
-    (features_.memchr."${deps."bstr"."0.1.2"."memchr"}" deps)
-  ];
-
-
-# end
-# build_const-0.2.1
-
-  crates.build_const."0.2.1" = deps: { features?(features_.build_const."0.2.1" deps {}) }: buildRustCrate {
-    crateName = "build_const";
-    version = "0.2.1";
-    description = "library for creating importable constants from build.rs or a script";
-    authors = [ "Garrett Berg <vitiral@gmail.com>" ];
-    sha256 = "15249xzi3qlm72p4glxgavwyq70fx2sp4df6ii0sdlrixrrp77pl";
-    features = mkFeatures (features."build_const"."0.2.1" or {});
-  };
-  features_.build_const."0.2.1" = deps: f: updateFeatures f (rec {
-    build_const = fold recursiveUpdate {} [
-      { "0.2.1"."std" =
-        (f.build_const."0.2.1"."std" or false) ||
-        (f.build_const."0.2.1".default or false) ||
-        (build_const."0.2.1"."default" or false); }
-      { "0.2.1".default = (f.build_const."0.2.1".default or true); }
-    ];
-  }) [];
-
-
-# end
-# byteorder-1.3.1
-
-  crates.byteorder."1.3.1" = deps: { features?(features_.byteorder."1.3.1" deps {}) }: buildRustCrate {
-    crateName = "byteorder";
-    version = "1.3.1";
-    description = "Library for reading/writing numbers in big-endian and little-endian.";
-    authors = [ "Andrew Gallant <jamslam@gmail.com>" ];
-    sha256 = "1dd46l7fvmxfq90kh6ip1ghsxzzcdybac8f0mh2jivsdv9vy8k4w";
-    build = "build.rs";
-    features = mkFeatures (features."byteorder"."1.3.1" or {});
-  };
-  features_.byteorder."1.3.1" = deps: f: updateFeatures f (rec {
-    byteorder = fold recursiveUpdate {} [
-      { "1.3.1"."std" =
-        (f.byteorder."1.3.1"."std" or false) ||
-        (f.byteorder."1.3.1".default or false) ||
-        (byteorder."1.3.1"."default" or false); }
-      { "1.3.1".default = (f.byteorder."1.3.1".default or true); }
-    ];
-  }) [];
-
-
-# end
-# bytes-0.4.12
-
-  crates.bytes."0.4.12" = deps: { features?(features_.bytes."0.4.12" deps {}) }: buildRustCrate {
-    crateName = "bytes";
-    version = "0.4.12";
-    description = "Types and traits for working with bytes";
-    authors = [ "Carl Lerche <me@carllerche.com>" ];
-    sha256 = "0cw577vll9qp0h3l1sy24anr5mcnd5j26q9q7nw4f0mddssvfphf";
-    dependencies = mapFeatures features ([
-      (crates."byteorder"."${deps."bytes"."0.4.12"."byteorder"}" deps)
-      (crates."iovec"."${deps."bytes"."0.4.12"."iovec"}" deps)
-    ]);
-    features = mkFeatures (features."bytes"."0.4.12" or {});
-  };
-  features_.bytes."0.4.12" = deps: f: updateFeatures f (rec {
-    byteorder = fold recursiveUpdate {} [
-      { "${deps.bytes."0.4.12".byteorder}"."i128" =
-        (f.byteorder."${deps.bytes."0.4.12".byteorder}"."i128" or false) ||
-        (bytes."0.4.12"."i128" or false) ||
-        (f."bytes"."0.4.12"."i128" or false); }
-      { "${deps.bytes."0.4.12".byteorder}".default = true; }
-    ];
-    bytes."0.4.12".default = (f.bytes."0.4.12".default or true);
-    iovec."${deps.bytes."0.4.12".iovec}".default = true;
-  }) [
-    (features_.byteorder."${deps."bytes"."0.4.12"."byteorder"}" deps)
-    (features_.iovec."${deps."bytes"."0.4.12"."iovec"}" deps)
-  ];
-
-
-# end
-# bytesize-1.0.0
-
-  crates.bytesize."1.0.0" = deps: { features?(features_.bytesize."1.0.0" deps {}) }: buildRustCrate {
-    crateName = "bytesize";
-    version = "1.0.0";
-    description = "an utility for human-readable bytes representations";
-    authors = [ "Hyunsik Choi <hyunsik.choi@gmail.com>" ];
-    sha256 = "04j5hibh1sskjbifrm5d10vmd1fycfgm10cdfa9hpyir7lbkhbg9";
-    dependencies = mapFeatures features ([
-]);
-  };
-  features_.bytesize."1.0.0" = deps: f: updateFeatures f ({
-    bytesize."1.0.0".default = (f.bytesize."1.0.0".default or true);
-  }) [];
-
-
-# end
-# cargo-0.35.0
-
-  crates.cargo."0.35.0" = deps: { features?(features_.cargo."0.35.0" deps {}) }: buildRustCrate {
-    crateName = "cargo";
-    version = "0.35.0";
-    description = "Cargo, a package manager for Rust.\n";
-    authors = [ "Yehuda Katz <wycats@gmail.com>" "Carl Lerche <me@carllerche.com>" "Alex Crichton <alex@alexcrichton.com>" ];
-    edition = "2018";
-    sha256 = "17nqb1cr70igaaahk1lr859jaa57p05i1q4smqhqpq1jswwpdsnn";
-    libPath = "src/cargo/lib.rs";
-    crateBin =
-      [{  name = "cargo"; }];
-    dependencies = mapFeatures features ([
-      (crates."atty"."${deps."cargo"."0.35.0"."atty"}" deps)
-      (crates."byteorder"."${deps."cargo"."0.35.0"."byteorder"}" deps)
-      (crates."bytesize"."${deps."cargo"."0.35.0"."bytesize"}" deps)
-      (crates."clap"."${deps."cargo"."0.35.0"."clap"}" deps)
-      (crates."crates_io"."${deps."cargo"."0.35.0"."crates_io"}" deps)
-      (crates."crossbeam_utils"."${deps."cargo"."0.35.0"."crossbeam_utils"}" deps)
-      (crates."crypto_hash"."${deps."cargo"."0.35.0"."crypto_hash"}" deps)
-      (crates."curl"."${deps."cargo"."0.35.0"."curl"}" deps)
-      (crates."curl_sys"."${deps."cargo"."0.35.0"."curl_sys"}" deps)
-      (crates."env_logger"."${deps."cargo"."0.35.0"."env_logger"}" deps)
-      (crates."failure"."${deps."cargo"."0.35.0"."failure"}" deps)
-      (crates."filetime"."${deps."cargo"."0.35.0"."filetime"}" deps)
-      (crates."flate2"."${deps."cargo"."0.35.0"."flate2"}" deps)
-      (crates."fs2"."${deps."cargo"."0.35.0"."fs2"}" deps)
-      (crates."git2"."${deps."cargo"."0.35.0"."git2"}" deps)
-      (crates."git2_curl"."${deps."cargo"."0.35.0"."git2_curl"}" deps)
-      (crates."glob"."${deps."cargo"."0.35.0"."glob"}" deps)
-      (crates."hex"."${deps."cargo"."0.35.0"."hex"}" deps)
-      (crates."home"."${deps."cargo"."0.35.0"."home"}" deps)
-      (crates."ignore"."${deps."cargo"."0.35.0"."ignore"}" deps)
-      (crates."im_rc"."${deps."cargo"."0.35.0"."im_rc"}" deps)
-      (crates."jobserver"."${deps."cargo"."0.35.0"."jobserver"}" deps)
-      (crates."lazy_static"."${deps."cargo"."0.35.0"."lazy_static"}" deps)
-      (crates."lazycell"."${deps."cargo"."0.35.0"."lazycell"}" deps)
-      (crates."libc"."${deps."cargo"."0.35.0"."libc"}" deps)
-      (crates."libgit2_sys"."${deps."cargo"."0.35.0"."libgit2_sys"}" deps)
-      (crates."log"."${deps."cargo"."0.35.0"."log"}" deps)
-      (crates."num_cpus"."${deps."cargo"."0.35.0"."num_cpus"}" deps)
-      (crates."opener"."${deps."cargo"."0.35.0"."opener"}" deps)
-      (crates."rustc_workspace_hack"."${deps."cargo"."0.35.0"."rustc_workspace_hack"}" deps)
-      (crates."rustfix"."${deps."cargo"."0.35.0"."rustfix"}" deps)
-      (crates."same_file"."${deps."cargo"."0.35.0"."same_file"}" deps)
-      (crates."semver"."${deps."cargo"."0.35.0"."semver"}" deps)
-      (crates."serde"."${deps."cargo"."0.35.0"."serde"}" deps)
-      (crates."serde_ignored"."${deps."cargo"."0.35.0"."serde_ignored"}" deps)
-      (crates."serde_json"."${deps."cargo"."0.35.0"."serde_json"}" deps)
-      (crates."shell_escape"."${deps."cargo"."0.35.0"."shell_escape"}" deps)
-      (crates."tar"."${deps."cargo"."0.35.0"."tar"}" deps)
-      (crates."tempfile"."${deps."cargo"."0.35.0"."tempfile"}" deps)
-      (crates."termcolor"."${deps."cargo"."0.35.0"."termcolor"}" deps)
-      (crates."toml"."${deps."cargo"."0.35.0"."toml"}" deps)
-      (crates."unicode_width"."${deps."cargo"."0.35.0"."unicode_width"}" deps)
-      (crates."url"."${deps."cargo"."0.35.0"."url"}" deps)
-      (crates."url_serde"."${deps."cargo"."0.35.0"."url_serde"}" deps)
-    ])
-      ++ (if kernel == "darwin" then mapFeatures features ([
-      (crates."core_foundation"."${deps."cargo"."0.35.0"."core_foundation"}" deps)
-    ]) else [])
-      ++ (if kernel == "windows" then mapFeatures features ([
-      (crates."fwdansi"."${deps."cargo"."0.35.0"."fwdansi"}" deps)
-      (crates."miow"."${deps."cargo"."0.35.0"."miow"}" deps)
-      (crates."winapi"."${deps."cargo"."0.35.0"."winapi"}" deps)
-    ]) else []);
-    features = mkFeatures (features."cargo"."0.35.0" or {});
-  };
-  features_.cargo."0.35.0" = deps: f: updateFeatures f (rec {
-    atty."${deps.cargo."0.35.0".atty}".default = true;
-    byteorder."${deps.cargo."0.35.0".byteorder}".default = true;
-    bytesize."${deps.cargo."0.35.0".bytesize}".default = true;
-    cargo = fold recursiveUpdate {} [
-      { "0.35.0"."pretty_env_logger" =
-        (f.cargo."0.35.0"."pretty_env_logger" or false) ||
-        (f.cargo."0.35.0".pretty-env-logger or false) ||
-        (cargo."0.35.0"."pretty-env-logger" or false); }
-      { "0.35.0".default = (f.cargo."0.35.0".default or true); }
-    ];
-    clap."${deps.cargo."0.35.0".clap}".default = true;
-    core_foundation = fold recursiveUpdate {} [
-      { "${deps.cargo."0.35.0".core_foundation}"."mac_os_10_7_support" = true; }
-      { "${deps.cargo."0.35.0".core_foundation}".default = true; }
-    ];
-    crates_io."${deps.cargo."0.35.0".crates_io}".default = true;
-    crossbeam_utils."${deps.cargo."0.35.0".crossbeam_utils}".default = true;
-    crypto_hash."${deps.cargo."0.35.0".crypto_hash}".default = true;
-    curl = fold recursiveUpdate {} [
-      { "${deps.cargo."0.35.0".curl}"."http2" = true; }
-      { "${deps.cargo."0.35.0".curl}".default = true; }
-    ];
-    curl_sys."${deps.cargo."0.35.0".curl_sys}".default = true;
-    env_logger."${deps.cargo."0.35.0".env_logger}".default = true;
-    failure."${deps.cargo."0.35.0".failure}".default = true;
-    filetime."${deps.cargo."0.35.0".filetime}".default = true;
-    flate2 = fold recursiveUpdate {} [
-      { "${deps.cargo."0.35.0".flate2}"."zlib" = true; }
-      { "${deps.cargo."0.35.0".flate2}".default = true; }
-    ];
-    fs2."${deps.cargo."0.35.0".fs2}".default = true;
-    fwdansi."${deps.cargo."0.35.0".fwdansi}".default = true;
-    git2."${deps.cargo."0.35.0".git2}".default = true;
-    git2_curl."${deps.cargo."0.35.0".git2_curl}".default = true;
-    glob."${deps.cargo."0.35.0".glob}".default = true;
-    hex."${deps.cargo."0.35.0".hex}".default = true;
-    home."${deps.cargo."0.35.0".home}".default = true;
-    ignore."${deps.cargo."0.35.0".ignore}".default = true;
-    im_rc."${deps.cargo."0.35.0".im_rc}".default = true;
-    jobserver."${deps.cargo."0.35.0".jobserver}".default = true;
-    lazy_static."${deps.cargo."0.35.0".lazy_static}".default = true;
-    lazycell."${deps.cargo."0.35.0".lazycell}".default = true;
-    libc."${deps.cargo."0.35.0".libc}".default = true;
-    libgit2_sys."${deps.cargo."0.35.0".libgit2_sys}".default = true;
-    log."${deps.cargo."0.35.0".log}".default = true;
-    miow."${deps.cargo."0.35.0".miow}".default = true;
-    num_cpus."${deps.cargo."0.35.0".num_cpus}".default = true;
-    opener."${deps.cargo."0.35.0".opener}".default = true;
-    rustc_workspace_hack."${deps.cargo."0.35.0".rustc_workspace_hack}".default = true;
-    rustfix."${deps.cargo."0.35.0".rustfix}".default = true;
-    same_file."${deps.cargo."0.35.0".same_file}".default = true;
-    semver = fold recursiveUpdate {} [
-      { "${deps.cargo."0.35.0".semver}"."serde" = true; }
-      { "${deps.cargo."0.35.0".semver}".default = true; }
-    ];
-    serde = fold recursiveUpdate {} [
-      { "${deps.cargo."0.35.0".serde}"."derive" = true; }
-      { "${deps.cargo."0.35.0".serde}".default = true; }
-    ];
-    serde_ignored."${deps.cargo."0.35.0".serde_ignored}".default = true;
-    serde_json = fold recursiveUpdate {} [
-      { "${deps.cargo."0.35.0".serde_json}"."raw_value" = true; }
-      { "${deps.cargo."0.35.0".serde_json}".default = true; }
-    ];
-    shell_escape."${deps.cargo."0.35.0".shell_escape}".default = true;
-    tar."${deps.cargo."0.35.0".tar}".default = (f.tar."${deps.cargo."0.35.0".tar}".default or false);
-    tempfile."${deps.cargo."0.35.0".tempfile}".default = true;
-    termcolor."${deps.cargo."0.35.0".termcolor}".default = true;
-    toml."${deps.cargo."0.35.0".toml}".default = true;
-    unicode_width."${deps.cargo."0.35.0".unicode_width}".default = true;
-    url."${deps.cargo."0.35.0".url}".default = true;
-    url_serde."${deps.cargo."0.35.0".url_serde}".default = true;
-    winapi = fold recursiveUpdate {} [
-      { "${deps.cargo."0.35.0".winapi}"."basetsd" = true; }
-      { "${deps.cargo."0.35.0".winapi}"."handleapi" = true; }
-      { "${deps.cargo."0.35.0".winapi}"."jobapi" = true; }
-      { "${deps.cargo."0.35.0".winapi}"."jobapi2" = true; }
-      { "${deps.cargo."0.35.0".winapi}"."memoryapi" = true; }
-      { "${deps.cargo."0.35.0".winapi}"."minwindef" = true; }
-      { "${deps.cargo."0.35.0".winapi}"."ntdef" = true; }
-      { "${deps.cargo."0.35.0".winapi}"."ntstatus" = true; }
-      { "${deps.cargo."0.35.0".winapi}"."processenv" = true; }
-      { "${deps.cargo."0.35.0".winapi}"."processthreadsapi" = true; }
-      { "${deps.cargo."0.35.0".winapi}"."psapi" = true; }
-      { "${deps.cargo."0.35.0".winapi}"."synchapi" = true; }
-      { "${deps.cargo."0.35.0".winapi}"."winbase" = true; }
-      { "${deps.cargo."0.35.0".winapi}"."wincon" = true; }
-      { "${deps.cargo."0.35.0".winapi}"."winerror" = true; }
-      { "${deps.cargo."0.35.0".winapi}"."winnt" = true; }
-      { "${deps.cargo."0.35.0".winapi}".default = true; }
-    ];
-  }) [
-    (features_.atty."${deps."cargo"."0.35.0"."atty"}" deps)
-    (features_.byteorder."${deps."cargo"."0.35.0"."byteorder"}" deps)
-    (features_.bytesize."${deps."cargo"."0.35.0"."bytesize"}" deps)
-    (features_.clap."${deps."cargo"."0.35.0"."clap"}" deps)
-    (features_.crates_io."${deps."cargo"."0.35.0"."crates_io"}" deps)
-    (features_.crossbeam_utils."${deps."cargo"."0.35.0"."crossbeam_utils"}" deps)
-    (features_.crypto_hash."${deps."cargo"."0.35.0"."crypto_hash"}" deps)
-    (features_.curl."${deps."cargo"."0.35.0"."curl"}" deps)
-    (features_.curl_sys."${deps."cargo"."0.35.0"."curl_sys"}" deps)
-    (features_.env_logger."${deps."cargo"."0.35.0"."env_logger"}" deps)
-    (features_.failure."${deps."cargo"."0.35.0"."failure"}" deps)
-    (features_.filetime."${deps."cargo"."0.35.0"."filetime"}" deps)
-    (features_.flate2."${deps."cargo"."0.35.0"."flate2"}" deps)
-    (features_.fs2."${deps."cargo"."0.35.0"."fs2"}" deps)
-    (features_.git2."${deps."cargo"."0.35.0"."git2"}" deps)
-    (features_.git2_curl."${deps."cargo"."0.35.0"."git2_curl"}" deps)
-    (features_.glob."${deps."cargo"."0.35.0"."glob"}" deps)
-    (features_.hex."${deps."cargo"."0.35.0"."hex"}" deps)
-    (features_.home."${deps."cargo"."0.35.0"."home"}" deps)
-    (features_.ignore."${deps."cargo"."0.35.0"."ignore"}" deps)
-    (features_.im_rc."${deps."cargo"."0.35.0"."im_rc"}" deps)
-    (features_.jobserver."${deps."cargo"."0.35.0"."jobserver"}" deps)
-    (features_.lazy_static."${deps."cargo"."0.35.0"."lazy_static"}" deps)
-    (features_.lazycell."${deps."cargo"."0.35.0"."lazycell"}" deps)
-    (features_.libc."${deps."cargo"."0.35.0"."libc"}" deps)
-    (features_.libgit2_sys."${deps."cargo"."0.35.0"."libgit2_sys"}" deps)
-    (features_.log."${deps."cargo"."0.35.0"."log"}" deps)
-    (features_.num_cpus."${deps."cargo"."0.35.0"."num_cpus"}" deps)
-    (features_.opener."${deps."cargo"."0.35.0"."opener"}" deps)
-    (features_.rustc_workspace_hack."${deps."cargo"."0.35.0"."rustc_workspace_hack"}" deps)
-    (features_.rustfix."${deps."cargo"."0.35.0"."rustfix"}" deps)
-    (features_.same_file."${deps."cargo"."0.35.0"."same_file"}" deps)
-    (features_.semver."${deps."cargo"."0.35.0"."semver"}" deps)
-    (features_.serde."${deps."cargo"."0.35.0"."serde"}" deps)
-    (features_.serde_ignored."${deps."cargo"."0.35.0"."serde_ignored"}" deps)
-    (features_.serde_json."${deps."cargo"."0.35.0"."serde_json"}" deps)
-    (features_.shell_escape."${deps."cargo"."0.35.0"."shell_escape"}" deps)
-    (features_.tar."${deps."cargo"."0.35.0"."tar"}" deps)
-    (features_.tempfile."${deps."cargo"."0.35.0"."tempfile"}" deps)
-    (features_.termcolor."${deps."cargo"."0.35.0"."termcolor"}" deps)
-    (features_.toml."${deps."cargo"."0.35.0"."toml"}" deps)
-    (features_.unicode_width."${deps."cargo"."0.35.0"."unicode_width"}" deps)
-    (features_.url."${deps."cargo"."0.35.0"."url"}" deps)
-    (features_.url_serde."${deps."cargo"."0.35.0"."url_serde"}" deps)
-    (features_.core_foundation."${deps."cargo"."0.35.0"."core_foundation"}" deps)
-    (features_.fwdansi."${deps."cargo"."0.35.0"."fwdansi"}" deps)
-    (features_.miow."${deps."cargo"."0.35.0"."miow"}" deps)
-    (features_.winapi."${deps."cargo"."0.35.0"."winapi"}" deps)
-  ];
-
-
-# end
-# cc-1.0.35
-
-  crates.cc."1.0.35" = deps: { features?(features_.cc."1.0.35" deps {}) }: buildRustCrate {
-    crateName = "cc";
-    version = "1.0.35";
-    description = "A build-time dependency for Cargo build scripts to assist in invoking the native\nC compiler to compile native C code into a static archive to be linked into Rust\ncode.\n";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "0dq3d2hgc5r14lk97ajj4mw30fibznjzrl9w745fqhwnq51jp7dj";
-    dependencies = mapFeatures features ([
-]);
-    features = mkFeatures (features."cc"."1.0.35" or {});
-  };
-  features_.cc."1.0.35" = deps: f: updateFeatures f (rec {
-    cc = fold recursiveUpdate {} [
-      { "1.0.35"."rayon" =
-        (f.cc."1.0.35"."rayon" or false) ||
-        (f.cc."1.0.35".parallel or false) ||
-        (cc."1.0.35"."parallel" or false); }
-      { "1.0.35".default = (f.cc."1.0.35".default or true); }
-    ];
-  }) [];
-
-
-# end
-# clap-2.33.0
-
-  crates.clap."2.33.0" = deps: { features?(features_.clap."2.33.0" deps {}) }: buildRustCrate {
-    crateName = "clap";
-    version = "2.33.0";
-    description = "A simple to use, efficient, and full-featured Command Line Argument Parser\n";
-    authors = [ "Kevin K. <kbknapp@gmail.com>" ];
-    sha256 = "054n9ngh6pkknpmd4acgdsp40iw6f5jzq8a4h2b76gnbvk6p5xjh";
-    dependencies = mapFeatures features ([
-      (crates."bitflags"."${deps."clap"."2.33.0"."bitflags"}" deps)
-      (crates."textwrap"."${deps."clap"."2.33.0"."textwrap"}" deps)
-      (crates."unicode_width"."${deps."clap"."2.33.0"."unicode_width"}" deps)
-    ]
-      ++ (if features.clap."2.33.0".atty or false then [ (crates.atty."${deps."clap"."2.33.0".atty}" deps) ] else [])
-      ++ (if features.clap."2.33.0".strsim or false then [ (crates.strsim."${deps."clap"."2.33.0".strsim}" deps) ] else [])
-      ++ (if features.clap."2.33.0".vec_map or false then [ (crates.vec_map."${deps."clap"."2.33.0".vec_map}" deps) ] else []))
-      ++ (if !(kernel == "windows") then mapFeatures features ([
-    ]
-      ++ (if features.clap."2.33.0".ansi_term or false then [ (crates.ansi_term."${deps."clap"."2.33.0".ansi_term}" deps) ] else [])) else []);
-    features = mkFeatures (features."clap"."2.33.0" or {});
-  };
-  features_.clap."2.33.0" = deps: f: updateFeatures f (rec {
-    ansi_term."${deps.clap."2.33.0".ansi_term}".default = true;
-    atty."${deps.clap."2.33.0".atty}".default = true;
-    bitflags."${deps.clap."2.33.0".bitflags}".default = true;
-    clap = fold recursiveUpdate {} [
-      { "2.33.0"."ansi_term" =
-        (f.clap."2.33.0"."ansi_term" or false) ||
-        (f.clap."2.33.0".color or false) ||
-        (clap."2.33.0"."color" or false); }
-      { "2.33.0"."atty" =
-        (f.clap."2.33.0"."atty" or false) ||
-        (f.clap."2.33.0".color or false) ||
-        (clap."2.33.0"."color" or false); }
-      { "2.33.0"."clippy" =
-        (f.clap."2.33.0"."clippy" or false) ||
-        (f.clap."2.33.0".lints or false) ||
-        (clap."2.33.0"."lints" or false); }
-      { "2.33.0"."color" =
-        (f.clap."2.33.0"."color" or false) ||
-        (f.clap."2.33.0".default or false) ||
-        (clap."2.33.0"."default" or false); }
-      { "2.33.0"."strsim" =
-        (f.clap."2.33.0"."strsim" or false) ||
-        (f.clap."2.33.0".suggestions or false) ||
-        (clap."2.33.0"."suggestions" or false); }
-      { "2.33.0"."suggestions" =
-        (f.clap."2.33.0"."suggestions" or false) ||
-        (f.clap."2.33.0".default or false) ||
-        (clap."2.33.0"."default" or false); }
-      { "2.33.0"."term_size" =
-        (f.clap."2.33.0"."term_size" or false) ||
-        (f.clap."2.33.0".wrap_help or false) ||
-        (clap."2.33.0"."wrap_help" or false); }
-      { "2.33.0"."vec_map" =
-        (f.clap."2.33.0"."vec_map" or false) ||
-        (f.clap."2.33.0".default or false) ||
-        (clap."2.33.0"."default" or false); }
-      { "2.33.0"."yaml" =
-        (f.clap."2.33.0"."yaml" or false) ||
-        (f.clap."2.33.0".doc or false) ||
-        (clap."2.33.0"."doc" or false); }
-      { "2.33.0"."yaml-rust" =
-        (f.clap."2.33.0"."yaml-rust" or false) ||
-        (f.clap."2.33.0".yaml or false) ||
-        (clap."2.33.0"."yaml" or false); }
-      { "2.33.0".default = (f.clap."2.33.0".default or true); }
-    ];
-    strsim."${deps.clap."2.33.0".strsim}".default = true;
-    textwrap = fold recursiveUpdate {} [
-      { "${deps.clap."2.33.0".textwrap}"."term_size" =
-        (f.textwrap."${deps.clap."2.33.0".textwrap}"."term_size" or false) ||
-        (clap."2.33.0"."wrap_help" or false) ||
-        (f."clap"."2.33.0"."wrap_help" or false); }
-      { "${deps.clap."2.33.0".textwrap}".default = true; }
-    ];
-    unicode_width."${deps.clap."2.33.0".unicode_width}".default = true;
-    vec_map."${deps.clap."2.33.0".vec_map}".default = true;
-  }) [
-    (features_.atty."${deps."clap"."2.33.0"."atty"}" deps)
-    (features_.bitflags."${deps."clap"."2.33.0"."bitflags"}" deps)
-    (features_.strsim."${deps."clap"."2.33.0"."strsim"}" deps)
-    (features_.textwrap."${deps."clap"."2.33.0"."textwrap"}" deps)
-    (features_.unicode_width."${deps."clap"."2.33.0"."unicode_width"}" deps)
-    (features_.vec_map."${deps."clap"."2.33.0"."vec_map"}" deps)
-    (features_.ansi_term."${deps."clap"."2.33.0"."ansi_term"}" deps)
-  ];
-
-
-# end
-# commoncrypto-0.2.0
-
-  crates.commoncrypto."0.2.0" = deps: { features?(features_.commoncrypto."0.2.0" deps {}) }: buildRustCrate {
-    crateName = "commoncrypto";
-    version = "0.2.0";
-    description = "Idiomatic Rust wrappers for Mac OS X's CommonCrypto library";
-    authors = [ "Mark Lee" ];
-    sha256 = "1ywgmv5ai4f6yskr3wv3j1wzfsdm9km8j8lm4x4j5ccln5362xdf";
-    dependencies = mapFeatures features ([
-      (crates."commoncrypto_sys"."${deps."commoncrypto"."0.2.0"."commoncrypto_sys"}" deps)
-    ]);
-    features = mkFeatures (features."commoncrypto"."0.2.0" or {});
-  };
-  features_.commoncrypto."0.2.0" = deps: f: updateFeatures f (rec {
-    commoncrypto = fold recursiveUpdate {} [
-      { "0.2.0"."clippy" =
-        (f.commoncrypto."0.2.0"."clippy" or false) ||
-        (f.commoncrypto."0.2.0".lint or false) ||
-        (commoncrypto."0.2.0"."lint" or false); }
-      { "0.2.0".default = (f.commoncrypto."0.2.0".default or true); }
-    ];
-    commoncrypto_sys."${deps.commoncrypto."0.2.0".commoncrypto_sys}".default = true;
-  }) [
-    (features_.commoncrypto_sys."${deps."commoncrypto"."0.2.0"."commoncrypto_sys"}" deps)
-  ];
-
-
-# end
-# commoncrypto-sys-0.2.0
-
-  crates.commoncrypto_sys."0.2.0" = deps: { features?(features_.commoncrypto_sys."0.2.0" deps {}) }: buildRustCrate {
-    crateName = "commoncrypto-sys";
-    version = "0.2.0";
-    description = "FFI bindings to Mac OS X's CommonCrypto library";
-    authors = [ "Mark Lee" ];
-    sha256 = "001i2g7xbfi48r2xjgxwrgjjjf00x9c24vfrs3g6p2q2djhwww4i";
-    dependencies = mapFeatures features ([
-      (crates."libc"."${deps."commoncrypto_sys"."0.2.0"."libc"}" deps)
-    ]);
-    features = mkFeatures (features."commoncrypto_sys"."0.2.0" or {});
-  };
-  features_.commoncrypto_sys."0.2.0" = deps: f: updateFeatures f (rec {
-    commoncrypto_sys = fold recursiveUpdate {} [
-      { "0.2.0"."clippy" =
-        (f.commoncrypto_sys."0.2.0"."clippy" or false) ||
-        (f.commoncrypto_sys."0.2.0".lint or false) ||
-        (commoncrypto_sys."0.2.0"."lint" or false); }
-      { "0.2.0".default = (f.commoncrypto_sys."0.2.0".default or true); }
-    ];
-    libc."${deps.commoncrypto_sys."0.2.0".libc}".default = true;
-  }) [
-    (features_.libc."${deps."commoncrypto_sys"."0.2.0"."libc"}" deps)
-  ];
-
-
-# end
-# core-foundation-0.6.4
-
-  crates.core_foundation."0.6.4" = deps: { features?(features_.core_foundation."0.6.4" deps {}) }: buildRustCrate {
-    crateName = "core-foundation";
-    version = "0.6.4";
-    description = "Bindings to Core Foundation for macOS";
-    authors = [ "The Servo Project Developers" ];
-    sha256 = "1kabsqxh01m6l2b1gz8wgn0d1k6fyczww9kaks0sbmsz5g78ngzx";
-    dependencies = mapFeatures features ([
-      (crates."core_foundation_sys"."${deps."core_foundation"."0.6.4"."core_foundation_sys"}" deps)
-      (crates."libc"."${deps."core_foundation"."0.6.4"."libc"}" deps)
-    ]);
-    features = mkFeatures (features."core_foundation"."0.6.4" or {});
-  };
-  features_.core_foundation."0.6.4" = deps: f: updateFeatures f (rec {
-    core_foundation = fold recursiveUpdate {} [
-      { "0.6.4"."chrono" =
-        (f.core_foundation."0.6.4"."chrono" or false) ||
-        (f.core_foundation."0.6.4".with-chrono or false) ||
-        (core_foundation."0.6.4"."with-chrono" or false); }
-      { "0.6.4"."uuid" =
-        (f.core_foundation."0.6.4"."uuid" or false) ||
-        (f.core_foundation."0.6.4".with-uuid or false) ||
-        (core_foundation."0.6.4"."with-uuid" or false); }
-      { "0.6.4".default = (f.core_foundation."0.6.4".default or true); }
-    ];
-    core_foundation_sys = fold recursiveUpdate {} [
-      { "${deps.core_foundation."0.6.4".core_foundation_sys}"."mac_os_10_7_support" =
-        (f.core_foundation_sys."${deps.core_foundation."0.6.4".core_foundation_sys}"."mac_os_10_7_support" or false) ||
-        (core_foundation."0.6.4"."mac_os_10_7_support" or false) ||
-        (f."core_foundation"."0.6.4"."mac_os_10_7_support" or false); }
-      { "${deps.core_foundation."0.6.4".core_foundation_sys}"."mac_os_10_8_features" =
-        (f.core_foundation_sys."${deps.core_foundation."0.6.4".core_foundation_sys}"."mac_os_10_8_features" or false) ||
-        (core_foundation."0.6.4"."mac_os_10_8_features" or false) ||
-        (f."core_foundation"."0.6.4"."mac_os_10_8_features" or false); }
-      { "${deps.core_foundation."0.6.4".core_foundation_sys}".default = true; }
-    ];
-    libc."${deps.core_foundation."0.6.4".libc}".default = true;
-  }) [
-    (features_.core_foundation_sys."${deps."core_foundation"."0.6.4"."core_foundation_sys"}" deps)
-    (features_.libc."${deps."core_foundation"."0.6.4"."libc"}" deps)
-  ];
-
-
-# end
-# core-foundation-sys-0.6.2
-
-  crates.core_foundation_sys."0.6.2" = deps: { features?(features_.core_foundation_sys."0.6.2" deps {}) }: buildRustCrate {
-    crateName = "core-foundation-sys";
-    version = "0.6.2";
-    description = "Bindings to Core Foundation for OS X";
-    authors = [ "The Servo Project Developers" ];
-    sha256 = "1n2v6wlqkmqwhl7k6y50irx51p37xb0fcm3njbman82gnyq8di2c";
-    build = "build.rs";
-    features = mkFeatures (features."core_foundation_sys"."0.6.2" or {});
-  };
-  features_.core_foundation_sys."0.6.2" = deps: f: updateFeatures f ({
-    core_foundation_sys."0.6.2".default = (f.core_foundation_sys."0.6.2".default or true);
-  }) [];
-
-
-# end
-# crates-io-0.23.0
-
-  crates.crates_io."0.23.0" = deps: { features?(features_.crates_io."0.23.0" deps {}) }: buildRustCrate {
-    crateName = "crates-io";
-    version = "0.23.0";
-    description = "Helpers for interacting with crates.io\n";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    edition = "2018";
-    sha256 = "0yf7zhlqnyci12rl9x6xrwlcp8slf8ldfn3d72ad6j2hyp2cb59y";
-    libPath = "lib.rs";
-    libName = "crates_io";
-    dependencies = mapFeatures features ([
-      (crates."curl"."${deps."crates_io"."0.23.0"."curl"}" deps)
-      (crates."failure"."${deps."crates_io"."0.23.0"."failure"}" deps)
-      (crates."http"."${deps."crates_io"."0.23.0"."http"}" deps)
-      (crates."serde"."${deps."crates_io"."0.23.0"."serde"}" deps)
-      (crates."serde_derive"."${deps."crates_io"."0.23.0"."serde_derive"}" deps)
-      (crates."serde_json"."${deps."crates_io"."0.23.0"."serde_json"}" deps)
-      (crates."url"."${deps."crates_io"."0.23.0"."url"}" deps)
-    ]);
-  };
-  features_.crates_io."0.23.0" = deps: f: updateFeatures f ({
-    crates_io."0.23.0".default = (f.crates_io."0.23.0".default or true);
-    curl."${deps.crates_io."0.23.0".curl}".default = true;
-    failure."${deps.crates_io."0.23.0".failure}".default = true;
-    http."${deps.crates_io."0.23.0".http}".default = true;
-    serde = fold recursiveUpdate {} [
-      { "${deps.crates_io."0.23.0".serde}"."derive" = true; }
-      { "${deps.crates_io."0.23.0".serde}".default = true; }
-    ];
-    serde_derive."${deps.crates_io."0.23.0".serde_derive}".default = true;
-    serde_json."${deps.crates_io."0.23.0".serde_json}".default = true;
-    url."${deps.crates_io."0.23.0".url}".default = true;
-  }) [
-    (features_.curl."${deps."crates_io"."0.23.0"."curl"}" deps)
-    (features_.failure."${deps."crates_io"."0.23.0"."failure"}" deps)
-    (features_.http."${deps."crates_io"."0.23.0"."http"}" deps)
-    (features_.serde."${deps."crates_io"."0.23.0"."serde"}" deps)
-    (features_.serde_derive."${deps."crates_io"."0.23.0"."serde_derive"}" deps)
-    (features_.serde_json."${deps."crates_io"."0.23.0"."serde_json"}" deps)
-    (features_.url."${deps."crates_io"."0.23.0"."url"}" deps)
-  ];
-
-
-# end
-# crc-1.8.1
-
-  crates.crc."1.8.1" = deps: { features?(features_.crc."1.8.1" deps {}) }: buildRustCrate {
-    crateName = "crc";
-    version = "1.8.1";
-    description = "Rust implementation of CRC(16, 32, 64) with support of various standards";
-    authors = [ "Rui Hu <code@mrhooray.com>" ];
-    sha256 = "00m9jjqrddp3bqyanvyxv0hf6s56bx1wy51vcdcxg4n2jdhg109s";
-
-    buildDependencies = mapFeatures features ([
-      (crates."build_const"."${deps."crc"."1.8.1"."build_const"}" deps)
-    ]);
-    features = mkFeatures (features."crc"."1.8.1" or {});
-  };
-  features_.crc."1.8.1" = deps: f: updateFeatures f (rec {
-    build_const."${deps.crc."1.8.1".build_const}".default = true;
-    crc = fold recursiveUpdate {} [
-      { "1.8.1"."std" =
-        (f.crc."1.8.1"."std" or false) ||
-        (f.crc."1.8.1".default or false) ||
-        (crc."1.8.1"."default" or false); }
-      { "1.8.1".default = (f.crc."1.8.1".default or true); }
-    ];
-  }) [
-    (features_.build_const."${deps."crc"."1.8.1"."build_const"}" deps)
-  ];
-
-
-# end
-# crc32fast-1.2.0
-
-  crates.crc32fast."1.2.0" = deps: { features?(features_.crc32fast."1.2.0" deps {}) }: buildRustCrate {
-    crateName = "crc32fast";
-    version = "1.2.0";
-    description = "Fast, SIMD-accelerated CRC32 (IEEE) checksum computation";
-    authors = [ "Sam Rijs <srijs@airpost.net>" "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "1mx88ndqln6vzg7hjhjp8b7g0qggpqggsjrlsdqrfsrbpdzffcn8";
-    dependencies = mapFeatures features ([
-      (crates."cfg_if"."${deps."crc32fast"."1.2.0"."cfg_if"}" deps)
-    ]);
-    features = mkFeatures (features."crc32fast"."1.2.0" or {});
-  };
-  features_.crc32fast."1.2.0" = deps: f: updateFeatures f (rec {
-    cfg_if."${deps.crc32fast."1.2.0".cfg_if}".default = true;
-    crc32fast = fold recursiveUpdate {} [
-      { "1.2.0"."std" =
-        (f.crc32fast."1.2.0"."std" or false) ||
-        (f.crc32fast."1.2.0".default or false) ||
-        (crc32fast."1.2.0"."default" or false); }
-      { "1.2.0".default = (f.crc32fast."1.2.0".default or true); }
-    ];
-  }) [
-    (features_.cfg_if."${deps."crc32fast"."1.2.0"."cfg_if"}" deps)
-  ];
-
-
-# end
-# crossbeam-channel-0.3.8
-
-  crates.crossbeam_channel."0.3.8" = deps: { features?(features_.crossbeam_channel."0.3.8" deps {}) }: buildRustCrate {
-    crateName = "crossbeam-channel";
-    version = "0.3.8";
-    description = "Multi-producer multi-consumer channels for message passing";
-    authors = [ "The Crossbeam Project Developers" ];
-    sha256 = "0apm8why2qsgr8ykh9x677kc9ml7qp71mvirfkdzdn4c1jyqyyzm";
-    dependencies = mapFeatures features ([
-      (crates."crossbeam_utils"."${deps."crossbeam_channel"."0.3.8"."crossbeam_utils"}" deps)
-      (crates."smallvec"."${deps."crossbeam_channel"."0.3.8"."smallvec"}" deps)
-    ]);
-  };
-  features_.crossbeam_channel."0.3.8" = deps: f: updateFeatures f ({
-    crossbeam_channel."0.3.8".default = (f.crossbeam_channel."0.3.8".default or true);
-    crossbeam_utils."${deps.crossbeam_channel."0.3.8".crossbeam_utils}".default = true;
-    smallvec."${deps.crossbeam_channel."0.3.8".smallvec}".default = true;
-  }) [
-    (features_.crossbeam_utils."${deps."crossbeam_channel"."0.3.8"."crossbeam_utils"}" deps)
-    (features_.smallvec."${deps."crossbeam_channel"."0.3.8"."smallvec"}" deps)
-  ];
-
-
-# end
-# crossbeam-utils-0.6.5
-
-  crates.crossbeam_utils."0.6.5" = deps: { features?(features_.crossbeam_utils."0.6.5" deps {}) }: buildRustCrate {
-    crateName = "crossbeam-utils";
-    version = "0.6.5";
-    description = "Utilities for concurrent programming";
-    authors = [ "The Crossbeam Project Developers" ];
-    sha256 = "1z7wgcl9d22r2x6769r5945rnwf3jqfrrmb16q7kzk292r1d4rdg";
-    dependencies = mapFeatures features ([
-      (crates."cfg_if"."${deps."crossbeam_utils"."0.6.5"."cfg_if"}" deps)
-    ]
-      ++ (if features.crossbeam_utils."0.6.5".lazy_static or false then [ (crates.lazy_static."${deps."crossbeam_utils"."0.6.5".lazy_static}" deps) ] else []));
-    features = mkFeatures (features."crossbeam_utils"."0.6.5" or {});
-  };
-  features_.crossbeam_utils."0.6.5" = deps: f: updateFeatures f (rec {
-    cfg_if."${deps.crossbeam_utils."0.6.5".cfg_if}".default = true;
-    crossbeam_utils = fold recursiveUpdate {} [
-      { "0.6.5"."lazy_static" =
-        (f.crossbeam_utils."0.6.5"."lazy_static" or false) ||
-        (f.crossbeam_utils."0.6.5".std or false) ||
-        (crossbeam_utils."0.6.5"."std" or false); }
-      { "0.6.5"."std" =
-        (f.crossbeam_utils."0.6.5"."std" or false) ||
-        (f.crossbeam_utils."0.6.5".default or false) ||
-        (crossbeam_utils."0.6.5"."default" or false); }
-      { "0.6.5".default = (f.crossbeam_utils."0.6.5".default or true); }
-    ];
-    lazy_static."${deps.crossbeam_utils."0.6.5".lazy_static}".default = true;
-  }) [
-    (features_.cfg_if."${deps."crossbeam_utils"."0.6.5"."cfg_if"}" deps)
-    (features_.lazy_static."${deps."crossbeam_utils"."0.6.5"."lazy_static"}" deps)
-  ];
-
-
-# end
-# crypto-hash-0.3.3
-
-  crates.crypto_hash."0.3.3" = deps: { features?(features_.crypto_hash."0.3.3" deps {}) }: buildRustCrate {
-    crateName = "crypto-hash";
-    version = "0.3.3";
-    description = "A wrapper for OS-level cryptographic hash functions";
-    authors = [ "Mark Lee" ];
-    sha256 = "0ybl3q06snf0p0w5c743yipf1gyhim2z0yqczgdhclfmzgj4gxqy";
-    dependencies = mapFeatures features ([
-      (crates."hex"."${deps."crypto_hash"."0.3.3"."hex"}" deps)
-    ])
-      ++ (if kernel == "darwin" || kernel == "ios" then mapFeatures features ([
-      (crates."commoncrypto"."${deps."crypto_hash"."0.3.3"."commoncrypto"}" deps)
-    ]) else [])
-      ++ (if !(kernel == "windows" || kernel == "darwin" || kernel == "ios") then mapFeatures features ([
-      (crates."openssl"."${deps."crypto_hash"."0.3.3"."openssl"}" deps)
-    ]) else [])
-      ++ (if kernel == "windows" then mapFeatures features ([
-      (crates."winapi"."${deps."crypto_hash"."0.3.3"."winapi"}" deps)
-    ]) else []);
-  };
-  features_.crypto_hash."0.3.3" = deps: f: updateFeatures f ({
-    commoncrypto."${deps.crypto_hash."0.3.3".commoncrypto}".default = true;
-    crypto_hash."0.3.3".default = (f.crypto_hash."0.3.3".default or true);
-    hex."${deps.crypto_hash."0.3.3".hex}".default = true;
-    openssl."${deps.crypto_hash."0.3.3".openssl}".default = true;
-    winapi = fold recursiveUpdate {} [
-      { "${deps.crypto_hash."0.3.3".winapi}"."minwindef" = true; }
-      { "${deps.crypto_hash."0.3.3".winapi}"."wincrypt" = true; }
-      { "${deps.crypto_hash."0.3.3".winapi}".default = true; }
-    ];
-  }) [
-    (features_.hex."${deps."crypto_hash"."0.3.3"."hex"}" deps)
-    (features_.commoncrypto."${deps."crypto_hash"."0.3.3"."commoncrypto"}" deps)
-    (features_.openssl."${deps."crypto_hash"."0.3.3"."openssl"}" deps)
-    (features_.winapi."${deps."crypto_hash"."0.3.3"."winapi"}" deps)
-  ];
-
-
-# end
-# curl-0.4.21
-
-  crates.curl."0.4.21" = deps: { features?(features_.curl."0.4.21" deps {}) }: buildRustCrate {
-    crateName = "curl";
-    version = "0.4.21";
-    description = "Rust bindings to libcurl for making HTTP requests";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "1n13h0scc4s77ryf3w19n3myh4k1ls4bfxrx6y6ffvayjfnh13qy";
-    dependencies = mapFeatures features ([
-      (crates."curl_sys"."${deps."curl"."0.4.21"."curl_sys"}" deps)
-      (crates."libc"."${deps."curl"."0.4.21"."libc"}" deps)
-      (crates."socket2"."${deps."curl"."0.4.21"."socket2"}" deps)
-    ])
-      ++ (if (kernel == "linux" || kernel == "darwin") && !(kernel == "darwin") then mapFeatures features ([
-    ]
-      ++ (if features.curl."0.4.21".openssl-probe or false then [ (crates.openssl_probe."${deps."curl"."0.4.21".openssl_probe}" deps) ] else [])
-      ++ (if features.curl."0.4.21".openssl-sys or false then [ (crates.openssl_sys."${deps."curl"."0.4.21".openssl_sys}" deps) ] else [])) else [])
-      ++ (if abi == "msvc" then mapFeatures features ([
-      (crates."kernel32_sys"."${deps."curl"."0.4.21"."kernel32_sys"}" deps)
-      (crates."schannel"."${deps."curl"."0.4.21"."schannel"}" deps)
-    ]) else [])
-      ++ (if kernel == "windows" then mapFeatures features ([
-      (crates."winapi"."${deps."curl"."0.4.21"."winapi"}" deps)
-    ]) else []);
-    features = mkFeatures (features."curl"."0.4.21" or {});
-  };
-  features_.curl."0.4.21" = deps: f: updateFeatures f (rec {
-    curl = fold recursiveUpdate {} [
-      { "0.4.21"."openssl-probe" =
-        (f.curl."0.4.21"."openssl-probe" or false) ||
-        (f.curl."0.4.21".ssl or false) ||
-        (curl."0.4.21"."ssl" or false); }
-      { "0.4.21"."openssl-sys" =
-        (f.curl."0.4.21"."openssl-sys" or false) ||
-        (f.curl."0.4.21".ssl or false) ||
-        (curl."0.4.21"."ssl" or false); }
-      { "0.4.21"."ssl" =
-        (f.curl."0.4.21"."ssl" or false) ||
-        (f.curl."0.4.21".default or false) ||
-        (curl."0.4.21"."default" or false); }
-      { "0.4.21".default = (f.curl."0.4.21".default or true); }
-    ];
-    curl_sys = fold recursiveUpdate {} [
-      { "${deps.curl."0.4.21".curl_sys}"."force-system-lib-on-osx" =
-        (f.curl_sys."${deps.curl."0.4.21".curl_sys}"."force-system-lib-on-osx" or false) ||
-        (curl."0.4.21"."force-system-lib-on-osx" or false) ||
-        (f."curl"."0.4.21"."force-system-lib-on-osx" or false); }
-      { "${deps.curl."0.4.21".curl_sys}"."http2" =
-        (f.curl_sys."${deps.curl."0.4.21".curl_sys}"."http2" or false) ||
-        (curl."0.4.21"."http2" or false) ||
-        (f."curl"."0.4.21"."http2" or false); }
-      { "${deps.curl."0.4.21".curl_sys}"."ssl" =
-        (f.curl_sys."${deps.curl."0.4.21".curl_sys}"."ssl" or false) ||
-        (curl."0.4.21"."ssl" or false) ||
-        (f."curl"."0.4.21"."ssl" or false); }
-      { "${deps.curl."0.4.21".curl_sys}"."static-curl" =
-        (f.curl_sys."${deps.curl."0.4.21".curl_sys}"."static-curl" or false) ||
-        (curl."0.4.21"."static-curl" or false) ||
-        (f."curl"."0.4.21"."static-curl" or false); }
-      { "${deps.curl."0.4.21".curl_sys}"."static-ssl" =
-        (f.curl_sys."${deps.curl."0.4.21".curl_sys}"."static-ssl" or false) ||
-        (curl."0.4.21"."static-ssl" or false) ||
-        (f."curl"."0.4.21"."static-ssl" or false); }
-      { "${deps.curl."0.4.21".curl_sys}".default = (f.curl_sys."${deps.curl."0.4.21".curl_sys}".default or false); }
-    ];
-    kernel32_sys."${deps.curl."0.4.21".kernel32_sys}".default = true;
-    libc."${deps.curl."0.4.21".libc}".default = true;
-    openssl_probe."${deps.curl."0.4.21".openssl_probe}".default = true;
-    openssl_sys."${deps.curl."0.4.21".openssl_sys}".default = true;
-    schannel."${deps.curl."0.4.21".schannel}".default = true;
-    socket2."${deps.curl."0.4.21".socket2}".default = true;
-    winapi."${deps.curl."0.4.21".winapi}".default = true;
-  }) [
-    (features_.curl_sys."${deps."curl"."0.4.21"."curl_sys"}" deps)
-    (features_.libc."${deps."curl"."0.4.21"."libc"}" deps)
-    (features_.socket2."${deps."curl"."0.4.21"."socket2"}" deps)
-    (features_.openssl_probe."${deps."curl"."0.4.21"."openssl_probe"}" deps)
-    (features_.openssl_sys."${deps."curl"."0.4.21"."openssl_sys"}" deps)
-    (features_.kernel32_sys."${deps."curl"."0.4.21"."kernel32_sys"}" deps)
-    (features_.schannel."${deps."curl"."0.4.21"."schannel"}" deps)
-    (features_.winapi."${deps."curl"."0.4.21"."winapi"}" deps)
-  ];
-
-
-# end
-# curl-sys-0.4.18
-
-  crates.curl_sys."0.4.18" = deps: { features?(features_.curl_sys."0.4.18" deps {}) }: buildRustCrate {
-    crateName = "curl-sys";
-    version = "0.4.18";
-    description = "Native bindings to the libcurl library";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "1y9qglyirlxhp62gh5vlzpq67jw7cyccvsajvmj30dv1sn7cn3vk";
-    libPath = "lib.rs";
-    libName = "curl_sys";
-    build = "build.rs";
-    dependencies = mapFeatures features ([
-      (crates."libc"."${deps."curl_sys"."0.4.18"."libc"}" deps)
-      (crates."libz_sys"."${deps."curl_sys"."0.4.18"."libz_sys"}" deps)
-    ]
-      ++ (if features.curl_sys."0.4.18".libnghttp2-sys or false then [ (crates.libnghttp2_sys."${deps."curl_sys"."0.4.18".libnghttp2_sys}" deps) ] else []))
-      ++ (if (kernel == "linux" || kernel == "darwin") && !(kernel == "darwin") then mapFeatures features ([
-    ]
-      ++ (if features.curl_sys."0.4.18".openssl-sys or false then [ (crates.openssl_sys."${deps."curl_sys"."0.4.18".openssl_sys}" deps) ] else [])) else [])
-      ++ (if abi == "msvc" then mapFeatures features ([
-]) else [])
-      ++ (if kernel == "windows" then mapFeatures features ([
-      (crates."winapi"."${deps."curl_sys"."0.4.18"."winapi"}" deps)
-    ]) else []);
-
-    buildDependencies = mapFeatures features ([
-      (crates."cc"."${deps."curl_sys"."0.4.18"."cc"}" deps)
-      (crates."pkg_config"."${deps."curl_sys"."0.4.18"."pkg_config"}" deps)
-    ]);
-    features = mkFeatures (features."curl_sys"."0.4.18" or {});
-  };
-  features_.curl_sys."0.4.18" = deps: f: updateFeatures f (rec {
-    cc."${deps.curl_sys."0.4.18".cc}".default = true;
-    curl_sys = fold recursiveUpdate {} [
-      { "0.4.18"."libnghttp2-sys" =
-        (f.curl_sys."0.4.18"."libnghttp2-sys" or false) ||
-        (f.curl_sys."0.4.18".http2 or false) ||
-        (curl_sys."0.4.18"."http2" or false); }
-      { "0.4.18"."openssl-sys" =
-        (f.curl_sys."0.4.18"."openssl-sys" or false) ||
-        (f.curl_sys."0.4.18".ssl or false) ||
-        (curl_sys."0.4.18"."ssl" or false); }
-      { "0.4.18"."ssl" =
-        (f.curl_sys."0.4.18"."ssl" or false) ||
-        (f.curl_sys."0.4.18".default or false) ||
-        (curl_sys."0.4.18"."default" or false); }
-      { "0.4.18".default = (f.curl_sys."0.4.18".default or true); }
-    ];
-    libc."${deps.curl_sys."0.4.18".libc}".default = true;
-    libnghttp2_sys."${deps.curl_sys."0.4.18".libnghttp2_sys}".default = true;
-    libz_sys."${deps.curl_sys."0.4.18".libz_sys}".default = true;
-    openssl_sys."${deps.curl_sys."0.4.18".openssl_sys}".default = true;
-    pkg_config."${deps.curl_sys."0.4.18".pkg_config}".default = true;
-    winapi = fold recursiveUpdate {} [
-      { "${deps.curl_sys."0.4.18".winapi}"."winsock2" = true; }
-      { "${deps.curl_sys."0.4.18".winapi}"."ws2def" = true; }
-      { "${deps.curl_sys."0.4.18".winapi}".default = true; }
-    ];
-  }) [
-    (features_.libc."${deps."curl_sys"."0.4.18"."libc"}" deps)
-    (features_.libnghttp2_sys."${deps."curl_sys"."0.4.18"."libnghttp2_sys"}" deps)
-    (features_.libz_sys."${deps."curl_sys"."0.4.18"."libz_sys"}" deps)
-    (features_.cc."${deps."curl_sys"."0.4.18"."cc"}" deps)
-    (features_.pkg_config."${deps."curl_sys"."0.4.18"."pkg_config"}" deps)
-    (features_.openssl_sys."${deps."curl_sys"."0.4.18"."openssl_sys"}" deps)
-    (features_.winapi."${deps."curl_sys"."0.4.18"."winapi"}" deps)
-  ];
-
-
-# end
-# docopt-1.1.0
-
-  crates.docopt."1.1.0" = deps: { features?(features_.docopt."1.1.0" deps {}) }: buildRustCrate {
-    crateName = "docopt";
-    version = "1.1.0";
-    description = "Command line argument parsing.";
-    authors = [ "Andrew Gallant <jamslam@gmail.com>" ];
-    edition = "2018";
-    sha256 = "1xjvfw8398qcxwhdmak1bw2j6zn125ch24dmrmghv50vnlbb997x";
-    crateBin =
-      [{  name = "docopt-wordlist";  path = "src/wordlist.rs"; }];
-    dependencies = mapFeatures features ([
-      (crates."lazy_static"."${deps."docopt"."1.1.0"."lazy_static"}" deps)
-      (crates."regex"."${deps."docopt"."1.1.0"."regex"}" deps)
-      (crates."serde"."${deps."docopt"."1.1.0"."serde"}" deps)
-      (crates."strsim"."${deps."docopt"."1.1.0"."strsim"}" deps)
-    ]);
-  };
-  features_.docopt."1.1.0" = deps: f: updateFeatures f ({
-    docopt."1.1.0".default = (f.docopt."1.1.0".default or true);
-    lazy_static."${deps.docopt."1.1.0".lazy_static}".default = true;
-    regex."${deps.docopt."1.1.0".regex}".default = true;
-    serde = fold recursiveUpdate {} [
-      { "${deps.docopt."1.1.0".serde}"."derive" = true; }
-      { "${deps.docopt."1.1.0".serde}".default = true; }
-    ];
-    strsim."${deps.docopt."1.1.0".strsim}".default = true;
-  }) [
-    (features_.lazy_static."${deps."docopt"."1.1.0"."lazy_static"}" deps)
-    (features_.regex."${deps."docopt"."1.1.0"."regex"}" deps)
-    (features_.serde."${deps."docopt"."1.1.0"."serde"}" deps)
-    (features_.strsim."${deps."docopt"."1.1.0"."strsim"}" deps)
-  ];
-
-
-# end
-# either-1.5.2
-
-  crates.either."1.5.2" = deps: { features?(features_.either."1.5.2" deps {}) }: buildRustCrate {
-    crateName = "either";
-    version = "1.5.2";
-    description = "The enum `Either` with variants `Left` and `Right` is a general purpose sum type with two cases.\n";
-    authors = [ "bluss" ];
-    sha256 = "1zqq1057c51f53ga4p9l4dd8ax6md27h1xjrjp2plkvml5iymks5";
-    dependencies = mapFeatures features ([
-]);
-    features = mkFeatures (features."either"."1.5.2" or {});
-  };
-  features_.either."1.5.2" = deps: f: updateFeatures f (rec {
-    either = fold recursiveUpdate {} [
-      { "1.5.2"."use_std" =
-        (f.either."1.5.2"."use_std" or false) ||
-        (f.either."1.5.2".default or false) ||
-        (either."1.5.2"."default" or false); }
-      { "1.5.2".default = (f.either."1.5.2".default or true); }
-    ];
-  }) [];
-
-
-# end
-# filetime-0.2.4
-
-  crates.filetime."0.2.4" = deps: { features?(features_.filetime."0.2.4" deps {}) }: buildRustCrate {
-    crateName = "filetime";
-    version = "0.2.4";
-    description = "Platform-agnostic accessors of timestamps in File metadata\n";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "1lsc0qjihr8y56rlzdcldzr0nbljm8qqi691msgwhy6wrkawwx5d";
-    dependencies = mapFeatures features ([
-      (crates."cfg_if"."${deps."filetime"."0.2.4"."cfg_if"}" deps)
-    ])
-      ++ (if kernel == "redox" then mapFeatures features ([
-      (crates."redox_syscall"."${deps."filetime"."0.2.4"."redox_syscall"}" deps)
-    ]) else [])
-      ++ (if (kernel == "linux" || kernel == "darwin") then mapFeatures features ([
-      (crates."libc"."${deps."filetime"."0.2.4"."libc"}" deps)
-    ]) else []);
-  };
-  features_.filetime."0.2.4" = deps: f: updateFeatures f ({
-    cfg_if."${deps.filetime."0.2.4".cfg_if}".default = true;
-    filetime."0.2.4".default = (f.filetime."0.2.4".default or true);
-    libc."${deps.filetime."0.2.4".libc}".default = true;
-    redox_syscall."${deps.filetime."0.2.4".redox_syscall}".default = true;
-  }) [
-    (features_.cfg_if."${deps."filetime"."0.2.4"."cfg_if"}" deps)
-    (features_.redox_syscall."${deps."filetime"."0.2.4"."redox_syscall"}" deps)
-    (features_.libc."${deps."filetime"."0.2.4"."libc"}" deps)
-  ];
-
-
-# end
-# flate2-1.0.7
-
-  crates.flate2."1.0.7" = deps: { features?(features_.flate2."1.0.7" deps {}) }: buildRustCrate {
-    crateName = "flate2";
-    version = "1.0.7";
-    description = "Bindings to miniz.c for DEFLATE compression and decompression exposed as\nReader/Writer streams. Contains bindings for zlib, deflate, and gzip-based\nstreams.\n";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "012vi948sap09hm1nmd228fqn7i5kp6wfb9zlz0m8ysq5if1s9mc";
-    dependencies = mapFeatures features ([
-      (crates."crc32fast"."${deps."flate2"."1.0.7"."crc32fast"}" deps)
-      (crates."libc"."${deps."flate2"."1.0.7"."libc"}" deps)
-    ]
-      ++ (if features.flate2."1.0.7".libz-sys or false then [ (crates.libz_sys."${deps."flate2"."1.0.7".libz_sys}" deps) ] else [])
-      ++ (if features.flate2."1.0.7".miniz-sys or false then [ (crates.miniz_sys."${deps."flate2"."1.0.7".miniz_sys}" deps) ] else [])
-      ++ (if features.flate2."1.0.7".miniz_oxide_c_api or false then [ (crates.miniz_oxide_c_api."${deps."flate2"."1.0.7".miniz_oxide_c_api}" deps) ] else []))
-      ++ (if cpu == "wasm32" && !(kernel == "emscripten") then mapFeatures features ([
-      (crates."miniz_oxide_c_api"."${deps."flate2"."1.0.7"."miniz_oxide_c_api"}" deps)
-    ]) else []);
-    features = mkFeatures (features."flate2"."1.0.7" or {});
-  };
-  features_.flate2."1.0.7" = deps: f: updateFeatures f (rec {
-    crc32fast."${deps.flate2."1.0.7".crc32fast}".default = true;
-    flate2 = fold recursiveUpdate {} [
-      { "1.0.7"."futures" =
-        (f.flate2."1.0.7"."futures" or false) ||
-        (f.flate2."1.0.7".tokio or false) ||
-        (flate2."1.0.7"."tokio" or false); }
-      { "1.0.7"."libz-sys" =
-        (f.flate2."1.0.7"."libz-sys" or false) ||
-        (f.flate2."1.0.7".zlib or false) ||
-        (flate2."1.0.7"."zlib" or false); }
-      { "1.0.7"."miniz-sys" =
-        (f.flate2."1.0.7"."miniz-sys" or false) ||
-        (f.flate2."1.0.7".default or false) ||
-        (flate2."1.0.7"."default" or false); }
-      { "1.0.7"."miniz_oxide_c_api" =
-        (f.flate2."1.0.7"."miniz_oxide_c_api" or false) ||
-        (f.flate2."1.0.7".rust_backend or false) ||
-        (flate2."1.0.7"."rust_backend" or false); }
-      { "1.0.7"."tokio-io" =
-        (f.flate2."1.0.7"."tokio-io" or false) ||
-        (f.flate2."1.0.7".tokio or false) ||
-        (flate2."1.0.7"."tokio" or false); }
-      { "1.0.7".default = (f.flate2."1.0.7".default or true); }
-    ];
-    libc."${deps.flate2."1.0.7".libc}".default = true;
-    libz_sys."${deps.flate2."1.0.7".libz_sys}".default = true;
-    miniz_oxide_c_api = fold recursiveUpdate {} [
-      { "${deps.flate2."1.0.7".miniz_oxide_c_api}"."no_c_export" =
-        (f.miniz_oxide_c_api."${deps.flate2."1.0.7".miniz_oxide_c_api}"."no_c_export" or false) ||
-        true ||
-        true; }
-      { "${deps.flate2."1.0.7".miniz_oxide_c_api}".default = true; }
-    ];
-    miniz_sys."${deps.flate2."1.0.7".miniz_sys}".default = true;
-  }) [
-    (features_.crc32fast."${deps."flate2"."1.0.7"."crc32fast"}" deps)
-    (features_.libc."${deps."flate2"."1.0.7"."libc"}" deps)
-    (features_.libz_sys."${deps."flate2"."1.0.7"."libz_sys"}" deps)
-    (features_.miniz_sys."${deps."flate2"."1.0.7"."miniz_sys"}" deps)
-    (features_.miniz_oxide_c_api."${deps."flate2"."1.0.7"."miniz_oxide_c_api"}" deps)
-    (features_.miniz_oxide_c_api."${deps."flate2"."1.0.7"."miniz_oxide_c_api"}" deps)
-  ];
-
-
-# end
-# fnv-1.0.6
-
-  crates.fnv."1.0.6" = deps: { features?(features_.fnv."1.0.6" deps {}) }: buildRustCrate {
-    crateName = "fnv";
-    version = "1.0.6";
-    description = "Fowler–Noll–Vo hash function";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "128mlh23y3gg6ag5h8iiqlcbl59smisdzraqy88ldrf75kbw27ip";
-    libPath = "lib.rs";
-  };
-  features_.fnv."1.0.6" = deps: f: updateFeatures f ({
-    fnv."1.0.6".default = (f.fnv."1.0.6".default or true);
-  }) [];
-
-
-# end
-# foreign-types-0.3.2
-
-  crates.foreign_types."0.3.2" = deps: { features?(features_.foreign_types."0.3.2" deps {}) }: buildRustCrate {
-    crateName = "foreign-types";
-    version = "0.3.2";
-    description = "A framework for Rust wrappers over C APIs";
-    authors = [ "Steven Fackler <sfackler@gmail.com>" ];
-    sha256 = "105n8sp2djb1s5lzrw04p7ss3dchr5qa3canmynx396nh3vwm2p8";
-    dependencies = mapFeatures features ([
-      (crates."foreign_types_shared"."${deps."foreign_types"."0.3.2"."foreign_types_shared"}" deps)
-    ]);
-  };
-  features_.foreign_types."0.3.2" = deps: f: updateFeatures f ({
-    foreign_types."0.3.2".default = (f.foreign_types."0.3.2".default or true);
-    foreign_types_shared."${deps.foreign_types."0.3.2".foreign_types_shared}".default = true;
-  }) [
-    (features_.foreign_types_shared."${deps."foreign_types"."0.3.2"."foreign_types_shared"}" deps)
-  ];
-
-
-# end
-# foreign-types-shared-0.1.1
-
-  crates.foreign_types_shared."0.1.1" = deps: { features?(features_.foreign_types_shared."0.1.1" deps {}) }: buildRustCrate {
-    crateName = "foreign-types-shared";
-    version = "0.1.1";
-    description = "An internal crate used by foreign-types";
-    authors = [ "Steven Fackler <sfackler@gmail.com>" ];
-    sha256 = "0b6cnvqbflws8dxywk4589vgbz80049lz4x1g9dfy4s1ppd3g4z5";
-  };
-  features_.foreign_types_shared."0.1.1" = deps: f: updateFeatures f ({
-    foreign_types_shared."0.1.1".default = (f.foreign_types_shared."0.1.1".default or true);
-  }) [];
-
-
-# end
-# fs2-0.4.3
-
-  crates.fs2."0.4.3" = deps: { features?(features_.fs2."0.4.3" deps {}) }: buildRustCrate {
-    crateName = "fs2";
-    version = "0.4.3";
-    description = "Cross-platform file locks and file duplication.";
-    authors = [ "Dan Burkert <dan@danburkert.com>" ];
-    sha256 = "1crj36rhhpk3qby9yj7r77w7sld0mzab2yicmphbdkfymbmp3ldp";
-    dependencies = (if (kernel == "linux" || kernel == "darwin") then mapFeatures features ([
-      (crates."libc"."${deps."fs2"."0.4.3"."libc"}" deps)
-    ]) else [])
-      ++ (if kernel == "windows" then mapFeatures features ([
-      (crates."winapi"."${deps."fs2"."0.4.3"."winapi"}" deps)
-    ]) else []);
-  };
-  features_.fs2."0.4.3" = deps: f: updateFeatures f ({
-    fs2."0.4.3".default = (f.fs2."0.4.3".default or true);
-    libc."${deps.fs2."0.4.3".libc}".default = true;
-    winapi = fold recursiveUpdate {} [
-      { "${deps.fs2."0.4.3".winapi}"."fileapi" = true; }
-      { "${deps.fs2."0.4.3".winapi}"."handleapi" = true; }
-      { "${deps.fs2."0.4.3".winapi}"."processthreadsapi" = true; }
-      { "${deps.fs2."0.4.3".winapi}"."std" = true; }
-      { "${deps.fs2."0.4.3".winapi}"."winbase" = true; }
-      { "${deps.fs2."0.4.3".winapi}"."winerror" = true; }
-      { "${deps.fs2."0.4.3".winapi}".default = true; }
-    ];
-  }) [
-    (features_.libc."${deps."fs2"."0.4.3"."libc"}" deps)
-    (features_.winapi."${deps."fs2"."0.4.3"."winapi"}" deps)
-  ];
-
-
-# end
-# fwdansi-1.0.1
-
-  crates.fwdansi."1.0.1" = deps: { features?(features_.fwdansi."1.0.1" deps {}) }: buildRustCrate {
-    crateName = "fwdansi";
-    version = "1.0.1";
-    description = "Forwards a byte string with ANSI escape code to a termcolor terminal";
-    authors = [ "kennytm <kennytm@gmail.com>" ];
-    sha256 = "00mzclq1wx55p6x5xx4yhpj70vsrivk2w1wbzq8bnf6xnl2km0xn";
-    dependencies = mapFeatures features ([
-      (crates."memchr"."${deps."fwdansi"."1.0.1"."memchr"}" deps)
-      (crates."termcolor"."${deps."fwdansi"."1.0.1"."termcolor"}" deps)
-    ]);
-  };
-  features_.fwdansi."1.0.1" = deps: f: updateFeatures f ({
-    fwdansi."1.0.1".default = (f.fwdansi."1.0.1".default or true);
-    memchr."${deps.fwdansi."1.0.1".memchr}".default = true;
-    termcolor."${deps.fwdansi."1.0.1".termcolor}".default = true;
-  }) [
-    (features_.memchr."${deps."fwdansi"."1.0.1"."memchr"}" deps)
-    (features_.termcolor."${deps."fwdansi"."1.0.1"."termcolor"}" deps)
-  ];
-
-
-# end
-# git2-0.8.0
-
-  crates.git2."0.8.0" = deps: { features?(features_.git2."0.8.0" deps {}) }: buildRustCrate {
-    crateName = "git2";
-    version = "0.8.0";
-    description = "Bindings to libgit2 for interoperating with git repositories. This library is\nboth threadsafe and memory safe and allows both reading and writing git\nrepositories.\n";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "0nkzglhq7lrdzv23jakygv6h5kks2mdr7xh73chnr7bqdc36mi43";
-    dependencies = mapFeatures features ([
-      (crates."bitflags"."${deps."git2"."0.8.0"."bitflags"}" deps)
-      (crates."libc"."${deps."git2"."0.8.0"."libc"}" deps)
-      (crates."libgit2_sys"."${deps."git2"."0.8.0"."libgit2_sys"}" deps)
-      (crates."log"."${deps."git2"."0.8.0"."log"}" deps)
-      (crates."url"."${deps."git2"."0.8.0"."url"}" deps)
-    ])
-      ++ (if (kernel == "linux" || kernel == "darwin") && !(kernel == "darwin") then mapFeatures features ([
-    ]
-      ++ (if features.git2."0.8.0".openssl-probe or false then [ (crates.openssl_probe."${deps."git2"."0.8.0".openssl_probe}" deps) ] else [])
-      ++ (if features.git2."0.8.0".openssl-sys or false then [ (crates.openssl_sys."${deps."git2"."0.8.0".openssl_sys}" deps) ] else [])) else []);
-    features = mkFeatures (features."git2"."0.8.0" or {});
-  };
-  features_.git2."0.8.0" = deps: f: updateFeatures f (rec {
-    bitflags."${deps.git2."0.8.0".bitflags}".default = true;
-    git2 = fold recursiveUpdate {} [
-      { "0.8.0"."curl" =
-        (f.git2."0.8.0"."curl" or false) ||
-        (f.git2."0.8.0".default or false) ||
-        (git2."0.8.0"."default" or false); }
-      { "0.8.0"."https" =
-        (f.git2."0.8.0"."https" or false) ||
-        (f.git2."0.8.0".default or false) ||
-        (git2."0.8.0"."default" or false); }
-      { "0.8.0"."openssl-probe" =
-        (f.git2."0.8.0"."openssl-probe" or false) ||
-        (f.git2."0.8.0".https or false) ||
-        (git2."0.8.0"."https" or false); }
-      { "0.8.0"."openssl-sys" =
-        (f.git2."0.8.0"."openssl-sys" or false) ||
-        (f.git2."0.8.0".https or false) ||
-        (git2."0.8.0"."https" or false); }
-      { "0.8.0"."ssh" =
-        (f.git2."0.8.0"."ssh" or false) ||
-        (f.git2."0.8.0".default or false) ||
-        (git2."0.8.0"."default" or false); }
-      { "0.8.0"."ssh_key_from_memory" =
-        (f.git2."0.8.0"."ssh_key_from_memory" or false) ||
-        (f.git2."0.8.0".default or false) ||
-        (git2."0.8.0"."default" or false); }
-      { "0.8.0".default = (f.git2."0.8.0".default or true); }
-    ];
-    libc."${deps.git2."0.8.0".libc}".default = true;
-    libgit2_sys = fold recursiveUpdate {} [
-      { "${deps.git2."0.8.0".libgit2_sys}"."curl" =
-        (f.libgit2_sys."${deps.git2."0.8.0".libgit2_sys}"."curl" or false) ||
-        (git2."0.8.0"."curl" or false) ||
-        (f."git2"."0.8.0"."curl" or false); }
-      { "${deps.git2."0.8.0".libgit2_sys}"."https" =
-        (f.libgit2_sys."${deps.git2."0.8.0".libgit2_sys}"."https" or false) ||
-        (git2."0.8.0"."https" or false) ||
-        (f."git2"."0.8.0"."https" or false); }
-      { "${deps.git2."0.8.0".libgit2_sys}"."ssh" =
-        (f.libgit2_sys."${deps.git2."0.8.0".libgit2_sys}"."ssh" or false) ||
-        (git2."0.8.0"."ssh" or false) ||
-        (f."git2"."0.8.0"."ssh" or false); }
-      { "${deps.git2."0.8.0".libgit2_sys}"."ssh_key_from_memory" =
-        (f.libgit2_sys."${deps.git2."0.8.0".libgit2_sys}"."ssh_key_from_memory" or false) ||
-        (git2."0.8.0"."ssh_key_from_memory" or false) ||
-        (f."git2"."0.8.0"."ssh_key_from_memory" or false); }
-      { "${deps.git2."0.8.0".libgit2_sys}".default = true; }
-    ];
-    log."${deps.git2."0.8.0".log}".default = true;
-    openssl_probe."${deps.git2."0.8.0".openssl_probe}".default = true;
-    openssl_sys."${deps.git2."0.8.0".openssl_sys}".default = true;
-    url."${deps.git2."0.8.0".url}".default = true;
-  }) [
-    (features_.bitflags."${deps."git2"."0.8.0"."bitflags"}" deps)
-    (features_.libc."${deps."git2"."0.8.0"."libc"}" deps)
-    (features_.libgit2_sys."${deps."git2"."0.8.0"."libgit2_sys"}" deps)
-    (features_.log."${deps."git2"."0.8.0"."log"}" deps)
-    (features_.url."${deps."git2"."0.8.0"."url"}" deps)
-    (features_.openssl_probe."${deps."git2"."0.8.0"."openssl_probe"}" deps)
-    (features_.openssl_sys."${deps."git2"."0.8.0"."openssl_sys"}" deps)
-  ];
-
-
-# end
-# git2-curl-0.9.0
-
-  crates.git2_curl."0.9.0" = deps: { features?(features_.git2_curl."0.9.0" deps {}) }: buildRustCrate {
-    crateName = "git2-curl";
-    version = "0.9.0";
-    description = "Backend for an HTTP transport in libgit2 powered by libcurl.\n\nIntended to be used with the git2 crate.\n";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "0m7bjx7pbrd7hiwwbazgigv9anici9jfwgzhp3q47smbwszdv2hh";
-    dependencies = mapFeatures features ([
-      (crates."curl"."${deps."git2_curl"."0.9.0"."curl"}" deps)
-      (crates."git2"."${deps."git2_curl"."0.9.0"."git2"}" deps)
-      (crates."log"."${deps."git2_curl"."0.9.0"."log"}" deps)
-      (crates."url"."${deps."git2_curl"."0.9.0"."url"}" deps)
-    ]);
-  };
-  features_.git2_curl."0.9.0" = deps: f: updateFeatures f ({
-    curl."${deps.git2_curl."0.9.0".curl}".default = true;
-    git2."${deps.git2_curl."0.9.0".git2}".default = (f.git2."${deps.git2_curl."0.9.0".git2}".default or false);
-    git2_curl."0.9.0".default = (f.git2_curl."0.9.0".default or true);
-    log."${deps.git2_curl."0.9.0".log}".default = true;
-    url."${deps.git2_curl."0.9.0".url}".default = true;
-  }) [
-    (features_.curl."${deps."git2_curl"."0.9.0"."curl"}" deps)
-    (features_.git2."${deps."git2_curl"."0.9.0"."git2"}" deps)
-    (features_.log."${deps."git2_curl"."0.9.0"."log"}" deps)
-    (features_.url."${deps."git2_curl"."0.9.0"."url"}" deps)
-  ];
-
-
-# end
-# glob-0.2.11
-
-  crates.glob."0.2.11" = deps: { features?(features_.glob."0.2.11" deps {}) }: buildRustCrate {
-    crateName = "glob";
-    version = "0.2.11";
-    description = "Support for matching file paths against Unix shell style patterns.\n";
-    authors = [ "The Rust Project Developers" ];
-    sha256 = "104389jjxs8r2f5cc9p0axhjmndgln60ih5x4f00ccgg9d3zarlf";
-  };
-  features_.glob."0.2.11" = deps: f: updateFeatures f ({
-    glob."0.2.11".default = (f.glob."0.2.11".default or true);
-  }) [];
-
-
-# end
-# globset-0.4.3
-
-  crates.globset."0.4.3" = deps: { features?(features_.globset."0.4.3" deps {}) }: buildRustCrate {
-    crateName = "globset";
-    version = "0.4.3";
-    description = "Cross platform single glob and glob set matching. Glob set matching is the\nprocess of matching one or more glob patterns against a single candidate path\nsimultaneously, and returning all of the globs that matched.\n";
-    authors = [ "Andrew Gallant <jamslam@gmail.com>" ];
-    sha256 = "0vj99vw55mp7w44p1157f9c44q5lms6sn0mllhavwrwdn3iyfrij";
-    dependencies = mapFeatures features ([
-      (crates."aho_corasick"."${deps."globset"."0.4.3"."aho_corasick"}" deps)
-      (crates."bstr"."${deps."globset"."0.4.3"."bstr"}" deps)
-      (crates."fnv"."${deps."globset"."0.4.3"."fnv"}" deps)
-      (crates."log"."${deps."globset"."0.4.3"."log"}" deps)
-      (crates."regex"."${deps."globset"."0.4.3"."regex"}" deps)
-    ]);
-    features = mkFeatures (features."globset"."0.4.3" or {});
-  };
-  features_.globset."0.4.3" = deps: f: updateFeatures f ({
-    aho_corasick."${deps.globset."0.4.3".aho_corasick}".default = true;
-    bstr = fold recursiveUpdate {} [
-      { "${deps.globset."0.4.3".bstr}"."std" = true; }
-      { "${deps.globset."0.4.3".bstr}".default = (f.bstr."${deps.globset."0.4.3".bstr}".default or false); }
-    ];
-    fnv."${deps.globset."0.4.3".fnv}".default = true;
-    globset."0.4.3".default = (f.globset."0.4.3".default or true);
-    log."${deps.globset."0.4.3".log}".default = true;
-    regex."${deps.globset."0.4.3".regex}".default = true;
-  }) [
-    (features_.aho_corasick."${deps."globset"."0.4.3"."aho_corasick"}" deps)
-    (features_.bstr."${deps."globset"."0.4.3"."bstr"}" deps)
-    (features_.fnv."${deps."globset"."0.4.3"."fnv"}" deps)
-    (features_.log."${deps."globset"."0.4.3"."log"}" deps)
-    (features_.regex."${deps."globset"."0.4.3"."regex"}" deps)
-  ];
-
-
-# end
-# hashbrown-0.1.8
-
-  crates.hashbrown."0.1.8" = deps: { features?(features_.hashbrown."0.1.8" deps {}) }: buildRustCrate {
-    crateName = "hashbrown";
-    version = "0.1.8";
-    description = "A Rust port of Google's SwissTable hash map";
-    authors = [ "Amanieu d'Antras <amanieu@gmail.com>" ];
-    sha256 = "047fk80pg59cdn5lz4h2a514fmgmya896dvy3dqqviia52a27fzh";
-    dependencies = mapFeatures features ([
-      (crates."byteorder"."${deps."hashbrown"."0.1.8"."byteorder"}" deps)
-      (crates."scopeguard"."${deps."hashbrown"."0.1.8"."scopeguard"}" deps)
-    ]);
-    features = mkFeatures (features."hashbrown"."0.1.8" or {});
-  };
-  features_.hashbrown."0.1.8" = deps: f: updateFeatures f ({
-    byteorder."${deps.hashbrown."0.1.8".byteorder}".default = (f.byteorder."${deps.hashbrown."0.1.8".byteorder}".default or false);
-    hashbrown."0.1.8".default = (f.hashbrown."0.1.8".default or true);
-    scopeguard."${deps.hashbrown."0.1.8".scopeguard}".default = (f.scopeguard."${deps.hashbrown."0.1.8".scopeguard}".default or false);
-  }) [
-    (features_.byteorder."${deps."hashbrown"."0.1.8"."byteorder"}" deps)
-    (features_.scopeguard."${deps."hashbrown"."0.1.8"."scopeguard"}" deps)
-  ];
-
-
-# end
-# hex-0.3.2
-
-  crates.hex."0.3.2" = deps: { features?(features_.hex."0.3.2" deps {}) }: buildRustCrate {
-    crateName = "hex";
-    version = "0.3.2";
-    description = "Encoding and decoding data into/from hexadecimal representation.";
-    authors = [ "KokaKiwi <kokakiwi@kokakiwi.net>" ];
-    sha256 = "0hs0xfb4x67y4ss9mmbjmibkwakbn3xf23i21m409bw2zqk9b6kz";
-    features = mkFeatures (features."hex"."0.3.2" or {});
-  };
-  features_.hex."0.3.2" = deps: f: updateFeatures f ({
-    hex."0.3.2".default = (f.hex."0.3.2".default or true);
-  }) [];
-
-
-# end
-# home-0.3.4
-
-  crates.home."0.3.4" = deps: { features?(features_.home."0.3.4" deps {}) }: buildRustCrate {
-    crateName = "home";
-    version = "0.3.4";
-    description = "Shared definitions of home directories";
-    authors = [ "Brian Anderson <andersrb@gmail.com>" ];
-    sha256 = "19fbzvv74wqxqpdlz6ri1p270i8hp17h8njjj68k98sgrabkcr0n";
-    dependencies = (if kernel == "windows" then mapFeatures features ([
-      (crates."scopeguard"."${deps."home"."0.3.4"."scopeguard"}" deps)
-      (crates."winapi"."${deps."home"."0.3.4"."winapi"}" deps)
-    ]) else []);
-  };
-  features_.home."0.3.4" = deps: f: updateFeatures f ({
-    home."0.3.4".default = (f.home."0.3.4".default or true);
-    scopeguard."${deps.home."0.3.4".scopeguard}".default = true;
-    winapi = fold recursiveUpdate {} [
-      { "${deps.home."0.3.4".winapi}"."errhandlingapi" = true; }
-      { "${deps.home."0.3.4".winapi}"."handleapi" = true; }
-      { "${deps.home."0.3.4".winapi}"."processthreadsapi" = true; }
-      { "${deps.home."0.3.4".winapi}"."std" = true; }
-      { "${deps.home."0.3.4".winapi}"."userenv" = true; }
-      { "${deps.home."0.3.4".winapi}"."winerror" = true; }
-      { "${deps.home."0.3.4".winapi}"."winnt" = true; }
-      { "${deps.home."0.3.4".winapi}".default = true; }
-    ];
-  }) [
-    (features_.scopeguard."${deps."home"."0.3.4"."scopeguard"}" deps)
-    (features_.winapi."${deps."home"."0.3.4"."winapi"}" deps)
-  ];
-
-
-# end
-# http-0.1.17
-
-  crates.http."0.1.17" = deps: { features?(features_.http."0.1.17" deps {}) }: buildRustCrate {
-    crateName = "http";
-    version = "0.1.17";
-    description = "A set of types for representing HTTP requests and responses.\n";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" "Carl Lerche <me@carllerche.com>" "Sean McArthur <sean@seanmonstar.com>" ];
-    sha256 = "0q71wgggg1h5kjyg1gb4m70g3ian9qwrkx2b9wwvfyafrkmjpg9c";
-    dependencies = mapFeatures features ([
-      (crates."bytes"."${deps."http"."0.1.17"."bytes"}" deps)
-      (crates."fnv"."${deps."http"."0.1.17"."fnv"}" deps)
-      (crates."itoa"."${deps."http"."0.1.17"."itoa"}" deps)
-    ]);
-  };
-  features_.http."0.1.17" = deps: f: updateFeatures f ({
-    bytes."${deps.http."0.1.17".bytes}".default = true;
-    fnv."${deps.http."0.1.17".fnv}".default = true;
-    http."0.1.17".default = (f.http."0.1.17".default or true);
-    itoa."${deps.http."0.1.17".itoa}".default = true;
-  }) [
-    (features_.bytes."${deps."http"."0.1.17"."bytes"}" deps)
-    (features_.fnv."${deps."http"."0.1.17"."fnv"}" deps)
-    (features_.itoa."${deps."http"."0.1.17"."itoa"}" deps)
-  ];
-
-
-# end
-# ignore-0.4.7
-
-  crates.ignore."0.4.7" = deps: { features?(features_.ignore."0.4.7" deps {}) }: buildRustCrate {
-    crateName = "ignore";
-    version = "0.4.7";
-    description = "A fast library for efficiently matching ignore files such as `.gitignore`\nagainst file paths.\n";
-    authors = [ "Andrew Gallant <jamslam@gmail.com>" ];
-    sha256 = "10ky0pnkzk6spa416sxvhcpc1nxq56n6mxkmhzy3ws57x9v75nkj";
-    dependencies = mapFeatures features ([
-      (crates."crossbeam_channel"."${deps."ignore"."0.4.7"."crossbeam_channel"}" deps)
-      (crates."globset"."${deps."ignore"."0.4.7"."globset"}" deps)
-      (crates."lazy_static"."${deps."ignore"."0.4.7"."lazy_static"}" deps)
-      (crates."log"."${deps."ignore"."0.4.7"."log"}" deps)
-      (crates."memchr"."${deps."ignore"."0.4.7"."memchr"}" deps)
-      (crates."regex"."${deps."ignore"."0.4.7"."regex"}" deps)
-      (crates."same_file"."${deps."ignore"."0.4.7"."same_file"}" deps)
-      (crates."thread_local"."${deps."ignore"."0.4.7"."thread_local"}" deps)
-      (crates."walkdir"."${deps."ignore"."0.4.7"."walkdir"}" deps)
-    ])
-      ++ (if kernel == "windows" then mapFeatures features ([
-      (crates."winapi_util"."${deps."ignore"."0.4.7"."winapi_util"}" deps)
-    ]) else []);
-    features = mkFeatures (features."ignore"."0.4.7" or {});
-  };
-  features_.ignore."0.4.7" = deps: f: updateFeatures f (rec {
-    crossbeam_channel."${deps.ignore."0.4.7".crossbeam_channel}".default = true;
-    globset = fold recursiveUpdate {} [
-      { "${deps.ignore."0.4.7".globset}"."simd-accel" =
-        (f.globset."${deps.ignore."0.4.7".globset}"."simd-accel" or false) ||
-        (ignore."0.4.7"."simd-accel" or false) ||
-        (f."ignore"."0.4.7"."simd-accel" or false); }
-      { "${deps.ignore."0.4.7".globset}".default = true; }
-    ];
-    ignore."0.4.7".default = (f.ignore."0.4.7".default or true);
-    lazy_static."${deps.ignore."0.4.7".lazy_static}".default = true;
-    log."${deps.ignore."0.4.7".log}".default = true;
-    memchr."${deps.ignore."0.4.7".memchr}".default = true;
-    regex."${deps.ignore."0.4.7".regex}".default = true;
-    same_file."${deps.ignore."0.4.7".same_file}".default = true;
-    thread_local."${deps.ignore."0.4.7".thread_local}".default = true;
-    walkdir."${deps.ignore."0.4.7".walkdir}".default = true;
-    winapi_util."${deps.ignore."0.4.7".winapi_util}".default = true;
-  }) [
-    (features_.crossbeam_channel."${deps."ignore"."0.4.7"."crossbeam_channel"}" deps)
-    (features_.globset."${deps."ignore"."0.4.7"."globset"}" deps)
-    (features_.lazy_static."${deps."ignore"."0.4.7"."lazy_static"}" deps)
-    (features_.log."${deps."ignore"."0.4.7"."log"}" deps)
-    (features_.memchr."${deps."ignore"."0.4.7"."memchr"}" deps)
-    (features_.regex."${deps."ignore"."0.4.7"."regex"}" deps)
-    (features_.same_file."${deps."ignore"."0.4.7"."same_file"}" deps)
-    (features_.thread_local."${deps."ignore"."0.4.7"."thread_local"}" deps)
-    (features_.walkdir."${deps."ignore"."0.4.7"."walkdir"}" deps)
-    (features_.winapi_util."${deps."ignore"."0.4.7"."winapi_util"}" deps)
-  ];
-
-
-# end
-# im-rc-12.3.4
-
-  crates.im_rc."12.3.4" = deps: { features?(features_.im_rc."12.3.4" deps {}) }: buildRustCrate {
-    crateName = "im-rc";
-    version = "12.3.4";
-    description = "Immutable collection datatypes (the fast but not thread safe version)";
-    authors = [ "Bodil Stokke <bodil@bodil.org>" ];
-    edition = "2018";
-    sha256 = "0l53vjm7ycccb0lxj1zpgvlik5rpngnf9gggvgb3jbdv2jxjkdhz";
-    libPath = "./src/lib.rs";
-    build = "./build.rs";
-    dependencies = mapFeatures features ([
-      (crates."sized_chunks"."${deps."im_rc"."12.3.4"."sized_chunks"}" deps)
-      (crates."typenum"."${deps."im_rc"."12.3.4"."typenum"}" deps)
-    ]);
-
-    buildDependencies = mapFeatures features ([
-      (crates."rustc_version"."${deps."im_rc"."12.3.4"."rustc_version"}" deps)
-    ]);
-  };
-  features_.im_rc."12.3.4" = deps: f: updateFeatures f ({
-    im_rc."12.3.4".default = (f.im_rc."12.3.4".default or true);
-    rustc_version."${deps.im_rc."12.3.4".rustc_version}".default = true;
-    sized_chunks."${deps.im_rc."12.3.4".sized_chunks}".default = true;
-    typenum."${deps.im_rc."12.3.4".typenum}".default = true;
-  }) [
-    (features_.sized_chunks."${deps."im_rc"."12.3.4"."sized_chunks"}" deps)
-    (features_.typenum."${deps."im_rc"."12.3.4"."typenum"}" deps)
-    (features_.rustc_version."${deps."im_rc"."12.3.4"."rustc_version"}" deps)
-  ];
-
-
-# end
-# iovec-0.1.2
-
-  crates.iovec."0.1.2" = deps: { features?(features_.iovec."0.1.2" deps {}) }: buildRustCrate {
-    crateName = "iovec";
-    version = "0.1.2";
-    description = "Portable buffer type for scatter/gather I/O operations\n";
-    authors = [ "Carl Lerche <me@carllerche.com>" ];
-    sha256 = "0vjymmb7wj4v4kza5jjn48fcdb85j3k37y7msjl3ifz0p9yiyp2r";
-    dependencies = (if (kernel == "linux" || kernel == "darwin") then mapFeatures features ([
-      (crates."libc"."${deps."iovec"."0.1.2"."libc"}" deps)
-    ]) else [])
-      ++ (if kernel == "windows" then mapFeatures features ([
-      (crates."winapi"."${deps."iovec"."0.1.2"."winapi"}" deps)
-    ]) else []);
-  };
-  features_.iovec."0.1.2" = deps: f: updateFeatures f ({
-    iovec."0.1.2".default = (f.iovec."0.1.2".default or true);
-    libc."${deps.iovec."0.1.2".libc}".default = true;
-    winapi."${deps.iovec."0.1.2".winapi}".default = true;
-  }) [
-    (features_.libc."${deps."iovec"."0.1.2"."libc"}" deps)
-    (features_.winapi."${deps."iovec"."0.1.2"."winapi"}" deps)
-  ];
-
-
-# end
-# itertools-0.7.11
-
-  crates.itertools."0.7.11" = deps: { features?(features_.itertools."0.7.11" deps {}) }: buildRustCrate {
-    crateName = "itertools";
-    version = "0.7.11";
-    description = "Extra iterator adaptors, iterator methods, free functions, and macros.";
-    authors = [ "bluss" ];
-    sha256 = "0gavmkvn2c3cwfwk5zl5p7saiqn4ww227am5ykn6pgfm7c6ppz56";
-    dependencies = mapFeatures features ([
-      (crates."either"."${deps."itertools"."0.7.11"."either"}" deps)
-    ]);
-    features = mkFeatures (features."itertools"."0.7.11" or {});
-  };
-  features_.itertools."0.7.11" = deps: f: updateFeatures f (rec {
-    either."${deps.itertools."0.7.11".either}".default = (f.either."${deps.itertools."0.7.11".either}".default or false);
-    itertools = fold recursiveUpdate {} [
-      { "0.7.11"."use_std" =
-        (f.itertools."0.7.11"."use_std" or false) ||
-        (f.itertools."0.7.11".default or false) ||
-        (itertools."0.7.11"."default" or false); }
-      { "0.7.11".default = (f.itertools."0.7.11".default or true); }
-    ];
-  }) [
-    (features_.either."${deps."itertools"."0.7.11"."either"}" deps)
-  ];
-
-
-# end
-# jobserver-0.1.13
-
-  crates.jobserver."0.1.13" = deps: { features?(features_.jobserver."0.1.13" deps {}) }: buildRustCrate {
-    crateName = "jobserver";
-    version = "0.1.13";
-    description = "An implementation of the GNU make jobserver for Rust\n";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "01h08h0k9i7cvlnlw53jf398d03k5kxrs7m30xl7h9s5dlw0vi9i";
-    dependencies = mapFeatures features ([
-      (crates."log"."${deps."jobserver"."0.1.13"."log"}" deps)
-    ])
-      ++ (if (kernel == "linux" || kernel == "darwin") then mapFeatures features ([
-      (crates."libc"."${deps."jobserver"."0.1.13"."libc"}" deps)
-    ]) else [])
-      ++ (if kernel == "windows" then mapFeatures features ([
-      (crates."rand"."${deps."jobserver"."0.1.13"."rand"}" deps)
-    ]) else []);
-  };
-  features_.jobserver."0.1.13" = deps: f: updateFeatures f ({
-    jobserver."0.1.13".default = (f.jobserver."0.1.13".default or true);
-    libc."${deps.jobserver."0.1.13".libc}".default = true;
-    log."${deps.jobserver."0.1.13".log}".default = true;
-    rand."${deps.jobserver."0.1.13".rand}".default = true;
-  }) [
-    (features_.log."${deps."jobserver"."0.1.13"."log"}" deps)
-    (features_.libc."${deps."jobserver"."0.1.13"."libc"}" deps)
-    (features_.rand."${deps."jobserver"."0.1.13"."rand"}" deps)
-  ];
-
-
-# end
-# kernel32-sys-0.2.2
-
-  crates.kernel32_sys."0.2.2" = deps: { features?(features_.kernel32_sys."0.2.2" deps {}) }: buildRustCrate {
-    crateName = "kernel32-sys";
-    version = "0.2.2";
-    description = "Contains function definitions for the Windows API library kernel32. See winapi for types and constants.";
-    authors = [ "Peter Atashian <retep998@gmail.com>" ];
-    sha256 = "1lrw1hbinyvr6cp28g60z97w32w8vsk6pahk64pmrv2fmby8srfj";
-    libName = "kernel32";
-    build = "build.rs";
-    dependencies = mapFeatures features ([
-      (crates."winapi"."${deps."kernel32_sys"."0.2.2"."winapi"}" deps)
-    ]);
-
-    buildDependencies = mapFeatures features ([
-      (crates."winapi_build"."${deps."kernel32_sys"."0.2.2"."winapi_build"}" deps)
-    ]);
-  };
-  features_.kernel32_sys."0.2.2" = deps: f: updateFeatures f ({
-    kernel32_sys."0.2.2".default = (f.kernel32_sys."0.2.2".default or true);
-    winapi."${deps.kernel32_sys."0.2.2".winapi}".default = true;
-    winapi_build."${deps.kernel32_sys."0.2.2".winapi_build}".default = true;
-  }) [
-    (features_.winapi."${deps."kernel32_sys"."0.2.2"."winapi"}" deps)
-    (features_.winapi_build."${deps."kernel32_sys"."0.2.2"."winapi_build"}" deps)
-  ];
-
-
-# end
-# lazycell-1.2.1
-
-  crates.lazycell."1.2.1" = deps: { features?(features_.lazycell."1.2.1" deps {}) }: buildRustCrate {
-    crateName = "lazycell";
-    version = "1.2.1";
-    description = "A library providing a lazily filled Cell struct";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" "Nikita Pekin <contact@nikitapek.in>" ];
-    sha256 = "1m4h2q9rgxrgc7xjnws1x81lrb68jll8w3pykx1a9bhr29q2mcwm";
-    dependencies = mapFeatures features ([
-]);
-    features = mkFeatures (features."lazycell"."1.2.1" or {});
-  };
-  features_.lazycell."1.2.1" = deps: f: updateFeatures f (rec {
-    lazycell = fold recursiveUpdate {} [
-      { "1.2.1"."clippy" =
-        (f.lazycell."1.2.1"."clippy" or false) ||
-        (f.lazycell."1.2.1".nightly-testing or false) ||
-        (lazycell."1.2.1"."nightly-testing" or false); }
-      { "1.2.1"."nightly" =
-        (f.lazycell."1.2.1"."nightly" or false) ||
-        (f.lazycell."1.2.1".nightly-testing or false) ||
-        (lazycell."1.2.1"."nightly-testing" or false); }
-      { "1.2.1".default = (f.lazycell."1.2.1".default or true); }
-    ];
-  }) [];
-
-
-# end
-# libc-0.2.51
-
-  crates.libc."0.2.51" = deps: { features?(features_.libc."0.2.51" deps {}) }: buildRustCrate {
-    crateName = "libc";
-    version = "0.2.51";
-    description = "Raw FFI bindings to platform libraries like libc.\n";
-    authors = [ "The Rust Project Developers" ];
-    sha256 = "1lzavxj1ymm7vghs6nmzq9shprdlqby73py9k30gwvv0dwy365cv";
-    build = "build.rs";
-    dependencies = mapFeatures features ([
-]);
-    features = mkFeatures (features."libc"."0.2.51" or {});
-  };
-  features_.libc."0.2.51" = deps: f: updateFeatures f (rec {
-    libc = fold recursiveUpdate {} [
-      { "0.2.51"."align" =
-        (f.libc."0.2.51"."align" or false) ||
-        (f.libc."0.2.51".rustc-dep-of-std or false) ||
-        (libc."0.2.51"."rustc-dep-of-std" or false); }
-      { "0.2.51"."rustc-std-workspace-core" =
-        (f.libc."0.2.51"."rustc-std-workspace-core" or false) ||
-        (f.libc."0.2.51".rustc-dep-of-std or false) ||
-        (libc."0.2.51"."rustc-dep-of-std" or false); }
-      { "0.2.51"."use_std" =
-        (f.libc."0.2.51"."use_std" or false) ||
-        (f.libc."0.2.51".default or false) ||
-        (libc."0.2.51"."default" or false); }
-      { "0.2.51".default = (f.libc."0.2.51".default or true); }
-    ];
-  }) [];
-
-
-# end
-# libgit2-sys-0.7.11
-
-  crates.libgit2_sys."0.7.11" = deps: { features?(features_.libgit2_sys."0.7.11" deps {}) }: buildRustCrate {
-    crateName = "libgit2-sys";
-    version = "0.7.11";
-    description = "Native bindings to the libgit2 library";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "12wyfl7xl7lpz65s17j5rf9xfkn461792f67jqsz0ign3daaac9h";
-    libPath = "lib.rs";
-    libName = "libgit2_sys";
-    build = "build.rs";
-    dependencies = mapFeatures features ([
-      (crates."libc"."${deps."libgit2_sys"."0.7.11"."libc"}" deps)
-      (crates."libz_sys"."${deps."libgit2_sys"."0.7.11"."libz_sys"}" deps)
-    ]
-      ++ (if features.libgit2_sys."0.7.11".curl-sys or false then [ (crates.curl_sys."${deps."libgit2_sys"."0.7.11".curl_sys}" deps) ] else [])
-      ++ (if features.libgit2_sys."0.7.11".libssh2-sys or false then [ (crates.libssh2_sys."${deps."libgit2_sys"."0.7.11".libssh2_sys}" deps) ] else []))
-      ++ (if (kernel == "linux" || kernel == "darwin") then mapFeatures features ([
-    ]
-      ++ (if features.libgit2_sys."0.7.11".openssl-sys or false then [ (crates.openssl_sys."${deps."libgit2_sys"."0.7.11".openssl_sys}" deps) ] else [])) else []);
-
-    buildDependencies = mapFeatures features ([
-      (crates."cc"."${deps."libgit2_sys"."0.7.11"."cc"}" deps)
-      (crates."pkg_config"."${deps."libgit2_sys"."0.7.11"."pkg_config"}" deps)
-    ]);
-    features = mkFeatures (features."libgit2_sys"."0.7.11" or {});
-  };
-  features_.libgit2_sys."0.7.11" = deps: f: updateFeatures f (rec {
-    cc."${deps.libgit2_sys."0.7.11".cc}".default = true;
-    curl_sys."${deps.libgit2_sys."0.7.11".curl_sys}".default = true;
-    libc."${deps.libgit2_sys."0.7.11".libc}".default = true;
-    libgit2_sys = fold recursiveUpdate {} [
-      { "0.7.11"."curl-sys" =
-        (f.libgit2_sys."0.7.11"."curl-sys" or false) ||
-        (f.libgit2_sys."0.7.11".curl or false) ||
-        (libgit2_sys."0.7.11"."curl" or false); }
-      { "0.7.11"."libssh2-sys" =
-        (f.libgit2_sys."0.7.11"."libssh2-sys" or false) ||
-        (f.libgit2_sys."0.7.11".ssh or false) ||
-        (libgit2_sys."0.7.11"."ssh" or false); }
-      { "0.7.11"."openssl-sys" =
-        (f.libgit2_sys."0.7.11"."openssl-sys" or false) ||
-        (f.libgit2_sys."0.7.11".https or false) ||
-        (libgit2_sys."0.7.11"."https" or false); }
-      { "0.7.11".default = (f.libgit2_sys."0.7.11".default or true); }
-    ];
-    libssh2_sys."${deps.libgit2_sys."0.7.11".libssh2_sys}".default = true;
-    libz_sys."${deps.libgit2_sys."0.7.11".libz_sys}".default = true;
-    openssl_sys."${deps.libgit2_sys."0.7.11".openssl_sys}".default = true;
-    pkg_config."${deps.libgit2_sys."0.7.11".pkg_config}".default = true;
-  }) [
-    (features_.curl_sys."${deps."libgit2_sys"."0.7.11"."curl_sys"}" deps)
-    (features_.libc."${deps."libgit2_sys"."0.7.11"."libc"}" deps)
-    (features_.libssh2_sys."${deps."libgit2_sys"."0.7.11"."libssh2_sys"}" deps)
-    (features_.libz_sys."${deps."libgit2_sys"."0.7.11"."libz_sys"}" deps)
-    (features_.cc."${deps."libgit2_sys"."0.7.11"."cc"}" deps)
-    (features_.pkg_config."${deps."libgit2_sys"."0.7.11"."pkg_config"}" deps)
-    (features_.openssl_sys."${deps."libgit2_sys"."0.7.11"."openssl_sys"}" deps)
-  ];
-
-
-# end
-# libnghttp2-sys-0.1.1
-
-  crates.libnghttp2_sys."0.1.1" = deps: { features?(features_.libnghttp2_sys."0.1.1" deps {}) }: buildRustCrate {
-    crateName = "libnghttp2-sys";
-    version = "0.1.1";
-    description = "FFI bindings for libnghttp2 (nghttp2)\n";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "08z41i7d8pm0jzv6p77kp22hh0a4psdy109n6nxr8x2k1ibjxk8w";
-    dependencies = mapFeatures features ([
-      (crates."libc"."${deps."libnghttp2_sys"."0.1.1"."libc"}" deps)
-    ]);
-
-    buildDependencies = mapFeatures features ([
-      (crates."cc"."${deps."libnghttp2_sys"."0.1.1"."cc"}" deps)
-    ]);
-  };
-  features_.libnghttp2_sys."0.1.1" = deps: f: updateFeatures f ({
-    cc."${deps.libnghttp2_sys."0.1.1".cc}".default = true;
-    libc."${deps.libnghttp2_sys."0.1.1".libc}".default = true;
-    libnghttp2_sys."0.1.1".default = (f.libnghttp2_sys."0.1.1".default or true);
-  }) [
-    (features_.libc."${deps."libnghttp2_sys"."0.1.1"."libc"}" deps)
-    (features_.cc."${deps."libnghttp2_sys"."0.1.1"."cc"}" deps)
-  ];
-
-
-# end
-# libssh2-sys-0.2.11
-
-  crates.libssh2_sys."0.2.11" = deps: { features?(features_.libssh2_sys."0.2.11" deps {}) }: buildRustCrate {
-    crateName = "libssh2-sys";
-    version = "0.2.11";
-    description = "Native bindings to the libssh2 library";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "1mjily9qjjjf31pzvlxyqnp1midjc77s6sd303j46d14igna7nhi";
-    libPath = "lib.rs";
-    libName = "libssh2_sys";
-    build = "build.rs";
-    dependencies = mapFeatures features ([
-      (crates."libc"."${deps."libssh2_sys"."0.2.11"."libc"}" deps)
-      (crates."libz_sys"."${deps."libssh2_sys"."0.2.11"."libz_sys"}" deps)
-    ])
-      ++ (if abi == "msvc" then mapFeatures features ([
-]) else [])
-      ++ (if (kernel == "linux" || kernel == "darwin") then mapFeatures features ([
-      (crates."openssl_sys"."${deps."libssh2_sys"."0.2.11"."openssl_sys"}" deps)
-    ]) else []);
-
-    buildDependencies = mapFeatures features ([
-      (crates."cc"."${deps."libssh2_sys"."0.2.11"."cc"}" deps)
-      (crates."pkg_config"."${deps."libssh2_sys"."0.2.11"."pkg_config"}" deps)
-    ]);
-  };
-  features_.libssh2_sys."0.2.11" = deps: f: updateFeatures f ({
-    cc."${deps.libssh2_sys."0.2.11".cc}".default = true;
-    libc."${deps.libssh2_sys."0.2.11".libc}".default = true;
-    libssh2_sys."0.2.11".default = (f.libssh2_sys."0.2.11".default or true);
-    libz_sys."${deps.libssh2_sys."0.2.11".libz_sys}".default = true;
-    openssl_sys."${deps.libssh2_sys."0.2.11".openssl_sys}".default = true;
-    pkg_config."${deps.libssh2_sys."0.2.11".pkg_config}".default = true;
-  }) [
-    (features_.libc."${deps."libssh2_sys"."0.2.11"."libc"}" deps)
-    (features_.libz_sys."${deps."libssh2_sys"."0.2.11"."libz_sys"}" deps)
-    (features_.cc."${deps."libssh2_sys"."0.2.11"."cc"}" deps)
-    (features_.pkg_config."${deps."libssh2_sys"."0.2.11"."pkg_config"}" deps)
-    (features_.openssl_sys."${deps."libssh2_sys"."0.2.11"."openssl_sys"}" deps)
-  ];
-
-
-# end
-# libz-sys-1.0.25
-
-  crates.libz_sys."1.0.25" = deps: { features?(features_.libz_sys."1.0.25" deps {}) }: buildRustCrate {
-    crateName = "libz-sys";
-    version = "1.0.25";
-    description = "Bindings to the system libz library (also known as zlib).\n";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "195jzg8mgjbvmkbpx1rzkzrqm0g2fdivk79v44c9lzl64r3f9fym";
-    build = "build.rs";
-    dependencies = mapFeatures features ([
-      (crates."libc"."${deps."libz_sys"."1.0.25"."libc"}" deps)
-    ])
-      ++ (if abi == "msvc" then mapFeatures features ([
-]) else []);
-
-    buildDependencies = mapFeatures features ([
-      (crates."cc"."${deps."libz_sys"."1.0.25"."cc"}" deps)
-      (crates."pkg_config"."${deps."libz_sys"."1.0.25"."pkg_config"}" deps)
-    ]);
-    features = mkFeatures (features."libz_sys"."1.0.25" or {});
-  };
-  features_.libz_sys."1.0.25" = deps: f: updateFeatures f ({
-    cc."${deps.libz_sys."1.0.25".cc}".default = true;
-    libc."${deps.libz_sys."1.0.25".libc}".default = true;
-    libz_sys."1.0.25".default = (f.libz_sys."1.0.25".default or true);
-    pkg_config."${deps.libz_sys."1.0.25".pkg_config}".default = true;
-  }) [
-    (features_.libc."${deps."libz_sys"."1.0.25"."libc"}" deps)
-    (features_.cc."${deps."libz_sys"."1.0.25"."cc"}" deps)
-    (features_.pkg_config."${deps."libz_sys"."1.0.25"."pkg_config"}" deps)
-  ];
-
-
-# end
-# lock_api-0.1.5
-
-  crates.lock_api."0.1.5" = deps: { features?(features_.lock_api."0.1.5" deps {}) }: buildRustCrate {
-    crateName = "lock_api";
-    version = "0.1.5";
-    description = "Wrappers to create fully-featured Mutex and RwLock types. Compatible with no_std.";
-    authors = [ "Amanieu d'Antras <amanieu@gmail.com>" ];
-    sha256 = "132sidr5hvjfkaqm3l95zpcpi8yk5ddd0g79zf1ad4v65sxirqqm";
-    dependencies = mapFeatures features ([
-      (crates."scopeguard"."${deps."lock_api"."0.1.5"."scopeguard"}" deps)
-    ]);
-    features = mkFeatures (features."lock_api"."0.1.5" or {});
-  };
-  features_.lock_api."0.1.5" = deps: f: updateFeatures f ({
-    lock_api."0.1.5".default = (f.lock_api."0.1.5".default or true);
-    scopeguard."${deps.lock_api."0.1.5".scopeguard}".default = (f.scopeguard."${deps.lock_api."0.1.5".scopeguard}".default or false);
-  }) [
-    (features_.scopeguard."${deps."lock_api"."0.1.5"."scopeguard"}" deps)
-  ];
-
-
-# end
-# matrixmultiply-0.1.15
-
-  crates.matrixmultiply."0.1.15" = deps: { features?(features_.matrixmultiply."0.1.15" deps {}) }: buildRustCrate {
-    crateName = "matrixmultiply";
-    version = "0.1.15";
-    description = "General matrix multiplication of f32 and f64 matrices in Rust. Supports matrices with general strides. Uses a microkernel strategy, so that the implementation is easy to parallelize and optimize. `RUSTFLAGS=\"-C target-cpu=native\"` is your friend here.";
-    authors = [ "bluss" ];
-    sha256 = "0ix1i4lnkfqnzv8f9wr34bf0mlr1sx5hr7yr70k4npxmwxscvdj5";
-    build = "build.rs";
-    dependencies = mapFeatures features ([
-      (crates."rawpointer"."${deps."matrixmultiply"."0.1.15"."rawpointer"}" deps)
-    ]);
-  };
-  features_.matrixmultiply."0.1.15" = deps: f: updateFeatures f ({
-    matrixmultiply."0.1.15".default = (f.matrixmultiply."0.1.15".default or true);
-    rawpointer."${deps.matrixmultiply."0.1.15".rawpointer}".default = true;
-  }) [
-    (features_.rawpointer."${deps."matrixmultiply"."0.1.15"."rawpointer"}" deps)
-  ];
-
-
-# end
-# miniz-sys-0.1.11
-
-  crates.miniz_sys."0.1.11" = deps: { features?(features_.miniz_sys."0.1.11" deps {}) }: buildRustCrate {
-    crateName = "miniz-sys";
-    version = "0.1.11";
-    description = "Bindings to the miniz.c library.\n";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "0l2wsakqjj7kc06dwxlpz4h8wih0f9d1idrz5gb1svipvh81khsm";
-    libPath = "lib.rs";
-    libName = "miniz_sys";
-    build = "build.rs";
-    dependencies = mapFeatures features ([
-      (crates."libc"."${deps."miniz_sys"."0.1.11"."libc"}" deps)
-    ]);
-
-    buildDependencies = mapFeatures features ([
-      (crates."cc"."${deps."miniz_sys"."0.1.11"."cc"}" deps)
-    ]);
-  };
-  features_.miniz_sys."0.1.11" = deps: f: updateFeatures f ({
-    cc."${deps.miniz_sys."0.1.11".cc}".default = true;
-    libc."${deps.miniz_sys."0.1.11".libc}".default = true;
-    miniz_sys."0.1.11".default = (f.miniz_sys."0.1.11".default or true);
-  }) [
-    (features_.libc."${deps."miniz_sys"."0.1.11"."libc"}" deps)
-    (features_.cc."${deps."miniz_sys"."0.1.11"."cc"}" deps)
-  ];
-
-
-# end
-# miniz_oxide-0.2.1
-
-  crates.miniz_oxide."0.2.1" = deps: { features?(features_.miniz_oxide."0.2.1" deps {}) }: buildRustCrate {
-    crateName = "miniz_oxide";
-    version = "0.2.1";
-    description = "DEFLATE compression and decompression library rewritten in Rust based on miniz";
-    authors = [ "Frommi <daniil.liferenko@gmail.com>" ];
-    sha256 = "1ly14vlk0gq7czi1323l2dsy5y8dpvdwld4h9083i0y3hx9iyfdz";
-    dependencies = mapFeatures features ([
-      (crates."adler32"."${deps."miniz_oxide"."0.2.1"."adler32"}" deps)
-    ]);
-  };
-  features_.miniz_oxide."0.2.1" = deps: f: updateFeatures f ({
-    adler32."${deps.miniz_oxide."0.2.1".adler32}".default = true;
-    miniz_oxide."0.2.1".default = (f.miniz_oxide."0.2.1".default or true);
-  }) [
-    (features_.adler32."${deps."miniz_oxide"."0.2.1"."adler32"}" deps)
-  ];
-
-
-# end
-# miniz_oxide_c_api-0.2.1
-
-  crates.miniz_oxide_c_api."0.2.1" = deps: { features?(features_.miniz_oxide_c_api."0.2.1" deps {}) }: buildRustCrate {
-    crateName = "miniz_oxide_c_api";
-    version = "0.2.1";
-    description = "DEFLATE compression and decompression API designed to be Rust drop-in replacement for miniz";
-    authors = [ "Frommi <daniil.liferenko@gmail.com>" ];
-    sha256 = "1zsk334nhy2rvyhbr0815l0gp6w40al6rxxafkycaafx3m9j8cj2";
-    build = "src/build.rs";
-    dependencies = mapFeatures features ([
-      (crates."crc"."${deps."miniz_oxide_c_api"."0.2.1"."crc"}" deps)
-      (crates."libc"."${deps."miniz_oxide_c_api"."0.2.1"."libc"}" deps)
-      (crates."miniz_oxide"."${deps."miniz_oxide_c_api"."0.2.1"."miniz_oxide"}" deps)
-    ]);
-
-    buildDependencies = mapFeatures features ([
-      (crates."cc"."${deps."miniz_oxide_c_api"."0.2.1"."cc"}" deps)
-    ]);
-    features = mkFeatures (features."miniz_oxide_c_api"."0.2.1" or {});
-  };
-  features_.miniz_oxide_c_api."0.2.1" = deps: f: updateFeatures f (rec {
-    cc."${deps.miniz_oxide_c_api."0.2.1".cc}".default = true;
-    crc."${deps.miniz_oxide_c_api."0.2.1".crc}".default = true;
-    libc."${deps.miniz_oxide_c_api."0.2.1".libc}".default = true;
-    miniz_oxide."${deps.miniz_oxide_c_api."0.2.1".miniz_oxide}".default = true;
-    miniz_oxide_c_api = fold recursiveUpdate {} [
-      { "0.2.1"."build_orig_miniz" =
-        (f.miniz_oxide_c_api."0.2.1"."build_orig_miniz" or false) ||
-        (f.miniz_oxide_c_api."0.2.1".benching or false) ||
-        (miniz_oxide_c_api."0.2.1"."benching" or false) ||
-        (f.miniz_oxide_c_api."0.2.1".fuzzing or false) ||
-        (miniz_oxide_c_api."0.2.1"."fuzzing" or false); }
-      { "0.2.1"."build_stub_miniz" =
-        (f.miniz_oxide_c_api."0.2.1"."build_stub_miniz" or false) ||
-        (f.miniz_oxide_c_api."0.2.1".miniz_zip or false) ||
-        (miniz_oxide_c_api."0.2.1"."miniz_zip" or false); }
-      { "0.2.1"."no_c_export" =
-        (f.miniz_oxide_c_api."0.2.1"."no_c_export" or false) ||
-        (f.miniz_oxide_c_api."0.2.1".benching or false) ||
-        (miniz_oxide_c_api."0.2.1"."benching" or false) ||
-        (f.miniz_oxide_c_api."0.2.1".fuzzing or false) ||
-        (miniz_oxide_c_api."0.2.1"."fuzzing" or false); }
-      { "0.2.1".default = (f.miniz_oxide_c_api."0.2.1".default or true); }
-    ];
-  }) [
-    (features_.crc."${deps."miniz_oxide_c_api"."0.2.1"."crc"}" deps)
-    (features_.libc."${deps."miniz_oxide_c_api"."0.2.1"."libc"}" deps)
-    (features_.miniz_oxide."${deps."miniz_oxide_c_api"."0.2.1"."miniz_oxide"}" deps)
-    (features_.cc."${deps."miniz_oxide_c_api"."0.2.1"."cc"}" deps)
-  ];
-
-
-# end
-# miow-0.3.3
-
-  crates.miow."0.3.3" = deps: { features?(features_.miow."0.3.3" deps {}) }: buildRustCrate {
-    crateName = "miow";
-    version = "0.3.3";
-    description = "A zero overhead I/O library for Windows, focusing on IOCP and Async I/O\nabstractions.\n";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "1mlk5mn00cl6bmf8qlpc6r85dxf4l45vbkbzshsr1mrkb3hn1j57";
-    dependencies = mapFeatures features ([
-      (crates."socket2"."${deps."miow"."0.3.3"."socket2"}" deps)
-      (crates."winapi"."${deps."miow"."0.3.3"."winapi"}" deps)
-    ]);
-  };
-  features_.miow."0.3.3" = deps: f: updateFeatures f ({
-    miow."0.3.3".default = (f.miow."0.3.3".default or true);
-    socket2."${deps.miow."0.3.3".socket2}".default = true;
-    winapi = fold recursiveUpdate {} [
-      { "${deps.miow."0.3.3".winapi}"."fileapi" = true; }
-      { "${deps.miow."0.3.3".winapi}"."handleapi" = true; }
-      { "${deps.miow."0.3.3".winapi}"."ioapiset" = true; }
-      { "${deps.miow."0.3.3".winapi}"."minwindef" = true; }
-      { "${deps.miow."0.3.3".winapi}"."namedpipeapi" = true; }
-      { "${deps.miow."0.3.3".winapi}"."ntdef" = true; }
-      { "${deps.miow."0.3.3".winapi}"."std" = true; }
-      { "${deps.miow."0.3.3".winapi}"."synchapi" = true; }
-      { "${deps.miow."0.3.3".winapi}"."winerror" = true; }
-      { "${deps.miow."0.3.3".winapi}"."winsock2" = true; }
-      { "${deps.miow."0.3.3".winapi}"."ws2def" = true; }
-      { "${deps.miow."0.3.3".winapi}"."ws2ipdef" = true; }
-      { "${deps.miow."0.3.3".winapi}".default = true; }
-    ];
-  }) [
-    (features_.socket2."${deps."miow"."0.3.3"."socket2"}" deps)
-    (features_.winapi."${deps."miow"."0.3.3"."winapi"}" deps)
-  ];
-
-
-# end
-# ndarray-0.12.1
-
-  crates.ndarray."0.12.1" = deps: { features?(features_.ndarray."0.12.1" deps {}) }: buildRustCrate {
-    crateName = "ndarray";
-    version = "0.12.1";
-    description = "An n-dimensional array for general elements and for numerics. Lightweight array views and slicing; views support chunking and splitting.";
-    authors = [ "bluss" "Jim Turner" ];
-    sha256 = "13708k97kdjfj6g4z1yapjln0v4m7zj0114h8snw44fj79l00346";
-    build = "build.rs";
-    dependencies = mapFeatures features ([
-      (crates."itertools"."${deps."ndarray"."0.12.1"."itertools"}" deps)
-      (crates."matrixmultiply"."${deps."ndarray"."0.12.1"."matrixmultiply"}" deps)
-      (crates."num_complex"."${deps."ndarray"."0.12.1"."num_complex"}" deps)
-      (crates."num_traits"."${deps."ndarray"."0.12.1"."num_traits"}" deps)
-    ]);
-    features = mkFeatures (features."ndarray"."0.12.1" or {});
-  };
-  features_.ndarray."0.12.1" = deps: f: updateFeatures f (rec {
-    itertools."${deps.ndarray."0.12.1".itertools}".default = (f.itertools."${deps.ndarray."0.12.1".itertools}".default or false);
-    matrixmultiply."${deps.ndarray."0.12.1".matrixmultiply}".default = true;
-    ndarray = fold recursiveUpdate {} [
-      { "0.12.1"."blas" =
-        (f.ndarray."0.12.1"."blas" or false) ||
-        (f.ndarray."0.12.1".test-blas-openblas-sys or false) ||
-        (ndarray."0.12.1"."test-blas-openblas-sys" or false); }
-      { "0.12.1"."blas-src" =
-        (f.ndarray."0.12.1"."blas-src" or false) ||
-        (f.ndarray."0.12.1".blas or false) ||
-        (ndarray."0.12.1"."blas" or false); }
-      { "0.12.1"."cblas-sys" =
-        (f.ndarray."0.12.1"."cblas-sys" or false) ||
-        (f.ndarray."0.12.1".blas or false) ||
-        (ndarray."0.12.1"."blas" or false); }
-      { "0.12.1"."rustc-serialize" =
-        (f.ndarray."0.12.1"."rustc-serialize" or false) ||
-        (f.ndarray."0.12.1".docs or false) ||
-        (ndarray."0.12.1"."docs" or false); }
-      { "0.12.1"."serde" =
-        (f.ndarray."0.12.1"."serde" or false) ||
-        (f.ndarray."0.12.1".serde-1 or false) ||
-        (ndarray."0.12.1"."serde-1" or false); }
-      { "0.12.1"."serde-1" =
-        (f.ndarray."0.12.1"."serde-1" or false) ||
-        (f.ndarray."0.12.1".docs or false) ||
-        (ndarray."0.12.1"."docs" or false); }
-      { "0.12.1"."test-blas-openblas-sys" =
-        (f.ndarray."0.12.1"."test-blas-openblas-sys" or false) ||
-        (f.ndarray."0.12.1".test or false) ||
-        (ndarray."0.12.1"."test" or false); }
-      { "0.12.1".default = (f.ndarray."0.12.1".default or true); }
-    ];
-    num_complex."${deps.ndarray."0.12.1".num_complex}".default = true;
-    num_traits."${deps.ndarray."0.12.1".num_traits}".default = true;
-  }) [
-    (features_.itertools."${deps."ndarray"."0.12.1"."itertools"}" deps)
-    (features_.matrixmultiply."${deps."ndarray"."0.12.1"."matrixmultiply"}" deps)
-    (features_.num_complex."${deps."ndarray"."0.12.1"."num_complex"}" deps)
-    (features_.num_traits."${deps."ndarray"."0.12.1"."num_traits"}" deps)
-  ];
-
-
-# end
-# num-complex-0.2.1
-
-  crates.num_complex."0.2.1" = deps: { features?(features_.num_complex."0.2.1" deps {}) }: buildRustCrate {
-    crateName = "num-complex";
-    version = "0.2.1";
-    description = "Complex numbers implementation for Rust";
-    authors = [ "The Rust Project Developers" ];
-    sha256 = "12lpp62ahc80p33cpw2771l8bwl0q13rl5vq0jzkqib1l5z8q80z";
-    build = "build.rs";
-    dependencies = mapFeatures features ([
-      (crates."num_traits"."${deps."num_complex"."0.2.1"."num_traits"}" deps)
-    ]);
-    features = mkFeatures (features."num_complex"."0.2.1" or {});
-  };
-  features_.num_complex."0.2.1" = deps: f: updateFeatures f (rec {
-    num_complex = fold recursiveUpdate {} [
-      { "0.2.1"."std" =
-        (f.num_complex."0.2.1"."std" or false) ||
-        (f.num_complex."0.2.1".default or false) ||
-        (num_complex."0.2.1"."default" or false); }
-      { "0.2.1".default = (f.num_complex."0.2.1".default or true); }
-    ];
-    num_traits = fold recursiveUpdate {} [
-      { "${deps.num_complex."0.2.1".num_traits}"."i128" =
-        (f.num_traits."${deps.num_complex."0.2.1".num_traits}"."i128" or false) ||
-        (num_complex."0.2.1"."i128" or false) ||
-        (f."num_complex"."0.2.1"."i128" or false); }
-      { "${deps.num_complex."0.2.1".num_traits}"."std" =
-        (f.num_traits."${deps.num_complex."0.2.1".num_traits}"."std" or false) ||
-        (num_complex."0.2.1"."std" or false) ||
-        (f."num_complex"."0.2.1"."std" or false); }
-      { "${deps.num_complex."0.2.1".num_traits}".default = (f.num_traits."${deps.num_complex."0.2.1".num_traits}".default or false); }
-    ];
-  }) [
-    (features_.num_traits."${deps."num_complex"."0.2.1"."num_traits"}" deps)
-  ];
-
-
-# end
-# num-traits-0.2.6
-
-  crates.num_traits."0.2.6" = deps: { features?(features_.num_traits."0.2.6" deps {}) }: buildRustCrate {
-    crateName = "num-traits";
-    version = "0.2.6";
-    description = "Numeric traits for generic mathematics";
-    authors = [ "The Rust Project Developers" ];
-    sha256 = "1d20sil9n0wgznd1nycm3yjfj1mzyl41ambb7by1apxlyiil1azk";
-    build = "build.rs";
-    features = mkFeatures (features."num_traits"."0.2.6" or {});
-  };
-  features_.num_traits."0.2.6" = deps: f: updateFeatures f (rec {
-    num_traits = fold recursiveUpdate {} [
-      { "0.2.6"."std" =
-        (f.num_traits."0.2.6"."std" or false) ||
-        (f.num_traits."0.2.6".default or false) ||
-        (num_traits."0.2.6"."default" or false); }
-      { "0.2.6".default = (f.num_traits."0.2.6".default or true); }
-    ];
-  }) [];
-
-
-# end
-# num_cpus-1.10.0
-
-  crates.num_cpus."1.10.0" = deps: { features?(features_.num_cpus."1.10.0" deps {}) }: buildRustCrate {
-    crateName = "num_cpus";
-    version = "1.10.0";
-    description = "Get the number of CPUs on a machine.";
-    authors = [ "Sean McArthur <sean@seanmonstar.com>" ];
-    sha256 = "1411jyxy1wd8d59mv7cf6ynkvvar92czmwhb9l2c1brdkxbbiqn7";
-    dependencies = mapFeatures features ([
-      (crates."libc"."${deps."num_cpus"."1.10.0"."libc"}" deps)
-    ]);
-  };
-  features_.num_cpus."1.10.0" = deps: f: updateFeatures f ({
-    libc."${deps.num_cpus."1.10.0".libc}".default = true;
-    num_cpus."1.10.0".default = (f.num_cpus."1.10.0".default or true);
-  }) [
-    (features_.libc."${deps."num_cpus"."1.10.0"."libc"}" deps)
-  ];
-
-
-# end
-# once_cell-0.1.8
-
-  crates.once_cell."0.1.8" = deps: { features?(features_.once_cell."0.1.8" deps {}) }: buildRustCrate {
-    crateName = "once_cell";
-    version = "0.1.8";
-    description = "Single assignment cells and lazy static values without macros.";
-    authors = [ "Aleksey Kladov <aleksey.kladov@gmail.com>" ];
-    sha256 = "1n1da1x3cf3qbq9a925pimy6i0r12gcicwqjxc63nfb2bnzkg074";
-    dependencies = mapFeatures features ([
-    ]
-      ++ (if features.once_cell."0.1.8".parking_lot or false then [ (crates.parking_lot."${deps."once_cell"."0.1.8".parking_lot}" deps) ] else []));
-    features = mkFeatures (features."once_cell"."0.1.8" or {});
-  };
-  features_.once_cell."0.1.8" = deps: f: updateFeatures f (rec {
-    once_cell = fold recursiveUpdate {} [
-      { "0.1.8"."parking_lot" =
-        (f.once_cell."0.1.8"."parking_lot" or false) ||
-        (f.once_cell."0.1.8".default or false) ||
-        (once_cell."0.1.8"."default" or false); }
-      { "0.1.8".default = (f.once_cell."0.1.8".default or true); }
-    ];
-    parking_lot."${deps.once_cell."0.1.8".parking_lot}".default = true;
-  }) [
-    (features_.parking_lot."${deps."once_cell"."0.1.8"."parking_lot"}" deps)
-  ];
-
-
-# end
-# opener-0.3.2
-
-  crates.opener."0.3.2" = deps: { features?(features_.opener."0.3.2" deps {}) }: buildRustCrate {
-    crateName = "opener";
-    version = "0.3.2";
-    description = "Open a file or link using the system default program.";
-    authors = [ "Brian Bowman <seeker14491@gmail.com>" ];
-    sha256 = "1ql2snax07n3xxn4nz9r6d95rhrri66qy5s5zl9jfsdbs193hzcm";
-    dependencies = mapFeatures features ([
-      (crates."failure"."${deps."opener"."0.3.2"."failure"}" deps)
-      (crates."failure_derive"."${deps."opener"."0.3.2"."failure_derive"}" deps)
-    ])
-      ++ (if kernel == "windows" then mapFeatures features ([
-      (crates."winapi"."${deps."opener"."0.3.2"."winapi"}" deps)
-    ]) else []);
-  };
-  features_.opener."0.3.2" = deps: f: updateFeatures f ({
-    failure."${deps.opener."0.3.2".failure}".default = true;
-    failure_derive."${deps.opener."0.3.2".failure_derive}".default = true;
-    opener."0.3.2".default = (f.opener."0.3.2".default or true);
-    winapi = fold recursiveUpdate {} [
-      { "${deps.opener."0.3.2".winapi}"."shellapi" = true; }
-      { "${deps.opener."0.3.2".winapi}".default = true; }
-    ];
-  }) [
-    (features_.failure."${deps."opener"."0.3.2"."failure"}" deps)
-    (features_.failure_derive."${deps."opener"."0.3.2"."failure_derive"}" deps)
-    (features_.winapi."${deps."opener"."0.3.2"."winapi"}" deps)
-  ];
-
-
-# end
-# openssl-0.10.20
-
-  crates.openssl."0.10.20" = deps: { features?(features_.openssl."0.10.20" deps {}) }: buildRustCrate {
-    crateName = "openssl";
-    version = "0.10.20";
-    description = "OpenSSL bindings";
-    authors = [ "Steven Fackler <sfackler@gmail.com>" ];
-    sha256 = "1y3zkq988vx48a4j0i23mr7vm1wy5w71yws2v6hyf4vb5iw3r5s5";
-    dependencies = mapFeatures features ([
-      (crates."bitflags"."${deps."openssl"."0.10.20"."bitflags"}" deps)
-      (crates."cfg_if"."${deps."openssl"."0.10.20"."cfg_if"}" deps)
-      (crates."foreign_types"."${deps."openssl"."0.10.20"."foreign_types"}" deps)
-      (crates."lazy_static"."${deps."openssl"."0.10.20"."lazy_static"}" deps)
-      (crates."libc"."${deps."openssl"."0.10.20"."libc"}" deps)
-      (crates."openssl_sys"."${deps."openssl"."0.10.20"."openssl_sys"}" deps)
-    ]);
-    features = mkFeatures (features."openssl"."0.10.20" or {});
-  };
-  features_.openssl."0.10.20" = deps: f: updateFeatures f (rec {
-    bitflags."${deps.openssl."0.10.20".bitflags}".default = true;
-    cfg_if."${deps.openssl."0.10.20".cfg_if}".default = true;
-    foreign_types."${deps.openssl."0.10.20".foreign_types}".default = true;
-    lazy_static."${deps.openssl."0.10.20".lazy_static}".default = true;
-    libc."${deps.openssl."0.10.20".libc}".default = true;
-    openssl."0.10.20".default = (f.openssl."0.10.20".default or true);
-    openssl_sys = fold recursiveUpdate {} [
-      { "${deps.openssl."0.10.20".openssl_sys}"."vendored" =
-        (f.openssl_sys."${deps.openssl."0.10.20".openssl_sys}"."vendored" or false) ||
-        (openssl."0.10.20"."vendored" or false) ||
-        (f."openssl"."0.10.20"."vendored" or false); }
-      { "${deps.openssl."0.10.20".openssl_sys}".default = true; }
-    ];
-  }) [
-    (features_.bitflags."${deps."openssl"."0.10.20"."bitflags"}" deps)
-    (features_.cfg_if."${deps."openssl"."0.10.20"."cfg_if"}" deps)
-    (features_.foreign_types."${deps."openssl"."0.10.20"."foreign_types"}" deps)
-    (features_.lazy_static."${deps."openssl"."0.10.20"."lazy_static"}" deps)
-    (features_.libc."${deps."openssl"."0.10.20"."libc"}" deps)
-    (features_.openssl_sys."${deps."openssl"."0.10.20"."openssl_sys"}" deps)
-  ];
-
-
-# end
-# openssl-probe-0.1.2
-
-  crates.openssl_probe."0.1.2" = deps: { features?(features_.openssl_probe."0.1.2" deps {}) }: buildRustCrate {
-    crateName = "openssl-probe";
-    version = "0.1.2";
-    description = "Tool for helping to find SSL certificate locations on the system for OpenSSL\n";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "1a89fznx26vvaxyrxdvgf6iwai5xvs6xjvpjin68fgvrslv6n15a";
-  };
-  features_.openssl_probe."0.1.2" = deps: f: updateFeatures f ({
-    openssl_probe."0.1.2".default = (f.openssl_probe."0.1.2".default or true);
-  }) [];
-
-
-# end
-# openssl-src-111.2.1+1.1.1b
-
-  crates.openssl_src."111.2.1+1.1.1b" = deps: { features?(features_.openssl_src."111.2.1+1.1.1b" deps {}) }: buildRustCrate {
-    crateName = "openssl-src";
-    version = "111.2.1+1.1.1b";
-    description = "Source of OpenSSL and logic to build it.\n";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "0gfa29r16ds88a3sjcgkc2q5dkhgnxk58gly313r05xqj4zi2pxc";
-    dependencies = mapFeatures features ([
-      (crates."cc"."${deps."openssl_src"."111.2.1+1.1.1b"."cc"}" deps)
-    ]);
-  };
-  features_.openssl_src."111.2.1+1.1.1b" = deps: f: updateFeatures f ({
-    cc."${deps.openssl_src."111.2.1+1.1.1b".cc}".default = true;
-    openssl_src."111.2.1+1.1.1b".default = (f.openssl_src."111.2.1+1.1.1b".default or true);
-  }) [
-    (features_.cc."${deps."openssl_src"."111.2.1+1.1.1b"."cc"}" deps)
-  ];
-
-
-# end
-# openssl-sys-0.9.43
-
-  crates.openssl_sys."0.9.43" = deps: { features?(features_.openssl_sys."0.9.43" deps {}) }: buildRustCrate {
-    crateName = "openssl-sys";
-    version = "0.9.43";
-    description = "FFI bindings to OpenSSL";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" "Steven Fackler <sfackler@gmail.com>" ];
-    sha256 = "1ip0f94jakr85pxjhrkg9w9lgiiy1yga3ckm6c8xb13klsr7ky9y";
-    build = "build/main.rs";
-    dependencies = mapFeatures features ([
-      (crates."libc"."${deps."openssl_sys"."0.9.43"."libc"}" deps)
-    ])
-      ++ (if abi == "msvc" then mapFeatures features ([
-]) else []);
-
-    buildDependencies = mapFeatures features ([
-      (crates."cc"."${deps."openssl_sys"."0.9.43"."cc"}" deps)
-      (crates."pkg_config"."${deps."openssl_sys"."0.9.43"."pkg_config"}" deps)
-      (crates."rustc_version"."${deps."openssl_sys"."0.9.43"."rustc_version"}" deps)
-    ]
-      ++ (if features.openssl_sys."0.9.43".openssl-src or false then [ (crates.openssl_src."${deps."openssl_sys"."0.9.43".openssl_src}" deps) ] else []));
-    features = mkFeatures (features."openssl_sys"."0.9.43" or {});
-  };
-  features_.openssl_sys."0.9.43" = deps: f: updateFeatures f (rec {
-    cc."${deps.openssl_sys."0.9.43".cc}".default = true;
-    libc."${deps.openssl_sys."0.9.43".libc}".default = true;
-    openssl_src."${deps.openssl_sys."0.9.43".openssl_src}".default = true;
-    openssl_sys = fold recursiveUpdate {} [
-      { "0.9.43"."openssl-src" =
-        (f.openssl_sys."0.9.43"."openssl-src" or false) ||
-        (f.openssl_sys."0.9.43".vendored or false) ||
-        (openssl_sys."0.9.43"."vendored" or false); }
-      { "0.9.43".default = (f.openssl_sys."0.9.43".default or true); }
-    ];
-    pkg_config."${deps.openssl_sys."0.9.43".pkg_config}".default = true;
-    rustc_version."${deps.openssl_sys."0.9.43".rustc_version}".default = true;
-  }) [
-    (features_.libc."${deps."openssl_sys"."0.9.43"."libc"}" deps)
-    (features_.cc."${deps."openssl_sys"."0.9.43"."cc"}" deps)
-    (features_.openssl_src."${deps."openssl_sys"."0.9.43"."openssl_src"}" deps)
-    (features_.pkg_config."${deps."openssl_sys"."0.9.43"."pkg_config"}" deps)
-    (features_.rustc_version."${deps."openssl_sys"."0.9.43"."rustc_version"}" deps)
-  ];
-
-
-# end
-# parking_lot-0.7.1
-
-  crates.parking_lot."0.7.1" = deps: { features?(features_.parking_lot."0.7.1" deps {}) }: buildRustCrate {
-    crateName = "parking_lot";
-    version = "0.7.1";
-    description = "More compact and efficient implementations of the standard synchronization primitives.";
-    authors = [ "Amanieu d'Antras <amanieu@gmail.com>" ];
-    sha256 = "1qpb49xd176hqqabxdb48f1hvylfbf68rpz8yfrhw0x68ys0lkq1";
-    dependencies = mapFeatures features ([
-      (crates."lock_api"."${deps."parking_lot"."0.7.1"."lock_api"}" deps)
-      (crates."parking_lot_core"."${deps."parking_lot"."0.7.1"."parking_lot_core"}" deps)
-    ]);
-    features = mkFeatures (features."parking_lot"."0.7.1" or {});
-  };
-  features_.parking_lot."0.7.1" = deps: f: updateFeatures f (rec {
-    lock_api = fold recursiveUpdate {} [
-      { "${deps.parking_lot."0.7.1".lock_api}"."nightly" =
-        (f.lock_api."${deps.parking_lot."0.7.1".lock_api}"."nightly" or false) ||
-        (parking_lot."0.7.1"."nightly" or false) ||
-        (f."parking_lot"."0.7.1"."nightly" or false); }
-      { "${deps.parking_lot."0.7.1".lock_api}"."owning_ref" =
-        (f.lock_api."${deps.parking_lot."0.7.1".lock_api}"."owning_ref" or false) ||
-        (parking_lot."0.7.1"."owning_ref" or false) ||
-        (f."parking_lot"."0.7.1"."owning_ref" or false); }
-      { "${deps.parking_lot."0.7.1".lock_api}".default = true; }
-    ];
-    parking_lot = fold recursiveUpdate {} [
-      { "0.7.1"."owning_ref" =
-        (f.parking_lot."0.7.1"."owning_ref" or false) ||
-        (f.parking_lot."0.7.1".default or false) ||
-        (parking_lot."0.7.1"."default" or false); }
-      { "0.7.1".default = (f.parking_lot."0.7.1".default or true); }
-    ];
-    parking_lot_core = fold recursiveUpdate {} [
-      { "${deps.parking_lot."0.7.1".parking_lot_core}"."deadlock_detection" =
-        (f.parking_lot_core."${deps.parking_lot."0.7.1".parking_lot_core}"."deadlock_detection" or false) ||
-        (parking_lot."0.7.1"."deadlock_detection" or false) ||
-        (f."parking_lot"."0.7.1"."deadlock_detection" or false); }
-      { "${deps.parking_lot."0.7.1".parking_lot_core}"."nightly" =
-        (f.parking_lot_core."${deps.parking_lot."0.7.1".parking_lot_core}"."nightly" or false) ||
-        (parking_lot."0.7.1"."nightly" or false) ||
-        (f."parking_lot"."0.7.1"."nightly" or false); }
-      { "${deps.parking_lot."0.7.1".parking_lot_core}".default = true; }
-    ];
-  }) [
-    (features_.lock_api."${deps."parking_lot"."0.7.1"."lock_api"}" deps)
-    (features_.parking_lot_core."${deps."parking_lot"."0.7.1"."parking_lot_core"}" deps)
-  ];
-
-
-# end
-# parking_lot_core-0.4.0
-
-  crates.parking_lot_core."0.4.0" = deps: { features?(features_.parking_lot_core."0.4.0" deps {}) }: buildRustCrate {
-    crateName = "parking_lot_core";
-    version = "0.4.0";
-    description = "An advanced API for creating custom synchronization primitives.";
-    authors = [ "Amanieu d'Antras <amanieu@gmail.com>" ];
-    sha256 = "1mzk5i240ddvhwnz65hhjk4cq61z235g1n8bd7al4mg6vx437c16";
-    dependencies = mapFeatures features ([
-      (crates."rand"."${deps."parking_lot_core"."0.4.0"."rand"}" deps)
-      (crates."smallvec"."${deps."parking_lot_core"."0.4.0"."smallvec"}" deps)
-    ])
-      ++ (if (kernel == "linux" || kernel == "darwin") then mapFeatures features ([
-      (crates."libc"."${deps."parking_lot_core"."0.4.0"."libc"}" deps)
-    ]) else [])
-      ++ (if kernel == "windows" then mapFeatures features ([
-      (crates."winapi"."${deps."parking_lot_core"."0.4.0"."winapi"}" deps)
-    ]) else []);
-
-    buildDependencies = mapFeatures features ([
-      (crates."rustc_version"."${deps."parking_lot_core"."0.4.0"."rustc_version"}" deps)
-    ]);
-    features = mkFeatures (features."parking_lot_core"."0.4.0" or {});
-  };
-  features_.parking_lot_core."0.4.0" = deps: f: updateFeatures f (rec {
-    libc."${deps.parking_lot_core."0.4.0".libc}".default = true;
-    parking_lot_core = fold recursiveUpdate {} [
-      { "0.4.0"."backtrace" =
-        (f.parking_lot_core."0.4.0"."backtrace" or false) ||
-        (f.parking_lot_core."0.4.0".deadlock_detection or false) ||
-        (parking_lot_core."0.4.0"."deadlock_detection" or false); }
-      { "0.4.0"."petgraph" =
-        (f.parking_lot_core."0.4.0"."petgraph" or false) ||
-        (f.parking_lot_core."0.4.0".deadlock_detection or false) ||
-        (parking_lot_core."0.4.0"."deadlock_detection" or false); }
-      { "0.4.0"."thread-id" =
-        (f.parking_lot_core."0.4.0"."thread-id" or false) ||
-        (f.parking_lot_core."0.4.0".deadlock_detection or false) ||
-        (parking_lot_core."0.4.0"."deadlock_detection" or false); }
-      { "0.4.0".default = (f.parking_lot_core."0.4.0".default or true); }
-    ];
-    rand."${deps.parking_lot_core."0.4.0".rand}".default = true;
-    rustc_version."${deps.parking_lot_core."0.4.0".rustc_version}".default = true;
-    smallvec."${deps.parking_lot_core."0.4.0".smallvec}".default = true;
-    winapi = fold recursiveUpdate {} [
-      { "${deps.parking_lot_core."0.4.0".winapi}"."errhandlingapi" = true; }
-      { "${deps.parking_lot_core."0.4.0".winapi}"."handleapi" = true; }
-      { "${deps.parking_lot_core."0.4.0".winapi}"."minwindef" = true; }
-      { "${deps.parking_lot_core."0.4.0".winapi}"."ntstatus" = true; }
-      { "${deps.parking_lot_core."0.4.0".winapi}"."winbase" = true; }
-      { "${deps.parking_lot_core."0.4.0".winapi}"."winerror" = true; }
-      { "${deps.parking_lot_core."0.4.0".winapi}"."winnt" = true; }
-      { "${deps.parking_lot_core."0.4.0".winapi}".default = true; }
-    ];
-  }) [
-    (features_.rand."${deps."parking_lot_core"."0.4.0"."rand"}" deps)
-    (features_.smallvec."${deps."parking_lot_core"."0.4.0"."smallvec"}" deps)
-    (features_.rustc_version."${deps."parking_lot_core"."0.4.0"."rustc_version"}" deps)
-    (features_.libc."${deps."parking_lot_core"."0.4.0"."libc"}" deps)
-    (features_.winapi."${deps."parking_lot_core"."0.4.0"."winapi"}" deps)
-  ];
-
-
-# end
-# pkg-config-0.3.14
-
-  crates.pkg_config."0.3.14" = deps: { features?(features_.pkg_config."0.3.14" deps {}) }: buildRustCrate {
-    crateName = "pkg-config";
-    version = "0.3.14";
-    description = "A library to run the pkg-config system tool at build time in order to be used in\nCargo build scripts.\n";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "0207fsarrm412j0dh87lfcas72n8mxar7q3mgflsbsrqnb140sv6";
-  };
-  features_.pkg_config."0.3.14" = deps: f: updateFeatures f ({
-    pkg_config."0.3.14".default = (f.pkg_config."0.3.14".default or true);
-  }) [];
-
-
-# end
-# quote-0.6.12
-
-  crates.quote."0.6.12" = deps: { features?(features_.quote."0.6.12" deps {}) }: buildRustCrate {
-    crateName = "quote";
-    version = "0.6.12";
-    description = "Quasi-quoting macro quote!(...)";
-    authors = [ "David Tolnay <dtolnay@gmail.com>" ];
-    sha256 = "1ckd2d2sy0hrwrqcr47dn0n3hyh7ygpc026l8xaycccyg27mihv9";
-    dependencies = mapFeatures features ([
-      (crates."proc_macro2"."${deps."quote"."0.6.12"."proc_macro2"}" deps)
-    ]);
-    features = mkFeatures (features."quote"."0.6.12" or {});
-  };
-  features_.quote."0.6.12" = deps: f: updateFeatures f (rec {
-    proc_macro2 = fold recursiveUpdate {} [
-      { "${deps.quote."0.6.12".proc_macro2}"."proc-macro" =
-        (f.proc_macro2."${deps.quote."0.6.12".proc_macro2}"."proc-macro" or false) ||
-        (quote."0.6.12"."proc-macro" or false) ||
-        (f."quote"."0.6.12"."proc-macro" or false); }
-      { "${deps.quote."0.6.12".proc_macro2}".default = (f.proc_macro2."${deps.quote."0.6.12".proc_macro2}".default or false); }
-    ];
-    quote = fold recursiveUpdate {} [
-      { "0.6.12"."proc-macro" =
-        (f.quote."0.6.12"."proc-macro" or false) ||
-        (f.quote."0.6.12".default or false) ||
-        (quote."0.6.12"."default" or false); }
-      { "0.6.12".default = (f.quote."0.6.12".default or true); }
-    ];
-  }) [
-    (features_.proc_macro2."${deps."quote"."0.6.12"."proc_macro2"}" deps)
-  ];
-
-
-# end
-# rand-0.6.5
-
-  crates.rand."0.6.5" = deps: { features?(features_.rand."0.6.5" deps {}) }: buildRustCrate {
-    crateName = "rand";
-    version = "0.6.5";
-    description = "Random number generators and other randomness functionality.\n";
-    authors = [ "The Rand Project Developers" "The Rust Project Developers" ];
-    sha256 = "0zbck48159aj8zrwzf80sd9xxh96w4f4968nshwjpysjvflimvgb";
-    build = "build.rs";
-    dependencies = mapFeatures features ([
-      (crates."rand_chacha"."${deps."rand"."0.6.5"."rand_chacha"}" deps)
-      (crates."rand_core"."${deps."rand"."0.6.5"."rand_core"}" deps)
-      (crates."rand_hc"."${deps."rand"."0.6.5"."rand_hc"}" deps)
-      (crates."rand_isaac"."${deps."rand"."0.6.5"."rand_isaac"}" deps)
-      (crates."rand_jitter"."${deps."rand"."0.6.5"."rand_jitter"}" deps)
-      (crates."rand_pcg"."${deps."rand"."0.6.5"."rand_pcg"}" deps)
-      (crates."rand_xorshift"."${deps."rand"."0.6.5"."rand_xorshift"}" deps)
-    ]
-      ++ (if features.rand."0.6.5".rand_os or false then [ (crates.rand_os."${deps."rand"."0.6.5".rand_os}" deps) ] else []))
-      ++ (if (kernel == "linux" || kernel == "darwin") then mapFeatures features ([
-      (crates."libc"."${deps."rand"."0.6.5"."libc"}" deps)
-    ]) else [])
-      ++ (if kernel == "windows" then mapFeatures features ([
-      (crates."winapi"."${deps."rand"."0.6.5"."winapi"}" deps)
-    ]) else []);
-
-    buildDependencies = mapFeatures features ([
-      (crates."autocfg"."${deps."rand"."0.6.5"."autocfg"}" deps)
-    ]);
-    features = mkFeatures (features."rand"."0.6.5" or {});
-  };
-  features_.rand."0.6.5" = deps: f: updateFeatures f (rec {
-    autocfg."${deps.rand."0.6.5".autocfg}".default = true;
-    libc."${deps.rand."0.6.5".libc}".default = (f.libc."${deps.rand."0.6.5".libc}".default or false);
-    rand = fold recursiveUpdate {} [
-      { "0.6.5"."alloc" =
-        (f.rand."0.6.5"."alloc" or false) ||
-        (f.rand."0.6.5".std or false) ||
-        (rand."0.6.5"."std" or false); }
-      { "0.6.5"."packed_simd" =
-        (f.rand."0.6.5"."packed_simd" or false) ||
-        (f.rand."0.6.5".simd_support or false) ||
-        (rand."0.6.5"."simd_support" or false); }
-      { "0.6.5"."rand_os" =
-        (f.rand."0.6.5"."rand_os" or false) ||
-        (f.rand."0.6.5".std or false) ||
-        (rand."0.6.5"."std" or false); }
-      { "0.6.5"."simd_support" =
-        (f.rand."0.6.5"."simd_support" or false) ||
-        (f.rand."0.6.5".nightly or false) ||
-        (rand."0.6.5"."nightly" or false); }
-      { "0.6.5"."std" =
-        (f.rand."0.6.5"."std" or false) ||
-        (f.rand."0.6.5".default or false) ||
-        (rand."0.6.5"."default" or false); }
-      { "0.6.5".default = (f.rand."0.6.5".default or true); }
-    ];
-    rand_chacha."${deps.rand."0.6.5".rand_chacha}".default = true;
-    rand_core = fold recursiveUpdate {} [
-      { "${deps.rand."0.6.5".rand_core}"."alloc" =
-        (f.rand_core."${deps.rand."0.6.5".rand_core}"."alloc" or false) ||
-        (rand."0.6.5"."alloc" or false) ||
-        (f."rand"."0.6.5"."alloc" or false); }
-      { "${deps.rand."0.6.5".rand_core}"."serde1" =
-        (f.rand_core."${deps.rand."0.6.5".rand_core}"."serde1" or false) ||
-        (rand."0.6.5"."serde1" or false) ||
-        (f."rand"."0.6.5"."serde1" or false); }
-      { "${deps.rand."0.6.5".rand_core}"."std" =
-        (f.rand_core."${deps.rand."0.6.5".rand_core}"."std" or false) ||
-        (rand."0.6.5"."std" or false) ||
-        (f."rand"."0.6.5"."std" or false); }
-      { "${deps.rand."0.6.5".rand_core}".default = true; }
-    ];
-    rand_hc."${deps.rand."0.6.5".rand_hc}".default = true;
-    rand_isaac = fold recursiveUpdate {} [
-      { "${deps.rand."0.6.5".rand_isaac}"."serde1" =
-        (f.rand_isaac."${deps.rand."0.6.5".rand_isaac}"."serde1" or false) ||
-        (rand."0.6.5"."serde1" or false) ||
-        (f."rand"."0.6.5"."serde1" or false); }
-      { "${deps.rand."0.6.5".rand_isaac}".default = true; }
-    ];
-    rand_jitter = fold recursiveUpdate {} [
-      { "${deps.rand."0.6.5".rand_jitter}"."std" =
-        (f.rand_jitter."${deps.rand."0.6.5".rand_jitter}"."std" or false) ||
-        (rand."0.6.5"."std" or false) ||
-        (f."rand"."0.6.5"."std" or false); }
-      { "${deps.rand."0.6.5".rand_jitter}".default = true; }
-    ];
-    rand_os = fold recursiveUpdate {} [
-      { "${deps.rand."0.6.5".rand_os}"."stdweb" =
-        (f.rand_os."${deps.rand."0.6.5".rand_os}"."stdweb" or false) ||
-        (rand."0.6.5"."stdweb" or false) ||
-        (f."rand"."0.6.5"."stdweb" or false); }
-      { "${deps.rand."0.6.5".rand_os}"."wasm-bindgen" =
-        (f.rand_os."${deps.rand."0.6.5".rand_os}"."wasm-bindgen" or false) ||
-        (rand."0.6.5"."wasm-bindgen" or false) ||
-        (f."rand"."0.6.5"."wasm-bindgen" or false); }
-      { "${deps.rand."0.6.5".rand_os}".default = true; }
-    ];
-    rand_pcg."${deps.rand."0.6.5".rand_pcg}".default = true;
-    rand_xorshift = fold recursiveUpdate {} [
-      { "${deps.rand."0.6.5".rand_xorshift}"."serde1" =
-        (f.rand_xorshift."${deps.rand."0.6.5".rand_xorshift}"."serde1" or false) ||
-        (rand."0.6.5"."serde1" or false) ||
-        (f."rand"."0.6.5"."serde1" or false); }
-      { "${deps.rand."0.6.5".rand_xorshift}".default = true; }
-    ];
-    winapi = fold recursiveUpdate {} [
-      { "${deps.rand."0.6.5".winapi}"."minwindef" = true; }
-      { "${deps.rand."0.6.5".winapi}"."ntsecapi" = true; }
-      { "${deps.rand."0.6.5".winapi}"."profileapi" = true; }
-      { "${deps.rand."0.6.5".winapi}"."winnt" = true; }
-      { "${deps.rand."0.6.5".winapi}".default = true; }
-    ];
-  }) [
-    (features_.rand_chacha."${deps."rand"."0.6.5"."rand_chacha"}" deps)
-    (features_.rand_core."${deps."rand"."0.6.5"."rand_core"}" deps)
-    (features_.rand_hc."${deps."rand"."0.6.5"."rand_hc"}" deps)
-    (features_.rand_isaac."${deps."rand"."0.6.5"."rand_isaac"}" deps)
-    (features_.rand_jitter."${deps."rand"."0.6.5"."rand_jitter"}" deps)
-    (features_.rand_os."${deps."rand"."0.6.5"."rand_os"}" deps)
-    (features_.rand_pcg."${deps."rand"."0.6.5"."rand_pcg"}" deps)
-    (features_.rand_xorshift."${deps."rand"."0.6.5"."rand_xorshift"}" deps)
-    (features_.autocfg."${deps."rand"."0.6.5"."autocfg"}" deps)
-    (features_.libc."${deps."rand"."0.6.5"."libc"}" deps)
-    (features_.winapi."${deps."rand"."0.6.5"."winapi"}" deps)
-  ];
-
-
-# end
-# rand_chacha-0.1.1
-
-  crates.rand_chacha."0.1.1" = deps: { features?(features_.rand_chacha."0.1.1" deps {}) }: buildRustCrate {
-    crateName = "rand_chacha";
-    version = "0.1.1";
-    description = "ChaCha random number generator\n";
-    authors = [ "The Rand Project Developers" "The Rust Project Developers" ];
-    sha256 = "0xnxm4mjd7wjnh18zxc1yickw58axbycp35ciraplqdfwn1gffwi";
-    build = "build.rs";
-    dependencies = mapFeatures features ([
-      (crates."rand_core"."${deps."rand_chacha"."0.1.1"."rand_core"}" deps)
-    ]);
-
-    buildDependencies = mapFeatures features ([
-      (crates."autocfg"."${deps."rand_chacha"."0.1.1"."autocfg"}" deps)
-    ]);
-  };
-  features_.rand_chacha."0.1.1" = deps: f: updateFeatures f ({
-    autocfg."${deps.rand_chacha."0.1.1".autocfg}".default = true;
-    rand_chacha."0.1.1".default = (f.rand_chacha."0.1.1".default or true);
-    rand_core."${deps.rand_chacha."0.1.1".rand_core}".default = (f.rand_core."${deps.rand_chacha."0.1.1".rand_core}".default or false);
-  }) [
-    (features_.rand_core."${deps."rand_chacha"."0.1.1"."rand_core"}" deps)
-    (features_.autocfg."${deps."rand_chacha"."0.1.1"."autocfg"}" deps)
-  ];
-
-
-# end
-# rand_hc-0.1.0
-
-  crates.rand_hc."0.1.0" = deps: { features?(features_.rand_hc."0.1.0" deps {}) }: buildRustCrate {
-    crateName = "rand_hc";
-    version = "0.1.0";
-    description = "HC128 random number generator\n";
-    authors = [ "The Rand Project Developers" ];
-    sha256 = "05agb75j87yp7y1zk8yf7bpm66hc0673r3dlypn0kazynr6fdgkz";
-    dependencies = mapFeatures features ([
-      (crates."rand_core"."${deps."rand_hc"."0.1.0"."rand_core"}" deps)
-    ]);
-  };
-  features_.rand_hc."0.1.0" = deps: f: updateFeatures f ({
-    rand_core."${deps.rand_hc."0.1.0".rand_core}".default = (f.rand_core."${deps.rand_hc."0.1.0".rand_core}".default or false);
-    rand_hc."0.1.0".default = (f.rand_hc."0.1.0".default or true);
-  }) [
-    (features_.rand_core."${deps."rand_hc"."0.1.0"."rand_core"}" deps)
-  ];
-
-
-# end
-# rand_isaac-0.1.1
-
-  crates.rand_isaac."0.1.1" = deps: { features?(features_.rand_isaac."0.1.1" deps {}) }: buildRustCrate {
-    crateName = "rand_isaac";
-    version = "0.1.1";
-    description = "ISAAC random number generator\n";
-    authors = [ "The Rand Project Developers" "The Rust Project Developers" ];
-    sha256 = "10hhdh5b5sa03s6b63y9bafm956jwilx41s71jbrzl63ccx8lxdq";
-    dependencies = mapFeatures features ([
-      (crates."rand_core"."${deps."rand_isaac"."0.1.1"."rand_core"}" deps)
-    ]);
-    features = mkFeatures (features."rand_isaac"."0.1.1" or {});
-  };
-  features_.rand_isaac."0.1.1" = deps: f: updateFeatures f (rec {
-    rand_core = fold recursiveUpdate {} [
-      { "${deps.rand_isaac."0.1.1".rand_core}"."serde1" =
-        (f.rand_core."${deps.rand_isaac."0.1.1".rand_core}"."serde1" or false) ||
-        (rand_isaac."0.1.1"."serde1" or false) ||
-        (f."rand_isaac"."0.1.1"."serde1" or false); }
-      { "${deps.rand_isaac."0.1.1".rand_core}".default = (f.rand_core."${deps.rand_isaac."0.1.1".rand_core}".default or false); }
-    ];
-    rand_isaac = fold recursiveUpdate {} [
-      { "0.1.1"."serde" =
-        (f.rand_isaac."0.1.1"."serde" or false) ||
-        (f.rand_isaac."0.1.1".serde1 or false) ||
-        (rand_isaac."0.1.1"."serde1" or false); }
-      { "0.1.1"."serde_derive" =
-        (f.rand_isaac."0.1.1"."serde_derive" or false) ||
-        (f.rand_isaac."0.1.1".serde1 or false) ||
-        (rand_isaac."0.1.1"."serde1" or false); }
-      { "0.1.1".default = (f.rand_isaac."0.1.1".default or true); }
-    ];
-  }) [
-    (features_.rand_core."${deps."rand_isaac"."0.1.1"."rand_core"}" deps)
-  ];
-
-
-# end
-# rand_jitter-0.1.3
-
-  crates.rand_jitter."0.1.3" = deps: { features?(features_.rand_jitter."0.1.3" deps {}) }: buildRustCrate {
-    crateName = "rand_jitter";
-    version = "0.1.3";
-    description = "Random number generator based on timing jitter";
-    authors = [ "The Rand Project Developers" ];
-    sha256 = "1cb4q73rmh1inlx3liy6rabapcqh6p6c1plsd2lxw6dmi67d1qc3";
-    dependencies = mapFeatures features ([
-      (crates."rand_core"."${deps."rand_jitter"."0.1.3"."rand_core"}" deps)
-    ])
-      ++ (if kernel == "darwin" || kernel == "ios" then mapFeatures features ([
-      (crates."libc"."${deps."rand_jitter"."0.1.3"."libc"}" deps)
-    ]) else [])
-      ++ (if kernel == "windows" then mapFeatures features ([
-      (crates."winapi"."${deps."rand_jitter"."0.1.3"."winapi"}" deps)
-    ]) else []);
-    features = mkFeatures (features."rand_jitter"."0.1.3" or {});
-  };
-  features_.rand_jitter."0.1.3" = deps: f: updateFeatures f (rec {
-    libc."${deps.rand_jitter."0.1.3".libc}".default = true;
-    rand_core = fold recursiveUpdate {} [
-      { "${deps.rand_jitter."0.1.3".rand_core}"."std" =
-        (f.rand_core."${deps.rand_jitter."0.1.3".rand_core}"."std" or false) ||
-        (rand_jitter."0.1.3"."std" or false) ||
-        (f."rand_jitter"."0.1.3"."std" or false); }
-      { "${deps.rand_jitter."0.1.3".rand_core}".default = true; }
-    ];
-    rand_jitter."0.1.3".default = (f.rand_jitter."0.1.3".default or true);
-    winapi = fold recursiveUpdate {} [
-      { "${deps.rand_jitter."0.1.3".winapi}"."profileapi" = true; }
-      { "${deps.rand_jitter."0.1.3".winapi}".default = true; }
-    ];
-  }) [
-    (features_.rand_core."${deps."rand_jitter"."0.1.3"."rand_core"}" deps)
-    (features_.libc."${deps."rand_jitter"."0.1.3"."libc"}" deps)
-    (features_.winapi."${deps."rand_jitter"."0.1.3"."winapi"}" deps)
-  ];
-
-
-# end
-# rand_pcg-0.1.2
-
-  crates.rand_pcg."0.1.2" = deps: { features?(features_.rand_pcg."0.1.2" deps {}) }: buildRustCrate {
-    crateName = "rand_pcg";
-    version = "0.1.2";
-    description = "Selected PCG random number generators\n";
-    authors = [ "The Rand Project Developers" ];
-    sha256 = "04qgi2ai2z42li5h4aawvxbpnlqyjfnipz9d6k73mdnl6p1xq938";
-    build = "build.rs";
-    dependencies = mapFeatures features ([
-      (crates."rand_core"."${deps."rand_pcg"."0.1.2"."rand_core"}" deps)
-    ]);
-
-    buildDependencies = mapFeatures features ([
-      (crates."autocfg"."${deps."rand_pcg"."0.1.2"."autocfg"}" deps)
-    ]);
-    features = mkFeatures (features."rand_pcg"."0.1.2" or {});
-  };
-  features_.rand_pcg."0.1.2" = deps: f: updateFeatures f (rec {
-    autocfg."${deps.rand_pcg."0.1.2".autocfg}".default = true;
-    rand_core."${deps.rand_pcg."0.1.2".rand_core}".default = true;
-    rand_pcg = fold recursiveUpdate {} [
-      { "0.1.2"."serde" =
-        (f.rand_pcg."0.1.2"."serde" or false) ||
-        (f.rand_pcg."0.1.2".serde1 or false) ||
-        (rand_pcg."0.1.2"."serde1" or false); }
-      { "0.1.2"."serde_derive" =
-        (f.rand_pcg."0.1.2"."serde_derive" or false) ||
-        (f.rand_pcg."0.1.2".serde1 or false) ||
-        (rand_pcg."0.1.2"."serde1" or false); }
-      { "0.1.2".default = (f.rand_pcg."0.1.2".default or true); }
-    ];
-  }) [
-    (features_.rand_core."${deps."rand_pcg"."0.1.2"."rand_core"}" deps)
-    (features_.autocfg."${deps."rand_pcg"."0.1.2"."autocfg"}" deps)
-  ];
-
-
-# end
-# rand_xorshift-0.1.1
-
-  crates.rand_xorshift."0.1.1" = deps: { features?(features_.rand_xorshift."0.1.1" deps {}) }: buildRustCrate {
-    crateName = "rand_xorshift";
-    version = "0.1.1";
-    description = "Xorshift random number generator\n";
-    authors = [ "The Rand Project Developers" "The Rust Project Developers" ];
-    sha256 = "0v365c4h4lzxwz5k5kp9m0661s0sss7ylv74if0xb4svis9sswnn";
-    dependencies = mapFeatures features ([
-      (crates."rand_core"."${deps."rand_xorshift"."0.1.1"."rand_core"}" deps)
-    ]);
-    features = mkFeatures (features."rand_xorshift"."0.1.1" or {});
-  };
-  features_.rand_xorshift."0.1.1" = deps: f: updateFeatures f (rec {
-    rand_core."${deps.rand_xorshift."0.1.1".rand_core}".default = (f.rand_core."${deps.rand_xorshift."0.1.1".rand_core}".default or false);
-    rand_xorshift = fold recursiveUpdate {} [
-      { "0.1.1"."serde" =
-        (f.rand_xorshift."0.1.1"."serde" or false) ||
-        (f.rand_xorshift."0.1.1".serde1 or false) ||
-        (rand_xorshift."0.1.1"."serde1" or false); }
-      { "0.1.1"."serde_derive" =
-        (f.rand_xorshift."0.1.1"."serde_derive" or false) ||
-        (f.rand_xorshift."0.1.1".serde1 or false) ||
-        (rand_xorshift."0.1.1"."serde1" or false); }
-      { "0.1.1".default = (f.rand_xorshift."0.1.1".default or true); }
-    ];
-  }) [
-    (features_.rand_core."${deps."rand_xorshift"."0.1.1"."rand_core"}" deps)
-  ];
-
-
-# end
-# rawpointer-0.1.0
-
-  crates.rawpointer."0.1.0" = deps: { features?(features_.rawpointer."0.1.0" deps {}) }: buildRustCrate {
-    crateName = "rawpointer";
-    version = "0.1.0";
-    description = "Extra methods for raw pointers.\n\nFor example `.post_inc()` and `.pre_dec()` (c.f. `ptr++` and `--ptr`) and\n`ptrdistance`.\n";
-    authors = [ "bluss" ];
-    sha256 = "0hblv2cv310ixf5f1jw4nk9w5pb95wh4dwqyjv07g2xrshbw6j04";
-  };
-  features_.rawpointer."0.1.0" = deps: f: updateFeatures f ({
-    rawpointer."0.1.0".default = (f.rawpointer."0.1.0".default or true);
-  }) [];
-
-
-# end
-# redox_syscall-0.1.54
-
-  crates.redox_syscall."0.1.54" = deps: { features?(features_.redox_syscall."0.1.54" deps {}) }: buildRustCrate {
-    crateName = "redox_syscall";
-    version = "0.1.54";
-    description = "A Rust library to access raw Redox system calls";
-    authors = [ "Jeremy Soller <jackpot51@gmail.com>" ];
-    sha256 = "1ndcp7brnvii87ndcd34fk846498r07iznphkslcy0shic9cp4rr";
-    libName = "syscall";
-  };
-  features_.redox_syscall."0.1.54" = deps: f: updateFeatures f ({
-    redox_syscall."0.1.54".default = (f.redox_syscall."0.1.54".default or true);
-  }) [];
-
-
-# end
-# regex-1.1.6
-
-  crates.regex."1.1.6" = deps: { features?(features_.regex."1.1.6" deps {}) }: buildRustCrate {
-    crateName = "regex";
-    version = "1.1.6";
-    description = "An implementation of regular expressions for Rust. This implementation uses\nfinite automata and guarantees linear time matching on all inputs.\n";
-    authors = [ "The Rust Project Developers" ];
-    sha256 = "1yynvabg03m5f65qxcw70qckkfjwi9xyfpjdp6yq7pk0xf0ydc0b";
-    dependencies = mapFeatures features ([
-      (crates."aho_corasick"."${deps."regex"."1.1.6"."aho_corasick"}" deps)
-      (crates."memchr"."${deps."regex"."1.1.6"."memchr"}" deps)
-      (crates."regex_syntax"."${deps."regex"."1.1.6"."regex_syntax"}" deps)
-      (crates."thread_local"."${deps."regex"."1.1.6"."thread_local"}" deps)
-      (crates."utf8_ranges"."${deps."regex"."1.1.6"."utf8_ranges"}" deps)
-    ]);
-    features = mkFeatures (features."regex"."1.1.6" or {});
-  };
-  features_.regex."1.1.6" = deps: f: updateFeatures f (rec {
-    aho_corasick."${deps.regex."1.1.6".aho_corasick}".default = true;
-    memchr."${deps.regex."1.1.6".memchr}".default = true;
-    regex = fold recursiveUpdate {} [
-      { "1.1.6"."pattern" =
-        (f.regex."1.1.6"."pattern" or false) ||
-        (f.regex."1.1.6".unstable or false) ||
-        (regex."1.1.6"."unstable" or false); }
-      { "1.1.6"."use_std" =
-        (f.regex."1.1.6"."use_std" or false) ||
-        (f.regex."1.1.6".default or false) ||
-        (regex."1.1.6"."default" or false); }
-      { "1.1.6".default = (f.regex."1.1.6".default or true); }
-    ];
-    regex_syntax."${deps.regex."1.1.6".regex_syntax}".default = true;
-    thread_local."${deps.regex."1.1.6".thread_local}".default = true;
-    utf8_ranges."${deps.regex."1.1.6".utf8_ranges}".default = true;
-  }) [
-    (features_.aho_corasick."${deps."regex"."1.1.6"."aho_corasick"}" deps)
-    (features_.memchr."${deps."regex"."1.1.6"."memchr"}" deps)
-    (features_.regex_syntax."${deps."regex"."1.1.6"."regex_syntax"}" deps)
-    (features_.thread_local."${deps."regex"."1.1.6"."thread_local"}" deps)
-    (features_.utf8_ranges."${deps."regex"."1.1.6"."utf8_ranges"}" deps)
-  ];
-
-
-# end
-# regex-syntax-0.6.6
-
-  crates.regex_syntax."0.6.6" = deps: { features?(features_.regex_syntax."0.6.6" deps {}) }: buildRustCrate {
-    crateName = "regex-syntax";
-    version = "0.6.6";
-    description = "A regular expression parser.";
-    authors = [ "The Rust Project Developers" ];
-    sha256 = "1cjrdc3affa3rjfaxkp91xnf9k0fsqn9z4xqc280vv39nvrl8p8b";
-    dependencies = mapFeatures features ([
-      (crates."ucd_util"."${deps."regex_syntax"."0.6.6"."ucd_util"}" deps)
-    ]);
-  };
-  features_.regex_syntax."0.6.6" = deps: f: updateFeatures f ({
-    regex_syntax."0.6.6".default = (f.regex_syntax."0.6.6".default or true);
-    ucd_util."${deps.regex_syntax."0.6.6".ucd_util}".default = true;
-  }) [
-    (features_.ucd_util."${deps."regex_syntax"."0.6.6"."ucd_util"}" deps)
-  ];
-
-
-# end
-# rustc-demangle-0.1.14
-
-  crates.rustc_demangle."0.1.14" = deps: { features?(features_.rustc_demangle."0.1.14" deps {}) }: buildRustCrate {
-    crateName = "rustc-demangle";
-    version = "0.1.14";
-    description = "Rust compiler symbol demangling.\n";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "07vl0ms3a27fpry9kh9piv08w7d51i5m7bgphk7pw4jygwzdy31f";
-    dependencies = mapFeatures features ([
-]);
-    features = mkFeatures (features."rustc_demangle"."0.1.14" or {});
-  };
-  features_.rustc_demangle."0.1.14" = deps: f: updateFeatures f (rec {
-    rustc_demangle = fold recursiveUpdate {} [
-      { "0.1.14"."compiler_builtins" =
-        (f.rustc_demangle."0.1.14"."compiler_builtins" or false) ||
-        (f.rustc_demangle."0.1.14".rustc-dep-of-std or false) ||
-        (rustc_demangle."0.1.14"."rustc-dep-of-std" or false); }
-      { "0.1.14"."core" =
-        (f.rustc_demangle."0.1.14"."core" or false) ||
-        (f.rustc_demangle."0.1.14".rustc-dep-of-std or false) ||
-        (rustc_demangle."0.1.14"."rustc-dep-of-std" or false); }
-      { "0.1.14".default = (f.rustc_demangle."0.1.14".default or true); }
-    ];
-  }) [];
-
-
-# end
-# rustc-workspace-hack-1.0.0
-
-  crates.rustc_workspace_hack."1.0.0" = deps: { features?(features_.rustc_workspace_hack."1.0.0" deps {}) }: buildRustCrate {
-    crateName = "rustc-workspace-hack";
-    version = "1.0.0";
-    description = "Hack for the compiler's own build system\n";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "0arpdp472j4lrwxbmf4z21d8kh95rbbphnzccf605pqq2rvczv3p";
-  };
-  features_.rustc_workspace_hack."1.0.0" = deps: f: updateFeatures f ({
-    rustc_workspace_hack."1.0.0".default = (f.rustc_workspace_hack."1.0.0".default or true);
-  }) [];
-
-
-# end
-# rustc_version-0.2.3
-
-  crates.rustc_version."0.2.3" = deps: { features?(features_.rustc_version."0.2.3" deps {}) }: buildRustCrate {
-    crateName = "rustc_version";
-    version = "0.2.3";
-    description = "A library for querying the version of a installed rustc compiler";
-    authors = [ "Marvin Löbel <loebel.marvin@gmail.com>" ];
-    sha256 = "0rgwzbgs3i9fqjm1p4ra3n7frafmpwl29c8lw85kv1rxn7n2zaa7";
-    dependencies = mapFeatures features ([
-      (crates."semver"."${deps."rustc_version"."0.2.3"."semver"}" deps)
-    ]);
-  };
-  features_.rustc_version."0.2.3" = deps: f: updateFeatures f ({
-    rustc_version."0.2.3".default = (f.rustc_version."0.2.3".default or true);
-    semver."${deps.rustc_version."0.2.3".semver}".default = true;
-  }) [
-    (features_.semver."${deps."rustc_version"."0.2.3"."semver"}" deps)
-  ];
-
-
-# end
-# rustfix-0.4.5
-
-  crates.rustfix."0.4.5" = deps: { features?(features_.rustfix."0.4.5" deps {}) }: buildRustCrate {
-    crateName = "rustfix";
-    version = "0.4.5";
-    description = "Automatically apply the suggestions made by rustc";
-    authors = [ "Pascal Hertleif <killercup@gmail.com>" "Oliver Schneider <oli-obk@users.noreply.github.com>" ];
-    sha256 = "16nz3wbxspl6awwy3k3ym8yqiyq1jad82m2cf8mrz5h3arfp208l";
-    dependencies = mapFeatures features ([
-      (crates."failure"."${deps."rustfix"."0.4.5"."failure"}" deps)
-      (crates."log"."${deps."rustfix"."0.4.5"."log"}" deps)
-      (crates."serde"."${deps."rustfix"."0.4.5"."serde"}" deps)
-      (crates."serde_derive"."${deps."rustfix"."0.4.5"."serde_derive"}" deps)
-      (crates."serde_json"."${deps."rustfix"."0.4.5"."serde_json"}" deps)
-    ]);
-  };
-  features_.rustfix."0.4.5" = deps: f: updateFeatures f ({
-    failure."${deps.rustfix."0.4.5".failure}".default = true;
-    log."${deps.rustfix."0.4.5".log}".default = true;
-    rustfix."0.4.5".default = (f.rustfix."0.4.5".default or true);
-    serde."${deps.rustfix."0.4.5".serde}".default = true;
-    serde_derive."${deps.rustfix."0.4.5".serde_derive}".default = true;
-    serde_json."${deps.rustfix."0.4.5".serde_json}".default = true;
-  }) [
-    (features_.failure."${deps."rustfix"."0.4.5"."failure"}" deps)
-    (features_.log."${deps."rustfix"."0.4.5"."log"}" deps)
-    (features_.serde."${deps."rustfix"."0.4.5"."serde"}" deps)
-    (features_.serde_derive."${deps."rustfix"."0.4.5"."serde_derive"}" deps)
-    (features_.serde_json."${deps."rustfix"."0.4.5"."serde_json"}" deps)
-  ];
-
-
-# end
-# same-file-1.0.4
-
-  crates.same_file."1.0.4" = deps: { features?(features_.same_file."1.0.4" deps {}) }: buildRustCrate {
-    crateName = "same-file";
-    version = "1.0.4";
-    description = "A simple crate for determining whether two file paths point to the same file.\n";
-    authors = [ "Andrew Gallant <jamslam@gmail.com>" ];
-    sha256 = "1zs244ssl381cqlnh2g42g3i60qip4z72i26z44d6kas3y3gy77q";
-    dependencies = (if kernel == "windows" then mapFeatures features ([
-      (crates."winapi_util"."${deps."same_file"."1.0.4"."winapi_util"}" deps)
-    ]) else []);
-  };
-  features_.same_file."1.0.4" = deps: f: updateFeatures f ({
-    same_file."1.0.4".default = (f.same_file."1.0.4".default or true);
-    winapi_util."${deps.same_file."1.0.4".winapi_util}".default = true;
-  }) [
-    (features_.winapi_util."${deps."same_file"."1.0.4"."winapi_util"}" deps)
-  ];
-
-
-# end
-# schannel-0.1.15
-
-  crates.schannel."0.1.15" = deps: { features?(features_.schannel."0.1.15" deps {}) }: buildRustCrate {
-    crateName = "schannel";
-    version = "0.1.15";
-    description = "Schannel bindings for rust, allowing SSL/TLS (e.g. https) without openssl";
-    authors = [ "Steven Fackler <sfackler@gmail.com>" "Steffen Butzer <steffen.butzer@outlook.com>" ];
-    sha256 = "1x9i0z9y8n5cg23ppyglgqdlz6rwcv2a489m5qpfk6l2ib8a1jdv";
-    dependencies = mapFeatures features ([
-      (crates."lazy_static"."${deps."schannel"."0.1.15"."lazy_static"}" deps)
-      (crates."winapi"."${deps."schannel"."0.1.15"."winapi"}" deps)
-    ]);
-  };
-  features_.schannel."0.1.15" = deps: f: updateFeatures f ({
-    lazy_static."${deps.schannel."0.1.15".lazy_static}".default = true;
-    schannel."0.1.15".default = (f.schannel."0.1.15".default or true);
-    winapi = fold recursiveUpdate {} [
-      { "${deps.schannel."0.1.15".winapi}"."lmcons" = true; }
-      { "${deps.schannel."0.1.15".winapi}"."minschannel" = true; }
-      { "${deps.schannel."0.1.15".winapi}"."schannel" = true; }
-      { "${deps.schannel."0.1.15".winapi}"."securitybaseapi" = true; }
-      { "${deps.schannel."0.1.15".winapi}"."sspi" = true; }
-      { "${deps.schannel."0.1.15".winapi}"."sysinfoapi" = true; }
-      { "${deps.schannel."0.1.15".winapi}"."timezoneapi" = true; }
-      { "${deps.schannel."0.1.15".winapi}"."winbase" = true; }
-      { "${deps.schannel."0.1.15".winapi}"."wincrypt" = true; }
-      { "${deps.schannel."0.1.15".winapi}"."winerror" = true; }
-      { "${deps.schannel."0.1.15".winapi}".default = true; }
-    ];
-  }) [
-    (features_.lazy_static."${deps."schannel"."0.1.15"."lazy_static"}" deps)
-    (features_.winapi."${deps."schannel"."0.1.15"."winapi"}" deps)
-  ];
-
-
-# end
-# scopeguard-0.3.3
-
-  crates.scopeguard."0.3.3" = deps: { features?(features_.scopeguard."0.3.3" deps {}) }: buildRustCrate {
-    crateName = "scopeguard";
-    version = "0.3.3";
-    description = "A RAII scope guard that will run a given closure when it goes out of scope,\neven if the code between panics (assuming unwinding panic).\n\nDefines the macros `defer!` and `defer_on_unwind!`; the latter only runs\nif the scope is extited through unwinding on panic.\n";
-    authors = [ "bluss" ];
-    sha256 = "0i1l013csrqzfz6c68pr5pi01hg5v5yahq8fsdmaxy6p8ygsjf3r";
-    features = mkFeatures (features."scopeguard"."0.3.3" or {});
-  };
-  features_.scopeguard."0.3.3" = deps: f: updateFeatures f (rec {
-    scopeguard = fold recursiveUpdate {} [
-      { "0.3.3"."use_std" =
-        (f.scopeguard."0.3.3"."use_std" or false) ||
-        (f.scopeguard."0.3.3".default or false) ||
-        (scopeguard."0.3.3"."default" or false); }
-      { "0.3.3".default = (f.scopeguard."0.3.3".default or true); }
-    ];
-  }) [];
-
-
-# end
-# semver-0.9.0
-
-  crates.semver."0.9.0" = deps: { features?(features_.semver."0.9.0" deps {}) }: buildRustCrate {
-    crateName = "semver";
-    version = "0.9.0";
-    description = "Semantic version parsing and comparison.\n";
-    authors = [ "Steve Klabnik <steve@steveklabnik.com>" "The Rust Project Developers" ];
-    sha256 = "0azak2lb2wc36s3x15az886kck7rpnksrw14lalm157rg9sc9z63";
-    dependencies = mapFeatures features ([
-      (crates."semver_parser"."${deps."semver"."0.9.0"."semver_parser"}" deps)
-    ]
-      ++ (if features.semver."0.9.0".serde or false then [ (crates.serde."${deps."semver"."0.9.0".serde}" deps) ] else []));
-    features = mkFeatures (features."semver"."0.9.0" or {});
-  };
-  features_.semver."0.9.0" = deps: f: updateFeatures f (rec {
-    semver = fold recursiveUpdate {} [
-      { "0.9.0"."serde" =
-        (f.semver."0.9.0"."serde" or false) ||
-        (f.semver."0.9.0".ci or false) ||
-        (semver."0.9.0"."ci" or false); }
-      { "0.9.0".default = (f.semver."0.9.0".default or true); }
-    ];
-    semver_parser."${deps.semver."0.9.0".semver_parser}".default = true;
-    serde."${deps.semver."0.9.0".serde}".default = true;
-  }) [
-    (features_.semver_parser."${deps."semver"."0.9.0"."semver_parser"}" deps)
-    (features_.serde."${deps."semver"."0.9.0"."serde"}" deps)
-  ];
-
-
-# end
-# semver-parser-0.7.0
-
-  crates.semver_parser."0.7.0" = deps: { features?(features_.semver_parser."0.7.0" deps {}) }: buildRustCrate {
-    crateName = "semver-parser";
-    version = "0.7.0";
-    description = "Parsing of the semver spec.\n";
-    authors = [ "Steve Klabnik <steve@steveklabnik.com>" ];
-    sha256 = "1da66c8413yakx0y15k8c055yna5lyb6fr0fw9318kdwkrk5k12h";
-  };
-  features_.semver_parser."0.7.0" = deps: f: updateFeatures f ({
-    semver_parser."0.7.0".default = (f.semver_parser."0.7.0".default or true);
-  }) [];
-
-
-# end
-# serde-1.0.90
-
-  crates.serde."1.0.90" = deps: { features?(features_.serde."1.0.90" deps {}) }: buildRustCrate {
-    crateName = "serde";
-    version = "1.0.90";
-    description = "A generic serialization/deserialization framework";
-    authors = [ "Erick Tryzelaar <erick.tryzelaar@gmail.com>" "David Tolnay <dtolnay@gmail.com>" ];
-    sha256 = "10b6n74m1dvb667vrn1db47ncb4h0mkqbg1dsamqjvv5vl5b5j56";
-    build = "build.rs";
-    dependencies = mapFeatures features ([
-    ]
-      ++ (if features.serde."1.0.90".serde_derive or false then [ (crates.serde_derive."${deps."serde"."1.0.90".serde_derive}" deps) ] else []));
-    features = mkFeatures (features."serde"."1.0.90" or {});
-  };
-  features_.serde."1.0.90" = deps: f: updateFeatures f (rec {
-    serde = fold recursiveUpdate {} [
-      { "1.0.90"."serde_derive" =
-        (f.serde."1.0.90"."serde_derive" or false) ||
-        (f.serde."1.0.90".derive or false) ||
-        (serde."1.0.90"."derive" or false); }
-      { "1.0.90"."std" =
-        (f.serde."1.0.90"."std" or false) ||
-        (f.serde."1.0.90".default or false) ||
-        (serde."1.0.90"."default" or false); }
-      { "1.0.90"."unstable" =
-        (f.serde."1.0.90"."unstable" or false) ||
-        (f.serde."1.0.90".alloc or false) ||
-        (serde."1.0.90"."alloc" or false); }
-      { "1.0.90".default = (f.serde."1.0.90".default or true); }
-    ];
-    serde_derive."${deps.serde."1.0.90".serde_derive}".default = true;
-  }) [
-    (features_.serde_derive."${deps."serde"."1.0.90"."serde_derive"}" deps)
-  ];
-
-
-# end
-# serde_derive-1.0.90
-
-  crates.serde_derive."1.0.90" = deps: { features?(features_.serde_derive."1.0.90" deps {}) }: buildRustCrate {
-    crateName = "serde_derive";
-    version = "1.0.90";
-    description = "Macros 1.1 implementation of #[derive(Serialize, Deserialize)]";
-    authors = [ "Erick Tryzelaar <erick.tryzelaar@gmail.com>" "David Tolnay <dtolnay@gmail.com>" ];
-    sha256 = "1m4xgyl8jj3mxj0wszminzc1qf2gbkj9dpl17vi95nwl6m7i157y";
-    procMacro = true;
-    dependencies = mapFeatures features ([
-      (crates."proc_macro2"."${deps."serde_derive"."1.0.90"."proc_macro2"}" deps)
-      (crates."quote"."${deps."serde_derive"."1.0.90"."quote"}" deps)
-      (crates."syn"."${deps."serde_derive"."1.0.90"."syn"}" deps)
-    ]);
-    features = mkFeatures (features."serde_derive"."1.0.90" or {});
-  };
-  features_.serde_derive."1.0.90" = deps: f: updateFeatures f ({
-    proc_macro2."${deps.serde_derive."1.0.90".proc_macro2}".default = true;
-    quote."${deps.serde_derive."1.0.90".quote}".default = true;
-    serde_derive."1.0.90".default = (f.serde_derive."1.0.90".default or true);
-    syn = fold recursiveUpdate {} [
-      { "${deps.serde_derive."1.0.90".syn}"."visit" = true; }
-      { "${deps.serde_derive."1.0.90".syn}".default = true; }
-    ];
-  }) [
-    (features_.proc_macro2."${deps."serde_derive"."1.0.90"."proc_macro2"}" deps)
-    (features_.quote."${deps."serde_derive"."1.0.90"."quote"}" deps)
-    (features_.syn."${deps."serde_derive"."1.0.90"."syn"}" deps)
-  ];
-
-
-# end
-# serde_ignored-0.0.4
-
-  crates.serde_ignored."0.0.4" = deps: { features?(features_.serde_ignored."0.0.4" deps {}) }: buildRustCrate {
-    crateName = "serde_ignored";
-    version = "0.0.4";
-    description = "Find out about keys that are ignored when deserializing data";
-    authors = [ "David Tolnay <dtolnay@gmail.com>" ];
-    sha256 = "1ljsywm58p1s645rg2l9mchc5xa6mzxjpm8ag8nc2b74yp09h4jh";
-    dependencies = mapFeatures features ([
-      (crates."serde"."${deps."serde_ignored"."0.0.4"."serde"}" deps)
-    ]);
-  };
-  features_.serde_ignored."0.0.4" = deps: f: updateFeatures f ({
-    serde."${deps.serde_ignored."0.0.4".serde}".default = true;
-    serde_ignored."0.0.4".default = (f.serde_ignored."0.0.4".default or true);
-  }) [
-    (features_.serde."${deps."serde_ignored"."0.0.4"."serde"}" deps)
-  ];
-
-
-# end
-# shell-escape-0.1.4
-
-  crates.shell_escape."0.1.4" = deps: { features?(features_.shell_escape."0.1.4" deps {}) }: buildRustCrate {
-    crateName = "shell-escape";
-    version = "0.1.4";
-    description = "Escape characters that may have a special meaning in a shell";
-    authors = [ "Steven Fackler <sfackler@gmail.com>" ];
-    sha256 = "02ik28la039b8anx0sx8mbdp2yx66m64mjrjyy6x0dgpbmfxmc24";
-  };
-  features_.shell_escape."0.1.4" = deps: f: updateFeatures f ({
-    shell_escape."0.1.4".default = (f.shell_escape."0.1.4".default or true);
-  }) [];
-
-
-# end
-# sized-chunks-0.1.3
-
-  crates.sized_chunks."0.1.3" = deps: { features?(features_.sized_chunks."0.1.3" deps {}) }: buildRustCrate {
-    crateName = "sized-chunks";
-    version = "0.1.3";
-    description = "Efficient sized chunk datatypes";
-    authors = [ "Bodil Stokke <bodil@bodil.org>" ];
-    edition = "2018";
-    sha256 = "0qp5yvy2kqpk5qhiq3ybwynv740j3wv97ar1kjx96hmmbman142i";
-    dependencies = mapFeatures features ([
-      (crates."typenum"."${deps."sized_chunks"."0.1.3"."typenum"}" deps)
-    ]);
-  };
-  features_.sized_chunks."0.1.3" = deps: f: updateFeatures f ({
-    sized_chunks."0.1.3".default = (f.sized_chunks."0.1.3".default or true);
-    typenum."${deps.sized_chunks."0.1.3".typenum}".default = true;
-  }) [
-    (features_.typenum."${deps."sized_chunks"."0.1.3"."typenum"}" deps)
-  ];
-
-
-# end
-# socket2-0.3.8
-
-  crates.socket2."0.3.8" = deps: { features?(features_.socket2."0.3.8" deps {}) }: buildRustCrate {
-    crateName = "socket2";
-    version = "0.3.8";
-    description = "Utilities for handling networking sockets with a maximal amount of configuration\npossible intended.\n";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "1a71m20jxmf9kqqinksphc7wj1j7q672q29cpza7p9siyzyfx598";
-    dependencies = (if (kernel == "linux" || kernel == "darwin") || kernel == "redox" then mapFeatures features ([
-      (crates."cfg_if"."${deps."socket2"."0.3.8"."cfg_if"}" deps)
-      (crates."libc"."${deps."socket2"."0.3.8"."libc"}" deps)
-    ]) else [])
-      ++ (if kernel == "redox" then mapFeatures features ([
-      (crates."redox_syscall"."${deps."socket2"."0.3.8"."redox_syscall"}" deps)
-    ]) else [])
-      ++ (if kernel == "windows" then mapFeatures features ([
-      (crates."winapi"."${deps."socket2"."0.3.8"."winapi"}" deps)
-    ]) else []);
-    features = mkFeatures (features."socket2"."0.3.8" or {});
-  };
-  features_.socket2."0.3.8" = deps: f: updateFeatures f ({
-    cfg_if."${deps.socket2."0.3.8".cfg_if}".default = true;
-    libc."${deps.socket2."0.3.8".libc}".default = true;
-    redox_syscall."${deps.socket2."0.3.8".redox_syscall}".default = true;
-    socket2."0.3.8".default = (f.socket2."0.3.8".default or true);
-    winapi = fold recursiveUpdate {} [
-      { "${deps.socket2."0.3.8".winapi}"."handleapi" = true; }
-      { "${deps.socket2."0.3.8".winapi}"."minwindef" = true; }
-      { "${deps.socket2."0.3.8".winapi}"."ws2def" = true; }
-      { "${deps.socket2."0.3.8".winapi}"."ws2ipdef" = true; }
-      { "${deps.socket2."0.3.8".winapi}"."ws2tcpip" = true; }
-      { "${deps.socket2."0.3.8".winapi}".default = true; }
-    ];
-  }) [
-    (features_.cfg_if."${deps."socket2"."0.3.8"."cfg_if"}" deps)
-    (features_.libc."${deps."socket2"."0.3.8"."libc"}" deps)
-    (features_.redox_syscall."${deps."socket2"."0.3.8"."redox_syscall"}" deps)
-    (features_.winapi."${deps."socket2"."0.3.8"."winapi"}" deps)
-  ];
-
-
-# end
-# strsim-0.8.0
-
-  crates.strsim."0.8.0" = deps: { features?(features_.strsim."0.8.0" deps {}) }: buildRustCrate {
-    crateName = "strsim";
-    version = "0.8.0";
-    description = "Implementations of string similarity metrics.\nIncludes Hamming, Levenshtein, OSA, Damerau-Levenshtein, Jaro, and Jaro-Winkler.\n";
-    authors = [ "Danny Guo <dannyguo91@gmail.com>" ];
-    sha256 = "0d3jsdz22wgjyxdakqnvdgmwjdvkximz50d9zfk4qlalw635qcvy";
-  };
-  features_.strsim."0.8.0" = deps: f: updateFeatures f ({
-    strsim."0.8.0".default = (f.strsim."0.8.0".default or true);
-  }) [];
-
-
-# end
-# strsim-0.9.1
-
-  crates.strsim."0.9.1" = deps: { features?(features_.strsim."0.9.1" deps {}) }: buildRustCrate {
-    crateName = "strsim";
-    version = "0.9.1";
-    description = "Implementations of string similarity metrics.\nIncludes Hamming, Levenshtein, OSA, Damerau-Levenshtein, Jaro, and Jaro-Winkler.\n";
-    authors = [ "Danny Guo <dannyguo91@gmail.com>" ];
-    sha256 = "0lpi3lrq6z5slay72ir1sg1ki0bvr3qia82lzx937gpc999i6bah";
-    dependencies = mapFeatures features ([
-      (crates."hashbrown"."${deps."strsim"."0.9.1"."hashbrown"}" deps)
-      (crates."ndarray"."${deps."strsim"."0.9.1"."ndarray"}" deps)
-    ]);
-  };
-  features_.strsim."0.9.1" = deps: f: updateFeatures f ({
-    hashbrown."${deps.strsim."0.9.1".hashbrown}".default = true;
-    ndarray."${deps.strsim."0.9.1".ndarray}".default = true;
-    strsim."0.9.1".default = (f.strsim."0.9.1".default or true);
-  }) [
-    (features_.hashbrown."${deps."strsim"."0.9.1"."hashbrown"}" deps)
-    (features_.ndarray."${deps."strsim"."0.9.1"."ndarray"}" deps)
-  ];
-
-
-# end
-# syn-0.15.32
-
-  crates.syn."0.15.32" = deps: { features?(features_.syn."0.15.32" deps {}) }: buildRustCrate {
-    crateName = "syn";
-    version = "0.15.32";
-    description = "Parser for Rust source code";
-    authors = [ "David Tolnay <dtolnay@gmail.com>" ];
-    sha256 = "1xq1mbns8zyg2ls5927wqi7i7hn2y933czbqqds648gcdqccsqb0";
-    dependencies = mapFeatures features ([
-      (crates."proc_macro2"."${deps."syn"."0.15.32"."proc_macro2"}" deps)
-      (crates."unicode_xid"."${deps."syn"."0.15.32"."unicode_xid"}" deps)
-    ]
-      ++ (if features.syn."0.15.32".quote or false then [ (crates.quote."${deps."syn"."0.15.32".quote}" deps) ] else []));
-    features = mkFeatures (features."syn"."0.15.32" or {});
-  };
-  features_.syn."0.15.32" = deps: f: updateFeatures f (rec {
-    proc_macro2 = fold recursiveUpdate {} [
-      { "${deps.syn."0.15.32".proc_macro2}"."proc-macro" =
-        (f.proc_macro2."${deps.syn."0.15.32".proc_macro2}"."proc-macro" or false) ||
-        (syn."0.15.32"."proc-macro" or false) ||
-        (f."syn"."0.15.32"."proc-macro" or false); }
-      { "${deps.syn."0.15.32".proc_macro2}".default = (f.proc_macro2."${deps.syn."0.15.32".proc_macro2}".default or false); }
-    ];
-    quote = fold recursiveUpdate {} [
-      { "${deps.syn."0.15.32".quote}"."proc-macro" =
-        (f.quote."${deps.syn."0.15.32".quote}"."proc-macro" or false) ||
-        (syn."0.15.32"."proc-macro" or false) ||
-        (f."syn"."0.15.32"."proc-macro" or false); }
-      { "${deps.syn."0.15.32".quote}".default = (f.quote."${deps.syn."0.15.32".quote}".default or false); }
-    ];
-    syn = fold recursiveUpdate {} [
-      { "0.15.32"."clone-impls" =
-        (f.syn."0.15.32"."clone-impls" or false) ||
-        (f.syn."0.15.32".default or false) ||
-        (syn."0.15.32"."default" or false); }
-      { "0.15.32"."derive" =
-        (f.syn."0.15.32"."derive" or false) ||
-        (f.syn."0.15.32".default or false) ||
-        (syn."0.15.32"."default" or false); }
-      { "0.15.32"."parsing" =
-        (f.syn."0.15.32"."parsing" or false) ||
-        (f.syn."0.15.32".default or false) ||
-        (syn."0.15.32"."default" or false); }
-      { "0.15.32"."printing" =
-        (f.syn."0.15.32"."printing" or false) ||
-        (f.syn."0.15.32".default or false) ||
-        (syn."0.15.32"."default" or false); }
-      { "0.15.32"."proc-macro" =
-        (f.syn."0.15.32"."proc-macro" or false) ||
-        (f.syn."0.15.32".default or false) ||
-        (syn."0.15.32"."default" or false); }
-      { "0.15.32"."quote" =
-        (f.syn."0.15.32"."quote" or false) ||
-        (f.syn."0.15.32".printing or false) ||
-        (syn."0.15.32"."printing" or false); }
-      { "0.15.32".default = (f.syn."0.15.32".default or true); }
-    ];
-    unicode_xid."${deps.syn."0.15.32".unicode_xid}".default = true;
-  }) [
-    (features_.proc_macro2."${deps."syn"."0.15.32"."proc_macro2"}" deps)
-    (features_.quote."${deps."syn"."0.15.32"."quote"}" deps)
-    (features_.unicode_xid."${deps."syn"."0.15.32"."unicode_xid"}" deps)
-  ];
-
-
-# end
-# tar-0.4.22
-
-  crates.tar."0.4.22" = deps: { features?(features_.tar."0.4.22" deps {}) }: buildRustCrate {
-    crateName = "tar";
-    version = "0.4.22";
-    description = "A Rust implementation of a TAR file reader and writer. This library does not\ncurrently handle compression, but it is abstract over all I/O readers and\nwriters. Additionally, great lengths are taken to ensure that the entire\ncontents are never required to be entirely resident in memory all at once.\n";
-    authors = [ "Alex Crichton <alex@alexcrichton.com>" ];
-    sha256 = "1y2b5av1ckf7v7rw1p59fjddn2jwzv0xr69lgdd4l41g43c3zq9j";
-    dependencies = mapFeatures features ([
-      (crates."filetime"."${deps."tar"."0.4.22"."filetime"}" deps)
-    ])
-      ++ (if kernel == "redox" then mapFeatures features ([
-      (crates."redox_syscall"."${deps."tar"."0.4.22"."redox_syscall"}" deps)
-    ]) else [])
-      ++ (if (kernel == "linux" || kernel == "darwin") then mapFeatures features ([
-      (crates."libc"."${deps."tar"."0.4.22"."libc"}" deps)
-    ]) else []);
-  };
-  features_.tar."0.4.22" = deps: f: updateFeatures f (rec {
-    filetime."${deps.tar."0.4.22".filetime}".default = true;
-    libc."${deps.tar."0.4.22".libc}".default = true;
-    redox_syscall."${deps.tar."0.4.22".redox_syscall}".default = true;
-    tar = fold recursiveUpdate {} [
-      { "0.4.22"."xattr" =
-        (f.tar."0.4.22"."xattr" or false) ||
-        (f.tar."0.4.22".default or false) ||
-        (tar."0.4.22"."default" or false); }
-      { "0.4.22".default = (f.tar."0.4.22".default or true); }
-    ];
-  }) [
-    (features_.filetime."${deps."tar"."0.4.22"."filetime"}" deps)
-    (features_.redox_syscall."${deps."tar"."0.4.22"."redox_syscall"}" deps)
-    (features_.libc."${deps."tar"."0.4.22"."libc"}" deps)
-  ];
-
-
-# end
-# tempfile-3.0.7
-
-  crates.tempfile."3.0.7" = deps: { features?(features_.tempfile."3.0.7" deps {}) }: buildRustCrate {
-    crateName = "tempfile";
-    version = "3.0.7";
-    description = "A library for managing temporary files and directories.\n";
-    authors = [ "Steven Allen <steven@stebalien.com>" "The Rust Project Developers" "Ashley Mannix <ashleymannix@live.com.au>" "Jason White <jasonaw0@gmail.com>" ];
-    sha256 = "19h7ch8fvisxrrmabcnhlfj6b8vg34zaw8491x141p0n0727niaf";
-    dependencies = mapFeatures features ([
-      (crates."cfg_if"."${deps."tempfile"."3.0.7"."cfg_if"}" deps)
-      (crates."rand"."${deps."tempfile"."3.0.7"."rand"}" deps)
-      (crates."remove_dir_all"."${deps."tempfile"."3.0.7"."remove_dir_all"}" deps)
-    ])
-      ++ (if kernel == "redox" then mapFeatures features ([
-      (crates."redox_syscall"."${deps."tempfile"."3.0.7"."redox_syscall"}" deps)
-    ]) else [])
-      ++ (if (kernel == "linux" || kernel == "darwin") then mapFeatures features ([
-      (crates."libc"."${deps."tempfile"."3.0.7"."libc"}" deps)
-    ]) else [])
-      ++ (if kernel == "windows" then mapFeatures features ([
-      (crates."winapi"."${deps."tempfile"."3.0.7"."winapi"}" deps)
-    ]) else []);
-  };
-  features_.tempfile."3.0.7" = deps: f: updateFeatures f ({
-    cfg_if."${deps.tempfile."3.0.7".cfg_if}".default = true;
-    libc."${deps.tempfile."3.0.7".libc}".default = true;
-    rand."${deps.tempfile."3.0.7".rand}".default = true;
-    redox_syscall."${deps.tempfile."3.0.7".redox_syscall}".default = true;
-    remove_dir_all."${deps.tempfile."3.0.7".remove_dir_all}".default = true;
-    tempfile."3.0.7".default = (f.tempfile."3.0.7".default or true);
-    winapi = fold recursiveUpdate {} [
-      { "${deps.tempfile."3.0.7".winapi}"."fileapi" = true; }
-      { "${deps.tempfile."3.0.7".winapi}"."handleapi" = true; }
-      { "${deps.tempfile."3.0.7".winapi}"."winbase" = true; }
-      { "${deps.tempfile."3.0.7".winapi}".default = true; }
-    ];
-  }) [
-    (features_.cfg_if."${deps."tempfile"."3.0.7"."cfg_if"}" deps)
-    (features_.rand."${deps."tempfile"."3.0.7"."rand"}" deps)
-    (features_.remove_dir_all."${deps."tempfile"."3.0.7"."remove_dir_all"}" deps)
-    (features_.redox_syscall."${deps."tempfile"."3.0.7"."redox_syscall"}" deps)
-    (features_.libc."${deps."tempfile"."3.0.7"."libc"}" deps)
-    (features_.winapi."${deps."tempfile"."3.0.7"."winapi"}" deps)
-  ];
-
-
-# end
-# textwrap-0.11.0
-
-  crates.textwrap."0.11.0" = deps: { features?(features_.textwrap."0.11.0" deps {}) }: buildRustCrate {
-    crateName = "textwrap";
-    version = "0.11.0";
-    description = "Textwrap is a small library for word wrapping, indenting, and\ndedenting strings.\n\nYou can use it to format strings (such as help and error messages) for\ndisplay in commandline applications. It is designed to be efficient\nand handle Unicode characters correctly.\n";
-    authors = [ "Martin Geisler <martin@geisler.net>" ];
-    sha256 = "0s25qh49n7kjayrdj4q3v0jk0jc6vy88rdw0bvgfxqlscpqpxi7d";
-    dependencies = mapFeatures features ([
-      (crates."unicode_width"."${deps."textwrap"."0.11.0"."unicode_width"}" deps)
-    ]);
-  };
-  features_.textwrap."0.11.0" = deps: f: updateFeatures f ({
-    textwrap."0.11.0".default = (f.textwrap."0.11.0".default or true);
-    unicode_width."${deps.textwrap."0.11.0".unicode_width}".default = true;
-  }) [
-    (features_.unicode_width."${deps."textwrap"."0.11.0"."unicode_width"}" deps)
-  ];
-
-
-# end
-# typenum-1.10.0
-
-  crates.typenum."1.10.0" = deps: { features?(features_.typenum."1.10.0" deps {}) }: buildRustCrate {
-    crateName = "typenum";
-    version = "1.10.0";
-    description = "Typenum is a Rust library for type-level numbers evaluated at compile time. It currently supports bits, unsigned integers, and signed integers. It also provides a type-level array of type-level numbers, but its implementation is incomplete.";
-    authors = [ "Paho Lurie-Gregg <paho@paholg.com>" "Andre Bogus <bogusandre@gmail.com>" ];
-    sha256 = "1v2cgg0mlzkg5prs7swysckgk2ay6bpda8m83c2sn3z77dcsx3bc";
-    build = "build/main.rs";
-    features = mkFeatures (features."typenum"."1.10.0" or {});
-  };
-  features_.typenum."1.10.0" = deps: f: updateFeatures f ({
-    typenum."1.10.0".default = (f.typenum."1.10.0".default or true);
-  }) [];
-
-
-# end
-# url_serde-0.2.0
-
-  crates.url_serde."0.2.0" = deps: { features?(features_.url_serde."0.2.0" deps {}) }: buildRustCrate {
-    crateName = "url_serde";
-    version = "0.2.0";
-    description = "Serde support for URL types";
-    authors = [ "The rust-url developers" ];
-    sha256 = "07ry87rw0pi1da6b53f7s3f52wx3ihxbcgjd4ldspfv5xh6wipsg";
-    dependencies = mapFeatures features ([
-      (crates."serde"."${deps."url_serde"."0.2.0"."serde"}" deps)
-      (crates."url"."${deps."url_serde"."0.2.0"."url"}" deps)
-    ]);
-  };
-  features_.url_serde."0.2.0" = deps: f: updateFeatures f ({
-    serde."${deps.url_serde."0.2.0".serde}".default = true;
-    url."${deps.url_serde."0.2.0".url}".default = true;
-    url_serde."0.2.0".default = (f.url_serde."0.2.0".default or true);
-  }) [
-    (features_.serde."${deps."url_serde"."0.2.0"."serde"}" deps)
-    (features_.url."${deps."url_serde"."0.2.0"."url"}" deps)
-  ];
-
-
-# end
-# vcpkg-0.2.6
-
-  crates.vcpkg."0.2.6" = deps: { features?(features_.vcpkg."0.2.6" deps {}) }: buildRustCrate {
-    crateName = "vcpkg";
-    version = "0.2.6";
-    description = "A library to find native dependencies in a vcpkg tree at build\ntime in order to be used in Cargo build scripts.\n";
-    authors = [ "Jim McGrath <jimmc2@gmail.com>" ];
-    sha256 = "1ig6jqpzzl1z9vk4qywgpfr4hfbd8ny8frqsgm3r449wkc4n1i5x";
-  };
-  features_.vcpkg."0.2.6" = deps: f: updateFeatures f ({
-    vcpkg."0.2.6".default = (f.vcpkg."0.2.6".default or true);
-  }) [];
-
-
-# end
-# walkdir-2.2.7
-
-  crates.walkdir."2.2.7" = deps: { features?(features_.walkdir."2.2.7" deps {}) }: buildRustCrate {
-    crateName = "walkdir";
-    version = "2.2.7";
-    description = "Recursively walk a directory.";
-    authors = [ "Andrew Gallant <jamslam@gmail.com>" ];
-    sha256 = "0wq3v28916kkla29yyi0g0xfc16apwx24py68049kriz3gjlig03";
-    dependencies = mapFeatures features ([
-      (crates."same_file"."${deps."walkdir"."2.2.7"."same_file"}" deps)
-    ])
-      ++ (if kernel == "windows" then mapFeatures features ([
-      (crates."winapi"."${deps."walkdir"."2.2.7"."winapi"}" deps)
-      (crates."winapi_util"."${deps."walkdir"."2.2.7"."winapi_util"}" deps)
-    ]) else []);
-  };
-  features_.walkdir."2.2.7" = deps: f: updateFeatures f ({
-    same_file."${deps.walkdir."2.2.7".same_file}".default = true;
-    walkdir."2.2.7".default = (f.walkdir."2.2.7".default or true);
-    winapi = fold recursiveUpdate {} [
-      { "${deps.walkdir."2.2.7".winapi}"."std" = true; }
-      { "${deps.walkdir."2.2.7".winapi}"."winnt" = true; }
-      { "${deps.walkdir."2.2.7".winapi}".default = true; }
-    ];
-    winapi_util."${deps.walkdir."2.2.7".winapi_util}".default = true;
-  }) [
-    (features_.same_file."${deps."walkdir"."2.2.7"."same_file"}" deps)
-    (features_.winapi."${deps."walkdir"."2.2.7"."winapi"}" deps)
-    (features_.winapi_util."${deps."walkdir"."2.2.7"."winapi_util"}" deps)
-  ];
-
-
-# end
-# winapi-0.2.8
-
-  crates.winapi."0.2.8" = deps: { features?(features_.winapi."0.2.8" deps {}) }: buildRustCrate {
-    crateName = "winapi";
-    version = "0.2.8";
-    description = "Types and constants for WinAPI bindings. See README for list of crates providing function bindings.";
-    authors = [ "Peter Atashian <retep998@gmail.com>" ];
-    sha256 = "0a45b58ywf12vb7gvj6h3j264nydynmzyqz8d8rqxsj6icqv82as";
-  };
-  features_.winapi."0.2.8" = deps: f: updateFeatures f ({
-    winapi."0.2.8".default = (f.winapi."0.2.8".default or true);
-  }) [];
-
-
-# end
-# winapi-0.3.7
-
-  crates.winapi."0.3.7" = deps: { features?(features_.winapi."0.3.7" deps {}) }: buildRustCrate {
-    crateName = "winapi";
-    version = "0.3.7";
-    description = "Raw FFI bindings for all of Windows API.";
-    authors = [ "Peter Atashian <retep998@gmail.com>" ];
-    sha256 = "1k51gfkp0zqw7nj07y443mscs46icmdhld442s2073niap0kkdr8";
-    build = "build.rs";
-    dependencies = (if kernel == "i686-pc-windows-gnu" then mapFeatures features ([
-      (crates."winapi_i686_pc_windows_gnu"."${deps."winapi"."0.3.7"."winapi_i686_pc_windows_gnu"}" deps)
-    ]) else [])
-      ++ (if kernel == "x86_64-pc-windows-gnu" then mapFeatures features ([
-      (crates."winapi_x86_64_pc_windows_gnu"."${deps."winapi"."0.3.7"."winapi_x86_64_pc_windows_gnu"}" deps)
-    ]) else []);
-    features = mkFeatures (features."winapi"."0.3.7" or {});
-  };
-  features_.winapi."0.3.7" = deps: f: updateFeatures f (rec {
-    winapi = fold recursiveUpdate {} [
-      { "0.3.7"."impl-debug" =
-        (f.winapi."0.3.7"."impl-debug" or false) ||
-        (f.winapi."0.3.7".debug or false) ||
-        (winapi."0.3.7"."debug" or false); }
-      { "0.3.7".default = (f.winapi."0.3.7".default or true); }
-    ];
-    winapi_i686_pc_windows_gnu."${deps.winapi."0.3.7".winapi_i686_pc_windows_gnu}".default = true;
-    winapi_x86_64_pc_windows_gnu."${deps.winapi."0.3.7".winapi_x86_64_pc_windows_gnu}".default = true;
-  }) [
-    (features_.winapi_i686_pc_windows_gnu."${deps."winapi"."0.3.7"."winapi_i686_pc_windows_gnu"}" deps)
-    (features_.winapi_x86_64_pc_windows_gnu."${deps."winapi"."0.3.7"."winapi_x86_64_pc_windows_gnu"}" deps)
-  ];
-
-
-# end
-# winapi-build-0.1.1
-
-  crates.winapi_build."0.1.1" = deps: { features?(features_.winapi_build."0.1.1" deps {}) }: buildRustCrate {
-    crateName = "winapi-build";
-    version = "0.1.1";
-    description = "Common code for build.rs in WinAPI -sys crates.";
-    authors = [ "Peter Atashian <retep998@gmail.com>" ];
-    sha256 = "1lxlpi87rkhxcwp2ykf1ldw3p108hwm24nywf3jfrvmff4rjhqga";
-    libName = "build";
-  };
-  features_.winapi_build."0.1.1" = deps: f: updateFeatures f ({
-    winapi_build."0.1.1".default = (f.winapi_build."0.1.1".default or true);
-  }) [];
-
-
-# end
-# adler32-1.0.3
-
-  crates.adler32."1.0.3" = deps: { features?(features_.adler32."1.0.3" deps {}) }: buildRustCrate {
-    crateName = "adler32";
-    version = "1.0.3";
-    description = "Minimal Adler32 implementation for Rust.";
-    authors = [ "Remi Rampin <remirampin@gmail.com>" ];
-    sha256 = "1z3mvjgw02mbqk98kizzibrca01d5wfkpazsrp3vkkv3i56pn6fb";
-  };
-  features_.adler32."1.0.3" = deps: f: updateFeatures f ({
-    adler32."1.0.3".default = (f.adler32."1.0.3".default or true);
-  }) [];
-
-
-# end
-}
diff --git a/pkgs/build-support/rust/default-crate-overrides.nix b/pkgs/build-support/rust/default-crate-overrides.nix
index f6383af44e8..fa421406e67 100644
--- a/pkgs/build-support/rust/default-crate-overrides.nix
+++ b/pkgs/build-support/rust/default-crate-overrides.nix
@@ -28,6 +28,7 @@
 , rdkafka
 , udev
 , libevdev
+, alsa-lib
 , ...
 }:
 
@@ -35,6 +36,11 @@ let
   inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
 in
 {
+  alsa-sys = attrs: {
+    nativeBuildInputs = [ pkg-config ];
+    buildInputs = [ alsa-lib ];
+  };
+
   cairo-rs = attrs: {
     buildInputs = [ cairo ];
   };
diff --git a/pkgs/build-support/rust/fetch-cargo-tarball/cargo-vendor-normalise.py b/pkgs/build-support/rust/fetch-cargo-tarball/cargo-vendor-normalise.py
index 2d7a1895718..90933b089c9 100755
--- a/pkgs/build-support/rust/fetch-cargo-tarball/cargo-vendor-normalise.py
+++ b/pkgs/build-support/rust/fetch-cargo-tarball/cargo-vendor-normalise.py
@@ -13,7 +13,9 @@ def quote(s: str) -> str:
 def main() -> None:
     data = toml.load(sys.stdin)
 
-    assert list(data.keys()) == ["source"]
+    # There is no dependency to vendor in this project.
+    if not list(data.keys()) == ["source"]:
+        return
 
     # this value is non deterministic
     data["source"]["vendored-sources"]["directory"] = "@vendor@"
diff --git a/pkgs/build-support/rust/fetch-cargo-tarball/default.nix b/pkgs/build-support/rust/fetch-cargo-tarball/default.nix
index 2f1f3547dbb..6d6219078ba 100644
--- a/pkgs/build-support/rust/fetch-cargo-tarball/default.nix
+++ b/pkgs/build-support/rust/fetch-cargo-tarball/default.nix
@@ -58,10 +58,21 @@ in stdenv.mkDerivation ({
     export CARGO_HOME=$(mktemp -d cargo-home.XXX)
     CARGO_CONFIG=$(mktemp cargo-config.XXXX)
 
+    if [[ -n "$NIX_CRATES_INDEX" ]]; then
+    cat >$CARGO_HOME/config.toml <<EOF
+    [source.crates-io]
+    replace-with = 'mirror'
+    [source.mirror]
+    registry = "$NIX_CRATES_INDEX"
+    EOF
+    fi
+
     ${cargoUpdateHook}
 
-    cargo vendor $name | cargo-vendor-normalise > $CARGO_CONFIG
+    cargo vendor $name --respect-source-config | cargo-vendor-normalise > $CARGO_CONFIG
 
+    # Create an empty vendor directory when there is no dependency to vendor
+    mkdir -p $name
     # Add the Cargo.lock to allow hash invalidation
     cp Cargo.lock.orig $name/Cargo.lock
 
@@ -81,7 +92,7 @@ in stdenv.mkDerivation ({
 
   inherit (hash_) outputHashAlgo outputHash;
 
-  impureEnvVars = lib.fetchers.proxyImpureEnvVars;
+  impureEnvVars = lib.fetchers.proxyImpureEnvVars ++ [ "NIX_CRATES_INDEX" ];
 } // (builtins.removeAttrs args [
   "name" "sha256" "cargoUpdateHook" "nativeBuildInputs"
 ]))
diff --git a/pkgs/build-support/rust/fetchcrate.nix b/pkgs/build-support/rust/fetchcrate.nix
index 4e6c38b032c..53219b2d062 100644
--- a/pkgs/build-support/rust/fetchcrate.nix
+++ b/pkgs/build-support/rust/fetchcrate.nix
@@ -1,38 +1,15 @@
-{ lib, fetchurl, unzip }:
+{ lib, fetchzip }:
 
 { crateName ? args.pname
 , pname ? null
 , version
-, sha256
-, ... } @ args:
+, ...
+} @ args:
 
 assert pname == null || pname == crateName;
 
-lib.overrideDerivation (fetchurl ({
-
+fetchzip ({
   name = "${crateName}-${version}.tar.gz";
   url = "https://crates.io/api/v1/crates/${crateName}/${version}/download";
-  recursiveHash = true;
-
-  downloadToTemp = true;
-
-  postFetch =
-    ''
-      export PATH=${unzip}/bin:$PATH
-
-      unpackDir="$TMPDIR/unpack"
-      mkdir "$unpackDir"
-      cd "$unpackDir"
-
-      renamed="$TMPDIR/${crateName}-${version}.tar.gz"
-      mv "$downloadedFile" "$renamed"
-      unpackFile "$renamed"
-      fn=$(cd "$unpackDir" && echo *)
-      if [ -f "$unpackDir/$fn" ]; then
-        mkdir $out
-      fi
-      mv "$unpackDir/$fn" "$out"
-    '';
-} // removeAttrs args [ "crateName" "pname" "version" ]))
-# Hackety-hack: we actually need unzip hooks, too
-(x: {nativeBuildInputs = x.nativeBuildInputs++ [unzip];})
+  extension = "tar.gz";
+} // removeAttrs args [ "crateName" "pname" "version" ])
diff --git a/pkgs/build-support/rust/hooks/cargo-nextest-hook.sh b/pkgs/build-support/rust/hooks/cargo-nextest-hook.sh
new file mode 100644
index 00000000000..de85683ead2
--- /dev/null
+++ b/pkgs/build-support/rust/hooks/cargo-nextest-hook.sh
@@ -0,0 +1,54 @@
+declare -a checkFlags
+declare -a cargoTestFlags
+
+cargoNextestHook() {
+    echo "Executing cargoNextestHook"
+
+    runHook preCheck
+
+    if [[ -n "${buildAndTestSubdir-}" ]]; then
+        pushd "${buildAndTestSubdir}"
+    fi
+
+    if [[ -z ${dontUseCargoParallelTests-} ]]; then
+        threads=$NIX_BUILD_CORES
+    else
+        threads=1
+    fi
+
+    if [ "${cargoCheckType}" != "debug" ]; then
+        cargoCheckProfileFlag="--${cargoCheckType}"
+    fi
+
+    if [ -n "${cargoCheckNoDefaultFeatures-}" ]; then
+        cargoCheckNoDefaultFeaturesFlag=--no-default-features
+    fi
+
+    if [ -n "${cargoCheckFeatures-}" ]; then
+        cargoCheckFeaturesFlag="--features=${cargoCheckFeatures// /,}"
+    fi
+
+    argstr="${cargoCheckProfileFlag} ${cargoCheckNoDefaultFeaturesFlag} ${cargoCheckFeaturesFlag}
+        --target @rustTargetPlatformSpec@ --frozen ${cargoTestFlags}"
+
+    (
+        set -x
+        cargo nextest run \
+              -j ${threads} \
+              ${argstr} -- \
+              ${checkFlags} \
+              ${checkFlagsArray+"${checkFlagsArray[@]}"}
+    )
+
+    if [[ -n "${buildAndTestSubdir-}" ]]; then
+        popd
+    fi
+
+    echo "Finished cargoNextestHook"
+
+    runHook postCheck
+}
+
+if [ -z "${dontCargoCheck-}" ] && [ -z "${checkPhase-}" ]; then
+  checkPhase=cargoNextestHook
+fi
diff --git a/pkgs/build-support/rust/hooks/cargo-setup-hook.sh b/pkgs/build-support/rust/hooks/cargo-setup-hook.sh
index 842e66b5170..aeddeef29d9 100644
--- a/pkgs/build-support/rust/hooks/cargo-setup-hook.sh
+++ b/pkgs/build-support/rust/hooks/cargo-setup-hook.sh
@@ -7,27 +7,27 @@ cargoSetupPostUnpackHook() {
     # this for us automatically.
     if [ -z $cargoVendorDir ]; then
         unpackFile "$cargoDeps"
-        export cargoDepsCopy=$(stripHash $cargoDeps)
+        export cargoDepsCopy="$(realpath "$(stripHash $cargoDeps)")"
     else
-      cargoDepsCopy="$sourceRoot/${cargoRoot:+$cargoRoot/}${cargoVendorDir}"
+        cargoDepsCopy="$(realpath "$(pwd)/$sourceRoot/${cargoRoot:+$cargoRoot/}${cargoVendorDir}")"
     fi
 
     if [ ! -d .cargo ]; then
         mkdir .cargo
     fi
 
-    config="$(pwd)/$cargoDepsCopy/.cargo/config";
+    config="$cargoDepsCopy/.cargo/config";
     if [[ ! -e $config ]]; then
       config=@defaultConfig@
     fi;
 
     tmp_config=$(mktemp)
     substitute $config $tmp_config \
-      --subst-var-by vendor "$(pwd)/$cargoDepsCopy"
+      --subst-var-by vendor "$cargoDepsCopy"
     cat ${tmp_config} >> .cargo/config
 
     cat >> .cargo/config <<'EOF'
-    @rustTarget@
+    @cargoConfig@
 EOF
 
     echo "Finished cargoSetupPostUnpackHook"
@@ -39,8 +39,8 @@ EOF
 cargoSetupPostPatchHook() {
     echo "Executing cargoSetupPostPatchHook"
 
-    cargoDepsLockfile="$NIX_BUILD_TOP/$cargoDepsCopy/Cargo.lock"
-    srcLockfile="$NIX_BUILD_TOP/$sourceRoot/${cargoRoot:+$cargoRoot/}/Cargo.lock"
+    cargoDepsLockfile="$cargoDepsCopy/Cargo.lock"
+    srcLockfile="$(pwd)/${cargoRoot:+$cargoRoot/}Cargo.lock"
 
     echo "Validating consistency between $srcLockfile and $cargoDepsLockfile"
     if ! @diff@ $srcLockfile $cargoDepsLockfile; then
diff --git a/pkgs/build-support/rust/hooks/default.nix b/pkgs/build-support/rust/hooks/default.nix
index 652b074c302..b9bbac37198 100644
--- a/pkgs/build-support/rust/hooks/default.nix
+++ b/pkgs/build-support/rust/hooks/default.nix
@@ -1,8 +1,8 @@
 { buildPackages
 , callPackage
 , cargo
+, cargo-nextest
 , clang
-, diffutils
 , lib
 , makeSetupHook
 , maturin
@@ -56,6 +56,15 @@ in {
       };
     } ./cargo-install-hook.sh) {};
 
+  cargoNextestHook = callPackage ({ }:
+    makeSetupHook {
+      name = "cargo-nextest-hook.sh";
+      deps = [ cargo cargo-nextest ];
+      substitutions = {
+        inherit rustTargetPlatformSpec;
+      };
+    } ./cargo-nextest-hook.sh) {};
+
   cargoSetupHook = callPackage ({ }:
     makeSetupHook {
       name = "cargo-setup-hook.sh";
@@ -65,18 +74,39 @@ in {
 
         # Specify the stdenv's `diff` by abspath to ensure that the user's build
         # inputs do not cause us to find the wrong `diff`.
-        # The `.nativeDrv` stanza works like nativeBuildInputs and ensures cross-compiling has the right version available.
-        diff = "${diffutils.nativeDrv or diffutils}/bin/diff";
+        diff = "${lib.getBin buildPackages.diffutils}/bin/diff";
 
-        # Target platform
-        rustTarget = ''
-          [target."${rust.toRustTarget stdenv.buildPlatform}"]
+        # We want to specify the correct crt-static flag for both
+        # the build and host platforms. This is important when the wanted
+        # value for crt-static does not match the defaults in the rustc target,
+        # like for pkgsMusl or pkgsCross.musl64; Upstream rustc still assumes
+        # that musl = static[1].
+        #
+        # By default, Cargo doesn't apply RUSTFLAGS when building build.rs
+        # if --target is passed, so the only good way to set crt-static for
+        # build.rs files is to use the unstable -Zhost-config Cargo feature.
+        # This allows us to specify flags that should be passed to rustc
+        # when building for the build platform. We also need to use
+        # -Ztarget-applies-to-host, because using -Zhost-config requires it.
+        #
+        # When doing this, we also have to specify the linker, or cargo
+        # won't pass a -C linker= argument to rustc.  This will make rustc
+        # try to use its default value of "cc", which won't be available
+        # when cross-compiling.
+        #
+        # [1]: https://github.com/rust-lang/compiler-team/issues/422
+        cargoConfig = ''
+          [host]
           "linker" = "${ccForBuild}"
-          ${lib.optionalString (stdenv.buildPlatform.config != stdenv.hostPlatform.config) ''
-            [target."${shortTarget}"]
-            "linker" = "${ccForHost}"
-          ''}
+          "rustflags" = [ "-C", "target-feature=${if stdenv.buildPlatform.isStatic then "+" else "-"}crt-static" ]
+
+          [target."${shortTarget}"]
+          "linker" = "${ccForHost}"
           "rustflags" = [ "-C", "target-feature=${if stdenv.hostPlatform.isStatic then "+" else "-"}crt-static" ]
+
+          [unstable]
+          host-config = true
+          target-applies-to-host = true
         '';
       };
     } ./cargo-setup-hook.sh) {};
diff --git a/pkgs/build-support/rust/lib/default.nix b/pkgs/build-support/rust/lib/default.nix
index 2be0c256787..77397f9b722 100644
--- a/pkgs/build-support/rust/lib/default.nix
+++ b/pkgs/build-support/rust/lib/default.nix
@@ -15,6 +15,21 @@ rec {
     else if platform.isDarwin then "macos"
     else platform.parsed.kernel.name;
 
+  # https://doc.rust-lang.org/reference/conditional-compilation.html#target_family
+  toTargetFamily = platform:
+    if platform ? rustc.platform.target-family
+    then
+      (
+        # Since https://github.com/rust-lang/rust/pull/84072
+        # `target-family` is a list instead of single value.
+        let
+          f = platform.rustc.platform.target-family;
+        in
+        if builtins.isList f then f else [ f ]
+      )
+    else lib.optional platform.isUnix "unix"
+      ++ lib.optional platform.isWindows "windows";
+
   # Returns the name of the rust target, even if it is custom. Adjustments are
   # because rust has slightly different naming conventions than we do.
   toRustTarget = platform: let
@@ -38,4 +53,9 @@ rec {
     if platform ? rustc.platform
     then builtins.toFile (toRustTarget platform + ".json") (builtins.toJSON platform.rustc.platform)
     else toRustTarget platform;
+
+  # Returns true if the target is no_std
+  # https://github.com/rust-lang/rust/blob/2e44c17c12cec45b6a682b1e53a04ac5b5fcc9d2/src/bootstrap/config.rs#L415-L421
+  IsNoStdTarget = platform: let rustTarget = toRustTarget platform; in
+    builtins.any (t: lib.hasInfix t rustTarget) ["-none" "nvptx" "switch" "-uefi"];
 }
diff --git a/pkgs/build-support/setup-hooks/auto-patchelf.py b/pkgs/build-support/setup-hooks/auto-patchelf.py
index 861d772698d..efb65a80996 100644
--- a/pkgs/build-support/setup-hooks/auto-patchelf.py
+++ b/pkgs/build-support/setup-hooks/auto-patchelf.py
@@ -5,6 +5,7 @@ import os
 import pprint
 import subprocess
 import sys
+from fnmatch import fnmatch
 from collections import defaultdict
 from contextlib import contextmanager
 from dataclasses import dataclass
@@ -265,8 +266,10 @@ def auto_patchelf(
     print(f"auto-patchelf: {len(missing)} dependencies could not be satisfied")
     failure = False
     for dep in missing:
-        if dep.name.name in ignore_missing or "*" in ignore_missing:
-            print(f"warn: auto-patchelf ignoring missing {dep.name} wanted by {dep.file}")
+        for pattern in ignore_missing:
+            if fnmatch(dep.name.name, pattern):
+                print(f"warn: auto-patchelf ignoring missing {dep.name} wanted by {dep.file}")
+                break
         else:
             print(f"error: auto-patchelf could not satisfy dependency {dep.name} wanted by {dep.file}")
             failure = True
diff --git a/pkgs/build-support/setup-hooks/auto-patchelf.sh b/pkgs/build-support/setup-hooks/auto-patchelf.sh
index b56f9ce2dbf..7f5ff146e30 100644
--- a/pkgs/build-support/setup-hooks/auto-patchelf.sh
+++ b/pkgs/build-support/setup-hooks/auto-patchelf.sh
@@ -53,7 +53,7 @@ autoPatchelf() {
         esac
     done
 
-    local ignoreMissingDepsArray=($autoPatchelfIgnoreMissingDeps)
+    readarray -td' ' ignoreMissingDepsArray < <(echo -n "$autoPatchelfIgnoreMissingDeps")
     if [ "$autoPatchelfIgnoreMissingDeps" == "1" ]; then
         echo "autoPatchelf: WARNING: setting 'autoPatchelfIgnoreMissingDeps" \
              "= true;' is deprecated and will be removed in a future release." \
diff --git a/pkgs/build-support/setup-hooks/make-binary-wrapper/default.nix b/pkgs/build-support/setup-hooks/make-binary-wrapper/default.nix
index 9f52a05f61c..c9b03b75cd0 100644
--- a/pkgs/build-support/setup-hooks/make-binary-wrapper/default.nix
+++ b/pkgs/build-support/setup-hooks/make-binary-wrapper/default.nix
@@ -16,12 +16,14 @@ makeSetupHook {
 
   substitutions = {
     cc = "${cc}/bin/${cc.targetPrefix}cc ${lib.escapeShellArgs (map (s: "-fsanitize=${s}") sanitizers)}";
+  };
 
+  passthru = {
     # Extract the function call used to create a binary wrapper from its embedded docstring
-    passthru.extractCmd = writeShellScript "extract-binary-wrapper-cmd" ''
+    extractCmd = writeShellScript "extract-binary-wrapper-cmd" ''
       strings -dw "$1" | sed -n '/^makeCWrapper/,/^$/ p'
     '';
 
-    passthru.tests = tests.makeBinaryWrapper;
+    tests = tests.makeBinaryWrapper;
   };
 } ./make-binary-wrapper.sh
diff --git a/pkgs/build-support/setup-hooks/multiple-outputs.sh b/pkgs/build-support/setup-hooks/multiple-outputs.sh
index bfa47e3b20e..881cf6c90f4 100644
--- a/pkgs/build-support/setup-hooks/multiple-outputs.sh
+++ b/pkgs/build-support/setup-hooks/multiple-outputs.sh
@@ -88,7 +88,7 @@ NIX_NO_SELF_RPATH=1
 
 
 # Move subpaths that match pattern $1 from under any output/ to the $2 output/
-# Beware: only globbing patterns are accepted, e.g.: * ? {foo,bar}
+# Beware: only globbing patterns are accepted, e.g.: * ? [abc]
 # A special target "REMOVE" is allowed: moveToOutput foo REMOVE
 moveToOutput() {
     local patt="$1"
diff --git a/pkgs/build-support/setup-hooks/patch-ppd-files/default.nix b/pkgs/build-support/setup-hooks/patch-ppd-files/default.nix
new file mode 100644
index 00000000000..b3c7b19f373
--- /dev/null
+++ b/pkgs/build-support/setup-hooks/patch-ppd-files/default.nix
@@ -0,0 +1,25 @@
+{ lib
+, makeSetupHook
+, which
+, callPackage
+}:
+
+let
+  patchPpdFilesHook = makeSetupHook
+    {
+      name = "patch-ppd-files";
+      substitutions.which = lib.attrsets.getBin which;
+      substitutions.awkscript = ./patch-ppd-lines.awk;
+    }
+    ./patch-ppd-hook.sh;
+in
+
+patchPpdFilesHook.overrideAttrs (
+  lib.trivial.flip
+  lib.attrsets.recursiveUpdate
+  {
+    passthru.tests.test = callPackage ./test.nix {};
+    meta.description = "setup hook to patch executable paths in ppd files";
+    meta.maintainers = [ lib.maintainers.yarny ];
+  }
+)
diff --git a/pkgs/build-support/setup-hooks/patch-ppd-files/patch-ppd-hook.sh b/pkgs/build-support/setup-hooks/patch-ppd-files/patch-ppd-hook.sh
new file mode 100644
index 00000000000..a450ecd7f96
--- /dev/null
+++ b/pkgs/build-support/setup-hooks/patch-ppd-files/patch-ppd-hook.sh
@@ -0,0 +1,183 @@
+fixupOutputHooks+=(_patchPpdFileCommands4fixupOutputHooks)
+
+
+
+# Install a hook for the `fixupPhase`:
+# If the variable `ppdFileCommands` contains a list of
+# executable names, the hook calls `patchPpdFileCommands`
+# on each output's `/share/cups/model` and `/share/ppds`
+# directories in order to replace calls to those executables.
+
+_patchPpdFileCommands4fixupOutputHooks () {
+    [[ -n $ppdFileCommands ]]  ||  return 0
+    if [[ -d $prefix/share/cups/model ]]; then
+        patchPpdFileCommands "$prefix/share/cups/model" $ppdFileCommands
+    fi
+    if [[ -d $prefix/share/ppds ]]; then
+        patchPpdFileCommands "$prefix/share/ppds" $ppdFileCommands
+    fi
+}
+
+
+
+# patchPpdFileCommands PPD-ROOT PROGNAME...
+#
+# Look for ppd files in the directory PPD-ROOT.
+# Descend into subdirectories, even if they are symlinks.
+# However, ignore ppd files that don't belong to the same
+# prefix ($NIX_STORE/$package_name) as PPD-ROOT-DIR does,
+# to avoid stepping into other package's directories.
+# ppd files may be gzipped; if the are,
+# uncompress them, later recompress them.
+# Skip symlinks to ppd files.
+# PPD-ROOT may also be a single ppd file.
+#
+# Look for the PROGNAME executable in outputs and `buildInputs`,
+# then look for PROGNAME invocations in the ppd files,
+# without path or with common paths like `/usr/bin/$PROGNAME`.
+# Replace those invocations with an absolute path to the
+# corresponding executable from the outputs or `buildInputs`.
+# Executables are searched where CUPS would search them,
+# i.e., in `/bin` and `/lib/cups/filter`.
+#
+# As soon as an executable's path is replaced as
+# described above, the package containing the binary
+# is added to the list of propagated build inputs.
+# This ensures the executable's package is still
+# recognized as runtime dependency of the ppd file
+# even if the ppd file is compressed lateron.
+#
+# PROGNAME may not contain spaces or tabs.
+# The function will also likely fail or produce
+# broken results if PROGNAME contains characters that
+# require shell or regex escaping (e.g. a backslash).
+
+patchPpdFileCommands () {
+
+    local bin binnew binold binoldgrep cupspath path ppdroot ppdrootprefix
+
+    # we will store some temporary data here
+    pushd "$(mktemp -d --tmpdir patch-ppd-file-commands.XXXX)"
+
+    # remember the ppd root path
+    [[ "$1" == $NIX_STORE/* ]]  # ensure it's a store directory
+    ppdroot=$1
+    shift  # now "$@" is the list of binaries
+    ppdrootprefix=${ppdroot%"/${ppdroot#"$NIX_STORE"/*/}"}
+
+    # create `cupspath` (where we should look for binaries),
+    # with these priorities
+    # * outputs of current build before buildInputs
+    # * `/lib/cups/filter' before `/bin`
+    # * add HOST_PATH at end, so we don't miss anything
+    for path in $outputs; do
+        addToSearchPath cupspath "${!path}/lib/cups/filter"
+        addToSearchPath cupspath "${!path}/bin"
+    done
+    for path in ${pkgsHostTarget+"${pkgsHostTarget[@]}"}; do
+        addToSearchPath cupspath "$path/lib/cups/filter"
+        addToSearchPath cupspath "$path/bin"
+    done
+    while read -r -d : path; do
+        addToSearchPath cupspath "$path"
+    done  <<< "${HOST_PATH:+"${HOST_PATH}:"}"
+
+    # create list of compressed ppd files
+    # so we can recompress them later
+    find -L "$ppdroot" -type f -iname '*.ppd.gz' '!' -xtype l -print0  > gzipped
+
+    # decompress gzipped ppd files
+    echo "patchPpdFileCommands: decompressing $(grep -cz '^' < gzipped) gzipped ppd file(s) in $ppdroot"
+    xargs -0r -n 64 -P "$NIX_BUILD_CORES"  gunzip  < gzipped
+
+    # create list of all ppd files to be checked
+    find -L "$ppdroot" -type f -iname '*.ppd' '!' -xtype l -print0  > ppds
+
+    for bin in "$@"; do
+
+        # discover new path
+        binnew=$(PATH=$cupspath '@which@/bin/which' "$bin")
+        echo "patchPpdFileCommands: located binary $binnew"
+
+        # for each binary, we look for the name itself, but
+        # also for a couple of common paths that might be used
+        for binold in {/usr,}/{lib/cups/filter,sbin,bin}/"$bin" "$bin"; do
+
+            # escape regex characters in the old command string
+            binoldgrep=$(sed 's,[]$.*[\^],\\&,g' <<< "$binold")
+            # ...and surround old command with some regex
+            # that singles out shell command invocations
+            # to avoid replacing other strings that might contain the
+            # command name by accident (like "perl" in "perl-script")
+            binoldgrep='\(^\|[;&| '$'\t''"`(]\)'"$binoldgrep"'\($\|[);&| '$'\t''"`<>]\)'
+            # this string is used to *quickly* filter out
+            # unaffected files before the (slower) awk script runs;
+            # note that a similar regex is build in the awk script;
+            # if `binoldgrep` is changed, the awk script should also be checked
+
+            # create list of likely affected files
+            # (might yield exit status != 0 if there are no matches)
+            xargs -0r  grep -lZ "$binoldgrep"  < ppds  > ppds-to-patch  ||  true
+
+            echo "patchPpdFileCommands: $(grep -cz '^' < ppds-to-patch) ppd file(s) contain $binold"
+
+            # actually patch affected ppd files with awk;
+            # this takes some time but can be parallelized;
+            # speed up with LC_ALL=C, https://stackoverflow.com/a/33850386
+            LC_ALL=C xargs -0r -n 64 -P "$NIX_BUILD_CORES"  \
+              awk -i inplace -v old="${binold//\\/\\\\}" -v new="${binnew//\\/\\\\}" -f "@awkscript@"  \
+              < ppds-to-patch
+
+        done
+
+        # create list of affected files
+        xargs -0r  grep -lZF "$binnew"  < ppds  > patched-ppds  ||  true
+
+        echo "patchPpdFileCommands: $(grep -cz '^' < patched-ppds) ppd file(s) patched with $binnew"
+
+        # if the new command is contained in a file,
+        # remember the new path so we can add it to
+        # the list of propagated dependencies later
+        if [[ -s patched-ppds ]]; then
+            printf '%s\0' "${binnew%"/${binnew#"${NIX_STORE}"/*/}"}"  >> dependencies
+        fi
+
+    done
+
+    # recompress ppd files that have been decompressed before
+    echo "patchPpdFileCommands: recompressing $(grep -cz '^' < gzipped) gzipped ppd file(s)"
+    # we can't just hand over the paths of the uncompressed files
+    # to gzip as it would add the lower-cased extension ".gz"
+    # even for files where the original was named ".GZ"
+    xargs -0r -n 1 -P "$NIX_BUILD_CORES"  \
+      "$SHELL" -c 'gzip -9nS ".${0##*.}" "${0%.*}"'  \
+      < gzipped
+
+    # enlist dependencies for propagation;
+    # this is needed in case ppd files are compressed later
+    # (Nix won't find dependency paths in compressed files)
+    if [[ -s dependencies ]]; then
+
+        # weed out duplicates from the dependency list first
+        sort -zu dependencies  > sorted-dependencies
+
+        mkdir -p "$ppdrootprefix/nix-support"
+        while IFS= read -r -d '' path; do
+            printWords "$path" >> "$ppdrootprefix/nix-support/propagated-build-inputs"
+            # stdenv writes it's own `propagated-build-inputs`,
+            # based on the variable `propagatedBuildInputs`,
+            # but only to one output (`outputDev`).
+            # So we also add our dependencies to that variable.
+            # If our file survives as written above, great!
+            # If stdenv overwrits it,
+            # our dependencies will still be added to the file.
+            # The end result might contain too many
+            # propagated dependencies for multi-output packages,
+            # but never a broken package.
+            propagatedBuildInputs+=("$path")
+        done  < sorted-dependencies
+    fi
+
+    popd
+
+}
diff --git a/pkgs/build-support/setup-hooks/patch-ppd-files/patch-ppd-lines.awk b/pkgs/build-support/setup-hooks/patch-ppd-files/patch-ppd-lines.awk
new file mode 100644
index 00000000000..ddb9171fff3
--- /dev/null
+++ b/pkgs/build-support/setup-hooks/patch-ppd-files/patch-ppd-lines.awk
@@ -0,0 +1,50 @@
+BEGIN {
+
+  # ppd file keys are separated from their values by a colon,
+  # but "options" may reside between the key name and the colon;
+  # options are separated from the key by spaces
+  # (we also permit tabs to be on the safe side)
+  FS = "[: \t]";
+
+  # escape regex characters in the old and new command strings
+  gsub(/[]\\.^$(){}|*+?[]/, "\\\\&", old);
+  gsub(/\\/, "\\\\&", new);
+  # ...and surround old command with some regex
+  # that singles out shell command invocations
+  # to avoid replacing other strings that might contain the
+  # command name by accident (like "perl" in "perl-script")
+  new = "\\1" new "\\2";
+  old = "(^|[;&| \\t\"`(])" old "($|[);&| \\t\"`<>])";
+  # note that a similar regex is build in the shell script to
+  # filter out unaffected files before this awk script is called;
+  # if the regex here is changed, the shell script should also be checked
+
+  # list of PPD keys that contain executable names or scripts, see
+  # https://refspecs.linuxfoundation.org/LSB_4.0.0/LSB-Printing/LSB-Printing/ppdext.html
+  # https://www.cups.org/doc/spec-ppd.html
+  cmds["*APAutoSetupTool"] = "";
+  cmds["*APPrinterLowInkTool"] = "";
+  cmds["*FoomaticRIPCommandLine"] = "";
+  cmds["*FoomaticRIPPostPipe"] = "";
+  cmds["*cupsFilter"] = "";
+  cmds["*cupsFilter2"] = "";
+  cmds["*cupsPreFilter"] = "";
+
+}
+
+# since comments always start with "*%",
+# this mechanism also properly recognizes (and ignores) them
+
+{
+
+  # if the current line starts a new key,
+  # check if it is a command-containing key;
+  # also reset the `isCmd` flag if a new file begins
+  if ($0 ~ /^\*/ || FNR == 1)  { isCmd = ($1 in cmds) }
+
+  # replace commands if the current keys might contain commands
+  if (isCmd)  { $0 = gensub(old, new, "g") }
+
+  print
+
+}
diff --git a/pkgs/build-support/setup-hooks/patch-ppd-files/test.nix b/pkgs/build-support/setup-hooks/patch-ppd-files/test.nix
new file mode 100644
index 00000000000..4f2996b2351
--- /dev/null
+++ b/pkgs/build-support/setup-hooks/patch-ppd-files/test.nix
@@ -0,0 +1,40 @@
+{ substituteAll
+, diffutils
+, stdenv
+, patchPpdFilesHook
+}:
+
+let
+  input = substituteAll {
+    src = ./test.ppd;
+    keep = "cmp";
+    patch = "cmp";
+    pathkeep = "/bin/cmp";
+    pathpatch = "/bin/cmp";
+  };
+
+  output = substituteAll {
+    src = ./test.ppd;
+    keep = "cmp";
+    patch = "${diffutils}/bin/cmp";
+    pathkeep = "/bin/cmp";
+    pathpatch = "${diffutils}/bin/cmp";
+  };
+in
+
+stdenv.mkDerivation {
+  name = "${patchPpdFilesHook.name}-test";
+  buildInputs = [ diffutils ];
+  nativeBuildInputs = [ diffutils patchPpdFilesHook ];
+  dontUnpack = true;
+  dontInstall = true;
+  ppdFileCommands = [ "cmp" ];
+  preFixup = ''
+    install -D "${input}" "${placeholder "out"}/share/cups/model/test.ppd"
+    install -D "${input}" "${placeholder "out"}/share/ppds/test.ppd"
+  '';
+  postFixup = ''
+    diff --color --report-identical-files "${output}" "${placeholder "out"}/share/cups/model/test.ppd"
+    diff --color --report-identical-files "${output}" "${placeholder "out"}/share/ppds/test.ppd"
+  '';
+}
diff --git a/pkgs/build-support/setup-hooks/patch-ppd-files/test.ppd b/pkgs/build-support/setup-hooks/patch-ppd-files/test.ppd
new file mode 100644
index 00000000000..d0ca11ccfe6
--- /dev/null
+++ b/pkgs/build-support/setup-hooks/patch-ppd-files/test.ppd
@@ -0,0 +1,22 @@
+*% This comment: might look like a command @keep@
+*% but it should be left untouched
+*SomeKey: do not replace this @keep@
+*APAutoSetupTool: do replace this @patch@
+*FoomaticRIPCommandLine: "patch also  @patch@
+in a multi-line command @patch@
+and another line @patch@
+*SomeKey: "stop patching on new non-command key @keep@
+and remember the key in the next line @keep@"
+*cupsFilter option: recognize keys with options @patch@
+*cupsFilter : handle strange spacing;@patch@
+*cupsFilter	: handle tabulator	@patch@
+*cupsFilter: patch common paths @pathpatch@
+*cupsFilter: patch quoted commands "@patch@"
+*cupsFilter: patch commands in subshell (@patch@)
+*cupsFilter: patch commands in subshell `@pathpatch@`
+*cupsFilter: keep uncommon paths /fancy/@pathkeep@
+*cupsFilter: keep entangled commands-@keep@
+*cupsFilter: keep entangled commands\@keep@
+*cupsFilter: keep entangled commands @keep@()
+*cupsFilter: keep entangled commands @pathkeep@-cmd
+*%cupsFilter: This comment should also be left as is @pathkeep@
diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/default.nix b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/default.nix
new file mode 100644
index 00000000000..f16644528f0
--- /dev/null
+++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/default.nix
@@ -0,0 +1,60 @@
+{ lib
+, callPackage
+, makeSetupHook
+, gnused
+}:
+let
+  tests = import ./test { inherit callPackage; };
+in
+{
+  patchRcPathBash = makeSetupHook
+    {
+      name = "patch-rc-path-bash";
+      meta = with lib; {
+        description = "Setup-hook to inject source-time PATH prefix to a Bash/Ksh/Zsh script";
+        maintainers = with maintainers; [ ShamrockLee ];
+      };
+      passthru.tests = {
+        inherit (tests) test-bash;
+      };
+    } ./patch-rc-path-bash.sh;
+  patchRcPathCsh = makeSetupHook
+    {
+      name = "patch-rc-path-csh";
+      substitutions = {
+        sed = "${gnused}/bin/sed";
+      };
+      meta = with lib; {
+        description = "Setup-hook to inject source-time PATH prefix to a Csh script";
+        maintainers = with maintainers; [ ShamrockLee ];
+      };
+      passthru.tests = {
+        inherit (tests) test-csh;
+      };
+    } ./patch-rc-path-csh.sh;
+  patchRcPathFish = makeSetupHook
+    {
+      name = "patch-rc-path-fish";
+      meta = with lib; {
+        description = "Setup-hook to inject source-time PATH prefix to a Fish script";
+        maintainers = with maintainers; [ ShamrockLee ];
+      };
+      passthru.tests = {
+        inherit (tests) test-fish;
+      };
+    } ./patch-rc-path-fish.sh;
+  patchRcPathPosix = makeSetupHook
+    {
+      name = "patch-rc-path-posix";
+      substitutions = {
+        sed = "${gnused}/bin/sed";
+      };
+      meta = with lib; {
+        description = "Setup-hook to inject source-time PATH prefix to a POSIX shell script";
+        maintainers = with maintainers; [ ShamrockLee ];
+      };
+      passthru.tests = {
+        inherit (tests) test-posix;
+      };
+    } ./patch-rc-path-posix.sh;
+}
diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-bash.sh b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-bash.sh
new file mode 100644
index 00000000000..b98b983861b
--- /dev/null
+++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-bash.sh
@@ -0,0 +1,50 @@
+patchRcPathBash(){
+    local FILE_TO_PATCH="$1"
+    local SOURCETIME_PATH="$2"
+    local FILE_TO_WORK_ON="$(mktemp "$(basename "$FILE_TO_PATCH").XXXXXX.tmp")"
+    cat <<EOF >> "$FILE_TO_WORK_ON"
+# Lines to add to PATH the source-time utilities for Nixpkgs packaging
+if [[ -n "\${NIXPKGS_SOURCETIME_PATH-}" ]]; then
+    NIXPKGS_SOURCETIME_PATH_OLD="\$NIXPKGS_SOURCETIME_PATH;\${NIXPKGS_SOURCETIME_PATH_OLD-}"
+fi
+NIXPKGS_SOURCETIME_PATH="$SOURCETIME_PATH"
+if [[ -n "\$PATH" ]]; then
+    PATH="\$NIXPKGS_SOURCETIME_PATH:\$PATH"
+else
+    PATH="\$NIXPKGS_SOURCETIME_PATH"
+fi
+export PATH
+# End of lines to add to PATH source-time utilities for Nixpkgs packaging
+EOF
+    cat "$FILE_TO_PATCH" >> "$FILE_TO_WORK_ON"
+    cat <<EOF >> "$FILE_TO_WORK_ON"
+# Lines to clean up inside PATH the source-time utilities for Nixpkgs packaging
+if [[ -n "\${PATH-}" ]]; then
+    # Remove the inserted section
+    PATH="\${PATH/\$NIXPKGS_SOURCETIME_PATH}"
+    # Remove the duplicated colons
+    PATH="\${PATH//::/:}"
+    # Remove the prefixing colon
+    if [[ -n "\$PATH" && "\${PATH:0:1}" == ":" ]]; then
+        PATH="\${PATH:1}"
+    fi
+    # Remove the trailing colon
+    if [[ -n "\$PATH" && "\${PATH:\${#PATH}-1}" == ":" ]]; then
+        PATH="\${PATH::}"
+    fi
+    export PATH
+fi
+if [[ -n "\${NIXPKGS_SOURCETIME_PATH_OLD-}" ]]; then
+    IFS="" read -r -d ";" NIXPKGS_SOURCETIME_PATH <<< "\$NIXPKGS_SOURCETIME_PATH_OLD"
+    NIXPKGS_SOURCETIME_PATH_OLD="\${NIXPKGS_SOURCETIME_PATH_OLD:\${#NIXPKGS_SOURCETIME_PATH}+1}"
+else
+    unset NIXPKGS_SOURCETIME_PATH
+fi
+if [[ -z "\${NIXPKGS_SOURCETIME_PATH_OLD-}" ]]; then
+    unset NIXPKGS_SOURCETIME_PATH_OLD
+fi
+# End of lines to clean up inside PATH the source-time utilities for Nixpkgs packaging
+EOF
+    cat "$FILE_TO_WORK_ON" > "$FILE_TO_PATCH"
+    rm "$FILE_TO_WORK_ON"
+}
diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-csh.sh b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-csh.sh
new file mode 100644
index 00000000000..5e2367003ad
--- /dev/null
+++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-csh.sh
@@ -0,0 +1,57 @@
+patchRcPathCsh(){
+    local FILE_TO_PATCH="$1"
+    local SOURCETIME_PATH="$2"
+    local FILE_TO_WORK_ON="$(mktemp "$(basename "$FILE_TO_PATCH").XXXXXX.tmp")"
+    cat <<EOF >> "$FILE_TO_WORK_ON"
+# Lines to add to PATH the source-time utilities for Nixpkgs packaging
+if (\$?NIXPKGS_SOURCETIME_PATH) then
+    if ("\$NIXPKGS_SOURCETIME_PATH" != "") then
+        if (\$?NIXPKGS_SOURCETIME_PATH_OLD) then
+            if ("\$NIXPKGS_SOURCETIME_PATH_OLD" != "")
+                set NIXPKGS_SOURCETIME_PATH_OLD = (\$NIXPKGS_SOURCETIME_PATH \$NIXPKGS_SOURCETIME_PATH_OLD)
+            else
+                set NIXPKGS_SOURCETIME_PATH_OLD = \$NIXPKGS_SOURCETIME_PATH
+            endif
+        else
+            set NIXPKGS_SOURCETIME_PATH_OLD = \$NIXPKGS_SOURCETIME_PATH
+        endif
+    endif
+endif
+set NIXPKGS_SOURCETIME_PATH = "$SOURCETIME_PATH"
+if (! \$?PATH) then
+    setenv PATH ""
+endif
+if ("\$PATH" != "") then
+    setenv PATH "\${NIXPKGS_SOURCETIME_PATH}:\$PATH"
+else
+    setenv PATH "\$NIXPKGS_SOURCETIME_PATH"
+endif
+# End of lines to add to PATH source-time utilities for Nixpkgs packaging
+EOF
+    cat "$FILE_TO_PATCH" >> "$FILE_TO_WORK_ON"
+    cat <<EOF >> "$FILE_TO_WORK_ON"
+# Lines to clean up inside PATH the source-time utilities for Nixpkgs packaging
+if (\$?PATH) then
+    if ("\$PATH" != "") then
+        # Remove the inserted section, the duplicated colons, and the leading and trailing colon
+        setenv PATH \`echo "\$PATH" | @sed@ "s#\${NIXPKGS_SOURCETIME_PATH}##" | @sed@ "s#::#:#g" | @sed@ "s#^:##" | @sed@ 's#:\$##'\`
+    endif
+endif
+if (\$?NIXPKGS_SOURCETIME_PATH_OLD) then
+    if ("\$NIXPKGS_SOURCETIME_PATH_OLD" != "") then
+        set NIXPKGS_SOURCETIME_PATH = \$NIXPKGS_SOURCETIME_PATH_OLD[1]
+        set NIXPKGS_SOURCETIME_PATH_OLD = \$NIXPKGS_SOURCETIME_PATH_OLD[2-]
+    else
+        unset NIXPKGS_SOURCETIME_PATH
+    endif
+    if (NIXPKGS_SOURCETIME_PATH_OLD == "") then
+        unset NIXPKGS_SOURCETIME_PATH_OLD
+    endif
+else
+    unset NIXPKGS_SOURCETIME_PATH
+endif
+# End of lines to clean up inside PATH the source-time utilities for Nixpkgs packaging
+EOF
+    cat "$FILE_TO_WORK_ON" > "$FILE_TO_PATCH"
+    rm "$FILE_TO_WORK_ON"
+}
diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-fish.sh b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-fish.sh
new file mode 100644
index 00000000000..3d3e08c57a1
--- /dev/null
+++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-fish.sh
@@ -0,0 +1,50 @@
+patchRcPathFish(){
+    local FILE_TO_PATCH="$1"
+    local SOURCETIME_PATH="$2"
+    local FILE_TO_WORK_ON="$(mktemp "$(basename "$FILE_TO_PATCH").XXXXXX.tmp")"
+    cat <<EOF >> "$FILE_TO_WORK_ON"
+# Lines to add to PATH the source-time utilities for Nixpkgs packaging
+if set -q NIXPKGS_SOURCETIME_PATH && test (count \$NIXPKGS_SOURCETIME_PATH) -gt 0
+    set --unpath NIXPKGS_SOURCETIME_PATH_OLD "\$NIXPKGS_SOURCETIME_PATH" \$NIXPKGS_SOURCETIME_PATH_OLD
+end
+set --path NIXPKGS_SOURCETIME_PATH $SOURCETIME_PATH
+set -g --path PATH \$NIXPKGS_SOURCETIME_PATH \$PATH
+# End of lines to add to PATH source-time utilities for Nixpkgs packaging
+EOF
+    cat "$FILE_TO_PATCH" >> "$FILE_TO_WORK_ON"
+    cat <<EOF >> "$FILE_TO_WORK_ON"
+# Lines to clean up inside PATH the source-time utilities for Nixpkgs packaging
+if set -q PATH && test "\$PATH" != "" && test (count \$PATH) -ge (count \$NIXPKGS_SOURCETIME_PATH)
+    # Remove the inserted section
+    for i in (seq 0 (math (count \$PATH) - (count \$NIXPKGS_SOURCETIME_PATH)))
+        for j in (seq 1 (count \$NIXPKGS_SOURCETIME_PATH))
+            if test \$PATH[(math \$i + \$j)] != \$NIXPKGS_SOURCETIME_PATH[\$j]
+                set i -1
+                break
+            end
+        end
+        if test \$i -eq -1
+            continue
+        end
+        if test \$i -eq 0
+            set -g --path PATH \$PATH[(math (count \$NIXPKGS_SOURCETIME_PATH) + 1)..]
+        else
+            set -g --path PATH \$PATH[..\$i] \$PATH[(math (count \$NIXPKGS_SOURCETIME_PATH) + 1 + \$i)..]
+        end
+        break
+    end
+end
+if set -q NIXPKGS_SOURCETIME_PATH_OLD && test (count \$NIXPKGS_SOURCETIME_PATH_OLD) -gt 0
+    set --path NIXPKGS_SOURCETIME_PATH \$NIXPKGS_SOURCETIME_PATH_OLD[1]
+    set --unpath NIXPKGS_SOURCETIME_PATH_OLD \$NIXPKGS_SOURCETIME_PATH_OLD[2..]
+else
+    set -e NIXPKGS_SOURCETIME_PATH
+end
+if set -q NIXPKGS_SOURCETIME_PATH_OLD && test (count \$NIXPKGS_SOURCETIME_PATH_OLD) -eq 0
+    set -e NIXPKGS_SOURCETIME_PATH_OLD
+end
+# End of lines to clean up inside PATH the source-time utilities for Nixpkgs packaging
+EOF
+    cat "$FILE_TO_WORK_ON" > "$FILE_TO_PATCH"
+    rm "$FILE_TO_WORK_ON"
+}
diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-posix.sh b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-posix.sh
new file mode 100644
index 00000000000..a3740d4436d
--- /dev/null
+++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/patch-rc-path-posix.sh
@@ -0,0 +1,39 @@
+patchRcPathPosix(){
+    local FILE_TO_PATCH="$1"
+    local SOURCETIME_PATH="$2"
+    local FILE_TO_WORK_ON="$(mktemp "$(basename "$FILE_TO_PATCH").XXXXXX.tmp")"
+    cat <<EOF >> "$FILE_TO_WORK_ON"
+# Lines to add to PATH the source-time utilities for Nixpkgs packaging
+if [ -n "\${NIXPKGS_SOURCETIME_PATH-}" ]; then
+    NIXPKGS_SOURCETIME_PATH_OLD="\$NIXPKGS_SOURCETIME_PATH;\${NIXPKGS_SOURCETIME_PATH_OLD-}"
+fi
+NIXPKGS_SOURCETIME_PATH="$SOURCETIME_PATH"
+if [ -n "\$PATH" ]; then
+    PATH="\$NIXPKGS_SOURCETIME_PATH:\$PATH";
+else
+    PATH="\$NIXPKGS_SOURCETIME_PATH"
+fi
+export PATH
+# End of lines to add to PATH source-time utilities for Nixpkgs packaging
+EOF
+    cat "$FILE_TO_PATCH" >> "$FILE_TO_WORK_ON"
+    cat <<EOF >> "$FILE_TO_WORK_ON"
+# Lines to clean up inside PATH the source-time utilities for Nixpkgs packaging
+if [ -n "\${PATH-}" ]; then
+    PATH="\$(echo "\$PATH" | @sed@ "s#\$NIXPKGS_SOURCETIME_PATH##" | @sed@ "s#::#:#g" | @sed@ "s#^:##" | @sed@ "s#:\\\$##")"
+    export PATH
+fi
+if [ -n "\${NIXPKGS_SOURCETIME_PATH_OLD-}" ]; then
+    NIXPKGS_SOURCETIME_PATH="\$(echo "\$NIXPKGS_SOURCETIME_PATH_OLD" | @sed@ "s#\\([^;]\\);.*#\\1#")"
+    NIXPKGS_SOURCETIME_PATH_OLD="\$(echo "\$NIXPKGS_SOURCETIME_PATH_OLD" | @sed@ "s#[^;];\\(.*\\)#\\1#")"
+else
+    unset NIXPKGS_SOURCETIME_PATH
+fi
+if [ -z "\${NIXPKGS_SOURCETIME_PATH_OLD-}" ]; then
+    unset NIXPKGS_SOURCETIME_PATH_OLD
+fi
+# End of lines to clean up inside PATH the source-time utilities for Nixpkgs packaging
+EOF
+    cat "$FILE_TO_WORK_ON" > "$FILE_TO_PATCH"
+    rm "$FILE_TO_WORK_ON"
+}
diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/default.nix b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/default.nix
new file mode 100644
index 00000000000..82bc160387e
--- /dev/null
+++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/default.nix
@@ -0,0 +1,442 @@
+{ callPackage }:
+
+{
+  test-bash = callPackage
+    (
+      { lib
+      , runCommandLocal
+      , bash
+      , hello
+      , ksh
+      , patchRcPathBash
+      , shellcheck
+      , zsh
+      }:
+      runCommandLocal "patch-rc-path-bash-test"
+        {
+          nativeBuildInputs = [
+            bash
+            ksh
+            patchRcPathBash
+            shellcheck
+            zsh
+          ];
+          meta = {
+            description = "Package test of patchActivateBash";
+            inherit (patchRcPathBash.meta) maintainers;
+          };
+        }
+        ''
+          set -eu -o pipefail
+
+
+          # Check the setup hook script
+
+          echo "Running shellcheck against ${./test-sourcing-bash}"
+          shellcheck -s bash --exclude SC1090 ${./test-sourcing-bash}
+          shellcheck -s ksh --exclude SC1090 ${./test-sourcing-bash}
+
+
+          # Test patching a blank file
+
+          echo > blank.bash
+
+          echo "Generating blank_patched.bash from blank.bash"
+          cp blank.bash blank_patched.bash
+          patchRcPathBash blank_patched.bash "$PWD/delta:$PWD/foxtrot"
+
+          echo "Running shellcheck against blank_patched.bash"
+          shellcheck -s bash blank_patched.bash
+          shellcheck -s ksh blank_patched.bash
+
+          echo "Testing in Bash if blank.bash and blank_patched.bash modifies PATH the same way"
+          bash ${./test-sourcing-bash} ./blank.bash ./blank_patched.bash
+
+          echo "Testing in Ksh if blank.bash and blank_patched.bash modifies PATH the same way"
+          ksh ${./test-sourcing-bash} "$PWD/blank.bash" "$PWD/blank_patched.bash"
+
+          echo "Testing in Zsh if blank.bash and blank_patched.bash modifies PATH the same way"
+          zsh ${./test-sourcing-bash} ./blank.bash ./blank_patched.bash
+
+
+          # Test patching silent_hello
+
+          echo "hello > /dev/null" > silent_hello.bash
+
+          echo "Generating silent_hello_patched.bash from silent_hello.bash"
+          cp silent_hello.bash silent_hello_patched.bash
+          patchRcPathBash silent_hello_patched.bash "${hello}/bin"
+
+          echo "Running shellcheck against silent_hello_patched.bash"
+          shellcheck -s bash silent_hello_patched.bash
+
+          echo "Testing in Bash if silent_hello_patched.bash get sourced without error"
+          bash -eu -o pipefail -c ". ./silent_hello_patched.bash"
+
+          echo "Testing in Ksh if silent_hello_patched.bash get sourced without error"
+          ksh -eu -o pipefail -c ". ./silent_hello_patched.bash"
+
+          echo "Testing in Zsh if silent_hello_patched.bash get sourced without error"
+          zsh -eu -o pipefail -c ". ./silent_hello_patched.bash"
+
+
+          # Check the sample source
+
+          echo "Running shellcheck against sample_source.bash"
+          shellcheck -s bash ${./sample_source.bash}
+          shellcheck -s ksh ${./sample_source.bash}
+
+
+          # Test patching the sample source
+
+          cp ${./sample_source.bash} sample_source_patched.bash
+          chmod u+w sample_source_patched.bash
+
+          echo "Generating sample_source_patched.bash from ./sample_source.bash"
+          patchRcPathBash sample_source_patched.bash "$PWD/delta:$PWD/foxtrot"
+
+          echo "Running shellcheck against sample_source_patched.bash"
+          shellcheck -s bash sample_source_patched.bash
+
+          echo "Testing in Bash if sample_source.bash and sample_source_patched.bash modifies PATH the same way"
+          bash ${./test-sourcing-bash} ${./sample_source.bash} ./sample_source_patched.bash
+
+          echo "Testing in Ksh if sample_source.bash and sample_source_patched.bash modifies PATH the same way"
+          ksh ${./test-sourcing-bash} ${./sample_source.bash} "$PWD/sample_source_patched.bash"
+
+          echo "Testing in Zsh if sample_source.bash and sample_source_patched.bash modifies PATH the same way"
+          zsh ${./test-sourcing-bash} ${./sample_source.bash} ./sample_source_patched.bash
+
+
+          # Test double-patching the sample source
+
+          echo "Patching again sample_source_patched.bash"
+          patchRcPathBash sample_source_patched.bash "$PWD/foxtrot:$PWD/golf"
+
+          echo "Running shellcheck against sample_source_patched.bash"
+          shellcheck -s bash sample_source_patched.bash
+          shellcheck -s ksh sample_source_patched.bash
+
+          echo "Testing in Bash if sample_source.bash and sample_source_patched.bash modifies PATH the same way"
+          bash ${./test-sourcing-bash} ${./sample_source.bash} ./sample_source_patched.bash
+
+          echo "Testing in Ksh if sample_source.bash and sample_source_patched.bash modifies PATH the same way"
+          ksh ${./test-sourcing-bash} ${./sample_source.bash} "$PWD/sample_source_patched.bash"
+
+          echo "Testing in Zsh if sample_source.bash and sample_source_patched.bash modifies PATH the same way"
+          zsh ${./test-sourcing-bash} ${./sample_source.bash} ./sample_source_patched.bash
+
+
+          # Create a dummy output
+          touch "$out"
+        ''
+    )
+    { };
+
+
+
+  test-csh = callPackage
+    (
+      { lib
+      , runCommandLocal
+      , gnused
+      , hello
+      , patchRcPathCsh
+      , tcsh
+      }:
+      runCommandLocal "patch-rc-path-csh-test"
+        {
+          nativeBuildInputs = [
+            patchRcPathCsh
+            tcsh
+          ];
+          meta = {
+            description = "Package test of patchActivateCsh";
+            inherit (patchRcPathCsh.meta) maintainers;
+          };
+        }
+        ''
+          set -eu -o pipefail
+
+
+          # Test patching a blank file
+
+          echo > blank.csh
+
+          echo "Generating blank_patched.csh from blank.csh"
+          cp blank.csh blank_patched.csh
+          patchRcPathCsh blank_patched.csh "$PWD/delta:$PWD/foxtrot"
+
+          echo "Testing in Csh if blank.csh and blank_patched.csh modifies PATH the same way"
+          tcsh -e ${./test-sourcing-csh} blank.csh blank_patched.csh
+
+
+          # Test patching silent_hello file
+
+          echo "hello > /dev/null" > silent_hello.csh
+
+          echo "Generating silent_hello_patched.csh from silent_hello.csh"
+          cp silent_hello.csh silent_hello_patched.csh
+          patchRcPathCsh silent_hello_patched.csh "${hello}/bin"
+
+          echo "Testing in Csh if silent_hello_patched.csh get sourced without errer"
+          tcsh -e -c "source silent_hello_patched.csh"
+
+
+          # Generate the sample source
+
+          substitute ${./sample_source.csh.in} sample_source.csh --replace @sed@ ${gnused}/bin/sed
+          chmod u+rw sample_source.csh
+
+
+          # Test patching the sample source
+
+          echo "Generating sample_source_patched.csh from sample_source.csh"
+          cp sample_source.csh sample_source_patched.csh
+          chmod u+w sample_source_patched.csh
+          patchRcPathCsh sample_source_patched.csh "$PWD/delta:$PWD/foxtrot"
+
+          echo "Testing in Csh if sample_source.csh and sample_source_patched.csh modifies PATH the same way"
+          tcsh -e ${./test-sourcing-csh} sample_source.csh sample_source_patched.csh
+
+
+          # Test double-patching the sample source
+
+          echo "Patching again sample_source_patched.csh from sample_source.csh"
+          patchRcPathCsh sample_source_patched.csh "$PWD/foxtrot:$PWD/golf"
+
+          echo "Testing in Csh if sample_source.csh and sample_source_patched.csh modifies PATH the same way"
+          tcsh -e ${./test-sourcing-csh} sample_source.csh sample_source_patched.csh
+
+
+          # Create a dummy output
+          touch "$out"
+        ''
+    )
+    { };
+
+
+
+  test-fish = callPackage
+    (
+      { lib
+      , runCommandLocal
+      , fish
+      , hello
+      , patchRcPathFish
+      }:
+      runCommandLocal "patch-rc-path-fish-test"
+        {
+          nativeBuildInputs = [
+            fish
+            patchRcPathFish
+          ];
+          meta = {
+            description = "Package test of patchActivateFish";
+            inherit (patchRcPathFish.meta) maintainers;
+          };
+        }
+        ''
+          set -eu -o pipefail
+
+
+          # Test patching a blank file
+
+          echo > blank.fish
+
+          echo "Generating blank_patched.fish from blank.fish"
+          cp blank.fish blank_patched.fish
+          patchRcPathFish blank_patched.fish "$PWD/delta:$PWD/foxtrot"
+
+          echo "Testing in Fish if blank.fish and blank_patched.fish modifies PATH the same way"
+          HOME_TEMP="$(mktemp -d temporary_home_XXXXXX)"
+          HOME="$HOME_TEMP" fish ${./test-sourcing-fish} blank.fish blank_patched.fish
+          rm -r "$HOME_TEMP"
+
+
+          # Test patching silent_hello file
+
+          echo "hello > /dev/null" > silent_hello.fish
+
+          echo "Generating silent_hello_patched.fish from silent_hello.fish"
+          cp silent_hello.fish silent_hello_patched.fish
+          patchRcPathFish silent_hello_patched.fish "${hello}/bin"
+
+          echo "Testing in Fish if silent_hello_patched.fish get sourced without error"
+          HOME_TEMP="$(mktemp -d temporary_home_XXXXXX)"
+          HOME="$HOME_TEMP" fish -c "source silent_hello_patched.fish"
+          rm -r "$HOME_TEMP"
+
+
+          # Test patching the sample source
+
+          cp ${./sample_source.fish} sample_source_patched.fish
+          chmod u+w sample_source_patched.fish
+
+          echo "Generating sample_source_patched.fish from ${./sample_source.fish}"
+          patchRcPathFish sample_source_patched.fish "$PWD/delta:$PWD/foxtrot"
+          echo "Testing in Fish if sample_source.fish and sample_source_patched.fish modifies PATH the same way"
+          HOME_TEMP="$(mktemp -d temporary_home_XXXXXX)"
+          HOME="$HOME_TEMP" fish ${./test-sourcing-fish} ${./sample_source.fish} sample_source_patched.fish
+          rm -r "$HOME_TEMP"
+
+
+          # Test double-patching the sample source
+
+          echo "Patching again sample_source_patched.fish from ${./sample_source.fish}"
+          patchRcPathFish sample_source_patched.fish "$PWD/foxtrot:$PWD/golf"
+
+          echo "Testing in Fish if sample_source.fish and sample_source_patched.fish modifies PATH the same way"
+          HOME_TEMP="$(mktemp -d temporary_home_XXXXXX)"
+          HOME="$HOME_TEMP" fish ${./test-sourcing-fish} ${./sample_source.fish} sample_source_patched.fish
+          rm -r "$HOME_TEMP"
+
+
+          # Create a dummy output
+          touch "$out"
+        ''
+    )
+    { };
+
+
+
+  test-posix = callPackage
+    (
+      { lib
+      , runCommandLocal
+      , bash
+      , dash
+      , gnused
+      , hello
+      , ksh
+      , patchRcPathPosix
+      , shellcheck
+      }:
+      runCommandLocal "patch-rc-path-posix-test"
+        {
+          nativeBuildInputs = [
+            bash
+            dash
+            ksh
+            patchRcPathPosix
+            shellcheck
+          ];
+          meta = {
+            description = "Package test of patchActivatePosix";
+            inherit (patchRcPathPosix.meta) maintainers;
+          };
+        }
+        ''
+          set -eu -o pipefail
+
+
+          # Check the setup hook script
+
+          echo "Running shellcheck against ${./test-sourcing-posix}"
+          shellcheck -s sh --exclude SC1090 ${./test-sourcing-posix}
+          shellcheck -s dash --exclude SC1090 ${./test-sourcing-posix}
+
+
+          # Test patching a blank file
+
+          echo > blank.sh
+
+          echo "Generating blank_patched.sh from blank.sh"
+          cp blank.sh blank_patched.sh
+          patchRcPathPosix blank_patched.sh "$PWD/delta:$PWD/foxtrot"
+
+          echo "Running shellcheck against blank_patched.sh"
+          shellcheck -s sh blank_patched.sh
+          shellcheck -s dash blank_patched.sh
+
+          echo "Testing in Bash if blank.sh and blank_patched.sh modifies PATH the same way"
+          bash --posix ${./test-sourcing-posix} ./blank.sh ./blank_patched.sh
+
+          echo "Testing in Dash if blank.sh and blank_patched.sh modifies PATH the same way"
+          dash ${./test-sourcing-posix} ./blank.sh ./blank_patched.sh
+
+          echo "Testing in Ksh if ./blank.sh and ./blank_patched.sh modifies PATH the same way"
+          ksh ${./test-sourcing-posix} "$PWD/blank.sh" "$PWD/blank_patched.sh"
+
+
+          # Test patching silent_hello file
+
+          echo "hello > /dev/null" > silent_hello.sh
+
+          echo "Generating silent_hello_patched.sh from silent_hello.sh"
+          cp silent_hello.sh silent_hello_patched.sh
+          patchRcPathPosix silent_hello_patched.sh "${hello}/bin"
+
+          echo "Running shellcheck against silent_hello_patched.sh"
+          shellcheck -s sh silent_hello_patched.sh
+          shellcheck -s dash silent_hello_patched.sh
+
+          echo "Testing in Bash if silent_hello_patched.sh get sourced without error"
+          bash --posix -eu -c ". ./silent_hello_patched.sh"
+
+          echo "Testing in Dash if silent_hello_patched.sh get sourced without error"
+          dash -eu -c ". ./silent_hello_patched.sh"
+
+          echo "Testing in Ksh if silent_hello_patched.sh get sourced without error"
+          ksh -eu -c ". $PWD/silent_hello_patched.sh"
+
+
+          # Generate the sample source "$PWD/delta:$PWD/foxtrot" "$PWD/delta:$PWD/foxtrot"
+
+          substitute ${./sample_source.sh.in} sample_source.sh --replace @sed@ ${gnused}/bin/sed
+          chmod u+rw sample_source.sh
+
+
+          # Check the sample source
+
+          echo "Running shellcheck against sample_source.sh"
+          shellcheck -s sh sample_source.sh
+          shellcheck -s dash sample_source.sh
+
+
+          # Test patching the sample source
+
+          echo "Generating sample_source_patched.sh from sample_source.sh"
+          cp sample_source.sh sample_source_patched.sh
+          chmod u+w sample_source_patched.sh
+          patchRcPathPosix sample_source_patched.sh "$PWD/delta:$PWD/foxtrot"
+
+          echo "Running shellcheck against sample_source_patched.sh"
+          shellcheck -s sh sample_source_patched.sh
+          shellcheck -s dash sample_source_patched.sh
+
+          echo "Testing in Bash if sample_source.bash and sample_source_patched.bash modifies PATH the same way"
+          bash --posix ${./test-sourcing-posix} "./sample_source.sh" "./sample_source_patched.sh"
+
+          echo "Testing in Dash if sample_source.sh and sample_source_patched.sh modifies PATH the same way"
+          dash ${./test-sourcing-posix} "./sample_source.sh" "./sample_source_patched.sh"
+
+          echo "Testing in Ksh if sample_source.sh and sample_source_patched.sh modifies PATH the same way"
+          ksh ${./test-sourcing-posix} "$PWD/sample_source.sh" "$PWD/sample_source_patched.sh"
+
+
+          # Test double-patching the sample source
+
+          echo "Patching again sample_source_patched.sh"
+          patchRcPathPosix sample_source_patched.sh "$PWD/foxtrot:$PWD/golf"
+
+          echo "Running shellcheck against sample_source_patched.sh"
+          shellcheck -s sh sample_source_patched.sh
+          shellcheck -s dash sample_source_patched.sh
+
+          echo "Testing in Bash if sample_source.bash and sample_source_patched.bash modifies PATH the same way"
+          bash --posix ${./test-sourcing-posix} "./sample_source.sh" "./sample_source_patched.sh"
+
+          echo "Testing in Dash if sample_source.sh and sample_source_patched.sh modifies PATH the same way"
+          dash ${./test-sourcing-posix} "./sample_source.sh" "./sample_source_patched.sh"
+
+          echo "Testing in Ksh if sample_source.sh and sample_source_patched.sh modifies PATH the same way"
+          ksh ${./test-sourcing-posix} "$PWD/sample_source.sh" "$PWD/sample_source_patched.sh"
+
+
+          # Create a dummy output
+          touch "$out"
+        ''
+    )
+    { };
+}
diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.bash b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.bash
new file mode 100644
index 00000000000..6cb043e4e70
--- /dev/null
+++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.bash
@@ -0,0 +1,2 @@
+PATH="$PWD/charlie:${PATH/:$PWD\/bravo}"
+export PATH
diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.csh.in b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.csh.in
new file mode 100644
index 00000000000..9606458c037
--- /dev/null
+++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.csh.in
@@ -0,0 +1 @@
+setenv PATH $PWD/charlie:`echo "$PATH" | @sed@ "s#:$PWD/bravo##"`
diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.fish b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.fish
new file mode 100644
index 00000000000..f638fe5e24d
--- /dev/null
+++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.fish
@@ -0,0 +1,9 @@
+begin
+    for p in $PATH
+        if test $p != "$PWD/bravo"
+            set TEMPORARY_PATH $TEMPORARY_PATH $p
+        end
+    end
+    set -g PATH $TEMPORARY_PATH
+end
+set PATH "$PWD/charlie" $PATH
diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.sh.in b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.sh.in
new file mode 100644
index 00000000000..42e64a1ffc0
--- /dev/null
+++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/sample_source.sh.in
@@ -0,0 +1,2 @@
+PATH="$PWD/charlie:$(echo "$PATH" | @sed@ "s#:$PWD/bravo##")"
+export PATH
diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-bash b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-bash
new file mode 100644
index 00000000000..1b6cc54d8f9
--- /dev/null
+++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-bash
@@ -0,0 +1,21 @@
+#!/usr/bin/env bash
+
+set -eu -o pipefail
+
+UNPATCHED_SOURCE_FILE="$1"
+PATCHED_SOURCE_FILE="$2"
+ORIG_PATH="$PWD/alfa:$PWD/bravo"
+RESULT_PATH_FROM_UNPATCHED="$(
+    PATH="$ORIG_PATH"; export PATH
+    . "$UNPATCHED_SOURCE_FILE"
+    echo "$PATH"
+)"
+RESULT_PATH_FROM_PATCHED="$(
+    PATH="$ORIG_PATH"; export PATH
+    . "$PATCHED_SOURCE_FILE"
+    echo "$PATH"
+)"
+if [[ "$RESULT_PATH_FROM_UNPATCHED" != "$RESULT_PATH_FROM_PATCHED" ]]; then
+    echo "Result path mismatched: $UNPATCHED_SOURCE_FILE ($RESULT_PATH_FROM_UNPATCHED) and $PATCHED_SOURCE_FILE ($RESULT_PATH_FROM_PATCHED)" >&2
+    exit 1
+fi
diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-csh b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-csh
new file mode 100644
index 00000000000..7ddb2ddc1bd
--- /dev/null
+++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-csh
@@ -0,0 +1,13 @@
+#/usr/bin/env tcsh
+
+set UNPATCHED_SOURCE_FILE = "$1"
+set PATCHED_SOURCE_FILE = "$2"
+set ORIG_PATH = "${PWD}/alfa:${PWD}/bravo"
+
+set RESULT_PATH_FROM_UNPATCHED = `setenv PATH "$ORIG_PATH"; source $UNPATCHED_SOURCE_FILE; echo $PATH`
+set RESULT_PATH_FROM_PATCHED = `setenv PATH "$ORIG_PATH"; source $PATCHED_SOURCE_FILE; echo $PATH`
+
+if ($RESULT_PATH_FROM_UNPATCHED != $RESULT_PATH_FROM_PATCHED) then
+    echo "Result path mismatched: $UNPATCHED_SOURCE_FILE ($RESULT_PATH_FROM_UNPATCHED) and $PATCHED_SOURCE_FILE ($RESULT_PATH_FROM_PATCHED)" > /dev/stderr
+    exit 1
+endif
diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-fish b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-fish
new file mode 100644
index 00000000000..fcce014331e
--- /dev/null
+++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-fish
@@ -0,0 +1,13 @@
+#/usr/bin/env fish
+
+set UNPATCHED_SOURCE_FILE $argv[1]
+set PATCHED_SOURCE_FILE $argv[2]
+set ORIG_PATH "$PWD/alfa:$PWD/bravo"
+
+set RESULT_PATH_FROM_UNPATCHED (fish -c "set -g PATH \"$ORIG_PATH\"; source $UNPATCHED_SOURCE_FILE; echo \"\$PATH\"")
+set RESULT_PATH_FROM_PATCHED (fish -c "set -g PATH \"$ORIG_PATH\"; source $PATCHED_SOURCE_FILE; echo \"\$PATH\"")
+
+if test "$RESULT_PATH_FROM_UNPATCHED" != "$RESULT_PATH_FROM_PATCHED"
+    echo "Result path mismatched: $UNPATCHED_SOURCE_FILE ($RESULT_PATH_FROM_UNPATCHED) and $PATCHED_SOURCE_FILE ($RESULT_PATH_FROM_PATCHED)" >&2
+    exit 1
+end
diff --git a/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-posix b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-posix
new file mode 100644
index 00000000000..6039b4dcf09
--- /dev/null
+++ b/pkgs/build-support/setup-hooks/patch-rc-path-hooks/test/test-sourcing-posix
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+set -eu
+
+UNPATCHED_SOURCE_FILE="$1"
+PATCHED_SOURCE_FILE="$2"
+ORIG_PATH="$PWD/alfa:$PWD/bravo"
+RESULT_PATH_FROM_UNPATCHED="$(
+    PATH="$ORIG_PATH"; export PATH
+    . "$UNPATCHED_SOURCE_FILE"
+    echo "$PATH"
+)"
+RESULT_PATH_FROM_PATCHED="$(
+    PATH="$ORIG_PATH"; export PATH
+    . "$PATCHED_SOURCE_FILE"
+    echo "$PATH"
+)"
+if [ "$RESULT_PATH_FROM_UNPATCHED" != "$RESULT_PATH_FROM_PATCHED" ]; then
+    echo "Result path mismatched: $UNPATCHED_SOURCE_FILE ($RESULT_PATH_FROM_UNPATCHED) and $PATCHED_SOURCE_FILE ($RESULT_PATH_FROM_PATCHED)" > /dev/stderr
+    exit 1
+fi
diff --git a/pkgs/build-support/setup-hooks/postgresql-test-hook/default.nix b/pkgs/build-support/setup-hooks/postgresql-test-hook/default.nix
index d0031c93c10..e9e77b0bbe6 100644
--- a/pkgs/build-support/setup-hooks/postgresql-test-hook/default.nix
+++ b/pkgs/build-support/setup-hooks/postgresql-test-hook/default.nix
@@ -1,9 +1,8 @@
 { callPackage, makeSetupHook }:
 
-(makeSetupHook {
+makeSetupHook {
   name = "postgresql-test-hook";
-} ./postgresql-test-hook.sh).overrideAttrs (o: {
   passthru.tests = {
     simple = callPackage ./test.nix { };
   };
-})
+} ./postgresql-test-hook.sh
diff --git a/pkgs/build-support/setup-hooks/wrap-gapps-hook/default.nix b/pkgs/build-support/setup-hooks/wrap-gapps-hook/default.nix
index d7699b2557f..5ef61383885 100644
--- a/pkgs/build-support/setup-hooks/wrap-gapps-hook/default.nix
+++ b/pkgs/build-support/setup-hooks/wrap-gapps-hook/default.nix
@@ -13,6 +13,7 @@
 }:
 
 makeSetupHook {
+  name = "wrap-gapps-hook";
   deps = lib.optionals (!stdenv.isDarwin) [
     # It is highly probable that a program will use GSettings,
     # at minimum through GTK file chooser dialogue.
@@ -36,8 +37,8 @@ makeSetupHook {
     # We use the wrapProgram function.
     makeWrapper
   ];
-  substitutions = {
-    passthru.tests = let
+  passthru = {
+    tests = let
       sample-project = ./tests/sample-project;
 
       testLib = callPackage ./tests/lib.nix { };
diff --git a/pkgs/build-support/skaware/build-skaware-man-pages.nix b/pkgs/build-support/skaware/build-skaware-man-pages.nix
deleted file mode 100644
index 92d8202ae95..00000000000
--- a/pkgs/build-support/skaware/build-skaware-man-pages.nix
+++ /dev/null
@@ -1,45 +0,0 @@
-{ lib, stdenv, fetchFromGitHub }:
-
-{
-  # : string
-  pname
-  # : string
-, version
-  # : string
-, sha256
-  # : string
-, description
-  # : list Maintainer
-, maintainers
-  # : license
-, license ? lib.licenses.isc
-  # : string
-, owner ? "flexibeast"
-  # : string
-, rev ? "v${version}"
-}:
-
-let
-  manDir = "${placeholder "out"}/share/man";
-
-  src = fetchFromGitHub {
-    inherit owner rev sha256;
-    repo = pname;
-  };
-in
-
-stdenv.mkDerivation {
-  inherit pname version src;
-
-  makeFlags = [
-    "MANPATH=${manDir}"
-  ];
-
-  dontBuild = true;
-
-  meta = with lib; {
-    inherit description license maintainers;
-    inherit (src.meta) homepage;
-    platforms = platforms.all;
-  };
-}
diff --git a/pkgs/build-support/skaware/build-skaware-package.nix b/pkgs/build-support/skaware/build-skaware-package.nix
deleted file mode 100644
index 1988d95212c..00000000000
--- a/pkgs/build-support/skaware/build-skaware-package.nix
+++ /dev/null
@@ -1,117 +0,0 @@
-{ lib, stdenv, cleanPackaging, fetchurl }:
-{
-  # : string
-  pname
-  # : string
-, version
-  # : string
-, sha256
-  # : string
-, description
-  # : list Platform
-, platforms ? lib.platforms.all
-  # : list string
-, outputs ? [ "bin" "lib" "dev" "doc" "out" ]
-  # TODO(Profpatsch): automatically infer most of these
-  # : list string
-, configureFlags
-  # : string
-, postConfigure ? null
-  # mostly for moving and deleting files from the build directory
-  # : lines
-, postInstall
-  # : list Maintainer
-, maintainers ? [ ]
-  # : passthru arguments (e.g. tests)
-, passthru ? { }
-
-}:
-
-let
-
-  # File globs that can always be deleted
-  commonNoiseFiles = [
-    ".gitignore"
-    "Makefile"
-    "INSTALL"
-    "configure"
-    "patch-for-solaris"
-    "src/**/*"
-    "tools/**/*"
-    "package/**/*"
-    "config.mak"
-  ];
-
-  # File globs that should be moved to $doc
-  commonMetaFiles = [
-    "COPYING"
-    "AUTHORS"
-    "NEWS"
-    "CHANGELOG"
-    "README"
-    "README.*"
-    "DCO"
-    "CONTRIBUTING"
-  ];
-
-in
-stdenv.mkDerivation {
-  inherit pname version;
-
-  src = fetchurl {
-    url = "https://skarnet.org/software/${pname}/${pname}-${version}.tar.gz";
-    inherit sha256;
-  };
-
-  inherit outputs;
-
-  dontDisableStatic = true;
-  enableParallelBuilding = true;
-
-  configureFlags = configureFlags ++ [
-    "--enable-absolute-paths"
-    # We assume every nix-based cross target has urandom.
-    # This might not hold for e.g. BSD.
-    "--with-sysdep-devurandom=yes"
-    (if stdenv.isDarwin
-    then "--disable-shared"
-    else "--enable-shared")
-  ]
-    # On darwin, the target triplet from -dumpmachine includes version number,
-    # but skarnet.org software uses the triplet to test binary compatibility.
-    # Explicitly setting target ensures code can be compiled against a skalibs
-    # binary built on a different version of darwin.
-    # http://www.skarnet.org/cgi-bin/archive.cgi?1:mss:623:heiodchokfjdkonfhdph
-    ++ (lib.optional stdenv.isDarwin
-    "--build=${stdenv.hostPlatform.system}");
-
-  inherit postConfigure;
-
-  makeFlags = lib.optional stdenv.cc.isClang [ "AR=${stdenv.cc.targetPrefix}ar" "RANLIB=${stdenv.cc.targetPrefix}ranlib" ];
-
-  # TODO(Profpatsch): ensure that there is always a $doc output!
-  postInstall = ''
-    echo "Cleaning & moving common files"
-    ${cleanPackaging.commonFileActions {
-       noiseFiles = commonNoiseFiles;
-       docFiles = commonMetaFiles;
-     }} $doc/share/doc/${pname}
-
-    ${postInstall}
-  '';
-
-  postFixup = ''
-    ${cleanPackaging.checkForRemainingFiles}
-  '';
-
-  meta = {
-    homepage = "https://skarnet.org/software/${pname}/";
-    inherit description platforms;
-    license = lib.licenses.isc;
-    maintainers = with lib.maintainers;
-      [ pmahoney Profpatsch qyliss ] ++ maintainers;
-  };
-
-  inherit passthru;
-
-}
diff --git a/pkgs/build-support/skaware/clean-packaging.nix b/pkgs/build-support/skaware/clean-packaging.nix
deleted file mode 100644
index d51cbec8aeb..00000000000
--- a/pkgs/build-support/skaware/clean-packaging.nix
+++ /dev/null
@@ -1,53 +0,0 @@
-# set of utilities that assure the cwd of a build
-# is completely clean after the build, meaning all
-# files were either discarded or moved to outputs.
-# This ensures nothing is forgotten and new files
-# are correctly handled on update.
-{ lib, stdenv, file, writeScript }:
-
-let
-  globWith = lib.concatMapStringsSep "\n";
-  rmNoise = noiseGlobs: globWith (f:
-    "rm -rf ${f}") noiseGlobs;
-  mvDoc = docGlobs: globWith
-    (f: ''mv ${f} "$DOCDIR" 2>/dev/null || true'')
-    docGlobs;
-
-  # Shell script that implements common move & remove actions
-  # $1 is the doc directory (will be created).
-  # Best used in conjunction with checkForRemainingFiles
-  commonFileActions =
-    { # list of fileglobs that are removed from the source dir
-      noiseFiles
-      # files that are moved to the doc directory ($1)
-      # TODO(Profpatsch): allow to set target dir with
-      # { glob = …; to = "html" } (relative to docdir)
-    , docFiles }:
-    writeScript "common-file-actions.sh" ''
-      #!${stdenv.shell}
-      set -e
-      DOCDIR="''${1?commonFileActions: DOCDIR as argv[1] required}"
-      shopt -s globstar extglob nullglob
-      mkdir -p "$DOCDIR"
-      ${mvDoc docFiles}
-      ${rmNoise noiseFiles}
-    '';
-
-  # Shell script to check whether the build directory is empty.
-  # If there are still files remaining, exit 1 with a helpful
-  # listing of all remaining files and their types.
-  checkForRemainingFiles = writeScript "check-for-remaining-files.sh" ''
-    #!${stdenv.shell}
-    echo "Checking for remaining source files"
-    rem=$(find -mindepth 1 -xtype f -print0 \
-           | tee $TMP/remaining-files)
-    if [[ "$rem" != "" ]]; then
-      echo "ERROR: These files should be either moved or deleted:"
-      cat $TMP/remaining-files | xargs -0 ${file}/bin/file
-      exit 1
-    fi
-  '';
-
-in {
-  inherit commonFileActions checkForRemainingFiles;
-}
diff --git a/pkgs/build-support/src-only/default.nix b/pkgs/build-support/src-only/default.nix
index b4e373cd058..520753e3746 100644
--- a/pkgs/build-support/src-only/default.nix
+++ b/pkgs/build-support/src-only/default.nix
@@ -1,4 +1,4 @@
-{ stdenv }@orig:
+{ stdenv }:
 # srcOnly is a utility builder that only fetches and unpacks the given `src`,
 # maybe pathings it in the process with the optional `patches` and
 # `buildInputs` attributes.
diff --git a/pkgs/build-support/testers/default.nix b/pkgs/build-support/testers/default.nix
index 020352836c8..6ab0ee843cb 100644
--- a/pkgs/build-support/testers/default.nix
+++ b/pkgs/build-support/testers/default.nix
@@ -1,8 +1,60 @@
-{ pkgs, lib, callPackage, runCommand, stdenv }:
+{ pkgs, buildPackages, lib, callPackage, runCommand, stdenv, substituteAll, }:
 # Documentation is in doc/builders/testers.chapter.md
 {
+  # See https://nixos.org/manual/nixpkgs/unstable/#tester-testBuildFailure
+  # or doc/builders/testers.chapter.md
+  testBuildFailure = drv: drv.overrideAttrs (orig: {
+    builder = buildPackages.bash;
+    args = [
+      (substituteAll { coreutils = buildPackages.coreutils; src = ./expect-failure.sh; })
+      orig.realBuilder or stdenv.shell
+    ] ++ orig.args or ["-e" (orig.builder or ../../stdenv/generic/default-builder.sh)];
+  });
+
+  # See https://nixos.org/manual/nixpkgs/unstable/#tester-testEqualDerivation
+  # or doc/builders/testers.chapter.md
   testEqualDerivation = callPackage ./test-equal-derivation.nix { };
 
+  # See https://nixos.org/manual/nixpkgs/unstable/#tester-testEqualContents
+  # or doc/builders/testers.chapter.md
+  testEqualContents = {
+    assertion,
+    actual,
+    expected,
+  }: runCommand "equal-contents-${lib.strings.toLower assertion}" {
+    inherit assertion actual expected;
+  } ''
+    echo "Checking:"
+    echo "$assertion"
+    if ! diff -U5 -r "$actual" "$expected" --color=always
+    then
+      echo
+      echo 'Contents must be equal, but were not!'
+      echo
+      echo "+: expected,   at $expected"
+      echo "-: unexpected, at $actual"
+      exit 1
+    else
+      find "$expected" -type f -executable > expected-executables | sort
+      find "$actual" -type f -executable > actual-executables | sort
+      if ! diff -U0 actual-executables expected-executables --color=always
+      then
+        echo
+        echo "Contents must be equal, but some files' executable bits don't match"
+        echo
+        echo "+: make this file executable in the actual contents"
+        echo "-: make this file non-executable in the actual contents"
+        exit 1
+      else
+        echo "expected $expected and actual $actual match."
+        echo 'OK'
+        touch $out
+      fi
+    fi
+  '';
+
+  # See https://nixos.org/manual/nixpkgs/unstable/#tester-testVersion
+  # or doc/builders/testers.chapter.md
   testVersion =
     { package,
       command ? "${package.meta.mainProgram or package.pname or package.name} --version",
@@ -67,6 +119,6 @@
             else test;
           calledTest = lib.toFunction loadedTest pkgs;
         in
-          nixosTesting.makeTest calledTest;
+          nixosTesting.simpleTest calledTest;
 
 }
diff --git a/pkgs/build-support/testers/expect-failure.sh b/pkgs/build-support/testers/expect-failure.sh
new file mode 100644
index 00000000000..0e1bbe9a678
--- /dev/null
+++ b/pkgs/build-support/testers/expect-failure.sh
@@ -0,0 +1,62 @@
+# Run a builder, flip exit code, save log and fix outputs
+#
+# Sub-goals:
+# - Delegate to another original builder passed via args
+# - Save the build log to output for further checks
+# - Make the derivation succeed if the original builder fails
+# - Make the derivation fail if the original builder returns exit code 0
+#
+# Requirements:
+# This runs before, without and after stdenv. Do not modify the environment;
+# especially not before invoking the original builder. For example, use
+# "@" substitutions instead of PATH.
+# Do not export any variables.
+
+# Stricter bash
+set -eu
+
+# ------------------------
+# Run the original builder
+
+echo "testBuildFailure: Expecting non-zero exit from builder and args: ${*@Q}"
+
+("$@" 2>&1) | @coreutils@/bin/tee $TMPDIR/testBuildFailure.log \
+  | while IFS= read -r ln; do
+    echo "original builder: $ln"
+  done
+
+r=${PIPESTATUS[0]}
+if [[ $r = 0 ]]; then
+  echo "testBuildFailure: The builder did not fail, but a failure was expected!"
+  exit 1
+fi
+echo "testBuildFailure: Original builder produced exit code: $r"
+
+# -----------------------------------------
+# Write the build log to the default output
+
+outs=( $outputs )
+defOut=${outs[0]}
+defOutPath=${!defOut}
+
+if [[ ! -d $defOutPath ]]; then
+  if [[ -e $defOutPath ]]; then
+    @coreutils@/bin/mv $defOutPath $TMPDIR/out-node
+    @coreutils@/bin/mkdir $defOutPath
+    @coreutils@/bin/mv $TMPDIR/out-node $defOutPath/result
+  fi
+fi
+
+@coreutils@/bin/mkdir -p $defOutPath
+@coreutils@/bin/mv $TMPDIR/testBuildFailure.log $defOutPath/testBuildFailure.log
+echo $r >$defOutPath/testBuildFailure.exit
+
+# ------------------------------------------------------
+# Put empty directories in place for any missing outputs
+
+for outputName in ${outputs:-out}; do
+  outputPath="${!outputName}"
+  if [[ ! -e "${outputPath}" ]]; then
+    @coreutils@/bin/mkdir "${outputPath}";
+  fi
+done
diff --git a/pkgs/build-support/testers/test/default.nix b/pkgs/build-support/testers/test/default.nix
index 30e778cf652..26e622c8763 100644
--- a/pkgs/build-support/testers/test/default.nix
+++ b/pkgs/build-support/testers/test/default.nix
@@ -1,4 +1,4 @@
-{ testers, lib, pkgs, ... }:
+{ testers, lib, pkgs, hello, runCommand, ... }:
 let
   pkgs-with-overlay = pkgs.extend(final: prev: {
     proof-of-overlay-hello = prev.hello;
@@ -24,4 +24,176 @@ lib.recurseIntoAttrs {
       machine.succeed("hello | figlet >/dev/console")
     '';
   });
+
+  testBuildFailure = lib.recurseIntoAttrs {
+    happy = runCommand "testBuildFailure-happy" {
+      failed = testers.testBuildFailure (runCommand "fail" {} ''
+        echo ok-ish >$out
+
+        echo failing though
+        echo also stderr 1>&2
+        echo 'line\nwith-\bbackslashes'
+        printf "incomplete line - no newline"
+
+        exit 3
+      '');
+    } ''
+      grep -F 'ok-ish' $failed/result
+
+      grep -F 'failing though' $failed/testBuildFailure.log
+      grep -F 'also stderr' $failed/testBuildFailure.log
+      grep -F 'line\nwith-\bbackslashes' $failed/testBuildFailure.log
+      grep -F 'incomplete line - no newline' $failed/testBuildFailure.log
+
+      [[ 3 = $(cat $failed/testBuildFailure.exit) ]]
+
+      touch $out
+    '';
+
+    helloDoesNotFail = runCommand "testBuildFailure-helloDoesNotFail" {
+      failed = testers.testBuildFailure (testers.testBuildFailure hello);
+
+      # Add hello itself as a prerequisite, so we don't try to run this test if
+      # there's an actual failure in hello.
+      inherit hello;
+    } ''
+      echo "Checking $failed/testBuildFailure.log"
+      grep -F 'testBuildFailure: The builder did not fail, but a failure was expected' $failed/testBuildFailure.log
+      [[ 1 = $(cat $failed/testBuildFailure.exit) ]]
+      touch $out
+    '';
+
+    multiOutput = runCommand "testBuildFailure-multiOutput" {
+      failed = testers.testBuildFailure (runCommand "fail" {
+        # dev will be the default output
+        outputs = ["dev" "doc" "out"];
+      } ''
+        echo i am failing
+        exit 1
+      '');
+    } ''
+      grep -F 'i am failing' $failed/testBuildFailure.log >/dev/null
+      [[ 1 = $(cat $failed/testBuildFailure.exit) ]]
+
+      # Checking our note that dev is the default output
+      echo $failed/_ | grep -- '-dev/_' >/dev/null
+      echo 'All good.'
+      touch $out
+    '';
+  };
+
+  testEqualContents = lib.recurseIntoAttrs {
+    happy = testers.testEqualContents {
+      assertion = "The same directory contents at different paths are recognized as equal";
+      expected = runCommand "expected" {} ''
+        mkdir -p $out/c
+        echo a >$out/a
+        echo b >$out/b
+        echo d >$out/c/d
+      '';
+      actual = runCommand "actual" {} ''
+        mkdir -p $out/c
+        echo a >$out/a
+        echo b >$out/b
+        echo d >$out/c/d
+      '';
+    };
+
+    unequalExe =
+      runCommand "testEqualContents-unequalExe" {
+        log = testers.testBuildFailure (testers.testEqualContents {
+          assertion = "The same directory contents at different paths are recognized as equal";
+          expected = runCommand "expected" {} ''
+            mkdir -p $out/c
+            echo a >$out/a
+            chmod a+x $out/a
+            echo b >$out/b
+            echo d >$out/c/d
+          '';
+          actual = runCommand "actual" {} ''
+            mkdir -p $out/c
+            echo a >$out/a
+            echo b >$out/b
+            chmod a+x $out/b
+            echo d >$out/c/d
+          '';
+        });
+      } ''
+        (
+          set -x
+          grep -F -- "executable bits don't match" $log/testBuildFailure.log
+          grep -E -- '+.*-actual/a' $log/testBuildFailure.log
+          grep -E -- '-.*-actual/b' $log/testBuildFailure.log
+          grep -F -- "--- actual-executables" $log/testBuildFailure.log
+          grep -F -- "+++ expected-executables" $log/testBuildFailure.log
+        ) || {
+          echo "Test failed: could not find pattern in build log $log"
+          exit 1
+        }
+        echo 'All good.'
+        touch $out
+      '';
+
+    fileDiff =
+      runCommand "testEqualContents-fileDiff" {
+        log = testers.testBuildFailure (testers.testEqualContents {
+          assertion = "The same directory contents at different paths are recognized as equal";
+          expected = runCommand "expected" {} ''
+            mkdir -p $out/c
+            echo a >$out/a
+            echo b >$out/b
+            echo d >$out/c/d
+          '';
+          actual = runCommand "actual" {} ''
+            mkdir -p $out/c
+            echo a >$out/a
+            echo B >$out/b
+            echo d >$out/c/d
+          '';
+        });
+      } ''
+        (
+          set -x
+          grep -F -- "Contents must be equal but were not" $log/testBuildFailure.log
+          grep -E -- '+++ .*-actual/b' $log/testBuildFailure.log
+          grep -E -- '--- .*-actual/b' $log/testBuildFailure.log
+          grep -F -- "-B" $log/testBuildFailure.log
+          grep -F -- "+b" $log/testBuildFailure.log
+        ) || {
+          echo "Test failed: could not find pattern in build log $log"
+          exit 1
+        }
+        echo 'All good.'
+        touch $out
+      '';
+
+    fileMissing =
+      runCommand "testEqualContents-fileMissing" {
+        log = testers.testBuildFailure (testers.testEqualContents {
+          assertion = "The same directory contents at different paths are recognized as equal";
+          expected = runCommand "expected" {} ''
+            mkdir -p $out/c
+            echo a >$out/a
+            echo b >$out/b
+            echo d >$out/c/d
+          '';
+          actual = runCommand "actual" {} ''
+            mkdir -p $out/c
+            echo a >$out/a
+            echo d >$out/c/d
+          '';
+        });
+      } ''
+        (
+          set -x
+          grep -F -- "Contents must be equal but were not" $log/testBuildFailure.log
+          grep -E -- 'Only in .*-expected: b' $log/testBuildFailure.log
+        ) || {
+          echo "Test failed: could not find pattern in build log $log"
+          exit 1
+        }
+        echo 'All good.'
+        touch $out
+      '';
+  };
 }
diff --git a/pkgs/build-support/trivial-builders.nix b/pkgs/build-support/trivial-builders.nix
index e73cb9c5dec..f174424e265 100644
--- a/pkgs/build-support/trivial-builders.nix
+++ b/pkgs/build-support/trivial-builders.nix
@@ -1,5 +1,12 @@
 { lib, stdenv, stdenvNoCC, lndir, runtimeShell, shellcheck }:
 
+let
+  inherit (lib)
+    optionalAttrs
+    warn
+    ;
+in
+
 rec {
 
   /* Run the shell command `buildCommand' to produce a store path named
@@ -298,7 +305,7 @@ rec {
         if checkPhase == null then ''
           runHook preCheck
           ${stdenv.shellDryRun} "$target"
-          ${shellcheck}/bin/shellcheck "$target"
+          ${shellcheck.unwrapped}/bin/shellcheck "$target"
           runHook postCheck
         ''
         else checkPhase;
@@ -458,8 +465,11 @@ rec {
    *
    * This creates a simple derivation with symlinks to all inputs.
    *
-   * entries is a list of attribute sets like
-   * { name = "name" ; path = "/nix/store/..."; }
+   * entries can be a list of attribute sets like
+   * [ { name = "name" ; path = "/nix/store/..."; } ]
+   *
+   * or an attribute set name -> path like:
+   * { name = "/nix/store/..."; other = "/nix/store/..."; }
    *
    * Example:
    *
@@ -475,14 +485,28 @@ rec {
    *
    * See the note on symlinkJoin for the difference between linkFarm and symlinkJoin.
    */
-  linkFarm = name: entries: runCommand name { preferLocalBuild = true; allowSubstitutes = false; }
-    ''mkdir -p $out
-      cd $out
-      ${lib.concatMapStrings (x: ''
-          mkdir -p "$(dirname ${lib.escapeShellArg x.name})"
-          ln -s ${lib.escapeShellArg "${x.path}"} ${lib.escapeShellArg x.name}
-      '') entries}
-    '';
+  linkFarm = name: entries:
+  let
+    entries' =
+      if (lib.isAttrs entries) then entries
+      # We do this foldl to have last-wins semantics in case of repeated entries
+      else if (lib.isList entries) then lib.foldl (a: b: a // { "${b.name}" = b.path; }) { } entries
+      else throw "linkFarm entries must be either attrs or a list!";
+
+    linkCommands = lib.mapAttrsToList (name: path: ''
+      mkdir -p "$(dirname ${lib.escapeShellArg "${name}"})"
+      ln -s ${lib.escapeShellArg "${path}"} ${lib.escapeShellArg "${name}"}
+    '') entries';
+  in
+  runCommand name {
+    preferLocalBuild = true;
+    allowSubstitutes = false;
+    passthru.entries = entries';
+   } ''
+    mkdir -p $out
+    cd $out
+    ${lib.concatStrings linkCommands}
+  '';
 
   /*
    * Easily create a linkFarm from a set of derivations.
@@ -525,12 +549,25 @@ rec {
    *                 substitutions = { bash = "${pkgs.bash}/bin/bash"; };
    *                 meta.platforms = lib.platforms.linux;
    *               } ./myscript.sh;
+   *
+   * # setup hook with a package test
+   * myhellohookTested = makeSetupHook {
+   *                 deps = [ hello ];
+   *                 substitutions = { bash = "${pkgs.bash}/bin/bash"; };
+   *                 meta.platforms = lib.platforms.linux;
+   *                 passthru.tests.greeting = callPackage ./test { };
+   *               } ./myscript.sh;
    */
-  makeSetupHook = { name ? "hook", deps ? [], substitutions ? {}, meta ? {} }: script:
+  makeSetupHook = { name ? "hook", deps ? [], substitutions ? {}, meta ? {}, passthru ? {} }: script:
     runCommand name
       (substitutions // {
         inherit meta;
         strictDeps = true;
+        # TODO 2023-01, no backport: simplify to inherit passthru;
+        passthru = passthru
+          // optionalAttrs (substitutions?passthru)
+            (warn "makeSetupHook (name = ${lib.strings.escapeNixString name}): `substitutions.passthru` is deprecated. Please set `passthru` directly."
+              substitutions.passthru);
       })
       (''
         mkdir -p $out/nix-support
diff --git a/pkgs/build-support/trivial-builders/test/link-farm.nix b/pkgs/build-support/trivial-builders/test/link-farm.nix
new file mode 100644
index 00000000000..1ebfc707632
--- /dev/null
+++ b/pkgs/build-support/trivial-builders/test/link-farm.nix
@@ -0,0 +1,45 @@
+{ linkFarm, hello, writeTextFile, runCommand }:
+let
+  foo = writeTextFile {
+    name = "foo";
+    text = "foo";
+  };
+
+  linkFarmFromList = linkFarm "linkFarmFromList" [
+    { name = "foo"; path = foo; }
+    { name = "hello"; path = hello; }
+  ];
+
+  linkFarmWithRepeats = linkFarm "linkFarmWithRepeats" [
+    { name = "foo"; path = foo; }
+    { name = "hello"; path = hello; }
+    { name = "foo"; path = hello; }
+  ];
+
+  linkFarmFromAttrs = linkFarm "linkFarmFromAttrs" {
+    inherit foo hello;
+  };
+in
+runCommand "test-linkFarm" { } ''
+  function assertPathEquals() {
+    local a b;
+    a="$(realpath "$1")"
+    b="$(realpath "$2")"
+    if [ "$a" != "$b" ]; then
+      echo "path mismatch!"
+      echo "a: $1 -> $a"
+      echo "b: $2 -> $b"
+      exit 1
+    fi
+  }
+
+  assertPathEquals "${linkFarmFromList}/foo" "${foo}"
+  assertPathEquals "${linkFarmFromList}/hello" "${hello}"
+
+  assertPathEquals "${linkFarmWithRepeats}/foo" "${hello}"
+  assertPathEquals "${linkFarmWithRepeats}/hello" "${hello}"
+
+  assertPathEquals "${linkFarmFromAttrs}/foo" "${foo}"
+  assertPathEquals "${linkFarmFromAttrs}/hello" "${hello}"
+  touch $out
+''
diff --git a/pkgs/build-support/writers/default.nix b/pkgs/build-support/writers/default.nix
index 9fbc571daab..e964ca6b19c 100644
--- a/pkgs/build-support/writers/default.nix
+++ b/pkgs/build-support/writers/default.nix
@@ -119,6 +119,21 @@ let
   writeDashBin = name:
     writeDash "/bin/${name}";
 
+  # Like writeScript but the first line is a shebang to fish
+  #
+  # Example:
+  #   writeFish "example" ''
+  #     echo hello world
+  #   ''
+  writeFish = makeScriptWriter {
+    interpreter = "${pkgs.fish}/bin/fish --no-config";
+    check = "${pkgs.fish}/bin/fish --no-config --no-execute";  # syntax check only
+  };
+
+  # Like writeScriptBin but the first line is a shebang to fish
+  writeFishBin = name:
+    writeFish "/bin/${name}";
+
   # writeHaskell takes a name, an attrset with libraries and haskell version (both optional)
   # and some haskell source code and returns an executable.
   #
@@ -192,7 +207,7 @@ let
     };
   in writeDash name ''
     export NODE_PATH=${node-env}/lib/node_modules
-    exec ${pkgs.nodejs}/bin/node ${pkgs.writeText "js" content}
+    exec ${pkgs.nodejs}/bin/node ${pkgs.writeText "js" content} "$@"
   '';
 
   # writeJSBin takes the same arguments as writeJS but outputs a directory (like writeScriptBin)
diff --git a/pkgs/build-support/writers/test.nix b/pkgs/build-support/writers/test.nix
index d2e5cef83aa..561c3e4ab00 100644
--- a/pkgs/build-support/writers/test.nix
+++ b/pkgs/build-support/writers/test.nix
@@ -22,6 +22,12 @@ let
      test '~' = '~' && echo 'success'
     '';
 
+    fish = writeFishBin "test-writers-fish-bin" ''
+      if test "test" = "test"
+        echo "success"
+      end
+    '';
+
     rust = writeRustBin "test-writers-rust-bin" {} ''
       fn main(){
         println!("success")
@@ -94,6 +100,12 @@ let
      test '~' = '~' && echo 'success'
     '';
 
+    fish = writeFish "test-writers-fish" ''
+      if test "test" = "test"
+        echo "success"
+      end
+    '';
+
     haskell = writeHaskell "test-writers-haskell" { libraries = [ haskellPackages.acme-default ]; } ''
       import Data.Default