summary refs log tree commit diff
path: root/pkgs/development/tools/build-managers
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-08-04 10:43:07 +0000
committerAlyssa Ross <hi@alyssa.is>2021-08-04 10:43:07 +0000
commit62614cbef7da005c1eda8c9400160f6bcd6546b8 (patch)
treec2630f69080637987b68acb1ee8676d2681fe304 /pkgs/development/tools/build-managers
parentd9c82ed3044c72cecf01c6ea042489d30914577c (diff)
parente24069138dfec3ef94f211f1da005bb5395adc11 (diff)
downloadnixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.gz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.bz2
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.lz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.xz
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.tar.zst
nixpkgs-62614cbef7da005c1eda8c9400160f6bcd6546b8.zip
Merge branch 'nixpkgs-update' into master
Diffstat (limited to 'pkgs/development/tools/build-managers')
-rw-r--r--pkgs/development/tools/build-managers/apache-ant/1.9.nix18
-rw-r--r--pkgs/development/tools/build-managers/apache-ant/default.nix18
-rw-r--r--pkgs/development/tools/build-managers/apache-maven/default.nix11
-rw-r--r--pkgs/development/tools/build-managers/arpa2cm/default.nix6
-rw-r--r--pkgs/development/tools/build-managers/bam/default.nix12
-rw-r--r--pkgs/development/tools/build-managers/bazel/bazel-remote/default.nix84
-rw-r--r--pkgs/development/tools/build-managers/bazel/bazel_0_26/default.nix27
-rw-r--r--pkgs/development/tools/build-managers/bazel/bazel_0_29/default.nix37
-rw-r--r--pkgs/development/tools/build-managers/bazel/bazel_1/default.nix18
-rw-r--r--pkgs/development/tools/build-managers/bazel/bazel_3/default.nix72
-rw-r--r--pkgs/development/tools/build-managers/bazel/bazel_3/no-arc.patch34
-rw-r--r--pkgs/development/tools/build-managers/bazel/bazel_3/python-shebang.patch20
-rw-r--r--pkgs/development/tools/build-managers/bazel/bazel_3/src-deps.json344
-rw-r--r--pkgs/development/tools/build-managers/bazel/bazel_4/default.nix674
-rw-r--r--pkgs/development/tools/build-managers/bazel/bazel_4/no-arc.patch34
-rw-r--r--pkgs/development/tools/build-managers/bazel/bazel_4/src-deps.json1585
-rwxr-xr-xpkgs/development/tools/build-managers/bazel/bazel_4/update-srcDeps.py54
-rw-r--r--pkgs/development/tools/build-managers/bazel/buildtools/default.nix22
-rw-r--r--pkgs/development/tools/build-managers/bazel/buildtools/deps.nix20
-rw-r--r--pkgs/development/tools/build-managers/bazel/java-test.nix2
-rw-r--r--pkgs/development/tools/build-managers/bazel/protobuf-test.nix42
-rwxr-xr-xpkgs/development/tools/build-managers/bazel/update-srcDeps.py3
-rw-r--r--pkgs/development/tools/build-managers/bear/cmakepaths.patch13
-rw-r--r--pkgs/development/tools/build-managers/bear/default.nix51
-rw-r--r--pkgs/development/tools/build-managers/bear/ignore_wrapper.patch27
-rw-r--r--pkgs/development/tools/build-managers/bear/no-double-relative.patch22
-rw-r--r--pkgs/development/tools/build-managers/bloop/default.nix14
-rw-r--r--pkgs/development/tools/build-managers/bmake/default.nix85
-rw-r--r--pkgs/development/tools/build-managers/bmake/fix-localtime-test.patch23
-rw-r--r--pkgs/development/tools/build-managers/bmake/fix-unexport-env-test.patch14
-rw-r--r--pkgs/development/tools/build-managers/bmake/setup-hook.sh127
-rw-r--r--pkgs/development/tools/build-managers/bmake/unconditional-ksh-test.patch12
-rw-r--r--pkgs/development/tools/build-managers/boot/default.nix6
-rw-r--r--pkgs/development/tools/build-managers/buck/default.nix19
-rw-r--r--pkgs/development/tools/build-managers/cmake/2.8.nix14
-rw-r--r--pkgs/development/tools/build-managers/cmake/application-services.patch9
-rw-r--r--pkgs/development/tools/build-managers/cmake/default.nix75
-rwxr-xr-xpkgs/development/tools/build-managers/cmake/setup-hook.sh5
-rw-r--r--pkgs/development/tools/build-managers/colormake/default.nix4
-rw-r--r--pkgs/development/tools/build-managers/conan/default.nix54
-rw-r--r--pkgs/development/tools/build-managers/corrosion/cmake-install-full-dir.patch18
-rw-r--r--pkgs/development/tools/build-managers/corrosion/default.nix54
-rw-r--r--pkgs/development/tools/build-managers/doit/default.nix41
-rw-r--r--pkgs/development/tools/build-managers/drake/gemset.nix2
-rw-r--r--pkgs/development/tools/build-managers/dub/default.nix112
-rw-r--r--pkgs/development/tools/build-managers/fac/cargo-lock.patch802
-rw-r--r--pkgs/development/tools/build-managers/fac/default.nix50
-rw-r--r--pkgs/development/tools/build-managers/gn/default.nix2
-rw-r--r--pkgs/development/tools/build-managers/gnumake/0001-No-impure-bin-sh.patch35
-rw-r--r--pkgs/development/tools/build-managers/gnumake/0002-remove-impure-dirs.patch40
-rw-r--r--pkgs/development/tools/build-managers/gnumake/4.2/default.nix22
-rw-r--r--pkgs/development/tools/build-managers/gnumake/4.2/glibc-2.33-glob.patch17
-rw-r--r--pkgs/development/tools/build-managers/gnumake/default.nix26
-rw-r--r--pkgs/development/tools/build-managers/gnumake/impure-dirs.patch25
-rw-r--r--pkgs/development/tools/build-managers/gradle/default.nix64
-rw-r--r--pkgs/development/tools/build-managers/gup/default.nix49
-rw-r--r--pkgs/development/tools/build-managers/icmake/default.nix4
-rw-r--r--pkgs/development/tools/build-managers/jam/default.nix11
-rw-r--r--pkgs/development/tools/build-managers/kati/default.nix4
-rw-r--r--pkgs/development/tools/build-managers/leiningen/default.nix17
-rw-r--r--pkgs/development/tools/build-managers/mage/default.nix6
-rw-r--r--pkgs/development/tools/build-managers/meson/allow-dirs-outside-of-prefix.patch8
-rw-r--r--pkgs/development/tools/build-managers/meson/boost-Do-not-add-system-paths-on-nix.patch40
-rw-r--r--pkgs/development/tools/build-managers/meson/clear-old-rpath.patch4
-rw-r--r--pkgs/development/tools/build-managers/meson/default.nix37
-rw-r--r--pkgs/development/tools/build-managers/meson/fix-rpath.patch8
-rw-r--r--pkgs/development/tools/build-managers/meson/gir-fallback-path.patch6
-rw-r--r--pkgs/development/tools/build-managers/meson/more-env-vars.patch10
-rw-r--r--pkgs/development/tools/build-managers/mill/default.nix25
-rw-r--r--pkgs/development/tools/build-managers/mk/default.nix11
-rwxr-xr-xpkgs/development/tools/build-managers/msbuild/create-deps.sh57
-rw-r--r--pkgs/development/tools/build-managers/msbuild/default.nix64
-rw-r--r--pkgs/development/tools/build-managers/msbuild/deps.nix1562
-rw-r--r--pkgs/development/tools/build-managers/msbuild/nuget.nix1130
-rw-r--r--pkgs/development/tools/build-managers/ninja/default.nix8
-rw-r--r--pkgs/development/tools/build-managers/pants/default.nix4
-rw-r--r--pkgs/development/tools/build-managers/qbs/default.nix10
-rw-r--r--pkgs/development/tools/build-managers/rake/gemset.nix2
-rw-r--r--pkgs/development/tools/build-managers/rebar/default.nix15
-rw-r--r--pkgs/development/tools/build-managers/rebar3/default.nix266
-rw-r--r--pkgs/development/tools/build-managers/rebar3/global-plugins.patch14
-rw-r--r--pkgs/development/tools/build-managers/rebar3/rebar-deps.nix118
-rwxr-xr-xpkgs/development/tools/build-managers/rebar3/rebar3-nix-bootstrap267
-rw-r--r--pkgs/development/tools/build-managers/rebar3/rebar_ignore_deps.erl43
-rw-r--r--pkgs/development/tools/build-managers/rebar3/skip-plugins.patch54
-rw-r--r--pkgs/development/tools/build-managers/rebar3/tmp-tests-skip.patch17
-rw-r--r--pkgs/development/tools/build-managers/redo-apenwarr/default.nix2
-rw-r--r--pkgs/development/tools/build-managers/redo-c/Makefile2
-rw-r--r--pkgs/development/tools/build-managers/redo-c/default.nix8
-rw-r--r--pkgs/development/tools/build-managers/redo-sh/default.nix14
-rw-r--r--pkgs/development/tools/build-managers/redo/default.nix13
-rw-r--r--pkgs/development/tools/build-managers/remake/default.nix31
-rw-r--r--pkgs/development/tools/build-managers/rocm-cmake/default.nix12
-rw-r--r--pkgs/development/tools/build-managers/samurai/default.nix8
-rw-r--r--pkgs/development/tools/build-managers/sbt-extras/default.nix68
-rw-r--r--pkgs/development/tools/build-managers/sbt/default.nix34
-rw-r--r--pkgs/development/tools/build-managers/scons/common.nix14
-rw-r--r--pkgs/development/tools/build-managers/scons/default.nix4
-rw-r--r--pkgs/development/tools/build-managers/shards/default.nix65
-rw-r--r--pkgs/development/tools/build-managers/shards/shards.nix4
-rw-r--r--pkgs/development/tools/build-managers/tup/default.nix39
-rw-r--r--pkgs/development/tools/build-managers/waf/default.nix10
-rw-r--r--pkgs/development/tools/build-managers/wafHook/default.nix3
103 files changed, 6816 insertions, 2407 deletions
diff --git a/pkgs/development/tools/build-managers/apache-ant/1.9.nix b/pkgs/development/tools/build-managers/apache-ant/1.9.nix
index 49f8435b377..80f8f1f886c 100644
--- a/pkgs/development/tools/build-managers/apache-ant/1.9.nix
+++ b/pkgs/development/tools/build-managers/apache-ant/1.9.nix
@@ -1,16 +1,14 @@
-{ fetchurl, stdenv, coreutils, makeWrapper }:
+{ fetchurl, lib, stdenv, coreutils, makeWrapper }:
 
-let version = "1.9.15"; in
-
-stdenv.mkDerivation {
+stdenv.mkDerivation rec {
   pname = "ant";
-  inherit version;
+  version = "1.9.16";
 
-  buildInputs = [ makeWrapper ];
+  nativeBuildInputs = [ makeWrapper ];
 
   src = fetchurl {
     url = "mirror://apache/ant/binaries/apache-ant-${version}-bin.tar.bz2";
-    sha256 = "0yfx5qsvrg12lar4908ndbnlpppy7g7qk8ay41y4sz9g873v07mr";
+    sha256 = "0rif9kj6njajy951w3aapk27y1mbaxb08whs126v533h96rb1kjp";
   };
 
   contrib = fetchurl {
@@ -105,8 +103,8 @@ stdenv.mkDerivation {
       by an object that implements a particular Task interface.
     '';
 
-    license = stdenv.lib.licenses.asl20;
-    maintainers = [ stdenv.lib.maintainers.eelco ];
-    platforms = stdenv.lib.platforms.all;
+    license = lib.licenses.asl20;
+    maintainers = [ lib.maintainers.eelco ];
+    platforms = lib.platforms.all;
   };
 }
diff --git a/pkgs/development/tools/build-managers/apache-ant/default.nix b/pkgs/development/tools/build-managers/apache-ant/default.nix
index b0411090fbe..7c05fcf60a3 100644
--- a/pkgs/development/tools/build-managers/apache-ant/default.nix
+++ b/pkgs/development/tools/build-managers/apache-ant/default.nix
@@ -1,16 +1,14 @@
-{ fetchurl, stdenv, coreutils, makeWrapper }:
+{ fetchurl, lib, stdenv, coreutils, makeWrapper }:
 
-let version = "1.10.8"; in
-
-stdenv.mkDerivation {
+stdenv.mkDerivation rec {
   pname = "ant";
-  inherit version;
+  version = "1.10.11";
 
-  buildInputs = [ makeWrapper ];
+  nativeBuildInputs = [ makeWrapper ];
 
   src = fetchurl {
     url = "mirror://apache/ant/binaries/apache-ant-${version}-bin.tar.bz2";
-    sha256 = "0zh94csb2hl6ir2ccn18ps506mjgh3mffnrb8wpsmp1x5fcykha5";
+    sha256 = "19m8xb7h6xm4jykzb79kakbx1pa4awaglw6z31pbfg8m5pmwkipz";
   };
 
   contrib = fetchurl {
@@ -105,8 +103,8 @@ stdenv.mkDerivation {
       by an object that implements a particular Task interface.
     '';
 
-    license = stdenv.lib.licenses.asl20;
-    maintainers = [ stdenv.lib.maintainers.eelco ];
-    platforms = stdenv.lib.platforms.all;
+    license = lib.licenses.asl20;
+    maintainers = [ lib.maintainers.eelco ];
+    platforms = lib.platforms.all;
   };
 }
diff --git a/pkgs/development/tools/build-managers/apache-maven/default.nix b/pkgs/development/tools/build-managers/apache-maven/default.nix
index 83260cbc186..9e0103170e9 100644
--- a/pkgs/development/tools/build-managers/apache-maven/default.nix
+++ b/pkgs/development/tools/build-managers/apache-maven/default.nix
@@ -1,24 +1,23 @@
-{ stdenv, fetchurl, jdk, makeWrapper }:
+{ lib, stdenv, fetchurl, jdk, makeWrapper }:
 
 assert jdk != null;
 
-let version = "3.6.3"; in
 stdenv.mkDerivation rec {
   pname = "apache-maven";
-  inherit version;
+  version = "3.8.1";
 
   builder = ./builder.sh;
 
   src = fetchurl {
     url = "mirror://apache/maven/maven-3/${version}/binaries/${pname}-${version}-bin.tar.gz";
-    sha256 = "1i9qlj3vy4j1yyf22nwisd0pg88n9qzp9ymfhwqabadka7br3b96";
+    sha256 = "00pgmc9v2s2970wgl2ksvpqy4lxx17zhjm9fgd10fkamxc2ik2mr";
   };
 
-  buildInputs = [ makeWrapper ];
+  nativeBuildInputs = [ makeWrapper ];
 
   inherit jdk;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Build automation tool (used primarily for Java projects)";
     homepage = "http://maven.apache.org/";
     license = licenses.asl20;
diff --git a/pkgs/development/tools/build-managers/arpa2cm/default.nix b/pkgs/development/tools/build-managers/arpa2cm/default.nix
index ef3062c6ca5..0af9e77acf5 100644
--- a/pkgs/development/tools/build-managers/arpa2cm/default.nix
+++ b/pkgs/development/tools/build-managers/arpa2cm/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, cmake }:
+{ lib, stdenv, fetchFromGitHub, cmake }:
 
 stdenv.mkDerivation rec {
   pname = "arpa2cm";
@@ -11,9 +11,9 @@ stdenv.mkDerivation rec {
     owner = "arpa2";
   };
 
-  buildInputs = [ cmake ];
+  nativeBuildInputs = [ cmake ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "CMake Module library for the ARPA2 project";
     license = licenses.bsd2;
     maintainers = with maintainers; [ leenaars ];
diff --git a/pkgs/development/tools/build-managers/bam/default.nix b/pkgs/development/tools/build-managers/bam/default.nix
index 969cd987974..556725cca6c 100644
--- a/pkgs/development/tools/build-managers/bam/default.nix
+++ b/pkgs/development/tools/build-managers/bam/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, lua5_3, python }:
+{ lib, stdenv, fetchFromGitHub, lua5_3, python3 }:
 
 stdenv.mkDerivation rec {
   pname = "bam";
@@ -11,11 +11,13 @@ stdenv.mkDerivation rec {
     sha256 = "13br735ig7lygvzyfd15fc2rdygrqm503j6xj5xkrl1r7w2wipq6";
   };
 
-  buildInputs = [ lua5_3 python ];
+  nativeBuildInputs = [ lua5_3 python3 ];
 
-  buildPhase = ''${stdenv.shell} make_unix.sh'';
+  buildPhase = "${stdenv.shell} make_unix.sh";
 
-  checkPhase = ''${python.interpreter} scripts/test.py'';
+  checkPhase = "${python3.interpreter} scripts/test.py";
+
+  strictDeps = true;
 
   installPhase = ''
     mkdir -p "$out/share/bam"
@@ -24,7 +26,7 @@ stdenv.mkDerivation rec {
     cp bam "$out/bin"
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Yet another build manager";
     maintainers = with maintainers;
     [
diff --git a/pkgs/development/tools/build-managers/bazel/bazel-remote/default.nix b/pkgs/development/tools/build-managers/bazel/bazel-remote/default.nix
index 9910256afc0..314a1a8b057 100644
--- a/pkgs/development/tools/build-managers/bazel/bazel-remote/default.nix
+++ b/pkgs/development/tools/build-managers/bazel/bazel-remote/default.nix
@@ -1,88 +1,26 @@
-{ buildBazelPackage
-, cacert
+{ buildGoModule
 , fetchFromGitHub
-, git
-, go
-, stdenv
+, lib
 }:
 
-buildBazelPackage rec {
-  name = "bazel-remote-${version}";
-  version = "1.0.0";
+buildGoModule rec {
+  pname = "bazel-remote";
+  version = "2.1.1";
 
   src = fetchFromGitHub {
     owner = "buchgr";
-    repo = "bazel-remote";
+    repo = pname;
     rev = "v${version}";
-    sha256 = "1fpdw139d5q1377qnqbgkahmdr4mdaa17d2m10wkyvyvijwm4r2m";
+    sha256 = "sha256-tPjjYudUI+LlmdnEvHh+kUpAbmhiNPYhjf8fMglrzIM=";
   };
 
-  nativeBuildInputs = [ go git ];
+  vendorSha256 = "sha256-JNVzy4WbpwH9ZfO78AHQM8pak/ZVQqapxxs9QraMhDo=";
 
-  bazelTarget = "//:bazel-remote";
+  doCheck = false;
 
-  removeRulesCC = false;
-
-  # this is to work around `test -f` failing when called by gazelle
-  # https://github.com/bazelbuild/bazel-gazelle/blob/v0.19.1/internal/go_repository.bzl#L135
-  patches = [ ./disable_build_file_generation.patch ];
-
-  fetchAttrs = {
-    preBuild = ''
-      patchShebangs .
-
-      # tell rules_go to use the Go binary found in the PATH
-      sed -e 's:go_register_toolchains():go_register_toolchains(go_version = "host"):g' -i WORKSPACE
-
-      # tell rules_go to invoke GIT with custom CAINFO path
-      export GIT_SSL_CAINFO="${cacert}/etc/ssl/certs/ca-bundle.crt"
-
-      # force gazelle to use the nix go cache rather than its own
-      # export GO_REPOSITORY_USE_HOST_CACHE=1
-    '';
-
-    preInstall = ''
-      # Remove the go_sdk (it's just a copy of the go derivation) and all
-      # references to it from the marker files. Bazel does not need to download
-      # this sdk because we have patched the WORKSPACE file to point to the one
-      # currently present in PATH. Without removing the go_sdk from the marker
-      # file, the hash of it will change anytime the Go derivation changes and
-      # that would lead to impurities in the marker files which would result in
-      # a different sha256 for the fetch phase.
-      rm -rf $bazelOut/external/{go_sdk,\@go_sdk.marker}
-      sed -e '/^FILE:@go_sdk.*/d' -i $bazelOut/external/\@*.marker
-
-      # Remove the gazelle repository cache as it contains built binaries
-      chmod -R u+w $bazelOut/external/bazel_gazelle_go_repository_cache
-      rm -rf $bazelOut/external/{bazel_gazelle_go_repository_cache,\@bazel_gazelle_go_repository_cache.marker}
-      sed -e '/^FILE:@bazel_gazelle_go_repository_cache.*/d' -i $bazelOut/external/\@*.marker
-
-      # Remove the gazelle tools, they contain go binaries that are built
-      # non-deterministically. As long as the gazelle version matches the tools
-      # should be equivalent.
-      rm -rf $bazelOut/external/{bazel_gazelle_go_repository_tools,\@bazel_gazelle_go_repository_tools.marker}
-      sed -e '/^FILE:@bazel_gazelle_go_repository_tools.*/d' -i $bazelOut/external/\@*.marker
-    '';
-
-    sha256 = "1m7fmb03lirffxx04ck73bn5zwaji7zdwhlqq8s1c6pgp755d3vi";
-  };
-
-  buildAttrs = {
-    preBuild = ''
-      patchShebangs .
-
-      # tell rules_go to use the Go binary found in the PATH
-      sed -e 's:go_register_toolchains():go_register_toolchains(go_version = "host"):g' -i WORKSPACE
-    '';
-
-    installPhase = ''
-      install -Dm755 bazel-bin/*_pure_stripped/bazel-remote $out/bin/bazel-remote
-    '';
-  };
-
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://github.com/buchgr/bazel-remote";
-    description = "A remote HTTP/1.1 cache for Bazel.";
+    description = "A remote HTTP/1.1 cache for Bazel";
     license = licenses.asl20;
     maintainers = [ maintainers.uri-canva ];
     platforms = platforms.darwin ++ platforms.linux;
diff --git a/pkgs/development/tools/build-managers/bazel/bazel_0_26/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_0_26/default.nix
index 6d4ba50a9fb..f03f42be389 100644
--- a/pkgs/development/tools/build-managers/bazel/bazel_0_26/default.nix
+++ b/pkgs/development/tools/build-managers/bazel/bazel_0_26/default.nix
@@ -1,8 +1,8 @@
 { stdenv, callPackage, lib, fetchurl, fetchpatch, runCommand, makeWrapper
 , zip, unzip, bash, writeCBin, coreutils
-, which, python, perl, gawk, gnused, gnutar, gnugrep, gzip, findutils
+, which, python3, perl, gawk, gnused, gnutar, gnugrep, gzip, findutils
 # Apple dependencies
-, cctools, clang, libcxx, CoreFoundation, CoreServices, Foundation
+, cctools, llvmPackages_8, CoreFoundation, CoreServices, Foundation
 # Allow to independently override the jdks used to build and run respectively
 , buildJdk, runJdk
 , buildJdkName
@@ -90,9 +90,10 @@ let
 
   # Java toolchain used for the build and tests
   javaToolchain = "@bazel_tools//tools/jdk:toolchain_host${buildJdkName}";
+  stdenv' = if stdenv.isDarwin then llvmPackages_8.libcxxStdenv else stdenv;
 
 in
-stdenv.mkDerivation rec {
+stdenv'.mkDerivation rec {
 
   version = "0.26.0";
 
@@ -182,10 +183,10 @@ stdenv.mkDerivation rec {
 
       # libcxx includes aren't added by libcxx hook
       # https://github.com/NixOS/nixpkgs/pull/41589
-      export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem ${libcxx}/include/c++/v1"
+      export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem ${llvmPackages_8.libcxx}/include/c++/v1"
 
       # don't use system installed Xcode to run clang, use Nix clang instead
-      sed -i -E "s;/usr/bin/xcrun (--sdk macosx )?clang;${stdenv.cc}/bin/clang $NIX_CFLAGS_COMPILE $(bazelLinkFlags) -framework CoreFoundation;g" \
+      sed -i -E "s;/usr/bin/xcrun (--sdk macosx )?clang;${stdenv'.cc}/bin/clang $NIX_CFLAGS_COMPILE $(bazelLinkFlags) -framework CoreFoundation;g" \
         scripts/bootstrap/compile.sh \
         src/tools/xcode/realpath/BUILD \
         src/tools/xcode/stdredirect/BUILD \
@@ -209,8 +210,8 @@ stdenv.mkDerivation rec {
       # Substitute python's stub shebang to plain python path. (see TODO add pr URL)
       # See also `postFixup` where python is added to $out/nix-support
       substituteInPlace src/main/java/com/google/devtools/build/lib/bazel/rules/python/python_stub_template.txt\
-          --replace "/usr/bin/env python" "${python}/bin/python" \
-          --replace "NIX_STORE_PYTHON_PATH" "${python}/bin/python" \
+          --replace "/usr/bin/env python" "${python3.interpreter}" \
+          --replace "NIX_STORE_PYTHON_PATH" "${python3.interpreter}" \
 
       # md5sum is part of coreutils
       sed -i 's|/sbin/md5|md5sum|' \
@@ -236,6 +237,8 @@ stdenv.mkDerivation rec {
       fetch --experimental_distdir=${distDir}
       build --copt="$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --copt="/g')"
       build --host_copt="$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --host_copt="/g')"
+      build --linkopt="$(echo $(< ${stdenv'.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --linkopt="/g')"
+      build --host_linkopt="$(echo $(< ${stdenv'.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --host_linkopt="/g')"
       build --linkopt="-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --linkopt="-Wl,/g')"
       build --host_linkopt="-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --host_linkopt="-Wl,/g')"
       build --host_javabase='@local_jdk//:jdk'
@@ -245,6 +248,8 @@ stdenv.mkDerivation rec {
       # add the same environment vars to compile.sh
       sed -e "/\$command \\\\$/a --copt=\"$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --copt=\"/g')\" \\\\" \
           -e "/\$command \\\\$/a --host_copt=\"$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --host_copt=\"/g')\" \\\\" \
+          -e "/\$command \\\\$/a --linkopt=\"$(echo $(< ${stdenv'.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --linkopt=\"/g')\" \\\\" \
+          -e "/\$command \\\\$/a --host_linkopt=\"$(echo $(< ${stdenv'.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --host_linkopt=\"/g')\" \\\\" \
           -e "/\$command \\\\$/a --linkopt=\"-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --linkopt=\"-Wl,/g')\" \\\\" \
           -e "/\$command \\\\$/a --host_linkopt=\"-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --host_linkopt=\"-Wl,/g')\" \\\\" \
           -e "/\$command \\\\$/a --host_javabase='@local_jdk//:jdk' \\\\" \
@@ -282,16 +287,18 @@ stdenv.mkDerivation rec {
     buildJdk
   ];
 
+  strictDeps = true;
+
   # when a command can’t be found in a bazel build, you might also
   # need to add it to `defaultShellPath`.
   nativeBuildInputs = [
     zip
-    python
+    python3
     unzip
     makeWrapper
     which
     customBash
-  ] ++ lib.optionals (stdenv.isDarwin) [ cctools libcxx CoreFoundation CoreServices Foundation ];
+  ] ++ lib.optionals (stdenv.isDarwin) [ cctools CoreFoundation CoreServices Foundation ];
 
   # Bazel makes extensive use of symlinks in the WORKSPACE.
   # This causes problems with infinite symlinks if the build output is in the same location as the
@@ -375,7 +382,7 @@ stdenv.mkDerivation rec {
     echo "${customBash} ${defaultShellPath}" >> $out/nix-support/depends
     # The templates get tar’d up into a .jar,
     # so nix can’t detect python is needed in the runtime closure
-    echo "${python}" >> $out/nix-support/depends
+    echo "${python3}" >> $out/nix-support/depends
   '';
 
   dontStrip = true;
diff --git a/pkgs/development/tools/build-managers/bazel/bazel_0_29/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_0_29/default.nix
index 19d33235a34..92bbbd45214 100644
--- a/pkgs/development/tools/build-managers/bazel/bazel_0_29/default.nix
+++ b/pkgs/development/tools/build-managers/bazel/bazel_0_29/default.nix
@@ -7,7 +7,7 @@
 # updater
 , python27, python3, writeScript
 # Apple dependencies
-, cctools, libcxx, CoreFoundation, CoreServices, Foundation
+, cctools, llvmPackages_8, CoreFoundation, CoreServices, Foundation
 # Allow to independently override the jdks used to build and run respectively
 , buildJdk, runJdk
 , buildJdkName
@@ -138,9 +138,10 @@ let
       try-import /etc/bazel.bazelrc
     '';
   };
+  stdenv' = if stdenv.isDarwin then llvmPackages_8.libcxxStdenv else stdenv;
 
 in
-stdenv.mkDerivation rec {
+stdenv'.mkDerivation rec {
   pname = "bazel";
   inherit version;
 
@@ -258,20 +259,20 @@ stdenv.mkDerivation rec {
 
     in (if !stdenv.hostPlatform.isDarwin then {
       # `extracted` doesn’t work on darwin
-      shebang = callPackage ./shebang-test.nix { inherit runLocal extracted bazelTest distDir; };
+      shebang = callPackage ../shebang-test.nix { inherit runLocal extracted bazelTest distDir; };
     } else {}) // {
-      bashTools = callPackage ./bash-tools-test.nix { inherit runLocal bazelTest distDir; };
-      cpp = callPackage ./cpp-test.nix { inherit runLocal bazelTest bazel-examples distDir; };
-      java = callPackage ./java-test.nix { inherit runLocal bazelTest bazel-examples distDir; };
-      protobuf = callPackage ./protobuf-test.nix { inherit runLocal bazelTest distDir; };
-      pythonBinPath = callPackage ./python-bin-path-test.nix { inherit runLocal bazelTest distDir; };
+      bashTools = callPackage ../bash-tools-test.nix { inherit runLocal bazelTest distDir; };
+      cpp = callPackage ../cpp-test.nix { inherit runLocal bazelTest bazel-examples distDir; };
+      java = callPackage ../java-test.nix { inherit runLocal bazelTest bazel-examples distDir; };
+      protobuf = callPackage ../protobuf-test.nix { inherit runLocal bazelTest distDir; };
+      pythonBinPath = callPackage ../python-bin-path-test.nix { inherit runLocal bazelTest distDir; };
 
-      bashToolsWithNixHacks = callPackage ./bash-tools-test.nix { inherit runLocal bazelTest distDir; bazel = bazelWithNixHacks; };
+      bashToolsWithNixHacks = callPackage ../bash-tools-test.nix { inherit runLocal bazelTest distDir; bazel = bazelWithNixHacks; };
 
-      cppWithNixHacks = callPackage ./cpp-test.nix { inherit runLocal bazelTest bazel-examples distDir; bazel = bazelWithNixHacks; };
-      javaWithNixHacks = callPackage ./java-test.nix { inherit runLocal bazelTest bazel-examples distDir; bazel = bazelWithNixHacks; };
-      protobufWithNixHacks = callPackage ./protobuf-test.nix { inherit runLocal bazelTest distDir; bazel = bazelWithNixHacks; };
-      pythonBinPathWithNixHacks = callPackage ./python-bin-path-test.nix { inherit runLocal bazelTest distDir; bazel = bazelWithNixHacks; };
+      cppWithNixHacks = callPackage ../cpp-test.nix { inherit runLocal bazelTest bazel-examples distDir; bazel = bazelWithNixHacks; };
+      javaWithNixHacks = callPackage ../java-test.nix { inherit runLocal bazelTest bazel-examples distDir; bazel = bazelWithNixHacks; };
+      protobufWithNixHacks = callPackage ../protobuf-test.nix { inherit runLocal bazelTest distDir; bazel = bazelWithNixHacks; };
+      pythonBinPathWithNixHacks = callPackage ../python-bin-path-test.nix { inherit runLocal bazelTest distDir; bazel = bazelWithNixHacks; };
 
       # downstream packages using buildBazelPackage
       # fixed-output hashes of the fetch phase need to be spot-checked manually
@@ -348,10 +349,10 @@ stdenv.mkDerivation rec {
 
       # libcxx includes aren't added by libcxx hook
       # https://github.com/NixOS/nixpkgs/pull/41589
-      export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem ${libcxx}/include/c++/v1"
+      export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem ${llvmPackages_8.libcxx}/include/c++/v1"
 
       # don't use system installed Xcode to run clang, use Nix clang instead
-      sed -i -E "s;/usr/bin/xcrun (--sdk macosx )?clang;${stdenv.cc}/bin/clang $NIX_CFLAGS_COMPILE $(bazelLinkFlags) -framework CoreFoundation;g" \
+      sed -i -E "s;/usr/bin/xcrun (--sdk macosx )?clang;${stdenv'.cc}/bin/clang $NIX_CFLAGS_COMPILE $(bazelLinkFlags) -framework CoreFoundation;g" \
         scripts/bootstrap/compile.sh \
         src/tools/xcode/realpath/BUILD \
         src/tools/xcode/stdredirect/BUILD \
@@ -417,6 +418,8 @@ stdenv.mkDerivation rec {
       fetch --distdir=${distDir}
       build --copt="$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --copt="/g')"
       build --host_copt="$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --host_copt="/g')"
+      build --linkopt="$(echo $(< ${stdenv'.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --linkopt="/g')"
+      build --host_linkopt="$(echo $(< ${stdenv'.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --host_linkopt="/g')"
       build --linkopt="-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --linkopt="-Wl,/g')"
       build --host_linkopt="-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --host_linkopt="-Wl,/g')"
       build --host_javabase='@local_jdk//:jdk'
@@ -426,6 +429,8 @@ stdenv.mkDerivation rec {
       # add the same environment vars to compile.sh
       sed -e "/\$command \\\\$/a --copt=\"$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --copt=\"/g')\" \\\\" \
           -e "/\$command \\\\$/a --host_copt=\"$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --host_copt=\"/g')\" \\\\" \
+          -e "/\$command \\\\$/a --linkopt=\"$(echo $(< ${stdenv'.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --linkopt=\"/g')\" \\\\" \
+          -e "/\$command \\\\$/a --host_linkopt=\"$(echo $(< ${stdenv'.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --host_linkopt=\"/g')\" \\\\" \
           -e "/\$command \\\\$/a --linkopt=\"-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --linkopt=\"-Wl,/g')\" \\\\" \
           -e "/\$command \\\\$/a --host_linkopt=\"-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --host_linkopt=\"-Wl,/g')\" \\\\" \
           -e "/\$command \\\\$/a --host_javabase='@local_jdk//:jdk' \\\\" \
@@ -465,7 +470,7 @@ stdenv.mkDerivation rec {
     makeWrapper
     which
     customBash
-  ] ++ lib.optionals (stdenv.isDarwin) [ cctools libcxx CoreFoundation CoreServices Foundation ];
+  ] ++ lib.optionals (stdenv.isDarwin) [ cctools CoreFoundation CoreServices Foundation ];
 
   # Bazel makes extensive use of symlinks in the WORKSPACE.
   # This causes problems with infinite symlinks if the build output is in the same location as the
diff --git a/pkgs/development/tools/build-managers/bazel/bazel_1/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_1/default.nix
index eff8aede6c1..5eb0926503c 100644
--- a/pkgs/development/tools/build-managers/bazel/bazel_1/default.nix
+++ b/pkgs/development/tools/build-managers/bazel/bazel_1/default.nix
@@ -7,7 +7,7 @@
 # updater
 , python27, python3, writeScript
 # Apple dependencies
-, cctools, libcxx, CoreFoundation, CoreServices, Foundation
+, cctools, llvmPackages_8, CoreFoundation, CoreServices, Foundation
 # Allow to independently override the jdks used to build and run respectively
 , buildJdk, runJdk
 , buildJdkName
@@ -139,8 +139,10 @@ let
     '';
   };
 
+  stdenv' = if stdenv.isDarwin then llvmPackages_8.libcxxStdenv else stdenv;
+
 in
-stdenv.mkDerivation rec {
+stdenv'.mkDerivation rec {
   pname = "bazel";
   inherit version;
 
@@ -348,10 +350,10 @@ stdenv.mkDerivation rec {
 
       # libcxx includes aren't added by libcxx hook
       # https://github.com/NixOS/nixpkgs/pull/41589
-      export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem ${libcxx}/include/c++/v1"
+      export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem ${llvmPackages_8.libcxx}/include/c++/v1"
 
       # don't use system installed Xcode to run clang, use Nix clang instead
-      sed -i -E "s;/usr/bin/xcrun (--sdk macosx )?clang;${stdenv.cc}/bin/clang $NIX_CFLAGS_COMPILE $(bazelLinkFlags) -framework CoreFoundation;g" \
+      sed -i -E "s;/usr/bin/xcrun --sdk macosx clang -mmacosx-version-min=10.9;${stdenv'.cc}/bin/clang $NIX_CFLAGS_COMPILE $(bazelLinkFlags) -framework CoreFoundation;g" \
         scripts/bootstrap/compile.sh \
         src/tools/xcode/realpath/BUILD \
         src/tools/xcode/stdredirect/BUILD \
@@ -380,7 +382,7 @@ stdenv.mkDerivation rec {
       substituteInPlace tools/objc/j2objc_dead_code_pruner.py --replace "$!/usr/bin/python2.7" "#!${python27}/bin/python"
 
       # md5sum is part of coreutils
-      sed -i 's|/sbin/md5|md5sum|' \
+      sed -i 's|/sbin/md5|md5sum|g' \
         src/BUILD
 
       # substituteInPlace is rather slow, so prefilter the files with grep
@@ -417,6 +419,8 @@ stdenv.mkDerivation rec {
       fetch --distdir=${distDir}
       build --copt="$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --copt="/g')"
       build --host_copt="$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --host_copt="/g')"
+      build --linkopt="$(echo $(< ${stdenv'.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --linkopt="/g')"
+      build --host_linkopt="$(echo $(< ${stdenv'.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --host_linkopt="/g')"
       build --linkopt="-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --linkopt="-Wl,/g')"
       build --host_linkopt="-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --host_linkopt="-Wl,/g')"
       build --host_javabase='@local_jdk//:jdk'
@@ -426,6 +430,8 @@ stdenv.mkDerivation rec {
       # add the same environment vars to compile.sh
       sed -e "/\$command \\\\$/a --copt=\"$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --copt=\"/g')\" \\\\" \
           -e "/\$command \\\\$/a --host_copt=\"$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --host_copt=\"/g')\" \\\\" \
+          -e "/\$command \\\\$/a --linkopt=\"$(echo $(< ${stdenv'.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --linkopt=\"/g')\" \\\\" \
+          -e "/\$command \\\\$/a --host_linkopt=\"$(echo $(< ${stdenv'.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --host_linkopt=\"/g')\" \\\\" \
           -e "/\$command \\\\$/a --linkopt=\"-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --linkopt=\"-Wl,/g')\" \\\\" \
           -e "/\$command \\\\$/a --host_linkopt=\"-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --host_linkopt=\"-Wl,/g')\" \\\\" \
           -e "/\$command \\\\$/a --host_javabase='@local_jdk//:jdk' \\\\" \
@@ -465,7 +471,7 @@ stdenv.mkDerivation rec {
     makeWrapper
     which
     customBash
-  ] ++ lib.optionals (stdenv.isDarwin) [ cctools libcxx CoreFoundation CoreServices Foundation ];
+  ] ++ lib.optionals (stdenv.isDarwin) [ cctools CoreFoundation CoreServices Foundation ];
 
   # Bazel makes extensive use of symlinks in the WORKSPACE.
   # This causes problems with infinite symlinks if the build output is in the same location as the
diff --git a/pkgs/development/tools/build-managers/bazel/bazel_3/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_3/default.nix
index 845469e1c7d..fd29102b7e5 100644
--- a/pkgs/development/tools/build-managers/bazel/bazel_3/default.nix
+++ b/pkgs/development/tools/build-managers/bazel/bazel_3/default.nix
@@ -25,11 +25,11 @@
 }:
 
 let
-  version = "3.3.1";
+  version = "3.7.2";
 
   src = fetchurl {
     url = "https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-dist.zip";
-    sha256 = "0ir796kl8r9hpr3li26qsdy1z2lx2bv82zmk4a2s7q64clyg9wg0";
+    sha256 = "1cfrbs23lg0jnl22ddylx3clcjw7bdpbix7r5lqibab346s5n9fy";
   };
 
   # Update with `eval $(nix-build -A bazel.updater)`,
@@ -48,17 +48,21 @@ let
       srcs.bazel_skylib
       srcs.io_bazel_rules_sass
       srcs.platforms
-      (if stdenv.hostPlatform.isDarwin
-       then srcs."java_tools_javac11_darwin-v8.0.zip"
-       else srcs."java_tools_javac11_linux-v8.0.zip")
-      srcs."coverage_output_generator-v2.1.zip"
+      # `bazel query` wants all of these to be available regardless of platform.
+      srcs."java_tools_javac11_darwin-v10.0.zip"
+      srcs."java_tools_javac11_linux-v10.0.zip"
+      srcs."java_tools_javac11_windows-v10.0.zip"
+      srcs."coverage_output_generator-v2.5.zip"
       srcs.build_bazel_rules_nodejs
-      srcs."android_tools_pkg-0.19.0rc1.tar.gz"
+      srcs."android_tools_pkg-0.19.0rc3.tar.gz"
       srcs."bazel-toolchains-3.1.0.tar.gz"
+      srcs."com_github_grpc_grpc"
+      srcs.upb
       srcs.rules_pkg
       srcs.rules_cc
       srcs.rules_java
       srcs.rules_proto
+      srcs.com_google_protobuf
       ]);
 
   distDir = runCommand "bazel-deps" {} ''
@@ -97,7 +101,7 @@ let
     [ bash coreutils findutils gawk gnugrep gnutar gnused gzip which unzip file zip ];
 
   # Java toolchain used for the build and tests
-  javaToolchain = "@bazel_tools//tools/jdk:toolchain_host${buildJdkName}";
+  javaToolchain = "@bazel_tools//tools/jdk:toolchain_${buildJdkName}";
 
   platforms = lib.platforms.linux ++ lib.platforms.darwin;
 
@@ -111,7 +115,7 @@ let
   remote_java_tools = stdenv.mkDerivation {
     name = "remote_java_tools_${system}";
 
-    src = srcDepsSet."java_tools_javac11_${system}-v8.0.zip";
+    src = srcDepsSet."java_tools_javac11_${system}-v10.0.zip";
 
     nativeBuildInputs = [ autoPatchelfHook unzip ];
     buildInputs = [ gcc-unwrapped ];
@@ -131,10 +135,21 @@ let
   bazelRC = writeTextFile {
     name = "bazel-rc";
     text = ''
-      build --override_repository=${remote_java_tools.name}=${remote_java_tools}
-      build --distdir=${distDir}
       startup --server_javabase=${runJdk}
 
+      # Can't use 'common'; https://github.com/bazelbuild/bazel/issues/3054
+      # Most commands inherit from 'build' anyway.
+      build --distdir=${distDir}
+      fetch --distdir=${distDir}
+      query --distdir=${distDir}
+
+      build --override_repository=${remote_java_tools.name}=${remote_java_tools}
+      fetch --override_repository=${remote_java_tools.name}=${remote_java_tools}
+      query --override_repository=${remote_java_tools.name}=${remote_java_tools}
+
+      # Provide a default java toolchain, this will be the same as ${runJdk}
+      build --host_javabase='@local_jdk//:jdk'
+
       # load default location for the system wide configuration
       try-import /etc/bazel.bazelrc
     '';
@@ -157,13 +172,19 @@ stdenv.mkDerivation rec {
   sourceRoot = ".";
 
   patches = [
-    ./python-shebang.patch
-
     # On Darwin, the last argument to gcc is coming up as an empty string. i.e: ''
     # This is breaking the build of any C target. This patch removes the last
     # argument if it's found to be an empty string.
     ../trim-last-argument-to-gcc-if-empty.patch
 
+    # On Darwin, using clang 6 to build fails because of a linker error (see #105573),
+    # but using clang 7 fails because libarclite_macosx.a cannot be found when linking
+    # the xcode_locator tool.
+    # This patch removes using the -fobjc-arc compiler option and makes the code
+    # compile without automatic reference counting. Caveat: this leaks memory, but
+    # we accept this fact because xcode_locator is only a short-lived process used during the build.
+    ./no-arc.patch
+
     # --experimental_strict_action_env (which may one day become the default
     # see bazelbuild/bazel#2574) hardcodes the default
     # action environment to a non hermetic value (e.g. "/usr/local/bin").
@@ -350,7 +371,7 @@ stdenv.mkDerivation rec {
 
       # libcxx includes aren't added by libcxx hook
       # https://github.com/NixOS/nixpkgs/pull/41589
-      export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem ${libcxx}/include/c++/v1"
+      export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem ${lib.getDev libcxx}/include/c++/v1"
 
       # don't use system installed Xcode to run clang, use Nix clang instead
       sed -i -E "s;/usr/bin/xcrun (--sdk macosx )?clang;${stdenv.cc}/bin/clang $NIX_CFLAGS_COMPILE $(bazelLinkFlags) -framework CoreFoundation;g" \
@@ -359,6 +380,8 @@ stdenv.mkDerivation rec {
         src/tools/xcode/stdredirect/BUILD \
         tools/osx/BUILD
 
+      substituteInPlace scripts/bootstrap/compile.sh --replace ' -mmacosx-version-min=10.9' ""
+
       # nixpkgs's libSystem cannot use pthread headers directly, must import GCD headers instead
       sed -i -e "/#include <pthread\/spawn.h>/i #include <dispatch/dispatch.h>" src/main/cpp/blaze_util_darwin.cc
 
@@ -429,6 +452,8 @@ stdenv.mkDerivation rec {
       fetch --distdir=${distDir}
       build --copt="$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --copt="/g')"
       build --host_copt="$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --host_copt="/g')"
+      build --linkopt="$(echo $(< ${stdenv.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --linkopt="/g')"
+      build --host_linkopt="$(echo $(< ${stdenv.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --host_linkopt="/g')"
       build --linkopt="-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --linkopt="-Wl,/g')"
       build --host_linkopt="-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --host_linkopt="-Wl,/g')"
       build --host_javabase='@local_jdk//:jdk'
@@ -438,6 +463,8 @@ stdenv.mkDerivation rec {
       # add the same environment vars to compile.sh
       sed -e "/\$command \\\\$/a --copt=\"$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --copt=\"/g')\" \\\\" \
           -e "/\$command \\\\$/a --host_copt=\"$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --host_copt=\"/g')\" \\\\" \
+          -e "/\$command \\\\$/a --linkopt=\"$(echo $(< ${stdenv.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --linkopt=\"/g')\" \\\\" \
+          -e "/\$command \\\\$/a --host_linkopt=\"$(echo $(< ${stdenv.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --host_linkopt=\"/g')\" \\\\" \
           -e "/\$command \\\\$/a --linkopt=\"-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --linkopt=\"-Wl,/g')\" \\\\" \
           -e "/\$command \\\\$/a --host_linkopt=\"-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --host_linkopt=\"-Wl,/g')\" \\\\" \
           -e "/\$command \\\\$/a --host_javabase='@local_jdk//:jdk' \\\\" \
@@ -501,6 +528,13 @@ stdenv.mkDerivation rec {
         --output=./bazel_src/output/bazel-complete.bash \
         --prepend=./bazel_src/scripts/bazel-complete-header.bash \
         --prepend=./bazel_src/scripts/bazel-complete-template.bash
+
+    # need to change directory for bazel to find the workspace
+    cd ./bazel_src
+    # build execlog tooling
+    export HOME=$(mktemp -d)
+    ./output/bazel build  src/tools/execlog:parser_deploy.jar
+    cd -
   '';
 
   installPhase = ''
@@ -511,7 +545,15 @@ stdenv.mkDerivation rec {
     # The binary _must_ exist with this naming if your project contains a .bazelversion
     # file.
     cp ./bazel_src/scripts/packages/bazel.sh $out/bin/bazel
+
+    mkdir $out/share
+    cp ./bazel_src/bazel-bin/src/tools/execlog/parser_deploy.jar $out/share/parser_deploy.jar
     mv ./bazel_src/output/bazel $out/bin/bazel-${version}-${system}-${arch}
+    cat <<EOF > $out/bin/bazel-execlog
+    #!${runtimeShell} -e
+    ${runJdk}/bin/java -jar $out/share/parser_deploy.jar \$@
+    EOF
+    chmod +x $out/bin/bazel-execlog
 
     # shell completion files
     installShellCompletion --bash \
@@ -530,7 +572,7 @@ stdenv.mkDerivation rec {
     export TEST_TMPDIR=$(pwd)
 
     hello_test () {
-      $out/bin/bazel test --distdir=${distDir} \
+      $out/bin/bazel test \
         --test_output=errors \
         --java_toolchain='${javaToolchain}' \
         examples/cpp:hello-success_test \
diff --git a/pkgs/development/tools/build-managers/bazel/bazel_3/no-arc.patch b/pkgs/development/tools/build-managers/bazel/bazel_3/no-arc.patch
new file mode 100644
index 00000000000..012e613c2f1
--- /dev/null
+++ b/pkgs/development/tools/build-managers/bazel/bazel_3/no-arc.patch
@@ -0,0 +1,34 @@
+--- a/tools/osx/xcode_locator.m	2020-12-10 13:27:29.000000000 +0100
++++ b/tools/osx/xcode_locator.m	2021-02-01 09:09:32.159557051 +0100
+@@ -21,10 +21,6 @@
+ // 6,6.4,6.4.1 = 6.4.1
+ // 6.3,6.3.0 = 6.3
+ 
+-#if !defined(__has_feature) || !__has_feature(objc_arc)
+-#error "This file requires ARC support."
+-#endif
+-
+ #import <CoreServices/CoreServices.h>
+ #import <Foundation/Foundation.h>
+ 
+--- a/tools/osx/xcode_configure.bzl	1980-01-01 01:00:00.000000000 +0100
++++ b/tools/osx/xcode_configure.bzl	2021-02-01 09:36:57.773418444 +0100
+@@ -123,7 +123,6 @@
+         "macosx",
+         "clang",
+         "-mmacosx-version-min=10.9",
+-        "-fobjc-arc",
+         "-framework",
+         "CoreServices",
+         "-framework",
+--- a/tools/osx/BUILD	2021-02-01 11:01:02.191659553 +0100
++++ b/tools/osx/BUILD	2021-02-01 11:04:29.735071019 +0100
+@@ -27,7 +27,7 @@
+ ])
+ 
+ DARWIN_XCODE_LOCATOR_COMPILE_COMMAND = """
+-  /usr/bin/xcrun --sdk macosx clang -mmacosx-version-min=10.9 -fobjc-arc -framework CoreServices \
++  /usr/bin/xcrun --sdk macosx clang -mmacosx-version-min=10.9 -framework CoreServices \
+       -framework Foundation -o $@ $<
+ """
+ 
diff --git a/pkgs/development/tools/build-managers/bazel/bazel_3/python-shebang.patch b/pkgs/development/tools/build-managers/bazel/bazel_3/python-shebang.patch
deleted file mode 100644
index 75547264fcc..00000000000
--- a/pkgs/development/tools/build-managers/bazel/bazel_3/python-shebang.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java	2020-05-25 14:46:01.608403087 +0200
-+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java	2020-05-25 14:50:52.881398320 +0200
-@@ -238,14 +238,15 @@
-         // TODO(#8685): Remove this special-case handling as part of making the proper shebang a
-         // property of the Python toolchain configuration.
-         String pythonExecutableName = OS.getCurrent() == OS.OPENBSD ? "python3" : "python";
-+        String pythonShebang = "#!/usr/bin/env " + pythonExecutableName;
-         ruleContext.registerAction(
-             new SpawnAction.Builder()
-                 .addInput(zipFile)
-                 .addOutput(executable)
-                 .setShellCommand(
-                     shExecutable,
--                    "echo '#!/usr/bin/env "
--                        + pythonExecutableName
-+                    "echo '"
-+                        + pythonShebang
-                         + "' | cat - "
-                         + zipFile.getExecPathString()
-                         + " > "
diff --git a/pkgs/development/tools/build-managers/bazel/bazel_3/src-deps.json b/pkgs/development/tools/build-managers/bazel/bazel_3/src-deps.json
index 4007a77b065..96553d9d885 100644
--- a/pkgs/development/tools/build-managers/bazel/bazel_3/src-deps.json
+++ b/pkgs/development/tools/build-managers/bazel/bazel_3/src-deps.json
@@ -39,14 +39,6 @@
             "https://github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip"
         ]
     },
-    "8bd6cd75d03c01bb82561a96d9c1f9f7157b13d0.zip": {
-        "name": "8bd6cd75d03c01bb82561a96d9c1f9f7157b13d0.zip",
-        "sha256": "1d4dbbd1e1e9b57d40bb0ade51c9e882da7658d5bfbf22bbd15b68e7879d761f",
-        "urls": [
-            "https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/8bd6cd75d03c01bb82561a96d9c1f9f7157b13d0.zip",
-            "https://github.com/bazelbuild/rules_cc/archive/8bd6cd75d03c01bb82561a96d9c1f9f7157b13d0.zip"
-        ]
-    },
     "97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz": {
         "name": "97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz",
         "sha256": "602e7161d9195e50246177e7c55b2f39950a9cf7366f74ed5f22fd45750cd208",
@@ -55,6 +47,14 @@
             "https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz"
         ]
     },
+    "9effcbcb27f0a665f9f345030188c0b291e32482.tar.gz": {
+        "name": "9effcbcb27f0a665f9f345030188c0b291e32482.tar.gz",
+        "sha256": "61d0417abd60e65ed589c9deee7c124fe76a4106831f6ad39464e1525cef1454",
+        "urls": [
+            "https://mirror.bazel.build/github.com/protocolbuffers/upb/archive/9effcbcb27f0a665f9f345030188c0b291e32482.tar.gz",
+            "https://github.com/protocolbuffers/upb/archive/9effcbcb27f0a665f9f345030188c0b291e32482.tar.gz"
+        ]
+    },
     "android_tools_for_testing": {
         "name": "android_tools_for_testing",
         "patch_cmds": [
@@ -65,14 +65,22 @@
         "patch_cmds_win": [
             "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
         ],
-        "sha256": "761e997a9055fe5e2b70aba8d64e78d4c2113feafaa8ac81909cb63e403f3087",
-        "url": "https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.19.0rc1.tar.gz"
+        "sha256": "ea5c0589a01e2a9f43c20e5c145d3530e3b3bdbe7322789bc5da38d0ca49b837",
+        "url": "https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.19.0rc3.tar.gz"
     },
-    "android_tools_pkg-0.19.0rc1.tar.gz": {
-        "name": "android_tools_pkg-0.19.0rc1.tar.gz",
-        "sha256": "761e997a9055fe5e2b70aba8d64e78d4c2113feafaa8ac81909cb63e403f3087",
+    "android_tools_pkg-0.19.0rc3.tar.gz": {
+        "name": "android_tools_pkg-0.19.0rc3.tar.gz",
+        "sha256": "ea5c0589a01e2a9f43c20e5c145d3530e3b3bdbe7322789bc5da38d0ca49b837",
         "urls": [
-            "https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.19.0rc1.tar.gz"
+            "https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.19.0rc3.tar.gz"
+        ]
+    },
+    "b1c40e1de81913a3c40e5948f78719c28152486d.zip": {
+        "name": "b1c40e1de81913a3c40e5948f78719c28152486d.zip",
+        "sha256": "d0c573b94a6ef20ef6ff20154a23d0efcb409fb0e1ff0979cec318dfe42f0cdd",
+        "urls": [
+            "https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/b1c40e1de81913a3c40e5948f78719c28152486d.zip",
+            "https://github.com/bazelbuild/rules_cc/archive/b1c40e1de81913a3c40e5948f78719c28152486d.zip"
         ]
     },
     "bazel-toolchains-3.1.0.tar.gz": {
@@ -143,6 +151,21 @@
             "https://github.com/bazelbuild/rules_nodejs/releases/download/1.3.0/rules_nodejs-1.3.0.tar.gz"
         ]
     },
+    "com_github_grpc_grpc": {
+        "name": "com_github_grpc_grpc",
+        "patch_args": [
+            "-p1"
+        ],
+        "patches": [
+            "//third_party/grpc:grpc_1.26.0.patch"
+        ],
+        "sha256": "2fcb7f1ab160d6fd3aaade64520be3e5446fc4c6fa7ba6581afdc4e26094bd81",
+        "strip_prefix": "grpc-1.26.0",
+        "urls": [
+            "https://mirror.bazel.build/github.com/grpc/grpc/archive/v1.26.0.tar.gz",
+            "https://github.com/grpc/grpc/archive/v1.26.0.tar.gz"
+        ]
+    },
     "com_google_googletest": {
         "name": "com_google_googletest",
         "sha256": "9dc9157a9a1551ec7a7e43daea9a694a0bb5fb8bec81235d8a1e6ef64c716dcb",
@@ -166,20 +189,20 @@
             "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
         ],
         "patches": [
-            "//third_party/protobuf:3.11.3.patch"
+            "//third_party/protobuf:3.13.0.patch"
         ],
-        "sha256": "cf754718b0aa945b00550ed7962ddc167167bd922b842199eeb6505e6f344852",
-        "strip_prefix": "protobuf-3.11.3",
+        "sha256": "9b4ee22c250fe31b16f1a24d61467e40780a3fbb9b91c3b65be2a376ed913a1a",
+        "strip_prefix": "protobuf-3.13.0",
         "urls": [
-            "https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v3.11.3.tar.gz",
-            "https://github.com/protocolbuffers/protobuf/archive/v3.11.3.tar.gz"
+            "https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v3.13.0.tar.gz",
+            "https://github.com/protocolbuffers/protobuf/archive/v3.13.0.tar.gz"
         ]
     },
-    "coverage_output_generator-v2.1.zip": {
-        "name": "coverage_output_generator-v2.1.zip",
-        "sha256": "96ac6bc9b9fbc67b532bcae562da1642409791e6a4b8e522f04946ee5cc3ff8e",
+    "coverage_output_generator-v2.5.zip": {
+        "name": "coverage_output_generator-v2.5.zip",
+        "sha256": "cd14f1cb4559e4723e63b7e7b06d09fcc3bd7ba58d03f354cdff1439bd936a7d",
         "urls": [
-            "https://mirror.bazel.build/bazel_coverage_output_generator/releases/coverage_output_generator-v2.1.zip"
+            "https://mirror.bazel.build/bazel_coverage_output_generator/releases/coverage_output_generator-v2.5.zip"
         ]
     },
     "desugar_jdk_libs": {
@@ -199,6 +222,14 @@
             "https://github.com/google/desugar_jdk_libs/archive/e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip"
         ]
     },
+    "e982924acee7f7313b4baa4ee5ec000c5e373c30.tar.gz": {
+        "name": "e982924acee7f7313b4baa4ee5ec000c5e373c30.tar.gz",
+        "sha256": "e8c2751ddc70fed9dc6f999acd92e232d5846f009ee1674f8aee81f19b2b915a",
+        "urls": [
+            "https://mirror.bazel.build/github.com/c-ares/c-ares/archive/e982924acee7f7313b4baa4ee5ec000c5e373c30.tar.gz",
+            "https://github.com/c-ares/c-ares/archive/e982924acee7f7313b4baa4ee5ec000c5e373c30.tar.gz"
+        ]
+    },
     "io_bazel_rules_sass": {
         "name": "io_bazel_rules_sass",
         "sha256": "c78be58f5e0a29a04686b628cf54faaee0094322ae0ac99da5a8a8afca59a647",
@@ -217,25 +248,25 @@
             "https://github.com/bazelbuild/stardoc/archive/1ef781ced3b1443dca3ed05dec1989eca1a4e1cd.tar.gz"
         ]
     },
-    "java_tools_javac11_darwin-v8.0.zip": {
-        "name": "java_tools_javac11_darwin-v8.0.zip",
-        "sha256": "e0291e8956ac295143da4a673ca50727f7376665ee82b649a4ee810b64ff76c1",
+    "java_tools_javac11_darwin-v10.0.zip": {
+        "name": "java_tools_javac11_darwin-v10.0.zip",
+        "sha256": "64e5de2175dfccb96831573946b80d106edf3801d9db38b564514bf3581d466b",
         "urls": [
-            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v8.0/java_tools_javac11_darwin-v8.0.zip"
+            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v10.0/java_tools_javac11_darwin-v10.0.zip"
         ]
     },
-    "java_tools_javac11_linux-v8.0.zip": {
-        "name": "java_tools_javac11_linux-v8.0.zip",
-        "sha256": "c24aef916cc5a8e9f6d53db1f93c54fe5790a58996a1099592e1dfe992acc81e",
+    "java_tools_javac11_linux-v10.0.zip": {
+        "name": "java_tools_javac11_linux-v10.0.zip",
+        "sha256": "69e65353c2cd65780abcbcce4daae973599298273b0f8b4d469eed822cb220d1",
         "urls": [
-            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v8.0/java_tools_javac11_linux-v8.0.zip"
+            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v10.0/java_tools_javac11_linux-v10.0.zip"
         ]
     },
-    "java_tools_javac11_windows-v8.0.zip": {
-        "name": "java_tools_javac11_windows-v8.0.zip",
-        "sha256": "444c391977e50af4e10549a28d021069d2ca7745a0e7b9b968a7b153fe3ea430",
+    "java_tools_javac11_windows-v10.0.zip": {
+        "name": "java_tools_javac11_windows-v10.0.zip",
+        "sha256": "d2f62af8daa0a3d55789b605f6582e37038329c64843337c71e64515468e55c4",
         "urls": [
-            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v8.0/java_tools_javac11_windows-v8.0.zip"
+            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v10.0/java_tools_javac11_windows-v10.0.zip"
         ]
     },
     "java_tools_langtools_javac11": {
@@ -245,13 +276,6 @@
             "https://mirror.bazel.build/bazel_java_tools/jdk_langtools/langtools_jdk11_v2.zip"
         ]
     },
-    "java_tools_langtools_javac12": {
-        "name": "java_tools_langtools_javac12",
-        "sha256": "99b107105165a91df82cd7cf82a8efb930d803fb7de1663cf7f780142104cd14",
-        "urls": [
-            "https://mirror.bazel.build/bazel_java_tools/jdk_langtools/langtools_jdk12.zip"
-        ]
-    },
     "openjdk11_darwin_archive": {
         "build_file_content": "\njava_runtime(name = 'runtime', srcs =  glob(['**']), visibility = ['//visibility:public'])\nexports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])\n",
         "name": "openjdk11_darwin_archive",
@@ -279,31 +303,31 @@
             "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip"
         ]
     },
-    "openjdk12_darwin_archive": {
+    "openjdk14_darwin_archive": {
         "build_file_content": "\njava_runtime(name = 'runtime', srcs =  glob(['**']), visibility = ['//visibility:public'])\nexports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])\n",
-        "name": "openjdk12_darwin_archive",
-        "sha256": "67ca9d285056132ebb19fa237a14affda52132142e1171fe1c20e18974b3b8a5",
-        "strip_prefix": "zulu12.2.3-ca-jdk12.0.1-macosx_x64",
+        "name": "openjdk14_darwin_archive",
+        "sha256": "088bd4d0890acc9f032b738283bf0f26b2a55c50b02d1c8a12c451d8ddf080dd",
+        "strip_prefix": "zulu14.28.21-ca-jdk14.0.1-macosx_x64",
         "urls": [
-            "https://mirror.bazel.build/openjdk/azul-zulu12.2.3-ca-jdk12.0.1/zulu12.2.3-ca-jdk12.0.1-macosx_x64.tar.gz"
+            "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu14.28.21-ca-jdk14.0.1-macosx_x64.tar.gz"
         ]
     },
-    "openjdk12_linux_archive": {
+    "openjdk14_linux_archive": {
         "build_file_content": "\njava_runtime(name = 'runtime', srcs =  glob(['**']), visibility = ['//visibility:public'])\nexports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])\n",
-        "name": "openjdk12_linux_archive",
-        "sha256": "529c99841d69e11a85aea967ccfb9d0fd40b98c5b68dbe1d059002655e0a9c13",
-        "strip_prefix": "zulu12.2.3-ca-jdk12.0.1-linux_x64",
+        "name": "openjdk14_linux_archive",
+        "sha256": "48bb8947034cd079ad1ef83335e7634db4b12a26743a0dc314b6b861480777aa",
+        "strip_prefix": "zulu14.28.21-ca-jdk14.0.1-linux_x64",
         "urls": [
-            "https://mirror.bazel.build/openjdk/azul-zulu12.2.3-ca-jdk12.0.1/zulu12.2.3-ca-jdk12.0.1-linux_x64.tar.gz"
+            "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu14.28.21-ca-jdk14.0.1-linux_x64.tar.gz"
         ]
     },
-    "openjdk12_windows_archive": {
+    "openjdk14_windows_archive": {
         "build_file_content": "\njava_runtime(name = 'runtime', srcs =  glob(['**']), visibility = ['//visibility:public'])\nexports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])\n",
-        "name": "openjdk12_windows_archive",
-        "sha256": "cf28404c23c3aa1115363ba6e796c30580a768e1d7d6681a7d053e516008e00d",
-        "strip_prefix": "zulu12.2.3-ca-jdk12.0.1-win_x64",
+        "name": "openjdk14_windows_archive",
+        "sha256": "9cb078b5026a900d61239c866161f0d9558ec759aa15c5b4c7e905370e868284",
+        "strip_prefix": "zulu14.28.21-ca-jdk14.0.1-win_x64",
         "urls": [
-            "https://mirror.bazel.build/openjdk/azul-zulu12.2.3-ca-jdk12.0.1/zulu12.2.3-ca-jdk12.0.1-win_x64.zip"
+            "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu14.28.21-ca-jdk14.0.1-win_x64.zip"
         ]
     },
     "openjdk_linux": {
@@ -351,8 +375,17 @@
         "name": "openjdk_linux_ppc64le_vanilla",
         "sha256": "a417db0295b1f4b538ecbaf7c774f3a177fab9657a665940170936c0eca4e71a",
         "urls": [
-            "https://mirror.bazel.build/openjdk/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7%2B10/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.7_10.tar.gz",
-            "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7%2B10/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.7_10.tar.gz"
+            "https://mirror.bazel.build/openjdk/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7+10/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.7_10.tar.gz",
+            "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7+10/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.7_10.tar.gz"
+        ]
+    },
+    "openjdk_linux_s390x_vanilla": {
+        "downloaded_file_path": "adoptopenjdk-s390x-vanilla.tar.gz",
+        "name": "openjdk_linux_s390x_vanilla",
+        "sha256": "d9b72e87a1d3ebc0c9552f72ae5eb150fffc0298a7cb841f1ce7bfc70dcd1059",
+        "urls": [
+            "https://mirror.bazel.build/github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7+10/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.7_10.tar.gz",
+            "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7+10/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.7_10.tar.gz"
         ]
     },
     "openjdk_linux_vanilla": {
@@ -430,9 +463,9 @@
         "patch_cmds_win": [
             "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
         ],
-        "sha256": "96ac6bc9b9fbc67b532bcae562da1642409791e6a4b8e522f04946ee5cc3ff8e",
+        "sha256": "cd14f1cb4559e4723e63b7e7b06d09fcc3bd7ba58d03f354cdff1439bd936a7d",
         "urls": [
-            "https://mirror.bazel.build/bazel_coverage_output_generator/releases/coverage_output_generator-v2.1.zip"
+            "https://mirror.bazel.build/bazel_coverage_output_generator/releases/coverage_output_generator-v2.5.zip"
         ]
     },
     "remote_java_tools_darwin_for_testing": {
@@ -445,10 +478,10 @@
         "patch_cmds_win": [
             "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
         ],
-        "sha256": "e0291e8956ac295143da4a673ca50727f7376665ee82b649a4ee810b64ff76c1",
+        "sha256": "64e5de2175dfccb96831573946b80d106edf3801d9db38b564514bf3581d466b",
         "urls": [
-            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v8.0/java_tools_javac11_darwin-v8.0.zip",
-            "https://github.com/bazelbuild/java_tools/releases/download/javac11_v8.0/java_tools_javac11_darwin-v8.0.zip"
+            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v10.0/java_tools_javac11_darwin-v10.0.zip",
+            "https://github.com/bazelbuild/java_tools/releases/download/javac11_v10.0/java_tools_javac11_darwin-v10.0.zip"
         ]
     },
     "remote_java_tools_javac11_test_darwin": {
@@ -461,9 +494,9 @@
         "patch_cmds_win": [
             "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
         ],
-        "sha256": "e0291e8956ac295143da4a673ca50727f7376665ee82b649a4ee810b64ff76c1",
+        "sha256": "64e5de2175dfccb96831573946b80d106edf3801d9db38b564514bf3581d466b",
         "urls": [
-            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v8.0/java_tools_javac11_darwin-v8.0.zip"
+            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v10.0/java_tools_javac11_darwin-v10.0.zip"
         ]
     },
     "remote_java_tools_javac11_test_linux": {
@@ -476,9 +509,9 @@
         "patch_cmds_win": [
             "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
         ],
-        "sha256": "c24aef916cc5a8e9f6d53db1f93c54fe5790a58996a1099592e1dfe992acc81e",
+        "sha256": "69e65353c2cd65780abcbcce4daae973599298273b0f8b4d469eed822cb220d1",
         "urls": [
-            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v8.0/java_tools_javac11_linux-v8.0.zip"
+            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v10.0/java_tools_javac11_linux-v10.0.zip"
         ]
     },
     "remote_java_tools_javac11_test_windows": {
@@ -491,54 +524,9 @@
         "patch_cmds_win": [
             "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
         ],
-        "sha256": "444c391977e50af4e10549a28d021069d2ca7745a0e7b9b968a7b153fe3ea430",
-        "urls": [
-            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v8.0/java_tools_javac11_windows-v8.0.zip"
-        ]
-    },
-    "remote_java_tools_javac12_test_darwin": {
-        "name": "remote_java_tools_javac12_test_darwin",
-        "patch_cmds": [
-            "test -f BUILD && chmod u+w BUILD || true",
-            "echo >> BUILD",
-            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD"
-        ],
-        "patch_cmds_win": [
-            "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
-        ],
-        "sha256": "54df966e7583bafe659e39b4103a4ce934201d969de638d071ada07d8e0c1a3a",
-        "urls": [
-            "https://mirror.bazel.build/bazel_java_tools/releases/javac12/v3.0/java_tools_javac12_darwin-v3.0.zip"
-        ]
-    },
-    "remote_java_tools_javac12_test_linux": {
-        "name": "remote_java_tools_javac12_test_linux",
-        "patch_cmds": [
-            "test -f BUILD && chmod u+w BUILD || true",
-            "echo >> BUILD",
-            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD"
-        ],
-        "patch_cmds_win": [
-            "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
-        ],
-        "sha256": "3997ee9a57b095748f1c0d084839fab2fbc72504aeb7b37b1f71c31738d330e3",
+        "sha256": "d2f62af8daa0a3d55789b605f6582e37038329c64843337c71e64515468e55c4",
         "urls": [
-            "https://mirror.bazel.build/bazel_java_tools/releases/javac12/v3.0/java_tools_javac12_linux-v3.0.zip"
-        ]
-    },
-    "remote_java_tools_javac12_test_windows": {
-        "name": "remote_java_tools_javac12_test_windows",
-        "patch_cmds": [
-            "test -f BUILD && chmod u+w BUILD || true",
-            "echo >> BUILD",
-            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD"
-        ],
-        "patch_cmds_win": [
-            "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
-        ],
-        "sha256": "cfad1718dad1fed12816748eed27ab30b9ea1268c8ce9940acf3b5b7d82d483d",
-        "urls": [
-            "https://mirror.bazel.build/bazel_java_tools/releases/javac12/v3.0/java_tools_javac12_windows-v3.0.zip"
+            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v10.0/java_tools_javac11_windows-v10.0.zip"
         ]
     },
     "remote_java_tools_linux_for_testing": {
@@ -551,10 +539,10 @@
         "patch_cmds_win": [
             "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
         ],
-        "sha256": "c24aef916cc5a8e9f6d53db1f93c54fe5790a58996a1099592e1dfe992acc81e",
+        "sha256": "69e65353c2cd65780abcbcce4daae973599298273b0f8b4d469eed822cb220d1",
         "urls": [
-            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v8.0/java_tools_javac11_linux-v8.0.zip",
-            "https://github.com/bazelbuild/java_tools/releases/download/javac11_v8.0/java_tools_javac11_linux-v8.0.zip"
+            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v10.0/java_tools_javac11_linux-v10.0.zip",
+            "https://github.com/bazelbuild/java_tools/releases/download/javac11_v10.0/java_tools_javac11_linux-v10.0.zip"
         ]
     },
     "remote_java_tools_windows_for_testing": {
@@ -567,10 +555,10 @@
         "patch_cmds_win": [
             "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
         ],
-        "sha256": "444c391977e50af4e10549a28d021069d2ca7745a0e7b9b968a7b153fe3ea430",
+        "sha256": "d2f62af8daa0a3d55789b605f6582e37038329c64843337c71e64515468e55c4",
         "urls": [
-            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v8.0/java_tools_javac11_windows-v8.0.zip",
-            "https://github.com/bazelbuild/java_tools/releases/download/javac11_v8.0/java_tools_javac11_windows-v8.0.zip"
+            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v10.0/java_tools_javac11_windows-v10.0.zip",
+            "https://github.com/bazelbuild/java_tools/releases/download/javac11_v10.0/java_tools_javac11_windows-v10.0.zip"
         ]
     },
     "remotejdk11_linux_aarch64_for_testing": {
@@ -621,8 +609,26 @@
         "sha256": "a417db0295b1f4b538ecbaf7c774f3a177fab9657a665940170936c0eca4e71a",
         "strip_prefix": "jdk-11.0.7+10",
         "urls": [
-            "https://mirror.bazel.build/openjdk/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7%2B10/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.7_10.tar.gz",
-            "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7%2B10/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.7_10.tar.gz"
+            "https://mirror.bazel.build/openjdk/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7+10/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.7_10.tar.gz",
+            "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7+10/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.7_10.tar.gz"
+        ]
+    },
+    "remotejdk11_linux_s390x_for_testing": {
+        "build_file": "@local_jdk//:BUILD.bazel",
+        "name": "remotejdk11_linux_s390x_for_testing",
+        "patch_cmds": [
+            "test -f BUILD.bazel && chmod u+w BUILD.bazel || true",
+            "echo >> BUILD.bazel",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD.bazel"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD.bazel -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "d9b72e87a1d3ebc0c9552f72ae5eb150fffc0298a7cb841f1ce7bfc70dcd1059",
+        "strip_prefix": "jdk-11.0.7+10",
+        "urls": [
+            "https://mirror.bazel.build/github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7+10/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.7_10.tar.gz",
+            "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7+10/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.7_10.tar.gz"
         ]
     },
     "remotejdk11_macos_for_testing": {
@@ -659,6 +665,57 @@
             "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip"
         ]
     },
+    "remotejdk14_linux_for_testing": {
+        "build_file": "@local_jdk//:BUILD.bazel",
+        "name": "remotejdk14_linux_for_testing",
+        "patch_cmds": [
+            "test -f BUILD.bazel && chmod u+w BUILD.bazel || true",
+            "echo >> BUILD.bazel",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD.bazel"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD.bazel -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "48bb8947034cd079ad1ef83335e7634db4b12a26743a0dc314b6b861480777aa",
+        "strip_prefix": "zulu14.28.21-ca-jdk14.0.1-linux_x64",
+        "urls": [
+            "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu14.28.21-ca-jdk14.0.1-linux_x64.tar.gz"
+        ]
+    },
+    "remotejdk14_macos_for_testing": {
+        "build_file": "@local_jdk//:BUILD.bazel",
+        "name": "remotejdk14_macos_for_testing",
+        "patch_cmds": [
+            "test -f BUILD.bazel && chmod u+w BUILD.bazel || true",
+            "echo >> BUILD.bazel",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD.bazel"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD.bazel -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "088bd4d0890acc9f032b738283bf0f26b2a55c50b02d1c8a12c451d8ddf080dd",
+        "strip_prefix": "zulu14.28.21-ca-jdk14.0.1-macosx_x64",
+        "urls": [
+            "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu14.28.21-ca-jdk14.0.1-macosx_x64.tar.gz"
+        ]
+    },
+    "remotejdk14_win_for_testing": {
+        "build_file": "@local_jdk//:BUILD.bazel",
+        "name": "remotejdk14_win_for_testing",
+        "patch_cmds": [
+            "test -f BUILD.bazel && chmod u+w BUILD.bazel || true",
+            "echo >> BUILD.bazel",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD.bazel"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD.bazel -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "9cb078b5026a900d61239c866161f0d9558ec759aa15c5b4c7e905370e868284",
+        "strip_prefix": "zulu14.28.21-ca-jdk14.0.1-win_x64",
+        "urls": [
+            "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu14.28.21-ca-jdk14.0.1-win_x64.zip"
+        ]
+    },
     "rules_cc": {
         "name": "rules_cc",
         "patch_cmds": [
@@ -669,11 +726,11 @@
         "patch_cmds_win": [
             "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
         ],
-        "sha256": "1d4dbbd1e1e9b57d40bb0ade51c9e882da7658d5bfbf22bbd15b68e7879d761f",
-        "strip_prefix": "rules_cc-8bd6cd75d03c01bb82561a96d9c1f9f7157b13d0",
+        "sha256": "d0c573b94a6ef20ef6ff20154a23d0efcb409fb0e1ff0979cec318dfe42f0cdd",
+        "strip_prefix": "rules_cc-b1c40e1de81913a3c40e5948f78719c28152486d",
         "urls": [
-            "https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/8bd6cd75d03c01bb82561a96d9c1f9f7157b13d0.zip",
-            "https://github.com/bazelbuild/rules_cc/archive/8bd6cd75d03c01bb82561a96d9c1f9f7157b13d0.zip"
+            "https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/b1c40e1de81913a3c40e5948f78719c28152486d.zip",
+            "https://github.com/bazelbuild/rules_cc/archive/b1c40e1de81913a3c40e5948f78719c28152486d.zip"
         ]
     },
     "rules_java": {
@@ -742,12 +799,35 @@
             "https://github.com/bazelbuild/rules_proto/archive/97d8af4dc474595af3900dd85cb3a29ad28cc313.tar.gz"
         ]
     },
-    "v3.11.3.tar.gz": {
-        "name": "v3.11.3.tar.gz",
-        "sha256": "cf754718b0aa945b00550ed7962ddc167167bd922b842199eeb6505e6f344852",
+    "upb": {
+        "name": "upb",
+        "patch_args": [
+            "-p1"
+        ],
+        "patches": [
+            "//third_party/grpc:upb_gcc10_fix.patch"
+        ],
+        "sha256": "61d0417abd60e65ed589c9deee7c124fe76a4106831f6ad39464e1525cef1454",
+        "strip_prefix": "upb-9effcbcb27f0a665f9f345030188c0b291e32482",
+        "urls": [
+            "https://mirror.bazel.build/github.com/protocolbuffers/upb/archive/9effcbcb27f0a665f9f345030188c0b291e32482.tar.gz",
+            "https://github.com/protocolbuffers/upb/archive/9effcbcb27f0a665f9f345030188c0b291e32482.tar.gz"
+        ]
+    },
+    "v1.26.0.tar.gz": {
+        "name": "v1.26.0.tar.gz",
+        "sha256": "2fcb7f1ab160d6fd3aaade64520be3e5446fc4c6fa7ba6581afdc4e26094bd81",
+        "urls": [
+            "https://mirror.bazel.build/github.com/grpc/grpc/archive/v1.26.0.tar.gz",
+            "https://github.com/grpc/grpc/archive/v1.26.0.tar.gz"
+        ]
+    },
+    "v3.13.0.tar.gz": {
+        "name": "v3.13.0.tar.gz",
+        "sha256": "9b4ee22c250fe31b16f1a24d61467e40780a3fbb9b91c3b65be2a376ed913a1a",
         "urls": [
-            "https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v3.11.3.tar.gz",
-            "https://github.com/protocolbuffers/protobuf/archive/v3.11.3.tar.gz"
+            "https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v3.13.0.tar.gz",
+            "https://github.com/protocolbuffers/protobuf/archive/v3.13.0.tar.gz"
         ]
     },
     "zulu11.37.17-ca-jdk11.0.6-linux_x64.tar.gz": {
diff --git a/pkgs/development/tools/build-managers/bazel/bazel_4/default.nix b/pkgs/development/tools/build-managers/bazel/bazel_4/default.nix
new file mode 100644
index 00000000000..6cd378492e3
--- /dev/null
+++ b/pkgs/development/tools/build-managers/bazel/bazel_4/default.nix
@@ -0,0 +1,674 @@
+{ stdenv, callPackage, lib, fetchurl, fetchFromGitHub, installShellFiles
+, runCommand, runCommandCC, makeWrapper, recurseIntoAttrs
+# this package (through the fixpoint glass)
+, bazel_self
+# needed only for the updater
+, bazel_3
+, lr, xe, zip, unzip, bash, writeCBin, coreutils
+, which, gawk, gnused, gnutar, gnugrep, gzip, findutils
+# updater
+, python27, python3, writeScript
+# Apple dependencies
+, cctools, libcxx, CoreFoundation, CoreServices, Foundation
+# Allow to independently override the jdks used to build and run respectively
+, buildJdk, runJdk
+, buildJdkName
+, runtimeShell
+# Downstream packages for tests
+, bazel-watcher
+# Always assume all markers valid (this is needed because we remove markers; they are non-deterministic).
+# Also, don't clean up environment variables (so that NIX_ environment variables are passed to compilers).
+, enableNixHacks ? false
+, gcc-unwrapped
+, autoPatchelfHook
+, file
+, substituteAll
+, writeTextFile
+}:
+
+let
+  version = "4.1.0";
+  sourceRoot = ".";
+
+  src = fetchurl {
+    url = "https://github.com/bazelbuild/bazel/releases/download/${version}/bazel-${version}-dist.zip";
+    sha256 = "1svf9n345m0ag05hlcw3cwsl6bw2imcn4da25yyzcl3ar5axfxzk";
+  };
+
+  # Update with `eval $(nix-build -A bazel.updater)`,
+  # then add new dependencies from the dict in ./src-deps.json as required.
+  srcDeps = lib.attrsets.attrValues srcDepsSet;
+  srcDepsSet =
+    let
+      srcs = (builtins.fromJSON (builtins.readFile ./src-deps.json));
+      toFetchurl = d: lib.attrsets.nameValuePair d.name (fetchurl {
+        urls = d.urls;
+        sha256 = d.sha256;
+        });
+        in builtins.listToAttrs (map toFetchurl [
+      srcs.desugar_jdk_libs
+      srcs.io_bazel_skydoc
+      srcs.bazel_skylib
+      srcs.io_bazel_rules_sass
+      srcs.platforms
+      (if stdenv.hostPlatform.isDarwin
+       then srcs."java_tools_javac11_darwin-v10.6.zip"
+       else srcs."java_tools_javac11_linux-v10.6.zip")
+      srcs."coverage_output_generator-v2.5.zip"
+      srcs.build_bazel_rules_nodejs
+      srcs."android_tools_pkg-0.19.0rc3.tar.gz"
+      srcs.bazel_toolchains
+      srcs.com_github_grpc_grpc
+      srcs.upb
+      srcs.com_google_protobuf
+      srcs.rules_pkg
+      srcs.rules_cc
+      srcs.rules_java
+      srcs.rules_proto
+      srcs.com_google_absl
+      srcs.com_github_google_re2
+      srcs.com_github_cares_cares
+      ]);
+
+  distDir = runCommand "bazel-deps" {} ''
+    mkdir -p $out
+    for i in ${builtins.toString srcDeps}; do cp $i $out/$(stripHash $i); done
+  '';
+
+  defaultShellPath = lib.makeBinPath
+    # Keep this list conservative. For more exotic tools, prefer to use
+    # @rules_nixpkgs to pull in tools from the nix repository. Example:
+    #
+    # WORKSPACE:
+    #
+    #     nixpkgs_git_repository(
+    #         name = "nixpkgs",
+    #         revision = "def5124ec8367efdba95a99523dd06d918cb0ae8",
+    #     )
+    #
+    #     # This defines an external Bazel workspace.
+    #     nixpkgs_package(
+    #         name = "bison",
+    #         repositories = { "nixpkgs": "@nixpkgs//:default.nix" },
+    #     )
+    #
+    # some/BUILD.bazel:
+    #
+    #     genrule(
+    #        ...
+    #        cmd = "$(location @bison//:bin/bison) -other -args",
+    #        tools = [
+    #            ...
+    #            "@bison//:bin/bison",
+    #        ],
+    #     )
+    #
+    [ bash coreutils findutils gawk gnugrep gnutar gnused gzip which unzip file zip python27 python3 ];
+
+  # Java toolchain used for the build and tests
+  javaToolchain = "@bazel_tools//tools/jdk:toolchain_${buildJdkName}";
+
+  platforms = lib.platforms.linux ++ lib.platforms.darwin;
+
+  # This repository is fetched by bazel at runtime
+  # however it contains prebuilt java binaries, with wrong interpreter
+  # and libraries path.
+  # We prefetch it, patch it, and override it in a global bazelrc.
+  system = if stdenv.hostPlatform.isDarwin then "darwin" else "linux";
+  arch = stdenv.hostPlatform.parsed.cpu.name;
+
+  remote_java_tools = stdenv.mkDerivation {
+    name = "remote_java_tools_${system}";
+
+    src = srcDepsSet."java_tools_javac11_${system}-v10.6.zip";
+
+    nativeBuildInputs = [ autoPatchelfHook unzip ];
+    buildInputs = [ gcc-unwrapped ];
+
+    sourceRoot = ".";
+
+    buildPhase = ''
+      runHook preBuild
+
+      mkdir $out;
+
+      runHook postBuild
+    '';
+
+    installPhase = ''
+      runHook preInstall
+
+      cp -Ra * $out/
+      touch $out/WORKSPACE
+
+      runHook postInstall
+    '';
+  };
+
+  bazelRC = writeTextFile {
+    name = "bazel-rc";
+    text = ''
+      startup --server_javabase=${runJdk}
+
+      # Can't use 'common'; https://github.com/bazelbuild/bazel/issues/3054
+      # Most commands inherit from 'build' anyway.
+      build --distdir=${distDir}
+      fetch --distdir=${distDir}
+      query --distdir=${distDir}
+
+      build --override_repository=${remote_java_tools.name}=${remote_java_tools}
+      fetch --override_repository=${remote_java_tools.name}=${remote_java_tools}
+      query --override_repository=${remote_java_tools.name}=${remote_java_tools}
+
+      # Provide a default java toolchain, this will be the same as ${runJdk}
+      build --host_javabase='@local_jdk//:jdk'
+
+      # load default location for the system wide configuration
+      try-import /etc/bazel.bazelrc
+    '';
+  };
+
+in
+stdenv.mkDerivation rec {
+  pname = "bazel";
+  inherit version;
+
+  meta = with lib; {
+    homepage = "https://github.com/bazelbuild/bazel/";
+    description = "Build tool that builds code quickly and reliably";
+    license = licenses.asl20;
+    maintainers = [ maintainers.mboes ];
+    inherit platforms;
+  };
+
+  inherit src;
+  inherit sourceRoot;
+  patches = [
+    # On Darwin, the last argument to gcc is coming up as an empty string. i.e: ''
+    # This is breaking the build of any C target. This patch removes the last
+    # argument if it's found to be an empty string.
+    ../trim-last-argument-to-gcc-if-empty.patch
+
+    # On Darwin, using clang 6 to build fails because of a linker error (see #105573),
+    # but using clang 7 fails because libarclite_macosx.a cannot be found when linking
+    # the xcode_locator tool.
+    # This patch removes using the -fobjc-arc compiler option and makes the code
+    # compile without automatic reference counting. Caveat: this leaks memory, but
+    # we accept this fact because xcode_locator is only a short-lived process used during the build.
+    ./no-arc.patch
+
+    # --experimental_strict_action_env (which may one day become the default
+    # see bazelbuild/bazel#2574) hardcodes the default
+    # action environment to a non hermetic value (e.g. "/usr/local/bin").
+    # This is non hermetic on non-nixos systems. On NixOS, bazel cannot find the required binaries.
+    # So we are replacing this bazel paths by defaultShellPath,
+    # improving hermeticity and making it work in nixos.
+    (substituteAll {
+      src = ../strict_action_env.patch;
+      strictActionEnvPatch = defaultShellPath;
+    })
+
+    # bazel reads its system bazelrc in /etc
+    # override this path to a builtin one
+    (substituteAll {
+      src = ../bazel_rc.patch;
+      bazelSystemBazelRCPath = bazelRC;
+    })
+  ] ++ lib.optional enableNixHacks ../nix-hacks.patch;
+
+
+  # Additional tests that check bazel’s functionality. Execute
+  #
+  #     nix-build . -A bazel.tests
+  #
+  # in the nixpkgs checkout root to exercise them locally.
+  passthru.tests =
+    let
+      runLocal = name: attrs: script:
+      let
+        attrs' = removeAttrs attrs [ "buildInputs" ];
+        buildInputs = [ python3 ] ++ (attrs.buildInputs or []);
+      in
+      runCommandCC name ({
+        inherit buildInputs;
+        preferLocalBuild = true;
+        meta.platforms = platforms;
+      } // attrs') script;
+
+      # bazel wants to extract itself into $install_dir/install every time it runs,
+      # so let’s do that only once.
+      extracted = bazelPkg:
+        let install_dir =
+          # `install_base` field printed by `bazel info`, minus the hash.
+          # yes, this path is kinda magic. Sorry.
+          "$HOME/.cache/bazel/_bazel_nixbld";
+        in runLocal "bazel-extracted-homedir" { passthru.install_dir = install_dir; } ''
+            export HOME=$(mktemp -d)
+            touch WORKSPACE # yeah, everything sucks
+            install_base="$(${bazelPkg}/bin/bazel info | grep install_base)"
+            # assert it’s actually below install_dir
+            [[ "$install_base" =~ ${install_dir} ]] \
+              || (echo "oh no! $install_base but we are \
+            trying to copy ${install_dir} to $out instead!"; exit 1)
+            cp -R ${install_dir} $out
+          '';
+
+      bazelTest = { name, bazelScript, workspaceDir, bazelPkg, buildInputs ? [] }:
+        let
+          be = extracted bazelPkg;
+        in runLocal name { inherit buildInputs; } (
+          # skip extraction caching on Darwin, because nobody knows how Darwin works
+          (lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
+            # set up home with pre-unpacked bazel
+            export HOME=$(mktemp -d)
+            mkdir -p ${be.install_dir}
+            cp -R ${be}/install ${be.install_dir}
+
+            # https://stackoverflow.com/questions/47775668/bazel-how-to-skip-corrupt-installation-on-centos6
+            # Bazel checks whether the mtime of the install dir files
+            # is >9 years in the future, otherwise it extracts itself again.
+            # see PosixFileMTime::IsUntampered in src/main/cpp/util
+            # What the hell bazel.
+            ${lr}/bin/lr -0 -U ${be.install_dir} | ${xe}/bin/xe -N0 -0 touch --date="9 years 6 months" {}
+          '')
+          +
+          ''
+            # Note https://github.com/bazelbuild/bazel/issues/5763#issuecomment-456374609
+            # about why to create a subdir for the workspace.
+            cp -r ${workspaceDir} wd && chmod u+w wd && cd wd
+
+            ${bazelScript}
+
+            touch $out
+          '');
+
+      bazelWithNixHacks = bazel_self.override { enableNixHacks = true; };
+
+      bazel-examples = fetchFromGitHub {
+        owner = "bazelbuild";
+        repo = "examples";
+        rev = "4183fc709c26a00366665e2d60d70521dc0b405d";
+        sha256 = "1mm4awx6sa0myiz9j4hwp71rpr7yh8vihf3zm15n2ii6xb82r31k";
+      };
+
+    in (if !stdenv.hostPlatform.isDarwin then {
+      # `extracted` doesn’t work on darwin
+      shebang = callPackage ../shebang-test.nix { inherit runLocal extracted bazelTest distDir; };
+    } else {}) // {
+      bashTools = callPackage ../bash-tools-test.nix { inherit runLocal bazelTest distDir; };
+      cpp = callPackage ../cpp-test.nix { inherit runLocal bazelTest bazel-examples distDir; };
+      java = callPackage ../java-test.nix { inherit runLocal bazelTest bazel-examples distDir; };
+      protobuf = callPackage ../protobuf-test.nix { inherit runLocal bazelTest distDir; };
+      pythonBinPath = callPackage ../python-bin-path-test.nix { inherit runLocal bazelTest distDir; };
+
+      bashToolsWithNixHacks = callPackage ../bash-tools-test.nix { inherit runLocal bazelTest distDir; bazel = bazelWithNixHacks; };
+
+      cppWithNixHacks = callPackage ../cpp-test.nix { inherit runLocal bazelTest bazel-examples distDir; bazel = bazelWithNixHacks; };
+      javaWithNixHacks = callPackage ../java-test.nix { inherit runLocal bazelTest bazel-examples distDir; bazel = bazelWithNixHacks; };
+      protobufWithNixHacks = callPackage ../protobuf-test.nix { inherit runLocal bazelTest distDir; bazel = bazelWithNixHacks; };
+      pythonBinPathWithNixHacks = callPackage ../python-bin-path-test.nix { inherit runLocal bazelTest distDir; bazel = bazelWithNixHacks; };
+
+      # downstream packages using buildBazelPackage
+      # fixed-output hashes of the fetch phase need to be spot-checked manually
+      downstream = recurseIntoAttrs ({
+        inherit bazel-watcher;
+      }
+          # dm-sonnet is only packaged for linux
+      // (lib.optionalAttrs stdenv.isLinux {
+          # TODO(timokau) dm-sonnet is broken currently
+          # dm-sonnet-linux = python3.pkgs.dm-sonnet;
+      }));
+    };
+
+  src_for_updater = stdenv.mkDerivation rec {
+    name = "updater-sources";
+    inherit src;
+    nativeBuildInputs = [ unzip ];
+    inherit sourceRoot;
+    installPhase = ''
+      runHook preInstall
+
+      cp -r . "$out"
+
+      runHook postInstall
+    '';
+  };
+  # update the list of workspace dependencies
+  passthru.updater = writeScript "update-bazel-deps.sh" ''
+    #!${runtimeShell}
+    (cd "${src_for_updater}" &&
+        BAZEL_USE_CPP_ONLY_TOOLCHAIN=1 \
+        "${bazel_3}"/bin/bazel \
+            query 'kind(http_archive, //external:all) + kind(http_file, //external:all) + kind(distdir_tar, //external:all) + kind(git_repository, //external:all)' \
+            --loading_phase_threads=1 \
+            --output build) \
+    | "${python3}"/bin/python3 "${./update-srcDeps.py}" \
+      "${builtins.toString ./src-deps.json}"
+  '';
+
+  # Necessary for the tests to pass on Darwin with sandbox enabled.
+  # Bazel starts a local server and needs to bind a local address.
+  __darwinAllowLocalNetworking = true;
+
+  # Bazel expects several utils to be available in Bash even without PATH. Hence this hack.
+  customBash = writeCBin "bash" ''
+    #include <stdio.h>
+    #include <stdlib.h>
+    #include <string.h>
+    #include <unistd.h>
+
+    extern char **environ;
+
+    int main(int argc, char *argv[]) {
+      char *path = getenv("PATH");
+      char *pathToAppend = "${defaultShellPath}";
+      char *newPath;
+      if (path != NULL) {
+        int length = strlen(path) + 1 + strlen(pathToAppend) + 1;
+        newPath = malloc(length * sizeof(char));
+        snprintf(newPath, length, "%s:%s", path, pathToAppend);
+      } else {
+        newPath = pathToAppend;
+      }
+      setenv("PATH", newPath, 1);
+      execve("${bash}/bin/bash", argv, environ);
+      return 0;
+    }
+  '';
+
+  postPatch = let
+
+    darwinPatches = ''
+      bazelLinkFlags () {
+        eval set -- "$NIX_LDFLAGS"
+        local flag
+        for flag in "$@"; do
+          printf ' -Wl,%s' "$flag"
+        done
+      }
+
+      # Disable Bazel's Xcode toolchain detection which would configure compilers
+      # and linkers from Xcode instead of from PATH
+      export BAZEL_USE_CPP_ONLY_TOOLCHAIN=1
+
+      # Explicitly configure gcov since we don't have it on Darwin, so autodetection fails
+      export GCOV=${coreutils}/bin/false
+
+      # Framework search paths aren't added by bintools hook
+      # https://github.com/NixOS/nixpkgs/pull/41914
+      export NIX_LDFLAGS+=" -F${CoreFoundation}/Library/Frameworks -F${CoreServices}/Library/Frameworks -F${Foundation}/Library/Frameworks"
+
+      # libcxx includes aren't added by libcxx hook
+      # https://github.com/NixOS/nixpkgs/pull/41589
+      export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem ${lib.getDev libcxx}/include/c++/v1"
+
+      # don't use system installed Xcode to run clang, use Nix clang instead
+      sed -i -E "s;/usr/bin/xcrun (--sdk macosx )?clang;${stdenv.cc}/bin/clang $NIX_CFLAGS_COMPILE $(bazelLinkFlags) -framework CoreFoundation;g" \
+        scripts/bootstrap/compile.sh \
+        src/tools/xcode/realpath/BUILD \
+        src/tools/xcode/stdredirect/BUILD \
+        tools/osx/BUILD
+
+      substituteInPlace scripts/bootstrap/compile.sh --replace ' -mmacosx-version-min=10.9' ""
+
+      # nixpkgs's libSystem cannot use pthread headers directly, must import GCD headers instead
+      sed -i -e "/#include <pthread\/spawn.h>/i #include <dispatch/dispatch.h>" src/main/cpp/blaze_util_darwin.cc
+
+      # clang installed from Xcode has a compatibility wrapper that forwards
+      # invocations of gcc to clang, but vanilla clang doesn't
+      sed -i -e 's;_find_generic(repository_ctx, "gcc", "CC", overriden_tools);_find_generic(repository_ctx, "clang", "CC", overriden_tools);g' tools/cpp/unix_cc_configure.bzl
+
+      sed -i -e 's;/usr/bin/libtool;${cctools}/bin/libtool;g' tools/cpp/unix_cc_configure.bzl
+      wrappers=( tools/cpp/osx_cc_wrapper.sh tools/cpp/osx_cc_wrapper.sh.tpl )
+      for wrapper in "''${wrappers[@]}"; do
+        sed -i -e "s,/usr/bin/install_name_tool,${cctools}/bin/install_name_tool,g" $wrapper
+      done
+    '';
+
+    genericPatches = ''
+      # Substitute j2objc and objc wrapper's python shebang to plain python path.
+      # These scripts explicitly depend on Python 2.7, hence we use python27.
+      # See also `postFixup` where python27 is added to $out/nix-support
+      substituteInPlace tools/j2objc/j2objc_header_map.py --replace "$!/usr/bin/python2.7" "#!${python27}/bin/python"
+      substituteInPlace tools/j2objc/j2objc_wrapper.py --replace "$!/usr/bin/python2.7" "#!${python27}/bin/python"
+      substituteInPlace tools/objc/j2objc_dead_code_pruner.py --replace "$!/usr/bin/python2.7" "#!${python27}/bin/python"
+
+      # md5sum is part of coreutils
+      sed -i 's|/sbin/md5|md5sum|' \
+        src/BUILD
+
+      # replace initial value of pythonShebang variable in BazelPythonSemantics.java
+      substituteInPlace src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java \
+        --replace '"#!/usr/bin/env " + pythonExecutableName' "\"#!${python3}/bin/python\""
+
+      # substituteInPlace is rather slow, so prefilter the files with grep
+      grep -rlZ /bin/ src/main/java/com/google/devtools | while IFS="" read -r -d "" path; do
+        # If you add more replacements here, you must change the grep above!
+        # Only files containing /bin are taken into account.
+        # We default to python3 where possible. See also `postFixup` where
+        # python3 is added to $out/nix-support
+        substituteInPlace "$path" \
+          --replace /bin/bash ${customBash}/bin/bash \
+          --replace "/usr/bin/env bash" ${customBash}/bin/bash \
+          --replace "/usr/bin/env python" ${python3}/bin/python \
+          --replace /usr/bin/env ${coreutils}/bin/env \
+          --replace /bin/true ${coreutils}/bin/true
+      done
+
+      # bazel test runner include references to /bin/bash
+      substituteInPlace tools/build_rules/test_rules.bzl \
+        --replace /bin/bash ${customBash}/bin/bash
+
+      for i in $(find tools/cpp/ -type f)
+      do
+        substituteInPlace $i \
+          --replace /bin/bash ${customBash}/bin/bash
+      done
+
+      # Fixup scripts that generate scripts. Not fixed up by patchShebangs below.
+      substituteInPlace scripts/bootstrap/compile.sh \
+          --replace /bin/bash ${customBash}/bin/bash
+
+      # add nix environment vars to .bazelrc
+      cat >> .bazelrc <<EOF
+      # Limit the resources Bazel is allowed to use during the build to 1/2 the
+      # available RAM and 3/4 the available CPU cores. This should help avoid
+      # overwhelming the build machine.
+      build --local_ram_resources=HOST_RAM*.5
+      build --local_cpu_resources=HOST_CPUS*.75
+
+      build --distdir=${distDir}
+      fetch --distdir=${distDir}
+      build --copt="$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --copt="/g')"
+      build --host_copt="$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --host_copt="/g')"
+      build --linkopt="$(echo $(< ${stdenv.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --linkopt="/g')"
+      build --host_linkopt="$(echo $(< ${stdenv.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --host_linkopt="/g')"
+      build --linkopt="-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --linkopt="-Wl,/g')"
+      build --host_linkopt="-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --host_linkopt="-Wl,/g')"
+      build --host_javabase='@local_jdk//:jdk'
+      build --host_java_toolchain='${javaToolchain}'
+      build --verbose_failures
+      EOF
+
+      # add the same environment vars to compile.sh
+      sed -e "/\$command \\\\$/a --copt=\"$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --copt=\"/g')\" \\\\" \
+          -e "/\$command \\\\$/a --host_copt=\"$(echo $NIX_CFLAGS_COMPILE | sed -e 's/ /" --host_copt=\"/g')\" \\\\" \
+          -e "/\$command \\\\$/a --linkopt=\"$(echo $(< ${stdenv.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --linkopt=\"/g')\" \\\\" \
+          -e "/\$command \\\\$/a --host_linkopt=\"$(echo $(< ${stdenv.cc}/nix-support/libcxx-ldflags) | sed -e 's/ /" --host_linkopt=\"/g')\" \\\\" \
+          -e "/\$command \\\\$/a --linkopt=\"-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --linkopt=\"-Wl,/g')\" \\\\" \
+          -e "/\$command \\\\$/a --host_linkopt=\"-Wl,$(echo $NIX_LDFLAGS | sed -e 's/ /" --host_linkopt=\"-Wl,/g')\" \\\\" \
+          -e "/\$command \\\\$/a --host_javabase='@local_jdk//:jdk' \\\\" \
+          -e "/\$command \\\\$/a --host_java_toolchain='${javaToolchain}' \\\\" \
+          -e "/\$command \\\\$/a --verbose_failures \\\\" \
+          -i scripts/bootstrap/compile.sh
+
+      # This is necessary to avoid:
+      # "error: no visible @interface for 'NSDictionary' declares the selector
+      # 'initWithContentsOfURL:error:'"
+      # This can be removed when the apple_sdk is upgraded beyond 10.13+
+      sed -i '/initWithContentsOfURL:versionPlistUrl/ {
+        N
+        s/error:nil\];/\];/
+      }' tools/osx/xcode_locator.m
+
+      # append the PATH with defaultShellPath in tools/bash/runfiles/runfiles.bash
+      echo "PATH=\$PATH:${defaultShellPath}" >> runfiles.bash.tmp
+      cat tools/bash/runfiles/runfiles.bash >> runfiles.bash.tmp
+      mv runfiles.bash.tmp tools/bash/runfiles/runfiles.bash
+
+      patchShebangs .
+    '';
+    in lib.optionalString stdenv.hostPlatform.isDarwin darwinPatches
+     + genericPatches;
+
+  buildInputs = [
+    buildJdk
+    python3
+  ];
+
+  # when a command can’t be found in a bazel build, you might also
+  # need to add it to `defaultShellPath`.
+  nativeBuildInputs = [
+    installShellFiles
+    zip
+    python3
+    unzip
+    makeWrapper
+    which
+    customBash
+  ] ++ lib.optionals (stdenv.isDarwin) [ cctools libcxx CoreFoundation CoreServices Foundation ];
+
+  # Bazel makes extensive use of symlinks in the WORKSPACE.
+  # This causes problems with infinite symlinks if the build output is in the same location as the
+  # Bazel WORKSPACE. This is why before executing the build, the source code is moved into a
+  # subdirectory.
+  # Failing to do this causes "infinite symlink expansion detected"
+  preBuildPhases = ["preBuildPhase"];
+  preBuildPhase = ''
+    mkdir bazel_src
+    shopt -s dotglob extglob
+    mv !(bazel_src) bazel_src
+  '';
+  # Needed to build fish completion
+  propagatedBuildInputs = [ python3.pkgs.absl-py ];
+  buildPhase = ''
+    runHook preBuild
+
+    # Increasing memory during compilation might be necessary.
+    # export BAZEL_JAVAC_OPTS="-J-Xmx2g -J-Xms200m"
+
+    # If EMBED_LABEL isn't set, it'd be auto-detected from CHANGELOG.md
+    # and `git rev-parse --short HEAD` which would result in
+    # "3.7.0- (@non-git)" due to non-git build and incomplete changelog.
+    # Actual bazel releases use scripts/release/common.sh which is based
+    # on branch/tag information which we don't have with tarball releases.
+    # Note that .bazelversion is always correct and is based on bazel-*
+    # executable name, version checks should work fine
+    export EMBED_LABEL="${version}- (@non-git)"
+    ${customBash}/bin/bash ./bazel_src/compile.sh
+    ./bazel_src/scripts/generate_bash_completion.sh \
+        --bazel=./bazel_src/output/bazel \
+        --output=./bazel_src/output/bazel-complete.bash \
+        --prepend=./bazel_src/scripts/bazel-complete-header.bash \
+        --prepend=./bazel_src/scripts/bazel-complete-template.bash
+    ${python3}/bin/python3 ./bazel_src/scripts/generate_fish_completion.py \
+        --bazel=./bazel_src/output/bazel \
+        --output=./bazel_src/output/bazel-complete.fish
+
+    # need to change directory for bazel to find the workspace
+    cd ./bazel_src
+    # build execlog tooling
+    export HOME=$(mktemp -d)
+    ./output/bazel build  src/tools/execlog:parser_deploy.jar
+    cd -
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/bin
+
+    # official wrapper scripts that searches for $WORKSPACE_ROOT/tools/bazel
+    # if it can’t find something in tools, it calls $out/bin/bazel-{version}-{os_arch}
+    # The binary _must_ exist with this naming if your project contains a .bazelversion
+    # file.
+    cp ./bazel_src/scripts/packages/bazel.sh $out/bin/bazel
+    mv ./bazel_src/output/bazel $out/bin/bazel-${version}-${system}-${arch}
+
+    mkdir $out/share
+    cp ./bazel_src/bazel-bin/src/tools/execlog/parser_deploy.jar $out/share/parser_deploy.jar
+    cat <<EOF > $out/bin/bazel-execlog
+    #!${runtimeShell} -e
+    ${runJdk}/bin/java -jar $out/share/parser_deploy.jar \$@
+    EOF
+    chmod +x $out/bin/bazel-execlog
+
+    # shell completion files
+    installShellCompletion --bash \
+      --name bazel.bash \
+      ./bazel_src/output/bazel-complete.bash
+    installShellCompletion --zsh \
+      --name _bazel \
+      ./bazel_src/scripts/zsh_completion/_bazel
+    installShellCompletion --fish \
+      --name bazel.fish \
+      ./bazel_src/output/bazel-complete.fish
+  '';
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    export TEST_TMPDIR=$(pwd)
+
+    hello_test () {
+      $out/bin/bazel test \
+        --test_output=errors \
+        --java_toolchain='${javaToolchain}' \
+        examples/cpp:hello-success_test \
+        examples/java-native/src/test/java/com/example/myproject:hello
+    }
+
+    cd ./bazel_src
+
+    # test whether $WORKSPACE_ROOT/tools/bazel works
+
+    mkdir -p tools
+    cat > tools/bazel <<"EOF"
+    #!${runtimeShell} -e
+    exit 1
+    EOF
+    chmod +x tools/bazel
+
+    # first call should fail if tools/bazel is used
+    ! hello_test
+
+    cat > tools/bazel <<"EOF"
+    #!${runtimeShell} -e
+    exec "$BAZEL_REAL" "$@"
+    EOF
+
+    # second call succeeds because it defers to $out/bin/bazel-{version}-{os_arch}
+    hello_test
+
+    runHook postInstall
+  '';
+
+  # Save paths to hardcoded dependencies so Nix can detect them.
+  postFixup = ''
+    mkdir -p $out/nix-support
+    echo "${customBash} ${defaultShellPath}" >> $out/nix-support/depends
+    # The templates get tar’d up into a .jar,
+    # so nix can’t detect python is needed in the runtime closure
+    # Some of the scripts explicitly depend on Python 2.7. Otherwise, we
+    # default to using python3. Therefore, both python27 and python3 are
+    # runtime dependencies.
+    echo "${python27}" >> $out/nix-support/depends
+    echo "${python3}" >> $out/nix-support/depends
+  '' + lib.optionalString stdenv.isDarwin ''
+    echo "${cctools}" >> $out/nix-support/depends
+  '';
+
+  dontStrip = true;
+  dontPatchELF = true;
+}
diff --git a/pkgs/development/tools/build-managers/bazel/bazel_4/no-arc.patch b/pkgs/development/tools/build-managers/bazel/bazel_4/no-arc.patch
new file mode 100644
index 00000000000..012e613c2f1
--- /dev/null
+++ b/pkgs/development/tools/build-managers/bazel/bazel_4/no-arc.patch
@@ -0,0 +1,34 @@
+--- a/tools/osx/xcode_locator.m	2020-12-10 13:27:29.000000000 +0100
++++ b/tools/osx/xcode_locator.m	2021-02-01 09:09:32.159557051 +0100
+@@ -21,10 +21,6 @@
+ // 6,6.4,6.4.1 = 6.4.1
+ // 6.3,6.3.0 = 6.3
+ 
+-#if !defined(__has_feature) || !__has_feature(objc_arc)
+-#error "This file requires ARC support."
+-#endif
+-
+ #import <CoreServices/CoreServices.h>
+ #import <Foundation/Foundation.h>
+ 
+--- a/tools/osx/xcode_configure.bzl	1980-01-01 01:00:00.000000000 +0100
++++ b/tools/osx/xcode_configure.bzl	2021-02-01 09:36:57.773418444 +0100
+@@ -123,7 +123,6 @@
+         "macosx",
+         "clang",
+         "-mmacosx-version-min=10.9",
+-        "-fobjc-arc",
+         "-framework",
+         "CoreServices",
+         "-framework",
+--- a/tools/osx/BUILD	2021-02-01 11:01:02.191659553 +0100
++++ b/tools/osx/BUILD	2021-02-01 11:04:29.735071019 +0100
+@@ -27,7 +27,7 @@
+ ])
+ 
+ DARWIN_XCODE_LOCATOR_COMPILE_COMMAND = """
+-  /usr/bin/xcrun --sdk macosx clang -mmacosx-version-min=10.9 -fobjc-arc -framework CoreServices \
++  /usr/bin/xcrun --sdk macosx clang -mmacosx-version-min=10.9 -framework CoreServices \
+       -framework Foundation -o $@ $<
+ """
+ 
diff --git a/pkgs/development/tools/build-managers/bazel/bazel_4/src-deps.json b/pkgs/development/tools/build-managers/bazel/bazel_4/src-deps.json
new file mode 100644
index 00000000000..3027183aef3
--- /dev/null
+++ b/pkgs/development/tools/build-managers/bazel/bazel_4/src-deps.json
@@ -0,0 +1,1585 @@
+{
+    "1.25.0.zip": {
+        "name": "1.25.0.zip",
+        "sha256": "c78be58f5e0a29a04686b628cf54faaee0094322ae0ac99da5a8a8afca59a647",
+        "urls": [
+            "https://mirror.bazel.build/github.com/bazelbuild/rules_sass/archive/1.25.0.zip",
+            "https://github.com/bazelbuild/rules_sass/archive/1.25.0.zip"
+        ]
+    },
+    "1ef781ced3b1443dca3ed05dec1989eca1a4e1cd.tar.gz": {
+        "name": "1ef781ced3b1443dca3ed05dec1989eca1a4e1cd.tar.gz",
+        "sha256": "5a725b777976b77aa122b707d1b6f0f39b6020f66cd427bb111a585599c857b1",
+        "urls": [
+            "https://mirror.bazel.build/github.com/bazelbuild/stardoc/archive/1ef781ced3b1443dca3ed05dec1989eca1a4e1cd.tar.gz",
+            "https://github.com/bazelbuild/stardoc/archive/1ef781ced3b1443dca3ed05dec1989eca1a4e1cd.tar.gz"
+        ]
+    },
+    "382d5afc60e05470c23e8de19b19fc5ad231e732.tar.gz": {
+        "name": "382d5afc60e05470c23e8de19b19fc5ad231e732.tar.gz",
+        "sha256": "7992217989f3156f8109931c1fc6db3434b7414957cb82371552377beaeb9d6c",
+        "urls": [
+            "https://mirror.bazel.build/github.com/protocolbuffers/upb/archive/382d5afc60e05470c23e8de19b19fc5ad231e732.tar.gz",
+            "https://github.com/protocolbuffers/upb/archive/382d5afc60e05470c23e8de19b19fc5ad231e732.tar.gz"
+        ]
+    },
+    "7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip": {
+        "name": "7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip",
+        "sha256": "bc81f1ba47ef5cc68ad32225c3d0e70b8c6f6077663835438da8d5733f917598",
+        "urls": [
+            "https://mirror.bazel.build/github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip",
+            "https://github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip"
+        ]
+    },
+    "7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz": {
+        "name": "7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz",
+        "sha256": "8e7d59a5b12b233be5652e3d29f42fba01c7cbab09f6b3a8d0a57ed6d1e9a0da",
+        "urls": [
+            "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz",
+            "https://github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz"
+        ]
+    },
+    "aecba11114cf1fac5497aeb844b6966106de3eb6.tar.gz": {
+        "name": "aecba11114cf1fac5497aeb844b6966106de3eb6.tar.gz",
+        "sha256": "9f385e146410a8150b6f4cb1a57eab7ec806ced48d427554b1e754877ff26c3e",
+        "urls": [
+            "https://mirror.bazel.build/github.com/google/re2/archive/aecba11114cf1fac5497aeb844b6966106de3eb6.tar.gz",
+            "https://github.com/google/re2/archive/aecba11114cf1fac5497aeb844b6966106de3eb6.tar.gz"
+        ]
+    },
+    "android_tools": {
+        "name": "android_tools",
+        "sha256": "ea5c0589a01e2a9f43c20e5c145d3530e3b3bdbe7322789bc5da38d0ca49b837",
+        "url": "https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.19.0rc3.tar.gz"
+    },
+    "android_tools_for_testing": {
+        "name": "android_tools_for_testing",
+        "patch_cmds": [
+            "test -f BUILD && chmod u+w BUILD || true",
+            "echo >> BUILD",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "ea5c0589a01e2a9f43c20e5c145d3530e3b3bdbe7322789bc5da38d0ca49b837",
+        "url": "https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.19.0rc3.tar.gz"
+    },
+    "android_tools_pkg-0.19.0rc3.tar.gz": {
+        "name": "android_tools_pkg-0.19.0rc3.tar.gz",
+        "sha256": "ea5c0589a01e2a9f43c20e5c145d3530e3b3bdbe7322789bc5da38d0ca49b837",
+        "urls": [
+            "https://mirror.bazel.build/bazel_android_tools/android_tools_pkg-0.19.0rc3.tar.gz"
+        ]
+    },
+    "b1c40e1de81913a3c40e5948f78719c28152486d.zip": {
+        "name": "b1c40e1de81913a3c40e5948f78719c28152486d.zip",
+        "sha256": "d0c573b94a6ef20ef6ff20154a23d0efcb409fb0e1ff0979cec318dfe42f0cdd",
+        "urls": [
+            "https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/b1c40e1de81913a3c40e5948f78719c28152486d.zip",
+            "https://github.com/bazelbuild/rules_cc/archive/b1c40e1de81913a3c40e5948f78719c28152486d.zip"
+        ]
+    },
+    "bazel-skylib-1.0.3.tar.gz": {
+        "name": "bazel-skylib-1.0.3.tar.gz",
+        "sha256": "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
+        "urls": [
+            "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
+            "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz"
+        ]
+    },
+    "bazel-toolchains-3.1.0.tar.gz": {
+        "name": "bazel-toolchains-3.1.0.tar.gz",
+        "sha256": "726b5423e1c7a3866a3a6d68e7123b4a955e9fcbe912a51e0f737e6dab1d0af2",
+        "urls": [
+            "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/releases/download/3.1.0/bazel-toolchains-3.1.0.tar.gz",
+            "https://github.com/bazelbuild/bazel-toolchains/releases/download/3.1.0/bazel-toolchains-3.1.0.tar.gz"
+        ]
+    },
+    "bazel_j2objc": {
+        "name": "bazel_j2objc",
+        "sha256": "8d3403b5b7db57e347c943d214577f6879e5b175c2b59b7e075c0b6453330e9b",
+        "strip_prefix": "j2objc-2.5",
+        "urls": [
+            "https://mirror.bazel.build/github.com/google/j2objc/releases/download/2.5/j2objc-2.5.zip",
+            "https://github.com/google/j2objc/releases/download/2.5/j2objc-2.5.zip"
+        ]
+    },
+    "bazel_skylib": {
+        "name": "bazel_skylib",
+        "patch_cmds": [
+            "test -f BUILD && chmod u+w BUILD || true",
+            "echo >> BUILD",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "1c531376ac7e5a180e0237938a2536de0c54d93f5c278634818e0efc952dd56c",
+        "urls": [
+            "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz",
+            "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.3/bazel-skylib-1.0.3.tar.gz"
+        ]
+    },
+    "bazel_toolchains": {
+        "name": "bazel_toolchains",
+        "patch_cmds": [
+            "test -f BUILD && chmod u+w BUILD || true",
+            "echo >> BUILD",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "726b5423e1c7a3866a3a6d68e7123b4a955e9fcbe912a51e0f737e6dab1d0af2",
+        "strip_prefix": "bazel-toolchains-3.1.0",
+        "urls": [
+            "https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/releases/download/3.1.0/bazel-toolchains-3.1.0.tar.gz",
+            "https://github.com/bazelbuild/bazel-toolchains/releases/download/3.1.0/bazel-toolchains-3.1.0.tar.gz"
+        ]
+    },
+    "bazel_website": {
+        "build_file_content": "\nexports_files([\"_sass/style.scss\"])\n",
+        "name": "bazel_website",
+        "sha256": "a5f531dd1d62e6947dcfc279656ffc2fdf6f447c163914c5eabf7961b4cb6eb4",
+        "strip_prefix": "bazel-website-c174fa288aa079b68416d2ce2cc97268fa172f42",
+        "urls": [
+            "https://github.com/bazelbuild/bazel-website/archive/c174fa288aa079b68416d2ce2cc97268fa172f42.tar.gz"
+        ]
+    },
+    "boringssl": {
+        "generator_function": "grpc_deps",
+        "generator_name": "boringssl",
+        "name": "boringssl",
+        "sha256": "cb0fd3eda612d4ae4be21108938800a19b015717a7627ea7f530e3469d207707",
+        "strip_prefix": "boringssl-88aeb757f1a415c71fb4cbf5af936ecae4bc8179",
+        "urls": [
+            "https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/boringssl/archive/88aeb757f1a415c71fb4cbf5af936ecae4bc8179.tar.gz",
+            "https://github.com/google/boringssl/archive/88aeb757f1a415c71fb4cbf5af936ecae4bc8179.tar.gz"
+        ]
+    },
+    "build_bazel_apple_support": {
+        "generator_function": "grpc_deps",
+        "generator_name": "build_bazel_apple_support",
+        "name": "build_bazel_apple_support",
+        "sha256": "122ebf7fe7d1c8e938af6aeaee0efe788a3a2449ece5a8d6a428cb18d6f88033",
+        "urls": [
+            "https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/apple_support/releases/download/0.7.1/apple_support.0.7.1.tar.gz",
+            "https://github.com/bazelbuild/apple_support/releases/download/0.7.1/apple_support.0.7.1.tar.gz"
+        ]
+    },
+    "build_bazel_rules_apple": {
+        "generator_function": "grpc_deps",
+        "generator_name": "build_bazel_rules_apple",
+        "name": "build_bazel_rules_apple",
+        "sha256": "bdc8e66e70b8a75da23b79f1f8c6207356df07d041d96d2189add7ee0780cf4e",
+        "strip_prefix": "rules_apple-b869b0d3868d78a1d4ffd866ccb304fb68aa12c3",
+        "urls": [
+            "https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/rules_apple/archive/b869b0d3868d78a1d4ffd866ccb304fb68aa12c3.tar.gz",
+            "https://github.com/bazelbuild/rules_apple/archive/b869b0d3868d78a1d4ffd866ccb304fb68aa12c3.tar.gz"
+        ]
+    },
+    "build_bazel_rules_nodejs": {
+        "name": "build_bazel_rules_nodejs",
+        "sha256": "f2194102720e662dbf193546585d705e645314319554c6ce7e47d8b59f459e9c",
+        "urls": [
+            "https://mirror.bazel.build/github.com/bazelbuild/rules_nodejs/releases/download/2.2.2/rules_nodejs-2.2.2.tar.gz",
+            "https://github.com/bazelbuild/rules_nodejs/releases/download/2.2.2/rules_nodejs-2.2.2.tar.gz"
+        ]
+    },
+    "com_github_cares_cares": {
+        "build_file": "@com_github_grpc_grpc//third_party:cares/cares.BUILD",
+        "generator_function": "grpc_deps",
+        "generator_name": "com_github_cares_cares",
+        "name": "com_github_cares_cares",
+        "sha256": "e8c2751ddc70fed9dc6f999acd92e232d5846f009ee1674f8aee81f19b2b915a",
+        "strip_prefix": "c-ares-e982924acee7f7313b4baa4ee5ec000c5e373c30",
+        "urls": [
+            "https://storage.googleapis.com/grpc-bazel-mirror/github.com/c-ares/c-ares/archive/e982924acee7f7313b4baa4ee5ec000c5e373c30.tar.gz",
+            "https://github.com/c-ares/c-ares/archive/e982924acee7f7313b4baa4ee5ec000c5e373c30.tar.gz"
+        ]
+    },
+    "com_github_gflags_gflags": {
+        "generator_function": "grpc_deps",
+        "generator_name": "com_github_gflags_gflags",
+        "name": "com_github_gflags_gflags",
+        "sha256": "63ae70ea3e05780f7547d03503a53de3a7d2d83ad1caaa443a31cb20aea28654",
+        "strip_prefix": "gflags-28f50e0fed19872e0fd50dd23ce2ee8cd759338e",
+        "urls": [
+            "https://storage.googleapis.com/grpc-bazel-mirror/github.com/gflags/gflags/archive/28f50e0fed19872e0fd50dd23ce2ee8cd759338e.tar.gz",
+            "https://github.com/gflags/gflags/archive/28f50e0fed19872e0fd50dd23ce2ee8cd759338e.tar.gz"
+        ]
+    },
+    "com_github_google_benchmark": {
+        "generator_function": "grpc_deps",
+        "generator_name": "com_github_google_benchmark",
+        "name": "com_github_google_benchmark",
+        "sha256": "f68aec93154d010324c05bcd8c5cc53468b87af88d87acb5ddcfaa1bba044837",
+        "strip_prefix": "benchmark-090faecb454fbd6e6e17a75ef8146acb037118d4",
+        "urls": [
+            "https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/benchmark/archive/090faecb454fbd6e6e17a75ef8146acb037118d4.tar.gz",
+            "https://github.com/google/benchmark/archive/090faecb454fbd6e6e17a75ef8146acb037118d4.tar.gz"
+        ]
+    },
+    "com_github_google_re2": {
+        "generator_function": "grpc_deps",
+        "generator_name": "com_github_google_re2",
+        "name": "com_github_google_re2",
+        "sha256": "9f385e146410a8150b6f4cb1a57eab7ec806ced48d427554b1e754877ff26c3e",
+        "strip_prefix": "re2-aecba11114cf1fac5497aeb844b6966106de3eb6",
+        "urls": [
+            "https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/re2/archive/aecba11114cf1fac5497aeb844b6966106de3eb6.tar.gz",
+            "https://github.com/google/re2/archive/aecba11114cf1fac5497aeb844b6966106de3eb6.tar.gz"
+        ]
+    },
+    "com_github_grpc_grpc": {
+        "name": "com_github_grpc_grpc",
+        "patch_args": [
+            "-p1"
+        ],
+        "patches": [
+            "//third_party/grpc:grpc_1.33.1.patch"
+        ],
+        "sha256": "58eaee5c0f1bd0b92ebe1fa0606ec8f14798500620e7444726afcaf65041cb63",
+        "strip_prefix": "grpc-1.33.1",
+        "urls": [
+            "https://mirror.bazel.build/github.com/grpc/grpc/archive/v1.33.1.tar.gz",
+            "https://github.com/grpc/grpc/archive/v1.33.1.tar.gz"
+        ]
+    },
+    "com_google_absl": {
+        "generator_function": "grpc_deps",
+        "generator_name": "com_google_absl",
+        "name": "com_google_absl",
+        "sha256": "f368a8476f4e2e0eccf8a7318b98dafbe30b2600f4e3cf52636e5eb145aba06a",
+        "strip_prefix": "abseil-cpp-df3ea785d8c30a9503321a3d35ee7d35808f190d",
+        "urls": [
+            "https://storage.googleapis.com/grpc-bazel-mirror/github.com/abseil/abseil-cpp/archive/df3ea785d8c30a9503321a3d35ee7d35808f190d.tar.gz",
+            "https://github.com/abseil/abseil-cpp/archive/df3ea785d8c30a9503321a3d35ee7d35808f190d.tar.gz"
+        ]
+    },
+    "com_google_googletest": {
+        "name": "com_google_googletest",
+        "sha256": "9dc9157a9a1551ec7a7e43daea9a694a0bb5fb8bec81235d8a1e6ef64c716dcb",
+        "strip_prefix": "googletest-release-1.10.0",
+        "urls": [
+            "https://mirror.bazel.build/github.com/google/googletest/archive/release-1.10.0.tar.gz",
+            "https://github.com/google/googletest/archive/release-1.10.0.tar.gz"
+        ]
+    },
+    "com_google_protobuf": {
+        "name": "com_google_protobuf",
+        "patch_args": [
+            "-p1"
+        ],
+        "patch_cmds": [
+            "test -f BUILD && chmod u+w BUILD || true",
+            "echo >> BUILD",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "patches": [
+            "//third_party/protobuf:3.13.0.patch"
+        ],
+        "sha256": "9b4ee22c250fe31b16f1a24d61467e40780a3fbb9b91c3b65be2a376ed913a1a",
+        "strip_prefix": "protobuf-3.13.0",
+        "urls": [
+            "https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v3.13.0.tar.gz",
+            "https://github.com/protocolbuffers/protobuf/archive/v3.13.0.tar.gz"
+        ]
+    },
+    "coverage_output_generator-v2.5.zip": {
+        "name": "coverage_output_generator-v2.5.zip",
+        "sha256": "cd14f1cb4559e4723e63b7e7b06d09fcc3bd7ba58d03f354cdff1439bd936a7d",
+        "urls": [
+            "https://mirror.bazel.build/bazel_coverage_output_generator/releases/coverage_output_generator-v2.5.zip"
+        ]
+    },
+    "cython": {
+        "build_file": "@com_github_grpc_grpc//third_party:cython.BUILD",
+        "generator_function": "grpc_deps",
+        "generator_name": "cython",
+        "name": "cython",
+        "sha256": "d68138a2381afbdd0876c3cb2a22389043fa01c4badede1228ee073032b07a27",
+        "strip_prefix": "cython-c2b80d87658a8525ce091cbe146cb7eaa29fed5c",
+        "urls": [
+            "https://github.com/cython/cython/archive/c2b80d87658a8525ce091cbe146cb7eaa29fed5c.tar.gz"
+        ]
+    },
+    "desugar_jdk_libs": {
+        "name": "desugar_jdk_libs",
+        "sha256": "fe2e04f91ce8c59d49d91b8102edc6627c6fa2906c1b0e7346f01419ec4f419d",
+        "strip_prefix": "desugar_jdk_libs-e0b0291b2c51fbe5a7cfa14473a1ae850f94f021",
+        "urls": [
+            "https://mirror.bazel.build/github.com/google/desugar_jdk_libs/archive/e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip",
+            "https://github.com/google/desugar_jdk_libs/archive/e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip"
+        ]
+    },
+    "df3ea785d8c30a9503321a3d35ee7d35808f190d.tar.gz": {
+        "name": "df3ea785d8c30a9503321a3d35ee7d35808f190d.tar.gz",
+        "sha256": "f368a8476f4e2e0eccf8a7318b98dafbe30b2600f4e3cf52636e5eb145aba06a",
+        "urls": [
+            "https://mirror.bazel.build/github.com/abseil/abseil-cpp/archive/df3ea785d8c30a9503321a3d35ee7d35808f190d.tar.gz",
+            "https://github.com/abseil/abseil-cpp/archive/df3ea785d8c30a9503321a3d35ee7d35808f190d.tar.gz"
+        ]
+    },
+    "e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip": {
+        "name": "e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip",
+        "sha256": "fe2e04f91ce8c59d49d91b8102edc6627c6fa2906c1b0e7346f01419ec4f419d",
+        "urls": [
+            "https://mirror.bazel.build/github.com/google/desugar_jdk_libs/archive/e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip",
+            "https://github.com/google/desugar_jdk_libs/archive/e0b0291b2c51fbe5a7cfa14473a1ae850f94f021.zip"
+        ]
+    },
+    "e982924acee7f7313b4baa4ee5ec000c5e373c30.tar.gz": {
+        "name": "e982924acee7f7313b4baa4ee5ec000c5e373c30.tar.gz",
+        "sha256": "e8c2751ddc70fed9dc6f999acd92e232d5846f009ee1674f8aee81f19b2b915a",
+        "urls": [
+            "https://mirror.bazel.build/github.com/c-ares/c-ares/archive/e982924acee7f7313b4baa4ee5ec000c5e373c30.tar.gz",
+            "https://github.com/c-ares/c-ares/archive/e982924acee7f7313b4baa4ee5ec000c5e373c30.tar.gz"
+        ]
+    },
+    "enum34": {
+        "build_file": "@com_github_grpc_grpc//third_party:enum34.BUILD",
+        "generator_function": "grpc_deps",
+        "generator_name": "enum34",
+        "name": "enum34",
+        "sha256": "8ad8c4783bf61ded74527bffb48ed9b54166685e4230386a9ed9b1279e2df5b1",
+        "strip_prefix": "enum34-1.1.6",
+        "urls": [
+            "https://files.pythonhosted.org/packages/bf/3e/31d502c25302814a7c2f1d3959d2a3b3f78e509002ba91aea64993936876/enum34-1.1.6.tar.gz"
+        ]
+    },
+    "envoy_api": {
+        "generator_function": "grpc_deps",
+        "generator_name": "envoy_api",
+        "name": "envoy_api",
+        "sha256": "466585f253471259ce17641348149f458270316e81ec6702fdd8bf0b1b681256",
+        "strip_prefix": "data-plane-api-9997e1137cdb59e622af13e57ca915a2f3c9f84f",
+        "urls": [
+            "https://storage.googleapis.com/grpc-bazel-mirror/github.com/envoyproxy/data-plane-api/archive/9997e1137cdb59e622af13e57ca915a2f3c9f84f.tar.gz",
+            "https://github.com/envoyproxy/data-plane-api/archive/9997e1137cdb59e622af13e57ca915a2f3c9f84f.tar.gz"
+        ]
+    },
+    "futures": {
+        "build_file": "@com_github_grpc_grpc//third_party:futures.BUILD",
+        "generator_function": "grpc_deps",
+        "generator_name": "futures",
+        "name": "futures",
+        "sha256": "7e033af76a5e35f58e56da7a91e687706faf4e7bdfb2cbc3f2cca6b9bcda9794",
+        "strip_prefix": "futures-3.3.0",
+        "urls": [
+            "https://files.pythonhosted.org/packages/47/04/5fc6c74ad114032cd2c544c575bffc17582295e9cd6a851d6026ab4b2c00/futures-3.3.0.tar.gz"
+        ]
+    },
+    "io_bazel_rules_go": {
+        "generator_function": "grpc_deps",
+        "generator_name": "io_bazel_rules_go",
+        "name": "io_bazel_rules_go",
+        "sha256": "a82a352bffae6bee4e95f68a8d80a70e87f42c4741e6a448bec11998fcc82329",
+        "urls": [
+            "https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/rules_go/releases/download/0.18.5/rules_go-0.18.5.tar.gz",
+            "https://github.com/bazelbuild/rules_go/releases/download/0.18.5/rules_go-0.18.5.tar.gz"
+        ]
+    },
+    "io_bazel_rules_python": {
+        "generator_function": "grpc_deps",
+        "generator_name": "io_bazel_rules_python",
+        "name": "io_bazel_rules_python",
+        "sha256": "aa96a691d3a8177f3215b14b0edc9641787abaaa30363a080165d06ab65e1161",
+        "url": "https://github.com/bazelbuild/rules_python/releases/download/0.0.1/rules_python-0.0.1.tar.gz"
+    },
+    "io_bazel_rules_sass": {
+        "name": "io_bazel_rules_sass",
+        "sha256": "c78be58f5e0a29a04686b628cf54faaee0094322ae0ac99da5a8a8afca59a647",
+        "strip_prefix": "rules_sass-1.25.0",
+        "urls": [
+            "https://mirror.bazel.build/github.com/bazelbuild/rules_sass/archive/1.25.0.zip",
+            "https://github.com/bazelbuild/rules_sass/archive/1.25.0.zip"
+        ]
+    },
+    "io_bazel_skydoc": {
+        "name": "io_bazel_skydoc",
+        "sha256": "5a725b777976b77aa122b707d1b6f0f39b6020f66cd427bb111a585599c857b1",
+        "strip_prefix": "stardoc-1ef781ced3b1443dca3ed05dec1989eca1a4e1cd",
+        "urls": [
+            "https://mirror.bazel.build/github.com/bazelbuild/stardoc/archive/1ef781ced3b1443dca3ed05dec1989eca1a4e1cd.tar.gz",
+            "https://github.com/bazelbuild/stardoc/archive/1ef781ced3b1443dca3ed05dec1989eca1a4e1cd.tar.gz"
+        ]
+    },
+    "io_opencensus_cpp": {
+        "generator_function": "grpc_deps",
+        "generator_name": "io_opencensus_cpp",
+        "name": "io_opencensus_cpp",
+        "sha256": "90d6fafa8b1a2ea613bf662731d3086e1c2ed286f458a95c81744df2dbae41b1",
+        "strip_prefix": "opencensus-cpp-c9a4da319bc669a772928ffc55af4a61be1a1176",
+        "urls": [
+            "https://storage.googleapis.com/grpc-bazel-mirror/github.com/census-instrumentation/opencensus-cpp/archive/c9a4da319bc669a772928ffc55af4a61be1a1176.tar.gz",
+            "https://github.com/census-instrumentation/opencensus-cpp/archive/c9a4da319bc669a772928ffc55af4a61be1a1176.tar.gz"
+        ]
+    },
+    "java_tools_javac11_darwin-v10.6.zip": {
+        "name": "java_tools_javac11_darwin-v10.6.zip",
+        "sha256": "d15b05d2061382748f779dc566537ea567a46bcba6fa34b56d7cb6e6d668adab",
+        "urls": [
+            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v10.6/java_tools_javac11_darwin-v10.6.zip"
+        ]
+    },
+    "java_tools_javac11_linux-v10.6.zip": {
+        "name": "java_tools_javac11_linux-v10.6.zip",
+        "sha256": "085c0ba53ba764e81d4c195524f3c596085cbf9cdc01dd8e6d2ae677e726af35",
+        "urls": [
+            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v10.6/java_tools_javac11_linux-v10.6.zip"
+        ]
+    },
+    "java_tools_javac11_windows-v10.6.zip": {
+        "name": "java_tools_javac11_windows-v10.6.zip",
+        "sha256": "873f1e53d1fa9c8e46b717673816cd822bb7acc474a194a18ff849fd8fa6ff00",
+        "urls": [
+            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v10.6/java_tools_javac11_windows-v10.6.zip"
+        ]
+    },
+    "java_tools_langtools_javac11": {
+        "name": "java_tools_langtools_javac11",
+        "sha256": "cf0814fa002ef3d794582bb086516d8c9ed0958f83f19799cdb08949019fe4c7",
+        "urls": [
+            "https://mirror.bazel.build/bazel_java_tools/jdk_langtools/langtools_jdk11_v2.zip"
+        ]
+    },
+    "jekyll_tree_0_17_1": {
+        "name": "jekyll_tree_0_17_1",
+        "sha256": "02256ddd20eeaf70cf8fcfe9b2cdddd7be87aedd5848d549474fb0358e0031d3",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-0.17.1.tar"
+        ]
+    },
+    "jekyll_tree_0_17_2": {
+        "name": "jekyll_tree_0_17_2",
+        "sha256": "13b35dd309a0d52f0a2518a1193f42729c75255f5fae40cea68e4d4224bfaa2e",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-0.17.2.tar"
+        ]
+    },
+    "jekyll_tree_0_18_1": {
+        "name": "jekyll_tree_0_18_1",
+        "sha256": "98b77f48e37a50fc6f83100bf53f661e10732bb3ddbc226e02d0225cb7a9a7d8",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-0.18.1.tar"
+        ]
+    },
+    "jekyll_tree_0_19_1": {
+        "name": "jekyll_tree_0_19_1",
+        "sha256": "ec892c59ba18bb8de1f9ae2bde937db144e45f28d6d1c32a2cee847ee81b134d",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-0.19.1.tar"
+        ]
+    },
+    "jekyll_tree_0_19_2": {
+        "name": "jekyll_tree_0_19_2",
+        "sha256": "3c2d9f21ec2fd1c0b8a310f6eb6043027c838810cdfc2457d4346a0e5cdcaa7a",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-0.19.2.tar"
+        ]
+    },
+    "jekyll_tree_0_20_0": {
+        "name": "jekyll_tree_0_20_0",
+        "sha256": "bb79a63810bf1b0aa1f89bd3bbbeb4a547a30ab9af70c9be656cc6866f4b015b",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-0.20.0.tar"
+        ]
+    },
+    "jekyll_tree_0_21_0": {
+        "name": "jekyll_tree_0_21_0",
+        "sha256": "23ec39c0138d358c544151e5c81586716d5d1c6124f10a742bead70516e6eb93",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-0.21.0.tar"
+        ]
+    },
+    "jekyll_tree_0_22_0": {
+        "name": "jekyll_tree_0_22_0",
+        "sha256": "bec5cfaa5560e082e41e33bde276cf93f0f7bcfd2914a3e868f921df8b3ab725",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-0.22.0.tar"
+        ]
+    },
+    "jekyll_tree_0_23_0": {
+        "name": "jekyll_tree_0_23_0",
+        "sha256": "56c80fcf49dc606fab8ed5e737a7409e9a486585b7b98673be69b5a4984dd774",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-0.23.0.tar"
+        ]
+    },
+    "jekyll_tree_0_24_0": {
+        "name": "jekyll_tree_0_24_0",
+        "sha256": "988fa567906a73e50d3669909285187ef88c76ecd4aa277f4d1f355fc06a90c8",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-0.24.0.tar"
+        ]
+    },
+    "jekyll_tree_0_25_0": {
+        "name": "jekyll_tree_0_25_0",
+        "sha256": "e8ab61c047225e808982a564ecd692fd63bd243dccc88a8768ed069a5362a685",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-0.25.0.tar"
+        ]
+    },
+    "jekyll_tree_0_26_0": {
+        "name": "jekyll_tree_0_26_0",
+        "sha256": "3907dfc6fb27d246e67877e553e8951fac239bb49f2dec7e06b6b09cb0b98b8d",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-0.26.0.tar"
+        ]
+    },
+    "jekyll_tree_0_27_0": {
+        "name": "jekyll_tree_0_27_0",
+        "sha256": "97e2633fefee389daade775da43907aa68699b32212f4e48cb095abe18aa7e65",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-0.27.0.tar"
+        ]
+    },
+    "jekyll_tree_0_28_0": {
+        "name": "jekyll_tree_0_28_0",
+        "sha256": "64b3fc267fb1f4c56345d96f0ad9f07a2efe43bd15361f818368849cf941b3b7",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-0.28.0.tar"
+        ]
+    },
+    "jekyll_tree_0_29_0": {
+        "name": "jekyll_tree_0_29_0",
+        "sha256": "99d7a6bf9ef0145c59c54b4319fb31cb855681782080a5490909c4a5463c7215",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-0.29.0.tar"
+        ]
+    },
+    "jekyll_tree_0_29_1": {
+        "name": "jekyll_tree_0_29_1",
+        "sha256": "cf0a517f1660a7c4fd26a7ef6f3594bbefcf2b670bc0ed610bf3bb6ec3a9fdc3",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-0.29.1.tar"
+        ]
+    },
+    "jekyll_tree_1_0_0": {
+        "name": "jekyll_tree_1_0_0",
+        "sha256": "61ef65c738a8cd65059f58f2ee5f7eef493136ac4d5e5c3464787d17043febdf",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-1.0.0.tar"
+        ]
+    },
+    "jekyll_tree_1_1_0": {
+        "name": "jekyll_tree_1_1_0",
+        "sha256": "46d82c9249896903ee6be2295fc52a1346a9ee82f61f89b8a2181232c3bd999b",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-1.1.0.tar"
+        ]
+    },
+    "jekyll_tree_1_2_0": {
+        "name": "jekyll_tree_1_2_0",
+        "sha256": "d402a8391ca2624673f124ff42ba8d0d40d4139e5d23111f3995dc6c5f70f63d",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-1.2.0.tar"
+        ]
+    },
+    "jekyll_tree_2_0_0": {
+        "name": "jekyll_tree_2_0_0",
+        "sha256": "7d7c424ede503856c61b645d8fdc2513ec6ea8600d76c5e87c45a9a45c16de3e",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-2.0.0.tar"
+        ]
+    },
+    "jekyll_tree_2_1_0": {
+        "name": "jekyll_tree_2_1_0",
+        "sha256": "b0fd257b1d6b1b05705742d55a13b9a20d3e99f49c89334750c872d620e5b88f",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-2.1.0.tar"
+        ]
+    },
+    "jekyll_tree_2_2_0": {
+        "name": "jekyll_tree_2_2_0",
+        "sha256": "4c1506786ab98df8039ec7354b82da7b586b2ae4ab7f7e7d08f3caf74ff28e3d",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-2.2.0.tar"
+        ]
+    },
+    "jekyll_tree_3_0_0": {
+        "name": "jekyll_tree_3_0_0",
+        "sha256": "bd1096ad609c253fa7b1473edf4a3aa51f36243e188dbb62c68d8ed4aca2419d",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-3.0.0.tar"
+        ]
+    },
+    "jekyll_tree_3_1_0": {
+        "name": "jekyll_tree_3_1_0",
+        "sha256": "f9d2e22e24af426d6c9de163d91abe6d8af7eb1eabb1d7ff5e9cf4bededf465a",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-3.1.0-807b377.tar"
+        ]
+    },
+    "jekyll_tree_3_2_0": {
+        "name": "jekyll_tree_3_2_0",
+        "sha256": "6cff8654e739a0c3062183a5a6cc82fcf9a77323051f8c007866d7f4101052a6",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-3.2.0.tar"
+        ]
+    },
+    "jekyll_tree_3_3_0": {
+        "name": "jekyll_tree_3_3_0",
+        "sha256": "36b81e8ddf4f3caccf41acc82d9e49f000c1be9e92c9cc82793d60ff70636176",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-3.3.0.tar"
+        ]
+    },
+    "jekyll_tree_3_4_0": {
+        "name": "jekyll_tree_3_4_0",
+        "sha256": "af82e775d911135bcff76e500bb003c4a9fccb949f8ddf4d93c58eca195bf5e8",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-3.4.0.tar"
+        ]
+    },
+    "jekyll_tree_3_5_0": {
+        "name": "jekyll_tree_3_5_0",
+        "sha256": "aa96cbad14cfab0b422d1d17eac3107a75eb05854d40ab4f1379a6fc87b2e1f8",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-3.5.0.tar"
+        ]
+    },
+    "jekyll_tree_3_5_1": {
+        "name": "jekyll_tree_3_5_1",
+        "sha256": "1c949ba8da353c93c74a70638e5cb321ea1cd5582eda1b6ad88c6d2d0b569f2f",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-3.5.1.tar"
+        ]
+    },
+    "jekyll_tree_3_6_0": {
+        "name": "jekyll_tree_3_6_0",
+        "sha256": "1b7a16a2098ca0c290c208a11db886e950d6c523b2cac2d0a0cba4a04aa832f3",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-3.6.0.tar"
+        ]
+    },
+    "jekyll_tree_3_7_0": {
+        "name": "jekyll_tree_3_7_0",
+        "sha256": "a534d37ef3867c92fae8692852f92820a34f63a5f9092bbbec6505c0f69d8094",
+        "urls": [
+            "https://mirror.bazel.build/bazel_versioned_docs/jekyll-tree-3.7.0.tar"
+        ]
+    },
+    "openjdk11_darwin_aarch64_archive": {
+        "build_file_content": "\njava_runtime(name = 'runtime', srcs =  glob(['**']), visibility = ['//visibility:public'])\nexports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])\n",
+        "name": "openjdk11_darwin_aarch64_archive",
+        "sha256": "3dcc636e64ae58b922269c2dc9f20f6f967bee90e3f6847d643c4a566f1e8d8a",
+        "strip_prefix": "zulu11.45.27-ca-jdk11.0.10-macosx_aarch64",
+        "urls": [
+            "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.45.27-ca-jdk11.0.10-macosx_aarch64.tar.gz",
+            "https://cdn.azul.com/zulu/bin/zulu11.45.27-ca-jdk11.0.10-macosx_aarch64.tar.gz"
+        ]
+    },
+    "openjdk11_darwin_archive": {
+        "build_file_content": "\njava_runtime(name = 'runtime', srcs =  glob(['**']), visibility = ['//visibility:public'])\nexports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])\n",
+        "name": "openjdk11_darwin_archive",
+        "sha256": "e1fe56769f32e2aaac95e0a8f86b5a323da5af3a3b4bba73f3086391a6cc056f",
+        "strip_prefix": "zulu11.37.17-ca-jdk11.0.6-macosx_x64",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz"
+        ]
+    },
+    "openjdk11_linux_archive": {
+        "build_file_content": "\njava_runtime(name = 'runtime', srcs =  glob(['**']), visibility = ['//visibility:public'])\nexports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])\n",
+        "name": "openjdk11_linux_archive",
+        "sha256": "360626cc19063bc411bfed2914301b908a8f77a7919aaea007a977fa8fb3cde1",
+        "strip_prefix": "zulu11.37.17-ca-jdk11.0.6-linux_x64",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-linux_x64.tar.gz"
+        ]
+    },
+    "openjdk11_windows_archive": {
+        "build_file_content": "\njava_runtime(name = 'runtime', srcs =  glob(['**']), visibility = ['//visibility:public'])\nexports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])\n",
+        "name": "openjdk11_windows_archive",
+        "sha256": "a9695617b8374bfa171f166951214965b1d1d08f43218db9a2a780b71c665c18",
+        "strip_prefix": "zulu11.37.17-ca-jdk11.0.6-win_x64",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip"
+        ]
+    },
+    "openjdk14_darwin_archive": {
+        "build_file_content": "\njava_runtime(name = 'runtime', srcs =  glob(['**']), visibility = ['//visibility:public'])\nexports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])\n",
+        "name": "openjdk14_darwin_archive",
+        "sha256": "088bd4d0890acc9f032b738283bf0f26b2a55c50b02d1c8a12c451d8ddf080dd",
+        "strip_prefix": "zulu14.28.21-ca-jdk14.0.1-macosx_x64",
+        "urls": [
+            "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu14.28.21-ca-jdk14.0.1-macosx_x64.tar.gz"
+        ]
+    },
+    "openjdk14_linux_archive": {
+        "build_file_content": "\njava_runtime(name = 'runtime', srcs =  glob(['**']), visibility = ['//visibility:public'])\nexports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])\n",
+        "name": "openjdk14_linux_archive",
+        "sha256": "48bb8947034cd079ad1ef83335e7634db4b12a26743a0dc314b6b861480777aa",
+        "strip_prefix": "zulu14.28.21-ca-jdk14.0.1-linux_x64",
+        "urls": [
+            "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu14.28.21-ca-jdk14.0.1-linux_x64.tar.gz"
+        ]
+    },
+    "openjdk14_windows_archive": {
+        "build_file_content": "\njava_runtime(name = 'runtime', srcs =  glob(['**']), visibility = ['//visibility:public'])\nexports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])\n",
+        "name": "openjdk14_windows_archive",
+        "sha256": "9cb078b5026a900d61239c866161f0d9558ec759aa15c5b4c7e905370e868284",
+        "strip_prefix": "zulu14.28.21-ca-jdk14.0.1-win_x64",
+        "urls": [
+            "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu14.28.21-ca-jdk14.0.1-win_x64.zip"
+        ]
+    },
+    "openjdk15_darwin_aarch64_archive": {
+        "build_file_content": "\njava_runtime(name = 'runtime', srcs =  glob(['**']), visibility = ['//visibility:public'])\nexports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])\n",
+        "name": "openjdk15_darwin_aarch64_archive",
+        "sha256": "2613c3f15eef6b6ecd0fd102da92282b985e4573905dc902f1783d8059c1efc5",
+        "strip_prefix": "zulu15.29.15-ca-jdk15.0.2-macosx_aarch64",
+        "urls": [
+            "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu15.29.15-ca-jdk15.0.2-macosx_aarch64.tar.gz",
+            "https://cdn.azul.com/zulu/bin/zulu15.29.15-ca-jdk15.0.2-macosx_aarch64.tar.gz"
+        ]
+    },
+    "openjdk15_darwin_archive": {
+        "build_file_content": "\njava_runtime(name = 'runtime', srcs =  glob(['**']), visibility = ['//visibility:public'])\nexports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])\n",
+        "name": "openjdk15_darwin_archive",
+        "sha256": "f80b2e0512d9d8a92be24497334c974bfecc8c898fc215ce0e76594f00437482",
+        "strip_prefix": "zulu15.27.17-ca-jdk15.0.0-macosx_x64",
+        "urls": [
+            "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-macosx_x64.tar.gz",
+            "https://cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-macosx_x64.tar.gz"
+        ]
+    },
+    "openjdk15_linux_archive": {
+        "build_file_content": "\njava_runtime(name = 'runtime', srcs =  glob(['**']), visibility = ['//visibility:public'])\nexports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])\n",
+        "name": "openjdk15_linux_archive",
+        "sha256": "0a38f1138c15a4f243b75eb82f8ef40855afcc402e3c2a6de97ce8235011b1ad",
+        "strip_prefix": "zulu15.27.17-ca-jdk15.0.0-linux_x64",
+        "urls": [
+            "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-linux_x64.tar.gz",
+            "https://cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-linux_x64.tar.gz"
+        ]
+    },
+    "openjdk15_windows_archive": {
+        "build_file_content": "\njava_runtime(name = 'runtime', srcs =  glob(['**']), visibility = ['//visibility:public'])\nexports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])\n",
+        "name": "openjdk15_windows_archive",
+        "sha256": "f535a530151e6c20de8a3078057e332b08887cb3ba1a4735717357e72765cad6",
+        "strip_prefix": "zulu15.27.17-ca-jdk15.0.0-win_x64",
+        "urls": [
+            "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-win_x64.zip",
+            "https://cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-win_x64.zip"
+        ]
+    },
+    "openjdk_linux": {
+        "downloaded_file_path": "zulu-linux.tar.gz",
+        "name": "openjdk_linux",
+        "sha256": "65bfe4e0ffa74a680ee4410db46b17e30cd9397b664a92a886599fe1f3530969",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-linux_x64-linux_x64-allmodules-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581689070.tar.gz"
+        ]
+    },
+    "openjdk_linux_aarch64": {
+        "downloaded_file_path": "zulu-linux-aarch64.tar.gz",
+        "name": "openjdk_linux_aarch64",
+        "sha256": "6b245793087300db3ee82ab0d165614f193a73a60f2f011e347756c1e6ca5bac",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.37.48-ca-jdk11.0.6/zulu11.37.48-ca-jdk11.0.6-linux_aarch64-allmodules-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581690750.tar.gz"
+        ]
+    },
+    "openjdk_linux_aarch64_minimal": {
+        "downloaded_file_path": "zulu-linux-aarch64-minimal.tar.gz",
+        "name": "openjdk_linux_aarch64_minimal",
+        "sha256": "06f6520a877704c77614bcfc4f846cc7cbcbf5eaad149bf7f19f4f16e285c9de",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.37.48-ca-jdk11.0.6/zulu11.37.48-ca-jdk11.0.6-linux_aarch64-minimal-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581690750.tar.gz"
+        ]
+    },
+    "openjdk_linux_aarch64_vanilla": {
+        "downloaded_file_path": "zulu-linux-aarch64-vanilla.tar.gz",
+        "name": "openjdk_linux_aarch64_vanilla",
+        "sha256": "a452f1b9682d9f83c1c14e54d1446e1c51b5173a3a05dcb013d380f9508562e4",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.37.48-ca-jdk11.0.6/zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz"
+        ]
+    },
+    "openjdk_linux_minimal": {
+        "downloaded_file_path": "zulu-linux-minimal.tar.gz",
+        "name": "openjdk_linux_minimal",
+        "sha256": "91f7d52f695c681d4e21499b4319d548aadef249a6b3053e306308992e1e29ae",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-linux_x64-minimal-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581689068.tar.gz"
+        ]
+    },
+    "openjdk_linux_ppc64le_vanilla": {
+        "downloaded_file_path": "adoptopenjdk-ppc64le-vanilla.tar.gz",
+        "name": "openjdk_linux_ppc64le_vanilla",
+        "sha256": "a417db0295b1f4b538ecbaf7c774f3a177fab9657a665940170936c0eca4e71a",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7+10/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.7_10.tar.gz",
+            "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7+10/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.7_10.tar.gz"
+        ]
+    },
+    "openjdk_linux_s390x_vanilla": {
+        "downloaded_file_path": "adoptopenjdk-s390x-vanilla.tar.gz",
+        "name": "openjdk_linux_s390x_vanilla",
+        "sha256": "d9b72e87a1d3ebc0c9552f72ae5eb150fffc0298a7cb841f1ce7bfc70dcd1059",
+        "urls": [
+            "https://mirror.bazel.build/github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7+10/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.7_10.tar.gz",
+            "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7+10/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.7_10.tar.gz"
+        ]
+    },
+    "openjdk_linux_vanilla": {
+        "downloaded_file_path": "zulu-linux-vanilla.tar.gz",
+        "name": "openjdk_linux_vanilla",
+        "sha256": "360626cc19063bc411bfed2914301b908a8f77a7919aaea007a977fa8fb3cde1",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-linux_x64.tar.gz"
+        ]
+    },
+    "openjdk_macos_aarch64": {
+        "downloaded_file_path": "zulu-macos-aarch64.tar.gz",
+        "name": "openjdk_macos_aarch64",
+        "sha256": "a900ef793cb34b03ac5d93ea2f67291b6842e99d500934e19393a8d8f9bfa6ff",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.45.27-ca-jdk11.0.10/zulu11.45.27-ca-jdk11.0.10-macosx_aarch64-allmodules-1611665569.tar.gz"
+        ]
+    },
+    "openjdk_macos_aarch64_minimal": {
+        "downloaded_file_path": "zulu-macos-aarch64-minimal.tar.gz",
+        "name": "openjdk_macos_aarch64_minimal",
+        "sha256": "f4f606926e6deeaa8b8397e299313d9df87642fe464b0ccf1ed0432aeb00640b",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.45.27-ca-jdk11.0.10/zulu11.45.27-ca-jdk11.0.10-macosx_aarch64-minimal-1611665562.tar.gz"
+        ]
+    },
+    "openjdk_macos_aarch64_vanilla": {
+        "downloaded_file_path": "zulu-macos-aarch64-vanilla.tar.gz",
+        "name": "openjdk_macos_aarch64_vanilla",
+        "sha256": "3dcc636e64ae58b922269c2dc9f20f6f967bee90e3f6847d643c4a566f1e8d8a",
+        "urls": [
+            "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.45.27-ca-jdk11.0.10-macosx_aarch64.tar.gz",
+            "https://cdn.azul.com/zulu/bin/zulu11.45.27-ca-jdk11.0.10-macosx_aarch64.tar.gz"
+        ]
+    },
+    "openjdk_macos_x86_64": {
+        "downloaded_file_path": "zulu-macos.tar.gz",
+        "name": "openjdk_macos_x86_64",
+        "sha256": "8e283cfd23c7555be8e17295ed76eb8f00324c88ab904b8de37bbe08f90e569b",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-macosx_x64-allmodules-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581689066.tar.gz"
+        ]
+    },
+    "openjdk_macos_x86_64_minimal": {
+        "downloaded_file_path": "zulu-macos-minimal.tar.gz",
+        "name": "openjdk_macos_x86_64_minimal",
+        "sha256": "1bacb1c07035d4066d79f0b65b4ea0ebd1954f3662bdfe3618da382ac8fd23a6",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-macosx_x64-minimal-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581689063.tar.gz"
+        ]
+    },
+    "openjdk_macos_x86_64_vanilla": {
+        "downloaded_file_path": "zulu-macos-vanilla.tar.gz",
+        "name": "openjdk_macos_x86_64_vanilla",
+        "sha256": "e1fe56769f32e2aaac95e0a8f86b5a323da5af3a3b4bba73f3086391a6cc056f",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz"
+        ]
+    },
+    "openjdk_win": {
+        "downloaded_file_path": "zulu-win.zip",
+        "name": "openjdk_win",
+        "sha256": "8e1604b3a27dcf639bc6d1a73103f1211848139e4cceb081d0a74a99e1e6f995",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64-allmodules-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581689080.zip"
+        ]
+    },
+    "openjdk_win_minimal": {
+        "downloaded_file_path": "zulu-win-minimal.zip",
+        "name": "openjdk_win_minimal",
+        "sha256": "b90a713c9c2d9ea23cad44d2c2dfcc9af22faba9bde55dedc1c3bb9f556ac1ae",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64-minimal-b23d4e05466f2aa1fdcd72d3d3a8e962206b64bf-1581689080.zip"
+        ]
+    },
+    "openjdk_win_vanilla": {
+        "downloaded_file_path": "zulu-win-vanilla.zip",
+        "name": "openjdk_win_vanilla",
+        "sha256": "a9695617b8374bfa171f166951214965b1d1d08f43218db9a2a780b71c665c18",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip"
+        ]
+    },
+    "platforms": {
+        "name": "platforms",
+        "sha256": "079945598e4b6cc075846f7fd6a9d0857c33a7afc0de868c2ccb96405225135d",
+        "urls": [
+            "https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.4/platforms-0.0.4.tar.gz",
+            "https://github.com/bazelbuild/platforms/releases/download/0.0.4/platforms-0.0.4.tar.gz"
+        ]
+    },
+    "platforms-0.0.4.tar.gz": {
+        "name": "platforms-0.0.4.tar.gz",
+        "sha256": "079945598e4b6cc075846f7fd6a9d0857c33a7afc0de868c2ccb96405225135d",
+        "urls": [
+            "https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.4/platforms-0.0.4.tar.gz",
+            "https://github.com/bazelbuild/platforms/releases/download/0.0.4/platforms-0.0.4.tar.gz"
+        ]
+    },
+    "remote_coverage_tools": {
+        "name": "remote_coverage_tools",
+        "sha256": "cd14f1cb4559e4723e63b7e7b06d09fcc3bd7ba58d03f354cdff1439bd936a7d",
+        "urls": [
+            "https://mirror.bazel.build/bazel_coverage_output_generator/releases/coverage_output_generator-v2.5.zip"
+        ]
+    },
+    "remote_coverage_tools_for_testing": {
+        "name": "remote_coverage_tools_for_testing",
+        "patch_cmds": [
+            "test -f BUILD && chmod u+w BUILD || true",
+            "echo >> BUILD",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "cd14f1cb4559e4723e63b7e7b06d09fcc3bd7ba58d03f354cdff1439bd936a7d",
+        "urls": [
+            "https://mirror.bazel.build/bazel_coverage_output_generator/releases/coverage_output_generator-v2.5.zip"
+        ]
+    },
+    "remote_java_tools_darwin": {
+        "generator_function": "maybe",
+        "generator_name": "remote_java_tools_darwin",
+        "name": "remote_java_tools_darwin",
+        "sha256": "64e5de2175dfccb96831573946b80d106edf3801d9db38b564514bf3581d466b",
+        "urls": [
+            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v10.0/java_tools_javac11_darwin-v10.0.zip",
+            "https://github.com/bazelbuild/java_tools/releases/download/javac11_v10.0/java_tools_javac11_darwin-v10.0.zip"
+        ]
+    },
+    "remote_java_tools_darwin_for_testing": {
+        "name": "remote_java_tools_darwin_for_testing",
+        "patch_cmds": [
+            "test -f BUILD && chmod u+w BUILD || true",
+            "echo >> BUILD",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "d15b05d2061382748f779dc566537ea567a46bcba6fa34b56d7cb6e6d668adab",
+        "urls": [
+            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v10.6/java_tools_javac11_darwin-v10.6.zip",
+            "https://github.com/bazelbuild/java_tools/releases/download/javac11_v10.6/java_tools_javac11_darwin-v10.6.zip"
+        ]
+    },
+    "remote_java_tools_javac11_test_darwin": {
+        "name": "remote_java_tools_javac11_test_darwin",
+        "patch_cmds": [
+            "test -f BUILD && chmod u+w BUILD || true",
+            "echo >> BUILD",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "d15b05d2061382748f779dc566537ea567a46bcba6fa34b56d7cb6e6d668adab",
+        "urls": [
+            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v10.6/java_tools_javac11_darwin-v10.6.zip"
+        ]
+    },
+    "remote_java_tools_javac11_test_linux": {
+        "name": "remote_java_tools_javac11_test_linux",
+        "patch_cmds": [
+            "test -f BUILD && chmod u+w BUILD || true",
+            "echo >> BUILD",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "085c0ba53ba764e81d4c195524f3c596085cbf9cdc01dd8e6d2ae677e726af35",
+        "urls": [
+            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v10.6/java_tools_javac11_linux-v10.6.zip"
+        ]
+    },
+    "remote_java_tools_javac11_test_windows": {
+        "name": "remote_java_tools_javac11_test_windows",
+        "patch_cmds": [
+            "test -f BUILD && chmod u+w BUILD || true",
+            "echo >> BUILD",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "873f1e53d1fa9c8e46b717673816cd822bb7acc474a194a18ff849fd8fa6ff00",
+        "urls": [
+            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v10.6/java_tools_javac11_windows-v10.6.zip"
+        ]
+    },
+    "remote_java_tools_linux": {
+        "generator_function": "maybe",
+        "generator_name": "remote_java_tools_linux",
+        "name": "remote_java_tools_linux",
+        "sha256": "69e65353c2cd65780abcbcce4daae973599298273b0f8b4d469eed822cb220d1",
+        "urls": [
+            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v10.0/java_tools_javac11_linux-v10.0.zip",
+            "https://github.com/bazelbuild/java_tools/releases/download/javac11_v10.0/java_tools_javac11_linux-v10.0.zip"
+        ]
+    },
+    "remote_java_tools_linux_for_testing": {
+        "name": "remote_java_tools_linux_for_testing",
+        "patch_cmds": [
+            "test -f BUILD && chmod u+w BUILD || true",
+            "echo >> BUILD",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "085c0ba53ba764e81d4c195524f3c596085cbf9cdc01dd8e6d2ae677e726af35",
+        "urls": [
+            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v10.6/java_tools_javac11_linux-v10.6.zip",
+            "https://github.com/bazelbuild/java_tools/releases/download/javac11_v10.6/java_tools_javac11_linux-v10.6.zip"
+        ]
+    },
+    "remote_java_tools_windows": {
+        "generator_function": "maybe",
+        "generator_name": "remote_java_tools_windows",
+        "name": "remote_java_tools_windows",
+        "sha256": "d2f62af8daa0a3d55789b605f6582e37038329c64843337c71e64515468e55c4",
+        "urls": [
+            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v10.0/java_tools_javac11_windows-v10.0.zip",
+            "https://github.com/bazelbuild/java_tools/releases/download/javac11_v10.0/java_tools_javac11_windows-v10.0.zip"
+        ]
+    },
+    "remote_java_tools_windows_for_testing": {
+        "name": "remote_java_tools_windows_for_testing",
+        "patch_cmds": [
+            "test -f BUILD && chmod u+w BUILD || true",
+            "echo >> BUILD",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "873f1e53d1fa9c8e46b717673816cd822bb7acc474a194a18ff849fd8fa6ff00",
+        "urls": [
+            "https://mirror.bazel.build/bazel_java_tools/releases/javac11/v10.6/java_tools_javac11_windows-v10.6.zip",
+            "https://github.com/bazelbuild/java_tools/releases/download/javac11_v10.6/java_tools_javac11_windows-v10.6.zip"
+        ]
+    },
+    "remotejdk11_linux": {
+        "build_file": "@bazel_tools//tools/jdk:jdk.BUILD",
+        "generator_function": "maybe",
+        "generator_name": "remotejdk11_linux",
+        "name": "remotejdk11_linux",
+        "sha256": "360626cc19063bc411bfed2914301b908a8f77a7919aaea007a977fa8fb3cde1",
+        "strip_prefix": "zulu11.37.17-ca-jdk11.0.6-linux_x64",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-linux_x64.tar.gz"
+        ]
+    },
+    "remotejdk11_linux_aarch64": {
+        "build_file": "@bazel_tools//tools/jdk:jdk.BUILD",
+        "generator_function": "maybe",
+        "generator_name": "remotejdk11_linux_aarch64",
+        "name": "remotejdk11_linux_aarch64",
+        "sha256": "a452f1b9682d9f83c1c14e54d1446e1c51b5173a3a05dcb013d380f9508562e4",
+        "strip_prefix": "zulu11.37.48-ca-jdk11.0.6-linux_aarch64",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.37.48-ca-jdk11.0.6/zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz"
+        ]
+    },
+    "remotejdk11_linux_aarch64_for_testing": {
+        "build_file": "@local_jdk//:BUILD.bazel",
+        "name": "remotejdk11_linux_aarch64_for_testing",
+        "patch_cmds": [
+            "test -f BUILD.bazel && chmod u+w BUILD.bazel || true",
+            "echo >> BUILD.bazel",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD.bazel"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD.bazel -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "a452f1b9682d9f83c1c14e54d1446e1c51b5173a3a05dcb013d380f9508562e4",
+        "strip_prefix": "zulu11.37.48-ca-jdk11.0.6-linux_aarch64",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.37.48-ca-jdk11.0.6/zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz"
+        ]
+    },
+    "remotejdk11_linux_for_testing": {
+        "build_file": "@local_jdk//:BUILD.bazel",
+        "name": "remotejdk11_linux_for_testing",
+        "patch_cmds": [
+            "test -f BUILD.bazel && chmod u+w BUILD.bazel || true",
+            "echo >> BUILD.bazel",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD.bazel"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD.bazel -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "360626cc19063bc411bfed2914301b908a8f77a7919aaea007a977fa8fb3cde1",
+        "strip_prefix": "zulu11.37.17-ca-jdk11.0.6-linux_x64",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-linux_x64.tar.gz"
+        ]
+    },
+    "remotejdk11_linux_ppc64le": {
+        "build_file": "@bazel_tools//tools/jdk:jdk.BUILD",
+        "generator_function": "maybe",
+        "generator_name": "remotejdk11_linux_ppc64le",
+        "name": "remotejdk11_linux_ppc64le",
+        "sha256": "a417db0295b1f4b538ecbaf7c774f3a177fab9657a665940170936c0eca4e71a",
+        "strip_prefix": "jdk-11.0.7+10",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7+10/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.7_10.tar.gz",
+            "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7+10/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.7_10.tar.gz"
+        ]
+    },
+    "remotejdk11_linux_ppc64le_for_testing": {
+        "build_file": "@local_jdk//:BUILD.bazel",
+        "name": "remotejdk11_linux_ppc64le_for_testing",
+        "patch_cmds": [
+            "test -f BUILD.bazel && chmod u+w BUILD.bazel || true",
+            "echo >> BUILD.bazel",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD.bazel"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD.bazel -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "a417db0295b1f4b538ecbaf7c774f3a177fab9657a665940170936c0eca4e71a",
+        "strip_prefix": "jdk-11.0.7+10",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7+10/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.7_10.tar.gz",
+            "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7+10/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.7_10.tar.gz"
+        ]
+    },
+    "remotejdk11_linux_s390x": {
+        "build_file": "@bazel_tools//tools/jdk:jdk.BUILD",
+        "generator_function": "maybe",
+        "generator_name": "remotejdk11_linux_s390x",
+        "name": "remotejdk11_linux_s390x",
+        "sha256": "d9b72e87a1d3ebc0c9552f72ae5eb150fffc0298a7cb841f1ce7bfc70dcd1059",
+        "strip_prefix": "jdk-11.0.7+10",
+        "urls": [
+            "https://mirror.bazel.build/github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7+10/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.7_10.tar.gz",
+            "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7+10/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.7_10.tar.gz"
+        ]
+    },
+    "remotejdk11_linux_s390x_for_testing": {
+        "build_file": "@local_jdk//:BUILD.bazel",
+        "name": "remotejdk11_linux_s390x_for_testing",
+        "patch_cmds": [
+            "test -f BUILD.bazel && chmod u+w BUILD.bazel || true",
+            "echo >> BUILD.bazel",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD.bazel"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD.bazel -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "d9b72e87a1d3ebc0c9552f72ae5eb150fffc0298a7cb841f1ce7bfc70dcd1059",
+        "strip_prefix": "jdk-11.0.7+10",
+        "urls": [
+            "https://mirror.bazel.build/github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7+10/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.7_10.tar.gz",
+            "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7+10/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.7_10.tar.gz"
+        ]
+    },
+    "remotejdk11_macos": {
+        "build_file": "@bazel_tools//tools/jdk:jdk.BUILD",
+        "generator_function": "maybe",
+        "generator_name": "remotejdk11_macos",
+        "name": "remotejdk11_macos",
+        "sha256": "e1fe56769f32e2aaac95e0a8f86b5a323da5af3a3b4bba73f3086391a6cc056f",
+        "strip_prefix": "zulu11.37.17-ca-jdk11.0.6-macosx_x64",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz"
+        ]
+    },
+    "remotejdk11_macos_aarch64_for_testing": {
+        "build_file": "@local_jdk//:BUILD.bazel",
+        "name": "remotejdk11_macos_aarch64_for_testing",
+        "patch_cmds": [
+            "test -f BUILD.bazel && chmod u+w BUILD.bazel || true",
+            "echo >> BUILD.bazel",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD.bazel"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD.bazel -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "3dcc636e64ae58b922269c2dc9f20f6f967bee90e3f6847d643c4a566f1e8d8a",
+        "strip_prefix": "zulu11.45.27-ca-jdk11.0.10-macosx_aarch64",
+        "urls": [
+            "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.45.27-ca-jdk11.0.10-macosx_aarch64.tar.gz",
+            "https://cdn.azul.com/zulu/bin/zulu11.45.27-ca-jdk11.0.10-macosx_aarch64.tar.gz"
+        ]
+    },
+    "remotejdk11_macos_for_testing": {
+        "build_file": "@local_jdk//:BUILD.bazel",
+        "name": "remotejdk11_macos_for_testing",
+        "patch_cmds": [
+            "test -f BUILD.bazel && chmod u+w BUILD.bazel || true",
+            "echo >> BUILD.bazel",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD.bazel"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD.bazel -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "e1fe56769f32e2aaac95e0a8f86b5a323da5af3a3b4bba73f3086391a6cc056f",
+        "strip_prefix": "zulu11.37.17-ca-jdk11.0.6-macosx_x64",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz"
+        ]
+    },
+    "remotejdk11_win": {
+        "build_file": "@bazel_tools//tools/jdk:jdk.BUILD",
+        "generator_function": "maybe",
+        "generator_name": "remotejdk11_win",
+        "name": "remotejdk11_win",
+        "sha256": "a9695617b8374bfa171f166951214965b1d1d08f43218db9a2a780b71c665c18",
+        "strip_prefix": "zulu11.37.17-ca-jdk11.0.6-win_x64",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip"
+        ]
+    },
+    "remotejdk11_win_for_testing": {
+        "build_file": "@local_jdk//:BUILD.bazel",
+        "name": "remotejdk11_win_for_testing",
+        "patch_cmds": [
+            "test -f BUILD.bazel && chmod u+w BUILD.bazel || true",
+            "echo >> BUILD.bazel",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD.bazel"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD.bazel -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "a9695617b8374bfa171f166951214965b1d1d08f43218db9a2a780b71c665c18",
+        "strip_prefix": "zulu11.37.17-ca-jdk11.0.6-win_x64",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip"
+        ]
+    },
+    "remotejdk14_linux": {
+        "build_file": "@bazel_tools//tools/jdk:jdk.BUILD",
+        "generator_function": "maybe",
+        "generator_name": "remotejdk14_linux",
+        "name": "remotejdk14_linux",
+        "sha256": "48bb8947034cd079ad1ef83335e7634db4b12a26743a0dc314b6b861480777aa",
+        "strip_prefix": "zulu14.28.21-ca-jdk14.0.1-linux_x64",
+        "urls": [
+            "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu14.28.21-ca-jdk14.0.1-linux_x64.tar.gz"
+        ]
+    },
+    "remotejdk14_linux_for_testing": {
+        "build_file": "@local_jdk//:BUILD.bazel",
+        "name": "remotejdk14_linux_for_testing",
+        "patch_cmds": [
+            "test -f BUILD.bazel && chmod u+w BUILD.bazel || true",
+            "echo >> BUILD.bazel",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD.bazel"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD.bazel -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "48bb8947034cd079ad1ef83335e7634db4b12a26743a0dc314b6b861480777aa",
+        "strip_prefix": "zulu14.28.21-ca-jdk14.0.1-linux_x64",
+        "urls": [
+            "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu14.28.21-ca-jdk14.0.1-linux_x64.tar.gz"
+        ]
+    },
+    "remotejdk14_macos": {
+        "build_file": "@bazel_tools//tools/jdk:jdk.BUILD",
+        "generator_function": "maybe",
+        "generator_name": "remotejdk14_macos",
+        "name": "remotejdk14_macos",
+        "sha256": "088bd4d0890acc9f032b738283bf0f26b2a55c50b02d1c8a12c451d8ddf080dd",
+        "strip_prefix": "zulu14.28.21-ca-jdk14.0.1-macosx_x64",
+        "urls": [
+            "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu14.28.21-ca-jdk14.0.1-macosx_x64.tar.gz"
+        ]
+    },
+    "remotejdk14_macos_for_testing": {
+        "build_file": "@local_jdk//:BUILD.bazel",
+        "name": "remotejdk14_macos_for_testing",
+        "patch_cmds": [
+            "test -f BUILD.bazel && chmod u+w BUILD.bazel || true",
+            "echo >> BUILD.bazel",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD.bazel"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD.bazel -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "088bd4d0890acc9f032b738283bf0f26b2a55c50b02d1c8a12c451d8ddf080dd",
+        "strip_prefix": "zulu14.28.21-ca-jdk14.0.1-macosx_x64",
+        "urls": [
+            "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu14.28.21-ca-jdk14.0.1-macosx_x64.tar.gz"
+        ]
+    },
+    "remotejdk14_win": {
+        "build_file": "@bazel_tools//tools/jdk:jdk.BUILD",
+        "generator_function": "maybe",
+        "generator_name": "remotejdk14_win",
+        "name": "remotejdk14_win",
+        "sha256": "9cb078b5026a900d61239c866161f0d9558ec759aa15c5b4c7e905370e868284",
+        "strip_prefix": "zulu14.28.21-ca-jdk14.0.1-win_x64",
+        "urls": [
+            "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu14.28.21-ca-jdk14.0.1-win_x64.zip"
+        ]
+    },
+    "remotejdk14_win_for_testing": {
+        "build_file": "@local_jdk//:BUILD.bazel",
+        "name": "remotejdk14_win_for_testing",
+        "patch_cmds": [
+            "test -f BUILD.bazel && chmod u+w BUILD.bazel || true",
+            "echo >> BUILD.bazel",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD.bazel"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD.bazel -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "9cb078b5026a900d61239c866161f0d9558ec759aa15c5b4c7e905370e868284",
+        "strip_prefix": "zulu14.28.21-ca-jdk14.0.1-win_x64",
+        "urls": [
+            "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu14.28.21-ca-jdk14.0.1-win_x64.zip"
+        ]
+    },
+    "remotejdk15_linux_for_testing": {
+        "build_file": "@local_jdk//:BUILD.bazel",
+        "name": "remotejdk15_linux_for_testing",
+        "patch_cmds": [
+            "test -f BUILD.bazel && chmod u+w BUILD.bazel || true",
+            "echo >> BUILD.bazel",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD.bazel"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD.bazel -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "0a38f1138c15a4f243b75eb82f8ef40855afcc402e3c2a6de97ce8235011b1ad",
+        "strip_prefix": "zulu15.27.17-ca-jdk15.0.0-linux_x64",
+        "urls": [
+            "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-linux_x64.tar.gz",
+            "https://cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-linux_x64.tar.gz"
+        ]
+    },
+    "remotejdk15_macos_aarch64_for_testing": {
+        "build_file": "@local_jdk//:BUILD.bazel",
+        "name": "remotejdk15_macos_aarch64_for_testing",
+        "patch_cmds": [
+            "test -f BUILD.bazel && chmod u+w BUILD.bazel || true",
+            "echo >> BUILD.bazel",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD.bazel"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD.bazel -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "2613c3f15eef6b6ecd0fd102da92282b985e4573905dc902f1783d8059c1efc5",
+        "strip_prefix": "zulu15.29.15-ca-jdk15.0.2-macosx_aarch64",
+        "urls": [
+            "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu15.29.15-ca-jdk15.0.2-macosx_aarch64.tar.gz",
+            "https://cdn.azul.com/zulu/bin/zulu15.29.15-ca-jdk15.0.2-macosx_aarch64.tar.gz"
+        ]
+    },
+    "remotejdk15_macos_for_testing": {
+        "build_file": "@local_jdk//:BUILD.bazel",
+        "name": "remotejdk15_macos_for_testing",
+        "patch_cmds": [
+            "test -f BUILD.bazel && chmod u+w BUILD.bazel || true",
+            "echo >> BUILD.bazel",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD.bazel"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD.bazel -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "f80b2e0512d9d8a92be24497334c974bfecc8c898fc215ce0e76594f00437482",
+        "strip_prefix": "zulu15.27.17-ca-jdk15.0.0-macosx_x64",
+        "urls": [
+            "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-macosx_x64.tar.gz",
+            "https://cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-macosx_x64.tar.gz"
+        ]
+    },
+    "remotejdk15_win_for_testing": {
+        "build_file": "@local_jdk//:BUILD.bazel",
+        "name": "remotejdk15_win_for_testing",
+        "patch_cmds": [
+            "test -f BUILD.bazel && chmod u+w BUILD.bazel || true",
+            "echo >> BUILD.bazel",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD.bazel"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD.bazel -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "f535a530151e6c20de8a3078057e332b08887cb3ba1a4735717357e72765cad6",
+        "strip_prefix": "zulu15.27.17-ca-jdk15.0.0-win_x64",
+        "urls": [
+            "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-win_x64.zip",
+            "https://cdn.azul.com/zulu/bin/zulu15.27.17-ca-jdk15.0.0-win_x64.zip"
+        ]
+    },
+    "rules_cc": {
+        "name": "rules_cc",
+        "patch_cmds": [
+            "test -f BUILD && chmod u+w BUILD || true",
+            "echo >> BUILD",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "d0c573b94a6ef20ef6ff20154a23d0efcb409fb0e1ff0979cec318dfe42f0cdd",
+        "strip_prefix": "rules_cc-b1c40e1de81913a3c40e5948f78719c28152486d",
+        "urls": [
+            "https://mirror.bazel.build/github.com/bazelbuild/rules_cc/archive/b1c40e1de81913a3c40e5948f78719c28152486d.zip",
+            "https://github.com/bazelbuild/rules_cc/archive/b1c40e1de81913a3c40e5948f78719c28152486d.zip"
+        ]
+    },
+    "rules_java": {
+        "name": "rules_java",
+        "patch_cmds": [
+            "test -f BUILD && chmod u+w BUILD || true",
+            "echo >> BUILD",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "bc81f1ba47ef5cc68ad32225c3d0e70b8c6f6077663835438da8d5733f917598",
+        "strip_prefix": "rules_java-7cf3cefd652008d0a64a419c34c13bdca6c8f178",
+        "urls": [
+            "https://mirror.bazel.build/github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip",
+            "https://github.com/bazelbuild/rules_java/archive/7cf3cefd652008d0a64a419c34c13bdca6c8f178.zip"
+        ]
+    },
+    "rules_nodejs-2.2.2.tar.gz": {
+        "name": "rules_nodejs-2.2.2.tar.gz",
+        "sha256": "f2194102720e662dbf193546585d705e645314319554c6ce7e47d8b59f459e9c",
+        "urls": [
+            "https://mirror.bazel.build/github.com/bazelbuild/rules_nodejs/releases/download/2.2.2/rules_nodejs-2.2.2.tar.gz",
+            "https://github.com/bazelbuild/rules_nodejs/releases/download/2.2.2/rules_nodejs-2.2.2.tar.gz"
+        ]
+    },
+    "rules_pkg": {
+        "name": "rules_pkg",
+        "patch_cmds": [
+            "test -f BUILD && chmod u+w BUILD || true",
+            "echo >> BUILD",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "4ba8f4ab0ff85f2484287ab06c0d871dcb31cc54d439457d28fd4ae14b18450a",
+        "urls": [
+            "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.2.4/rules_pkg-0.2.4.tar.gz",
+            "https://github.com/bazelbuild/rules_pkg/releases/download/0.2.4/rules_pkg-0.2.4.tar.gz"
+        ]
+    },
+    "rules_pkg-0.2.4.tar.gz": {
+        "name": "rules_pkg-0.2.4.tar.gz",
+        "sha256": "4ba8f4ab0ff85f2484287ab06c0d871dcb31cc54d439457d28fd4ae14b18450a",
+        "urls": [
+            "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.2.4/rules_pkg-0.2.4.tar.gz",
+            "https://github.com/bazelbuild/rules_pkg/releases/download/0.2.4/rules_pkg-0.2.4.tar.gz"
+        ]
+    },
+    "rules_proto": {
+        "name": "rules_proto",
+        "patch_cmds": [
+            "test -f BUILD.bazel && chmod u+w BUILD.bazel || true",
+            "echo >> BUILD.bazel",
+            "echo 'exports_files([\"WORKSPACE\"], visibility = [\"//visibility:public\"])' >> BUILD.bazel"
+        ],
+        "patch_cmds_win": [
+            "Add-Content -Path BUILD.bazel -Value \"`nexports_files([`\"WORKSPACE`\"], visibility = [`\"//visibility:public`\"])`n\" -Force"
+        ],
+        "sha256": "8e7d59a5b12b233be5652e3d29f42fba01c7cbab09f6b3a8d0a57ed6d1e9a0da",
+        "strip_prefix": "rules_proto-7e4afce6fe62dbff0a4a03450143146f9f2d7488",
+        "urls": [
+            "https://mirror.bazel.build/github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz",
+            "https://github.com/bazelbuild/rules_proto/archive/7e4afce6fe62dbff0a4a03450143146f9f2d7488.tar.gz"
+        ]
+    },
+    "six": {
+        "build_file": "@com_github_grpc_grpc//third_party:six.BUILD",
+        "generator_function": "grpc_deps",
+        "generator_name": "six",
+        "name": "six",
+        "sha256": "d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73",
+        "urls": [
+            "https://files.pythonhosted.org/packages/dd/bf/4138e7bfb757de47d1f4b6994648ec67a51efe58fa907c1e11e350cddfca/six-1.12.0.tar.gz"
+        ]
+    },
+    "upb": {
+        "generator_function": "grpc_deps",
+        "generator_name": "upb",
+        "name": "upb",
+        "sha256": "7992217989f3156f8109931c1fc6db3434b7414957cb82371552377beaeb9d6c",
+        "strip_prefix": "upb-382d5afc60e05470c23e8de19b19fc5ad231e732",
+        "urls": [
+            "https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/upb/archive/382d5afc60e05470c23e8de19b19fc5ad231e732.tar.gz",
+            "https://github.com/protocolbuffers/upb/archive/382d5afc60e05470c23e8de19b19fc5ad231e732.tar.gz"
+        ]
+    },
+    "v1.33.1.tar.gz": {
+        "name": "v1.33.1.tar.gz",
+        "sha256": "58eaee5c0f1bd0b92ebe1fa0606ec8f14798500620e7444726afcaf65041cb63",
+        "urls": [
+            "https://mirror.bazel.build/github.com/grpc/grpc/archive/v1.33.1.tar.gz",
+            "https://github.com/grpc/grpc/archive/v1.33.1.tar.gz"
+        ]
+    },
+    "v3.13.0.tar.gz": {
+        "name": "v3.13.0.tar.gz",
+        "sha256": "9b4ee22c250fe31b16f1a24d61467e40780a3fbb9b91c3b65be2a376ed913a1a",
+        "urls": [
+            "https://mirror.bazel.build/github.com/protocolbuffers/protobuf/archive/v3.13.0.tar.gz",
+            "https://github.com/protocolbuffers/protobuf/archive/v3.13.0.tar.gz"
+        ]
+    },
+    "zlib": {
+        "build_file": "@com_github_grpc_grpc//third_party:zlib.BUILD",
+        "generator_function": "grpc_deps",
+        "generator_name": "zlib",
+        "name": "zlib",
+        "sha256": "6d4d6640ca3121620995ee255945161821218752b551a1a180f4215f7d124d45",
+        "strip_prefix": "zlib-cacf7f1d4e3d44d871b605da3b647f07d718623f",
+        "urls": [
+            "https://storage.googleapis.com/grpc-bazel-mirror/github.com/madler/zlib/archive/cacf7f1d4e3d44d871b605da3b647f07d718623f.tar.gz",
+            "https://github.com/madler/zlib/archive/cacf7f1d4e3d44d871b605da3b647f07d718623f.tar.gz"
+        ]
+    },
+    "zulu11.37.17-ca-jdk11.0.6-linux_x64.tar.gz": {
+        "name": "zulu11.37.17-ca-jdk11.0.6-linux_x64.tar.gz",
+        "sha256": "360626cc19063bc411bfed2914301b908a8f77a7919aaea007a977fa8fb3cde1",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-linux_x64.tar.gz"
+        ]
+    },
+    "zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz": {
+        "name": "zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz",
+        "sha256": "e1fe56769f32e2aaac95e0a8f86b5a323da5af3a3b4bba73f3086391a6cc056f",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-macosx_x64.tar.gz"
+        ]
+    },
+    "zulu11.37.17-ca-jdk11.0.6-win_x64.zip": {
+        "name": "zulu11.37.17-ca-jdk11.0.6-win_x64.zip",
+        "sha256": "a9695617b8374bfa171f166951214965b1d1d08f43218db9a2a780b71c665c18",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.37.17-ca-jdk11.0.6/zulu11.37.17-ca-jdk11.0.6-win_x64.zip"
+        ]
+    },
+    "zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz": {
+        "name": "zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz",
+        "sha256": "a452f1b9682d9f83c1c14e54d1446e1c51b5173a3a05dcb013d380f9508562e4",
+        "urls": [
+            "https://mirror.bazel.build/openjdk/azul-zulu11.37.48-ca-jdk11.0.6/zulu11.37.48-ca-jdk11.0.6-linux_aarch64.tar.gz"
+        ]
+    },
+    "zulu11.45.27-ca-jdk11.0.10-macosx_aarch64.tar.gz": {
+        "name": "zulu11.45.27-ca-jdk11.0.10-macosx_aarch64.tar.gz",
+        "sha256": "3dcc636e64ae58b922269c2dc9f20f6f967bee90e3f6847d643c4a566f1e8d8a",
+        "urls": [
+            "https://mirror.bazel.build/cdn.azul.com/zulu/bin/zulu11.45.27-ca-jdk11.0.10-macosx_aarch64.tar.gz"
+        ]
+    }
+}
diff --git a/pkgs/development/tools/build-managers/bazel/bazel_4/update-srcDeps.py b/pkgs/development/tools/build-managers/bazel/bazel_4/update-srcDeps.py
new file mode 100755
index 00000000000..9e998e05875
--- /dev/null
+++ b/pkgs/development/tools/build-managers/bazel/bazel_4/update-srcDeps.py
@@ -0,0 +1,54 @@
+#!/usr/bin/env python3
+import sys
+import json
+
+if len(sys.argv) != 2:
+    print("usage: ./this-script src-deps.json < WORKSPACE", file=sys.stderr)
+    print("Takes the bazel WORKSPACE file and reads all archives into a json dict (by evaling it as python code)", file=sys.stderr)
+    print("Hail Eris.", file=sys.stderr)
+    sys.exit(1)
+
+http_archives = []
+
+# just the kw args are the dict { name, sha256, urls … }
+def http_archive(**kw):
+    http_archives.append(kw)
+# like http_file
+def http_file(**kw):
+    http_archives.append(kw)
+
+# this is inverted from http_archive/http_file and bundles multiple archives
+def distdir_tar(**kw):
+    for archive_name in kw['archives']:
+        http_archives.append({
+            "name": archive_name,
+            "sha256": kw['sha256'][archive_name],
+            "urls": kw['urls'][archive_name]
+        })
+
+# TODO?
+def git_repository(**kw):
+    print(json.dumps(kw, sort_keys=True, indent=4), file=sys.stderr)
+    sys.exit(1)
+
+# execute the WORKSPACE like it was python code in this module,
+# using all the function stubs from above.
+exec(sys.stdin.read())
+
+# transform to a dict with the names as keys
+d = { el['name']: el for el in http_archives }
+
+def has_urls(el):
+    return ('url' in el and el['url']) or ('urls' in el and el['urls'])
+def has_sha256(el):
+    return 'sha256' in el and el['sha256']
+bad_archives = list(filter(lambda el: not has_urls(el) or not has_sha256(el), d.values()))
+if bad_archives:
+    print('Following bazel dependencies are missing url or sha256', file=sys.stderr)
+    print('Check bazel sources for master or non-checksummed dependencies', file=sys.stderr)
+    for el in bad_archives:
+        print(json.dumps(el, sort_keys=True, indent=4), file=sys.stderr)
+    sys.exit(1)
+
+with open(sys.argv[1], "w") as f:
+    print(json.dumps(d, sort_keys=True, indent=4), file=f)
diff --git a/pkgs/development/tools/build-managers/bazel/buildtools/default.nix b/pkgs/development/tools/build-managers/bazel/buildtools/default.nix
index dd9bc4016f5..e181917c417 100644
--- a/pkgs/development/tools/build-managers/bazel/buildtools/default.nix
+++ b/pkgs/development/tools/build-managers/bazel/buildtools/default.nix
@@ -1,26 +1,30 @@
-{ stdenv, buildGoPackage, fetchFromGitHub }:
+{ lib, buildGoModule, fetchFromGitHub }:
 
-buildGoPackage rec {
+buildGoModule rec {
   pname = "bazel-buildtools";
-  version = "3.3.0";
-
-  goPackagePath = "github.com/bazelbuild/buildtools";
+  version = "4.0.1";
 
   src = fetchFromGitHub {
     owner = "bazelbuild";
     repo = "buildtools";
     rev = version;
-    sha256 = "0g411gjbm02qd5b50iy6kk81kx2n5zw5x1m6i6g7nrmh38p3pn9k";
+    sha256 = "0q7b9zh38vblqs5lwhjk28km89p706aky4wv6bwz2vg9gl6bfclq";
   };
 
-  goDeps = ./deps.nix;
+  vendorSha256 = "1w6i1lb72mfdyb901gpl9yc6ql73j5kik6li0j5jv5ab2m3j9qvf";
+
+  preBuild = ''
+    rm -r warn/docs
+  '';
+
+  doCheck = false;
 
   excludedPackages = [ "generatetables" ];
 
   buildFlagsArray = [ "-ldflags=-s -w -X main.buildVersion=${version} -X main.buildScmRevision=${src.rev}" ];
 
-  meta = with stdenv.lib; {
-    description = "Tools for working with Google's bazel buildtool. Includes buildifier, buildozer, and unused_deps.";
+  meta = with lib; {
+    description = "Tools for working with Google's bazel buildtool. Includes buildifier, buildozer, and unused_deps";
     homepage = "https://github.com/bazelbuild/buildtools";
     license = licenses.asl20;
     maintainers = with maintainers; [ elasticdog uri-canva marsam ];
diff --git a/pkgs/development/tools/build-managers/bazel/buildtools/deps.nix b/pkgs/development/tools/build-managers/bazel/buildtools/deps.nix
deleted file mode 100644
index a64f96d2c07..00000000000
--- a/pkgs/development/tools/build-managers/bazel/buildtools/deps.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-[
-  {
-    goPackagePath = "github.com/golang/protobuf";
-    fetch = {
-      type = "git";
-      url = "https://github.com/golang/protobuf";
-      rev = "84668698ea25b64748563aa20726db66a6b8d299";
-      sha256 = "1gkd1942vk9n8kfzdwy1iil6wgvlwjq7a3y5jc49ck4lz9rhmgkq";
-    };
-  }
-  {
-    goPackagePath = "go.starlark.net";
-    fetch = {
-      type = "git";
-      url = "https://github.com/google/starlark-go";
-      rev = "6677ee5c7211380ec7e6a1b50dc45287e40ca9e1";
-      sha256 = "1dl8q1lwvmm38w2lzfwray2djdcq40z89yy6vzy387w0xrax0jj0";
-    };
-  }
-]
diff --git a/pkgs/development/tools/build-managers/bazel/java-test.nix b/pkgs/development/tools/build-managers/bazel/java-test.nix
index 30b957eb5e3..11931a197c0 100644
--- a/pkgs/development/tools/build-managers/bazel/java-test.nix
+++ b/pkgs/development/tools/build-managers/bazel/java-test.nix
@@ -38,7 +38,7 @@ let
   ''));
 
   testBazel = bazelTest {
-    name = "bazel-test-cpp";
+    name = "bazel-test-java";
     inherit workspaceDir;
     bazelPkg = bazel;
     buildInputs = [ openjdk8 ];
diff --git a/pkgs/development/tools/build-managers/bazel/protobuf-test.nix b/pkgs/development/tools/build-managers/bazel/protobuf-test.nix
index 0784de4cfd3..3858a681659 100644
--- a/pkgs/development/tools/build-managers/bazel/protobuf-test.nix
+++ b/pkgs/development/tools/build-managers/bazel/protobuf-test.nix
@@ -17,15 +17,29 @@ let
   com_google_protobuf = fetchFromGitHub {
     owner = "protocolbuffers";
     repo = "protobuf";
-    rev = "v3.7.0";
-    sha256 = "0nlxif4cajqllsj2vdh7zp14ag48fb8lsa64zmq8625q9m2lcmdh";
+    rev = "v3.13.0";
+    sha256 = "1nqsvi2yfr93kiwlinz8z7c68ilg1j75b2vcpzxzvripxx5h6xhd";
   };
 
   bazel_skylib = fetchFromGitHub {
     owner = "bazelbuild";
     repo = "bazel-skylib";
-    rev = "f83cb8dd6f5658bc574ccd873e25197055265d1c";
-    sha256 = "091fb0ky0956wgv8gghy9ay3yfx6497mb72qvibf0y9dllmxyn9l";
+    rev = "2ec2e6d715e993d96ad6222770805b5bd25399ae";
+    sha256 = "1z2r2vx6kj102zvp3j032djyv99ski1x1sl4i3p6mswnzrzna86s";
+  };
+
+  rules_python = fetchFromGitHub {
+    owner = "bazelbuild";
+    repo = "rules_python";
+    rev = "c8c79aae9aa1b61d199ad03d5fe06338febd0774";
+    sha256 = "1zn58wv5wcylpi0xj7riw34i1jjpqahanxx8y9srwrv0v93b6pqz";
+  };
+
+  rules_proto = fetchFromGitHub {
+    owner = "bazelbuild";
+    repo = "rules_proto";
+    rev = "a0761ed101b939e19d83b2da5f59034bffc19c12";
+    sha256 = "09lqfj5fxm1fywxr5w8pnpqd859gb6751jka9fhxjxjzs33glhqf";
   };
 
   net_zlib = fetchurl rec {
@@ -40,7 +54,9 @@ let
 
     load("//:proto-support.bzl", "protobuf_deps")
     protobuf_deps()
-  '';
+    load("@rules_proto//proto:repositories.bzl", "rules_proto_toolchains")
+    rules_proto_toolchains()
+    '';
 
   protoSupport = writeText "proto-support.bzl" ''
     """Load dependencies needed to compile the protobuf library as a 3rd-party consumer."""
@@ -62,13 +78,17 @@ let
                 name = "bazel_skylib",
                 path = "${bazel_skylib}",
             )
-
-            native.bind(
-                name = "zlib",
-                actual = "@net_zlib//:zlib",
+            native.local_repository(
+                name = "rules_proto",
+                path = "${rules_proto}",
+            )
+            native.local_repository(
+                name = "rules_python",
+                path = "${rules_python}",
             )
+
             http_archive(
-                name = "net_zlib",
+                name = "zlib",
                 build_file = "@com_google_protobuf//:third_party/zlib.BUILD",
                 sha256 = "${net_zlib.sha256}",
                 strip_prefix = "zlib-1.2.11",
@@ -89,6 +109,8 @@ let
   '';
 
   personBUILD = writeText "BUILD" ''
+    load("@rules_proto//proto:defs.bzl", "proto_library")
+
     proto_library(
         name = "person_proto",
         srcs = ["person.proto"],
diff --git a/pkgs/development/tools/build-managers/bazel/update-srcDeps.py b/pkgs/development/tools/build-managers/bazel/update-srcDeps.py
index 52d40e0f94e..4105aeeb11b 100755
--- a/pkgs/development/tools/build-managers/bazel/update-srcDeps.py
+++ b/pkgs/development/tools/build-managers/bazel/update-srcDeps.py
@@ -47,6 +47,9 @@ def winsdk_configure(*args, **kw): pass
 def register_local_rc_exe_toolchains(*args, **kw): pass
 def register_toolchains(*args, **kw): pass
 def debian_deps(): pass
+def grpc_deps(): pass
+def grpc_extra_deps(): pass
+def bazel_skylib_workspace(): pass
 
 # execute the WORKSPACE like it was python code in this module,
 # using all the function stubs from above.
diff --git a/pkgs/development/tools/build-managers/bear/cmakepaths.patch b/pkgs/development/tools/build-managers/bear/cmakepaths.patch
deleted file mode 100644
index d237267078e..00000000000
--- a/pkgs/development/tools/build-managers/bear/cmakepaths.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 04c5c58..429ca47 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -24,7 +24,7 @@ set(CMAKE_OSX_ARCHITECTURES "i386;x86_64" CACHE STRING  "Rogue")
- 
- set(EAR_LIB_FILE ${CMAKE_SHARED_LIBRARY_PREFIX}ear${CMAKE_SHARED_LIBRARY_SUFFIX})
- set(EAR_LIB_PATH "${CMAKE_INSTALL_LIBDIR}/bear")
--set(DEFAULT_PRELOAD_FILE ${CMAKE_INSTALL_PREFIX}/${EAR_LIB_PATH}/${EAR_LIB_FILE} CACHE STRING "Default path to libear.")
-+set(DEFAULT_PRELOAD_FILE ${EAR_LIB_PATH}/${EAR_LIB_FILE} CACHE STRING "Default path to libear.")
- 
- add_subdirectory(libear)
- add_subdirectory(bear)
diff --git a/pkgs/development/tools/build-managers/bear/default.nix b/pkgs/development/tools/build-managers/bear/default.nix
index bc7bb46cd5b..42fa584a893 100644
--- a/pkgs/development/tools/build-managers/bear/default.nix
+++ b/pkgs/development/tools/build-managers/bear/default.nix
@@ -1,24 +1,55 @@
-{ stdenv, fetchFromGitHub, cmake, python3 }:
+{ lib, stdenv
+, fetchFromGitHub
+, cmake
+, pkg-config
+, grpc
+, protobuf
+, openssl
+, nlohmann_json
+, gtest
+, fmt
+, spdlog
+, c-ares
+, abseil-cpp
+, zlib
+, sqlite
+, re2
+}:
 
 stdenv.mkDerivation rec {
   pname = "bear";
-  version = "2.4.2";
+  version = "3.0.13";
 
   src = fetchFromGitHub {
     owner = "rizsotto";
     repo = pname;
     rev = version;
-    sha256 = "1w1kyjzvvy5lj16kn3yyf7iil2cqlfkszi8kvagql7f5h5l6w9b1";
+    sha256 = "sha256-oMrTH3GjxiLBKX0i3ZuV+bNqpA7PkoAQAb/08Q/uELs=";
   };
 
-  nativeBuildInputs = [ cmake ];
-  buildInputs = [ python3 ]; # just for shebang of bin/bear
+  nativeBuildInputs = [ cmake pkg-config ];
 
-  doCheck = false; # all fail
+  buildInputs = [
+    grpc
+    protobuf
+    openssl
+    nlohmann_json
+    gtest
+    fmt
+    spdlog
+    c-ares
+    abseil-cpp
+    zlib
+    sqlite
+    re2
+  ];
 
-  patches = [ ./ignore_wrapper.patch ./cmakepaths.patch ];
+  patches = [
+    # Default libexec would be set to /nix/store/*-bear//nix/store/*-bear/libexec/...
+    ./no-double-relative.patch
+  ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Tool that generates a compilation database for clang tooling";
     longDescription = ''
       Note: the bear command is very useful to generate compilation commands
@@ -28,6 +59,8 @@ stdenv.mkDerivation rec {
     homepage = "https://github.com/rizsotto/Bear";
     license = licenses.gpl3Plus;
     platforms = platforms.unix;
-    maintainers = [ maintainers.babariviere ];
+    maintainers = with maintainers; [ babariviere qyliss ];
+    # ld: symbol(s) not found for architecture x86_64
+    broken = stdenv.isDarwin;
   };
 }
diff --git a/pkgs/development/tools/build-managers/bear/ignore_wrapper.patch b/pkgs/development/tools/build-managers/bear/ignore_wrapper.patch
deleted file mode 100644
index 8effc723bba..00000000000
--- a/pkgs/development/tools/build-managers/bear/ignore_wrapper.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- a/bear/main.py.in
-+++ b/bear/main.py.in
-@@ -49,6 +49,7 @@ import tempfile
- import shutil
- import contextlib
- import logging
-+from distutils.spawn import find_executable
- 
- # Map of ignored compiler option for the creation of a compilation database.
- # This map is used in _split_command method, which classifies the parameters
-@@ -569,7 +570,15 @@ class Compilation:
-                 (compiler, language, rest of the command) otherwise """
- 
-         if command:  # not empty list will allow to index '0' and '1:'
--            executable = os.path.basename(command[0])  # type: str
-+            executable_file = find_executable(command[0])
-+            if executable_file:
-+                absolute_executable = os.path.realpath(executable_file)
-+                # Ignore Nix wrappers.
-+                if 'wrapper' in absolute_executable:
-+                    return None
-+                executable = os.path.basename(absolute_executable)
-+            else:
-+                executable = os.path.basename(command[0])
-             parameters = command[1:]  # type: List[str]
-             # 'wrapper' 'parameters' and
-             # 'wrapper' 'compiler' 'parameters' are valid.
\ No newline at end of file
diff --git a/pkgs/development/tools/build-managers/bear/no-double-relative.patch b/pkgs/development/tools/build-managers/bear/no-double-relative.patch
new file mode 100644
index 00000000000..257c7ffea38
--- /dev/null
+++ b/pkgs/development/tools/build-managers/bear/no-double-relative.patch
@@ -0,0 +1,22 @@
+diff --git i/source/config.h.in w/source/config.h.in
+index ffcce3a..0caba6d 100644
+--- i/source/config.h.in
++++ w/source/config.h.in
+@@ -107,7 +107,7 @@ namespace cmd {
+     }
+ 
+     namespace wrapper {
+-        constexpr char DEFAULT_PATH[] = "@ROOT_INSTALL_PREFIX@/@PRIVATE_INSTALLDIR@/wrapper";
++        constexpr char DEFAULT_PATH[] = "@PRIVATE_INSTALLDIR@/wrapper";
+         constexpr char DEFAULT_DIR_PATH[] = "@ROOT_INSTALL_PREFIX@/@PRIVATE_INSTALLDIR@/wrapper.d";
+ 
+         constexpr char FLAG_VERBOSE[] = "--verbose";
+@@ -120,7 +120,7 @@ namespace cmd {
+     }
+ 
+     namespace library {
+-        constexpr char DEFAULT_PATH[] = "@ROOT_INSTALL_PREFIX@/@PRIVATE_INSTALLDIR@/@CMAKE_SHARED_LIBRARY_PREFIX@exec@CMAKE_SHARED_LIBRARY_SUFFIX@";
++        constexpr char DEFAULT_PATH[] = "@PRIVATE_INSTALLDIR@/@CMAKE_SHARED_LIBRARY_PREFIX@exec@CMAKE_SHARED_LIBRARY_SUFFIX@";
+ 
+         constexpr char KEY_REPORTER[] = "INTERCEPT_REPORT_COMMAND";
+         constexpr char KEY_DESTINATION[] = "INTERCEPT_REPORT_DESTINATION";
diff --git a/pkgs/development/tools/build-managers/bloop/default.nix b/pkgs/development/tools/build-managers/bloop/default.nix
index dd1342a37de..1b4f74f91d4 100644
--- a/pkgs/development/tools/build-managers/bloop/default.nix
+++ b/pkgs/development/tools/build-managers/bloop/default.nix
@@ -10,11 +10,11 @@
 
 stdenv.mkDerivation rec {
   pname = "bloop";
-  version = "1.4.3";
+  version = "1.4.8";
 
   bloop-coursier-channel = fetchurl {
     url = "https://github.com/scalacenter/bloop/releases/download/v${version}/bloop-coursier.json";
-    sha256 = "0abl91l2sb08pwr98mw910zibzwk6lss9r62h2s3g7qnnxp3z59r";
+    sha256 = "1hfd5gc98bp4p4m85jva2mlkh10q10n9s5136z8620mmjq93rx70";
   };
 
   bloop-bash = fetchurl {
@@ -54,9 +54,9 @@ stdenv.mkDerivation rec {
 
     outputHashMode = "recursive";
     outputHashAlgo = "sha256";
-    outputHash     = if stdenv.isLinux && stdenv.isx86_64 then "1ncl34f39mvk0zb5jl1l77cwjdg3xfnhjxbzz11pdfqw0d7wqywj"
-                     else if stdenv.isDarwin && stdenv.isx86_64 then "06c885w088yvh8l1r1jbrz0549gx2xvc8xr6rlxy6y27jk5655p2"
-                     else throw "unsupported platform";
+    outputHash = if stdenv.isLinux && stdenv.isx86_64 then "1cs3ng6bj9s7xf6c4xaiqgg5qr34abnipfgc44sy2ljklr7x0jwa"
+      else if stdenv.isDarwin && stdenv.isx86_64 then "0l9vqvzcmxya1s04cps96skw4dslh3i3ks73dl53ing50zb0ga9r"
+      else throw "unsupported platform";
   };
 
   dontUnpack = true;
@@ -82,10 +82,10 @@ stdenv.mkDerivation rec {
     installShellCompletion --name bloop.fish --fish ${bloop-fish}
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://scalacenter.github.io/bloop/";
     license = licenses.asl20;
-    description = "Bloop is a Scala build server and command-line tool to make the compile and test developer workflows fast and productive in a build-tool-agnostic way.";
+    description = "A Scala build server and command-line tool to make the compile and test developer workflows fast and productive in a build-tool-agnostic way";
     platforms = [ "x86_64-linux" "x86_64-darwin" ];
     maintainers = with maintainers; [ tomahna ];
   };
diff --git a/pkgs/development/tools/build-managers/bmake/default.nix b/pkgs/development/tools/build-managers/bmake/default.nix
index 219bd6e30e3..0d8ca351096 100644
--- a/pkgs/development/tools/build-managers/bmake/default.nix
+++ b/pkgs/development/tools/build-managers/bmake/default.nix
@@ -1,24 +1,99 @@
-{ stdenv, fetchurl
-, getopt
+{ lib, stdenv, fetchurl, fetchpatch
+, getopt, tzdata, ksh
+, pkgsMusl # for passthru.tests
 }:
 
 stdenv.mkDerivation rec {
   pname = "bmake";
-  version = "20200710";
+  version = "20210621";
 
   src = fetchurl {
     url    = "http://www.crufty.net/ftp/pub/sjg/${pname}-${version}.tar.gz";
-    sha256 = "0v5paqdc0wnqlw4dy45mnydkmabsky33nvd7viwd2ygg351zqf35";
+    sha256 = "0gpzv75ibzqz1j1h0hdjgx1v7hkl3i5cb5yf6q9sfcgx0bvb55xa";
   };
 
+  # Make tests work with musl
+  # * Disable deptgt-delete_on_error test (alpine does this too)
+  # * Disable shell-ksh test (ksh doesn't compile with musl)
+  # * Fix test failing due to different strerror(3) output for musl and glibc
+  postPatch = lib.optionalString (stdenv.hostPlatform.libc == "musl") ''
+    sed -i unit-tests/Makefile \
+      -e '/deptgt-delete_on_error/d' \
+      -e '/shell-ksh/d'
+    substituteInPlace unit-tests/opt-chdir.exp --replace "File name" "Filename"
+  '';
+
   nativeBuildInputs = [ getopt ];
 
   patches = [
+    # make bootstrap script aware of the prefix in /nix/store
     ./bootstrap-fix.patch
+    # preserve PATH from build env in unit tests
     ./fix-unexport-env-test.patch
+    # Fix localtime tests without global /etc/zoneinfo directory
+    ./fix-localtime-test.patch
+    # Always enable ksh test since it checks in a impure location /bin/ksh
+    ./unconditional-ksh-test.patch
+    # decouple tests from build phase
+    (fetchpatch {
+      name = "separate-tests.patch";
+      url = "https://raw.githubusercontent.com/alpinelinux/aports/2a36f7b79df44136c4d2b8e9512f908af65adfee/community/bmake/separate-tests.patch";
+      sha256 = "00s76jwyr83c6rkvq67b1lxs8jhm0gj2rjgy77xazqr5400slj9a";
+    })
+    # add a shebang to bmake's install(1) replacement
+    (fetchpatch {
+      name = "install-sh.patch";
+      url = "https://raw.githubusercontent.com/alpinelinux/aports/34cd8c45397c63c041cf3cbe1ba5232fd9331196/community/bmake/install-sh.patch";
+      sha256 = "0z8icd6akb96r4cksqnhynkn591vbxlmrrs4w6wil3r6ggk6mwa6";
+    })
+  ];
+
+  # The generated makefile is a small wrapper for calling ./boot-strap
+  # with a given op. On a case-insensitive filesystem this generated
+  # makefile clobbers a distinct, shipped, Makefile and causes
+  # infinite recursion during tests which eventually fail with
+  # "fork: Resource temporarily unavailable"
+  configureFlags = [
+    "--without-makefile"
+  ];
+
+  buildPhase = ''
+    runHook preBuild
+
+    ./boot-strap --prefix=$out -o . op=build
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    ./boot-strap --prefix=$out -o . op=install
+
+    runHook postInstall
+  '';
+
+  doCheck = true;
+  checkInputs = [
+    tzdata
+  ] ++ lib.optionals (stdenv.hostPlatform.libc != "musl") [
+    ksh
   ];
+  checkPhase = ''
+    runHook preCheck
+
+    ./boot-strap -o . op=test
+
+    runHook postCheck
+  '';
+
+  setupHook = ./setup-hook.sh;
+
+  passthru.tests = {
+    bmakeMusl = pkgsMusl.bmake;
+  };
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Portable version of NetBSD 'make'";
     homepage    = "http://www.crufty.net/help/sjg/bmake.html";
     license     = licenses.bsd3;
diff --git a/pkgs/development/tools/build-managers/bmake/fix-localtime-test.patch b/pkgs/development/tools/build-managers/bmake/fix-localtime-test.patch
new file mode 100644
index 00000000000..b377292cce2
--- /dev/null
+++ b/pkgs/development/tools/build-managers/bmake/fix-localtime-test.patch
@@ -0,0 +1,23 @@
+--- bmake/unit-tests/Makefile.orig	2021-05-30 14:24:38.822484317 +0200
++++ bmake/unit-tests/Makefile	2021-05-31 13:25:21.645751428 +0200
+@@ -455,7 +455,8 @@
+ ENV.varmisc=		FROM_ENV=env
+ ENV.varmisc+=		FROM_ENV_BEFORE=env
+ ENV.varmisc+=		FROM_ENV_AFTER=env
+-ENV.varmod-localtime+=	TZ=Europe/Berlin
++# Set absolute path to tz file since musl doesn't support TZDIR
++ENV.varmod-localtime+=	TZDIR=${TZDIR} TZ=:${TZDIR}/Europe/Berlin
+ ENV.varname-vpath+=	VPATH=varname-vpath.dir:varname-vpath.dir2
+ 
+ # Override make flags for some of the tests; default is -k.
+--- bmake/unit-tests/varmod-localtime.mk.orig	2021-05-30 14:30:34.397986246 +0200
++++ bmake/unit-tests/varmod-localtime.mk	2021-05-31 13:24:41.430906606 +0200
+@@ -3,7 +3,7 @@
+ # Tests for the :localtime variable modifier, which formats a timestamp
+ # using strftime(3) in local time.
+ 
+-.if ${TZ} != "Europe/Berlin"	# see unit-tests/Makefile
++.if ${TZ} != ":${TZDIR}/Europe/Berlin"	# see unit-tests/Makefile
+ .  error
+ .endif
+ 
diff --git a/pkgs/development/tools/build-managers/bmake/fix-unexport-env-test.patch b/pkgs/development/tools/build-managers/bmake/fix-unexport-env-test.patch
index 339348f37c3..fbf7225a6d6 100644
--- a/pkgs/development/tools/build-managers/bmake/fix-unexport-env-test.patch
+++ b/pkgs/development/tools/build-managers/bmake/fix-unexport-env-test.patch
@@ -1,13 +1,13 @@
---- bmake/unit-tests/unexport-env.mk.orig       2019-02-19 10:24:14.356713136 -0800
-+++ bmake/unit-tests/unexport-env.mk    2019-02-19 10:25:43.838775388 -0800
-@@ -3,8 +3,8 @@
- # pick up a bunch of exported vars
+--- bmake/unit-tests/unexport-env.mk.orig	2021-05-27 14:44:45.263392298 +0200
++++ bmake/unit-tests/unexport-env.mk	2021-05-27 14:46:46.188881996 +0200
+@@ -4,8 +4,8 @@
+ FILTER_CMD=	grep ^UT_
  .include "export.mk"
  
 -# an example of setting up a minimal environment.
--PATH = /bin:/usr/bin:/sbin:/usr/sbin
+-PATH=	/bin:/usr/bin:/sbin:/usr/sbin
 +# preserve PATH so commands used in the "all" target are still available
-+PATH := ${PATH}
++PATH :=	${PATH}
  
  # now clobber the environment to just PATH and UT_TEST
- UT_TEST = unexport-env
+ UT_TEST=	unexport-env
diff --git a/pkgs/development/tools/build-managers/bmake/setup-hook.sh b/pkgs/development/tools/build-managers/bmake/setup-hook.sh
new file mode 100644
index 00000000000..c5ca27dd910
--- /dev/null
+++ b/pkgs/development/tools/build-managers/bmake/setup-hook.sh
@@ -0,0 +1,127 @@
+addMakeFlags() {
+    export prefix="$out"
+    export MANDIR="${!outputMan}/share/man"
+    export MANTARGET=man
+    export BINOWN=
+    export STRIP_FLAG=
+}
+
+preConfigureHooks+=(addMakeFlags)
+
+bmakeBuildPhase() {
+    runHook preBuild
+
+    local flagsArray=(
+        ${enableParallelBuilding:+-j${NIX_BUILD_CORES}}
+        SHELL=$SHELL
+        $makeFlags ${makeFlagsArray+"${makeFlagsArray[@]}"}
+        $buildFlags ${buildFlagsArray+"${buildFlagsArray[@]}"}
+    )
+
+    echoCmd 'build flags' "${flagsArray[@]}"
+    bmake ${makefile:+-f $makefile} "${flagsArray[@]}"
+    unset flagsArray
+
+    runHook postBuild
+}
+
+if [ -z "${dontUseBmakeBuild-}" -a -z "${buildPhase-}" ]; then
+    buildPhase=bmakeBuildPhase
+fi
+
+bmakeCheckPhase() {
+    runHook preCheck
+
+    if [ -z "${checkTarget:-}" ]; then
+        #TODO(@oxij): should flagsArray influence make -n?
+        if bmake -n ${makefile:+-f $makefile} check >/dev/null 2>&1; then
+            checkTarget=check
+        elif bmake -n ${makefile:+-f $makefile} test >/dev/null 2>&1; then
+            checkTarget=test
+        fi
+    fi
+
+    if [ -z "${checkTarget:-}" ]; then
+        echo "no test target found in bmake, doing nothing"
+    else
+        # shellcheck disable=SC2086
+        local flagsArray=(
+            ${enableParallelChecking:+-j${NIX_BUILD_CORES}}
+            SHELL=$SHELL
+            # Old bash empty array hack
+            $makeFlags ${makeFlagsArray+"${makeFlagsArray[@]}"}
+            ${checkFlags:-VERBOSE=y} ${checkFlagsArray+"${checkFlagsArray[@]}"}
+            ${checkTarget}
+        )
+
+        echoCmd 'check flags' "${flagsArray[@]}"
+        bmake ${makefile:+-f $makefile} "${flagsArray[@]}"
+
+        unset flagsArray
+    fi
+
+    runHook postCheck
+}
+
+if [ -z "${dontUseBmakeCheck-}" -a -z "${checkPhase-}" ]; then
+    checkPhase=bmakeCheckPhase
+fi
+
+bmakeInstallPhase() {
+    runHook preInstall
+
+    if [ -n "$prefix" ]; then
+        mkdir -p "$prefix"
+    fi
+
+    # shellcheck disable=SC2086
+    local flagsArray=(
+        SHELL=$SHELL
+        # Old bash empty array hack
+        $makeFlags ${makeFlagsArray+"${makeFlagsArray[@]}"}
+        $installFlags ${installFlagsArray+"${installFlagsArray[@]}"}
+        ${installTargets:-install}
+    )
+
+    echoCmd 'install flags' "${flagsArray[@]}"
+    bmake ${makefile:+-f $makefile} "${flagsArray[@]}"
+    unset flagsArray
+
+    runHook postInstall
+}
+
+if [ -z "${dontUseBmakeInstall-}" -a -z "${installPhase-}" ]; then
+    installPhase=bmakeInstallPhase
+fi
+
+bmakeDistPhase() {
+    runHook preDist
+
+    if [ -n "$prefix" ]; then
+        mkdir -p "$prefix"
+    fi
+
+    # Old bash empty array hack
+    # shellcheck disable=SC2086
+    local flagsArray=(
+        $distFlags ${distFlagsArray+"${distFlagsArray[@]}"} ${distTarget:-dist}
+    )
+
+    echo 'dist flags: %q' "${flagsArray[@]}"
+    bmake ${makefile:+-f $makefile} "${flagsArray[@]}"
+
+    if [ "${dontCopyDist:-0}" != 1 ]; then
+        mkdir -p "$out/tarballs"
+
+        # Note: don't quote $tarballs, since we explicitly permit
+        # wildcards in there.
+        # shellcheck disable=SC2086
+        cp -pvd ${tarballs:-*.tar.gz} "$out/tarballs"
+    fi
+
+    runHook postDist
+}
+
+if [ -z "${dontUseBmakeDist-}" -a -z "${distPhase-}" ]; then
+    distPhase=bmakeDistPhase
+fi
diff --git a/pkgs/development/tools/build-managers/bmake/unconditional-ksh-test.patch b/pkgs/development/tools/build-managers/bmake/unconditional-ksh-test.patch
new file mode 100644
index 00000000000..117b85da16d
--- /dev/null
+++ b/pkgs/development/tools/build-managers/bmake/unconditional-ksh-test.patch
@@ -0,0 +1,12 @@
+--- bmake/unit-tests/Makefile.orig	2021-07-04 19:13:09.068094922 +0200
++++ bmake/unit-tests/Makefile	2021-07-04 19:13:14.630080696 +0200
+@@ -295,9 +295,7 @@
+ TESTS+=		sh-single-line
+ TESTS+=		shell-csh
+ TESTS+=		shell-custom
+-.if exists(/bin/ksh)
+ TESTS+=		shell-ksh
+-.endif
+ TESTS+=		shell-sh
+ TESTS+=		suff-add-later
+ TESTS+=		suff-clear-regular
diff --git a/pkgs/development/tools/build-managers/boot/default.nix b/pkgs/development/tools/build-managers/boot/default.nix
index 09c1eada54b..1590906206c 100644
--- a/pkgs/development/tools/build-managers/boot/default.nix
+++ b/pkgs/development/tools/build-managers/boot/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, jdk }:
+{ lib, stdenv, fetchurl, jdk }:
 
 stdenv.mkDerivation rec {
   version = "2.7.2";
@@ -15,9 +15,9 @@ stdenv.mkDerivation rec {
 
   propagatedBuildInputs = [ jdk ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Build tooling for Clojure";
-    homepage = "https://boot-clj.com/";
+    homepage = "https://boot-clj.github.io/";
     license = licenses.epl10;
     platforms = platforms.linux ++ platforms.darwin;
     maintainers = with maintainers; [ ragge ];
diff --git a/pkgs/development/tools/build-managers/buck/default.nix b/pkgs/development/tools/build-managers/buck/default.nix
index 41fc0940b9d..0b893ea808a 100644
--- a/pkgs/development/tools/build-managers/buck/default.nix
+++ b/pkgs/development/tools/build-managers/buck/default.nix
@@ -1,14 +1,14 @@
-{ stdenv, fetchFromGitHub, jdk, ant, python2, python2Packages, watchman, bash, makeWrapper }:
+{ lib, stdenv, fetchFromGitHub, jdk8, ant, python3, watchman, bash, makeWrapper }:
 
 stdenv.mkDerivation rec {
   pname = "buck";
-  version = "2019.10.17.01";
+  version = "2021.01.12.01";
 
   src = fetchFromGitHub {
     owner = "facebook";
     repo = pname;
     rev = "v${version}";
-    sha256 = "1irgp8yq1z11bq3b83yxvj35wqqq7y7b8q4d4y0hc05ac19ja0vj";
+    sha256 = "sha256-NFiMQ+cG93R10LlkfUMzZ4TnV0uO5G+8S5TiMI6hU5o=";
   };
 
   patches = [ ./pex-mtime.patch ];
@@ -17,23 +17,24 @@ stdenv.mkDerivation rec {
     grep -l -r '/bin/bash' --null | xargs -0 sed -i -e "s!/bin/bash!${bash}/bin/bash!g"
   '';
 
-  buildInputs = [ jdk ant python2 watchman python2Packages.pywatchman ];
-  nativeBuildInputs = [ makeWrapper ];
+  nativeBuildInputs = [ makeWrapper python3 jdk8 ant watchman ];
 
   buildPhase = ''
+    # Set correct version, see https://github.com/facebook/buck/issues/2607
+    echo v${version} > .buckrelease
+
     ant
 
     PYTHONDONTWRITEBYTECODE=true ./bin/buck build -c buck.release_version=${version} buck
   '';
 
   installPhase = ''
-    install -D -m755 buck-out/gen/programs/buck.pex $out/bin/buck
+    install -D -m755 buck-out/gen/*/programs/buck.pex $out/bin/buck
     wrapProgram $out/bin/buck \
-      --prefix PYTHONPATH : $PYTHONPATH \
-      --prefix PATH : "${stdenv.lib.makeBinPath [jdk watchman]}"
+      --prefix PATH : "${lib.makeBinPath [ jdk8 watchman python3 ]}"
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://buck.build/";
     description = "A high-performance build tool";
     maintainers = [ maintainers.jgertm maintainers.marsam ];
diff --git a/pkgs/development/tools/build-managers/cmake/2.8.nix b/pkgs/development/tools/build-managers/cmake/2.8.nix
index 804bdd76f67..9dabd7b3556 100644
--- a/pkgs/development/tools/build-managers/cmake/2.8.nix
+++ b/pkgs/development/tools/build-managers/cmake/2.8.nix
@@ -1,14 +1,14 @@
-{ stdenv, fetchurl, fetchpatch, curl, expat, zlib, bzip2
+{ lib, stdenv, fetchurl, fetchpatch, curl, expat, zlib, bzip2
 , useNcurses ? false, ncurses, useQt4 ? false, qt4, ps
 }:
 
-with stdenv.lib;
+with lib;
 
 assert stdenv ? cc;
 assert stdenv.cc ? libc;
 
 let
-  os = stdenv.lib.optionalString;
+  os = lib.optionalString;
   majorVersion = "2.8";
   minorVersion = "12.2";
   version = "${majorVersion}.${minorVersion}";
@@ -60,7 +60,7 @@ stdenv.mkDerivation rec {
     "--mandir=/share/man"
     "--system-libs"
     "--no-system-libarchive"
-   ] ++ stdenv.lib.optional useQt4 "--qt-gui";
+   ] ++ lib.optional useQt4 "--qt-gui";
 
   setupHook = ./setup-hook.sh;
 
@@ -80,8 +80,8 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "https://cmake.org";
     description = "Cross-Platform Makefile Generator";
-    platforms = if useQt4 then qt4.meta.platforms else stdenv.lib.platforms.unix;
-    maintainers = with stdenv.lib.maintainers; [ xfix ];
-    license = stdenv.lib.licenses.bsd3;
+    platforms = if useQt4 then qt4.meta.platforms else lib.platforms.unix;
+    maintainers = with lib.maintainers; [ xfix ];
+    license = lib.licenses.bsd3;
   };
 }
diff --git a/pkgs/development/tools/build-managers/cmake/application-services.patch b/pkgs/development/tools/build-managers/cmake/application-services.patch
index 75873d6055c..f64e220eb29 100644
--- a/pkgs/development/tools/build-managers/cmake/application-services.patch
+++ b/pkgs/development/tools/build-managers/cmake/application-services.patch
@@ -14,15 +14,16 @@ diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.c
 index a5ce5d18f4..3d6838ce82 100644
 --- a/Source/cmGlobalXCodeGenerator.cxx
 +++ b/Source/cmGlobalXCodeGenerator.cxx
-@@ -43,11 +43,6 @@
+@@ -43,11 +43,10 @@
  
  struct cmLinkImplementation;
  
--#if !defined(CMAKE_BOOTSTRAP) && defined(__APPLE__)
+ #if !defined(CMAKE_BOOTSTRAP) && defined(__APPLE__)
 -#  define HAVE_APPLICATION_SERVICES
 -#  include <ApplicationServices/ApplicationServices.h>
--#endif
--
++#  include <CoreFoundation/CoreFoundation.h>
+ #endif
+
  #if !defined(CMAKE_BOOTSTRAP)
  #  include "cmXMLParser.h"
  
diff --git a/pkgs/development/tools/build-managers/cmake/default.nix b/pkgs/development/tools/build-managers/cmake/default.nix
index be9645453e3..2de586f97cb 100644
--- a/pkgs/development/tools/build-managers/cmake/default.nix
+++ b/pkgs/development/tools/build-managers/cmake/default.nix
@@ -1,30 +1,27 @@
-{ stdenv, lib, fetchurl, pkgconfig, fetchpatch
-, bzip2, curl, expat, libarchive, xz, zlib, libuv, rhash
+{ stdenv, lib, fetchurl, pkg-config
+, bzip2, curlMinimal, expat, libarchive, xz, zlib, libuv, rhash
 , buildPackages
 # darwin attributes
 , ps
 , isBootstrap ? false
 , useSharedLibraries ? (!isBootstrap && !stdenv.isCygwin)
+, useOpenSSL ? !isBootstrap, openssl
 , useNcurses ? false, ncurses
-, useQt4 ? false, qt4
-, withQt5 ? false, qtbase
+, withQt5 ? false, qtbase, wrapQtAppsHook
+, buildDocs ? (!isBootstrap && (useNcurses || withQt5)), sphinx, texinfo
 }:
 
-assert withQt5 -> useQt4 == false;
-assert useQt4 -> withQt5 == false;
-
 stdenv.mkDerivation rec {
   pname = "cmake"
           + lib.optionalString isBootstrap "-boot"
           + lib.optionalString useNcurses "-cursesUI"
-          + lib.optionalString withQt5 "-qt5UI"
-          + lib.optionalString useQt4 "-qt4UI";
-  version = "3.18.1";
+          + lib.optionalString withQt5 "-qt5UI";
+  version = "3.19.7";
 
   src = fetchurl {
-    url = "${meta.homepage}files/v${lib.versions.majorMinor version}/cmake-${version}.tar.gz";
+    url = "https://cmake.org/files/v${lib.versions.majorMinor version}/cmake-${version}.tar.gz";
     # compare with https://cmake.org/files/v${lib.versions.majorMinor version}/cmake-${version}-SHA-256.txt
-    sha256 = "0215srmc9l7ygwdpfms8yx0wbd96qgz2d58ykmdiarvysf5k7qy0";
+    sha256 = "sha256-WKFfDVagr8zDzFNxI0/Oc/zGyPnb13XYmOUQuDF1WI4=";
   };
 
   patches = [
@@ -37,28 +34,26 @@ stdenv.mkDerivation rec {
     # Derived from https://github.com/libuv/libuv/commit/1a5d4f08238dd532c3718e210078de1186a5920d
     ./libuv-application-services.patch
 
-    # TODO: Remove this patch for a regression once CMake 3.18.2 is out:
-    (fetchpatch { # PCH: Avoid Apple-specific architecture flags on other platforms
-      url = "https://gitlab.kitware.com/cmake/cmake/-/commit/70ce1ad64a04a244bb1c03753da0752c61fc3a37.patch";
-      sha256 = "0jcdgv48j0dd4nlhyy3j0s3h6bcbrq2yg1mdhpgfqrb2y3p91fky";
-    })
-
   ] ++ lib.optional stdenv.isCygwin ./3.2.2-cygwin.patch;
 
-  outputs = [ "out" ];
+  outputs = [ "out" ]
+    ++ lib.optionals buildDocs [ "man" "info" ];
   setOutputFlags = false;
 
   setupHook = ./setup-hook.sh;
 
-  buildInputs =
-    [ setupHook pkgconfig ]
-    ++ lib.optionals useSharedLibraries [ bzip2 curl expat libarchive xz zlib libuv rhash ]
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+
+  nativeBuildInputs = [ setupHook pkg-config ]
+    ++ lib.optionals buildDocs [ texinfo ]
+    ++ lib.optionals withQt5 [ wrapQtAppsHook ];
+
+  buildInputs = []
+    ++ lib.optionals useSharedLibraries [ bzip2 curlMinimal expat libarchive xz zlib libuv rhash ]
+    ++ lib.optional useOpenSSL openssl
     ++ lib.optional useNcurses ncurses
-    ++ lib.optional useQt4 qt4
     ++ lib.optional withQt5 qtbase;
 
-  depsBuildBuild = [ buildPackages.stdenv.cc ];
-
   propagatedBuildInputs = lib.optional stdenv.isDarwin ps;
 
   preConfigure = ''
@@ -67,8 +62,6 @@ stdenv.mkDerivation rec {
       --subst-var-by libc_bin ${lib.getBin stdenv.cc.libc} \
       --subst-var-by libc_dev ${lib.getDev stdenv.cc.libc} \
       --subst-var-by libc_lib ${lib.getLib stdenv.cc.libc}
-    substituteInPlace Modules/FindCxxTest.cmake \
-      --replace "$""{PYTHON_EXECUTABLE}" ${stdenv.shell}
   ''
   # CC_FOR_BUILD and CXX_FOR_BUILD are used to bootstrap cmake
   + ''
@@ -78,7 +71,12 @@ stdenv.mkDerivation rec {
   configureFlags = [
     "--docdir=share/doc/${pname}${version}"
   ] ++ (if useSharedLibraries then [ "--no-system-jsoncpp" "--system-libs" ] else [ "--no-system-libs" ]) # FIXME: cleanup
-    ++ lib.optional (useQt4 || withQt5) "--qt-gui"
+    ++ lib.optional withQt5 "--qt-gui"
+    ++ lib.optionals buildDocs [
+      "--sphinx-build=${sphinx}/bin/sphinx-build"
+      "--sphinx-man"
+      "--sphinx-info"
+    ]
     # Workaround https://gitlab.kitware.com/cmake/cmake/-/issues/20568
     ++ lib.optionals stdenv.hostPlatform.is32bit [
       "CFLAGS=-D_FILE_OFFSET_BITS=64"
@@ -97,13 +95,15 @@ stdenv.mkDerivation rec {
     "-DCMAKE_AR=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ar"
     "-DCMAKE_RANLIB=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}ranlib"
     "-DCMAKE_STRIP=${lib.getBin stdenv.cc.bintools.bintools}/bin/${stdenv.cc.targetPrefix}strip"
-  ]
+
+    "-DCMAKE_USE_OPENSSL=${if useOpenSSL then "ON" else "OFF"}"
     # Avoid depending on frameworks.
-    ++ lib.optional (!useNcurses) "-DBUILD_CursesDialog=OFF";
+    "-DBUILD_CursesDialog=${if useNcurses then "ON" else "OFF"}"
+  ];
 
   # make install attempts to use the just-built cmake
   preInstall = lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) ''
-    sed -i 's|bin/cmake|${buildPackages.cmake}/bin/cmake|g' Makefile
+    sed -i 's|bin/cmake|${buildPackages.cmakeMinimal}/bin/cmake|g' Makefile
   '';
 
   dontUseCmakeConfigure = true;
@@ -116,9 +116,18 @@ stdenv.mkDerivation rec {
   doCheck = false; # fails
 
   meta = with lib; {
-    homepage = "http://www.cmake.org/";
+    homepage = "https://cmake.org/";
+    changelog = "https://cmake.org/cmake/help/v${lib.versions.majorMinor version}/"
+      + "release/${lib.versions.majorMinor version}.html";
     description = "Cross-Platform Makefile Generator";
-    platforms = if useQt4 then qt4.meta.platforms else platforms.all;
+    longDescription = ''
+      CMake is an open-source, cross-platform family of tools designed to
+      build, test and package software. CMake is used to control the software
+      compilation process using simple platform and compiler independent
+      configuration files, and generate native makefiles and workspaces that
+      can be used in the compiler environment of your choice.
+    '';
+    platforms = platforms.all;
     maintainers = with maintainers; [ ttuegel lnl7 ];
     license = licenses.bsd3;
   };
diff --git a/pkgs/development/tools/build-managers/cmake/setup-hook.sh b/pkgs/development/tools/build-managers/cmake/setup-hook.sh
index 6ae560c5645..89e8e0e197a 100755
--- a/pkgs/development/tools/build-managers/cmake/setup-hook.sh
+++ b/pkgs/development/tools/build-managers/cmake/setup-hook.sh
@@ -48,10 +48,7 @@ cmakeConfigurePhase() {
 
     # on macOS we want to prefer Unix-style headers to Frameworks
     # because we usually do not package the framework
-    cmakeFlags="-DCMAKE_FIND_FRAMEWORK=last $cmakeFlags"
-
-    # on macOS i686 was only relevant for 10.5 or earlier.
-    cmakeFlags="-DCMAKE_OSX_ARCHITECTURES=x86_64 $cmakeFlags"
+    cmakeFlags="-DCMAKE_FIND_FRAMEWORK=LAST $cmakeFlags"
 
     # we never want to use the global macOS SDK
     cmakeFlags="-DCMAKE_OSX_SYSROOT= $cmakeFlags"
diff --git a/pkgs/development/tools/build-managers/colormake/default.nix b/pkgs/development/tools/build-managers/colormake/default.nix
index 7eed8806955..251268a449d 100644
--- a/pkgs/development/tools/build-managers/colormake/default.nix
+++ b/pkgs/development/tools/build-managers/colormake/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, perl }:
+{ lib, stdenv, fetchFromGitHub, perl }:
 
 stdenv.mkDerivation {
   pname = "colormake";
@@ -18,7 +18,7 @@ stdenv.mkDerivation {
     cp -fa colormake.pl colormake colormake-short clmake clmake-short $out/bin
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Simple wrapper around make to colorize the output";
     homepage = "https://bre.klaki.net/programs/colormake/";
     license = licenses.gpl2;
diff --git a/pkgs/development/tools/build-managers/conan/default.nix b/pkgs/development/tools/build-managers/conan/default.nix
index e09277e498d..f59e74b02f4 100644
--- a/pkgs/development/tools/build-managers/conan/default.nix
+++ b/pkgs/development/tools/build-managers/conan/default.nix
@@ -1,4 +1,4 @@
-{ lib, python3, fetchFromGitHub, git, pkgconfig }:
+{ lib, stdenv, python3, fetchFromGitHub, git, pkg-config }:
 
 # Note:
 # Conan has specific dependency demands; check
@@ -14,45 +14,65 @@
 
 let newPython = python3.override {
   packageOverrides = self: super: {
-    distro = super.distro.overridePythonAttrs (oldAttrs: rec {
-      version = "1.1.0";
+    node-semver = super.node-semver.overridePythonAttrs (oldAttrs: rec {
+      version = "0.6.1";
       src = oldAttrs.src.override {
         inherit version;
-        sha256 = "1vn1db2akw98ybnpns92qi11v94hydwp130s8753k6ikby95883j";
+        sha256 = "1dv6mjsm67l1razcgmq66riqmsb36wns17mnipqr610v0z0zf5j0";
       };
     });
-    node-semver = super.node-semver.overridePythonAttrs (oldAttrs: rec {
-      version = "0.6.1";
+    urllib3 = super.urllib3.overridePythonAttrs (oldAttrs: rec {
+      version = "1.25.11";
       src = oldAttrs.src.override {
         inherit version;
-        sha256 = "1dv6mjsm67l1razcgmq66riqmsb36wns17mnipqr610v0z0zf5j0";
+        sha256 = "18hpzh1am1dqx81fypn57r2wk565fi4g14292qrc5jm1h9dalzld";
+      };
+    });
+    # https://github.com/conan-io/conan/issues/8876
+    pyjwt = super.pyjwt.overridePythonAttrs (oldAttrs: rec {
+      version = "1.7.1";
+      src = oldAttrs.src.override {
+        inherit version;
+        sha256 = "8d59a976fb773f3e6a39c85636357c4f0e242707394cadadd9814f5cbaa20e96";
+      };
+      disabledTests = [
+        "test_ec_verify_should_return_false_if_signature_invalid"
+      ];
+    });
+    # conan needs jinja2<3
+    jinja2 = super.jinja2.overridePythonAttrs (oldAttrs: rec {
+      version = "2.11.3";
+      src = oldAttrs.src.override {
+        inherit version;
+        sha256 = "a6d58433de0ae800347cab1fa3043cebbabe8baa9d29e668f1c768cb87a333c6";
       };
     });
-    pluginbase = super.pluginbase.overridePythonAttrs (oldAttrs: rec {
-      version = "0.7";
+    # old jinja2 needs old markupsafe
+    markupsafe = super.markupsafe.overridePythonAttrs (oldAttrs: rec {
+      version = "1.1.1";
       src = oldAttrs.src.override {
         inherit version;
-        sha256 = "c0abe3218b86533cca287e7057a37481883c07acef7814b70583406938214cc8";
+        sha256 = "29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b";
       };
     });
   };
 };
 
 in newPython.pkgs.buildPythonApplication rec {
-  version = "1.27.0";
+  version = "1.35.0";
   pname = "conan";
 
   src = fetchFromGitHub {
     owner = "conan-io";
     repo = "conan";
     rev = version;
-    sha256 = "0ncqs1p4g23fmzgdmwppgxr8w275h38hgjdzs456cgivz8xs9rjl";
+    sha256 = "19rgylkjxvv47vz5vgh46rw108xskpv7lmax8y2fnm2wd1j3bq9c";
   };
 
   propagatedBuildInputs = with newPython.pkgs; [
     bottle
     colorama
-    dateutil
+    python-dateutil
     deprecation
     distro
     fasteners
@@ -69,10 +89,10 @@ in newPython.pkgs.buildPythonApplication rec {
     six
     tqdm
     urllib3
-  ];
+  ] ++ lib.optionals stdenv.isDarwin [ idna cryptography pyopenssl ];
 
   checkInputs = [
-    pkgconfig
+    pkg-config
     git
   ] ++ (with newPython.pkgs; [
     codecov
@@ -88,9 +108,8 @@ in newPython.pkgs.buildPythonApplication rec {
 
   postPatch = ''
     substituteInPlace conans/requirements.txt \
-      --replace "PyYAML>=3.11, <3.14.0" "PyYAML" \
       --replace "deprecation>=2.0, <2.1" "deprecation" \
-      --replace "six>=1.10.0,<=1.14.0" "six"
+      --replace "six>=1.10.0,<=1.15.0" "six>=1.10.0,<=1.16.0"
   '';
 
   meta = with lib; {
@@ -98,6 +117,5 @@ in newPython.pkgs.buildPythonApplication rec {
     description = "Decentralized and portable C/C++ package manager";
     license = licenses.mit;
     maintainers = with maintainers; [ HaoZeke ];
-    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/development/tools/build-managers/corrosion/cmake-install-full-dir.patch b/pkgs/development/tools/build-managers/corrosion/cmake-install-full-dir.patch
new file mode 100644
index 00000000000..da5e923e0fa
--- /dev/null
+++ b/pkgs/development/tools/build-managers/corrosion/cmake-install-full-dir.patch
@@ -0,0 +1,18 @@
+diff --git a/cmake/CorrosionConfig.cmake.in b/cmake/CorrosionConfig.cmake.in
+index c042a00..491f53c 100644
+--- a/cmake/CorrosionConfig.cmake.in
++++ b/cmake/CorrosionConfig.cmake.in
+@@ -4,11 +4,11 @@ if (Corrosion_FOUND)
+     return()
+ endif()
+ 
+-list(APPEND CMAKE_MODULE_PATH "${PACKAGE_PREFIX_DIR}/@CORROSION_INSTALL_PREFIX@@CMAKE_INSTALL_DATADIR@/cmake")
++list(APPEND CMAKE_MODULE_PATH "@CMAKE_INSTALL_FULL_DATADIR@/cmake")
+ 
+ add_executable(Corrosion::Generator IMPORTED GLOBAL)
+ set_property(
+     TARGET Corrosion::Generator
+-    PROPERTY IMPORTED_LOCATION "${PACKAGE_PREFIX_DIR}/@CORROSION_INSTALL_PREFIX@@CMAKE_INSTALL_LIBEXECDIR@/corrosion-generator")
++    PROPERTY IMPORTED_LOCATION "@CMAKE_INSTALL_FULL_LIBEXECDIR@/corrosion-generator")
+ 
+ include(Corrosion)
diff --git a/pkgs/development/tools/build-managers/corrosion/default.nix b/pkgs/development/tools/build-managers/corrosion/default.nix
new file mode 100644
index 00000000000..2285579b0bb
--- /dev/null
+++ b/pkgs/development/tools/build-managers/corrosion/default.nix
@@ -0,0 +1,54 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cmake
+, rustPlatform
+}:
+
+stdenv.mkDerivation rec {
+  pname = "corrosion";
+  version = "unstable-2021-02-23";
+
+  src = fetchFromGitHub {
+    owner = "AndrewGaspar";
+    repo = "corrosion";
+    rev = "e6c35c7e55a59c8223577b5abc4d253b4a82898b";
+    sha256 = "0vq6g3ggnqiln0q8gsr8rr5rrdgpfcgfly79jwcygxrviw37m44d";
+  };
+
+  patches = [
+    # https://github.com/AndrewGaspar/corrosion/issues/84
+    ./cmake-install-full-dir.patch
+  ];
+
+  cargoRoot = "generator";
+
+  cargoDeps = rustPlatform.fetchCargoTarball {
+    inherit src;
+    sourceRoot = "${src.name}/${cargoRoot}";
+    name = "${pname}-${version}";
+    sha256 = "1fsq8zzzq28fj2fh92wmg8kmdj4y10mcpdmlgxsygy5lbh4xs13f";
+  };
+
+  nativeBuildInputs = [
+    cmake
+  ] ++ (with rustPlatform; [
+    cargoSetupHook
+    rust.cargo
+    rust.rustc
+  ]);
+
+  cmakeFlags = [
+    "-DRust_CARGO=${rustPlatform.rust.cargo}/bin/cargo"
+
+    # tests cannot find cargo because Rust_CARGO is unset before tests
+    "-DCORROSION_BUILD_TESTS=OFF"
+  ];
+
+  meta = with lib; {
+    description = "Tool for integrating Rust into an existing CMake project";
+    homepage = "https://github.com/AndrewGaspar/corrosion";
+    license = licenses.mit;
+    maintainers = with maintainers; [ dotlambda ];
+  };
+}
diff --git a/pkgs/development/tools/build-managers/doit/default.nix b/pkgs/development/tools/build-managers/doit/default.nix
deleted file mode 100644
index b906d64f0af..00000000000
--- a/pkgs/development/tools/build-managers/doit/default.nix
+++ /dev/null
@@ -1,41 +0,0 @@
-{ stdenv, fetchurl, python3Packages }:
-
-let
-
-  name = "doit";
-  version = "0.32.0";
-
-in python3Packages.buildPythonApplication {
-  name = "${name}-${version}";
-
-  src = fetchurl {
-    url = "mirror://pypi/d/${name}/${name}-${version}.tar.gz";
-    sha256 = "033m6y9763l81kgqd07rm62bngv3dsm3k9p28nwsn2qawl8h8g9j";
-  };
-
-  buildInputs = with python3Packages; [ mock pytest ];
-
-  propagatedBuildInputs = with python3Packages; [ cloudpickle ]
-    ++ stdenv.lib.optional stdenv.isLinux pyinotify
-    ++ stdenv.lib.optional stdenv.isDarwin macfsevents;
-
-  # Tests fail due to mysterious gdbm.open() resource temporarily
-  # unavailable errors.
-  doCheck = false;
-  checkPhase = "py.test";
-
-  meta = with stdenv.lib; {
-    homepage = "https://pydoit.org/";
-    description = "A task management & automation tool";
-    license = licenses.mit;
-    longDescription = ''
-      doit is a modern open-source build-tool written in python
-      designed to be simple to use and flexible to deal with complex
-      work-flows. It is specially suitable for building and managing
-      custom work-flows where there is no out-of-the-box solution
-      available.
-    '';
-    maintainers = with maintainers; [ pSub ];
-    platforms = platforms.all;
-  };
-}
diff --git a/pkgs/development/tools/build-managers/drake/gemset.nix b/pkgs/development/tools/build-managers/drake/gemset.nix
index 061ed5d973a..09b3bc7ec06 100644
--- a/pkgs/development/tools/build-managers/drake/gemset.nix
+++ b/pkgs/development/tools/build-managers/drake/gemset.nix
@@ -20,4 +20,4 @@
     };
     version = "0.9.2.0.3.1";
   };
-}
\ No newline at end of file
+}
diff --git a/pkgs/development/tools/build-managers/dub/default.nix b/pkgs/development/tools/build-managers/dub/default.nix
index 44c91e93609..fb85c1f3326 100644
--- a/pkgs/development/tools/build-managers/dub/default.nix
+++ b/pkgs/development/tools/build-managers/dub/default.nix
@@ -1,8 +1,10 @@
-{ stdenv, fetchFromGitHub, curl, dmd, libevent, rsync }:
+{ lib, stdenv, fetchFromGitHub, curl, libevent, rsync, ldc, dcompiler ? ldc }:
+
+assert dcompiler != null;
 
 stdenv.mkDerivation rec {
   pname = "dub";
-  version = "1.14.0";
+  version = "1.23.0";
 
   enableParallelBuilding = true;
 
@@ -10,7 +12,7 @@ stdenv.mkDerivation rec {
     owner = "dlang";
     repo = "dub";
     rev = "v${version}";
-    sha256 = "070kfkyrkr98y1hbhcf85842c0x7l95w1ambrkdgajpb6kcmpf84";
+    sha256 = "06a4whsl1m600k096nwif83n7za3vr7pj1xwapncy5fcad1gmady";
   };
 
   postUnpack = ''
@@ -24,12 +26,23 @@ stdenv.mkDerivation rec {
           --replace "dub remove" "\"${dubvar}\" remove"
   '';
 
-  nativeBuildInputs = [ dmd libevent rsync ];
+  nativeBuildInputs = [ dcompiler libevent rsync ];
   buildInputs = [ curl ];
 
   buildPhase = ''
-    export DMD=${dmd.out}/bin/dmd
-    ./build.sh
+    for dc_ in dmd ldmd2 gdmd; do
+      echo "... check for D compiler $dc_ ..."
+      dc=$(type -P $dc_ || echo "")
+      if [ ! "$dc" == "" ]; then
+        break
+      fi
+    done
+    if [ "$dc" == "" ]; then
+      exit "Error: could not find D compiler"
+    fi
+    echo "$dc_ found and used as D compiler to build $pname"
+    $dc ./build.d
+    ./build
   '';
 
   doCheck = !stdenv.isDarwin;
@@ -37,35 +50,102 @@ stdenv.mkDerivation rec {
   checkPhase = ''
     export DUB=$NIX_BUILD_TOP/source/bin/dub
     export PATH=$PATH:$NIX_BUILD_TOP/source/bin/
-    export DC=${dmd.out}/bin/dmd
+    export DC=${dcompiler.out}/bin/${dcompiler.pname}
+    echo "DC out --> $DC"
     export HOME=$TMP
 
     rm -rf test/issue502-root-import
-    rm test/issue990-download-optional-selected.sh
-    rm test/timeout.sh
     rm test/issue674-concurrent-dub.sh
     rm test/issue672-upgrade-optional.sh
+    rm test/issue990-download-optional-selected.sh
+    rm test/issue877-auto-fetch-package-on-run.sh
+    rm test/issue1037-better-dependency-messages.sh
+    rm test/issue1416-maven-repo-pkg-supplier.sh
+    rm test/issue1180-local-cache-broken.sh
     rm test/issue1574-addcommand.sh
     rm test/issue1524-maven-upgrade-dependency-tree.sh
-    rm test/issue1416-maven-repo-pkg-supplier.sh
-    rm test/issue1037-better-dependency-messages.sh
-    rm test/interactive-remove.sh
+    rm test/issue1773-lint.sh
+
+    rm test/ddox.sh
     rm test/fetchzip.sh
     rm test/feat663-search.sh
-    rm test/ddox.sh
+    rm -rf test/git-dependency
+    rm test/interactive-remove.sh
+    rm test/timeout.sh
+    rm test/version-spec.sh
     rm test/0-init-multi.sh
     rm test/0-init-multi-json.sh
+    rm test/4-describe-data-1-list.sh
+    rm test/4-describe-data-3-zero-delim.sh
+    rm test/4-describe-import-paths.sh
+    rm test/4-describe-string-import-paths.sh
+    rm test/4-describe-json.sh
+    rm test/5-convert-stdout.sh
+    rm test/issue1003-check-empty-ld-flags.sh
+    rm test/issue103-single-file-package.sh
+    rm test/issue1040-run-with-ver.sh
+    rm test/issue1091-bogus-rebuild.sh
+    rm test/issue1194-warn-wrong-subconfig.sh
+    rm test/issue1277.sh
+    rm test/issue1372-ignore-files-in-hidden-dirs.sh
+    rm test/issue1447-build-settings-vars.sh
+    rm test/issue1531-toolchain-requirements.sh
+    rm test/issue346-redundant-flags.sh
+    rm test/issue361-optional-deps.sh
+    rm test/issue564-invalid-upgrade-dependency.sh
+    rm test/issue586-subpack-dep.sh
+    rm test/issue616-describe-vs-generate-commands.sh
+    rm test/issue686-multiple-march.sh
+    rm test/issue813-fixed-dependency.sh
+    rm test/issue813-pure-sub-dependency.sh
+    rm test/issue820-extra-fields-after-convert.sh
+    rm test/issue923-subpackage-deps.sh
+    rm test/single-file-sdl-default-name.sh
+    rm test/subpackage-common-with-sourcefile-globbing.sh
+    rm test/issue934-path-dep.sh
+    rm -r test/1-dynLib-simple
+    rm -r test/1-exec-simple-package-json
+    rm -r test/1-exec-simple
+    rm -r test/1-staticLib-simple
+    rm -r test/2-dynLib-dep
+    rm -r test/2-staticLib-dep
+    rm -r test/2-dynLib-with-staticLib-dep
+    rm -r test/2-sourceLib-dep/
+    rm -r test/3-copyFiles
+    rm -r test/custom-source-main-bug487
+    rm -r test/custom-unittest
+    rm -r test/issue1262-version-inheritance-diamond
+    rm -r test/issue1003-check-empty-ld-flags
+    rm -r test/ignore-hidden-1
+    rm -r test/ignore-hidden-2
+    rm -r test/issue1427-betterC
+    rm -r test/issue130-unicode-*
+    rm -r test/issue1262-version-inheritance
+    rm -r test/issue1372-ignore-files-in-hidden-dirs
+    rm -r test/issue1350-transitive-none-deps
+    rm -r test/issue1775
+    rm -r test/issue1447-build-settings-vars
+    rm -r test/issue1408-inherit-linker-files
+    rm -r test/issue1551-var-escaping
+    rm -r test/issue754-path-selection-fail
+    rm -r test/issue1788-incomplete-string-import-override
+    rm -r test/subpackage-ref
+    rm -r test/issue777-bogus-path-dependency
+    rm -r test/issue959-path-based-subpack-dep
+    rm -r test/issue97-targettype-none-nodeps
+    rm -r test/issue97-targettype-none-onerecipe
+    rm -r test/path-subpackage-ref
+    rm -r test/sdl-package-simple
 
     ./test/run-unittest.sh
   '';
 
   installPhase = ''
-    mkdir $out
-    mkdir $out/bin
+    mkdir -p $out/bin
     cp bin/dub $out/bin
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Package and build manager for D applications and libraries";
     homepage = "https://code.dlang.org/";
     license = licenses.mit;
diff --git a/pkgs/development/tools/build-managers/fac/cargo-lock.patch b/pkgs/development/tools/build-managers/fac/cargo-lock.patch
new file mode 100644
index 00000000000..86768d4611e
--- /dev/null
+++ b/pkgs/development/tools/build-managers/fac/cargo-lock.patch
@@ -0,0 +1,802 @@
+diff --git a/Cargo.lock b/Cargo.lock
+new file mode 100644
+index 0000000..4ab2c17
+--- /dev/null
++++ b/Cargo.lock
+@@ -0,0 +1,796 @@
++# This file is automatically @generated by Cargo.
++# It is not intended for manual editing.
++[[package]]
++name = "ahash"
++version = "0.3.8"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "e8fd72866655d1904d6b0997d0b07ba561047d070fbe29de039031c641b61217"
++
++[[package]]
++name = "aho-corasick"
++version = "0.7.13"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "043164d8ba5c4c3035fec9bbee8647c0261d788f3474306f93bb65901cae0e86"
++dependencies = [
++ "memchr",
++]
++
++[[package]]
++name = "ansi_term"
++version = "0.11.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
++dependencies = [
++ "winapi 0.3.9",
++]
++
++[[package]]
++name = "atty"
++version = "0.2.14"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
++dependencies = [
++ "hermit-abi",
++ "libc",
++ "winapi 0.3.9",
++]
++
++[[package]]
++name = "autocfg"
++version = "1.0.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
++
++[[package]]
++name = "bigbro"
++version = "0.5.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "3eaac07a3e62cd31e2102ca97c7fdf20002893ba2a396d29ea4710d2415cdce5"
++dependencies = [
++ "libc",
++ "seccomp-droundy",
++]
++
++[[package]]
++name = "bitflags"
++version = "1.2.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
++
++[[package]]
++name = "cc"
++version = "1.0.59"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "66120af515773fb005778dc07c261bd201ec8ce50bd6e7144c927753fe013381"
++
++[[package]]
++name = "cfg-if"
++version = "0.1.10"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
++
++[[package]]
++name = "clap"
++version = "2.33.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002"
++dependencies = [
++ "ansi_term",
++ "atty",
++ "bitflags",
++ "strsim",
++ "textwrap",
++ "unicode-width",
++ "vec_map",
++]
++
++[[package]]
++name = "crude-profiler"
++version = "0.1.7"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "9389510ac716b6ace8c4b635420cf023e12c81b61e933bfef06639142f149ecd"
++dependencies = [
++ "lazy_static 0.2.11",
++]
++
++[[package]]
++name = "ctrlc"
++version = "3.1.6"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d0b676fa23f995faf587496dcd1c80fead847ed58d2da52ac1caca9a72790dd2"
++dependencies = [
++ "nix",
++ "winapi 0.3.9",
++]
++
++[[package]]
++name = "either"
++version = "1.6.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "cd56b59865bce947ac5958779cfa508f6c3b9497cc762b7e24a12d11ccde2c4f"
++
++[[package]]
++name = "env_logger"
++version = "0.7.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36"
++dependencies = [
++ "log",
++ "regex",
++]
++
++[[package]]
++name = "fac"
++version = "0.5.3"
++dependencies = [
++ "atty",
++ "bigbro",
++ "clap",
++ "crude-profiler",
++ "ctrlc",
++ "git-version",
++ "internment",
++ "lazy_static 1.4.0",
++ "libc",
++ "metrohash",
++ "notify",
++ "num_cpus",
++ "pathdiff",
++ "quickcheck",
++ "termcolor",
++ "tinyset",
++]
++
++[[package]]
++name = "filetime"
++version = "0.2.12"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "3ed85775dcc68644b5c950ac06a2b23768d3bc9390464151aaf27136998dcf9e"
++dependencies = [
++ "cfg-if",
++ "libc",
++ "redox_syscall",
++ "winapi 0.3.9",
++]
++
++[[package]]
++name = "fsevent"
++version = "0.4.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "5ab7d1bd1bd33cc98b0889831b72da23c0aa4df9cec7e0702f46ecea04b35db6"
++dependencies = [
++ "bitflags",
++ "fsevent-sys",
++]
++
++[[package]]
++name = "fsevent-sys"
++version = "2.0.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f41b048a94555da0f42f1d632e2e19510084fb8e303b0daa2816e733fb3644a0"
++dependencies = [
++ "libc",
++]
++
++[[package]]
++name = "fuchsia-zircon"
++version = "0.3.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
++dependencies = [
++ "bitflags",
++ "fuchsia-zircon-sys",
++]
++
++[[package]]
++name = "fuchsia-zircon-sys"
++version = "0.3.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
++
++[[package]]
++name = "gcc"
++version = "0.3.55"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2"
++
++[[package]]
++name = "getrandom"
++version = "0.1.15"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6"
++dependencies = [
++ "cfg-if",
++ "libc",
++ "wasi",
++]
++
++[[package]]
++name = "git-version"
++version = "0.3.4"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "94918e83f1e01dedc2e361d00ce9487b14c58c7f40bab148026fa39d42cb41e2"
++dependencies = [
++ "git-version-macro",
++ "proc-macro-hack",
++]
++
++[[package]]
++name = "git-version-macro"
++version = "0.3.4"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "34a97a52fdee1870a34fa6e4b77570cba531b27d1838874fef4429a791a3d657"
++dependencies = [
++ "proc-macro-hack",
++ "proc-macro2",
++ "quote",
++ "syn",
++]
++
++[[package]]
++name = "hashbrown"
++version = "0.8.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "e91b62f79061a0bc2e046024cb7ba44b08419ed238ecbd9adbd787434b9e8c25"
++dependencies = [
++ "ahash",
++ "autocfg",
++]
++
++[[package]]
++name = "hermit-abi"
++version = "0.1.15"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "3deed196b6e7f9e44a2ae8d94225d80302d81208b1bb673fd21fe634645c85a9"
++dependencies = [
++ "libc",
++]
++
++[[package]]
++name = "inotify"
++version = "0.7.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "4816c66d2c8ae673df83366c18341538f234a26d65a9ecea5c348b453ac1d02f"
++dependencies = [
++ "bitflags",
++ "inotify-sys",
++ "libc",
++]
++
++[[package]]
++name = "inotify-sys"
++version = "0.1.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "e74a1aa87c59aeff6ef2cc2fa62d41bc43f54952f55652656b18a02fd5e356c0"
++dependencies = [
++ "libc",
++]
++
++[[package]]
++name = "internment"
++version = "0.3.13"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "7e5cba670f596a69e619cb796bcf609cb32c0ba4415d1e809104b8b832130d79"
++dependencies = [
++ "hashbrown",
++ "lazy_static 1.4.0",
++ "serde",
++ "state",
++ "tinyset",
++]
++
++[[package]]
++name = "iovec"
++version = "0.1.4"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e"
++dependencies = [
++ "libc",
++]
++
++[[package]]
++name = "itertools"
++version = "0.9.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b"
++dependencies = [
++ "either",
++]
++
++[[package]]
++name = "kernel32-sys"
++version = "0.2.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
++dependencies = [
++ "winapi 0.2.8",
++ "winapi-build",
++]
++
++[[package]]
++name = "lazy_static"
++version = "0.2.11"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73"
++
++[[package]]
++name = "lazy_static"
++version = "1.4.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
++
++[[package]]
++name = "lazycell"
++version = "1.3.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
++
++[[package]]
++name = "libc"
++version = "0.2.77"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f2f96b10ec2560088a8e76961b00d47107b3a625fecb76dedb29ee7ccbf98235"
++
++[[package]]
++name = "log"
++version = "0.4.11"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b"
++dependencies = [
++ "cfg-if",
++]
++
++[[package]]
++name = "memchr"
++version = "2.3.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400"
++
++[[package]]
++name = "metrohash"
++version = "1.0.6"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "3ba553cb19e2acbc54baa16faef215126243fe45e53357a3b2e9f4ebc7b0506c"
++
++[[package]]
++name = "mio"
++version = "0.6.22"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430"
++dependencies = [
++ "cfg-if",
++ "fuchsia-zircon",
++ "fuchsia-zircon-sys",
++ "iovec",
++ "kernel32-sys",
++ "libc",
++ "log",
++ "miow",
++ "net2",
++ "slab",
++ "winapi 0.2.8",
++]
++
++[[package]]
++name = "mio-extras"
++version = "2.0.6"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19"
++dependencies = [
++ "lazycell",
++ "log",
++ "mio",
++ "slab",
++]
++
++[[package]]
++name = "miow"
++version = "0.2.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919"
++dependencies = [
++ "kernel32-sys",
++ "net2",
++ "winapi 0.2.8",
++ "ws2_32-sys",
++]
++
++[[package]]
++name = "net2"
++version = "0.2.35"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "3ebc3ec692ed7c9a255596c67808dee269f64655d8baf7b4f0638e51ba1d6853"
++dependencies = [
++ "cfg-if",
++ "libc",
++ "winapi 0.3.9",
++]
++
++[[package]]
++name = "nix"
++version = "0.17.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363"
++dependencies = [
++ "bitflags",
++ "cc",
++ "cfg-if",
++ "libc",
++ "void",
++]
++
++[[package]]
++name = "notify"
++version = "4.0.15"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "80ae4a7688d1fab81c5bf19c64fc8db920be8d519ce6336ed4e7efe024724dbd"
++dependencies = [
++ "bitflags",
++ "filetime",
++ "fsevent",
++ "fsevent-sys",
++ "inotify",
++ "libc",
++ "mio",
++ "mio-extras",
++ "walkdir",
++ "winapi 0.3.9",
++]
++
++[[package]]
++name = "num_cpus"
++version = "1.13.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3"
++dependencies = [
++ "hermit-abi",
++ "libc",
++]
++
++[[package]]
++name = "pathdiff"
++version = "0.2.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "877630b3de15c0b64cc52f659345724fbf6bdad9bd9566699fc53688f3c34a34"
++
++[[package]]
++name = "pkg-config"
++version = "0.3.18"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d36492546b6af1463394d46f0c834346f31548646f6ba10849802c9c9a27ac33"
++
++[[package]]
++name = "ppv-lite86"
++version = "0.2.9"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "c36fa947111f5c62a733b652544dd0016a43ce89619538a8ef92724a6f501a20"
++
++[[package]]
++name = "proc-macro-hack"
++version = "0.5.18"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "99c605b9a0adc77b7211c6b1f722dcb613d68d66859a44f3d485a6da332b0598"
++
++[[package]]
++name = "proc-macro2"
++version = "1.0.21"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "36e28516df94f3dd551a587da5357459d9b36d945a7c37c3557928c1c2ff2a2c"
++dependencies = [
++ "unicode-xid",
++]
++
++[[package]]
++name = "quickcheck"
++version = "0.9.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "a44883e74aa97ad63db83c4bf8ca490f02b2fc02f92575e720c8551e843c945f"
++dependencies = [
++ "env_logger",
++ "log",
++ "rand",
++ "rand_core",
++]
++
++[[package]]
++name = "quote"
++version = "1.0.7"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37"
++dependencies = [
++ "proc-macro2",
++]
++
++[[package]]
++name = "rand"
++version = "0.7.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
++dependencies = [
++ "getrandom",
++ "libc",
++ "rand_chacha",
++ "rand_core",
++ "rand_hc",
++]
++
++[[package]]
++name = "rand_chacha"
++version = "0.2.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
++dependencies = [
++ "ppv-lite86",
++ "rand_core",
++]
++
++[[package]]
++name = "rand_core"
++version = "0.5.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
++dependencies = [
++ "getrandom",
++]
++
++[[package]]
++name = "rand_hc"
++version = "0.2.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
++dependencies = [
++ "rand_core",
++]
++
++[[package]]
++name = "redox_syscall"
++version = "0.1.57"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce"
++
++[[package]]
++name = "regex"
++version = "1.3.9"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6"
++dependencies = [
++ "aho-corasick",
++ "memchr",
++ "regex-syntax",
++ "thread_local 1.0.1",
++]
++
++[[package]]
++name = "regex-syntax"
++version = "0.6.18"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8"
++
++[[package]]
++name = "same-file"
++version = "1.0.6"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
++dependencies = [
++ "winapi-util",
++]
++
++[[package]]
++name = "seccomp-droundy"
++version = "0.1.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d4b762ab71c6bf1a9a3e0b21e8600b73b088f2a6562e03cd77b2826821fae5f8"
++dependencies = [
++ "libc",
++ "seccomp-droundy-sys",
++]
++
++[[package]]
++name = "seccomp-droundy-sys"
++version = "0.1.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "200976cc4ff22cd8b9c6c23681fe6aa89a12aa3637c86dd16e44c05d7c373488"
++dependencies = [
++ "gcc",
++ "libc",
++ "pkg-config",
++]
++
++[[package]]
++name = "serde"
++version = "1.0.115"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "e54c9a88f2da7238af84b5101443f0c0d0a3bbdc455e34a5c9497b1903ed55d5"
++
++[[package]]
++name = "slab"
++version = "0.4.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
++
++[[package]]
++name = "state"
++version = "0.4.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "7345c971d1ef21ffdbd103a75990a15eb03604fc8b8852ca8cb418ee1a099028"
++dependencies = [
++ "thread_local 0.3.3",
++]
++
++[[package]]
++name = "strsim"
++version = "0.8.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
++
++[[package]]
++name = "syn"
++version = "1.0.40"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "963f7d3cc59b59b9325165add223142bbf1df27655d07789f109896d353d8350"
++dependencies = [
++ "proc-macro2",
++ "quote",
++ "unicode-xid",
++]
++
++[[package]]
++name = "termcolor"
++version = "1.1.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "bb6bfa289a4d7c5766392812c0a1f4c1ba45afa1ad47803c11e1f407d846d75f"
++dependencies = [
++ "winapi-util",
++]
++
++[[package]]
++name = "textwrap"
++version = "0.11.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
++dependencies = [
++ "unicode-width",
++]
++
++[[package]]
++name = "thread-id"
++version = "3.3.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "c7fbf4c9d56b320106cd64fd024dadfa0be7cb4706725fc44a7d7ce952d820c1"
++dependencies = [
++ "libc",
++ "redox_syscall",
++ "winapi 0.3.9",
++]
++
++[[package]]
++name = "thread_local"
++version = "0.3.3"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "c85048c6260d17cf486ceae3282d9fb6b90be220bf5b28c400f5485ffc29f0c7"
++dependencies = [
++ "thread-id",
++ "unreachable",
++]
++
++[[package]]
++name = "thread_local"
++version = "1.0.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14"
++dependencies = [
++ "lazy_static 1.4.0",
++]
++
++[[package]]
++name = "tinyset"
++version = "0.4.4"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "784f540960a63144d63992caf430ed87e39d920f2c474cb8ac586ff31fb861fc"
++dependencies = [
++ "itertools",
++ "rand",
++]
++
++[[package]]
++name = "unicode-width"
++version = "0.1.8"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3"
++
++[[package]]
++name = "unicode-xid"
++version = "0.2.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564"
++
++[[package]]
++name = "unreachable"
++version = "0.1.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "1f2ae5ddb18e1c92664717616dd9549dde73f539f01bd7b77c2edb2446bdff91"
++dependencies = [
++ "void",
++]
++
++[[package]]
++name = "vec_map"
++version = "0.8.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
++
++[[package]]
++name = "void"
++version = "1.0.2"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
++
++[[package]]
++name = "walkdir"
++version = "2.3.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d"
++dependencies = [
++ "same-file",
++ "winapi 0.3.9",
++ "winapi-util",
++]
++
++[[package]]
++name = "wasi"
++version = "0.9.0+wasi-snapshot-preview1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
++
++[[package]]
++name = "winapi"
++version = "0.2.8"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
++
++[[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-build"
++version = "0.1.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc"
++
++[[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-util"
++version = "0.1.5"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
++dependencies = [
++ "winapi 0.3.9",
++]
++
++[[package]]
++name = "winapi-x86_64-pc-windows-gnu"
++version = "0.4.0"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
++
++[[package]]
++name = "ws2_32-sys"
++version = "0.2.1"
++source = "registry+https://github.com/rust-lang/crates.io-index"
++checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e"
++dependencies = [
++ "winapi 0.2.8",
++ "winapi-build",
++]
diff --git a/pkgs/development/tools/build-managers/fac/default.nix b/pkgs/development/tools/build-managers/fac/default.nix
new file mode 100644
index 00000000000..0d62642e032
--- /dev/null
+++ b/pkgs/development/tools/build-managers/fac/default.nix
@@ -0,0 +1,50 @@
+{ lib, git, fetchFromGitHub, rustPlatform }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "fac-build";
+  version = "0.5.3";
+
+  src = fetchFromGitHub {
+    owner = "droundy";
+    repo = "fac";
+    rev = version;
+    sha256 = "1gifrlb31jy8633rnhny58ccp3wlmd338129c6sh0h1a38vkmsxk";
+  };
+
+  # workaround for missing Cargo.lock file
+  cargoPatches = [ ./cargo-lock.patch ];
+
+  cargoSha256 = "033wif3wwm3912ppw0gshsyjxipilg9hhvkijw29zmjfm6074b21";
+
+  # fac includes a unit test called ls_files_works which assumes it's
+  # running in a git repo. Nix's sandbox runs cargo build outside git,
+  # so this test won't work.
+  checkFlagsArray = [ "--skip=ls_files_works" ];
+
+  # fac calls git at runtime, expecting it to be in the PATH,
+  # so we need to patch it to call git by absolute path instead.
+  postPatch = ''
+    substituteInPlace src/git.rs \
+        --replace 'std::process::Command::new("git")' \
+        'std::process::Command::new("${git}/bin/git")'
+  '';
+
+  meta = with lib; {
+    description = ''
+      A build system that uses ptrace to handle dependencies automatically
+    '';
+    longDescription = ''
+      Fac is a general-purpose build system inspired by make that utilizes
+      ptrace to ensure that all dependences are enumerated and that all
+      source files are added to a (git) repo. An important feature of fac
+      is that it automatically handles dependencies, rather than either
+      complaining about them or giving an incorrect build. Currently, fac
+      only runs on linux systems, but on those systems it is incredibly
+      easy to use!
+    '';
+    homepage = "https://physics.oregonstate.edu/~roundyd/fac";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.dpercy ];
+  };
+}
diff --git a/pkgs/development/tools/build-managers/gn/default.nix b/pkgs/development/tools/build-managers/gn/default.nix
index 599e10af1a9..3c0abb3edea 100644
--- a/pkgs/development/tools/build-managers/gn/default.nix
+++ b/pkgs/development/tools/build-managers/gn/default.nix
@@ -59,6 +59,6 @@ in stdenv.mkDerivation {
     homepage = "https://gn.googlesource.com/gn";
     license = licenses.bsd3;
     platforms = platforms.unix;
-    maintainers = with maintainers; [ stesie matthewbauer ];
+    maintainers = with maintainers; [ stesie matthewbauer primeos ];
   };
 }
diff --git a/pkgs/development/tools/build-managers/gnumake/0001-No-impure-bin-sh.patch b/pkgs/development/tools/build-managers/gnumake/0001-No-impure-bin-sh.patch
new file mode 100644
index 00000000000..58ee2d6fe09
--- /dev/null
+++ b/pkgs/development/tools/build-managers/gnumake/0001-No-impure-bin-sh.patch
@@ -0,0 +1,35 @@
+From e00a5257a6ca5fedbf68b09eee7df3502971a057 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
+Date: Sat, 24 Apr 2021 10:11:40 +0200
+Subject: [PATCH 1/2] No impure bin sh
+
+default_shell is used to populuate default shell used to execute jobs.
+Unless SHELL is set to a different value this would be /bin/sh.
+Our stdenv provides sh in form of bash anyway. Having this value not
+hard-coded has some advantages:
+
+- It would ensure that on all systems it uses sh from its PATH rather
+  than /bin/sh, which helps as different systems might have different
+  shells there (bash vs. dash)
+- In the past I had issues with LD_PRELOAD with BEAR, where /bin/sh
+  used a different glibc than BEAR which came from my development shell.
+---
+ src/job.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/job.c b/src/job.c
+index ae1f18b..6b4ddb3 100644
+--- a/src/job.c
++++ b/src/job.c
+@@ -77,7 +77,7 @@ char * vms_strsignal (int status);
+ 
+ #else
+ 
+-const char *default_shell = "/bin/sh";
++const char *default_shell = "sh";
+ int batch_mode_shell = 0;
+ 
+ #endif
+-- 
+2.31.1
+
diff --git a/pkgs/development/tools/build-managers/gnumake/0002-remove-impure-dirs.patch b/pkgs/development/tools/build-managers/gnumake/0002-remove-impure-dirs.patch
new file mode 100644
index 00000000000..e62aee7d999
--- /dev/null
+++ b/pkgs/development/tools/build-managers/gnumake/0002-remove-impure-dirs.patch
@@ -0,0 +1,40 @@
+From 795d63d3c8b5c0dbb7e544954f75507b371b7228 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
+Date: Sat, 24 Apr 2021 10:20:16 +0200
+Subject: [PATCH 2/2] remove impure dirs
+
+---
+ src/read.c   | 3 ---
+ src/remake.c | 2 --
+ 2 files changed, 5 deletions(-)
+
+diff --git a/src/read.c b/src/read.c
+index fa197fb..defacfb 100644
+--- a/src/read.c
++++ b/src/read.c
+@@ -109,9 +109,6 @@ static const char *default_include_directories[] =
+ #endif
+     INCLUDEDIR,
+ #ifndef _AMIGA
+-    "/usr/gnu/include",
+-    "/usr/local/include",
+-    "/usr/include",
+ #endif
+     0
+   };
+diff --git a/src/remake.c b/src/remake.c
+index fb237c5..94bff7d 100644
+--- a/src/remake.c
++++ b/src/remake.c
+@@ -1601,8 +1601,6 @@ library_search (const char *lib, FILE_TIMESTAMP *mtime_ptr)
+   static const char *dirs[] =
+     {
+ #ifndef _AMIGA
+-      "/lib",
+-      "/usr/lib",
+ #endif
+ #if defined(WINDOWS32) && !defined(LIBDIR)
+ /*
+-- 
+2.31.1
+
diff --git a/pkgs/development/tools/build-managers/gnumake/4.2/default.nix b/pkgs/development/tools/build-managers/gnumake/4.2/default.nix
index a83281c4e96..7d56e55ebdb 100644
--- a/pkgs/development/tools/build-managers/gnumake/4.2/default.nix
+++ b/pkgs/development/tools/build-managers/gnumake/4.2/default.nix
@@ -1,13 +1,10 @@
-{ stdenv, fetchurl, guileSupport ? false, pkgconfig ? null , guile ? null }:
+{ lib, stdenv, fetchurl, guileSupport ? false, pkg-config ? null , guile ? null }:
 
-assert guileSupport -> ( pkgconfig != null && guile != null );
+assert guileSupport -> ( pkg-config != null && guile != null );
 
-let
-  version = "4.2.1";
-in
-stdenv.mkDerivation {
+stdenv.mkDerivation rec {
   pname = "gnumake";
-  inherit version;
+  version = "4.2.1";
 
   src = fetchurl {
     url = "mirror://gnu/make/make-${version}.tar.bz2";
@@ -23,12 +20,13 @@ stdenv.mkDerivation {
     ./pselect.patch
     # Fix support for glibc 2.27's glob, inspired by http://www.linuxfromscratch.org/lfs/view/8.2/chapter05/make.html
     ./glibc-2.27-glob.patch
+    ./glibc-2.33-glob.patch
   ];
 
-  nativeBuildInputs = stdenv.lib.optionals guileSupport [ pkgconfig ];
-  buildInputs = stdenv.lib.optionals guileSupport [ guile ];
+  nativeBuildInputs = lib.optionals guileSupport [ pkg-config ];
+  buildInputs = lib.optionals guileSupport [ guile ];
 
-  configureFlags = stdenv.lib.optional guileSupport "--with-guile"
+  configureFlags = lib.optional guileSupport "--with-guile"
 
     # Make uses this test to decide whether it should keep track of
     # subseconds. Apple made this possible with APFS and macOS 10.13.
@@ -37,11 +35,11 @@ stdenv.mkDerivation {
     # a second. So, tell Make to ignore nanoseconds in mtime here by
     # overriding the autoconf test for the struct.
     # See https://github.com/NixOS/nixpkgs/issues/51221 for discussion.
-    ++ stdenv.lib.optional stdenv.isDarwin "ac_cv_struct_st_mtim_nsec=no";
+    ++ lib.optional stdenv.isDarwin "ac_cv_struct_st_mtim_nsec=no";
 
   outputs = [ "out" "man" "info" ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://www.gnu.org/software/make/";
     description = "A tool to control the generation of non-source files from sources";
     license = licenses.gpl3Plus;
diff --git a/pkgs/development/tools/build-managers/gnumake/4.2/glibc-2.33-glob.patch b/pkgs/development/tools/build-managers/gnumake/4.2/glibc-2.33-glob.patch
new file mode 100644
index 00000000000..d3e424d1c49
--- /dev/null
+++ b/pkgs/development/tools/build-managers/gnumake/4.2/glibc-2.33-glob.patch
@@ -0,0 +1,17 @@
+diff --git glob/glob.c glob/glob.c
+index 924f2b3..d4ef0c5 100644
+--- glob/glob.c
++++ glob/glob.c
+@@ -212,8 +212,8 @@ my_realloc (p, n)
+ # define __alloca	alloca
+ 
+ 
+-#ifndef __GNU_LIBRARY__
+ # define __stat stat
++#ifndef __GNU_LIBRARY__
+ # ifdef STAT_MACROS_BROKEN
+ #  undef S_ISDIR
+ # endif
+-- 
+2.31.1
+
diff --git a/pkgs/development/tools/build-managers/gnumake/default.nix b/pkgs/development/tools/build-managers/gnumake/default.nix
index f01f38ecd23..3b9f0add879 100644
--- a/pkgs/development/tools/build-managers/gnumake/default.nix
+++ b/pkgs/development/tools/build-managers/gnumake/default.nix
@@ -1,30 +1,28 @@
-{ stdenv, fetchurl, guileSupport ? false, pkgconfig ? null , guile ? null }:
+{ lib, stdenv, fetchurl, guileSupport ? false, pkg-config, guile }:
 
-assert guileSupport -> ( pkgconfig != null && guile != null );
-
-let
-  version = "4.3";
-in
-stdenv.mkDerivation {
+stdenv.mkDerivation rec {
   pname = "gnumake";
-  inherit version;
+  version = "4.3";
 
   src = fetchurl {
     url = "mirror://gnu/make/make-${version}.tar.gz";
     sha256 = "06cfqzpqsvdnsxbysl5p2fgdgxgl9y4p7scpnrfa8z2zgkjdspz0";
   };
 
+  # to update apply these patches with `git am *.patch` to https://git.savannah.gnu.org/git/make.git
   patches = [
+    # Replaces /bin/sh with sh, see patch file for reasoning
+    ./0001-No-impure-bin-sh.patch
     # Purity: don't look for library dependencies (of the form `-lfoo') in /lib
     # and /usr/lib. It's a stupid feature anyway. Likewise, when searching for
     # included Makefiles, don't look in /usr/include and friends.
-    ./impure-dirs.patch
+    ./0002-remove-impure-dirs.patch
   ];
 
-  nativeBuildInputs = stdenv.lib.optionals guileSupport [ pkgconfig ];
-  buildInputs = stdenv.lib.optionals guileSupport [ guile ];
+  nativeBuildInputs = lib.optionals guileSupport [ pkg-config ];
+  buildInputs = lib.optionals guileSupport [ guile ];
 
-  configureFlags = stdenv.lib.optional guileSupport "--with-guile"
+  configureFlags = lib.optional guileSupport "--with-guile"
 
     # Make uses this test to decide whether it should keep track of
     # subseconds. Apple made this possible with APFS and macOS 10.13.
@@ -33,11 +31,11 @@ stdenv.mkDerivation {
     # a second. So, tell Make to ignore nanoseconds in mtime here by
     # overriding the autoconf test for the struct.
     # See https://github.com/NixOS/nixpkgs/issues/51221 for discussion.
-    ++ stdenv.lib.optional stdenv.isDarwin "ac_cv_struct_st_mtim_nsec=no";
+    ++ lib.optional stdenv.isDarwin "ac_cv_struct_st_mtim_nsec=no";
 
   outputs = [ "out" "man" "info" ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://www.gnu.org/software/make/";
     description = "A tool to control the generation of non-source files from sources";
     license = licenses.gpl3Plus;
diff --git a/pkgs/development/tools/build-managers/gnumake/impure-dirs.patch b/pkgs/development/tools/build-managers/gnumake/impure-dirs.patch
deleted file mode 100644
index 6c7d9d2463c..00000000000
--- a/pkgs/development/tools/build-managers/gnumake/impure-dirs.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff -Naur a/src/read.c b/src/read.c
---- a/src/read.c
-+++ b/src/read.c
-@@ -109,9 +109,6 @@
- #endif
-     INCLUDEDIR,
- #ifndef _AMIGA
--    "/usr/gnu/include",
--    "/usr/local/include",
--    "/usr/include",
- #endif
-     0
-   };
-diff -Naur a/src/remake.c b/src/remake.c
---- a/src/remake.c
-+++ b/src/remake.c
-@@ -1601,8 +1601,6 @@
-   static const char *dirs[] =
-     {
- #ifndef _AMIGA
--      "/lib",
--      "/usr/lib",
- #endif
- #if defined(WINDOWS32) && !defined(LIBDIR)
- /*
diff --git a/pkgs/development/tools/build-managers/gradle/default.nix b/pkgs/development/tools/build-managers/gradle/default.nix
index 73e9bc7b560..3afe88043de 100644
--- a/pkgs/development/tools/build-managers/gradle/default.nix
+++ b/pkgs/development/tools/build-managers/gradle/default.nix
@@ -1,6 +1,15 @@
-{ stdenv, fetchurl, unzip, jdk, java ? jdk, makeWrapper }:
+{ lib, stdenv, fetchurl, unzip, jdk, java ? jdk, makeWrapper }:
 
-rec {
+let
+  gradleSpec = { version, nativeVersion, sha256 }: rec {
+    inherit nativeVersion;
+    name = "gradle-${version}";
+    src = fetchurl {
+      inherit sha256;
+      url = "https://services.gradle.org/distributions/${name}-bin.zip";
+    };
+  };
+in rec {
   gradleGen = {name, src, nativeVersion} : stdenv.mkDerivation {
     inherit name src nativeVersion;
 
@@ -33,7 +42,8 @@ rec {
         echo ${stdenv.cc.cc} > $out/nix-support/manual-runtime-dependencies
       '';
 
-    buildInputs = [ unzip java makeWrapper ];
+    nativeBuildInputs = [ makeWrapper unzip ];
+    buildInputs = [ java ];
 
     meta = {
       description = "Enterprise-grade build system";
@@ -46,40 +56,34 @@ rec {
         build-by-convention behavior.
       '';
       homepage = "http://www.gradle.org/";
-      license = stdenv.lib.licenses.asl20;
-      platforms = stdenv.lib.platforms.unix;
+      license = lib.licenses.asl20;
+      platforms = lib.platforms.unix;
     };
   };
 
-  gradle_latest = gradle_6_6;
+  gradle_latest = gradle_7;
 
-  gradle_6_6 = gradleGen rec {
-    name = "gradle-6.6";
-    nativeVersion = "0.22-milestone-4";
+  gradle_7 = gradleGen (gradleSpec {
+    version = "7.1";
+    nativeVersion = "0.22-milestone-16";
+    sha256 = "0yyqksq3zza7r9ls389ha81l3s768j7dfdqiwk3846qy4wcyxsrd";
+  });
 
-    src = fetchurl {
-      url = "https://services.gradle.org/distributions/${name}-bin.zip";
-      sha256 = "09a0fnz6fn8yaxm3q3iwyjm3nnaz7k8i1xlpc7sm414py043by76";
-    };
-  };
+  gradle_6_8 = gradleGen (gradleSpec {
+    version = "6.8.3";
+    nativeVersion = "0.22-milestone-9";
+    sha256 = "01fjrk5nfdp6mldyblfmnkq2gv1rz1818kzgr0k2i1wzfsc73akz";
+  });
 
-  gradle_5_6 = gradleGen rec {
-    name = "gradle-5.6.4";
+  gradle_5_6 = gradleGen (gradleSpec {
+    version = "5.6.4";
     nativeVersion = "0.18";
+    sha256 = "1f3067073041bc44554d0efe5d402a33bc3d3c93cc39ab684f308586d732a80d";
+  });
 
-    src = fetchurl {
-      url = "https://services.gradle.org/distributions/${name}-bin.zip";
-      sha256 = "1f3067073041bc44554d0efe5d402a33bc3d3c93cc39ab684f308586d732a80d";
-    };
-  };
-
-  gradle_4_10 = gradleGen rec {
-    name = "gradle-4.10.3";
+  gradle_4_10 = gradleGen (gradleSpec {
+    version = "4.10.3";
     nativeVersion = "0.14";
-
-    src = fetchurl {
-      url = "https://services.gradle.org/distributions/${name}-bin.zip";
-      sha256 = "0vhqxnk0yj3q9jam5w4kpia70i4h0q4pjxxqwynh3qml0vrcn9l6";
-    };
-  };
+    sha256 = "0vhqxnk0yj3q9jam5w4kpia70i4h0q4pjxxqwynh3qml0vrcn9l6";
+  });
 }
diff --git a/pkgs/development/tools/build-managers/gup/default.nix b/pkgs/development/tools/build-managers/gup/default.nix
index 30c4d4ec4de..7fa8feb8e33 100644
--- a/pkgs/development/tools/build-managers/gup/default.nix
+++ b/pkgs/development/tools/build-managers/gup/default.nix
@@ -1,40 +1,45 @@
-{ stdenv, fetchFromGitHub, nix-update-source, lib, python
+{ stdenv, fetchFromGitHub, nix-update-source, lib, python3
 , which, runtimeShell, pychecker ? null }:
 stdenv.mkDerivation rec {
-  version = "0.7.0";
+  version = "0.8.0";
   src = fetchFromGitHub {
     owner = "timbertson";
     repo = "gup";
-    rev = "version-0.7.0";
-    sha256 = "1pwnmlq2pgkkln9sgz4wlb9dqlqw83bkf105qljnlvggc21zm3pv";
+    rev = "version-${version}";
+    sha256 = "1zjd76jyb5zc9w3l368723bjmxjl05s096g8ipwncfks1p9hdgf3";
   };
   pname = "gup";
-  buildInputs = lib.remove null [ python which pychecker ];
+  nativeBuildInputs = [ python3 which pychecker ];
+  buildInputs = [ python3 ];
+  strictDeps = true;
   SKIP_PYCHECKER = pychecker == null;
   buildPhase = "make python";
   installPhase = ''
     mkdir $out
     cp -r python/bin $out/bin
   '';
-  passthru.updateScript = ''
-    #!${runtimeShell}
-    set -e
-    echo
-    cd ${toString ./.}
-    ${nix-update-source}/bin/nix-update-source \
-      --prompt version \
-      --replace-attr version \
-      --set owner timbertson \
-      --set repo gup \
-      --set type fetchFromGitHub \
-      --set rev 'version-{version}' \
-      --modify-nix default.nix
-  '';
+  passthru.updateScript = [
+    runtimeShell
+    "-c"
+    ''
+      set -e
+      echo
+      cd ${toString ./.}
+      ${nix-update-source}/bin/nix-update-source \
+        --prompt version \
+        --replace-attr version \
+        --set owner timbertson \
+        --set repo gup \
+        --set type fetchFromGitHub \
+        --set rev 'version-{version}' \
+        --modify-nix default.nix
+    ''
+  ];
   meta = {
     inherit (src.meta) homepage;
     description = "A better make, inspired by djb's redo";
-    license = stdenv.lib.licenses.lgpl2Plus;
-    maintainers = [ stdenv.lib.maintainers.timbertson ];
-    platforms = stdenv.lib.platforms.all;
+    license = lib.licenses.lgpl2Plus;
+    maintainers = [ lib.maintainers.timbertson ];
+    platforms = lib.platforms.all;
   };
 }
diff --git a/pkgs/development/tools/build-managers/icmake/default.nix b/pkgs/development/tools/build-managers/icmake/default.nix
index 89e2b8d0cc6..6320646974a 100644
--- a/pkgs/development/tools/build-managers/icmake/default.nix
+++ b/pkgs/development/tools/build-managers/icmake/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitLab, makeWrapper, gcc, ncurses }:
+{ lib, stdenv, fetchFromGitLab, makeWrapper, gcc, ncurses }:
 
 stdenv.mkDerivation rec {
   pname = "icmake";
@@ -36,7 +36,7 @@ stdenv.mkDerivation rec {
      --prefix PATH : ${ncurses}/bin
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A program maintenance (make) utility using a C-like grammar";
     homepage = "https://fbb-git.gitlab.io/icmake/";
     license = licenses.gpl3;
diff --git a/pkgs/development/tools/build-managers/jam/default.nix b/pkgs/development/tools/build-managers/jam/default.nix
index 7d7502fad4b..8db882711fc 100644
--- a/pkgs/development/tools/build-managers/jam/default.nix
+++ b/pkgs/development/tools/build-managers/jam/default.nix
@@ -1,14 +1,15 @@
-{ stdenv, fetchurl, yacc }:
+{ lib, stdenv, fetchurl, bison }:
 
 stdenv.mkDerivation rec {
-  name = "jam-2.6.1";
+  pname = "jam";
+  version = "2.6.1";
 
   src = fetchurl {
-    url = "https://swarm.workshop.perforce.com/projects/perforce_software-jam/download/main/${name}.tar";
+    url = "https://swarm.workshop.perforce.com/projects/perforce_software-jam/download/main/${pname}-${version}.tar";
     sha256 = "19xkvkpycxfsncxvin6yqrql3x3z9ypc1j8kzls5k659q4kv5rmc";
   };
 
-  nativeBuildInputs = [ yacc ];
+  nativeBuildInputs = [ bison ];
 
   preConfigure = ''
     unset AR
@@ -26,7 +27,7 @@ stdenv.mkDerivation rec {
 
   enableParallelBuilding = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://www.perforce.com/resources/documentation/jam";
     license = licenses.free;
     description = "Just Another Make";
diff --git a/pkgs/development/tools/build-managers/kati/default.nix b/pkgs/development/tools/build-managers/kati/default.nix
index a7fced4482b..ed5923e74d0 100644
--- a/pkgs/development/tools/build-managers/kati/default.nix
+++ b/pkgs/development/tools/build-managers/kati/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub }:
+{ lib, stdenv, fetchFromGitHub }:
 
 stdenv.mkDerivation {
   pname = "kati-unstable";
@@ -17,7 +17,7 @@ stdenv.mkDerivation {
     install -D ckati $out/bin/ckati
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "An experimental GNU make clone";
     homepage = "https://github.com/google/kati";
     platforms = platforms.all;
diff --git a/pkgs/development/tools/build-managers/leiningen/default.nix b/pkgs/development/tools/build-managers/leiningen/default.nix
index 713f499ce2b..90b17ed9bba 100644
--- a/pkgs/development/tools/build-managers/leiningen/default.nix
+++ b/pkgs/development/tools/build-managers/leiningen/default.nix
@@ -1,26 +1,26 @@
-{ stdenv, fetchurl, makeWrapper
+{ lib, stdenv, fetchurl, makeWrapper
 , coreutils, jdk, rlwrap, gnupg }:
 
 stdenv.mkDerivation rec {
   pname = "leiningen";
-  version = "2.9.1";
+  version = "2.9.6";
 
   src = fetchurl {
     url = "https://raw.github.com/technomancy/leiningen/${version}/bin/lein-pkg";
-    sha256 = "1h0gpzpr7xk6hvmrrq41bcp2k9aai348baf8ad9bxvci01n4zb12";
+    sha256 = "0a8lq0yalar8szw155cxa8kywnk6yvakwi3xmxm1ahivn7i5hjq9";
   };
 
   jarsrc = fetchurl {
     # NOTE: This is actually a .jar, Github has issues
     url = "https://github.com/technomancy/leiningen/releases/download/${version}/${pname}-${version}-standalone.zip";
-    sha256 = "1y2mva5s2w2szzn1b9rhz0dvkffls4ravii677ybcf2w9wd86z7a";
+    sha256 = "1f3hb57rqp9qkh5n2wf65dvxraf21y15s3g643f2fhzc7vvl7ia1";
   };
 
   JARNAME = "${pname}-${version}-standalone.jar";
 
   dontUnpack = true;
 
-  buildInputs = [ makeWrapper ];
+  nativeBuildInputs = [ makeWrapper ];
   propagatedBuildInputs = [ jdk ];
 
   # the jar is not in share/java, because it's a standalone jar and should
@@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
     substituteInPlace $out/bin/lein \
       --replace 'LEIN_JAR=/usr/share/java/leiningen-$LEIN_VERSION-standalone.jar' "LEIN_JAR=$out/share/$JARNAME"
     wrapProgram $out/bin/lein \
-      --prefix PATH ":" "${stdenv.lib.makeBinPath [ rlwrap coreutils ]}" \
+      --prefix PATH ":" "${lib.makeBinPath [ rlwrap coreutils ]}" \
       --set LEIN_GPG ${gnupg}/bin/gpg \
       --set JAVA_CMD ${jdk}/bin/java
   '';
@@ -46,7 +46,8 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "https://leiningen.org/";
     description = "Project automation for Clojure";
-    license = stdenv.lib.licenses.epl10;
-    platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
+    license = lib.licenses.epl10;
+    platforms = lib.platforms.linux ++ lib.platforms.darwin;
+    maintainers = with lib.maintainers; [ thiagokokada ];
   };
 }
diff --git a/pkgs/development/tools/build-managers/mage/default.nix b/pkgs/development/tools/build-managers/mage/default.nix
index 6c9d8bfc838..d8ccd3ad2fe 100644
--- a/pkgs/development/tools/build-managers/mage/default.nix
+++ b/pkgs/development/tools/build-managers/mage/default.nix
@@ -2,16 +2,16 @@
 
 buildGoModule rec {
   pname = "mage";
-  version = "1.10.0";
+  version = "1.11.0";
 
   src = fetchFromGitHub {
     owner = "magefile";
     repo = pname;
     rev = "v${version}";
-    sha256 = "0c77xgz2bz4j9sh9v7f49iqyamc4lvvldcmn6v50hk98s9193gbf";
+    sha256 = "sha256-ghOk44VcQUAAYm9NCLsgYdky1KEpwOeChBNrgUKjnC8=";
   };
 
-  vendorSha256 = "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5";
+  vendorSha256 = null;
 
   doCheck = false;
 
diff --git a/pkgs/development/tools/build-managers/meson/allow-dirs-outside-of-prefix.patch b/pkgs/development/tools/build-managers/meson/allow-dirs-outside-of-prefix.patch
index bd81efd5208..4eb292a2e52 100644
--- a/pkgs/development/tools/build-managers/meson/allow-dirs-outside-of-prefix.patch
+++ b/pkgs/development/tools/build-managers/meson/allow-dirs-outside-of-prefix.patch
@@ -1,14 +1,14 @@
 --- a/mesonbuild/coredata.py
 +++ b/mesonbuild/coredata.py
-@@ -483,7 +483,6 @@ class CoreData:
+@@ -506,7 +506,6 @@ class CoreData:
              return value
-         if option.endswith('dir') and value.is_absolute() and \
-            option not in builtin_dir_noprefix_options:
+         if option.name.endswith('dir') and value.is_absolute() and \
+            option not in BULITIN_DIR_NOPREFIX_OPTIONS:
 -            # Value must be a subdir of the prefix
              # commonpath will always return a path in the native format, so we
              # must use pathlib.PurePath to do the same conversion before
              # comparing.
-@@ -495,7 +494,7 @@ class CoreData:
+@@ -518,7 +517,7 @@ class CoreData:
              try:
                  value = value.relative_to(prefix)
              except ValueError:
diff --git a/pkgs/development/tools/build-managers/meson/boost-Do-not-add-system-paths-on-nix.patch b/pkgs/development/tools/build-managers/meson/boost-Do-not-add-system-paths-on-nix.patch
new file mode 100644
index 00000000000..5b9020b3d54
--- /dev/null
+++ b/pkgs/development/tools/build-managers/meson/boost-Do-not-add-system-paths-on-nix.patch
@@ -0,0 +1,40 @@
+From 536108b10271f2f42d41c7d9ddb4ce2ea1851f4f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= <mail@nh2.me>
+Date: Sat, 17 Oct 2020 19:27:08 +0200
+Subject: [PATCH] boost: Do not add system paths on nix
+
+---
+ mesonbuild/dependencies/boost.py | 17 +----------------
+ 1 file changed, 1 insertion(+), 16 deletions(-)
+
+diff --git a/mesonbuild/dependencies/boost.py b/mesonbuild/dependencies/boost.py
+index 907c0c275..ecaf11b18 100644
+--- a/mesonbuild/dependencies/boost.py
++++ b/mesonbuild/dependencies/boost.py
+@@ -643,22 +643,7 @@ class BoostDependency(ExternalDependency):
+             roots += [x for x in candidates if x.name.lower().startswith('boost') and x.is_dir()]
+         else:
+             tmp = []  # type: T.List[Path]
+-
+-            # Homebrew
+-            brew_boost = Path('/usr/local/Cellar/boost')
+-            if brew_boost.is_dir():
+-                tmp += [x for x in brew_boost.iterdir()]
+-
+-            # Add some default system paths
+-            tmp += [Path('/opt/local')]
+-            tmp += [Path('/usr/local/opt/boost')]
+-            tmp += [Path('/usr/local')]
+-            tmp += [Path('/usr')]
+-
+-            # Cleanup paths
+-            tmp = [x for x in tmp if x.is_dir()]
+-            tmp = [x.resolve() for x in tmp]
+-            roots += tmp
++            # Do not add any non-explicit paths on nix
+ 
+         return roots
+ 
+-- 
+2.25.4
+
diff --git a/pkgs/development/tools/build-managers/meson/clear-old-rpath.patch b/pkgs/development/tools/build-managers/meson/clear-old-rpath.patch
index 0a52fe60e9d..f1e3c76e8b5 100644
--- a/pkgs/development/tools/build-managers/meson/clear-old-rpath.patch
+++ b/pkgs/development/tools/build-managers/meson/clear-old-rpath.patch
@@ -1,8 +1,8 @@
 diff --git a/mesonbuild/scripts/depfixer.py b/mesonbuild/scripts/depfixer.py
-index 77ac03d66..d12f77592 100644
+index 4176b9a03..faaabf616 100644
 --- a/mesonbuild/scripts/depfixer.py
 +++ b/mesonbuild/scripts/depfixer.py
-@@ -337,6 +337,15 @@ class Elf(DataSizes):
+@@ -336,6 +336,15 @@ class Elf(DataSizes):
          if not new_rpath:
              self.remove_rpath_entry(entrynum)
          else:
diff --git a/pkgs/development/tools/build-managers/meson/default.nix b/pkgs/development/tools/build-managers/meson/default.nix
index a1c94fa1fce..de82609a548 100644
--- a/pkgs/development/tools/build-managers/meson/default.nix
+++ b/pkgs/development/tools/build-managers/meson/default.nix
@@ -1,29 +1,22 @@
 { lib
 , python3
-, stdenv
+
 , writeTextDir
 , substituteAll
-, pkgsHostHost
 , fetchpatch
+, installShellFiles
 }:
 
 python3.pkgs.buildPythonApplication rec {
   pname = "meson";
-  version = "0.55.0";
+  version = "0.57.1";
 
   src = python3.pkgs.fetchPypi {
     inherit pname version;
-    sha256 = "Chriv+KuFKxHWTU3+TKQ+3npt3XFW0xTwoK8PKN0WzU=";
+    sha256 = "19n8alcpzv6npgp27iqljkmvdmr7s2c7zm8y997j1nlvpa1cgqbj";
   };
 
   patches = [
-    # Meson 0.55.0 incorrectly considers skipped tests as failures,
-    # which makes some packages like gjs fail to build.
-    (fetchpatch {
-      url = "https://github.com/mesonbuild/meson/commit/7db49db67d4aa7582cf46feb7157235e66aa95b1.diff";
-      sha256 = "1chq52sgk24afdlswssr8n8p6fa2wz8rjlxvkjhpqg1kg3qnqc9p";
-    })
-
     # Upstream insists on not allowing bindir and other dir options
     # outside of prefix for some reason:
     # https://github.com/mesonbuild/meson/issues/2561
@@ -59,21 +52,18 @@ python3.pkgs.buildPythonApplication rec {
     # cut-in-half-by-\0 store path references.
     # Let’s just clear the whole rpath and hope for the best.
     ./clear-old-rpath.patch
+
+    # Patch out default boost search paths to avoid impure builds on
+    # unsandboxed non-NixOS builds, see:
+    # https://github.com/NixOS/nixpkgs/issues/86131#issuecomment-711051774
+    ./boost-Do-not-add-system-paths-on-nix.patch
   ];
 
   setupHook = ./setup-hook.sh;
 
-  # Ensure there will always be a native C compiler when meson is used, as a
-  # workaround until https://github.com/mesonbuild/meson/pull/6512 lands.
-  depsHostHostPropagated = [ pkgsHostHost.stdenv.cc ];
-
-  pythonPath = [
-    python3.pkgs.setuptools # for pkg_resources
-  ];
-
   # 0.45 update enabled tests but they are failing
   doCheck = false;
-  # checkInputs = [ ninja pkgconfig ];
+  # checkInputs = [ ninja pkg-config ];
   # checkPhase = "python ./run_project_tests.py";
 
   postFixup = ''
@@ -88,6 +78,13 @@ python3.pkgs.buildPythonApplication rec {
     rm $out/nix-support/propagated-build-inputs
   '';
 
+  nativeBuildInputs = [ installShellFiles ];
+
+  postInstall = ''
+    installShellCompletion --zsh data/shell-completions/zsh/_meson
+    installShellCompletion --bash data/shell-completions/bash/meson
+  '';
+
   meta = with lib; {
     homepage = "https://mesonbuild.com";
     description = "SCons-like build system that use python as a front-end language and Ninja as a building backend";
diff --git a/pkgs/development/tools/build-managers/meson/fix-rpath.patch b/pkgs/development/tools/build-managers/meson/fix-rpath.patch
index c98506fcd9b..d34b6c4c434 100644
--- a/pkgs/development/tools/build-managers/meson/fix-rpath.patch
+++ b/pkgs/development/tools/build-managers/meson/fix-rpath.patch
@@ -1,6 +1,6 @@
 --- a/mesonbuild/backend/backends.py
 +++ b/mesonbuild/backend/backends.py
-@@ -453,6 +453,21 @@ class Backend:
+@@ -456,6 +456,21 @@ class Backend:
                  args.extend(self.environment.coredata.get_external_link_args(target.for_machine, lang))
              except Exception:
                  pass
@@ -19,6 +19,6 @@
 +                    dirs.add(flag)
 +                next_is_path = False
 +
-         for arg in args:
-             if arg.startswith('-Wl,-rpath='):
-                 for dir in arg.replace('-Wl,-rpath=','').split(':'):
+         # Match rpath formats:
+         # -Wl,-rpath=
+         # -Wl,-rpath,
diff --git a/pkgs/development/tools/build-managers/meson/gir-fallback-path.patch b/pkgs/development/tools/build-managers/meson/gir-fallback-path.patch
index e59795486aa..0c924bacf73 100644
--- a/pkgs/development/tools/build-managers/meson/gir-fallback-path.patch
+++ b/pkgs/development/tools/build-managers/meson/gir-fallback-path.patch
@@ -1,8 +1,8 @@
 --- a/mesonbuild/modules/gnome.py
 +++ b/mesonbuild/modules/gnome.py
-@@ -801,6 +801,13 @@ class GnomeModule(ExtensionModule):
-             scan_command += ['--sources-top-dirs', os.path.join(state.environment.get_source_dir(), self.interpreter.subproject_dir, state.subproject)]
-             scan_command += ['--sources-top-dirs', os.path.join(state.environment.get_build_dir(), self.interpreter.subproject_dir, state.subproject)]
+@@ -807,6 +807,13 @@ class GnomeModule(ExtensionModule):
+         if fatal_warnings:
+             scan_command.append('--warn-error')
  
 +        if len(set([girtarget.get_custom_install_dir()[0] for girtarget in girtargets])) > 1:
 +            raise MesonException('generate_gir tries to build multiple libraries with different install_dir at once: {}'.format(','.join([str(girtarget) for girtarget in girtargets])))
diff --git a/pkgs/development/tools/build-managers/meson/more-env-vars.patch b/pkgs/development/tools/build-managers/meson/more-env-vars.patch
index 6326f5ec3cf..4b2606e2d69 100644
--- a/pkgs/development/tools/build-managers/meson/more-env-vars.patch
+++ b/pkgs/development/tools/build-managers/meson/more-env-vars.patch
@@ -1,8 +1,8 @@
-diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
-index 17058df6b..7a68b7f15 100644
---- a/mesonbuild/envconfig.py
-+++ b/mesonbuild/envconfig.py
-@@ -120,7 +120,7 @@ def get_env_var_pair(for_machine: MachineChoice,
+diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
+index 756dd8193..a5cc6ef8b 100644
+--- a/mesonbuild/environment.py
++++ b/mesonbuild/environment.py
+@@ -151,7 +151,7 @@ def _get_env_var(for_machine: MachineChoice, is_cross: bool, var_name: str) -> T
          # compiling we fall back on the unprefixed host version. This
          # allows native builds to never need to worry about the 'BUILD_*'
          # ones.
diff --git a/pkgs/development/tools/build-managers/mill/default.nix b/pkgs/development/tools/build-managers/mill/default.nix
index 3fc893fd07c..27a21619c1d 100644
--- a/pkgs/development/tools/build-managers/mill/default.nix
+++ b/pkgs/development/tools/build-managers/mill/default.nix
@@ -1,12 +1,12 @@
-{ stdenv, fetchurl, jre, makeWrapper }:
+{ lib, stdenv, fetchurl, jre, makeWrapper }:
 
 stdenv.mkDerivation rec {
   pname = "mill";
-  version = "0.8.0";
+  version = "0.9.9";
 
   src = fetchurl {
-    url = "https://github.com/lihaoyi/mill/releases/download/${version}/${version}";
-    sha256 = "04pf76iyrbq2h2hksx0r2fmnd0d9mi6an24zvfv7k79rch11cql1";
+    url = "https://github.com/com-lihaoyi/mill/releases/download/${version}/${version}-assembly";
+    sha256 = "sha256-HIT7bxMEz7jpSsYvohN9+zYuyCf/ARE7hd48YMTo9/4=";
   };
 
   nativeBuildInputs = [ makeWrapper ];
@@ -15,18 +15,27 @@ stdenv.mkDerivation rec {
   dontConfigure = true;
   dontBuild = true;
 
+  # this is mostly downloading a pre-built artifact
+  preferLocal = true;
+
   installPhase = ''
     runHook preInstall
     install -Dm555 "$src" "$out/bin/.mill-wrapped"
     # can't use wrapProgram because it sets --argv0
     makeWrapper "$out/bin/.mill-wrapped" "$out/bin/mill" \
       --prefix PATH : "${jre}/bin" \
-      --set JAVA_HOME "${jre}" \
-      --set MILL_VERSION "${version}"
+      --set JAVA_HOME "${jre}"
     runHook postInstall
   '';
 
-  meta = with stdenv.lib; {
+  doInstallCheck = true;
+  # The default release is a script which will do an impure download
+  # just ensure that the application can run without network
+  installCheckPhase = ''
+    $out/bin/mill --help > /dev/null
+  '';
+
+  meta = with lib; {
     homepage = "https://www.lihaoyi.com/mill";
     license = licenses.mit;
     description = "A build tool for Scala, Java and more";
@@ -38,6 +47,6 @@ stdenv.mkDerivation rec {
       modules (written in Java or Scala) or through an external subprocesses.
     '';
     maintainers = with maintainers; [ scalavision ];
-    platforms = stdenv.lib.platforms.all;
+    platforms = lib.platforms.all;
   };
 }
diff --git a/pkgs/development/tools/build-managers/mk/default.nix b/pkgs/development/tools/build-managers/mk/default.nix
index 09028789daa..afc0b6f1ec0 100644
--- a/pkgs/development/tools/build-managers/mk/default.nix
+++ b/pkgs/development/tools/build-managers/mk/default.nix
@@ -1,14 +1,15 @@
-{stdenv, fetchurl}:
+{lib, stdenv, fetchurl}:
 
-stdenv.mkDerivation {
-  name = "mk-2006-01-31";
+stdenv.mkDerivation rec {
+  pname = "mk";
+  version = "unstable-2006-01-31";
   src = fetchurl {
-    url = "http://tarballs.nixos.org/mk-20060131.tar.gz";
+    url = "http://tarballs.nixos.org/${pname}-20060131.tar.gz";
     sha256 = "0za8dp1211bdp4584xb59liqpww7w1ql0cmlv34p9y928nibcxsr";
   };
   builder = ./builder.sh;
 
   meta = {
-    platforms = stdenv.lib.platforms.unix;
+    platforms = lib.platforms.unix;
   };
 }
diff --git a/pkgs/development/tools/build-managers/msbuild/create-deps.sh b/pkgs/development/tools/build-managers/msbuild/create-deps.sh
new file mode 100755
index 00000000000..c9bd4ba7eb6
--- /dev/null
+++ b/pkgs/development/tools/build-managers/msbuild/create-deps.sh
@@ -0,0 +1,57 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i bash -p jq -p xmlstarlet -p curl
+set -euo pipefail
+
+cat << EOL
+{ fetchurl }: [
+EOL
+
+mapfile -t repos < <(
+    xmlstarlet sel -t -v 'configuration/packageSources/add/@value' -n NuGet.config |
+        while IFS= read index
+        do
+            curl --compressed -fsL "$index" | \
+                jq -r '.resources[] | select(."@type" == "PackageBaseAddress/3.0.0")."@id"'
+        done
+    )
+
+find .packages fake-home/.nuget/packages -name \*.nupkg -printf '%P\n' | sort -u |
+    while IFS= read file
+    do
+        packagedir=$(dirname $file)
+        version=$(basename $packagedir)
+        package=$(dirname $packagedir)
+
+        found=false
+        for repo in "${repos[@]}"
+        do
+            url="$repo$package/$version/$package.$version.nupkg"
+            if curl -fsL "$url" -o /dev/null
+            then
+                found=true
+                break
+            fi
+        done
+
+        if ! $found
+        then
+            echo "couldn't find $package $version" >&2
+            exit 1
+        fi
+
+        sha256=$(nix-prefetch-url "$url" 2>/dev/null)
+        cat << EOL
+  {
+    name = "$package";
+    version = "$version";
+    src = fetchurl {
+      url = "$url";
+      sha256 = "$sha256";
+    };
+  }
+EOL
+    done
+
+cat << EOL
+]
+EOL
diff --git a/pkgs/development/tools/build-managers/msbuild/default.nix b/pkgs/development/tools/build-managers/msbuild/default.nix
index aea215cc927..51fd32bd9de 100644
--- a/pkgs/development/tools/build-managers/msbuild/default.nix
+++ b/pkgs/development/tools/build-managers/msbuild/default.nix
@@ -1,58 +1,77 @@
-{ stdenv, fetchurl, makeWrapper, glibcLocales, mono, dotnetPackages, unzip, dotnet-sdk }:
+{ lib, stdenv, fetchurl, fetchpatch, makeWrapper, glibcLocales, mono, dotnetPackages, unzip, dotnet-sdk, writeText, roslyn }:
 
 let
 
   xplat = fetchurl {
-    url = "https://github.com/mono/msbuild/releases/download/0.07/mono_msbuild_xplat-master-8f608e49.zip";
-    sha256 = "1jxq3fk9a6q2a8i9zacxaz3fkvc22i9qvzlpa7wbb95h42g0ffhq";
+    url = "https://github.com/mono/msbuild/releases/download/0.08/mono_msbuild_6.4.0.208.zip";
+    sha256 = "05k7qmnhfvrdgyjn6vp81jb97y21m261jnwdyqpjqpcmzz18j93g";
   };
 
-  deps = import ./nuget.nix { inherit fetchurl; };
+  deps = map (package: package.src)
+    (import ./deps.nix { inherit fetchurl; });
+
+  nuget-config = writeText "NuGet.config" ''
+    <?xml version="1.0" encoding="utf-8"?>
+    <configuration>
+      <packageSources>
+        <clear />
+      </packageSources>
+    </configuration>
+  '';
 
 in
 
 stdenv.mkDerivation rec {
   pname = "msbuild";
-  version = "16.3+xamarinxplat.2019.07.26.14.57";
+  version = "16.8+xamarinxplat.2020.07.30.15.02";
 
   src = fetchurl {
     url = "https://download.mono-project.com/sources/msbuild/msbuild-${version}.tar.xz";
-    sha256 = "1zcdfx4xsh62wj3g1jc2an0lppsfs691lz4dv05xbgi01aq1hk6a";
+    sha256 = "10amyca78b6pjfsy54b1rgwz2c1bx0sfky9zhldvzy4divckp25g";
   };
 
   nativeBuildInputs = [
     dotnet-sdk
     mono
+    unzip
   ];
 
   buildInputs = [
     dotnetPackages.Nuget
     glibcLocales
     makeWrapper
-    unzip
   ];
 
-  # https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=msbuild
-  phases = ["unpackPhase" "buildPhase" "installPhase" "installCheckPhase"];
-
   # https://github.com/NixOS/nixpkgs/issues/38991
   # bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
-  LOCALE_ARCHIVE = stdenv.lib.optionalString stdenv.isLinux
+  LOCALE_ARCHIVE = lib.optionalString stdenv.isLinux
       "${glibcLocales}/lib/locale/locale-archive";
 
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/mono/msbuild/commit/cad85cefabdaa001fb4bdbea2f5bf1d1cdb83c9b.patch";
+      sha256 = "1s8agc7nxxs69b3fl1v1air0c4dpig3hy4sk11l1560jrlx06dhh";
+    })
+  ];
+
+  postPatch = ''
+    sed -i -e "/<\/projectImportSearchPaths>/a <property name=\"MSBuildExtensionsPath\" value=\"$out/lib/mono/xbuild\"/>" \
+      src/MSBuild/app.config
+  '';
+
   buildPhase = ''
     # nuget would otherwise try to base itself in /homeless-shelter
     export HOME=$(pwd)/fake-home
 
+    cp ${nuget-config} NuGet.config
+    nuget sources Add -Name nixos -Source $(pwd)/nixos
+
     for package in ${toString deps}; do
       nuget add $package -Source nixos
     done
 
-    nuget sources Disable -Name "nuget.org"
-    nuget sources Add -Name nixos -Source $(pwd)/nixos
-
     # license check is case sensitive
-    mv LICENSE license
+    mv LICENSE license.bak && mv license.bak license
 
     mkdir -p artifacts
     unzip ${xplat} -d artifacts
@@ -64,27 +83,25 @@ stdenv.mkDerivation rec {
     # overwrite the file
     echo "#!${stdenv.shell}" > eng/common/dotnet-install.sh
 
-    # msbuild response files to use only the nixos source
-    echo "/p:RestoreSources=nixos" > artifacts/mono-msbuild/MSBuild.rsp
-    echo "/p:RestoreSources=nixos" > src/MSBuild/MSBuild.rsp
-
     # not patchShebangs, there is /bin/bash in the body of the script as well
     substituteInPlace ./eng/cibuild_bootstrapped_msbuild.sh --replace /bin/bash ${stdenv.shell}
 
     # DisableNerdbankVersioning https://gitter.im/Microsoft/msbuild/archives/2018/06/27?at=5b33dbc4ce3b0f268d489bfa
     # TODO there are some (many?) failing tests
     ./eng/cibuild_bootstrapped_msbuild.sh --host_type mono --configuration Release --skip_tests /p:DisableNerdbankVersioning=true
+    patchShebangs stage1/mono-msbuild/msbuild
   '';
 
   installPhase = ''
-    mono artifacts/mono-msbuild/MSBuild.dll mono/build/install.proj /p:MonoInstallPrefix="$out" /p:Configuration=Release-MONO
+    stage1/mono-msbuild/msbuild mono/build/install.proj /p:MonoInstallPrefix="$out" /p:Configuration=Release-MONO
 
-    ln -s ${mono}/lib/mono/msbuild/Current/bin/Roslyn $out/lib/mono/msbuild/Current/bin/Roslyn
+    ln -s ${roslyn}/lib/dotnet/microsoft.net.compilers.toolset/*/tasks/net472 $out/lib/mono/msbuild/Current/bin/Roslyn
 
     makeWrapper ${mono}/bin/mono $out/bin/msbuild \
-      --set MSBuildExtensionsPath $out/lib/mono/xbuild \
       --set-default MONO_GC_PARAMS "nursery-size=64m" \
       --add-flags "$out/lib/mono/msbuild/15.0/bin/MSBuild.dll"
+
+    ln -s $(find ${dotnet-sdk} -name libhostfxr.so) $out/lib/mono/msbuild/Current/bin/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/
   '';
 
   doInstallCheck = true;
@@ -122,7 +139,7 @@ EOF
     ${mono}/bin/mono Helloworld.exe | grep "Hello, world!"
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Mono version of Microsoft Build Engine, the build platform for .NET, and Visual Studio";
     homepage = "https://github.com/mono/msbuild";
     license = licenses.mit;
@@ -130,4 +147,3 @@ EOF
     platforms = platforms.unix;
   };
 }
-
diff --git a/pkgs/development/tools/build-managers/msbuild/deps.nix b/pkgs/development/tools/build-managers/msbuild/deps.nix
new file mode 100644
index 00000000000..32d1c9569a6
--- /dev/null
+++ b/pkgs/development/tools/build-managers/msbuild/deps.nix
@@ -0,0 +1,1562 @@
+{ fetchurl }: [
+  {
+    name = "fsharp.net.sdk";
+    version = "1.0.4-bundled-0100";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/fsharp.net.sdk/1.0.4-bundled-0100/fsharp.net.sdk.1.0.4-bundled-0100.nupkg";
+      sha256 = "0zy4n2an2jh3xrdy1m5fjvynpd0b66i0hkpqdhy2q6d7dj0ks351";
+    };
+  }
+  {
+    name = "illink.tasks";
+    version = "0.1.6-prerelease.19380.1";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/illink.tasks/0.1.6-prerelease.19380.1/illink.tasks.0.1.6-prerelease.19380.1.nupkg";
+      sha256 = "1ihgzhizgiijg2kj38fn6hsinvxi7bvl0dpk7mbgc08rpgfdsvja";
+    };
+  }
+  {
+    name = "largeaddressaware";
+    version = "1.0.3";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/largeaddressaware/1.0.3/largeaddressaware.1.0.3.nupkg";
+      sha256 = "1ppss9bgj0hf5s8307bnm2a4qm10mrymp0v12m28a5q81zjz0fr5";
+    };
+  }
+  {
+    name = "microbuild.core";
+    version = "0.2.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microbuild.core/0.2.0/microbuild.core.0.2.0.nupkg";
+      sha256 = "1ya040l8fhi0hhira8kwdmv7cc88ar7kiixkpxirgcn9gmpn7ggv";
+    };
+  }
+  {
+    name = "microbuild.core.sentinel";
+    version = "1.0.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microbuild.core.sentinel/1.0.0/microbuild.core.sentinel.1.0.0.nupkg";
+      sha256 = "035kqx5fkapql108n222lz8psvxk04mv3dy1qg3h08i4b8j3dy8i";
+    };
+  }
+  {
+    name = "microsoft.bcl.asyncinterfaces";
+    version = "1.1.0";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/microsoft.bcl.asyncinterfaces/1.1.0/microsoft.bcl.asyncinterfaces.1.1.0.nupkg";
+      sha256 = "1dq5yw7cy6s42193yl4iqscfw5vzkjkgv0zyy32scr4jza6ni1a1";
+    };
+  }
+  {
+    name = "microsoft.build";
+    version = "14.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.build/14.3.0/microsoft.build.14.3.0.nupkg";
+      sha256 = "16jzspb0qj9szjfhhmb836vgqdq4m1gk3y816qg2mdjmv52r91dh";
+    };
+  }
+  {
+    name = "microsoft.build.centralpackageversions";
+    version = "2.0.1";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/microsoft.build.centralpackageversions/2.0.1/microsoft.build.centralpackageversions.2.0.1.nupkg";
+      sha256 = "17cjiaj2b98q8s89168g42jb8rhwm6062jcbv57rbkdiiwdsn55k";
+    };
+  }
+  {
+    name = "microsoft.build.framework";
+    version = "14.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.build.framework/14.3.0/microsoft.build.framework.14.3.0.nupkg";
+      sha256 = "19p1w27d3qi09fxag0byvjrv6x54nd5fkiszqzqr7676r90aswxh";
+    };
+  }
+  {
+    name = "microsoft.build.framework";
+    version = "15.5.180";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/microsoft.build.framework/15.5.180/microsoft.build.framework.15.5.180.nupkg";
+      sha256 = "064y3a711ikx9pm9d2wyms4i3k4f9hfvn3vymhwygg7yv7gcj92z";
+    };
+  }
+  {
+    name = "microsoft.build.nugetsdkresolver";
+    version = "5.7.0-rtm.6710";
+    src = fetchurl {
+      url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/microsoft.build.nugetsdkresolver/5.7.0-rtm.6710/microsoft.build.nugetsdkresolver.5.7.0-rtm.6710.nupkg";
+      sha256 = "07zi6akd5iqq6q3cwc273vvfx70dn2lzx1ham4pzlq7dh7gq3vha";
+    };
+  }
+  {
+    name = "microsoft.build.tasks.git";
+    version = "1.1.0-beta-20206-02";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.build.tasks.git/1.1.0-beta-20206-02/microsoft.build.tasks.git.1.1.0-beta-20206-02.nupkg";
+      sha256 = "1gwlhvqlkvs5c7qjky726alf71xflbh3x970g3dypfczi0y6gccx";
+    };
+  }
+  {
+    name = "microsoft.build.utilities.core";
+    version = "14.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.build.utilities.core/14.3.0/microsoft.build.utilities.core.14.3.0.nupkg";
+      sha256 = "0xk5n4i40w53amrd7bxlhikdvmh8z2anrk99pvz2rf50v946g6li";
+    };
+  }
+  {
+    name = "microsoft.build.utilities.core";
+    version = "15.5.180";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/microsoft.build.utilities.core/15.5.180/microsoft.build.utilities.core.15.5.180.nupkg";
+      sha256 = "0c4bjhaqgc98bchln8p5d2p1vyn8qrha2b8gpn2l7bnznbcrd630";
+    };
+  }
+  {
+    name = "microsoft.codeanalysis.build.tasks";
+    version = "3.0.0-beta3-19064-03";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.codeanalysis.build.tasks/3.0.0-beta3-19064-03/microsoft.codeanalysis.build.tasks.3.0.0-beta3-19064-03.nupkg";
+      sha256 = "1l01l0jyqgs8ix5v6b6n0q4yv1y1khr14dh7pw0qivkc5gsys19v";
+    };
+  }
+  {
+    name = "microsoft.codecoverage";
+    version = "16.1.1";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/microsoft.codecoverage/16.1.1/microsoft.codecoverage.16.1.1.nupkg";
+      sha256 = "0xca3sys0a5ilz16ic7g4gds2b974nvmf89qwr1i6v8f7illhda5";
+    };
+  }
+  {
+    name = "microsoft.diasymreader.pdb2pdb";
+    version = "1.1.0-beta2-19521-03";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.diasymreader.pdb2pdb/1.1.0-beta2-19521-03/microsoft.diasymreader.pdb2pdb.1.1.0-beta2-19521-03.nupkg";
+      sha256 = "1r82h0qiah2xx9rg8lvfvfdzxz60zd6vfs8kvck0csha5psmn56w";
+    };
+  }
+  {
+    name = "microsoft.dotnet.arcade.sdk";
+    version = "1.0.0-beta.20365.6";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.dotnet.arcade.sdk/1.0.0-beta.20365.6/microsoft.dotnet.arcade.sdk.1.0.0-beta.20365.6.nupkg";
+      sha256 = "1ypsxq3ljdfwvrqyg6b8ii8mbqnjcb2vdr17jc4h0mdmkj0rlcdl";
+    };
+  }
+  {
+    name = "microsoft.dotnet.msbuildsdkresolver";
+    version = "3.1.400-preview.20365.4";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.dotnet.msbuildsdkresolver/3.1.400-preview.20365.4/microsoft.dotnet.msbuildsdkresolver.3.1.400-preview.20365.4.nupkg";
+      sha256 = "0ifhk0whgbq0yw075al8sb14ajcnvyp883srx1j62vil9gfz0fp9";
+    };
+  }
+  {
+    name = "microsoft.dotnet.signtool";
+    version = "1.0.0-beta.20365.6";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.dotnet.signtool/1.0.0-beta.20365.6/microsoft.dotnet.signtool.1.0.0-beta.20365.6.nupkg";
+      sha256 = "0zaw9hc19ldms3jy6n27x4p9clzz3nvpddyacwhgqiahjw2wqasz";
+    };
+  }
+  {
+    name = "microsoft.net.build.extensions";
+    version = "3.1.400-preview.20365.20";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.net.build.extensions/3.1.400-preview.20365.20/microsoft.net.build.extensions.3.1.400-preview.20365.20.nupkg";
+      sha256 = "1vmcj7p7jsr1lbkbxqqjsixkaxdazr5nwhhp1q402dgky9cayhd5";
+    };
+  }
+  {
+    name = "microsoft.net.compilers.toolset";
+    version = "3.7.0-5.20367.1";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.net.compilers.toolset/3.7.0-5.20367.1/microsoft.net.compilers.toolset.3.7.0-5.20367.1.nupkg";
+      sha256 = "1z8hzzmxs8jchq1jmmmwhpf3hsvrj803y3zb8j3xg9xkbnryfzwk";
+    };
+  }
+  {
+    name = "microsoft.netcore.platforms";
+    version = "1.0.1";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/microsoft.netcore.platforms/1.0.1/microsoft.netcore.platforms.1.0.1.nupkg";
+      sha256 = "01al6cfxp68dscl15z7rxfw9zvhm64dncsw09a1vmdkacsa2v6lr";
+    };
+  }
+  {
+    name = "microsoft.netcore.platforms";
+    version = "1.1.0";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/microsoft.netcore.platforms/1.1.0/microsoft.netcore.platforms.1.1.0.nupkg";
+      sha256 = "08vh1r12g6ykjygq5d3vq09zylgb84l63k49jc4v8faw9g93iqqm";
+    };
+  }
+  {
+    name = "microsoft.netcore.targets";
+    version = "1.0.1";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.netcore.targets/1.0.1/microsoft.netcore.targets.1.0.1.nupkg";
+      sha256 = "1gn085ddzn8psqfhmwcjzq2zrmb5gca2liap79a43wyw4gs8ip78";
+    };
+  }
+  {
+    name = "microsoft.netcore.targets";
+    version = "1.1.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.netcore.targets/1.1.0/microsoft.netcore.targets.1.1.0.nupkg";
+      sha256 = "0idlsfwd9sn4p9jr1dqi14b8n2ly0k4dnjpvh8jfhxgnzzl98z5k";
+    };
+  }
+  {
+    name = "microsoft.netframework.referenceassemblies";
+    version = "1.0.0";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/microsoft.netframework.referenceassemblies/1.0.0/microsoft.netframework.referenceassemblies.1.0.0.nupkg";
+      sha256 = "0na724xhvqm63vq9y18fl9jw9q2v99bdwr353378s5fsi11qzxp9";
+    };
+  }
+  {
+    name = "microsoft.netframework.referenceassemblies.net472";
+    version = "1.0.0";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/microsoft.netframework.referenceassemblies.net472/1.0.0/microsoft.netframework.referenceassemblies.net472.1.0.0.nupkg";
+      sha256 = "1bqinq2nxnpqxziypg1sqy3ly0nymxxjpn8fwkn3rl4vl6gdg3rc";
+    };
+  }
+  {
+    name = "microsoft.net.sdk";
+    version = "3.1.400-preview.20365.20";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.net.sdk/3.1.400-preview.20365.20/microsoft.net.sdk.3.1.400-preview.20365.20.nupkg";
+      sha256 = "02ann6rsnc6wl84wsk2fz7dpxcp5sq0b6jm3vv23av4b1f86f82y";
+    };
+  }
+  {
+    name = "microsoft.net.sdk.publish";
+    version = "3.1.300-servicing.20216.7";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.net.sdk.publish/3.1.300-servicing.20216.7/microsoft.net.sdk.publish.3.1.300-servicing.20216.7.nupkg";
+      sha256 = "1xivqihp2zrkmd4f65fgh9hn9ix75sqklbnanqlfk9dq67wscp41";
+    };
+  }
+  {
+    name = "microsoft.net.sdk.razor";
+    version = "3.1.6";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/microsoft.net.sdk.razor/3.1.6/microsoft.net.sdk.razor.3.1.6.nupkg";
+      sha256 = "1vw0zi0lq52frivq8mgfvm79rfx0v492q6fci1jls1zwwjk0v9ia";
+    };
+  }
+  {
+    name = "microsoft.net.sdk.web";
+    version = "3.1.300-servicing.20216.7";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.net.sdk.web/3.1.300-servicing.20216.7/microsoft.net.sdk.web.3.1.300-servicing.20216.7.nupkg";
+      sha256 = "001jd2iwww0vb5x5dii915z82syh1aj48n62bn8zi1d3chwacr51";
+    };
+  }
+  {
+    name = "microsoft.net.sdk.web.projectsystem";
+    version = "3.1.300-servicing.20216.7";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.net.sdk.web.projectsystem/3.1.300-servicing.20216.7/microsoft.net.sdk.web.projectsystem.3.1.300-servicing.20216.7.nupkg";
+      sha256 = "0601mix6l18h8afxxgdbbv695d0sjskady209z52sf4bvf4h4kal";
+    };
+  }
+  {
+    name = "microsoft.net.test.sdk";
+    version = "16.1.1";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/microsoft.net.test.sdk/16.1.1/microsoft.net.test.sdk.16.1.1.nupkg";
+      sha256 = "13mcqv85yf4f1rx06sz5ff4pcmbr4rkgqkqzmwl8ywadbh523125";
+    };
+  }
+  {
+    name = "microsoft.sourcelink.azurerepos.git";
+    version = "1.1.0-beta-20206-02";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.sourcelink.azurerepos.git/1.1.0-beta-20206-02/microsoft.sourcelink.azurerepos.git.1.1.0-beta-20206-02.nupkg";
+      sha256 = "00hfjh8d3z5np51qgr1s3q4j7bl34mfiypf7nbxcmxa7cyj0rg65";
+    };
+  }
+  {
+    name = "microsoft.sourcelink.common";
+    version = "1.1.0-beta-20206-02";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.sourcelink.common/1.1.0-beta-20206-02/microsoft.sourcelink.common.1.1.0-beta-20206-02.nupkg";
+      sha256 = "1qv0k0apxv3j1pccki2rzakjfb0868hmg0968da0639f75s3glr9";
+    };
+  }
+  {
+    name = "microsoft.sourcelink.github";
+    version = "1.1.0-beta-20206-02";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.sourcelink.github/1.1.0-beta-20206-02/microsoft.sourcelink.github.1.1.0-beta-20206-02.nupkg";
+      sha256 = "0q1mgjjkwxvzn5v29pqiyg0j0jwi5qc0q04za9k1x138kliq2iba";
+    };
+  }
+  {
+    name = "microsoft.visualstudio.sdk.embedinteroptypes";
+    version = "15.0.15";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.sdk.embedinteroptypes/15.0.15/microsoft.visualstudio.sdk.embedinteroptypes.15.0.15.nupkg";
+      sha256 = "0chr3slzzcanwcyd9isx4gichqzmfh4zd3h83piw0r4xsww1wmpd";
+    };
+  }
+  {
+    name = "microsoft.visualstudio.setup.configuration.interop";
+    version = "1.16.30";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/microsoft.visualstudio.setup.configuration.interop/1.16.30/microsoft.visualstudio.setup.configuration.interop.1.16.30.nupkg";
+      sha256 = "14022lx03vdcqlvbbdmbsxg5pqfx1rfq2jywxlyaz9v68cvsb0g4";
+    };
+  }
+  {
+    name = "microsoft.web.xdt";
+    version = "2.1.2";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/microsoft.web.xdt/2.1.2/microsoft.web.xdt.2.1.2.nupkg";
+      sha256 = "1as6cih26xyxjsa5ibqik1fwbyxl58ivpngidr6w1nh5fi5zg9zw";
+    };
+  }
+  {
+    name = "microsoft.win32.primitives";
+    version = "4.0.1";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.win32.primitives/4.0.1/microsoft.win32.primitives.4.0.1.nupkg";
+      sha256 = "1pviskapkc6qm108r0q2x15vkgyqsczf9xpmrlm42q68ainc9ai3";
+    };
+  }
+  {
+    name = "microsoft.win32.primitives";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.win32.primitives/4.3.0/microsoft.win32.primitives.4.3.0.nupkg";
+      sha256 = "1nvwzj039y9ngdpz7zg0vszvrr3za2vfmjg222jc8c1dibk6y6ah";
+    };
+  }
+  {
+    name = "netstandard.library";
+    version = "1.6.1";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/netstandard.library/1.6.1/netstandard.library.1.6.1.nupkg";
+      sha256 = "03pxpc6dzpw56l8qhcb0wzvirqgs3c008jcakqxvfqmy25m3dnyn";
+    };
+  }
+  {
+    name = "newtonsoft.json";
+    version = "9.0.1";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/newtonsoft.json/9.0.1/newtonsoft.json.9.0.1.nupkg";
+      sha256 = "1qayanmqh3xiw0bjwm825j1n6nvbhc6yqkdpaawpyd0l71d5qh13";
+    };
+  }
+  {
+    name = "nuget.build.tasks";
+    version = "5.7.0-rtm.6710";
+    src = fetchurl {
+      url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/nuget.build.tasks/5.7.0-rtm.6710/nuget.build.tasks.5.7.0-rtm.6710.nupkg";
+      sha256 = "0zwacvci3y8xyhy6jzc0wd20rzgb6lzv0ci8a4qg8ay315bmd9sp";
+    };
+  }
+  {
+    name = "nuget.build.tasks.pack";
+    version = "5.7.0-rtm.6710";
+    src = fetchurl {
+      url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/nuget.build.tasks.pack/5.7.0-rtm.6710/nuget.build.tasks.pack.5.7.0-rtm.6710.nupkg";
+      sha256 = "16scfs0gwfs9r5kp65jfz3ip7w56xyni6fwgpmj0y6dbazzqm6zs";
+    };
+  }
+  {
+    name = "nuget.commandline";
+    version = "4.1.0";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/nuget.commandline/4.1.0/nuget.commandline.4.1.0.nupkg";
+      sha256 = "03ik0rcdl7vdwxa9fx5cgl98yzb45swr08jmrnjk1ympjqvf94s1";
+    };
+  }
+  {
+    name = "nuget.commands";
+    version = "5.7.0-rtm.6710";
+    src = fetchurl {
+      url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/nuget.commands/5.7.0-rtm.6710/nuget.commands.5.7.0-rtm.6710.nupkg";
+      sha256 = "0sm2x95q8y0sab7fsb2sqqhvw2x0scsavv968jxjf3ynb5n155q3";
+    };
+  }
+  {
+    name = "nuget.common";
+    version = "5.7.0-rtm.6710";
+    src = fetchurl {
+      url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/nuget.common/5.7.0-rtm.6710/nuget.common.5.7.0-rtm.6710.nupkg";
+      sha256 = "07wxir208mmfzi2xxhn8xskbchx9d7nahmy2xqcx09mwkkr7m0qg";
+    };
+  }
+  {
+    name = "nuget.configuration";
+    version = "5.7.0-rtm.6710";
+    src = fetchurl {
+      url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/nuget.configuration/5.7.0-rtm.6710/nuget.configuration.5.7.0-rtm.6710.nupkg";
+      sha256 = "1h9r627nj3bhwfwzf2b265s5zl00sj5z5x085a6l8qg2v8sig628";
+    };
+  }
+  {
+    name = "nuget.credentials";
+    version = "5.7.0-rtm.6710";
+    src = fetchurl {
+      url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/nuget.credentials/5.7.0-rtm.6710/nuget.credentials.5.7.0-rtm.6710.nupkg";
+      sha256 = "06yd4ny5nzpxl6n3l57n585inj0bjybcmwcz0w3clyib9l2ybsjz";
+    };
+  }
+  {
+    name = "nuget.dependencyresolver.core";
+    version = "5.7.0-rtm.6710";
+    src = fetchurl {
+      url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/nuget.dependencyresolver.core/5.7.0-rtm.6710/nuget.dependencyresolver.core.5.7.0-rtm.6710.nupkg";
+      sha256 = "0s3qlwg98qd5brfh6k9lsviqpij8n73ci54c9bmal56k12hkvfdm";
+    };
+  }
+  {
+    name = "nuget.frameworks";
+    version = "5.7.0-rtm.6710";
+    src = fetchurl {
+      url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/nuget.frameworks/5.7.0-rtm.6710/nuget.frameworks.5.7.0-rtm.6710.nupkg";
+      sha256 = "05g4aaq3gc1p104dpanr255xcag399918m02vpanf29qpz3g325d";
+    };
+  }
+  {
+    name = "nuget.librarymodel";
+    version = "5.7.0-rtm.6710";
+    src = fetchurl {
+      url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/nuget.librarymodel/5.7.0-rtm.6710/nuget.librarymodel.5.7.0-rtm.6710.nupkg";
+      sha256 = "1pj5y29f21ch4sgwg5xx4n0lsd1qiiyjy6ly6vaabfrimx4d0s23";
+    };
+  }
+  {
+    name = "nuget.packagemanagement";
+    version = "5.7.0-rtm.6710";
+    src = fetchurl {
+      url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/nuget.packagemanagement/5.7.0-rtm.6710/nuget.packagemanagement.5.7.0-rtm.6710.nupkg";
+      sha256 = "1kiix6r2birnrlwki5mb5a7sbxh8wqj87f69qid6dr556x2w8h9z";
+    };
+  }
+  {
+    name = "nuget.packaging";
+    version = "5.7.0-rtm.6710";
+    src = fetchurl {
+      url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/nuget.packaging/5.7.0-rtm.6710/nuget.packaging.5.7.0-rtm.6710.nupkg";
+      sha256 = "16frbw8k81cazary6d8sbdccr6hv57rc7rzdi9bagdnzvpm8h13l";
+    };
+  }
+  {
+    name = "nuget.projectmodel";
+    version = "5.7.0-rtm.6710";
+    src = fetchurl {
+      url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/nuget.projectmodel/5.7.0-rtm.6710/nuget.projectmodel.5.7.0-rtm.6710.nupkg";
+      sha256 = "11i1kyqvmq70rkqrxhxnhsihaxx32ww0l9175473mmyia3wrbwyw";
+    };
+  }
+  {
+    name = "nuget.protocol";
+    version = "5.7.0-rtm.6710";
+    src = fetchurl {
+      url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/nuget.protocol/5.7.0-rtm.6710/nuget.protocol.5.7.0-rtm.6710.nupkg";
+      sha256 = "1515p7a4kdm9wr8iizcmvzwqphxsfwqbnq41jv8mibrx7vih0s90";
+    };
+  }
+  {
+    name = "nuget.resolver";
+    version = "5.7.0-rtm.6710";
+    src = fetchurl {
+      url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/nuget.resolver/5.7.0-rtm.6710/nuget.resolver.5.7.0-rtm.6710.nupkg";
+      sha256 = "17bm159knhx7iznm9ilk3mwb0n1gh1dp0ihhapyb1fmh9ings30b";
+    };
+  }
+  {
+    name = "nuget.versioning";
+    version = "5.7.0-rtm.6710";
+    src = fetchurl {
+      url = "https://pkgs.dev.azure.com/dnceng/9ee6d478-d288-47f7-aacc-f6e6d082ae6d/_packaging/9d15d80a-6afc-4f7e-901b-9378146a4b8b/nuget/v3/flat2/nuget.versioning/5.7.0-rtm.6710/nuget.versioning.5.7.0-rtm.6710.nupkg";
+      sha256 = "1kj9xvcbwvvhhi45bi6f9m1cv8wx6y4xfmnxc8liwcgwh9gvwdjl";
+    };
+  }
+  {
+    name = "runtime.debian.8-x64.runtime.native.system.security.cryptography.openssl";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/runtime.debian.8-x64.runtime.native.system.security.cryptography.openssl/4.3.0/runtime.debian.8-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg";
+      sha256 = "10a3jqkh1h23qsn7pjlji61d7dph7qy8c6ssfjqmlgydm4rnin64";
+    };
+  }
+  {
+    name = "runtime.fedora.23-x64.runtime.native.system.security.cryptography.openssl";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/runtime.fedora.23-x64.runtime.native.system.security.cryptography.openssl/4.3.0/runtime.fedora.23-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg";
+      sha256 = "1md38ys5h8srinnq9qxz47c9i27x7pv84avdi3rbq68hfkcslx93";
+    };
+  }
+  {
+    name = "runtime.fedora.24-x64.runtime.native.system.security.cryptography.openssl";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/runtime.fedora.24-x64.runtime.native.system.security.cryptography.openssl/4.3.0/runtime.fedora.24-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg";
+      sha256 = "0cgvqxccg4lkxiyvw3jrn71pbybbbcd3i8v6v4przgrr7f7k6nfj";
+    };
+  }
+  {
+    name = "runtime.native.system";
+    version = "4.0.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/runtime.native.system/4.0.0/runtime.native.system.4.0.0.nupkg";
+      sha256 = "0fwsjhqj235hhy2zl8x3a828whn4nck7jr7hi09ccbk24xf4f17f";
+    };
+  }
+  {
+    name = "runtime.native.system";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/runtime.native.system/4.3.0/runtime.native.system.4.3.0.nupkg";
+      sha256 = "02gnfm33gf163kybkahfza8q10jp890hiczcnbg2aasf1n0jq857";
+    };
+  }
+  {
+    name = "runtime.native.system.io.compression";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/runtime.native.system.io.compression/4.3.0/runtime.native.system.io.compression.4.3.0.nupkg";
+      sha256 = "05370qi83pxfyn3whzkjjwb4q80vlr3mbz0dfa0hc0cbl5jx4y20";
+    };
+  }
+  {
+    name = "runtime.native.system.security.cryptography.openssl";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/runtime.native.system.security.cryptography.openssl/4.3.0/runtime.native.system.security.cryptography.openssl.4.3.0.nupkg";
+      sha256 = "1il7m43j4nq15xf01npgxd8q83q8mkk4xk07dd7g0sfsxm9k127d";
+    };
+  }
+  {
+    name = "runtime.opensuse.13.2-x64.runtime.native.system.security.cryptography.openssl";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/runtime.opensuse.13.2-x64.runtime.native.system.security.cryptography.openssl/4.3.0/runtime.opensuse.13.2-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg";
+      sha256 = "1pr8ji41rsifx6yh89xg1yw45g5snw96xxqw0g3q48rbdg5j79iw";
+    };
+  }
+  {
+    name = "runtime.opensuse.42.1-x64.runtime.native.system.security.cryptography.openssl";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/runtime.opensuse.42.1-x64.runtime.native.system.security.cryptography.openssl/4.3.0/runtime.opensuse.42.1-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg";
+      sha256 = "1r8hllb6fdb4adij7b7ld32hf5r5jxyqh4pacrvfgjckmyx8js8c";
+    };
+  }
+  {
+    name = "runtime.osx.10.10-x64.runtime.native.system.security.cryptography.openssl";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/runtime.osx.10.10-x64.runtime.native.system.security.cryptography.openssl/4.3.0/runtime.osx.10.10-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg";
+      sha256 = "16r149hajvr8ikyjbsw2m67yqfvxg6j1sb2slw9pzrly06mxmpks";
+    };
+  }
+  {
+    name = "runtime.rhel.7-x64.runtime.native.system.security.cryptography.openssl";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/runtime.rhel.7-x64.runtime.native.system.security.cryptography.openssl/4.3.0/runtime.rhel.7-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg";
+      sha256 = "0j2f2v1nm7sys6qpljhp4s18zz3hblymjl60yrccqfac7yr9hxrq";
+    };
+  }
+  {
+    name = "runtime.ubuntu.14.04-x64.runtime.native.system.security.cryptography.openssl";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/runtime.ubuntu.14.04-x64.runtime.native.system.security.cryptography.openssl/4.3.0/runtime.ubuntu.14.04-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg";
+      sha256 = "0wgz0y2fm6xcnlmpl1zh5963ribjbnzr2l6prsw3xi7sbfyjyi8c";
+    };
+  }
+  {
+    name = "runtime.ubuntu.16.04-x64.runtime.native.system.security.cryptography.openssl";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/runtime.ubuntu.16.04-x64.runtime.native.system.security.cryptography.openssl/4.3.0/runtime.ubuntu.16.04-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg";
+      sha256 = "0qr13ykxj7zs7i8z0x63v8za2h33ndnvvw83wffp9xbb2fibj3gi";
+    };
+  }
+  {
+    name = "runtime.ubuntu.16.10-x64.runtime.native.system.security.cryptography.openssl";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/runtime.ubuntu.16.10-x64.runtime.native.system.security.cryptography.openssl/4.3.0/runtime.ubuntu.16.10-x64.runtime.native.system.security.cryptography.openssl.4.3.0.nupkg";
+      sha256 = "1jg8gfh261zqmimf5ba76djr201q0bamm2385zxni5jnyyc4iis4";
+    };
+  }
+  {
+    name = "shouldly";
+    version = "3.0.0";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/shouldly/3.0.0/shouldly.3.0.0.nupkg";
+      sha256 = "1hg28w898kl84rx57sclb2z9b76v5hxlwxig1xnb6fr81aahzlw3";
+    };
+  }
+  {
+    name = "sn";
+    version = "1.0.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/sn/1.0.0/sn.1.0.0.nupkg";
+      sha256 = "1012fcdc6vq2355v86h434s6p2nnqgpdapb7p25l4h39g5q8p1qs";
+    };
+  }
+  {
+    name = "system.appcontext";
+    version = "4.1.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.appcontext/4.1.0/system.appcontext.4.1.0.nupkg";
+      sha256 = "02vsx9l8ahzykjw6psf8yd5grndk63x4rw0lc0rl0s9z203694j3";
+    };
+  }
+  {
+    name = "system.appcontext";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.appcontext/4.3.0/system.appcontext.4.3.0.nupkg";
+      sha256 = "1ipqwwfphj4ndi6krnbali0f3260bmdg0lb9w7w00k3z20gwpjgy";
+    };
+  }
+  {
+    name = "system.buffers";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.buffers/4.3.0/system.buffers.4.3.0.nupkg";
+      sha256 = "1x5m2z3x8s4d0z13l8j6jfbaqpwh8dwyg930pcg67gz88zchfhq8";
+    };
+  }
+  {
+    name = "system.buffers";
+    version = "4.4.0";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/system.buffers/4.4.0/system.buffers.4.4.0.nupkg";
+      sha256 = "183f8063w8zqn99pv0ni0nnwh7fgx46qzxamwnans55hhs2l0g19";
+    };
+  }
+  {
+    name = "system.buffers";
+    version = "4.5.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.buffers/4.5.0/system.buffers.4.5.0.nupkg";
+      sha256 = "0c8qh10lhc8gcl58772i91lc97bljy3dvi6s2r8cjlf0240j5yll";
+    };
+  }
+  {
+    name = "system.collections";
+    version = "4.0.11";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.collections/4.0.11/system.collections.4.0.11.nupkg";
+      sha256 = "19kjsnpbpznh7qjsyxadw2i8pd4iikrlxwak12l749sli2qd77dj";
+    };
+  }
+  {
+    name = "system.collections";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.collections/4.3.0/system.collections.4.3.0.nupkg";
+      sha256 = "0209rky2iyiyqxg0amhmvy6c3fww6pbrq9ffynjnmapizmsvq7ya";
+    };
+  }
+  {
+    name = "system.collections.concurrent";
+    version = "4.0.12";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.collections.concurrent/4.0.12/system.collections.concurrent.4.0.12.nupkg";
+      sha256 = "1c4lv39n2i7k146njgk7334izcxjn06cnhmippc1vhwj3bqbzg62";
+    };
+  }
+  {
+    name = "system.collections.concurrent";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.collections.concurrent/4.3.0/system.collections.concurrent.4.3.0.nupkg";
+      sha256 = "0y6jag332kgkj392mrv7i2a3cgc60ff4hl0nx5qw40hq3w2d9j8z";
+    };
+  }
+  {
+    name = "system.collections.immutable";
+    version = "1.2.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.collections.immutable/1.2.0/system.collections.immutable.1.2.0.nupkg";
+      sha256 = "1ywivzq43lqlh42qywq6v57yf499dya5rbzk6k7fnkj1121fr7kw";
+    };
+  }
+  {
+    name = "system.collections.immutable";
+    version = "1.5.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.collections.immutable/1.5.0/system.collections.immutable.1.5.0.nupkg";
+      sha256 = "1yn0g10x5lss68i5n5x9q9z1kbxcbblrwp51ph79cgbi01ga999q";
+    };
+  }
+  {
+    name = "system.collections.nongeneric";
+    version = "4.0.1";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.collections.nongeneric/4.0.1/system.collections.nongeneric.4.0.1.nupkg";
+      sha256 = "1wj1ddyycsggg3sjq0iflzyj93m7ny8mc2dpzvh5iqy89lj3gx1m";
+    };
+  }
+  {
+    name = "system.console";
+    version = "4.0.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.console/4.0.0/system.console.4.0.0.nupkg";
+      sha256 = "0fw0ap3c0svxjbkgr5yrkck36lbrijhsx48v53xkam5y6m0vh1s3";
+    };
+  }
+  {
+    name = "system.console";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.console/4.3.0/system.console.4.3.0.nupkg";
+      sha256 = "0hyp57lqq986hnj7h017mz1qa1p3qqw3n98nxngdj947ck4mwmpd";
+    };
+  }
+  {
+    name = "system.diagnostics.debug";
+    version = "4.0.11";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.diagnostics.debug/4.0.11/system.diagnostics.debug.4.0.11.nupkg";
+      sha256 = "0j4czvcp72qamsj8irwg0sv5lqil4g6q1ghqsm40g5f3380fxcn3";
+    };
+  }
+  {
+    name = "system.diagnostics.debug";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.diagnostics.debug/4.3.0/system.diagnostics.debug.4.3.0.nupkg";
+      sha256 = "02az3f9n0sy9hpjqq05dkwa4d4bgyrs57b69byya20zydvyxxm9z";
+    };
+  }
+  {
+    name = "system.diagnostics.diagnosticsource";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.diagnostics.diagnosticsource/4.3.0/system.diagnostics.diagnosticsource.4.3.0.nupkg";
+      sha256 = "0rqi76pqplmk8lzqhwxkkn6ramk56bm66ijg3zki9gzaaqx7fbfk";
+    };
+  }
+  {
+    name = "system.diagnostics.process";
+    version = "4.1.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.diagnostics.process/4.1.0/system.diagnostics.process.4.1.0.nupkg";
+      sha256 = "1fzm5jrfs4awz0qc2yav1assdnx45j5crpva50a4s0l0dnnvf2jh";
+    };
+  }
+  {
+    name = "system.diagnostics.tools";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.diagnostics.tools/4.3.0/system.diagnostics.tools.4.3.0.nupkg";
+      sha256 = "0fmmnsvnjxh4gjw2jjix3f7ndvhdh9h4rb4nbjk285c2rgfp2kyn";
+    };
+  }
+  {
+    name = "system.diagnostics.tracesource";
+    version = "4.0.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.diagnostics.tracesource/4.0.0/system.diagnostics.tracesource.4.0.0.nupkg";
+      sha256 = "0dwq0z7p3jpxp4y9x1k3pglrs572xx5dsp4nmnz5v5wr6a1kdc8l";
+    };
+  }
+  {
+    name = "system.diagnostics.tracing";
+    version = "4.1.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.diagnostics.tracing/4.1.0/system.diagnostics.tracing.4.1.0.nupkg";
+      sha256 = "0lzdnq31spwv2xd9xkf0ph4zlg7bqifcvp1915jk1hb5fjjf1byp";
+    };
+  }
+  {
+    name = "system.diagnostics.tracing";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.diagnostics.tracing/4.3.0/system.diagnostics.tracing.4.3.0.nupkg";
+      sha256 = "0zwc9qk2ig6h74dnn4hxlyhnfchp6yd6hqv39dy0dhp3xagwfqp3";
+    };
+  }
+  {
+    name = "system.globalization";
+    version = "4.0.11";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.globalization/4.0.11/system.globalization.4.0.11.nupkg";
+      sha256 = "04pycnih66s15rbwss94ylm0svfr276ym4w4w14bb9g56dk0wwyy";
+    };
+  }
+  {
+    name = "system.globalization";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.globalization/4.3.0/system.globalization.4.3.0.nupkg";
+      sha256 = "1sydnlnaqmarcfs1cvaa3rpax7qhzd8wd67f74k89lr3k77cagfh";
+    };
+  }
+  {
+    name = "system.globalization.calendars";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.globalization.calendars/4.3.0/system.globalization.calendars.4.3.0.nupkg";
+      sha256 = "1qfa54p7ab2himyry3lf0j85gpz3mx9yj0sy0v2j9i94ndvk1w7c";
+    };
+  }
+  {
+    name = "system.io";
+    version = "4.1.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.io/4.1.0/system.io.4.1.0.nupkg";
+      sha256 = "0drs586wimx7vzwqfdb72k640iz24645cwz053n1f08752bjkzq8";
+    };
+  }
+  {
+    name = "system.io";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.io/4.3.0/system.io.4.3.0.nupkg";
+      sha256 = "1n3qypsgn18pg13vyjcnchz3zbfajdk6swl1wzf0hv6324v8xyd7";
+    };
+  }
+  {
+    name = "system.io.compression";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.io.compression/4.3.0/system.io.compression.4.3.0.nupkg";
+      sha256 = "0mxp384amfdapgsf6fkyf3c5q10jc2yy55v3vim8wq1w8aim1qcf";
+    };
+  }
+  {
+    name = "system.io.compression.zipfile";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.io.compression.zipfile/4.3.0/system.io.compression.zipfile.4.3.0.nupkg";
+      sha256 = "08fbnsgbbnfj7d6k5zdqvm3580iqwrq4qzbnyq6iw9g93kmlyh5p";
+    };
+  }
+  {
+    name = "system.io.filesystem";
+    version = "4.0.1";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.io.filesystem/4.0.1/system.io.filesystem.4.0.1.nupkg";
+      sha256 = "0mp3n5214lzxz7qn2y5k7f2y9qv067xa23bnbyyhpmlkbl3grwc6";
+    };
+  }
+  {
+    name = "system.io.filesystem";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.io.filesystem/4.3.0/system.io.filesystem.4.3.0.nupkg";
+      sha256 = "1p4r4n4minxgir17xh7rwv503fj1zgnm1vb24and7v2n6id4ma61";
+    };
+  }
+  {
+    name = "system.io.filesystem.primitives";
+    version = "4.0.1";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.io.filesystem.primitives/4.0.1/system.io.filesystem.primitives.4.0.1.nupkg";
+      sha256 = "12mspig2fvzhvbdm22yk081lpn7rc45xwwricc5vnaszgjp83gns";
+    };
+  }
+  {
+    name = "system.io.filesystem.primitives";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.io.filesystem.primitives/4.3.0/system.io.filesystem.primitives.4.3.0.nupkg";
+      sha256 = "0s22vnhy6cxyzicipj3937rldxk1znlykakc6j596mjgsmshpfqn";
+    };
+  }
+  {
+    name = "system.linq";
+    version = "4.1.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.linq/4.1.0/system.linq.4.1.0.nupkg";
+      sha256 = "1n404dvsz6p2d18q9k3ip1vyl8ffbsz6xvc2bl2bba9ccpyjhygm";
+    };
+  }
+  {
+    name = "system.linq";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.linq/4.3.0/system.linq.4.3.0.nupkg";
+      sha256 = "1419wbklbn2vliwfy77p759k084h8jp9i3559shbhrzfxjr2fcv9";
+    };
+  }
+  {
+    name = "system.linq.expressions";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.linq.expressions/4.3.0/system.linq.expressions.4.3.0.nupkg";
+      sha256 = "177cz5hgcbq8lpgvdjmkpsx4kr645wpxhbgh3aw3f28nqlmhl70j";
+    };
+  }
+  {
+    name = "system.memory";
+    version = "4.5.3";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.memory/4.5.3/system.memory.4.5.3.nupkg";
+      sha256 = "1igqq2lqrijpbn66w1020cyyqiwy80i9fkqrmalamjmvmyg28p8m";
+    };
+  }
+  {
+    name = "system.net.http";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/system.net.http/4.3.0/system.net.http.4.3.0.nupkg";
+      sha256 = "1i4gc757xqrzflbk7kc5ksn20kwwfjhw9w7pgdkn19y3cgnl302j";
+    };
+  }
+  {
+    name = "system.net.primitives";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.net.primitives/4.3.0/system.net.primitives.4.3.0.nupkg";
+      sha256 = "1zfrz4p3nmz3cnb0i8xwc76175328dfgrlmp3bcwvp5vplv3ncnz";
+    };
+  }
+  {
+    name = "system.net.sockets";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.net.sockets/4.3.0/system.net.sockets.4.3.0.nupkg";
+      sha256 = "026ghgh25lw953aqd83npk856g4bwi6a8y7jc695qj8lb929yp5s";
+    };
+  }
+  {
+    name = "system.numerics.vectors";
+    version = "4.4.0";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/system.numerics.vectors/4.4.0/system.numerics.vectors.4.4.0.nupkg";
+      sha256 = "0rdvma399070b0i46c4qq1h2yvjj3k013sqzkilz4bz5cwmx1rba";
+    };
+  }
+  {
+    name = "system.numerics.vectors";
+    version = "4.5.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.numerics.vectors/4.5.0/system.numerics.vectors.4.5.0.nupkg";
+      sha256 = "1r66gjpvbmgr3216ch2fx9zzd08fb78br4hzblvsvi7wfwp6w7ip";
+    };
+  }
+  {
+    name = "system.objectmodel";
+    version = "4.0.12";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.objectmodel/4.0.12/system.objectmodel.4.0.12.nupkg";
+      sha256 = "06abwzrai4k999qmc8bkcvq26px2ws9gk04c01c1ix9fw02pf546";
+    };
+  }
+  {
+    name = "system.objectmodel";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.objectmodel/4.3.0/system.objectmodel.4.3.0.nupkg";
+      sha256 = "18mryszf4a66a52v9din5wgqiykp0ficl5zl5l9grkrisjnl7jh4";
+    };
+  }
+  {
+    name = "system.private.datacontractserialization";
+    version = "4.1.1";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.private.datacontractserialization/4.1.1/system.private.datacontractserialization.4.1.1.nupkg";
+      sha256 = "1hrbq85s14x7ck6an570z8p7slprlsswxlydz0pdzfmnqwpv0qbi";
+    };
+  }
+  {
+    name = "system.reflection";
+    version = "4.1.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.reflection/4.1.0/system.reflection.4.1.0.nupkg";
+      sha256 = "003bmllpdf35jsbbhgsi4a24rqprdhgjpi3d76jk7sgllbh6p1wj";
+    };
+  }
+  {
+    name = "system.reflection";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.reflection/4.3.0/system.reflection.4.3.0.nupkg";
+      sha256 = "00f1n6r8z6zw3mfhrfg402s6fj95jj9d8z5s62kfmd7pdsnv39xi";
+    };
+  }
+  {
+    name = "system.reflection.emit";
+    version = "4.0.1";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.reflection.emit/4.0.1/system.reflection.emit.4.0.1.nupkg";
+      sha256 = "0s1cpkpnn2x6bicspj1x7z7zlfg1h5iy8mvr5bcq55fgpyf6xin8";
+    };
+  }
+  {
+    name = "system.reflection.emit.ilgeneration";
+    version = "4.0.1";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.reflection.emit.ilgeneration/4.0.1/system.reflection.emit.ilgeneration.4.0.1.nupkg";
+      sha256 = "0q789n72y47jkld2076khan7zz2gm04znpnz0nznin7ykp8aa0ih";
+    };
+  }
+  {
+    name = "system.reflection.emit.lightweight";
+    version = "4.0.1";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.reflection.emit.lightweight/4.0.1/system.reflection.emit.lightweight.4.0.1.nupkg";
+      sha256 = "10hsbdar8vzvq3izv3v8a93rz7brnmrcrcl5c0nvy8vlmdk41jlx";
+    };
+  }
+  {
+    name = "system.reflection.extensions";
+    version = "4.0.1";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.reflection.extensions/4.0.1/system.reflection.extensions.4.0.1.nupkg";
+      sha256 = "1n1gig2nlycrz1rzy1gi56gcw568ibdpnbknjy7gv9i76aw2kvy7";
+    };
+  }
+  {
+    name = "system.reflection.extensions";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.reflection.extensions/4.3.0/system.reflection.extensions.4.3.0.nupkg";
+      sha256 = "020gr3yjb3aa49hm4qyxqrz318ll2rnc8qpcby341ik0gr4ij3wz";
+    };
+  }
+  {
+    name = "system.reflection.metadata";
+    version = "1.6.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.reflection.metadata/1.6.0/system.reflection.metadata.1.6.0.nupkg";
+      sha256 = "1kw4xsm093zd10jf3vjc2lxmv0zq6chi3g8rka8w0d3l3a5hh3ly";
+    };
+  }
+  {
+    name = "system.reflection.primitives";
+    version = "4.0.1";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.reflection.primitives/4.0.1/system.reflection.primitives.4.0.1.nupkg";
+      sha256 = "1r0a1xhlrdr6kdhia9r6rcywds4r8wbk0jagsac6x3rc0kq5f1yi";
+    };
+  }
+  {
+    name = "system.reflection.primitives";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.reflection.primitives/4.3.0/system.reflection.primitives.4.3.0.nupkg";
+      sha256 = "1b10cxizldqk8niyihhxsabfjkyrlnkgf4im038lbxs3pq7a12yl";
+    };
+  }
+  {
+    name = "system.reflection.typeextensions";
+    version = "4.1.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.reflection.typeextensions/4.1.0/system.reflection.typeextensions.4.1.0.nupkg";
+      sha256 = "13y2gvadvzgv5hrizwd53xyciq88p8mpclyqfmikspij4pyb5328";
+    };
+  }
+  {
+    name = "system.resources.extensions";
+    version = "4.6.0";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/system.resources.extensions/4.6.0/system.resources.extensions.4.6.0.nupkg";
+      sha256 = "0inch9jgchgmsg3xjivbhh9mpin40mhdd8dgf4i1p3g42i0hzc0j";
+    };
+  }
+  {
+    name = "system.resources.reader";
+    version = "4.0.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.resources.reader/4.0.0/system.resources.reader.4.0.0.nupkg";
+      sha256 = "0nipl2mayrbgf62mbi3z9crk9hvcrxnry008a33iyk9xy45rmyk1";
+    };
+  }
+  {
+    name = "system.resources.resourcemanager";
+    version = "4.0.1";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.resources.resourcemanager/4.0.1/system.resources.resourcemanager.4.0.1.nupkg";
+      sha256 = "1hjlz6rvr5c7qmvmbv1a338zqjl1dbj0qqidwv9z0ldy4jmg89cy";
+    };
+  }
+  {
+    name = "system.resources.resourcemanager";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.resources.resourcemanager/4.3.0/system.resources.resourcemanager.4.3.0.nupkg";
+      sha256 = "1bi65kd8fps7gncs053pawc0j44pz4wcgdj3jcw7gpjr4j0zyxwi";
+    };
+  }
+  {
+    name = "system.runtime";
+    version = "4.1.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.runtime/4.1.0/system.runtime.4.1.0.nupkg";
+      sha256 = "05n73j0s3qgjnp5w2jxaacn93kpq14cldxncv15v04b3lla30mpr";
+    };
+  }
+  {
+    name = "system.runtime";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.runtime/4.3.0/system.runtime.4.3.0.nupkg";
+      sha256 = "0cffdplihjrivvcayzvz32gmv7yissf2pmyaga4fw7g262rf5mxi";
+    };
+  }
+  {
+    name = "system.runtime.compilerservices.unsafe";
+    version = "4.5.2";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.runtime.compilerservices.unsafe/4.5.2/system.runtime.compilerservices.unsafe.4.5.2.nupkg";
+      sha256 = "0bp6in9qqhprbk85wd0cnfnpjcwdknyyc9rk0891kldx3alnd4h7";
+    };
+  }
+  {
+    name = "system.runtime.compilerservices.unsafe";
+    version = "4.7.0";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/system.runtime.compilerservices.unsafe/4.7.0/system.runtime.compilerservices.unsafe.4.7.0.nupkg";
+      sha256 = "16r6sn4czfjk8qhnz7bnqlyiaaszr0ihinb7mq9zzr1wba257r54";
+    };
+  }
+  {
+    name = "system.runtime.extensions";
+    version = "4.1.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.runtime.extensions/4.1.0/system.runtime.extensions.4.1.0.nupkg";
+      sha256 = "0bms87hf2q90kkfg75ljdk09410fl64326wpvhqgfkgw019704yc";
+    };
+  }
+  {
+    name = "system.runtime.extensions";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.runtime.extensions/4.3.0/system.runtime.extensions.4.3.0.nupkg";
+      sha256 = "18qn6zjvpngda5bd9nrpphwy5lppmkla86jk5bdapz6ar44ic8wy";
+    };
+  }
+  {
+    name = "system.runtime.handles";
+    version = "4.0.1";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.runtime.handles/4.0.1/system.runtime.handles.4.0.1.nupkg";
+      sha256 = "00kzqs5d8gm1ppc13idybcdrr07yk2a7f5bdrb0mw7c1bafjp1px";
+    };
+  }
+  {
+    name = "system.runtime.handles";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.runtime.handles/4.3.0/system.runtime.handles.4.3.0.nupkg";
+      sha256 = "1klsizwincb42v9yl6m9czgqcmxr7a1h1ri687ldqy4w15718adi";
+    };
+  }
+  {
+    name = "system.runtime.interopservices";
+    version = "4.1.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.runtime.interopservices/4.1.0/system.runtime.interopservices.4.1.0.nupkg";
+      sha256 = "1876kwm4ziikya5s75sb1cp23qwdsd7xhlmlb9gaglibzwkd8b9d";
+    };
+  }
+  {
+    name = "system.runtime.interopservices";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.runtime.interopservices/4.3.0/system.runtime.interopservices.4.3.0.nupkg";
+      sha256 = "0l13wfr3y4rq667cyw1rl3bdq24zhs34jwv61piwnv77flwr4brq";
+    };
+  }
+  {
+    name = "system.runtime.interopservices.runtimeinformation";
+    version = "4.0.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.runtime.interopservices.runtimeinformation/4.0.0/system.runtime.interopservices.runtimeinformation.4.0.0.nupkg";
+      sha256 = "05pmsmrjmy3mk4r8xqihc3w7128d4qccjg6wkyd7zc2yq67w7xmg";
+    };
+  }
+  {
+    name = "system.runtime.interopservices.runtimeinformation";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.runtime.interopservices.runtimeinformation/4.3.0/system.runtime.interopservices.runtimeinformation.4.3.0.nupkg";
+      sha256 = "131108h1vnayxx6ms2axinja3sqckb1b8z9v8fjnaf9ix8zvmaxq";
+    };
+  }
+  {
+    name = "system.runtime.numerics";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.runtime.numerics/4.3.0/system.runtime.numerics.4.3.0.nupkg";
+      sha256 = "06i4k2ng909fvlq9dhglgyp0iv5vj6b42vqlsvk2gcn6ssgkq9ya";
+    };
+  }
+  {
+    name = "system.runtime.serialization.primitives";
+    version = "4.1.1";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.runtime.serialization.primitives/4.1.1/system.runtime.serialization.primitives.4.1.1.nupkg";
+      sha256 = "1mqwgsda61xm2p4chcniypnnrahh8l6j8c9j45jd2r0hmrvnsc4k";
+    };
+  }
+  {
+    name = "system.runtime.serialization.xml";
+    version = "4.1.1";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.runtime.serialization.xml/4.1.1/system.runtime.serialization.xml.4.1.1.nupkg";
+      sha256 = "19mwnihzks4l2q73bsg5ylbawxqcji3slzzp0v46v6xvvrq480wq";
+    };
+  }
+  {
+    name = "system.security.cryptography.algorithms";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.security.cryptography.algorithms/4.3.0/system.security.cryptography.algorithms.4.3.0.nupkg";
+      sha256 = "04lfa74ll34fk2r42fkdldvcgjp27i3d5zbxx5bxx1dfpsqhkavv";
+    };
+  }
+  {
+    name = "system.security.cryptography.encoding";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.security.cryptography.encoding/4.3.0/system.security.cryptography.encoding.4.3.0.nupkg";
+      sha256 = "1icdqp1c8f7971h1vkls87m8bdxs7xqg4xs7ygi0x3n56pjbqfpi";
+    };
+  }
+  {
+    name = "system.security.cryptography.primitives";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.security.cryptography.primitives/4.3.0/system.security.cryptography.primitives.4.3.0.nupkg";
+      sha256 = "02dsnjxw9bymk0a2qnnlavpi0jq8832dviblv5f9icmwldridc8y";
+    };
+  }
+  {
+    name = "system.security.cryptography.x509certificates";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.security.cryptography.x509certificates/4.3.0/system.security.cryptography.x509certificates.4.3.0.nupkg";
+      sha256 = "0p02s2k8gcx86ys67ydbgrlnp5q7f073jnlgpliqp4f7d2wiwszd";
+    };
+  }
+  {
+    name = "system.security.principal.windows";
+    version = "4.7.0";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/system.security.principal.windows/4.7.0/system.security.principal.windows.4.7.0.nupkg";
+      sha256 = "1a56ls5a9sr3ya0nr086sdpa9qv0abv31dd6fp27maqa9zclqq5d";
+    };
+  }
+  {
+    name = "system.text.encoding";
+    version = "4.0.11";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.text.encoding/4.0.11/system.text.encoding.4.0.11.nupkg";
+      sha256 = "0q829jqhv2sdggb3xjlbdp65g2670w9gw64q2irdzr47gl7zpzyl";
+    };
+  }
+  {
+    name = "system.text.encoding";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.text.encoding/4.3.0/system.text.encoding.4.3.0.nupkg";
+      sha256 = "04fsaadvsnjz6jmf88n26md9zcmvwgn2dkwqkjvhf5apph8gi44g";
+    };
+  }
+  {
+    name = "system.text.encoding.codepages";
+    version = "4.0.1";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.text.encoding.codepages/4.0.1/system.text.encoding.codepages.4.0.1.nupkg";
+      sha256 = "0ixii299wspn434ccjjv8pcvxww3qjl8257r0dx7myh816v3a9sz";
+    };
+  }
+  {
+    name = "system.text.encoding.extensions";
+    version = "4.0.11";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.text.encoding.extensions/4.0.11/system.text.encoding.extensions.4.0.11.nupkg";
+      sha256 = "15f89w0vwnfp10544wbq0z6fjqn7ig03q3kl16x2pp47rac6yj17";
+    };
+  }
+  {
+    name = "system.text.encoding.extensions";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.text.encoding.extensions/4.3.0/system.text.encoding.extensions.4.3.0.nupkg";
+      sha256 = "1w6jxdkrczxwyw2bbs9ng0zi2nk3paznyhm1vnh5vc8v10k96v98";
+    };
+  }
+  {
+    name = "system.text.encodings.web";
+    version = "4.7.0";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/system.text.encodings.web/4.7.0/system.text.encodings.web.4.7.0.nupkg";
+      sha256 = "0sd3bihfar5rwm6nib4lhyys306nkm02qvk6p6sgzmnlfmma2wn3";
+    };
+  }
+  {
+    name = "system.text.json";
+    version = "4.7.0";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/system.text.json/4.7.0/system.text.json.4.7.0.nupkg";
+      sha256 = "0fp3xrysccm5dkaac4yb51d793vywxks978kkl5x4db9gw29rfdr";
+    };
+  }
+  {
+    name = "system.text.regularexpressions";
+    version = "4.1.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.text.regularexpressions/4.1.0/system.text.regularexpressions.4.1.0.nupkg";
+      sha256 = "1ndgfw99bds4772p7578ylcb4whls76qhiz9a3bh4qy9si48afcv";
+    };
+  }
+  {
+    name = "system.text.regularexpressions";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.text.regularexpressions/4.3.0/system.text.regularexpressions.4.3.0.nupkg";
+      sha256 = "1510mdlfdc42vyp738wvmqdy3sir2yyh5w3da3v5i0ar2c4jn6wi";
+    };
+  }
+  {
+    name = "system.threading";
+    version = "4.0.11";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.threading/4.0.11/system.threading.4.0.11.nupkg";
+      sha256 = "12w6vdai88ldgnv9f71rybwyvlzkk1nr57d7f8cz6rajwliz7h6g";
+    };
+  }
+  {
+    name = "system.threading";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.threading/4.3.0/system.threading.4.3.0.nupkg";
+      sha256 = "1ad1drl7q1f8fmfaq3r2bswg58nbc2y01mrbhlwkv41ij1ij3fz3";
+    };
+  }
+  {
+    name = "system.threading.tasks";
+    version = "4.0.11";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.threading.tasks/4.0.11/system.threading.tasks.4.0.11.nupkg";
+      sha256 = "03gvdi1qk4kyws4sjfl5w3fy9qbrq0d0i72n7a8d59lchm6l9zjk";
+    };
+  }
+  {
+    name = "system.threading.tasks";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.threading.tasks/4.3.0/system.threading.tasks.4.3.0.nupkg";
+      sha256 = "0y0gw9q62dchzhk3fcdcdfhk6c5zr0a6rs34qfdbkgksnva10cm1";
+    };
+  }
+  {
+    name = "system.threading.tasks.dataflow";
+    version = "4.9.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.threading.tasks.dataflow/4.9.0/system.threading.tasks.dataflow.4.9.0.nupkg";
+      sha256 = "01lhdmb9w4h82yaqrqpzvz5cv2b228kj332k2h6nz0qycpjd6b0y";
+    };
+  }
+  {
+    name = "system.threading.tasks.extensions";
+    version = "4.0.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.threading.tasks.extensions/4.0.0/system.threading.tasks.extensions.4.0.0.nupkg";
+      sha256 = "1dxi845z4cd83v2ph7dq9ykf5gxr6gaw9k29wckv5zhx1rjwprfg";
+    };
+  }
+  {
+    name = "system.threading.tasks.extensions";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.threading.tasks.extensions/4.3.0/system.threading.tasks.extensions.4.3.0.nupkg";
+      sha256 = "1dr14m9c2psrvavv74dzwbi09avn0hxmdvr6z03f96mxkrk3cm1d";
+    };
+  }
+  {
+    name = "system.threading.tasks.extensions";
+    version = "4.5.2";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.threading.tasks.extensions/4.5.2/system.threading.tasks.extensions.4.5.2.nupkg";
+      sha256 = "03qkna7pwxaxnxg3ydc1vpjzzrizq55gm7w519gqlmd6yca61vzm";
+    };
+  }
+  {
+    name = "system.threading.tasks.parallel";
+    version = "4.0.1";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.threading.tasks.parallel/4.0.1/system.threading.tasks.parallel.4.0.1.nupkg";
+      sha256 = "00l76cv7yys3ilrpi32xrs8qk45gmliqvmw2w2zxg3h21y6r0xc0";
+    };
+  }
+  {
+    name = "system.threading.thread";
+    version = "4.0.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.threading.thread/4.0.0/system.threading.thread.4.0.0.nupkg";
+      sha256 = "0ay1bjmyk0jv6plj9layh3nhr7lnl5a6gzlqi2pgqglb1s9j1x4s";
+    };
+  }
+  {
+    name = "system.threading.timer";
+    version = "4.0.1";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.threading.timer/4.0.1/system.threading.timer.4.0.1.nupkg";
+      sha256 = "0imrcq43k6ii97xpfkwzsvhs6idvgc6mi5c9p7ah828wbaxqh1my";
+    };
+  }
+  {
+    name = "system.threading.timer";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.threading.timer/4.3.0/system.threading.timer.4.3.0.nupkg";
+      sha256 = "11p4yxkcn2amlxhwipyia38k8glpam5c9l47y5dvjdicg42dgxl8";
+    };
+  }
+  {
+    name = "system.valuetuple";
+    version = "4.5.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.valuetuple/4.5.0/system.valuetuple.4.5.0.nupkg";
+      sha256 = "068v2h0v8873jh3zc06bxcfzch9frggak1s9csyisl7xzwdijsqn";
+    };
+  }
+  {
+    name = "system.xml.readerwriter";
+    version = "4.0.11";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.xml.readerwriter/4.0.11/system.xml.readerwriter.4.0.11.nupkg";
+      sha256 = "04ijmcrb40x08br0fdpxmrm0fw2ahpiqjs9wmrqx38ngf96irb7l";
+    };
+  }
+  {
+    name = "system.xml.readerwriter";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.xml.readerwriter/4.3.0/system.xml.readerwriter.4.3.0.nupkg";
+      sha256 = "1dsj4s5jwjqix52sizyncvrv5p1h9cdnkh5c4a6407s3gkkh4gzw";
+    };
+  }
+  {
+    name = "system.xml.xdocument";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.xml.xdocument/4.3.0/system.xml.xdocument.4.3.0.nupkg";
+      sha256 = "14j57hlnmba6rwjwkxx8yp7rk5zf2dzq5j9f22j84jr0xxf00j2f";
+    };
+  }
+  {
+    name = "system.xml.xmldocument";
+    version = "4.0.1";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.xml.xmldocument/4.0.1/system.xml.xmldocument.4.0.1.nupkg";
+      sha256 = "1x2iz1l482876vjr11vsrl895n1bbaflxbj239dpf5a48p06gq7y";
+    };
+  }
+  {
+    name = "system.xml.xmlserializer";
+    version = "4.0.11";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.xml.xmlserializer/4.0.11/system.xml.xmlserializer.4.0.11.nupkg";
+      sha256 = "0987zp4nskf0dbsl3h4s5m1ianjcc398zmp2b98j4834c45jh0bm";
+    };
+  }
+  {
+    name = "system.xml.xpath";
+    version = "4.3.0";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.xml.xpath/4.3.0/system.xml.xpath.4.3.0.nupkg";
+      sha256 = "0hvn82chjynkixvvk9dy9djqvb0hlkbc2hy00gy27vjhd8i4iqkx";
+    };
+  }
+  {
+    name = "vswhere";
+    version = "2.6.7";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/vswhere/2.6.7/vswhere.2.6.7.nupkg";
+      sha256 = "0h4k5i96p7633zzf4xsv7615f9x72rr5qr7b9934ri2y6gshfcwk";
+    };
+  }
+  {
+    name = "xlifftasks";
+    version = "1.0.0-beta.20206.1";
+    src = fetchurl {
+      url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/xlifftasks/1.0.0-beta.20206.1/xlifftasks.1.0.0-beta.20206.1.nupkg";
+      sha256 = "0xsfzws7rn9sfk4mgkbil21m8d3k3kccfk5f4g6lzvc1vk0pa26j";
+    };
+  }
+  {
+    name = "xunit";
+    version = "2.4.1";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/xunit/2.4.1/xunit.2.4.1.nupkg";
+      sha256 = "0xf3kaywpg15flqaqfgywqyychzk15kz0kz34j21rcv78q9ywq20";
+    };
+  }
+  {
+    name = "xunit.abstractions";
+    version = "2.0.3";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/xunit.abstractions/2.0.3/xunit.abstractions.2.0.3.nupkg";
+      sha256 = "00wl8qksgkxld76fgir3ycc5rjqv1sqds6x8yx40927q5py74gfh";
+    };
+  }
+  {
+    name = "xunit.analyzers";
+    version = "0.10.0";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/xunit.analyzers/0.10.0/xunit.analyzers.0.10.0.nupkg";
+      sha256 = "15n02q3akyqbvkp8nq75a8rd66d4ax0rx8fhdcn8j78pi235jm7j";
+    };
+  }
+  {
+    name = "xunit.assert";
+    version = "2.4.1";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/xunit.assert/2.4.1/xunit.assert.2.4.1.nupkg";
+      sha256 = "1imynzh80wxq2rp9sc4gxs4x1nriil88f72ilhj5q0m44qqmqpc6";
+    };
+  }
+  {
+    name = "xunit.core";
+    version = "2.4.1";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/xunit.core/2.4.1/xunit.core.2.4.1.nupkg";
+      sha256 = "1nnb3j4kzmycaw1g76ii4rfqkvg6l8gqh18falwp8g28h802019a";
+    };
+  }
+  {
+    name = "xunit.extensibility.core";
+    version = "2.4.1";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/xunit.extensibility.core/2.4.1/xunit.extensibility.core.2.4.1.nupkg";
+      sha256 = "103qsijmnip2pnbhciqyk2jyhdm6snindg5z2s57kqf5pcx9a050";
+    };
+  }
+  {
+    name = "xunit.extensibility.execution";
+    version = "2.4.1";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/xunit.extensibility.execution/2.4.1/xunit.extensibility.execution.2.4.1.nupkg";
+      sha256 = "1pbilxh1gp2ywm5idfl0klhl4gb16j86ib4x83p8raql1dv88qia";
+    };
+  }
+  {
+    name = "xunit.runner.console";
+    version = "2.4.1";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/xunit.runner.console/2.4.1/xunit.runner.console.2.4.1.nupkg";
+      sha256 = "13ykz9anhz72xc4q6byvdfwrp54hlcbl6zsfapwfhnzyvfgb9w13";
+    };
+  }
+  {
+    name = "xunit.runner.visualstudio";
+    version = "2.4.1";
+    src = fetchurl {
+      url = "https://api.nuget.org/v3-flatcontainer/xunit.runner.visualstudio/2.4.1/xunit.runner.visualstudio.2.4.1.nupkg";
+      sha256 = "0fln5pk18z98gp0zfshy1p9h6r9wc55nyqhap34k89yran646vhn";
+    };
+  }
+]
diff --git a/pkgs/development/tools/build-managers/msbuild/nuget.nix b/pkgs/development/tools/build-managers/msbuild/nuget.nix
deleted file mode 100644
index 0aae3840752..00000000000
--- a/pkgs/development/tools/build-managers/msbuild/nuget.nix
+++ /dev/null
@@ -1,1130 +0,0 @@
-{ fetchurl }: let
-
-  fetchNuGet = { url, name, version, sha256 }: fetchurl {
-    inherit name url sha256;
-  };
-
-in [
-(fetchNuGet {
-        name = "microsoft.build";
-        version = "14.3.0";
-        url = "https://www.nuget.org/api/v2/package/microsoft.build/14.3.0";
-        sha256 = "1zamn3p8xxi0wsjlpln0y71ncb977f3fp08mvaz4wmbmi76nr0rz";
-        })
-(fetchNuGet {
-        name = "system.io";
-        version = "4.1.0";
-        url = "https://www.nuget.org/api/v2/package/system.io/4.1.0";
-        sha256 = "1g0yb8p11vfd0kbkyzlfsbsp5z44lwsvyc0h3dpw6vqnbi035ajp";
-        })
-(fetchNuGet {
-        name = "system.io";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.io/4.3.0";
-        sha256 = "05l9qdrzhm4s5dixmx68kxwif4l99ll5gqmh7rqgw554fx0agv5f";
-        })
-(fetchNuGet {
-        name = "system.xml.xpath";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.xml.xpath/4.3.0";
-        sha256 = "1cv2m0p70774a0sd1zxc8fm8jk3i5zk2bla3riqvi8gsm0r4kpci";
-        })
-(fetchNuGet {
-        name = "microsoft.net.compilers.toolset";
-        version = "3.3.0-beta2-19367-02";
-        url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.net.compilers.toolset/3.3.0-beta2-19367-02/microsoft.net.compilers.toolset.3.3.0-beta2-19367-02.nupkg";
-        sha256 = "1v9lz2fmfprhql0klqa8iipiiz3wcflvlgr3a86pcjjk7x0y84sl";
-        })
-(fetchNuGet {
-        name = "system.io.filesystem";
-        version = "4.0.1";
-        url = "https://www.nuget.org/api/v2/package/system.io.filesystem/4.0.1";
-        sha256 = "0kgfpw6w4djqra3w5crrg8xivbanh1w9dh3qapb28q060wb9flp1";
-        })
-(fetchNuGet {
-        name = "system.io.filesystem";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.io.filesystem/4.3.0";
-        sha256 = "0z2dfrbra9i6y16mm9v1v6k47f0fm617vlb7s5iybjjsz6g1ilmw";
-        })
-(fetchNuGet {
-        name = "largeaddressaware";
-        version = "1.0.3";
-        url = "https://www.nuget.org/api/v2/package/largeaddressaware/1.0.3";
-        sha256 = "1ppss9bgj0hf5s8307bnm2a4qm10mrymp0v12m28a5q81zjz0fr5";
-        })
-(fetchNuGet {
-        name = "nuget.protocol";
-        version = "5.2.0-rtm.6067";
-        url = "https://dotnet.myget.org/F/nuget-build/api/v2/package/nuget.protocol/5.2.0-rtm.6067";
-        sha256 = "0fm3qgcdsy6dy6fih0n9a4w39mzdha4cz51gr9pp9g4nag34za2a";
-        })
-(fetchNuGet {
-        name = "runtime.native.system.security.cryptography.openssl";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/runtime.native.system.security.cryptography.openssl/4.3.0";
-        sha256 = "18pzfdlwsg2nb1jjjjzyb5qlgy6xjxzmhnfaijq5s2jw3cm3ab97";
-        })
-(fetchNuGet {
-        name = "runtime.ubuntu.14.04-x64.runtime.native.system.security.cryptography.openssl";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/runtime.ubuntu.14.04-x64.runtime.native.system.security.cryptography.openssl/4.3.0";
-        sha256 = "160p68l2c7cqmyqjwxydcvgw7lvl1cr0znkw8fp24d1by9mqc8p3";
-        })
-(fetchNuGet {
-        name = "system.buffers";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.buffers/4.3.0";
-        sha256 = "0fgns20ispwrfqll4q1zc1waqcmylb3zc50ys9x8zlwxh9pmd9jy";
-        })
-(fetchNuGet {
-        name = "system.buffers";
-        version = "4.4.0";
-        url = "https://www.nuget.org/api/v2/package/system.buffers/4.4.0";
-        sha256 = "183f8063w8zqn99pv0ni0nnwh7fgx46qzxamwnans55hhs2l0g19";
-        })
-(fetchNuGet {
-        name = "xunit.core";
-        version = "2.4.1";
-        url = "https://www.nuget.org/api/v2/package/xunit.core/2.4.1";
-        sha256 = "1nnb3j4kzmycaw1g76ii4rfqkvg6l8gqh18falwp8g28h802019a";
-        })
-(fetchNuGet {
-        name = "system.io.filesystem.primitives";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.io.filesystem.primitives/4.3.0";
-        sha256 = "0j6ndgglcf4brg2lz4wzsh1av1gh8xrzdsn9f0yznskhqn1xzj9c";
-        })
-(fetchNuGet {
-        name = "system.io.filesystem.primitives";
-        version = "4.0.1";
-        url = "https://www.nuget.org/api/v2/package/system.io.filesystem.primitives/4.0.1";
-        sha256 = "1s0mniajj3lvbyf7vfb5shp4ink5yibsx945k6lvxa96r8la1612";
-        })
-(fetchNuGet {
-        name = "system.xml.xmldocument";
-        version = "4.0.1";
-        url = "https://www.nuget.org/api/v2/package/system.xml.xmldocument/4.0.1";
-        sha256 = "0ihsnkvyc76r4dcky7v3ansnbyqjzkbyyia0ir5zvqirzan0bnl1";
-        })
-(fetchNuGet {
-        name = "system.xml.xmldocument";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.xml.xmldocument/4.3.0";
-        sha256 = "0bmz1l06dihx52jxjr22dyv5mxv6pj4852lx68grjm7bivhrbfwi";
-        })
-(fetchNuGet {
-        name = "microsoft.build.framework";
-        version = "15.5.180";
-        url = "https://www.nuget.org/api/v2/package/microsoft.build.framework/15.5.180";
-        sha256 = "064y3a711ikx9pm9d2wyms4i3k4f9hfvn3vymhwygg7yv7gcj92z";
-        })
-(fetchNuGet {
-        name = "microsoft.build.framework";
-        version = "14.3.0";
-        url = "https://www.nuget.org/api/v2/package/microsoft.build.framework/14.3.0";
-        sha256 = "0r7y1i7dbr3pb53fdrh268hyi627w85nzv2iblwyg8dzkfxraafd";
-        })
-(fetchNuGet {
-        name = "system.globalization";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.globalization/4.3.0";
-        sha256 = "1cp68vv683n6ic2zqh2s1fn4c2sd87g5hpp6l4d4nj4536jz98ki";
-        })
-(fetchNuGet {
-        name = "system.globalization";
-        version = "4.0.11";
-        url = "https://www.nuget.org/api/v2/package/system.globalization/4.0.11";
-        sha256 = "070c5jbas2v7smm660zaf1gh0489xanjqymkvafcs4f8cdrs1d5d";
-        })
-(fetchNuGet {
-        name = "microsoft.dotnet.signtool";
-        version = "1.0.0-beta.19372.10";
-        url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.dotnet.signtool/1.0.0-beta.19372.10/microsoft.dotnet.signtool.1.0.0-beta.19372.10.nupkg";
-        sha256 = "1f2im2lilw10zslfclxh49knr542jy7q09p009flxsgn68riy0j6";
-        })
-(fetchNuGet {
-        name = "system.runtime.handles";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.runtime.handles/4.3.0";
-        sha256 = "0sw2gfj2xr7sw9qjn0j3l9yw07x73lcs97p8xfc9w1x9h5g5m7i8";
-        })
-(fetchNuGet {
-        name = "system.runtime.handles";
-        version = "4.0.1";
-        url = "https://www.nuget.org/api/v2/package/system.runtime.handles/4.0.1";
-        sha256 = "1g0zrdi5508v49pfm3iii2hn6nm00bgvfpjq1zxknfjrxxa20r4g";
-        })
-(fetchNuGet {
-        name = "microsoft.codeanalysis.common";
-        version = "3.0.0-beta1-61516-01";
-        url = "https://dotnet.myget.org/F/roslyn/api/v2/package/microsoft.codeanalysis.common/3.0.0-beta1-61516-01";
-        sha256 = "1qfm61yrsmihhir7n3hb5ccn1r50i39rv1g74880ma7ihjl1hz54";
-        })
-(fetchNuGet {
-        name = "microsoft.netcore.platforms";
-        version = "1.0.1";
-        url = "https://www.nuget.org/api/v2/package/microsoft.netcore.platforms/1.0.1";
-        sha256 = "01al6cfxp68dscl15z7rxfw9zvhm64dncsw09a1vmdkacsa2v6lr";
-        })
-(fetchNuGet {
-        name = "microsoft.netcore.platforms";
-        version = "1.1.0";
-        url = "https://www.nuget.org/api/v2/package/microsoft.netcore.platforms/1.1.0";
-        sha256 = "08vh1r12g6ykjygq5d3vq09zylgb84l63k49jc4v8faw9g93iqqm";
-        })
-(fetchNuGet {
-        name = "system.reflection.primitives";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.reflection.primitives/4.3.0";
-        sha256 = "04xqa33bld78yv5r93a8n76shvc8wwcdgr1qvvjh959g3rc31276";
-        })
-(fetchNuGet {
-        name = "system.reflection.primitives";
-        version = "4.0.1";
-        url = "https://www.nuget.org/api/v2/package/system.reflection.primitives/4.0.1";
-        sha256 = "1bangaabhsl4k9fg8khn83wm6yial8ik1sza7401621jc6jrym28";
-        })
-(fetchNuGet {
-        name = "microbuild.core";
-        version = "0.2.0";
-        url = "https://www.nuget.org/api/v2/package/microbuild.core/0.2.0";
-        sha256 = "0q4s45jskbyxfx4ay6znnvv94zma2wd85b8rwmwszd2nb0xl3194";
-        })
-(fetchNuGet {
-        name = "system.diagnostics.tracesource";
-        version = "4.0.0";
-        url = "https://www.nuget.org/api/v2/package/system.diagnostics.tracesource/4.0.0";
-        sha256 = "1mc7r72xznczzf6mz62dm8xhdi14if1h8qgx353xvhz89qyxsa3h";
-        })
-(fetchNuGet {
-        name = "system.runtime.numerics";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.runtime.numerics/4.3.0";
-        sha256 = "19rav39sr5dky7afygh309qamqqmi9kcwvz3i0c5700v0c5cg61z";
-        })
-(fetchNuGet {
-        name = "system.threading.tasks.parallel";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.threading.tasks.parallel/4.3.0";
-        sha256 = "1rr3qa4hxwyj531s4nb3bwrxnxxwz617i0n9gh6x7nr7dd3ayzgh";
-        })
-(fetchNuGet {
-        name = "system.threading.tasks.parallel";
-        version = "4.0.1";
-        url = "https://www.nuget.org/api/v2/package/system.threading.tasks.parallel/4.0.1";
-        sha256 = "114wdg32hr46dfsnns3pgs67kcha5jn47p5gg0mhxfn5vrkr2p75";
-        })
-(fetchNuGet {
-        name = "nuget.credentials";
-        version = "5.2.0-rtm.6067";
-        url = "https://dotnet.myget.org/F/nuget-build/api/v2/package/nuget.credentials/5.2.0-rtm.6067";
-        sha256 = "07g2na590sph9li5igww74i3gqyrj5cb6gsgjh54f1f4bs4x1c4k";
-        })
-(fetchNuGet {
-        name = "system.objectmodel";
-        version = "4.0.12";
-        url = "https://www.nuget.org/api/v2/package/system.objectmodel/4.0.12";
-        sha256 = "1sybkfi60a4588xn34nd9a58png36i0xr4y4v4kqpg8wlvy5krrj";
-        })
-(fetchNuGet {
-        name = "system.objectmodel";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.objectmodel/4.3.0";
-        sha256 = "191p63zy5rpqx7dnrb3h7prvgixmk168fhvvkkvhlazncf8r3nc2";
-        })
-(fetchNuGet {
-        name = "system.xml.xmlserializer";
-        version = "4.0.11";
-        url = "https://www.nuget.org/api/v2/package/system.xml.xmlserializer/4.0.11";
-        sha256 = "01nzc3gdslw90qfykq4qzr2mdnqxjl4sj0wp3fixiwdmlmvpib5z";
-        })
-(fetchNuGet {
-        name = "microsoft.codeanalysis.build.tasks";
-        version = "3.0.0-beta1-61516-01";
-        url = "https://dotnet.myget.org/F/roslyn/api/v2/package/microsoft.codeanalysis.build.tasks/3.0.0-beta1-61516-01";
-        sha256 = "1cjpqbd4i0gxhh86nvamlpkisd1krcrya6riwjhghvpjph6115vp";
-        })
-(fetchNuGet {
-        name = "system.private.datacontractserialization";
-        version = "4.1.1";
-        url = "https://www.nuget.org/api/v2/package/system.private.datacontractserialization/4.1.1";
-        sha256 = "1xk9wvgzipssp1393nsg4n16zbr5481k03nkdlj954hzq5jkx89r";
-        })
-(fetchNuGet {
-        name = "system.numerics.vectors";
-        version = "4.4.0";
-        url = "https://www.nuget.org/api/v2/package/system.numerics.vectors/4.4.0";
-        sha256 = "0rdvma399070b0i46c4qq1h2yvjj3k013sqzkilz4bz5cwmx1rba";
-        })
-(fetchNuGet {
-        name = "microsoft.build.centralpackageversions";
-        version = "2.0.1";
-        url = "https://www.nuget.org/api/v2/package/microsoft.build.centralpackageversions/2.0.1";
-        sha256 = "17cjiaj2b98q8s89168g42jb8rhwm6062jcbv57rbkdiiwdsn55k";
-        })
-(fetchNuGet {
-        name = "system.text.encoding.extensions";
-        version = "4.0.11";
-        url = "https://www.nuget.org/api/v2/package/system.text.encoding.extensions/4.0.11";
-        sha256 = "08nsfrpiwsg9x5ml4xyl3zyvjfdi4mvbqf93kjdh11j4fwkznizs";
-        })
-(fetchNuGet {
-        name = "system.text.encoding.extensions";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.text.encoding.extensions/4.3.0";
-        sha256 = "11q1y8hh5hrp5a3kw25cb6l00v5l5dvirkz8jr3sq00h1xgcgrxy";
-        })
-(fetchNuGet {
-        name = "microsoft.visualstudio.sdk.embedinteroptypes";
-        version = "15.0.15";
-        url = "https://www.nuget.org/api/v2/package/microsoft.visualstudio.sdk.embedinteroptypes/15.0.15";
-        sha256 = "0chr3slzzcanwcyd9isx4gichqzmfh4zd3h83piw0r4xsww1wmpd";
-        })
-(fetchNuGet {
-        name = "runtime.ubuntu.16.04-x64.runtime.native.system.security.cryptography.openssl";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/runtime.ubuntu.16.04-x64.runtime.native.system.security.cryptography.openssl/4.3.0";
-        sha256 = "15zrc8fgd8zx28hdghcj5f5i34wf3l6bq5177075m2bc2j34jrqy";
-        })
-(fetchNuGet {
-        name = "system.runtime.extensions";
-        version = "4.1.0";
-        url = "https://www.nuget.org/api/v2/package/system.runtime.extensions/4.1.0";
-        sha256 = "0rw4rm4vsm3h3szxp9iijc3ksyviwsv6f63dng3vhqyg4vjdkc2z";
-        })
-(fetchNuGet {
-        name = "system.runtime.extensions";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.runtime.extensions/4.3.0";
-        sha256 = "1ykp3dnhwvm48nap8q23893hagf665k0kn3cbgsqpwzbijdcgc60";
-        })
-(fetchNuGet {
-        name = "system.resources.extensions";
-        version = "4.6.0-preview8.19364.1";
-        url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/system.resources.extensions/4.6.0-preview8.19364.1/system.resources.extensions.4.6.0-preview8.19364.1.nupkg";
-        sha256 = "0jh9ilbicmsngv77a4ayzs0n7s440ycdf726nbljw029gq4rzvqf";
-        })
-(fetchNuGet {
-        name = "nuget.frameworks";
-        version = "5.2.0-rtm.6067";
-        url = "https://dotnet.myget.org/F/nuget-build/api/v2/package/nuget.frameworks/5.2.0-rtm.6067";
-        sha256 = "1g1kcfqhxr1bhl3ksbdmz3rb9nq1qmkac1sijf9ng4gmr9fmprdm";
-        })
-(fetchNuGet {
-        name = "system.diagnostics.diagnosticsource";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.diagnostics.diagnosticsource/4.3.0";
-        sha256 = "0z6m3pbiy0qw6rn3n209rrzf9x1k4002zh90vwcrsym09ipm2liq";
-        })
-(fetchNuGet {
-        name = "system.security.claims";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.security.claims/4.3.0";
-        sha256 = "0jvfn7j22l3mm28qjy3rcw287y9h65ha4m940waaxah07jnbzrhn";
-        })
-(fetchNuGet {
-        name = "system.linq.expressions";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.linq.expressions/4.3.0";
-        sha256 = "0ky2nrcvh70rqq88m9a5yqabsl4fyd17bpr63iy2mbivjs2nyypv";
-        })
-(fetchNuGet {
-        name = "system.diagnostics.stacktrace";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.diagnostics.stacktrace/4.3.0";
-        sha256 = "0ash4h9k0m7xsm0yl79r0ixrdz369h7y922wipp5gladmlbvpyjd";
-        })
-(fetchNuGet {
-        name = "runtime.osx.10.10-x64.runtime.native.system.security.cryptography.openssl";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/runtime.osx.10.10-x64.runtime.native.system.security.cryptography.openssl/4.3.0";
-        sha256 = "0zcxjv5pckplvkg0r6mw3asggm7aqzbdjimhvsasb0cgm59x09l3";
-        })
-(fetchNuGet {
-        name = "system.diagnostics.tracing";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.diagnostics.tracing/4.3.0";
-        sha256 = "1m3bx6c2s958qligl67q7grkwfz3w53hpy7nc97mh6f7j5k168c4";
-        })
-(fetchNuGet {
-        name = "system.diagnostics.tracing";
-        version = "4.1.0";
-        url = "https://www.nuget.org/api/v2/package/system.diagnostics.tracing/4.1.0";
-        sha256 = "1d2r76v1x610x61ahfpigda89gd13qydz6vbwzhpqlyvq8jj6394";
-        })
-(fetchNuGet {
-        name = "xunit.analyzers";
-        version = "0.10.0";
-        url = "https://www.nuget.org/api/v2/package/xunit.analyzers/0.10.0";
-        sha256 = "15n02q3akyqbvkp8nq75a8rd66d4ax0rx8fhdcn8j78pi235jm7j";
-        })
-(fetchNuGet {
-        name = "xunit.assert";
-        version = "2.4.1";
-        url = "https://www.nuget.org/api/v2/package/xunit.assert/2.4.1";
-        sha256 = "1imynzh80wxq2rp9sc4gxs4x1nriil88f72ilhj5q0m44qqmqpc6";
-        })
-(fetchNuGet {
-        name = "system.appcontext";
-        version = "4.1.0";
-        url = "https://www.nuget.org/api/v2/package/system.appcontext/4.1.0";
-        sha256 = "0fv3cma1jp4vgj7a8hqc9n7hr1f1kjp541s6z0q1r6nazb4iz9mz";
-        })
-(fetchNuGet {
-        name = "system.appcontext";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.appcontext/4.3.0";
-        sha256 = "1649qvy3dar900z3g817h17nl8jp4ka5vcfmsr05kh0fshn7j3ya";
-        })
-(fetchNuGet {
-        name = "system.text.encoding.codepages";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.text.encoding.codepages/4.3.0";
-        sha256 = "0lgxg1gn7pg7j0f942pfdc9q7wamzxsgq3ng248ikdasxz0iadkv";
-        })
-(fetchNuGet {
-        name = "system.text.encoding.codepages";
-        version = "4.0.1";
-        url = "https://www.nuget.org/api/v2/package/system.text.encoding.codepages/4.0.1";
-        sha256 = "00wpm3b9y0k996rm9whxprngm8l500ajmzgy2ip9pgwk0icp06y3";
-        })
-(fetchNuGet {
-        name = "runtime.fedora.24-x64.runtime.native.system.security.cryptography.openssl";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/runtime.fedora.24-x64.runtime.native.system.security.cryptography.openssl/4.3.0";
-        sha256 = "0c2p354hjx58xhhz7wv6div8xpi90sc6ibdm40qin21bvi7ymcaa";
-        })
-(fetchNuGet {
-        name = "microsoft.codeanalysis.csharp";
-        version = "3.0.0-beta1-61516-01";
-        url = "https://dotnet.myget.org/F/roslyn/api/v2/package/microsoft.codeanalysis.csharp/3.0.0-beta1-61516-01";
-        sha256 = "0a7npkdw6s5jczw1lkm63x2bpz1z3ccid20h5nm6k78cv7sihm4h";
-        })
-(fetchNuGet {
-        name = "system.console";
-        version = "4.0.0";
-        url = "https://www.nuget.org/api/v2/package/system.console/4.0.0";
-        sha256 = "0ynxqbc3z1nwbrc11hkkpw9skw116z4y9wjzn7id49p9yi7mzmlf";
-        })
-(fetchNuGet {
-        name = "system.console";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.console/4.3.0";
-        sha256 = "1flr7a9x920mr5cjsqmsy9wgnv3lvd0h1g521pdr1lkb2qycy7ay";
-        })
-(fetchNuGet {
-        name = "system.reflection.typeextensions";
-        version = "4.1.0";
-        url = "https://www.nuget.org/api/v2/package/system.reflection.typeextensions/4.1.0";
-        sha256 = "1bjli8a7sc7jlxqgcagl9nh8axzfl11f4ld3rjqsyxc516iijij7";
-        })
-(fetchNuGet {
-        name = "system.runtime.compilerservices.unsafe";
-        version = "4.5.2";
-        url = "https://www.nuget.org/api/v2/package/system.runtime.compilerservices.unsafe/4.5.2";
-        sha256 = "1vz4275fjij8inf31np78hw50al8nqkngk04p3xv5n4fcmf1grgi";
-        })
-(fetchNuGet {
-        name = "system.threading.tasks";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.threading.tasks/4.3.0";
-        sha256 = "134z3v9abw3a6jsw17xl3f6hqjpak5l682k2vz39spj4kmydg6k7";
-        })
-(fetchNuGet {
-        name = "system.threading.tasks";
-        version = "4.0.11";
-        url = "https://www.nuget.org/api/v2/package/system.threading.tasks/4.0.11";
-        sha256 = "0nr1r41rak82qfa5m0lhk9mp0k93bvfd7bbd9sdzwx9mb36g28p5";
-        })
-(fetchNuGet {
-        name = "xunit.abstractions";
-        version = "2.0.3";
-        url = "https://www.nuget.org/api/v2/package/xunit.abstractions/2.0.3";
-        sha256 = "00wl8qksgkxld76fgir3ycc5rjqv1sqds6x8yx40927q5py74gfh";
-        })
-(fetchNuGet {
-        name = "microsoft.build.utilities.core";
-        version = "15.5.180";
-        url = "https://www.nuget.org/api/v2/package/microsoft.build.utilities.core/15.5.180";
-        sha256 = "0c4bjhaqgc98bchln8p5d2p1vyn8qrha2b8gpn2l7bnznbcrd630";
-        })
-(fetchNuGet {
-        name = "microsoft.build.utilities.core";
-        version = "14.3.0";
-        url = "https://www.nuget.org/api/v2/package/microsoft.build.utilities.core/14.3.0";
-        sha256 = "0351nsnx12nzkss6vaqwwh7d7car7hrgyh0vyd4bl83c4x3ls1kb";
-        })
-(fetchNuGet {
-        name = "system.reflection.emit";
-        version = "4.0.1";
-        url = "https://www.nuget.org/api/v2/package/system.reflection.emit/4.0.1";
-        sha256 = "0ydqcsvh6smi41gyaakglnv252625hf29f7kywy2c70nhii2ylqp";
-        })
-(fetchNuGet {
-        name = "microsoft.visualstudio.setup.configuration.interop";
-        version = "1.16.30";
-        url = "https://www.nuget.org/api/v2/package/microsoft.visualstudio.setup.configuration.interop/1.16.30";
-        sha256 = "14022lx03vdcqlvbbdmbsxg5pqfx1rfq2jywxlyaz9v68cvsb0g4";
-        })
-(fetchNuGet {
-        name = "system.net.sockets";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.net.sockets/4.3.0";
-        sha256 = "1ssa65k6chcgi6mfmzrznvqaxk8jp0gvl77xhf1hbzakjnpxspla";
-        })
-(fetchNuGet {
-        name = "microsoft.dotnet.arcade.sdk";
-        version = "1.0.0-beta.19372.10";
-        url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.dotnet.arcade.sdk/1.0.0-beta.19372.10/microsoft.dotnet.arcade.sdk.1.0.0-beta.19372.10.nupkg";
-        sha256 = "1lii0yg4fbsma80mmvw2zwplc26abb46q6gkxwbsbkyszkw128hv";
-        })
-(fetchNuGet {
-        name = "runtime.fedora.23-x64.runtime.native.system.security.cryptography.openssl";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/runtime.fedora.23-x64.runtime.native.system.security.cryptography.openssl/4.3.0";
-        sha256 = "0hkg03sgm2wyq8nqk6dbm9jh5vcq57ry42lkqdmfklrw89lsmr59";
-        })
-(fetchNuGet {
-        name = "runtime.native.system.io.compression";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/runtime.native.system.io.compression/4.3.0";
-        sha256 = "1vvivbqsk6y4hzcid27pqpm5bsi6sc50hvqwbcx8aap5ifrxfs8d";
-        })
-(fetchNuGet {
-        name = "system.diagnostics.debug";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.diagnostics.debug/4.3.0";
-        sha256 = "00yjlf19wjydyr6cfviaph3vsjzg3d5nvnya26i2fvfg53sknh3y";
-        })
-(fetchNuGet {
-        name = "system.diagnostics.debug";
-        version = "4.0.11";
-        url = "https://www.nuget.org/api/v2/package/system.diagnostics.debug/4.0.11";
-        sha256 = "0gmjghrqmlgzxivd2xl50ncbglb7ljzb66rlx8ws6dv8jm0d5siz";
-        })
-(fetchNuGet {
-        name = "system.xml.readerwriter";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.xml.readerwriter/4.3.0";
-        sha256 = "0c47yllxifzmh8gq6rq6l36zzvw4kjvlszkqa9wq3fr59n0hl3s1";
-        })
-(fetchNuGet {
-        name = "system.xml.readerwriter";
-        version = "4.0.11";
-        url = "https://www.nuget.org/api/v2/package/system.xml.readerwriter/4.0.11";
-        sha256 = "0c6ky1jk5ada9m94wcadih98l6k1fvf6vi7vhn1msjixaha419l5";
-        })
-(fetchNuGet {
-        name = "system.threading.timer";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.threading.timer/4.3.0";
-        sha256 = "1nx773nsx6z5whv8kaa1wjh037id2f1cxhb69pvgv12hd2b6qs56";
-        })
-(fetchNuGet {
-        name = "system.threading.timer";
-        version = "4.0.1";
-        url = "https://www.nuget.org/api/v2/package/system.threading.timer/4.0.1";
-        sha256 = "15n54f1f8nn3mjcjrlzdg6q3520571y012mx7v991x2fvp73lmg6";
-        })
-(fetchNuGet {
-        name = "system.reflection.metadata";
-        version = "1.4.2";
-        url = "https://www.nuget.org/api/v2/package/system.reflection.metadata/1.4.2";
-        sha256 = "08b7b43vczlliv8k7q43jinjfrxwpljsglw7sxmc6sd7d54pd1vi";
-        })
-(fetchNuGet {
-        name = "system.reflection.metadata";
-        version = "1.6.0";
-        url = "https://www.nuget.org/api/v2/package/system.reflection.metadata/1.6.0";
-        sha256 = "1wdbavrrkajy7qbdblpbpbalbdl48q3h34cchz24gvdgyrlf15r4";
-        })
-(fetchNuGet {
-        name = "system.xml.xdocument";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.xml.xdocument/4.3.0";
-        sha256 = "08h8fm4l77n0nd4i4fk2386y809bfbwqb7ih9d7564ifcxr5ssxd";
-        })
-(fetchNuGet {
-        name = "system.linq";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.linq/4.3.0";
-        sha256 = "1w0gmba695rbr80l1k2h4mrwzbzsyfl2z4klmpbsvsg5pm4a56s7";
-        })
-(fetchNuGet {
-        name = "system.linq";
-        version = "4.1.0";
-        url = "https://www.nuget.org/api/v2/package/system.linq/4.1.0";
-        sha256 = "1ppg83svb39hj4hpp5k7kcryzrf3sfnm08vxd5sm2drrijsla2k5";
-        })
-(fetchNuGet {
-        name = "nuget.librarymodel";
-        version = "5.2.0-rtm.6067";
-        url = "https://dotnet.myget.org/F/nuget-build/api/v2/package/nuget.librarymodel/5.2.0-rtm.6067";
-        sha256 = "0dxvnspgkc1lcmilb67kkipg39ih34cmifs6jwk9kbrwf96z51q9";
-        })
-(fetchNuGet {
-        name = "xlifftasks";
-        version = "1.0.0-beta.19252.1";
-        url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/xlifftasks/1.0.0-beta.19252.1/xlifftasks.1.0.0-beta.19252.1.nupkg";
-        sha256 = "0249sfb30y9dgsfryaj8644qw3yc1xp2xzc08lsrwvmm8vjcvkri";
-        })
-(fetchNuGet {
-        name = "system.text.regularexpressions";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.text.regularexpressions/4.3.0";
-        sha256 = "1bgq51k7fwld0njylfn7qc5fmwrk2137gdq7djqdsw347paa9c2l";
-        })
-(fetchNuGet {
-        name = "system.text.regularexpressions";
-        version = "4.1.0";
-        url = "https://www.nuget.org/api/v2/package/system.text.regularexpressions/4.1.0";
-        sha256 = "1mw7vfkkyd04yn2fbhm38msk7dz2xwvib14ygjsb8dq2lcvr18y7";
-        })
-(fetchNuGet {
-        name = "system.security.accesscontrol";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.security.accesscontrol/4.3.0";
-        sha256 = "1gakrskmlmwhzmjc1c2mrwk0fml615rsk31dw0kbjnn9yqnnrjbi";
-        })
-(fetchNuGet {
-        name = "xunit.runner.visualstudio";
-        version = "2.4.1";
-        url = "https://www.nuget.org/api/v2/package/xunit.runner.visualstudio/2.4.1";
-        sha256 = "0fln5pk18z98gp0zfshy1p9h6r9wc55nyqhap34k89yran646vhn";
-        })
-(fetchNuGet {
-        name = "system.resources.resourcemanager";
-        version = "4.0.1";
-        url = "https://www.nuget.org/api/v2/package/system.resources.resourcemanager/4.0.1";
-        sha256 = "0b4i7mncaf8cnai85jv3wnw6hps140cxz8vylv2bik6wyzgvz7bi";
-        })
-(fetchNuGet {
-        name = "system.resources.resourcemanager";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.resources.resourcemanager/4.3.0";
-        sha256 = "0sjqlzsryb0mg4y4xzf35xi523s4is4hz9q4qgdvlvgivl7qxn49";
-        })
-(fetchNuGet {
-        name = "nuget.projectmodel";
-        version = "5.2.0-rtm.6067";
-        url = "https://dotnet.myget.org/F/nuget-build/api/v2/package/nuget.projectmodel/5.2.0-rtm.6067";
-        sha256 = "1s5950nbcsnfrpbaxdnl6cv1xbsa57fln04lhyrki536476a6wcn";
-        })
-(fetchNuGet {
-        name = "nuget.versioning";
-        version = "5.2.0-rtm.6067";
-        url = "https://dotnet.myget.org/F/nuget-build/api/v2/package/nuget.versioning/5.2.0-rtm.6067";
-        sha256 = "04rr31ms95h7ymqxlalpv3xs48j8ng4ljfz5lmrfw7547rhcrj2h";
-        })
-(fetchNuGet {
-        name = "system.memory";
-        version = "4.5.3";
-        url = "https://www.nuget.org/api/v2/package/system.memory/4.5.3";
-        sha256 = "0naqahm3wljxb5a911d37mwjqjdxv9l0b49p5dmfyijvni2ppy8a";
-        })
-(fetchNuGet {
-        name = "system.resources.reader";
-        version = "4.0.0";
-        url = "https://www.nuget.org/api/v2/package/system.resources.reader/4.0.0";
-        sha256 = "1jafi73dcf1lalrir46manq3iy6xnxk2z7gpdpwg4wqql7dv3ril";
-        })
-(fetchNuGet {
-        name = "nuget.common";
-        version = "5.2.0-rtm.6067";
-        url = "https://dotnet.myget.org/F/nuget-build/api/v2/package/nuget.common/5.2.0-rtm.6067";
-        sha256 = "1ff5dhkv8v04n2kr5gyjjvki4mqsp1w4dwsgj7cvdcfcm8alba0m";
-        })
-(fetchNuGet {
-        name = "runtime.native.system";
-        version = "4.0.0";
-        url = "https://www.nuget.org/api/v2/package/runtime.native.system/4.0.0";
-        sha256 = "1ppk69xk59ggacj9n7g6fyxvzmk1g5p4fkijm0d7xqfkig98qrkf";
-        })
-(fetchNuGet {
-        name = "runtime.native.system";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/runtime.native.system/4.3.0";
-        sha256 = "15hgf6zaq9b8br2wi1i3x0zvmk410nlmsmva9p0bbg73v6hml5k4";
-        })
-(fetchNuGet {
-        name = "system.runtime.interopservices";
-        version = "4.1.0";
-        url = "https://www.nuget.org/api/v2/package/system.runtime.interopservices/4.1.0";
-        sha256 = "01kxqppx3dr3b6b286xafqilv4s2n0gqvfgzfd4z943ga9i81is1";
-        })
-(fetchNuGet {
-        name = "system.runtime.interopservices";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.runtime.interopservices/4.3.0";
-        sha256 = "00hywrn4g7hva1b2qri2s6rabzwgxnbpw9zfxmz28z09cpwwgh7j";
-        })
-(fetchNuGet {
-        name = "microbuild.core.sentinel";
-        version = "1.0.0";
-        url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microbuild.core.sentinel/1.0.0/microbuild.core.sentinel.1.0.0.nupkg";
-        sha256 = "035kqx5fkapql108n222lz8psvxk04mv3dy1qg3h08i4b8j3dy8i";
-        })
-(fetchNuGet {
-        name = "sn";
-        version = "1.0.0";
-        url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/sn/1.0.0/sn.1.0.0.nupkg";
-        sha256 = "1012fcdc6vq2355v86h434s6p2nnqgpdapb7p25l4h39g5q8p1qs";
-        })
-(fetchNuGet {
-        name = "system.text.encoding";
-        version = "4.0.11";
-        url = "https://www.nuget.org/api/v2/package/system.text.encoding/4.0.11";
-        sha256 = "1dyqv0hijg265dwxg6l7aiv74102d6xjiwplh2ar1ly6xfaa4iiw";
-        })
-(fetchNuGet {
-        name = "system.text.encoding";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.text.encoding/4.3.0";
-        sha256 = "1f04lkir4iladpp51sdgmis9dj4y8v08cka0mbmsy0frc9a4gjqr";
-        })
-(fetchNuGet {
-        name = "runtime.ubuntu.16.10-x64.runtime.native.system.security.cryptography.openssl";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/runtime.ubuntu.16.10-x64.runtime.native.system.security.cryptography.openssl/4.3.0";
-        sha256 = "1p4dgxax6p7rlgj4q73k73rslcnz4wdcv8q2flg1s8ygwcm58ld5";
-        })
-(fetchNuGet {
-        name = "system.reflection.emit.lightweight";
-        version = "4.0.1";
-        url = "https://www.nuget.org/api/v2/package/system.reflection.emit.lightweight/4.0.1";
-        sha256 = "1s4b043zdbx9k39lfhvsk68msv1nxbidhkq6nbm27q7sf8xcsnxr";
-        })
-(fetchNuGet {
-        name = "microsoft.net.test.sdk";
-        version = "15.9.0";
-        url = "https://www.nuget.org/api/v2/package/microsoft.net.test.sdk/15.9.0";
-        sha256 = "0g7wjgiigs4v8qa32g9ysqgx8bx55dzmbxfkc4ic95mpd1vkjqxw";
-        })
-(fetchNuGet {
-        name = "system.io.compression";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.io.compression/4.3.0";
-        sha256 = "084zc82yi6yllgda0zkgl2ys48sypiswbiwrv7irb3r0ai1fp4vz";
-        })
-(fetchNuGet {
-        name = "system.runtime.serialization.primitives";
-        version = "4.1.1";
-        url = "https://www.nuget.org/api/v2/package/system.runtime.serialization.primitives/4.1.1";
-        sha256 = "042rfjixknlr6r10vx2pgf56yming8lkjikamg3g4v29ikk78h7k";
-        })
-(fetchNuGet {
-        name = "system.diagnostics.fileversioninfo";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.diagnostics.fileversioninfo/4.3.0";
-        sha256 = "094hx249lb3vb336q7dg3v257hbxvz2jnalj695l7cg5kxzqwai7";
-        })
-(fetchNuGet {
-        name = "system.xml.xpath.xdocument";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.xml.xpath.xdocument/4.3.0";
-        sha256 = "1wxckyb7n1pi433xzz0qcwcbl1swpra64065mbwwi8dhdc4kiabn";
-        })
-(fetchNuGet {
-        name = "system.security.principal.windows";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.security.principal.windows/4.3.0";
-        sha256 = "00a0a7c40i3v4cb20s2cmh9csb5jv2l0frvnlzyfxh848xalpdwr";
-        })
-(fetchNuGet {
-        name = "vswhere";
-        version = "2.6.7";
-        url = "https://www.nuget.org/api/v2/package/vswhere/2.6.7";
-        sha256 = "0h4k5i96p7633zzf4xsv7615f9x72rr5qr7b9934ri2y6gshfcwk";
-        })
-(fetchNuGet {
-        name = "runtime.opensuse.13.2-x64.runtime.native.system.security.cryptography.openssl";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/runtime.opensuse.13.2-x64.runtime.native.system.security.cryptography.openssl/4.3.0";
-        sha256 = "0qyynf9nz5i7pc26cwhgi8j62ps27sqmf78ijcfgzab50z9g8ay3";
-        })
-(fetchNuGet {
-        name = "xunit.runner.console";
-        version = "2.4.1";
-        url = "https://www.nuget.org/api/v2/package/xunit.runner.console/2.4.1";
-        sha256 = "13ykz9anhz72xc4q6byvdfwrp54hlcbl6zsfapwfhnzyvfgb9w13";
-        })
-(fetchNuGet {
-        name = "system.threading";
-        version = "4.0.11";
-        url = "https://www.nuget.org/api/v2/package/system.threading/4.0.11";
-        sha256 = "19x946h926bzvbsgj28csn46gak2crv2skpwsx80hbgazmkgb1ls";
-        })
-(fetchNuGet {
-        name = "system.threading";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.threading/4.3.0";
-        sha256 = "0rw9wfamvhayp5zh3j7p1yfmx9b5khbf4q50d8k5rk993rskfd34";
-        })
-(fetchNuGet {
-        name = "system.threading.tasks.dataflow";
-        version = "4.5.24";
-        url = "https://www.nuget.org/api/v2/package/system.threading.tasks.dataflow/4.5.24";
-        sha256 = "0wahbfdb0jxx3hi04xggfms8wgf68wmvv68m2vfp8v2kiqr5mr2r";
-        })
-(fetchNuGet {
-        name = "microsoft.codeanalysis.analyzers";
-        version = "1.1.0";
-        url = "https://www.nuget.org/api/v2/package/microsoft.codeanalysis.analyzers/1.1.0";
-        sha256 = "08r667hj2259wbim1p3al5qxkshydykmb7nd9ygbjlg4mmydkapc";
-        })
-(fetchNuGet {
-        name = "system.dynamic.runtime";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.dynamic.runtime/4.3.0";
-        sha256 = "1d951hrvrpndk7insiag80qxjbf2y0y39y8h5hnq9612ws661glk";
-        })
-(fetchNuGet {
-        name = "system.io.pipes";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.io.pipes/4.3.0";
-        sha256 = "1ygv16gzpi9cnlzcqwijpv7055qc50ynwg3vw29vj1q3iha3h06r";
-        })
-(fetchNuGet {
-        name = "system.net.primitives";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.net.primitives/4.3.0";
-        sha256 = "0c87k50rmdgmxx7df2khd9qj7q35j9rzdmm2572cc55dygmdk3ii";
-        })
-(fetchNuGet {
-        name = "system.runtime.serialization.xml";
-        version = "4.1.1";
-        url = "https://www.nuget.org/api/v2/package/system.runtime.serialization.xml/4.1.1";
-        sha256 = "11747an5gbz821pwahaim3v82gghshnj9b5c4cw539xg5a3gq7rk";
-        })
-(fetchNuGet {
-        name = "system.security.cryptography.encoding";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.security.cryptography.encoding/4.3.0";
-        sha256 = "1jr6w70igqn07k5zs1ph6xja97hxnb3mqbspdrff6cvssgrixs32";
-        })
-(fetchNuGet {
-        name = "system.collections.nongeneric";
-        version = "4.0.1";
-        url = "https://www.nuget.org/api/v2/package/system.collections.nongeneric/4.0.1";
-        sha256 = "19994r5y5bpdhj7di6w047apvil8lh06lh2c2yv9zc4fc5g9bl4d";
-        })
-(fetchNuGet {
-        name = "system.diagnostics.tools";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.diagnostics.tools/4.3.0";
-        sha256 = "0in3pic3s2ddyibi8cvgl102zmvp9r9mchh82ns9f0ms4basylw1";
-        })
-(fetchNuGet {
-        name = "microsoft.netframework.referenceassemblies";
-        version = "1.0.0-alpha-004";
-        url = "https://dotnet.myget.org/F/roslyn-tools/api/v2/package/microsoft.netframework.referenceassemblies/1.0.0-alpha-004";
-        sha256 = "1qrpxhcx11v92lqwvrih88mlyfw2rkrsjqh7gl8c1h71vyppr3bp";
-        })
-(fetchNuGet {
-        name = "system.reflection.emit.ilgeneration";
-        version = "4.0.1";
-        url = "https://www.nuget.org/api/v2/package/system.reflection.emit.ilgeneration/4.0.1";
-        sha256 = "1pcd2ig6bg144y10w7yxgc9d22r7c7ww7qn1frdfwgxr24j9wvv0";
-        })
-(fetchNuGet {
-        name = "xunit.extensibility.execution";
-        version = "2.4.1";
-        url = "https://www.nuget.org/api/v2/package/xunit.extensibility.execution/2.4.1";
-        sha256 = "1pbilxh1gp2ywm5idfl0klhl4gb16j86ib4x83p8raql1dv88qia";
-        })
-(fetchNuGet {
-        name = "microsoft.codecoverage";
-        version = "15.9.0";
-        url = "https://www.nuget.org/api/v2/package/microsoft.codecoverage/15.9.0";
-        sha256 = "10v5xrdilnm362g9545qxvlrbwc9vn65jhpb1i0jlhyqsj6bfwzg";
-        })
-(fetchNuGet {
-        name = "xunit.extensibility.core";
-        version = "2.4.1";
-        url = "https://www.nuget.org/api/v2/package/xunit.extensibility.core/2.4.1";
-        sha256 = "103qsijmnip2pnbhciqyk2jyhdm6snindg5z2s57kqf5pcx9a050";
-        })
-(fetchNuGet {
-        name = "system.collections.concurrent";
-        version = "4.0.12";
-        url = "https://www.nuget.org/api/v2/package/system.collections.concurrent/4.0.12";
-        sha256 = "07y08kvrzpak873pmyxs129g1ch8l27zmg51pcyj2jvq03n0r0fc";
-        })
-(fetchNuGet {
-        name = "system.collections.concurrent";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.collections.concurrent/4.3.0";
-        sha256 = "0wi10md9aq33jrkh2c24wr2n9hrpyamsdhsxdcnf43b7y86kkii8";
-        })
-(fetchNuGet {
-        name = "system.collections";
-        version = "4.0.11";
-        url = "https://www.nuget.org/api/v2/package/system.collections/4.0.11";
-        sha256 = "1ga40f5lrwldiyw6vy67d0sg7jd7ww6kgwbksm19wrvq9hr0bsm6";
-        })
-(fetchNuGet {
-        name = "system.collections";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.collections/4.3.0";
-        sha256 = "19r4y64dqyrq6k4706dnyhhw7fs24kpp3awak7whzss39dakpxk9";
-        })
-(fetchNuGet {
-        name = "runtime.opensuse.42.1-x64.runtime.native.system.security.cryptography.openssl";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/runtime.opensuse.42.1-x64.runtime.native.system.security.cryptography.openssl/4.3.0";
-        sha256 = "1klrs545awhayryma6l7g2pvnp9xy4z0r1i40r80zb45q3i9nbyf";
-        })
-(fetchNuGet {
-        name = "microsoft.build.nugetsdkresolver";
-        version = "5.2.0-rtm.6067";
-        url = "https://dotnet.myget.org/F/nuget-build/api/v2/package/microsoft.build.nugetsdkresolver/5.2.0-rtm.6067";
-        sha256 = "1rz2i4md7b8rlybb9s7416l0pr357f3ar149s6ipfq0xijn3xgmh";
-        })
-(fetchNuGet {
-        name = "system.reflection";
-        version = "4.1.0";
-        url = "https://www.nuget.org/api/v2/package/system.reflection/4.1.0";
-        sha256 = "1js89429pfw79mxvbzp8p3q93il6rdff332hddhzi5wqglc4gml9";
-        })
-(fetchNuGet {
-        name = "system.reflection";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.reflection/4.3.0";
-        sha256 = "0xl55k0mw8cd8ra6dxzh974nxif58s3k1rjv1vbd7gjbjr39j11m";
-        })
-(fetchNuGet {
-        name = "nuget.configuration";
-        version = "5.2.0-rtm.6067";
-        url = "https://dotnet.myget.org/F/nuget-build/api/v2/package/nuget.configuration/5.2.0-rtm.6067";
-        sha256 = "075mypb32i0d0x73rcr0di6pb0bhlp0izv3633ky64kddriajma1";
-        })
-(fetchNuGet {
-        name = "system.net.http";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.net.http/4.3.0";
-        sha256 = "1i4gc757xqrzflbk7kc5ksn20kwwfjhw9w7pgdkn19y3cgnl302j";
-        })
-(fetchNuGet {
-        name = "runtime.debian.8-x64.runtime.native.system.security.cryptography.openssl";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/runtime.debian.8-x64.runtime.native.system.security.cryptography.openssl/4.3.0";
-        sha256 = "16rnxzpk5dpbbl1x354yrlsbvwylrq456xzpsha1n9y3glnhyx9d";
-        })
-(fetchNuGet {
-        name = "system.security.cryptography.x509certificates";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.security.cryptography.x509certificates/4.3.0";
-        sha256 = "0valjcz5wksbvijylxijjxb1mp38mdhv03r533vnx1q3ikzdav9h";
-        })
-(fetchNuGet {
-        name = "nuget.packaging";
-        version = "5.2.0-rtm.6067";
-        url = "https://dotnet.myget.org/F/nuget-build/api/v2/package/nuget.packaging/5.2.0-rtm.6067";
-        sha256 = "16p5glvvpp5rw10ycbpyg39k4prir450l12r5frpm8qz0rdp3xig";
-        })
-(fetchNuGet {
-        name = "nuget.commands";
-        version = "5.2.0-rtm.6067";
-        url = "https://dotnet.myget.org/F/nuget-build/api/v2/package/nuget.commands/5.2.0-rtm.6067";
-        sha256 = "06vnphsmwnvcigwj37hy5abipjzwhnq61zw66cclwd6jjibb1kh9";
-        })
-(fetchNuGet {
-        name = "system.runtime";
-        version = "4.1.0";
-        url = "https://www.nuget.org/api/v2/package/system.runtime/4.1.0";
-        sha256 = "02hdkgk13rvsd6r9yafbwzss8kr55wnj8d5c7xjnp8gqrwc8sn0m";
-        })
-(fetchNuGet {
-        name = "system.runtime";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.runtime/4.3.0";
-        sha256 = "066ixvgbf2c929kgknshcxqj6539ax7b9m570cp8n179cpfkapz7";
-        })
-(fetchNuGet {
-        name = "microsoft.win32.primitives";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/microsoft.win32.primitives/4.3.0";
-        sha256 = "0j0c1wj4ndj21zsgivsc24whiya605603kxrbiw6wkfdync464wq";
-        })
-(fetchNuGet {
-        name = "microsoft.win32.primitives";
-        version = "4.0.1";
-        url = "https://www.nuget.org/api/v2/package/microsoft.win32.primitives/4.0.1";
-        sha256 = "1n8ap0cmljbqskxpf8fjzn7kh1vvlndsa75k01qig26mbw97k2q7";
-        })
-(fetchNuGet {
-        name = "system.collections.immutable";
-        version = "1.2.0";
-        url = "https://www.nuget.org/api/v2/package/system.collections.immutable/1.2.0";
-        sha256 = "1jm4pc666yiy7af1mcf7766v710gp0h40p228ghj6bavx7xfa38m";
-        })
-(fetchNuGet {
-        name = "system.collections.immutable";
-        version = "1.3.1";
-        url = "https://www.nuget.org/api/v2/package/system.collections.immutable/1.3.1";
-        sha256 = "17615br2x5riyx8ivf1dcqwj6q3ipq1bi5hqhw54yfyxmx38ddva";
-        })
-(fetchNuGet {
-        name = "system.collections.immutable";
-        version = "1.5.0";
-        url = "https://www.nuget.org/api/v2/package/system.collections.immutable/1.5.0";
-        sha256 = "1d5gjn5afnrf461jlxzawcvihz195gayqpcfbv6dd7pxa9ialn06";
-        })
-(fetchNuGet {
-        name = "nuget.dependencyresolver.core";
-        version = "5.2.0-rtm.6067";
-        url = "https://dotnet.myget.org/F/nuget-build/api/v2/package/nuget.dependencyresolver.core/5.2.0-rtm.6067";
-        sha256 = "0iw1z2lascjjmdkk9nf2wqm5sj5nqjv4611xx29vlmp6cyhnpq4i";
-        })
-(fetchNuGet {
-        name = "netstandard.library";
-        version = "1.6.1";
-        url = "https://www.nuget.org/api/v2/package/netstandard.library/1.6.1";
-        sha256 = "1z70wvsx2d847a2cjfii7b83pjfs34q05gb037fdjikv5kbagml8";
-        })
-(fetchNuGet {
-        name = "shouldly";
-        version = "3.0.0";
-        url = "https://www.nuget.org/api/v2/package/shouldly/3.0.0";
-        sha256 = "1hg28w898kl84rx57sclb2z9b76v5hxlwxig1xnb6fr81aahzlw3";
-        })
-(fetchNuGet {
-        name = "microsoft.diasymreader.pdb2pdb";
-        version = "1.1.0-beta1-62506-02";
-        url = "https://dotnetfeed.blob.core.windows.net/dotnet-core/flatcontainer/microsoft.diasymreader.pdb2pdb/1.1.0-beta1-62506-02/microsoft.diasymreader.pdb2pdb.1.1.0-beta1-62506-02.nupkg";
-        sha256 = "1dkhpmq5aw34nndvb4xc370866vf33x70zrjhgvnpwwspb6vb0zh";
-        })
-(fetchNuGet {
-        name = "system.globalization.calendars";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.globalization.calendars/4.3.0";
-        sha256 = "1xwl230bkakzzkrggy1l1lxmm3xlhk4bq2pkv790j5lm8g887lxq";
-        })
-(fetchNuGet {
-        name = "system.io.compression.zipfile";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.io.compression.zipfile/4.3.0";
-        sha256 = "1yxy5pq4dnsm9hlkg9ysh5f6bf3fahqqb6p8668ndy5c0lk7w2ar";
-        })
-(fetchNuGet {
-        name = "system.runtime.interopservices.runtimeinformation";
-        version = "4.0.0";
-        url = "https://www.nuget.org/api/v2/package/system.runtime.interopservices.runtimeinformation/4.0.0";
-        sha256 = "0glmvarf3jz5xh22iy3w9v3wyragcm4hfdr17v90vs7vcrm7fgp6";
-        })
-(fetchNuGet {
-        name = "system.runtime.interopservices.runtimeinformation";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.runtime.interopservices.runtimeinformation/4.3.0";
-        sha256 = "0q18r1sh4vn7bvqgd6dmqlw5v28flbpj349mkdish2vjyvmnb2ii";
-        })
-(fetchNuGet {
-        name = "system.io.filesystem.driveinfo";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.io.filesystem.driveinfo/4.3.0";
-        sha256 = "0j67khc75lwdf7d5i3z41cks7zhac4zdccgvk2xmq6wm1l08xnlh";
-        })
-(fetchNuGet {
-        name = "system.threading.tasks.extensions";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.threading.tasks.extensions/4.3.0";
-        sha256 = "1xxcx2xh8jin360yjwm4x4cf5y3a2bwpn2ygkfkwkicz7zk50s2z";
-        })
-(fetchNuGet {
-        name = "system.threading.tasks.extensions";
-        version = "4.0.0";
-        url = "https://www.nuget.org/api/v2/package/system.threading.tasks.extensions/4.0.0";
-        sha256 = "1cb51z062mvc2i8blpzmpn9d9mm4y307xrwi65di8ri18cz5r1zr";
-        })
-(fetchNuGet {
-        name = "microsoft.netcore.targets";
-        version = "1.0.1";
-        url = "https://www.nuget.org/api/v2/package/microsoft.netcore.targets/1.0.1";
-        sha256 = "0ppdkwy6s9p7x9jix3v4402wb171cdiibq7js7i13nxpdky7074p";
-        })
-(fetchNuGet {
-        name = "microsoft.netcore.targets";
-        version = "1.1.0";
-        url = "https://www.nuget.org/api/v2/package/microsoft.netcore.targets/1.1.0";
-        sha256 = "193xwf33fbm0ni3idxzbr5fdq3i2dlfgihsac9jj7whj0gd902nh";
-        })
-(fetchNuGet {
-        name = "system.reflection.extensions";
-        version = "4.0.1";
-        url = "https://www.nuget.org/api/v2/package/system.reflection.extensions/4.0.1";
-        sha256 = "0m7wqwq0zqq9gbpiqvgk3sr92cbrw7cp3xn53xvw7zj6rz6fdirn";
-        })
-(fetchNuGet {
-        name = "system.reflection.extensions";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.reflection.extensions/4.3.0";
-        sha256 = "02bly8bdc98gs22lqsfx9xicblszr2yan7v2mmw3g7hy6miq5hwq";
-        })
-(fetchNuGet {
-        name = "system.diagnostics.process";
-        version = "4.1.0";
-        url = "https://www.nuget.org/api/v2/package/system.diagnostics.process/4.1.0";
-        sha256 = "061lrcs7xribrmq7kab908lww6kn2xn1w3rdc41q189y0jibl19s";
-        })
-(fetchNuGet {
-        name = "system.diagnostics.process";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.diagnostics.process/4.3.0";
-        sha256 = "0g4prsbkygq8m21naqmcp70f24a1ksyix3dihb1r1f71lpi3cfj7";
-        })
-(fetchNuGet {
-        name = "system.security.cryptography.primitives";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.security.cryptography.primitives/4.3.0";
-        sha256 = "0pyzncsv48zwly3lw4f2dayqswcfvdwq2nz0dgwmi7fj3pn64wby";
-        })
-(fetchNuGet {
-        name = "system.threading.thread";
-        version = "4.0.0";
-        url = "https://www.nuget.org/api/v2/package/system.threading.thread/4.0.0";
-        sha256 = "1gxxm5fl36pjjpnx1k688dcw8m9l7nmf802nxis6swdaw8k54jzc";
-        })
-(fetchNuGet {
-        name = "system.threading.thread";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.threading.thread/4.3.0";
-        sha256 = "0y2xiwdfcph7znm2ysxanrhbqqss6a3shi1z3c779pj2s523mjx4";
-        })
-(fetchNuGet {
-        name = "newtonsoft.json";
-        version = "9.0.1";
-        url = "https://www.nuget.org/api/v2/package/newtonsoft.json/9.0.1";
-        sha256 = "0mcy0i7pnfpqm4pcaiyzzji4g0c8i3a5gjz28rrr28110np8304r";
-        })
-(fetchNuGet {
-        name = "runtime.rhel.7-x64.runtime.native.system.security.cryptography.openssl";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/runtime.rhel.7-x64.runtime.native.system.security.cryptography.openssl/4.3.0";
-        sha256 = "0vhynn79ih7hw7cwjazn87rm9z9fj0rvxgzlab36jybgcpcgphsn";
-        })
-(fetchNuGet {
-        name = "xunit";
-        version = "2.4.1";
-        url = "https://www.nuget.org/api/v2/package/xunit/2.4.1";
-        sha256 = "0xf3kaywpg15flqaqfgywqyychzk15kz0kz34j21rcv78q9ywq20";
-        })
-(fetchNuGet {
-        name = "system.valuetuple";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.valuetuple/4.3.0";
-        sha256 = "1227k7fxbxapq7dms4lvwwjdf3pr1jcsmhy2nzzhj6g6hs530hxn";
-        })
-(fetchNuGet {
-        name = "microsoft.netframework.referenceassemblies.net472";
-        version = "1.0.0-alpha-004";
-        url = "https://dotnet.myget.org/F/roslyn-tools/api/v2/package/microsoft.netframework.referenceassemblies.net472/1.0.0-alpha-004";
-        sha256 = "08wa54dm7yskayzxivnwbm8sg1pf6ai8ccr64ixf9lyz3yw6y0nc";
-        })
-(fetchNuGet {
-        name = "system.security.cryptography.algorithms";
-        version = "4.3.0";
-        url = "https://www.nuget.org/api/v2/package/system.security.cryptography.algorithms/4.3.0";
-        sha256 = "03sq183pfl5kp7gkvq77myv7kbpdnq3y0xj7vi4q1kaw54sny0ml";
-        })
-]
diff --git a/pkgs/development/tools/build-managers/ninja/default.nix b/pkgs/development/tools/build-managers/ninja/default.nix
index efe9a495494..ddc61ca86d9 100644
--- a/pkgs/development/tools/build-managers/ninja/default.nix
+++ b/pkgs/development/tools/build-managers/ninja/default.nix
@@ -1,16 +1,16 @@
-{ stdenv, fetchFromGitHub, fetchpatch, python3, buildDocs ? true, asciidoc, docbook_xml_dtd_45, docbook_xsl, libxslt, re2c }:
+{ lib, stdenv, fetchFromGitHub, fetchpatch, python3, buildDocs ? true, asciidoc, docbook_xml_dtd_45, docbook_xsl, libxslt, re2c }:
 
-with stdenv.lib;
+with lib;
 
 stdenv.mkDerivation rec {
   pname = "ninja";
-  version = "1.10.0";
+  version = "1.10.2";
 
   src = fetchFromGitHub {
     owner = "ninja-build";
     repo = "ninja";
     rev = "v${version}";
-    sha256 = "1fbzl7mrcrwp527sgkc1npfl3k6bbpydpiq98xcf1a1hkrx0z5x4";
+    sha256 = "0mspq4mvx41qri2v2zlg2y3znx5gfw6d8s3czbcfpr2218qbpz55";
   };
 
   nativeBuildInputs = [ python3 re2c ] ++ optionals buildDocs [ asciidoc docbook_xml_dtd_45 docbook_xsl libxslt.bin ];
diff --git a/pkgs/development/tools/build-managers/pants/default.nix b/pkgs/development/tools/build-managers/pants/default.nix
index 9757d8cda8d..53333c217ba 100644
--- a/pkgs/development/tools/build-managers/pants/default.nix
+++ b/pkgs/development/tools/build-managers/pants/default.nix
@@ -1,6 +1,6 @@
-{ stdenv, pythonPackages }:
+{ lib, pythonPackages }:
 
-with stdenv.lib;
+with lib;
 with pythonPackages;
 
 buildPythonApplication rec {
diff --git a/pkgs/development/tools/build-managers/qbs/default.nix b/pkgs/development/tools/build-managers/qbs/default.nix
index d4f94c1aed9..d2d382f28d3 100644
--- a/pkgs/development/tools/build-managers/qbs/default.nix
+++ b/pkgs/development/tools/build-managers/qbs/default.nix
@@ -1,26 +1,28 @@
-{ stdenv, fetchFromGitHub, qmake, qtbase, qtscript }:
+{ lib, stdenv, fetchFromGitHub, qmake, qtbase, qtscript }:
 
 stdenv.mkDerivation rec {
   pname = "qbs";
 
-  version = "1.16.0";
+  version = "1.19.1";
 
   src = fetchFromGitHub {
     owner = "qbs";
     repo = "qbs";
     rev = "v${version}";
-    sha256 = "1kg11s3figpkvgd85p0zk416s57gnvlzrz1isbc2lv13adidf041";
+    sha256 = "sha256-td+xXxpjty5jgorlVySG+8yUd9hujInXIlCfqCRUg9k=";
   };
 
   nativeBuildInputs = [ qmake ];
 
+  dontWrapQtApps = true;
+
   qmakeFlags = [ "QBS_INSTALL_PREFIX=$(out)" "qbs.pro" ];
 
   buildInputs = [ qtbase qtscript ];
 
   enableParallelBuilding = true;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A tool that helps simplify the build process for developing projects across multiple platforms";
     homepage = "https://wiki.qt.io/Qbs";
     license = licenses.lgpl3;
diff --git a/pkgs/development/tools/build-managers/rake/gemset.nix b/pkgs/development/tools/build-managers/rake/gemset.nix
index 05a59cff850..534c5efcfb1 100644
--- a/pkgs/development/tools/build-managers/rake/gemset.nix
+++ b/pkgs/development/tools/build-managers/rake/gemset.nix
@@ -9,4 +9,4 @@
     };
     version = "12.3.2";
   };
-}
\ No newline at end of file
+}
diff --git a/pkgs/development/tools/build-managers/rebar/default.nix b/pkgs/development/tools/build-managers/rebar/default.nix
index 1c5996c6b1c..c6e74a8ebb2 100644
--- a/pkgs/development/tools/build-managers/rebar/default.nix
+++ b/pkgs/development/tools/build-managers/rebar/default.nix
@@ -1,12 +1,8 @@
-{ stdenv, fetchurl, erlang }:
+{ lib, stdenv, fetchurl, erlang }:
 
-
-let
-  version = "2.6.4";
-in
-stdenv.mkDerivation {
+stdenv.mkDerivation rec {
   pname = "rebar";
-  inherit version;
+  version = "2.6.4";
 
   src = fetchurl {
     url = "https://github.com/rebar/rebar/archive/${version}.tar.gz";
@@ -35,7 +31,8 @@ stdenv.mkDerivation {
       variety of locations (git, hg, etc).
       '';
 
-    platforms = stdenv.lib.platforms.unix;
-    license = stdenv.lib.licenses.asl20;
+    platforms = lib.platforms.unix;
+    license = lib.licenses.asl20;
+    maintainers = lib.teams.beam.members;
   };
 }
diff --git a/pkgs/development/tools/build-managers/rebar3/default.nix b/pkgs/development/tools/build-managers/rebar3/default.nix
index 5c0fff134a7..3b775eeaef1 100644
--- a/pkgs/development/tools/build-managers/rebar3/default.nix
+++ b/pkgs/development/tools/build-managers/rebar3/default.nix
@@ -1,135 +1,147 @@
-{ stdenv, fetchFromGitHub,
-  fetchHex, erlang,
-  tree }:
+{ lib, stdenv, fetchFromGitHub,
+  fetchHex, erlang, makeWrapper,
+  writeScript, common-updater-scripts, coreutils, git, gnused, nix, rebar3-nix }:
 
 let
-  version = "3.12.0";
+  version = "3.16.1";
+  owner = "erlang";
+  deps = import ./rebar-deps.nix { inherit fetchFromGitHub fetchHex; };
+  rebar3 = stdenv.mkDerivation rec {
+    pname = "rebar3";
+    inherit version erlang;
 
-  erlware_commons = fetchHex {
-    pkg = "erlware_commons";
-    version = "1.3.1";
-    sha256 = "7aada93f368d0a0430122e39931b7fb4ac9e94dbf043cdc980ad4330fd9cd166";
-  };
-  ssl_verify_fun = fetchHex {
-    pkg = "ssl_verify_fun";
-    version = "1.1.3";
-    sha256 = "2e120e6505d6e9ededb2836611dfe2f7028432dc280957998e154307b5ea92fe";
-  };
-  certifi = fetchHex {
-    pkg = "certifi";
-    version = "2.3.1";
-    sha256 = "e12d667d042c11d130594bae2b0097e63836fe8b1e6d6b2cc48f8bb7a2cf7d68";
-  };
-  providers = fetchHex {
-    pkg = "providers";
-    version = "1.7.0";
-    sha256 = "8be66129ca85c2fa74efd8737cdaedd31c1c1af51dd2fd601495a6def4cae4a6";
-  };
-  getopt = fetchHex {
-    pkg = "getopt";
-    version = "1.0.1";
-    sha256 = "53e1ab83b9ceb65c9672d3e7a35b8092e9bdc9b3ee80721471a161c10c59959c";
-  };
-  bbmustache = fetchHex {
-    pkg = "bbmustache";
-    version = "1.6.0";
-    sha256 = "53e02d296512a57be03a98c91541b34d2ca64930268030b2d12364a0332015df";
-  };
-  relx = fetchHex {
-    pkg = "relx";
-    version = "3.28.0";
-    sha256 = "8afb871c0a2a27f0063d973903fc64d2207bc705ecc3607462920683d24ac7b5";
-  };
-  cf = fetchHex {
-    pkg = "cf";
-    version = "0.2.2";
-    sha256 = "08cvy7skn5d2k4manlx5k3anqgjdvajjhc5jwxbaszxw34q3na28";
-  };
-  cth_readable = fetchHex {
-    pkg = "cth_readable";
-    version = "1.4.3";
-    sha256 = "0wr0hba6ka74s3628jrrd7ynjdh7syxigkh7ildg8fgi20ab88fd";
-  };
-  eunit_formatters = fetchHex {
-    pkg = "eunit_formatters";
-    version = "0.5.0";
-    sha256 = "1jb3hzb216r29x2h4pcjwfmx1k81431rgh5v0mp4x5146hhvmj6n";
-  };
-  hex_core = fetchHex {
-    pkg = "hex_core";
-    version = "0.4.0";
-    sha256 = "8ace8c6cfa10df4cb8be876f42f7446890e124203c094cc7b4e7616fb8de5d7f";
-  };
-  parse_trans = fetchHex {
-    pkg = "parse_trans";
-    version = "3.3.0";
-    sha256 = "0q5r871bzx1a8fa06yyxdi3xkkp7v5yqazzah03d6yl3vsmn7vqp";
-  };
+    # How to obtain `sha256`:
+    # nix-prefetch-url --unpack https://github.com/erlang/rebar3/archive/${version}.tar.gz
+    src = fetchFromGitHub {
+      inherit owner;
+      repo = pname;
+      rev = version;
+      sha256 = "0dhwlx7zykf9y3znk2k8fxrq5j43jy3c3gd76k74q34p1xbajgzr";
+    };
 
-in
-stdenv.mkDerivation rec {
-  pname = "rebar3";
-  inherit version erlang;
+    buildInputs = [ erlang ];
 
-  src = fetchFromGitHub {
-    owner = "erlang";
-    repo = pname;
-    rev = version;
-    sha256 = "0936ix7lfwsamssap58b265zid7x2m97azrr2qpjcln3xysd16lg";
-  };
+    postPatch = ''
+      mkdir -p _checkouts _build/default/lib/
 
-  bootstrapper = ./rebar3-nix-bootstrap;
-
-  buildInputs = [ erlang tree ];
-
-  postPatch = ''
-    mkdir -p _checkouts
-    mkdir -p _build/default/lib/
-
-    cp --no-preserve=mode -R ${erlware_commons} _checkouts/erlware_commons
-    cp --no-preserve=mode -R ${providers} _checkouts/providers
-    cp --no-preserve=mode -R ${getopt} _checkouts/getopt
-    cp --no-preserve=mode -R ${bbmustache} _checkouts/bbmustache
-    cp --no-preserve=mode -R ${certifi} _checkouts/certifi
-    cp --no-preserve=mode -R ${cf} _checkouts/cf
-    cp --no-preserve=mode -R ${cth_readable} _checkouts/cth_readable
-    cp --no-preserve=mode -R ${eunit_formatters} _checkouts/eunit_formatters
-    cp --no-preserve=mode -R ${relx} _checkouts/relx
-    cp --no-preserve=mode -R ${ssl_verify_fun} _checkouts/ssl_verify_fun
-    cp --no-preserve=mode -R ${hex_core} _checkouts/hex_core
-    cp --no-preserve=mode -R ${parse_trans} _checkouts/parse_trans
-
-    # Bootstrap script expects the dependencies in _build/default/lib
-    # TODO: Make it accept checkouts?
-    for i in _checkouts/* ; do
-        ln -s $(pwd)/$i $(pwd)/_build/default/lib/
-    done
-  '';
-
-  buildPhase = ''
-    HOME=. escript bootstrap
-  '';
-
-  installPhase = ''
-    mkdir -p $out/bin
-    cp rebar3 $out/bin/rebar3
-  '';
-
-  meta = {
-    homepage = "https://github.com/rebar/rebar3";
-    description = "Erlang build tool that makes it easy to compile and test Erlang applications, port drivers and releases";
-
-    longDescription = ''
-      rebar is a self-contained Erlang script, so it's easy to distribute or
-      even embed directly in a project. Where possible, rebar uses standard
-      Erlang/OTP conventions for project structures, thus minimizing the amount
-      of build configuration work. rebar also provides dependency management,
-      enabling application writers to easily re-use common libraries from a
-      variety of locations (hex.pm, git, hg, and so on).
-      '';
+      ${toString (lib.mapAttrsToList (k: v: ''
+        cp -R --no-preserve=mode ${v} _checkouts/${k}
+      '') deps)}
+
+      # Bootstrap script expects the dependencies in _build/default/lib
+      # TODO: Make it accept checkouts?
+      for i in _checkouts/* ; do
+          ln -s $(pwd)/$i $(pwd)/_build/default/lib/
+      done
+    '';
 
-    platforms = stdenv.lib.platforms.unix;
-    maintainers = with stdenv.lib.maintainers; [ gleber tazjin ];
-    license = stdenv.lib.licenses.asl20;
+    buildPhase = ''
+      HOME=. escript bootstrap
+    '';
+
+
+    patches = []
+      # Skips test that can write outside the designated tmp directory, potentially resulting in build failures
+      # due to file ownership issues if ran without sandbox (eg. Mac M1 default). This patch can be Removed when
+      # rebar3 releases with the following commit:
+      # https://github.com/erlang/rebar3/commit/11055384dbd5bf7d181bca83a33b0e100275ff21
+      ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ ./tmp-tests-skip.patch ];
+
+    checkPhase = ''
+      HOME=. escript ./rebar3 ct
+    '';
+
+    doCheck = true;
+
+    installPhase = ''
+      mkdir -p $out/bin
+      cp rebar3 $out/bin/rebar3
+    '';
+
+    meta = {
+      homepage = "https://github.com/rebar/rebar3";
+      description = "Erlang build tool that makes it easy to compile and test Erlang applications, port drivers and releases";
+
+      longDescription = ''
+        rebar is a self-contained Erlang script, so it's easy to distribute or
+        even embed directly in a project. Where possible, rebar uses standard
+        Erlang/OTP conventions for project structures, thus minimizing the amount
+        of build configuration work. rebar also provides dependency management,
+        enabling application writers to easily re-use common libraries from a
+        variety of locations (hex.pm, git, hg, and so on).
+        '';
+
+      platforms = lib.platforms.unix;
+      maintainers = lib.teams.beam.members;
+      license = lib.licenses.asl20;
+    };
+
+    passthru.updateScript = writeScript "update.sh" ''
+      #!${stdenv.shell}
+      set -ox errexit
+      PATH=${
+        lib.makeBinPath [
+          common-updater-scripts
+          coreutils
+          git
+          gnused
+          nix
+          (rebar3WithPlugins { globalPlugins = [rebar3-nix]; })
+        ]
+      }
+      latest=$(list-git-tags https://github.com/${owner}/${pname}.git | sed -n '/[\d\.]\+/p' | sort -V | tail -1)
+      if [ "$latest" != "${version}" ]; then
+        nixpkgs="$(git rev-parse --show-toplevel)"
+        nix_path="$nixpkgs/pkgs/development/tools/build-managers/rebar3"
+        update-source-version rebar3 "$latest" --version-key=version --print-changes --file="$nix_path/default.nix"
+        tmpdir=$(mktemp -d)
+        cp -R $(nix-build $nixpkgs --no-out-link -A rebar3.src)/* "$tmpdir"
+        (cd "$tmpdir" && rebar3 nix lock -o "$nix_path/rebar-deps.nix")
+      else
+        echo "rebar3 is already up-to-date"
+      fi
+    '';
   };
-}
+  rebar3WithPlugins = { plugins ? [ ], globalPlugins ? [ ] }:
+    let
+      pluginLibDirs = map (p: "${p}/lib/erlang/lib") (lib.unique (plugins ++ globalPlugins));
+      globalPluginNames = lib.unique (map (p: p.packageName) globalPlugins);
+      rebar3Patched = (rebar3.overrideAttrs (old: {
+
+        # skip-plugins.patch is necessary because otherwise rebar3 will always
+        # try to fetch plugins if they are not already present in _build.
+        #
+        # global-deps.patch makes it possible to use REBAR_GLOBAL_PLUGINS to
+        # instruct rebar3 to always load a certain plugin. It is necessary since
+        # REBAR_GLOBAL_CONFIG_DIR doesn't seem to work for this.
+        patches = [ ./skip-plugins.patch ./global-plugins.patch ];
+
+        # our patches cause the tests to fail
+        doCheck = false;
+      }));
+    in stdenv.mkDerivation {
+      pname = "rebar3-with-plugins";
+      inherit (rebar3) version;
+      nativeBuildInputs = [ erlang makeWrapper ];
+      unpackPhase = "true";
+
+      # Here we extract the rebar3 escript (like `rebar3_prv_local_install.erl`) and
+      # add plugins to the code path.
+
+      installPhase = ''
+        erl -noshell -eval '
+          {ok, Escript} = escript:extract("${rebar3Patched}/bin/rebar3", []),
+          {archive, Archive} = lists:keyfind(archive, 1, Escript),
+          {ok, _} = zip:extract(Archive, [{cwd, "'$out/lib'"}]),
+          init:stop(0)
+        '
+        cp ${./rebar_ignore_deps.erl} rebar_ignore_deps.erl
+        erlc -o $out/lib/rebar/ebin rebar_ignore_deps.erl
+        mkdir -p $out/bin
+        makeWrapper ${erlang}/bin/erl $out/bin/rebar3 \
+          --set REBAR_GLOBAL_PLUGINS "${toString globalPluginNames} rebar_ignore_deps" \
+          --suffix-each ERL_LIBS ":" "$out/lib ${toString pluginLibDirs}" \
+          --add-flags "+sbtu +A1 -noshell -boot start_clean -s rebar3 main -extra"
+      '';
+    };
+in { inherit rebar3 rebar3WithPlugins; }
diff --git a/pkgs/development/tools/build-managers/rebar3/global-plugins.patch b/pkgs/development/tools/build-managers/rebar3/global-plugins.patch
new file mode 100644
index 00000000000..9a8bb48f988
--- /dev/null
+++ b/pkgs/development/tools/build-managers/rebar3/global-plugins.patch
@@ -0,0 +1,14 @@
+diff --git a/src/rebar_plugins.erl b/src/rebar_plugins.erl
+index f2d22233..bee2cf18 100644
+--- a/src/rebar_plugins.erl
++++ b/src/rebar_plugins.erl
+@@ -30,7 +30,8 @@ project_plugins_install(State) ->
+ top_level_install(State) ->
+     Profiles = rebar_state:current_profiles(State),
+     lists:foldl(fun(Profile, StateAcc) ->
+-                        Plugins = rebar_state:get(State, {plugins, Profile}, []),
++                        Plugins = rebar_state:get(State, {plugins, Profile}, [])
++                            ++ [list_to_atom(P) || P <- string:lexemes(os:getenv("REBAR_GLOBAL_PLUGINS", ""), " ")],
+                         handle_plugins(Profile, Plugins, StateAcc)
+                 end, State, Profiles).
+ 
diff --git a/pkgs/development/tools/build-managers/rebar3/rebar-deps.nix b/pkgs/development/tools/build-managers/rebar3/rebar-deps.nix
new file mode 100644
index 00000000000..34c4821aaec
--- /dev/null
+++ b/pkgs/development/tools/build-managers/rebar3/rebar-deps.nix
@@ -0,0 +1,118 @@
+# Generated by rebar3_nix
+let fetchOnly = { src, ... }: src;
+in { builder ? fetchOnly, fetchHex, fetchFromGitHub, overrides ? (x: y: { }) }:
+let
+  self = packages // (overrides self packages);
+  packages = with self; {
+    ssl_verify_fun = builder {
+      name = "ssl_verify_fun";
+      version = "1.1.6";
+      src = fetchHex {
+        pkg = "ssl_verify_fun";
+        version = "1.1.6";
+        sha256 = "sha256-vbDSRx9FPIj/OQjnaG+G+b4yfQZcwewW+kVAGX6gRoA=";
+      };
+      beamDeps = [ ];
+    };
+    relx = builder {
+      name = "relx";
+      version = "4.4.0";
+      src = fetchHex {
+        pkg = "relx";
+        version = "4.4.0";
+        sha256 = "sha256-VcDtY7tdVeuYOhnrlNfzB1320Sbb3/QxAqZmCpH86SU=";
+      };
+      beamDeps = [ bbmustache ];
+    };
+    providers = builder {
+      name = "providers";
+      version = "1.8.1";
+      src = fetchHex {
+        pkg = "providers";
+        version = "1.8.1";
+        sha256 = "sha256-5FdFrenEdqmkaeoIQOQYqxk2DcRPAaIzME4RikRIa6A=";
+      };
+      beamDeps = [ getopt ];
+    };
+    getopt = builder {
+      name = "getopt";
+      version = "1.0.1";
+      src = fetchHex {
+        pkg = "getopt";
+        version = "1.0.1";
+        sha256 = "sha256-U+Grg7nOtlyWctPno1uAkum9ybPugHIUcaFhwQxZlZw=";
+      };
+      beamDeps = [ ];
+    };
+    eunit_formatters = builder {
+      name = "eunit_formatters";
+      version = "0.5.0";
+      src = fetchHex {
+        pkg = "eunit_formatters";
+        version = "0.5.0";
+        sha256 = "sha256-1si6ITQklE5uBbvAl8MgAc3Qq+OSXQJFTyKbINaHY8k=";
+      };
+      beamDeps = [ ];
+    };
+    erlware_commons = builder {
+      name = "erlware_commons";
+      version = "1.5.0";
+      src = fetchHex {
+        pkg = "erlware_commons";
+        version = "1.5.0";
+        sha256 = "sha256-PnxvsrpMKbDdXf6dAxtmRJ4giOzsGoFGW9n94F7X0Ns=";
+      };
+      beamDeps = [ cf ];
+    };
+    cth_readable = builder {
+      name = "cth_readable";
+      version = "1.5.1";
+      src = fetchHex {
+        pkg = "cth_readable";
+        version = "1.5.1";
+        sha256 = "sha256-aGVBoi7+bKWkGgR7OVFsLdKPs8reXySi8ZFFs5Z/nYA=";
+      };
+      beamDeps = [ cf ];
+    };
+    cf = builder {
+      name = "cf";
+      version = "0.3.1";
+      src = fetchHex {
+        pkg = "cf";
+        version = "0.3.1";
+        sha256 = "sha256-MV6NRH06SwK82/o5etA7u5iKbgqm9E063Q9OPDv5dnI=";
+      };
+      beamDeps = [ ];
+    };
+    certifi = builder {
+      name = "certifi";
+      version = "2.6.1";
+      src = fetchHex {
+        pkg = "certifi";
+        version = "2.6.1";
+        sha256 = "sha256-UkyXtJkbOEndXBemMSI4licsawr0RneLpGdaHf9Tu34=";
+      };
+      beamDeps = [ ];
+    };
+    bbmustache = builder {
+      name = "bbmustache";
+      version = "1.10.0";
+      src = fetchHex {
+        pkg = "bbmustache";
+        version = "1.10.0";
+        sha256 = "sha256-Q+/6P9S7lSMVevWp4idsSTSVuEWfyHNxRKoYbLE84u4=";
+      };
+      beamDeps = [ ];
+    };
+    meck = builder {
+      name = "meck";
+      version = "0.8.13";
+      src = fetchHex {
+        pkg = "meck";
+        version = "0.8.13";
+        sha256 = "sha256-008BPBVttRrVfMVWiRuXIOahwd9f4uFa+ZnITWzr6xo=";
+      };
+      beamDeps = [ ];
+    };
+  };
+in self
diff --git a/pkgs/development/tools/build-managers/rebar3/rebar3-nix-bootstrap b/pkgs/development/tools/build-managers/rebar3/rebar3-nix-bootstrap
deleted file mode 100755
index f1deed1df35..00000000000
--- a/pkgs/development/tools/build-managers/rebar3/rebar3-nix-bootstrap
+++ /dev/null
@@ -1,267 +0,0 @@
-#!/usr/bin/env escript
-%% -*- erlang-indent-level: 4;indent-tabs-mode: nil -*-
-%%! -smp enable
-%%% ---------------------------------------------------------------------------
-%%% @doc
-%%% The purpose of this command is to prepare a rebar3 project so that
-%%% rebar3 understands that the dependencies are all already
-%%% installed. If you want a hygienic build on nix then you must run
-%%% this command before running rebar3. I suggest that you add a
-%%% `Makefile` to your project and have the bootstrap command be a
-%%% dependency of the build commands. See the nix documentation for
-%%% more information.
-%%%
-%%% This command designed to have as few dependencies as possible so
-%%% that it can be a dependency of root level packages like rebar3. To
-%%% that end it does many things in a fairly simplistic way. That is
-%%% by design.
-%%%
-%%% ### Assumptions
-%%%
-%%% This command makes the following assumptions:
-%%%
-%%% * It is run in a nix-shell or nix-build environment
-%%% * that all dependencies have been added to the ERL_LIBS
-%%%   Environment Variable
-
--record(data, {version
-              , debug_info = false
-              , compile_ports
-              , erl_libs
-              , plugins
-              , root
-              , name}).
-
--define(HEX_REGISTRY_PATH, ".cache/rebar3/hex/default/registry").
-
-main(Args) ->
-    {ok, ArgData} = parse_args(Args),
-    {ok, RequiredData} = gather_required_data_from_the_environment(ArgData),
-    do_the_bootstrap(RequiredData).
-
--spec do_the_bootstrap(#data{}) -> ok.
-do_the_bootstrap(RequiredData) ->
-    ok = bootstrap_configs(RequiredData),
-    ok = bootstrap_plugins(RequiredData),
-    ok = bootstrap_libs(RequiredData).
-
-%% @doc
-%% Argument parsing is super simple only because we want to keep the
-%% dependencies minimal. For now there can be one entry on the
-%% command line: "debug-info"
--spec parse_args([string()]) -> #data{}.
-parse_args(Args0) ->
-    PossibleArgs = sets:from_list(["debug-info"]),
-    Args1 = sets:from_list(Args0),
-    Result = sets:subtract(Args1, PossibleArgs),
-    case sets:to_list(Result) of
-        [] ->
-            {ok, #data{debug_info = sets:is_element("debug-info", Args1)}};
-        UnknownArgs ->
-            io:format("Unexpected command line arguments passed in: ~p~n",
-                      [UnknownArgs]),
-            erlang:halt(120)
-    end.
-
-
--spec bootstrap_configs(#data{}) -> ok.
-bootstrap_configs(RequiredData)->
-    io:format("Boostrapping app and rebar configurations~n"),
-    ok = if_single_app_project_update_app_src_version(RequiredData),
-    ok = if_compile_ports_add_pc_plugin(RequiredData),
-    ok = if_debug_info_add(RequiredData).
-
--spec bootstrap_plugins(#data{}) -> ok.
-bootstrap_plugins(#data{plugins = Plugins}) ->
-    io:format("Bootstrapping rebar3 plugins~n"),
-    Target = "_build/default/plugins/",
-    Paths = string:tokens(Plugins, " "),
-    CopiableFiles =
-        lists:foldl(fun(Path, Acc) ->
-                            gather_dependency(Path) ++ Acc
-                    end, [], Paths),
-    lists:foreach(fun (Path) ->
-                          ok = link_app(Path, Target)
-                  end, CopiableFiles).
-
--spec bootstrap_libs(#data{}) -> ok.
-bootstrap_libs(#data{erl_libs = ErlLibs}) ->
-    io:format("Bootstrapping dependent libraries~n"),
-    Target = "_build/default/lib/",
-    Paths = string:tokens(ErlLibs, ":"),
-    CopiableFiles =
-        lists:foldl(fun(Path, Acc) ->
-                            gather_directory_contents(Path) ++ Acc
-                    end, [], Paths),
-    lists:foreach(fun (Path) ->
-                          ok = link_app(Path, Target)
-                  end, CopiableFiles).
-
--spec gather_dependency(string()) -> [{string(), string()}].
-gather_dependency(Path) ->
-    FullLibrary = filename:join(Path, "lib/erlang/lib/"),
-    case filelib:is_dir(FullLibrary) of
-        true ->
-            gather_directory_contents(FullLibrary);
-        false ->
-            [raw_hex(Path)]
-    end.
-
--spec raw_hex(string()) -> {string(), string()}.
-raw_hex(Path) ->
-    [_, Name] = re:split(Path, "-hex-source-"),
-    {Path, erlang:binary_to_list(Name)}.
-
--spec gather_directory_contents(string()) -> [{string(), string()}].
-gather_directory_contents(Path) ->
-    {ok, Names} = file:list_dir(Path),
-    lists:map(fun(AppName) ->
-                 {filename:join(Path, AppName), fixup_app_name(AppName)}
-              end, Names).
-
-%% @doc
-%% Makes a symlink from the directory pointed at by Path to a
-%% directory of the same name in Target. So if we had a Path of
-%% {`foo/bar/baz/bash`, `baz`} and a Target of `faz/foo/foos`, the symlink
-%% would be `faz/foo/foos/baz`.
--spec link_app({string(), string()}, string()) -> ok.
-link_app({Path, TargetFile}, TargetDir) ->
-    Target = filename:join(TargetDir, TargetFile),
-    make_symlink(Path, Target).
-
--spec make_symlink(string(), string()) -> ok.
-make_symlink(Path, TargetFile) ->
-    file:delete(TargetFile),
-    ok = filelib:ensure_dir(TargetFile),
-    io:format("Making symlink from ~s to ~s~n", [Path, TargetFile]),
-    ok = file:make_symlink(Path, TargetFile).
-
-%% @doc
-%% This takes an app name in the standard OTP <name>-<version> format
-%% and returns just the app name. Why? Because rebar doesn't
-%% respect OTP conventions in some cases.
--spec fixup_app_name(string()) -> string().
-fixup_app_name(FileName) ->
-    case string:tokens(FileName, "-") of
-        [Name] -> Name;
-        [Name, _Version] -> Name;
-        [Name, _Version, _Tag] -> Name
-    end.
-
--spec gather_required_data_from_the_environment(#data{}) -> {ok, #data{}}.
-gather_required_data_from_the_environment(ArgData) ->
-    {ok, ArgData#data{ version = guard_env("version")
-                     , erl_libs = get_env("ERL_LIBS", [])
-                     , plugins = get_env("buildPlugins", [])
-                     , root = code:root_dir()
-                     , name = guard_env("name")
-                     , compile_ports = nix2bool(get_env("compilePorts", ""))}}.
-
--spec nix2bool(any()) -> boolean().
-nix2bool("1") ->
-    true;
-nix2bool("") ->
-    false.
-
-get_env(Name) ->
-    os:getenv(Name).
-get_env(Name, Def) ->
-    case get_env(Name) of
-        false -> Def;
-        Val ->   Val
-    end.
-
--spec guard_env(string()) -> string().
-guard_env(Name) ->
-    case get_env(Name) of
-        false ->
-            stderr("Expected Environment variable ~s! Are you sure you are "
-                   "running in a Nix environment? Either a nix-build, "
-                   "nix-shell, etc?~n", [Name]),
-            erlang:halt(1);
-        Variable ->
-            Variable
-    end.
-
-%% @doc
-%% If debug info is set we need to add debug info to the list of compile options
-%%
--spec if_debug_info_add(#data{}) -> ok.
-if_debug_info_add(#data{debug_info = true}) ->
-    ConfigTerms = add_debug_info(read_rebar_config()),
-    Text = lists:map(fun(Term) -> io_lib:format("~tp.~n", [Term]) end,
-                     ConfigTerms),
-    file:write_file("rebar.config", Text);
-if_debug_info_add(_) ->
-    ok.
-
--spec add_debug_info([term()]) -> [term()].
-add_debug_info(Config) ->
-    ExistingOpts = case lists:keysearch(erl_opts, 1, Config) of
-                       {value, {erl_opts, ExistingOptsList}} -> ExistingOptsList;
-                       _ -> []
-                   end,
-    case lists:member(debug_info, ExistingOpts) of
-        true ->
-            Config;
-        false ->
-            lists:keystore(erl_opts, 1, Config,
-                           {erl_opts, [debug_info | ExistingOpts]})
-    end.
-
-
-%% @doc
-%% If the compile ports flag is set, rewrite the rebar config to
-%% include the 'pc' plugin.
--spec if_compile_ports_add_pc_plugin(#data{}) -> ok.
-if_compile_ports_add_pc_plugin(#data{compile_ports = true}) ->
-    ConfigTerms = add_pc_to_plugins(read_rebar_config()),
-    Text = lists:map(fun(Term) -> io_lib:format("~tp.~n", [Term]) end,
-                     ConfigTerms),
-    file:write_file("rebar.config", Text);
-if_compile_ports_add_pc_plugin(_) ->
-    ok.
-
--spec add_pc_to_plugins([term()]) -> [term()].
-add_pc_to_plugins(Config) ->
-    PluginList = case lists:keysearch(plugins, 1, Config) of
-                     {value, {plugins, ExistingPluginList}} -> ExistingPluginList;
-                     _ -> []
-                 end,
-    lists:keystore(plugins, 1, Config, {plugins, [pc | PluginList]}).
-
--spec read_rebar_config() -> [term()].
-read_rebar_config() ->
-    case file:consult("rebar.config") of
-        {ok, Terms} ->
-            Terms;
-        _ ->
-            stderr("Unable to read rebar config!", []),
-            erlang:halt(1)
-    end.
-
-
--spec if_single_app_project_update_app_src_version(#data{}) -> ok.
-if_single_app_project_update_app_src_version(#data{name = Name,
-                                                   version = Version}) ->
-    SrcFile = filename:join("src",
-                            lists:concat([Name, ".app.src"])),
-
-    case filelib:is_file(SrcFile) of
-        true ->
-            update_app_src_with_version(SrcFile, Version);
-        false ->
-            ok
-    end.
-
--spec update_app_src_with_version(string(), string()) -> ok.
-update_app_src_with_version(SrcFile, Version) ->
-    {ok, [{application, Name, Details}]} = file:consult(SrcFile),
-    NewDetails = lists:keyreplace(vsn, 1, Details, {vsn, Version}),
-    ok = file:write_file(SrcFile, io_lib:fwrite("~p.\n", [{application, Name, NewDetails}])).
-
-%% @doc
-%% Write the result of the format string out to stderr.
--spec stderr(string(), [term()]) -> ok.
-stderr(FormatStr, Args) ->
-    io:put_chars(standard_error, io_lib:format(FormatStr, Args)).
diff --git a/pkgs/development/tools/build-managers/rebar3/rebar_ignore_deps.erl b/pkgs/development/tools/build-managers/rebar3/rebar_ignore_deps.erl
new file mode 100644
index 00000000000..3e0ae67c453
--- /dev/null
+++ b/pkgs/development/tools/build-managers/rebar3/rebar_ignore_deps.erl
@@ -0,0 +1,43 @@
+%% This module, when loaded as a plugin, overrides the default `install_deps`
+%% provider and erases the dependencies from the rebar3 state, when
+%% REBAR_IGNORE_DEPS is true.
+
+-module(rebar_ignore_deps).
+
+-export([init/1, do/1, format_error/1]).
+
+init(State0) ->
+    case os:getenv("REBAR_IGNORE_DEPS", "") of
+        "" ->
+            {ok, State0};
+        _ ->
+            do_init(State0)
+    end.
+
+do_init(State0) ->
+    State1 = rebar_state:allow_provider_overrides(State0, true),
+    Provider = providers:create(
+                 [
+                  {name, install_deps}, %% override the default install_deps provider
+                  {module, ?MODULE},
+                  {bare, false},
+                  {deps, [app_discovery]},
+                  {example, undefined},
+                  {opts, []},
+                  {short_desc, ""},
+                  {desc, ""}
+                 ]),
+    State2 = rebar_state:add_provider(State1, Provider),
+    {ok, rebar_state:allow_provider_overrides(State2, false)}.
+
+do(State0) ->
+    io:format("Ignoring deps...~n"),
+    Profiles = rebar_state:current_profiles(State0),
+    State = lists:foldl(fun(P, Acc0) ->
+                                 Acc = rebar_state:set(Acc0, {deps, P}, []),
+                                 rebar_state:set(Acc, {parsed_deps, P}, [])
+                         end, State0, Profiles),
+    {ok, State}.
+
+format_error(Reason) ->
+    io_lib:format("~p", [Reason]).
diff --git a/pkgs/development/tools/build-managers/rebar3/skip-plugins.patch b/pkgs/development/tools/build-managers/rebar3/skip-plugins.patch
new file mode 100644
index 00000000000..3ee1656c9ed
--- /dev/null
+++ b/pkgs/development/tools/build-managers/rebar3/skip-plugins.patch
@@ -0,0 +1,54 @@
+diff --git a/src/rebar_plugins.erl b/src/rebar_plugins.erl
+index f2d22233..c61fa553 100644
+--- a/src/rebar_plugins.erl
++++ b/src/rebar_plugins.erl
+@@ -106,31 +106,9 @@ handle_plugins(Profile, Plugins, State, Upgrade) ->
+     State3 = rebar_state:set(State2, deps_dir, DepsDir),
+     rebar_state:lock(State3, Locks).
+ 
+-handle_plugin(Profile, Plugin, State, Upgrade) ->
++handle_plugin(_Profile, Plugin, State, _Upgrade) ->
+     try
+-        {Apps, State2} = rebar_prv_install_deps:handle_deps_as_profile(Profile, State, [Plugin], Upgrade),
+-        {no_cycle, Sorted} = rebar_prv_install_deps:find_cycles(Apps),
+-        ToBuild = rebar_prv_install_deps:cull_compile(Sorted, []),
+-
+-        %% Add already built plugin deps to the code path
+-        ToBuildPaths = [rebar_app_info:ebin_dir(A) || A <- ToBuild],
+-        PreBuiltPaths = [Ebin || A <- Apps,
+-                                 Ebin <- [rebar_app_info:ebin_dir(A)],
+-                                 not lists:member(Ebin, ToBuildPaths)],
+-        code:add_pathsa(PreBuiltPaths),
+-
+-        %% Build plugin and its deps
+-        build_plugins(ToBuild, Apps, State2),
+-
+-        %% Add newly built deps and plugin to code path
+-        State3 = rebar_state:update_all_plugin_deps(State2, Apps),
+-        NewCodePaths = [rebar_app_info:ebin_dir(A) || A <- ToBuild],
+-
+-        %% Store plugin code paths so we can remove them when compiling project apps
+-        State4 = rebar_state:update_code_paths(State3, all_plugin_deps, PreBuiltPaths++NewCodePaths),
+-        rebar_paths:set_paths([plugins], State4),
+-
+-        {plugin_providers(Plugin), State4}
++        {plugin_providers(Plugin), State}
+     catch
+         ?WITH_STACKTRACE(C,T,S)
+             ?DEBUG("~p ~p ~p", [C, T, S]),
+@@ -138,15 +116,6 @@ handle_plugin(Profile, Plugin, State, Upgrade) ->
+             {[], State}
+     end.
+ 
+-build_plugins(MustBuildApps, AllApps, State) ->
+-    State1 = rebar_state:deps_to_build(State, MustBuildApps),
+-    State2 = rebar_state:all_deps(State1, AllApps),
+-    State3 = rebar_state:set(State2, deps_dir, ?DEFAULT_PLUGINS_DIR),
+-    {Args, Extra} = rebar_state:command_parsed_args(State),
+-    State4 = rebar_state:command_parsed_args(State3, {[{deps_only, true}|Args], Extra}),
+-    rebar_prv_compile:do(State4),
+-    ok.
+-
+ plugin_providers({Plugin, _, _, _}) when is_atom(Plugin) ->
+     validate_plugin(Plugin);
+ plugin_providers({Plugin, _, _}) when is_atom(Plugin) ->
diff --git a/pkgs/development/tools/build-managers/rebar3/tmp-tests-skip.patch b/pkgs/development/tools/build-managers/rebar3/tmp-tests-skip.patch
new file mode 100644
index 00000000000..b90e0f9d2bb
--- /dev/null
+++ b/pkgs/development/tools/build-managers/rebar3/tmp-tests-skip.patch
@@ -0,0 +1,17 @@
+diff --git a/test/rebar_file_utils_SUITE.erl b/test/rebar_file_utils_SUITE.erl
+index d771a82..05cfbf7 100644
+--- a/test/rebar_file_utils_SUITE.erl
++++ b/test/rebar_file_utils_SUITE.erl
+@@ -34,13 +34,11 @@
+
+ all() ->
+     [{group, tmpdir},
+-     {group, reset_dir},
+      {group, mv},
+      path_from_ancestor,
+      canonical_path,
+      absolute_path,
+      normalized_path,
+-     resolve_link,
+      split_dirname,
+      mv_warning_is_ignored].
diff --git a/pkgs/development/tools/build-managers/redo-apenwarr/default.nix b/pkgs/development/tools/build-managers/redo-apenwarr/default.nix
index c62fb0f2515..638f10f0187 100644
--- a/pkgs/development/tools/build-managers/redo-apenwarr/default.nix
+++ b/pkgs/development/tools/build-managers/redo-apenwarr/default.nix
@@ -30,7 +30,7 @@
       --replace "/bin/ls" "ls"
 
     substituteInPlace t/110-compile/hello.o.do \
-      --replace "/usr/include" "${stdenv.lib.getDev stdenv.cc.libc}/include"
+      --replace "/usr/include" "${lib.getDev stdenv.cc.libc}/include"
 
     substituteInPlace t/200-shell/nonshelltest.do \
       --replace "/usr/bin/env perl" "${perl}/bin/perl"
diff --git a/pkgs/development/tools/build-managers/redo-c/Makefile b/pkgs/development/tools/build-managers/redo-c/Makefile
index f2c43cc5003..5a1dd74c5b8 100644
--- a/pkgs/development/tools/build-managers/redo-c/Makefile
+++ b/pkgs/development/tools/build-managers/redo-c/Makefile
@@ -1,4 +1,4 @@
-CFLAGS=-Os
+CFLAGS ?= -Os
 
 all: redo links
 
diff --git a/pkgs/development/tools/build-managers/redo-c/default.nix b/pkgs/development/tools/build-managers/redo-c/default.nix
index 1480f32a50f..14d33cba039 100644
--- a/pkgs/development/tools/build-managers/redo-c/default.nix
+++ b/pkgs/development/tools/build-managers/redo-c/default.nix
@@ -1,20 +1,20 @@
-{ stdenv, fetchFromGitHub }:
+{ lib, stdenv, fetchFromGitHub }:
 stdenv.mkDerivation rec {
   pname = "redo-c";
-  version = "0.2";
+  version = "0.3";
 
   src = fetchFromGitHub {
     owner = "leahneukirchen";
     repo = pname;
     rev = "v${version}";
-    sha256 = "11wc2sgw1ssdm83cjdc6ndnp1bv5mzhbw7njw47mk7ri1ic1x51b";
+    sha256 = "sha256-oZcaBgESIaD7/SUBE7luh7axucKTEzXPVkQAQs2NCXE=";
   };
 
   postPatch = ''
     cp '${./Makefile}' Makefile
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "An implementation of the redo build system in portable C with zero dependencies";
     homepage = "https://github.com/leahneukirchen/redo-c";
     license = licenses.cc0;
diff --git a/pkgs/development/tools/build-managers/redo-sh/default.nix b/pkgs/development/tools/build-managers/redo-sh/default.nix
index d8c6cdf1888..093a825723c 100644
--- a/pkgs/development/tools/build-managers/redo-sh/default.nix
+++ b/pkgs/development/tools/build-managers/redo-sh/default.nix
@@ -1,15 +1,15 @@
-{ stdenv, fetchurl, makeWrapper }:
+{ lib, stdenv, fetchurl, makeWrapper, coreutils }:
 
 stdenv.mkDerivation {
-  version = "2.0.3";
+  version = "4.0.4";
   pname = "redo-sh";
 
   src = fetchurl {
     url = "http://news.dieweltistgarnichtso.net/bin/archives/redo-sh.tar.gz";
-    sha256 = "1ycx3hik7vnlbwxacn1dzr48fwsn2ials0sg6k9l3gcyrha5wf1n";
+    sha256 = "0d3hz3vy5qmjr9r4f8a5cx9hikpzs8h8f0fsl3dpbialf4wck24g";
   };
 
-  buildInputs = [ makeWrapper ];
+  nativeBuildInputs = [ makeWrapper ];
 
   sourceRoot = ".";
   installPhase = ''
@@ -17,15 +17,15 @@ stdenv.mkDerivation {
     mv man "$out/share"
     mv bin "$out"
     for p in $out/bin/*; do
-      wrapProgram "$p" --suffix PATH : "$out/bin"
+      wrapProgram "$p" --prefix PATH : "$out/bin:${coreutils}/bin"
     done
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Redo implementation in Bourne Shell";
     homepage = "http://news.dieweltistgarnichtso.net/bin/redo-sh.html";
     license  = licenses.agpl3;
-    platforms = platforms.linux;
+    platforms = platforms.unix;
     maintainers = with maintainers; [ sternenseemann ];
   };
 }
diff --git a/pkgs/development/tools/build-managers/redo/default.nix b/pkgs/development/tools/build-managers/redo/default.nix
index a735a05dc5b..f16e91d3bfb 100644
--- a/pkgs/development/tools/build-managers/redo/default.nix
+++ b/pkgs/development/tools/build-managers/redo/default.nix
@@ -1,9 +1,10 @@
-{stdenv, fetchurl, perl }:
+{lib, stdenv, fetchurl, perl }:
 
 stdenv.mkDerivation rec {
-  name = "redo-1.4";
+  pname = "redo";
+  version = "1.4";
   src = fetchurl {
-    url = "https://jdebp.eu./Repository/freebsd/${name}.tar.gz";
+    url = "https://jdebp.eu./Repository/freebsd/${pname}-${version}.tar.gz";
     sha256 = "1c8gr5h77v4fw78zkhbm9z9adqs3kd7xvxwnmci2zvlf4bqqk4jv";
   };
 
@@ -21,8 +22,8 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "https://jdebp.eu./Softwares/redo/";
     description = "A system for building target files from source files";
-    license = stdenv.lib.licenses.bsd2;
-    maintainers = [ stdenv.lib.maintainers.vrthra ];
-    platforms = stdenv.lib.platforms.unix;
+    license = lib.licenses.bsd2;
+    maintainers = [ lib.maintainers.vrthra ];
+    platforms = lib.platforms.unix;
   };
 }
diff --git a/pkgs/development/tools/build-managers/remake/default.nix b/pkgs/development/tools/build-managers/remake/default.nix
index 7d44bc74df8..dc3920d1747 100644
--- a/pkgs/development/tools/build-managers/remake/default.nix
+++ b/pkgs/development/tools/build-managers/remake/default.nix
@@ -1,27 +1,40 @@
-{ stdenv, fetchurl, readline }:
+{ lib
+, stdenv
+, fetchurl
+, pkg-config
+, readline
+, guileSupport ? false
+, guile
+}:
 
 stdenv.mkDerivation rec {
   pname = "remake";
-  remakeVersion = "4.1";
-  dbgVersion = "1.1";
+  remakeVersion = "4.3";
+  dbgVersion = "1.5";
   version = "${remakeVersion}+dbg-${dbgVersion}";
 
   src = fetchurl {
-    url = "mirror://sourceforge/project/bashdb/remake/${version}/remake-${remakeVersion}+dbg${dbgVersion}.tar.bz2";
-    sha256 = "1zi16pl7sqn1aa8b7zqm9qnd9vjqyfywqm8s6iap4clf86l7kss2";
+    url = "mirror://sourceforge/project/bashdb/remake/${version}/remake-${remakeVersion}+dbg-${dbgVersion}.tar.gz";
+    sha256 = "0xlx2485y0israv2pfghmv74lxcv9i5y65agy69mif76yc4vfvif";
   };
 
   patches = [
     ./glibc-2.27-glob.patch
   ];
 
-  buildInputs = [ readline ];
+  nativeBuildInputs = [
+    pkg-config
+  ];
+  buildInputs = [ readline ]
+    ++ lib.optionals guileSupport [ guile ];
+
+  # make check fails, see https://github.com/rocky/remake/issues/117
 
   meta = {
     homepage = "http://bashdb.sourceforge.net/remake/";
-    license = stdenv.lib.licenses.gpl3;
+    license = lib.licenses.gpl3Plus;
     description = "GNU Make with comprehensible tracing and a debugger";
-    platforms = with stdenv.lib.platforms; linux ++ darwin;
-    maintainers = with stdenv.lib.maintainers; [ bjornfor ];
+    platforms = with lib.platforms; linux ++ darwin;
+    maintainers = with lib.maintainers; [ bjornfor shamilton ];
   };
 }
diff --git a/pkgs/development/tools/build-managers/rocm-cmake/default.nix b/pkgs/development/tools/build-managers/rocm-cmake/default.nix
index f146929019f..68cd3d449ca 100644
--- a/pkgs/development/tools/build-managers/rocm-cmake/default.nix
+++ b/pkgs/development/tools/build-managers/rocm-cmake/default.nix
@@ -1,23 +1,23 @@
-{ stdenv, fetchFromGitHub, cmake }:
+{ lib, stdenv, fetchFromGitHub, cmake }:
 
 stdenv.mkDerivation rec {
   pname = "rocm-cmake";
-  version = "3.7.0";
+  version = "4.1.0";
 
   src = fetchFromGitHub {
     owner = "RadeonOpenCompute";
     repo = "rocm-cmake";
     rev = "rocm-${version}";
-    sha256 = "1x1mj1acarhin319zycms8sqm9ylw2mcdbkpqjlb8yfsgiaa99ja";
+    hash = "sha256-uK060F7d7/pTCNbGqdKCzxgPrPPbGjNwuUOt176z7EM=";
   };
 
   nativeBuildInputs = [ cmake ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "CMake modules for common build tasks for the ROCm stack";
     homepage = "https://github.com/RadeonOpenCompute/rocm-cmake";
     license = licenses.mit;
-    maintainers = with maintainers; [ danieldk ];
-    platforms = platforms.linux;
+    maintainers = with maintainers; [ ];
+    platforms = platforms.unix;
   };
 }
diff --git a/pkgs/development/tools/build-managers/samurai/default.nix b/pkgs/development/tools/build-managers/samurai/default.nix
index f8b649e0409..1fb4206d5ce 100644
--- a/pkgs/development/tools/build-managers/samurai/default.nix
+++ b/pkgs/development/tools/build-managers/samurai/default.nix
@@ -1,19 +1,19 @@
-{ stdenv, fetchFromGitHub }:
+{ lib, stdenv, fetchFromGitHub }:
 
 stdenv.mkDerivation rec {
   pname = "samurai";
-  version = "1.1";
+  version = "1.2";
 
   src = fetchFromGitHub {
     owner = "michaelforney";
     repo = pname;
     rev = version;
-    sha256 = "0k0amxpi3v9v68a8vc69r4b86xs12vhzm0wxd7f11vap1pnqz2cz";
+    sha256 = "sha256-RPY3MFlnSDBZ5LOkdWnMiR/CZIBdqIFo9uLU+SAKPBI=";
   };
 
   makeFlags = [ "DESTDIR=" "PREFIX=${placeholder "out"}" ];
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "ninja-compatible build tool written in C";
     homepage = "https://github.com/michaelforney/samurai";
     license = with licenses; [ mit asl20 ]; # see LICENSE
diff --git a/pkgs/development/tools/build-managers/sbt-extras/default.nix b/pkgs/development/tools/build-managers/sbt-extras/default.nix
index 968907c0d51..76548e427d2 100644
--- a/pkgs/development/tools/build-managers/sbt-extras/default.nix
+++ b/pkgs/development/tools/build-managers/sbt-extras/default.nix
@@ -1,39 +1,77 @@
-{ stdenv, fetchFromGitHub, which, curl, makeWrapper, jdk }:
+{ lib, stdenv, fetchFromGitHub, which, curl, makeWrapper, jdk, writeScript
+, common-updater-scripts, cacert, git, nixfmt, nix, jq, coreutils, gnused }:
 
-let
-  rev = "fa06c268993aa72fc094dce06a71182827aad395";
-  version = "2020-06-01";
-in
-stdenv.mkDerivation {
-  name = "sbt-extras-${version}";
-  inherit version;
+stdenv.mkDerivation rec {
+  pname = "sbt-extras";
+  rev = "e5a5442acf36f047a75b397d7349e6fe6835ef24";
+  version = "2021-04-26";
 
   src = fetchFromGitHub {
     owner = "paulp";
     repo = "sbt-extras";
     inherit rev;
-    sha256 = "0a4dxpvw21yi3pji1s31pp17xplmczn2f2yijn58an9m2angw83j";
+    sha256 = "0g7wyh0lhhdch7d6p118lwywy1lcdr1z631q891qhv624jnb1477";
   };
 
   dontBuild = true;
 
-  buildInputs = [ makeWrapper ];
+  nativeBuildInputs = [ makeWrapper ];
 
   installPhase = ''
+    runHook preInstall
+
     mkdir -p $out/bin
 
     substituteInPlace bin/sbt --replace 'declare java_cmd="java"' 'declare java_cmd="${jdk}/bin/java"'
 
     install bin/sbt $out/bin
 
-    wrapProgram $out/bin/sbt --prefix PATH : ${stdenv.lib.makeBinPath [ which curl ]}
+    wrapProgram $out/bin/sbt --prefix PATH : ${lib.makeBinPath [ which curl ]}
+
+    runHook postInstall
+  '';
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    $out/bin/sbt -h >/dev/null
+  '';
+
+  passthru.updateScript = writeScript "update.sh" ''
+     #!${stdenv.shell}
+     set -xo errexit
+     PATH=${
+       lib.makeBinPath [
+         common-updater-scripts
+         curl
+         cacert
+         git
+         nixfmt
+         nix
+         jq
+         coreutils
+         gnused
+       ]
+     }
+    oldVersion="$(nix-instantiate --eval -E "with import ./. {}; lib.getVersion ${pname}" | tr -d '"')"
+     latestSha="$(curl -L -s https://api.github.com/repos/paulp/sbt-extras/commits\?sha\=master\&since\=$oldVersion | jq -r '.[0].sha')"
+    if [ ! "null" = "$latestSha" ]; then
+       nixpkgs="$(git rev-parse --show-toplevel)"
+       default_nix="$nixpkgs/pkgs/development/tools/build-managers/sbt-extras/default.nix"
+       latestDate="$(curl -L -s https://api.github.com/repos/paulp/sbt-extras/commits/$latestSha | jq '.commit.committer.date' | sed 's|"\(.*\)T.*|\1|g')"
+       update-source-version ${pname} "$latestSha" --version-key=rev
+       update-source-version ${pname} "$latestDate" --ignore-same-hash
+       nixfmt "$default_nix"
+     else
+       echo "${pname} is already up-to-date"
+     fi
   '';
 
   meta = {
-    description = "A more featureful runner for sbt, the simple/scala/standard build tool";
+    description =
+      "A more featureful runner for sbt, the simple/scala/standard build tool";
     homepage = "https://github.com/paulp/sbt-extras";
-    license = stdenv.lib.licenses.bsd3;
-    maintainers = with stdenv.lib.maintainers; [ puffnfresh ];
-    platforms = stdenv.lib.platforms.unix;
+    license = lib.licenses.bsd3;
+    maintainers = with lib.maintainers; [ nequissimus puffnfresh ];
+    platforms = lib.platforms.unix;
   };
 }
diff --git a/pkgs/development/tools/build-managers/sbt/default.nix b/pkgs/development/tools/build-managers/sbt/default.nix
index 2eb36434406..677b31063ac 100644
--- a/pkgs/development/tools/build-managers/sbt/default.nix
+++ b/pkgs/development/tools/build-managers/sbt/default.nix
@@ -1,28 +1,42 @@
-{ stdenv, fetchurl, jre }:
+{ lib
+, stdenv
+, fetchurl
+, jre
+, autoPatchelfHook
+, zlib
+}:
 
 stdenv.mkDerivation rec {
   pname = "sbt";
-  version = "1.3.13";
+  version = "1.5.4";
 
   src = fetchurl {
-    urls = [
-      "https://piccolo.link/sbt-${version}.tgz"
-      "https://github.com/sbt/sbt/releases/download/v${version}/sbt-${version}.tgz"
-    ];
-    sha256 = "08mx84kzpm750zjxm225nh9wqm7js5y2k6hgb8xw3n574zg58hc5";
+    url = "https://github.com/sbt/sbt/releases/download/v${version}/sbt-${version}.tgz";
+    sha256 = "035jl4czx9ixl12z874bksq5wxdnajxr06cl1yvfj2v92yx3l5wf";
   };
 
-  patchPhase = ''
+  postPatch = ''
     echo -java-home ${jre.home} >>conf/sbtopts
   '';
 
+  nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ];
+
+  buildInputs = lib.optionals stdenv.isLinux [ zlib ];
+
   installPhase = ''
+    runHook preInstall
+
     mkdir -p $out/share/sbt $out/bin
     cp -ra . $out/share/sbt
-    ln -s $out/share/sbt/bin/sbt $out/bin/
+    ln -sT ../share/sbt/bin/sbt $out/bin/sbt
+    ln -sT ../share/sbt/bin/sbtn-x86_64-${
+      if (stdenv.isDarwin) then "apple-darwin" else "pc-linux"
+    } $out/bin/sbtn
+
+    runHook postInstall
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     homepage = "https://www.scala-sbt.org/";
     license = licenses.bsd3;
     description = "A build tool for Scala, Java and more";
diff --git a/pkgs/development/tools/build-managers/scons/common.nix b/pkgs/development/tools/build-managers/scons/common.nix
index 7a15c193423..6af30285123 100644
--- a/pkgs/development/tools/build-managers/scons/common.nix
+++ b/pkgs/development/tools/build-managers/scons/common.nix
@@ -1,6 +1,6 @@
 { version, sha256 }:
 
-{ stdenv, fetchurl, python3Packages, lib }:
+{ fetchurl, python3Packages, lib }:
 
 python3Packages.buildPythonApplication rec {
   pname = "scons";
@@ -16,12 +16,20 @@ python3Packages.buildPythonApplication rec {
   postPatch = lib.optionalString (lib.versionAtLeast version "4.0.0") ''
     substituteInPlace setup.cfg \
       --replace "build/dist" "dist"
+  '' + lib.optionalString (lib.versionAtLeast version "4.1.0") ''
+    substituteInPlace setup.cfg \
+      --replace "build/doc/man/" ""
   '';
 
   # The release tarballs don't contain any tests (runtest.py and test/*):
   doCheck = lib.versionOlder version "4.0.0";
 
-  meta = with stdenv.lib; {
+  postInstall = lib.optionalString (lib.versionAtLeast version "4.1.0") ''
+    mkdir -p "$out/share/man/man1"
+    mv "$out/"*.1 "$out/share/man/man1/"
+  '';
+
+  meta = with lib; {
     description = "An improved, cross-platform substitute for Make";
     longDescription = ''
       SCons is an Open Source software construction tool. Think of
@@ -35,6 +43,6 @@ python3Packages.buildPythonApplication rec {
     changelog = "https://raw.githubusercontent.com/SConsProject/scons/rel_${version}/src/CHANGES.txt";
     license = licenses.mit;
     platforms = platforms.all;
-    maintainers = [ maintainers.primeos ];
+    maintainers = [ ];
   };
 }
diff --git a/pkgs/development/tools/build-managers/scons/default.nix b/pkgs/development/tools/build-managers/scons/default.nix
index eb86d595597..4b07eb0501d 100644
--- a/pkgs/development/tools/build-managers/scons/default.nix
+++ b/pkgs/development/tools/build-managers/scons/default.nix
@@ -12,7 +12,7 @@ in {
     sha256 = "1yzq2gg9zwz9rvfn42v5jzl3g4qf1khhny6zfbi2hib55zvg60bq";
   }).override { python3Packages = python2Packages; };
   scons_latest = mkScons {
-    version = "4.0.1";
-    sha256 = "0z00l9wzaiqyjq0hapbvsjclvcfjjjq04kmxi7ffq966nl2d2bkj";
+    version = "4.1.0";
+    sha256 = "11axk03142ziax6i3wwy9qpqp7r3i7h5jg9y2xzph9i15rv8vlkj";
   };
 }
diff --git a/pkgs/development/tools/build-managers/shards/default.nix b/pkgs/development/tools/build-managers/shards/default.nix
index 53bc057fc13..16b2967e632 100644
--- a/pkgs/development/tools/build-managers/shards/default.nix
+++ b/pkgs/development/tools/build-managers/shards/default.nix
@@ -1,30 +1,53 @@
-{ stdenv, fetchFromGitHub, crystal }:
+{ lib
+, fetchFromGitHub
+, crystal_0_34
+, crystal_0_36
+}:
+let
+  generic =
+    { version, sha256, crystal }:
 
-crystal.buildCrystalPackage rec {
-  pname = "shards";
-  version = "0.10.0";
+    crystal.buildCrystalPackage {
+      pname = "shards";
+      inherit version;
 
-  src = fetchFromGitHub {
-    owner = "crystal-lang";
-    repo = "shards";
-    rev = "v${version}";
-    sha256 = "1bjy3hcdqq8769bx73f3pwn26rnkj23dngyfbw4iv32bw23x1d49";
-  };
+      src = fetchFromGitHub {
+        owner = "crystal-lang";
+        repo = "shards";
+        rev = "v${version}";
+        inherit sha256;
+      };
 
-  # we cannot use `make` here as it would introduce a dependency on itself
-  format = "crystal";
+      # we cannot use `make` or `shards` here as it would introduce a cyclical dependency
+      format = "crystal";
+      shardsFile = ./shards.nix;
+      crystalBinaries.shards.src = "./src/shards.cr";
 
-  shardsFile = ./shards.nix;
+      # tries to execute git which fails spectacularly
+      doCheck = false;
 
-  crystalBinaries.shards.src = "./src/shards.cr";
+      meta = with lib; {
+        description = "Dependency manager for the Crystal language";
+        license = licenses.asl20;
+        maintainers = with maintainers; [ peterhoeg ];
+        inherit (crystal.meta) homepage platforms;
+      };
+    };
 
-  # tries to execute git which fails spectacularly
-  doCheck = false;
+in
+rec {
+  # needed for anything that requires the old v1 shards format
+  shards_0_11 = generic {
+    version = "0.11.1";
+    sha256 = "05qnhc23xbmicdl4fwyxfpcvd8jq4inzh6v7jsjjw4n76vzb1f71";
+    crystal = crystal_0_34;
+  };
 
-  meta = with stdenv.lib; {
-    description = "Dependency manager for the Crystal language";
-    license = licenses.asl20;
-    maintainers = with maintainers; [ peterhoeg ];
-    inherit (crystal.meta) homepage platforms;
+  shards_0_14 = generic {
+    version = "0.14.1";
+    sha256 = "sha256-/C6whh5RbTBkFWqpn0GqyVe0opbrklm8xPv5MIG99VU=";
+    crystal = crystal_0_36;
   };
+
+  shards = shards_0_14;
 }
diff --git a/pkgs/development/tools/build-managers/shards/shards.nix b/pkgs/development/tools/build-managers/shards/shards.nix
index 901b7f6e47d..95250acf194 100644
--- a/pkgs/development/tools/build-managers/shards/shards.nix
+++ b/pkgs/development/tools/build-managers/shards/shards.nix
@@ -2,7 +2,7 @@
   molinillo = {
     owner = "crystal-lang";
     repo = "crystal-molinillo";
-    rev = "v0.1.0";
-    sha256 = "0rs0w59m6ccsgkdxfy3xv6alxsziy9sy9smz71cz0dnyvlzlnaxj";
+    rev = "v0.2.0";
+    sha256 = "0pzi8pbrjn03zgk3kbha2kqqq0crmr8gy98dr05kisafvbghzwnh";
   };
 }
diff --git a/pkgs/development/tools/build-managers/tup/default.nix b/pkgs/development/tools/build-managers/tup/default.nix
index 80ee38105ca..403adaff89e 100644
--- a/pkgs/development/tools/build-managers/tup/default.nix
+++ b/pkgs/development/tools/build-managers/tup/default.nix
@@ -1,45 +1,49 @@
-{ stdenv, fetchFromGitHub, fuse, pkgconfig, pcre }:
+{ lib, stdenv, fetchFromGitHub, fuse3, macfuse-stubs, pkg-config, pcre }:
 
-stdenv.mkDerivation rec {
+let
+  fuse = if stdenv.isDarwin then macfuse-stubs else fuse3;
+in stdenv.mkDerivation rec {
   pname = "tup";
-  version = "0.7.9";
+  version = "0.7.11";
+  outputs = [ "bin" "man" "out" ];
 
   src = fetchFromGitHub {
     owner = "gittup";
     repo = "tup";
     rev = "v${version}";
-    sha256 = "1b9rllwfdmjvfmwvzqfbqfi1flf4y9zzjmyp0dizq23gpkvhi42f";
+    hash = "sha256-Q2Y5ErcfhLChi9Wezn8+7eNXYX2UXW1fBOqEclmgzOo=";
   };
 
-  nativeBuildInputs = [ pkgconfig ];
+  nativeBuildInputs = [ pkg-config ];
   buildInputs = [ fuse pcre ];
 
   configurePhase = ''
-    sed -i 's/`git describe`/v${version}/g' src/tup/link.sh
-    sed -i 's/pcre-confg/pkg-config pcre/g' Tupfile Tuprules.tup
+    substituteInPlace  src/tup/link.sh --replace '`git describe' '`echo ${version}'
+    substituteInPlace Tuprules.tup --replace 'pcre-config' 'pkg-config libpcre'
   '';
 
   # Regular tup builds require fusermount to have suid, which nix cannot
   # currently provide in a build environment, so we bootstrap and use 'tup
   # generate' instead
   buildPhase = ''
+    runHook preBuild
     ./build.sh
     ./build/tup init
     ./build/tup generate script.sh
     ./script.sh
+    runHook postBuild
   '';
 
   installPhase = ''
-    mkdir -p $out/bin
-    cp tup $out/bin/
-
-    mkdir -p $out/share/man/man1
-    cp tup.1 $out/share/man/man1/
+    runHook preInstall
+    install -D tup -t $bin/bin/
+    install -D tup.1 -t $man/share/man/man1/
+    runHook postInstall
   '';
 
   setupHook = ./setup-hook.sh;
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "A fast, file-based build system";
     longDescription = ''
       Tup is a file-based build system for Linux, OSX, and Windows. It inputs a list
@@ -52,6 +56,13 @@ stdenv.mkDerivation rec {
     homepage = "http://gittup.org/tup/";
     license = licenses.gpl2;
     maintainers = with maintainers; [ ehmry ];
-    platforms = platforms.linux ++ platforms.darwin;
+    platforms = platforms.unix;
+
+    # TODO: Remove once nixpkgs uses newer SDKs that supports '*at' functions.
+    # Probably MacOS SDK 10.13 or later. Check the current version in
+    # ../../../../os-specific/darwin/apple-sdk/default.nix
+    #
+    # https://github.com/gittup/tup/commit/3697c74
+    broken = stdenv.isDarwin;
   };
 }
diff --git a/pkgs/development/tools/build-managers/waf/default.nix b/pkgs/development/tools/build-managers/waf/default.nix
index 49aae7c3014..4d4bb6957ea 100644
--- a/pkgs/development/tools/build-managers/waf/default.nix
+++ b/pkgs/development/tools/build-managers/waf/default.nix
@@ -1,20 +1,20 @@
-{ stdenv, fetchFromGitLab, python, ensureNewerSourcesForZipFilesHook
+{ lib, stdenv, fetchFromGitLab, python, ensureNewerSourcesForZipFilesHook
 # optional list of extra waf tools, e.g. `[ "doxygen" "pytest" ]`
 , withTools ? null
 }:
 let
-  wafToolsArg = with stdenv.lib.strings;
+  wafToolsArg = with lib.strings;
     optionalString (!isNull withTools) " --tools=\"${concatStringsSep "," withTools}\"";
 in
 stdenv.mkDerivation rec {
   pname = "waf";
-  version = "2.0.20";
+  version = "2.0.22";
 
   src = fetchFromGitLab {
     owner = "ita1024";
     repo = "waf";
     rev = "${pname}-${version}";
-    sha256 = "1xbd1lmchq9pdrplkr2db28xqafyw753qbhnrfn8pxdg3inxxqvq";
+    sha256 = "sha256-WGGyhvQdFYmC0NOA5VVqCRMF1fvfPcTI42x1nHvz0W0=";
   };
 
   buildInputs = [ python ensureNewerSourcesForZipFilesHook ];
@@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
     install -D waf $out/bin/waf
   '';
 
-  meta = with stdenv.lib; {
+  meta = with lib; {
     description = "Meta build system";
     homepage    = "https://waf.io";
     license     = licenses.bsd3;
diff --git a/pkgs/development/tools/build-managers/wafHook/default.nix b/pkgs/development/tools/build-managers/wafHook/default.nix
index 4184bd5fe8c..2131caede3c 100644
--- a/pkgs/development/tools/build-managers/wafHook/default.nix
+++ b/pkgs/development/tools/build-managers/wafHook/default.nix
@@ -1,7 +1,6 @@
-{ lib, stdenv, pkgs, python, makeSetupHook, waf }:
+{ lib, stdenv, pkgs, makeSetupHook, waf }:
 
 makeSetupHook {
-  deps = [ python ];
   substitutions = {
     inherit waf;
     crossFlags = lib.optionalString (stdenv.hostPlatform.system != stdenv.targetPlatform.system)