about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/compilers
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/compilers')
-rw-r--r--nixpkgs/pkgs/development/compilers/abcl/default.nix39
-rw-r--r--nixpkgs/pkgs/development/compilers/acme/default.nix29
-rwxr-xr-xnixpkgs/pkgs/development/compilers/adoptopenjdk-bin/generate-sources.py65
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix53
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix79
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk11-darwin.nix9
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk11-linux.nix9
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk13-darwin.nix9
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk13-linux.nix9
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk8-darwin.nix9
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk8-linux.nix9
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/sources.json392
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-icedtea-web/default.nix63
-rw-r--r--nixpkgs/pkgs/development/compilers/adoptopenjdk-icedtea-web/patches/0001-make-cargo-work-with-nix-build-on-linux.patch46
-rw-r--r--nixpkgs/pkgs/development/compilers/aldor/default.nix52
-rw-r--r--nixpkgs/pkgs/development/compilers/aliceml/default.nix57
-rw-r--r--nixpkgs/pkgs/development/compilers/aliceml/make.patch20
-rw-r--r--nixpkgs/pkgs/development/compilers/aliceml/seam.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/apache-flex-sdk/default.nix56
-rw-r--r--nixpkgs/pkgs/development/compilers/arachne-pnr/default.nix44
-rw-r--r--nixpkgs/pkgs/development/compilers/asn1c/default.nix33
-rwxr-xr-xnixpkgs/pkgs/development/compilers/aspectj/builder.sh27
-rw-r--r--nixpkgs/pkgs/development/compilers/aspectj/default.nix21
-rw-r--r--nixpkgs/pkgs/development/compilers/ats/default.nix25
-rw-r--r--nixpkgs/pkgs/development/compilers/ats/install-atsdoc-hats-files.patch38
-rw-r--r--nixpkgs/pkgs/development/compilers/ats2/default.nix57
-rw-r--r--nixpkgs/pkgs/development/compilers/ats2/setup-contrib-hook.sh1
-rw-r--r--nixpkgs/pkgs/development/compilers/ats2/setup-hook.sh1
-rw-r--r--nixpkgs/pkgs/development/compilers/avian/default.nix43
-rw-r--r--nixpkgs/pkgs/development/compilers/avra/default.nix28
-rw-r--r--nixpkgs/pkgs/development/compilers/bigloo/default.nix57
-rw-r--r--nixpkgs/pkgs/development/compilers/binaryen/0001-Get-rid-of-git-dependency.patch38
-rw-r--r--nixpkgs/pkgs/development/compilers/binaryen/default.nix46
-rw-r--r--nixpkgs/pkgs/development/compilers/bluespec/default.nix98
-rw-r--r--nixpkgs/pkgs/development/compilers/bs-platform/build-bs-platform.nix64
-rw-r--r--nixpkgs/pkgs/development/compilers/bs-platform/default.nix25
-rw-r--r--nixpkgs/pkgs/development/compilers/bs-platform/ocaml.nix16
-rw-r--r--nixpkgs/pkgs/development/compilers/bupc/default.nix40
-rw-r--r--nixpkgs/pkgs/development/compilers/carp/default.nix48
-rw-r--r--nixpkgs/pkgs/development/compilers/ccl/default.nix93
-rw-r--r--nixpkgs/pkgs/development/compilers/chez/default.nix76
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/4/0001-Introduce-CHICKEN_REPOSITORY_EXTRA.patch157
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/4/chicken.nix77
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/4/default.nix21
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/4/egg2nix.nix27
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/4/eggDerivation.nix44
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/4/eggs.nix138
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/4/eggs.scm5
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/4/fetchegg/builder.sh9
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/4/fetchegg/default.nix25
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/4/overrides.nix10
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/4/setup-hook.sh6
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/5/chicken.nix59
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/5/default.nix21
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/5/egg2nix.nix29
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/5/eggDerivation.nix41
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/5/eggs.nix91
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/5/eggs.scm3
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/5/fetchegg/builder.sh10
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/5/fetchegg/default.nix25
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/5/overrides.nix2
-rw-r--r--nixpkgs/pkgs/development/compilers/chicken/5/setup-hook.sh6
-rw-r--r--nixpkgs/pkgs/development/compilers/ciao/default.nix32
-rw-r--r--nixpkgs/pkgs/development/compilers/clasp/default.nix130
-rw-r--r--nixpkgs/pkgs/development/compilers/clean/chroot-build-support-do-not-rebuild-equal-timestamps.patch17
-rw-r--r--nixpkgs/pkgs/development/compilers/clean/default.nix52
-rw-r--r--nixpkgs/pkgs/development/compilers/closure/default.nix30
-rw-r--r--nixpkgs/pkgs/development/compilers/cmdstan/default.nix42
-rw-r--r--nixpkgs/pkgs/development/compilers/cmucl/binary.nix44
-rw-r--r--nixpkgs/pkgs/development/compilers/colm/cross-compile.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/colm/default.nix30
-rw-r--r--nixpkgs/pkgs/development/compilers/compcert/default.nix73
-rw-r--r--nixpkgs/pkgs/development/compilers/computecpp/default.nix52
-rw-r--r--nixpkgs/pkgs/development/compilers/coreclr/default.nix100
-rw-r--r--nixpkgs/pkgs/development/compilers/crystal/build-package.nix109
-rw-r--r--nixpkgs/pkgs/development/compilers/crystal/crystal2nix.cr42
-rw-r--r--nixpkgs/pkgs/development/compilers/crystal/crystal2nix.nix22
-rw-r--r--nixpkgs/pkgs/development/compilers/crystal/default.nix225
-rw-r--r--nixpkgs/pkgs/development/compilers/cudatoolkit/common.nix220
-rw-r--r--nixpkgs/pkgs/development/compilers/cudatoolkit/default.nix139
-rw-r--r--nixpkgs/pkgs/development/compilers/dale/default.nix47
-rw-r--r--nixpkgs/pkgs/development/compilers/dasm/default.nix34
-rw-r--r--nixpkgs/pkgs/development/compilers/dev86/default.nix21
-rw-r--r--nixpkgs/pkgs/development/compilers/dmd/binary.nix52
-rw-r--r--nixpkgs/pkgs/development/compilers/dmd/bootstrap.nix9
-rw-r--r--nixpkgs/pkgs/development/compilers/dmd/default.nix167
-rw-r--r--nixpkgs/pkgs/development/compilers/dotnet/buildDotnet.nix74
-rw-r--r--nixpkgs/pkgs/development/compilers/dotnet/combinePackages.nix20
-rw-r--r--nixpkgs/pkgs/development/compilers/dotnet/default.nix105
-rw-r--r--nixpkgs/pkgs/development/compilers/dtc/default.nix32
-rw-r--r--nixpkgs/pkgs/development/compilers/ecl/16.1.2.nix84
-rw-r--r--nixpkgs/pkgs/development/compilers/ecl/default.nix70
-rw-r--r--nixpkgs/pkgs/development/compilers/ecl/default.upstream2
-rw-r--r--nixpkgs/pkgs/development/compilers/ecl/ecl-1.16.2-libffi-3.3-abi.patch15
-rw-r--r--nixpkgs/pkgs/development/compilers/ecl/libffi-3.3-abi.patch15
-rw-r--r--nixpkgs/pkgs/development/compilers/edk2/default.nix108
-rw-r--r--nixpkgs/pkgs/development/compilers/eli/default.nix91
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/README.md24
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/default.nix126
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/fetchElmDeps.nix11
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/makeDotElm.nix35
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/README.md25
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/elm-format.nix40
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/elm-instrument.nix34
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/elm-srcs.nix72
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/elm.nix31
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/elmi-to-json.nix27
-rwxr-xr-xnixpkgs/pkgs/development/compilers/elm/packages/generate-node-packages.sh13
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/indents.nix11
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/node-composition.nix17
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/node-packages.json12
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/node-packages.nix14995
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/packages/patch-binwrap.nix30
-rw-r--r--nixpkgs/pkgs/development/compilers/elm/registry.datbin0 -> 86479 bytes
-rwxr-xr-xnixpkgs/pkgs/development/compilers/elm/update.sh9
-rw-r--r--nixpkgs/pkgs/development/compilers/emscripten/default.nix70
-rw-r--r--nixpkgs/pkgs/development/compilers/emscripten/fastcomp/default.nix28
-rw-r--r--nixpkgs/pkgs/development/compilers/emscripten/fastcomp/emscripten-fastcomp.nix55
-rw-r--r--nixpkgs/pkgs/development/compilers/eql/default.nix60
-rw-r--r--nixpkgs/pkgs/development/compilers/factor-lang/default.nix104
-rw-r--r--nixpkgs/pkgs/development/compilers/factor-lang/fuel-dir.patch20
-rw-r--r--nixpkgs/pkgs/development/compilers/factor-lang/staging-command-line-0.98-pre.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/factor-lang/workdir-0.98-pre.patch24
-rw-r--r--nixpkgs/pkgs/development/compilers/fasm/bin.nix24
-rw-r--r--nixpkgs/pkgs/development/compilers/fasm/default.nix28
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/default.nix31
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/flutter.nix129
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/patches/beta/disable-auto-update.patch31
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/patches/beta/move-cache.patch63
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/patches/stable/disable-auto-update.patch31
-rw-r--r--nixpkgs/pkgs/development/compilers/flutter/patches/stable/move-cache.patch63
-rw-r--r--nixpkgs/pkgs/development/compilers/flux/default.nix21
-rwxr-xr-xnixpkgs/pkgs/development/compilers/fpc/binary-builder.sh14
-rw-r--r--nixpkgs/pkgs/development/compilers/fpc/binary.nix24
-rw-r--r--nixpkgs/pkgs/development/compilers/fpc/default.nix48
-rw-r--r--nixpkgs/pkgs/development/compilers/fpc/default.upstream6
-rw-r--r--nixpkgs/pkgs/development/compilers/fpc/lazarus.nix53
-rw-r--r--nixpkgs/pkgs/development/compilers/fsharp/default.nix48
-rw-r--r--nixpkgs/pkgs/development/compilers/fsharp41/default.nix125
-rw-r--r--nixpkgs/pkgs/development/compilers/fsharp41/fsharp-IsPathRooted-type-inference.patch21
-rw-r--r--nixpkgs/pkgs/development/compilers/fsharp41/fsharp-path-overloads.patch22
-rw-r--r--nixpkgs/pkgs/development/compilers/fsharp41/fsharp-string-switchName.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/fstar/default.nix48
-rw-r--r--nixpkgs/pkgs/development/compilers/gambit/bootstrap.nix44
-rw-r--r--nixpkgs/pkgs/development/compilers/gambit/build.nix108
-rw-r--r--nixpkgs/pkgs/development/compilers/gambit/default.nix10
-rw-r--r--nixpkgs/pkgs/development/compilers/gambit/gambit-support.nix33
-rw-r--r--nixpkgs/pkgs/development/compilers/gambit/unstable.nix13
-rw-r--r--nixpkgs/pkgs/development/compilers/gavrasm/default.nix39
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc-arm-embedded/6/default.nix51
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc-arm-embedded/7/default.nix51
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc-arm-embedded/8/default.nix51
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc-arm-embedded/9/default.nix53
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/10/default.nix287
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/4.8/default.nix314
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/4.9/default.nix331
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/4.9/parallel-strsignal.patch61
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/6/default.nix346
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/6/fix-objdump-check.patch43
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/7/default.nix295
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/7/riscv-no-relax.patch109
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/7/riscv-pthread-reentrant.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/8/default.nix282
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/9/default.nix290
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/builder.sh283
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/common/configure-flags.nix199
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/common/extra-target-flags.nix33
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/common/mfcgthreads-patches-repo.nix1
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/common/platform-flags.nix16
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/common/pre-configure.nix19
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/gfortran-darwin-NXConstStr.patch27
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/gfortran-driving.patch20
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/gnat-cflags.patch35
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/libgomp-dont-force-initial-exec.patch40
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/libphobos.patch119
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/libstdc++-hook.sh4
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/libstdc++-netbsd-ctypes.patch141
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/libstdc++-target.patch32
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/no-sys-dirs.patch28
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/parallel-bconfig.patch32
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/ppc-musl.patch18
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/res_state-not-declared.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/sigsegv-not-declared.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/struct-sigaltstack-4.9.patch78
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/struct-sigaltstack.patch87
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/struct-ucontext-4.5.patch107
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/struct-ucontext-4.8.patch177
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/struct-ucontext-libjava.patch33
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/struct-ucontext.patch190
-rw-r--r--nixpkgs/pkgs/development/compilers/gcc/use-source-date-epoch.patch52
-rw-r--r--nixpkgs/pkgs/development/compilers/gcl/2.6.13-pre.nix51
-rw-r--r--nixpkgs/pkgs/development/compilers/gcl/default.nix51
-rw-r--r--nixpkgs/pkgs/development/compilers/gerbil/build.nix101
-rw-r--r--nixpkgs/pkgs/development/compilers/gerbil/default.nix12
-rw-r--r--nixpkgs/pkgs/development/compilers/gerbil/gerbil-support.nix64
-rw-r--r--nixpkgs/pkgs/development/compilers/gerbil/gerbil-utils.nix24
-rw-r--r--nixpkgs/pkgs/development/compilers/gerbil/unstable.nix15
-rw-r--r--nixpkgs/pkgs/development/compilers/gforth/default.nix29
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/8.10.1.nix242
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/8.2.2-binary.nix191
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/8.4.4.nix256
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/8.6.5-binary.nix181
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/8.6.5.nix259
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/8.8.2.nix242
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/8.8.3.nix242
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/backport-dylib-command-size-limit.patch24
-rwxr-xr-xnixpkgs/pkgs/development/compilers/ghc/gcc-clang-wrapper.sh46
-rw-r--r--nixpkgs/pkgs/development/compilers/ghc/head.nix258
-rw-r--r--nixpkgs/pkgs/development/compilers/ghcjs-ng/8.6/dep-overrides.nix11
-rw-r--r--nixpkgs/pkgs/development/compilers/ghcjs-ng/8.6/git.json6
-rw-r--r--nixpkgs/pkgs/development/compilers/ghcjs-ng/8.6/stage0.nix177
-rw-r--r--nixpkgs/pkgs/development/compilers/ghcjs-ng/README.md21
-rw-r--r--nixpkgs/pkgs/development/compilers/ghcjs-ng/common-overrides.nix8
-rw-r--r--nixpkgs/pkgs/development/compilers/ghcjs-ng/configured-ghcjs-src.nix51
-rw-r--r--nixpkgs/pkgs/development/compilers/ghcjs-ng/default.nix108
-rw-r--r--nixpkgs/pkgs/development/compilers/ghcjs-ng/ghcjs-base.nix29
-rw-r--r--nixpkgs/pkgs/development/compilers/ghcjs-ng/mk-stage0.nix25
-rw-r--r--nixpkgs/pkgs/development/compilers/ghdl/default.nix40
-rw-r--r--nixpkgs/pkgs/development/compilers/gleam/default.nix24
-rw-r--r--nixpkgs/pkgs/development/compilers/glslang/default.nix51
-rw-r--r--nixpkgs/pkgs/development/compilers/gnatboot/default.nix51
-rw-r--r--nixpkgs/pkgs/development/compilers/gnu-cobol/default.nix40
-rw-r--r--nixpkgs/pkgs/development/compilers/gnu-smalltalk/default.nix60
-rw-r--r--nixpkgs/pkgs/development/compilers/go-jsonnet/default.nix24
-rw-r--r--nixpkgs/pkgs/development/compilers/go/1.13.nix242
-rw-r--r--nixpkgs/pkgs/development/compilers/go/1.14.nix242
-rw-r--r--nixpkgs/pkgs/development/compilers/go/1.4.nix162
-rw-r--r--nixpkgs/pkgs/development/compilers/go/creds-test-1.4.patch17
-rw-r--r--nixpkgs/pkgs/development/compilers/go/creds-test.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/go/go-1.9-skip-flaky-19608.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/go/go-1.9-skip-flaky-20072.patch20
-rw-r--r--nixpkgs/pkgs/development/compilers/go/remove-test-pie-1.13.patch34
-rw-r--r--nixpkgs/pkgs/development/compilers/go/remove-test-pie-1.14.patch34
-rw-r--r--nixpkgs/pkgs/development/compilers/go/remove-tools-1.11.patch35
-rw-r--r--nixpkgs/pkgs/development/compilers/go/remove-tools-1.4.patch81
-rw-r--r--nixpkgs/pkgs/development/compilers/go/skip-external-network-tests.patch26
-rw-r--r--nixpkgs/pkgs/development/compilers/go/skip-nohup-tests.patch22
-rw-r--r--nixpkgs/pkgs/development/compilers/go/skip-test-extra-files-on-386-1.14.patch15
-rw-r--r--nixpkgs/pkgs/development/compilers/go/skip-test-extra-files-on-386.patch15
-rw-r--r--nixpkgs/pkgs/development/compilers/go/skip-test-extra-files-on-aarch32-1.14.patch15
-rw-r--r--nixpkgs/pkgs/development/compilers/go/skip-test-extra-files-on-aarch32.patch15
-rw-r--r--nixpkgs/pkgs/development/compilers/go/ssl-cert-file-1.13.patch64
-rw-r--r--nixpkgs/pkgs/development/compilers/gprolog/default.nix68
-rw-r--r--nixpkgs/pkgs/development/compilers/graalvm/001_mx.py.patch291
-rw-r--r--nixpkgs/pkgs/development/compilers/graalvm/002_setjmp.c.patch16
-rw-r--r--nixpkgs/pkgs/development/compilers/graalvm/003_mx_truffle.py.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/graalvm/004_mx_jvmci.py.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/graalvm/005_tool_jt.rb.patch46
-rw-r--r--nixpkgs/pkgs/development/compilers/graalvm/006_mx_copylib.py.patch14
-rw-r--r--nixpkgs/pkgs/development/compilers/graalvm/007_unimplemented.c.patch85
-rw-r--r--nixpkgs/pkgs/development/compilers/graalvm/008_remove_jfr.patch33
-rw-r--r--nixpkgs/pkgs/development/compilers/graalvm/009_remove_signedness_verifier.patch21
-rw-r--r--nixpkgs/pkgs/development/compilers/graalvm/010_mx_substratevm.py13
-rw-r--r--nixpkgs/pkgs/development/compilers/graalvm/default.nix538
-rw-r--r--nixpkgs/pkgs/development/compilers/graalvm/enterprise-edition.nix175
-rw-r--r--nixpkgs/pkgs/development/compilers/graalvm/truffle.make16
-rw-r--r--nixpkgs/pkgs/development/compilers/gwt/2.4.0.nix25
-rw-r--r--nixpkgs/pkgs/development/compilers/halide/default.nix67
-rw-r--r--nixpkgs/pkgs/development/compilers/halide/nix.patch56
-rw-r--r--nixpkgs/pkgs/development/compilers/haxe/default.nix103
-rw-r--r--nixpkgs/pkgs/development/compilers/haxe/setup-hook.sh7
-rw-r--r--nixpkgs/pkgs/development/compilers/hhvm/default.nix68
-rw-r--r--nixpkgs/pkgs/development/compilers/hhvm/flexible-array-members-gcc6.patch20
-rw-r--r--nixpkgs/pkgs/development/compilers/hop/default.nix28
-rw-r--r--nixpkgs/pkgs/development/compilers/iasl/default.nix30
-rw-r--r--nixpkgs/pkgs/development/compilers/idris2/default.nix45
-rw-r--r--nixpkgs/pkgs/development/compilers/inform7/default.nix31
-rw-r--r--nixpkgs/pkgs/development/compilers/intel-graphics-compiler/default.nix73
-rw-r--r--nixpkgs/pkgs/development/compilers/intercal/default.nix42
-rw-r--r--nixpkgs/pkgs/development/compilers/ios-cross-compile/9.2.nix65
-rw-r--r--nixpkgs/pkgs/development/compilers/ios-cross-compile/9.2_builder.sh153
-rw-r--r--nixpkgs/pkgs/development/compilers/ios-cross-compile/alt_wrapper.c212
-rw-r--r--nixpkgs/pkgs/development/compilers/ispc/default.nix70
-rw-r--r--nixpkgs/pkgs/development/compilers/jasmin/default.nix44
-rw-r--r--nixpkgs/pkgs/development/compilers/jasmin/test-assemble-hello-world/HelloWorld.j31
-rw-r--r--nixpkgs/pkgs/development/compilers/jasmin/test-assemble-hello-world/default.nix12
-rw-r--r--nixpkgs/pkgs/development/compilers/javacard-devkit/default.nix69
-rw-r--r--nixpkgs/pkgs/development/compilers/jetbrains-jdk/default.nix34
-rw-r--r--nixpkgs/pkgs/development/compilers/jsonnet/default.nix37
-rw-r--r--nixpkgs/pkgs/development/compilers/julia/0.7.nix9
-rw-r--r--nixpkgs/pkgs/development/compilers/julia/0001.1-use-system-utf8proc.patch29
-rw-r--r--nixpkgs/pkgs/development/compilers/julia/1.0.nix9
-rw-r--r--nixpkgs/pkgs/development/compilers/julia/1.1.nix9
-rw-r--r--nixpkgs/pkgs/development/compilers/julia/1.3.nix160
-rw-r--r--nixpkgs/pkgs/development/compilers/julia/allow_nix_mtime.patch25
-rw-r--r--nixpkgs/pkgs/development/compilers/julia/shared.nix210
-rw-r--r--nixpkgs/pkgs/development/compilers/julia/use-system-utf8proc-julia-1.3.patch24
-rw-r--r--nixpkgs/pkgs/development/compilers/jwasm/default.nix33
-rw-r--r--nixpkgs/pkgs/development/compilers/kotlin/default.nix46
-rw-r--r--nixpkgs/pkgs/development/compilers/ldc/binary.nix41
-rw-r--r--nixpkgs/pkgs/development/compilers/ldc/bootstrap.nix10
-rw-r--r--nixpkgs/pkgs/development/compilers/ldc/default.nix5
-rw-r--r--nixpkgs/pkgs/development/compilers/ldc/generic.nix143
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/bintools.nix19
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/clang/clang-extension-handling.patch18
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/clang/compiler-rt-baremetal.patch53
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/clang/default.nix121
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/clang/purity.patch30
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/compiler-rt-armv7l.patch32
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/compiler-rt-codesign.patch33
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/compiler-rt.nix86
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/default.nix203
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/find-darwin-sdk-version.patch62
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/libc++/default.nix55
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/libc++/setup-hook.sh6
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/libc++abi.nix67
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/libcxxabi-no-threads.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/libcxxabi-wasm.patch16
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/libunwind.nix14
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/lld.nix33
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/lldb-procfs.patch31
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/lldb.nix101
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/llvm-extension-handling.patch146
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/llvm-outputs.patch26
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/llvm.nix192
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/openmp.nix26
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/10/sanitizers-nongnu.patch412
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/5/clang/default.nix109
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/5/clang/purity.patch30
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt-armv7l.patch23
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt-codesign.patch155
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt-sys-ustat.patch58
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt.nix82
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/5/default.nix101
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/5/fix-gcc9.patch33
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/5/libc++/default.nix53
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/5/libc++/setup-hook.sh6
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/5/libc++abi.nix51
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/5/lld.nix33
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/5/lldb.nix57
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/5/llvm-outputs.patch26
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/5/llvm.nix177
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/5/openmp.nix26
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/5/sanitizers-nongnu.patch370
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/6/clang/default.nix109
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/6/clang/purity.patch30
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/6/compiler-rt-armv7l.patch32
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/6/compiler-rt-codesign.patch155
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/6/compiler-rt.nix84
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/6/default.nix101
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/6/libc++/default.nix53
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/6/libc++/setup-hook.sh6
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/6/libc++abi.nix51
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/6/lld.nix33
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/6/lldb.nix57
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/6/llvm-outputs.patch26
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/6/llvm.nix176
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/6/openmp.nix26
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/6/sanitizers-nongnu.patch413
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/7/bintools.nix19
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/7/clang/HIP-use-PATH-7.patch68
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/7/clang/default.nix119
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/7/clang/purity.patch30
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/7/compiler-rt-armv7l.patch38
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/7/compiler-rt-codesign.patch33
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/7/compiler-rt.nix85
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/7/crtbegin-and-end.patch595
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/7/default.nix158
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/7/libc++/default.nix53
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/7/libc++/setup-hook.sh6
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/7/libc++abi.nix54
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/7/lld.nix33
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/7/lldb.nix68
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/7/llvm-outputs.patch26
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/7/llvm.nix201
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/7/openmp.nix26
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/7/sanitizers-nongnu.patch412
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/bintools.nix19
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/clang/HIP-use-PATH-8.patch80
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/clang/clang-xpc.patch41
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/clang/compiler-rt-baremetal.patch53
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/clang/default.nix129
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/clang/purity.patch30
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/clang/static-pie.patch157
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/clang/unwindlib.patch372
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/compiler-rt-armv7l.patch38
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/compiler-rt-codesign.patch33
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/compiler-rt.nix85
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/crtbegin-and-end.patch595
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/default.nix206
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/libc++/default.nix59
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/libc++/setup-hook.sh6
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/libc++abi.nix67
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/libcxxabi-no-threads.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/libcxxabi-wasm.patch16
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/libunwind.nix25
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/lld.nix33
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/lldb.nix61
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/llvm-outputs.patch26
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/llvm.nix176
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/openmp.nix26
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/8/sanitizers-nongnu.patch412
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/bintools.nix19
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/clang/HIP-use-PATH-9.patch80
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/clang/compiler-rt-baremetal.patch53
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/clang/default.nix124
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/clang/purity.patch30
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/compiler-rt-armv7l.patch38
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/compiler-rt-codesign.patch33
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/compiler-rt.nix84
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/default.nix206
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/fix-test-on-non-x86-like-others.patch23
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/libc++/default.nix55
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/libc++/setup-hook.sh6
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/libc++abi.nix67
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/libcxxabi-no-threads.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/libcxxabi-wasm.patch16
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/libunwind.nix14
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/lld.nix33
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/lldb-procfs.patch31
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/lldb.nix72
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/llvm-outputs.patch26
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/llvm.nix193
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/openmp.nix26
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/9/sanitizers-nongnu.patch412
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/TLI-musl.patch35
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/aarch64.patch51
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/libcxx-0001-musl-hacks.patch39
-rw-r--r--nixpkgs/pkgs/development/compilers/llvm/multi.nix48
-rw-r--r--nixpkgs/pkgs/development/compilers/manticore/default.nix55
-rw-r--r--nixpkgs/pkgs/development/compilers/matter-compiler/Gemfile3
-rw-r--r--nixpkgs/pkgs/development/compilers/matter-compiler/Gemfile.lock13
-rw-r--r--nixpkgs/pkgs/development/compilers/matter-compiler/default.nix20
-rw-r--r--nixpkgs/pkgs/development/compilers/matter-compiler/gemset.nix12
-rw-r--r--nixpkgs/pkgs/development/compilers/mcpp/default.nix20
-rw-r--r--nixpkgs/pkgs/development/compilers/mercury/default.nix62
-rw-r--r--nixpkgs/pkgs/development/compilers/meta-environment/meta-build-env/default.nix11
-rw-r--r--nixpkgs/pkgs/development/compilers/mezzo/default.nix47
-rw-r--r--nixpkgs/pkgs/development/compilers/microscheme/default.nix30
-rw-r--r--nixpkgs/pkgs/development/compilers/mint/default.nix36
-rw-r--r--nixpkgs/pkgs/development/compilers/mint/shards.nix80
-rw-r--r--nixpkgs/pkgs/development/compilers/mit-scheme/default.nix92
-rw-r--r--nixpkgs/pkgs/development/compilers/mkcl/default.nix48
-rw-r--r--nixpkgs/pkgs/development/compilers/mlton/20130715.nix119
-rw-r--r--nixpkgs/pkgs/development/compilers/mlton/20180207-binary.nix57
-rw-r--r--nixpkgs/pkgs/development/compilers/mlton/default.nix26
-rw-r--r--nixpkgs/pkgs/development/compilers/mlton/from-git-source.nix36
-rw-r--r--nixpkgs/pkgs/development/compilers/mlton/meta.nix15
-rw-r--r--nixpkgs/pkgs/development/compilers/mono/4.nix9
-rw-r--r--nixpkgs/pkgs/development/compilers/mono/5.nix8
-rw-r--r--nixpkgs/pkgs/development/compilers/mono/6.nix9
-rw-r--r--nixpkgs/pkgs/development/compilers/mono/generic.nix83
-rw-r--r--nixpkgs/pkgs/development/compilers/mono/llvm.nix52
-rw-r--r--nixpkgs/pkgs/development/compilers/mono/mono4-glibc.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/mono/pkgconfig-before-gac.patch65
-rw-r--r--nixpkgs/pkgs/development/compilers/mosml/default.nix29
-rw-r--r--nixpkgs/pkgs/development/compilers/mozart/binary.nix80
-rw-r--r--nixpkgs/pkgs/development/compilers/mozart/default.nix89
-rw-r--r--nixpkgs/pkgs/development/compilers/mruby/default.nix34
-rw-r--r--nixpkgs/pkgs/development/compilers/nasm/default.nix32
-rw-r--r--nixpkgs/pkgs/development/compilers/neko/default.nix38
-rw-r--r--nixpkgs/pkgs/development/compilers/nextpnr/default.nix87
-rw-r--r--nixpkgs/pkgs/development/compilers/nim/default.nix69
-rw-r--r--nixpkgs/pkgs/development/compilers/nvidia-cg-toolkit/default.nix46
-rw-r--r--nixpkgs/pkgs/development/compilers/obliv-c/default.nix42
-rw-r--r--nixpkgs/pkgs/development/compilers/obliv-c/ignore-complex-float128.patch37
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/3.08.0.nix21
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/3.10.0.nix34
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/3.11.2.nix75
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/3.12.1-darwin-fix-configure.patch32
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/3.12.1.nix69
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.00.1.nix67
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.01.0.nix7
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.02.nix7
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.03.nix6
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.04.nix9
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.05.nix9
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.06.nix9
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.07.nix9
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.08.nix12
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.09.nix9
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.10.nix6
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/4.11.nix6
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/ber-metaocaml.nix96
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/builder.sh8
-rwxr-xr-xnixpkgs/pkgs/development/compilers/ocaml/configure-3.08.01482
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/fix-clang-build-on-osx.diff20
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/generic.nix109
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/gnused-on-osx-fix.patch9
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/metaocaml-3.09.nix34
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/mips64.patch240
-rw-r--r--nixpkgs/pkgs/development/compilers/ocaml/ocamlbuild.patch45
-rw-r--r--nixpkgs/pkgs/development/compilers/opa/default.nix74
-rw-r--r--nixpkgs/pkgs/development/compilers/open-watcom-bin/default.nix122
-rw-r--r--nixpkgs/pkgs/development/compilers/opendylan/bin.nix42
-rw-r--r--nixpkgs/pkgs/development/compilers/opendylan/default.nix40
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/11.nix147
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/12.nix155
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/13.nix155
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/8.nix272
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/bootstrap.nix40
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/currency-date-range-jdk10.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/currency-date-range-jdk8.patch14
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/darwin/11.nix61
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/darwin/8.nix65
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/darwin/default.nix61
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/default.nix155
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/fix-java-home-jdk10.patch14
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/fix-java-home-jdk8.patch15
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/generate-cacerts.pl366
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/increase-javadoc-heap-jdk13.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/increase-javadoc-heap.patch12
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/make-bootstrap.nix31
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/openjfx/11.nix113
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/openjfx/14.nix115
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/read-truststore-from-env-jdk10.patch30
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/read-truststore-from-env-jdk8.patch30
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/swing-use-gtk-jdk10.patch24
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/swing-use-gtk-jdk13.patch22
-rw-r--r--nixpkgs/pkgs/development/compilers/openjdk/swing-use-gtk-jdk8.patch26
-rw-r--r--nixpkgs/pkgs/development/compilers/openspin/default.nix26
-rw-r--r--nixpkgs/pkgs/development/compilers/oraclejdk/dlj-bundle-builder.sh60
-rw-r--r--nixpkgs/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix192
-rw-r--r--nixpkgs/pkgs/development/compilers/oraclejdk/jdk8-linux.nix10
-rw-r--r--nixpkgs/pkgs/development/compilers/orc/default.nix31
-rw-r--r--nixpkgs/pkgs/development/compilers/osl/default.nix39
-rw-r--r--nixpkgs/pkgs/development/compilers/owl-lisp/default.nix31
-rw-r--r--nixpkgs/pkgs/development/compilers/pakcs/curry-base.nix16
-rw-r--r--nixpkgs/pkgs/development/compilers/pakcs/curry-frontend.nix26
-rw-r--r--nixpkgs/pkgs/development/compilers/pakcs/default.nix99
-rw-r--r--nixpkgs/pkgs/development/compilers/pforth/default.nix28
-rw-r--r--nixpkgs/pkgs/development/compilers/picat/default.nix41
-rw-r--r--nixpkgs/pkgs/development/compilers/polyml/5.6.nix34
-rw-r--r--nixpkgs/pkgs/development/compilers/polyml/5.7-new-libffi-FFI_SYSV.patch34
-rw-r--r--nixpkgs/pkgs/development/compilers/polyml/5.7.nix40
-rw-r--r--nixpkgs/pkgs/development/compilers/polyml/default.nix46
-rw-r--r--nixpkgs/pkgs/development/compilers/ponyc/default.nix85
-rw-r--r--nixpkgs/pkgs/development/compilers/ponyc/disable-tests.patch14
-rw-r--r--nixpkgs/pkgs/development/compilers/ponyc/pony-stable.nix25
-rw-r--r--nixpkgs/pkgs/development/compilers/purescript/psc-package/default.nix61
-rw-r--r--nixpkgs/pkgs/development/compilers/purescript/purescript/default.nix65
-rw-r--r--nixpkgs/pkgs/development/compilers/purescript/purescript/test-minimal-module/Main.js8
-rw-r--r--nixpkgs/pkgs/development/compilers/purescript/purescript/test-minimal-module/Main.purs9
-rw-r--r--nixpkgs/pkgs/development/compilers/purescript/purescript/test-minimal-module/default.nix11
-rw-r--r--nixpkgs/pkgs/development/compilers/qbe/default.nix22
-rw-r--r--nixpkgs/pkgs/development/compilers/rasm/default.nix33
-rw-r--r--nixpkgs/pkgs/development/compilers/reason/default.nix40
-rw-r--r--nixpkgs/pkgs/development/compilers/rgbds/default.nix36
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/0001-Allow-getting-no_std-from-the-config-file.patch52
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/1_42.nix44
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/1_43.nix42
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/binary.nix102
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/bootstrap.nix14
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/cargo.nix59
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/clippy.nix34
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/default.nix98
-rwxr-xr-xnixpkgs/pkgs/development/compilers/rust/print-hashes.sh38
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/rls/default.nix49
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/rust-src.nix11
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/rustc.nix170
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/rustfmt.nix26
-rw-r--r--nixpkgs/pkgs/development/compilers/rust/setup-hook.sh4
-rw-r--r--nixpkgs/pkgs/development/compilers/sagittarius-scheme/default.nix58
-rw-r--r--nixpkgs/pkgs/development/compilers/sbcl/2.0.0.nix114
-rw-r--r--nixpkgs/pkgs/development/compilers/sbcl/bootstrap.nix79
-rw-r--r--nixpkgs/pkgs/development/compilers/sbcl/default.nix114
-rw-r--r--nixpkgs/pkgs/development/compilers/scala/2.10.nix43
-rw-r--r--nixpkgs/pkgs/development/compilers/scala/2.11.nix48
-rw-r--r--nixpkgs/pkgs/development/compilers/scala/2.12.nix47
-rw-r--r--nixpkgs/pkgs/development/compilers/scala/2.13.nix47
-rw-r--r--nixpkgs/pkgs/development/compilers/scala/dotty-bare.nix40
-rw-r--r--nixpkgs/pkgs/development/compilers/scala/dotty.nix22
-rw-r--r--nixpkgs/pkgs/development/compilers/sdcc/default.nix39
-rw-r--r--nixpkgs/pkgs/development/compilers/seexpr/default.nix23
-rw-r--r--nixpkgs/pkgs/development/compilers/serpent/default.nix38
-rw-r--r--nixpkgs/pkgs/development/compilers/shaderc/default.nix58
-rw-r--r--nixpkgs/pkgs/development/compilers/smlnj/bootstrap.nix43
-rw-r--r--nixpkgs/pkgs/development/compilers/smlnj/default.nix89
-rw-r--r--nixpkgs/pkgs/development/compilers/smlnj/heap2exec.diff9
-rw-r--r--nixpkgs/pkgs/development/compilers/solc/default.nix74
-rw-r--r--nixpkgs/pkgs/development/compilers/souffle/default.nix53
-rw-r--r--nixpkgs/pkgs/development/compilers/spirv-llvm-translator/default.nix38
-rw-r--r--nixpkgs/pkgs/development/compilers/squeak/default.nix47
-rw-r--r--nixpkgs/pkgs/development/compilers/stalin/default.nix45
-rw-r--r--nixpkgs/pkgs/development/compilers/swi-prolog/default.nix54
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/default.nix328
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/patches/0001-build-presets-linux-don-t-require-using-Ninja.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/patches/0002-build-presets-linux-allow-custom-install-prefix.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/patches/0003-build-presets-linux-don-t-build-extra-libs.patch23
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/patches/0004-build-presets-linux-plumb-extra-cmake-options.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/patches/glibc-arch-headers.patch13
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/patches/llvm-toolchain-dir.patch24
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/patches/swift-package-manager-glibc-2.30.patch25
-rw-r--r--nixpkgs/pkgs/development/compilers/swift/purity.patch18
-rw-r--r--nixpkgs/pkgs/development/compilers/terra/default.nix68
-rw-r--r--nixpkgs/pkgs/development/compilers/terra/nix-cflags.patch22
-rw-r--r--nixpkgs/pkgs/development/compilers/teyjus/default.nix35
-rw-r--r--nixpkgs/pkgs/development/compilers/teyjus/fix-lex-to-flex.patch25
-rw-r--r--nixpkgs/pkgs/development/compilers/tinycc/default.nix83
-rw-r--r--nixpkgs/pkgs/development/compilers/tinygo/default.nix49
-rw-r--r--nixpkgs/pkgs/development/compilers/tinygo/go.mod13
-rw-r--r--nixpkgs/pkgs/development/compilers/tinygo/main.go18
-rw-r--r--nixpkgs/pkgs/development/compilers/unison/default.nix41
-rw-r--r--nixpkgs/pkgs/development/compilers/urn/default.nix61
-rw-r--r--nixpkgs/pkgs/development/compilers/urweb/default.nix46
-rw-r--r--nixpkgs/pkgs/development/compilers/vala/default.nix131
-rw-r--r--nixpkgs/pkgs/development/compilers/vala/disable-graphviz-0.40.12.patch208
-rw-r--r--nixpkgs/pkgs/development/compilers/vala/disable-graphviz-0.44.3.patch261
-rw-r--r--nixpkgs/pkgs/development/compilers/vala/disable-graphviz-0.46.1.patch261
-rw-r--r--nixpkgs/pkgs/development/compilers/vala/gvc-compat.patch19
-rw-r--r--nixpkgs/pkgs/development/compilers/vala/setup-hook.sh15
-rw-r--r--nixpkgs/pkgs/development/compilers/vlang/default.nix55
-rw-r--r--nixpkgs/pkgs/development/compilers/wcc/default.nix51
-rw-r--r--nixpkgs/pkgs/development/compilers/wla-dx/default.nix28
-rw-r--r--nixpkgs/pkgs/development/compilers/x11basic/default.nix47
-rw-r--r--nixpkgs/pkgs/development/compilers/yap/default.nix27
-rw-r--r--nixpkgs/pkgs/development/compilers/yasm/default.nix17
-rw-r--r--nixpkgs/pkgs/development/compilers/yosys/default.nix83
-rw-r--r--nixpkgs/pkgs/development/compilers/z88dk/default.nix59
-rw-r--r--nixpkgs/pkgs/development/compilers/zasm/default.nix44
-rw-r--r--nixpkgs/pkgs/development/compilers/zig/default.nix50
-rw-r--r--nixpkgs/pkgs/development/compilers/zig/llvm10_polly.patch10
-rw-r--r--nixpkgs/pkgs/development/compilers/zulu/8.nix82
-rw-r--r--nixpkgs/pkgs/development/compilers/zulu/default.nix79
-rw-r--r--nixpkgs/pkgs/development/compilers/zz/default.nix28
615 files changed, 56919 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/compilers/abcl/default.nix b/nixpkgs/pkgs/development/compilers/abcl/default.nix
new file mode 100644
index 000000000000..543ba6036e4a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/abcl/default.nix
@@ -0,0 +1,39 @@
+{stdenv, fetchurl, ant, jre, jdk}:
+stdenv.mkDerivation rec {
+  pname = "abcl";
+  version = "1.7.0";
+  # or fetchFromGitHub(owner,repo,rev) or fetchgit(rev)
+  src = fetchurl {
+    url = "https://common-lisp.net/project/armedbear/releases/${version}/${pname}-src-${version}.tar.gz";
+    sha256 = "0pbn5s22zygk6k0rzjc9g76220628lj1b3057gr0n4grl11p4lx5";
+  };
+  configurePhase = ''
+    mkdir nix-tools
+    export PATH="$PWD/nix-tools:$PATH"
+    echo "echo nix-builder.localdomain" > nix-tools/hostname
+    chmod a+x nix-tools/*
+
+    hostname
+  '';
+  buildPhase = ''
+    ant
+  '';
+  installPhase = ''
+    mkdir -p "$out"/{bin,share/doc/abcl,lib/abcl}
+    cp -r README COPYING CHANGES examples/  "$out/share/doc/abcl/"
+    cp -r dist/*.jar contrib/ "$out/lib/abcl/"
+
+    echo "#! ${stdenv.shell}" >> "$out/bin/abcl"
+    echo "${jre}/bin/java -cp \"$out/lib/abcl/abcl.jar:$out/lib/abcl/abcl-contrib.jar:\$CLASSPATH\" org.armedbear.lisp.Main \"\$@\"" >> "$out/bin/abcl"
+    chmod a+x "$out"/bin/*
+  '';
+  buildInputs = [jre ant jdk jre];
+  meta = {
+    inherit version;
+    description = ''A JVM-based Common Lisp implementation'';
+    license = stdenv.lib.licenses.gpl3 ;
+    maintainers = [stdenv.lib.maintainers.raskin];
+    platforms = stdenv.lib.platforms.linux;
+    homepage = "https://common-lisp.net/project/armedbear/";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/acme/default.nix b/nixpkgs/pkgs/development/compilers/acme/default.nix
new file mode 100644
index 000000000000..c5a997ad75bc
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/acme/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchsvn }:
+
+stdenv.mkDerivation rec {
+  pname = "acme";
+  version = "120";
+
+  src = fetchsvn {
+    url = "svn://svn.code.sf.net/p/acme-crossass/code-0/trunk";
+    rev = version;
+    sha256 = "0w17b8f8bis22m6l5bg8qg8nniy20f8yg2xmzjipblmc39vpv6s2";
+  };
+
+  sourceRoot = "code-0-r${src.rev}/src";
+
+  makeFlags = [ "BINDIR=$(out)/bin" ];
+
+  postPatch = ''
+    substituteInPlace Makefile \
+      --replace "= gcc" "?= gcc"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A multi-platform cross assembler for 6502/6510/65816 CPUs.";
+    homepage = "https://sourceforge.net/projects/acme-crossass/";
+    license = licenses.gpl2Plus;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ OPNA2608 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/generate-sources.py b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/generate-sources.py
new file mode 100755
index 000000000000..a7782610afb3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/generate-sources.py
@@ -0,0 +1,65 @@
+#!/usr/bin/env nix-shell
+#!nix-shell --pure -i python3 -p "python3.withPackages (ps: with ps; [ requests ])"
+
+import json
+import re
+import requests
+import sys
+
+releases = ("openjdk8", "openjdk11", "openjdk13")
+oses = ("mac", "linux")
+types = ("jre", "jdk")
+impls = ("hotspot", "openj9")
+
+arch_to_nixos = {
+    "x64": ("x86_64",),
+    "aarch64": ("aarch64",),
+    "arm": ("armv6l", "armv7l"),
+}
+
+def get_sha256(url):
+    resp = requests.get(url)
+    if resp.status_code != 200:
+        print("error: could not fetch checksum from url {}: code {}".format(url, resp.code), file=sys.stderr)
+        sys.exit(1)
+    return resp.text.strip().split(" ")[0]
+
+def generate_sources(release, assets):
+    out = {}
+    for asset in assets:
+        if asset["os"] not in oses: continue
+        if asset["binary_type"] not in types: continue
+        if asset["openjdk_impl"] not in impls: continue
+        if asset["heap_size"] != "normal": continue
+        if asset["architecture"] not in arch_to_nixos: continue
+
+        # examples: 11.0.1+13, 8.0.222+10
+        version, build = asset["version_data"]["semver"].split("+")
+
+        type_map = out.setdefault(asset["os"], {})
+        impl_map = type_map.setdefault(asset["binary_type"], {})
+        arch_map = impl_map.setdefault(asset["openjdk_impl"], {
+            "packageType": asset["binary_type"],
+            "vmType": asset["openjdk_impl"],
+        })
+
+        for nixos_arch in arch_to_nixos[asset["architecture"]]:
+            arch_map[nixos_arch] = {
+                "url": asset["binary_link"],
+                "sha256": get_sha256(asset["checksum_link"]),
+                "version": version,
+                "build": build,
+            }
+
+    return out
+
+out = {}
+for release in releases:
+    resp = requests.get("https://api.adoptopenjdk.net/v2/latestAssets/releases/" + release)
+    if resp.status_code != 200:
+        print("error: could not fetch data for release {} (code {})".format(release, resp.code), file=sys.stderr)
+        sys.exit(1)
+    out[release] = generate_sources(release, resp.json())
+
+with open("sources.json", "w") as f:
+    json.dump(out, f, indent=2, sort_keys=True)
diff --git a/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix
new file mode 100644
index 000000000000..5e402b2d728b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix
@@ -0,0 +1,53 @@
+sourcePerArch:
+
+{ swingSupport ? true # not used for now
+, stdenv
+, fetchurl
+}:
+
+let cpuName = stdenv.hostPlatform.parsed.cpu.name;
+    result = stdenv.mkDerivation {
+  name = if sourcePerArch.packageType == "jdk"
+    then "adoptopenjdk-${sourcePerArch.vmType}-bin-${sourcePerArch.${cpuName}.version}"
+    else "adoptopenjdk-${sourcePerArch.packageType}-${sourcePerArch.vmType}-bin-${sourcePerArch.${cpuName}.version}";
+
+  src = fetchurl {
+    inherit (sourcePerArch.${cpuName}) url sha256;
+  };
+
+  # See: https://github.com/NixOS/patchelf/issues/10
+  dontStrip = 1;
+
+  installPhase = ''
+    cd ..
+
+    mv $sourceRoot $out
+
+    rm -rf $out/Home/demo
+
+    # Remove some broken manpages.
+    rm -rf $out/Home/man/ja*
+
+    ln -s $out/Contents/Home/* $out/
+
+    mkdir -p $out/nix-support
+
+    # Set JAVA_HOME automatically.
+    cat <<EOF >> $out/nix-support/setup-hook
+    if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
+    EOF
+  '';
+
+  # FIXME: use multiple outputs or return actual JRE package
+  passthru.jre = result;
+
+  passthru.home = result;
+
+  meta = with stdenv.lib; {
+    license = licenses.gpl2Classpath;
+    description = "AdoptOpenJDK, prebuilt OpenJDK binary";
+    platforms = [ "x86_64-darwin" ]; # some inherit jre.meta.platforms
+    maintainers = with stdenv.lib.maintainers; [ taku0 ];
+  };
+
+}; in result
diff --git a/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix
new file mode 100644
index 000000000000..d62224d518de
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix
@@ -0,0 +1,79 @@
+sourcePerArch:
+
+{ stdenv
+, lib
+, fetchurl
+, autoPatchelfHook
+, alsaLib
+, freetype
+, fontconfig
+, zlib
+, xorg
+, libffi
+}:
+
+let
+  cpuName = stdenv.hostPlatform.parsed.cpu.name;
+in
+
+let result = stdenv.mkDerivation rec {
+  name = if sourcePerArch.packageType == "jdk"
+    then "adoptopenjdk-${sourcePerArch.vmType}-bin-${version}"
+    else "adoptopenjdk-${sourcePerArch.packageType}-${sourcePerArch.vmType}-bin-${version}";
+
+  version = sourcePerArch.${cpuName}.version or (throw "unsupported CPU ${cpuName}");
+
+  src = fetchurl {
+    inherit (sourcePerArch.${cpuName}) url sha256;
+  };
+
+  buildInputs = [
+    alsaLib freetype fontconfig zlib xorg.libX11 xorg.libXext xorg.libXtst
+    xorg.libXi xorg.libXrender
+  ] ++ lib.optional stdenv.isAarch32 libffi;
+
+  nativeBuildInputs = [ autoPatchelfHook ];
+
+  # See: https://github.com/NixOS/patchelf/issues/10
+  dontStrip = 1;
+
+  installPhase = ''
+    cd ..
+
+    mv $sourceRoot $out
+
+    rm -rf $out/demo
+
+    # Remove some broken manpages.
+    rm -rf $out/man/ja*
+
+    # Remove embedded freetype to avoid problems like
+    # https://github.com/NixOS/nixpkgs/issues/57733
+    find "$out" -name 'libfreetype.so*' -delete
+
+    mkdir -p $out/nix-support
+
+    # Set JAVA_HOME automatically.
+    cat <<EOF >> "$out/nix-support/setup-hook"
+    if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
+    EOF
+  '';
+
+  preFixup = ''
+    find "$out" -name libfontmanager.so -exec \
+      patchelf --add-needed libfontconfig.so {} \;
+  '';
+
+  # FIXME: use multiple outputs or return actual JRE package
+  passthru.jre = result;
+
+  passthru.home = result;
+
+  meta = with stdenv.lib; {
+    license = licenses.gpl2Classpath;
+    description = "AdoptOpenJDK, prebuilt OpenJDK binary";
+    platforms = lib.mapAttrsToList (arch: _: arch + "-linux") sourcePerArch; # some inherit jre.meta.platforms
+    maintainers = with lib.maintainers; [ taku0 ];
+  };
+
+}; in result
diff --git a/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk11-darwin.nix b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk11-darwin.nix
new file mode 100644
index 000000000000..d1db77215d16
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk11-darwin.nix
@@ -0,0 +1,9 @@
+let
+  sources = builtins.fromJSON (builtins.readFile ./sources.json);
+in
+{
+  jdk-hotspot = import ./jdk-darwin-base.nix sources.openjdk11.mac.jdk.hotspot;
+  jre-hotspot = import ./jdk-darwin-base.nix sources.openjdk11.mac.jre.hotspot;
+  jdk-openj9 = import ./jdk-darwin-base.nix sources.openjdk11.mac.jdk.openj9;
+  jre-openj9 = import ./jdk-darwin-base.nix sources.openjdk11.mac.jre.openj9;
+}
diff --git a/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk11-linux.nix b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk11-linux.nix
new file mode 100644
index 000000000000..755ffaab271e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk11-linux.nix
@@ -0,0 +1,9 @@
+let
+  sources = builtins.fromJSON (builtins.readFile ./sources.json);
+in
+{
+  jdk-hotspot = import ./jdk-linux-base.nix sources.openjdk11.linux.jdk.hotspot;
+  jre-hotspot = import ./jdk-linux-base.nix sources.openjdk11.linux.jre.hotspot;
+  jdk-openj9 = import ./jdk-linux-base.nix sources.openjdk11.linux.jdk.openj9;
+  jre-openj9 = import ./jdk-linux-base.nix sources.openjdk11.linux.jre.openj9;
+}
diff --git a/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk13-darwin.nix b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk13-darwin.nix
new file mode 100644
index 000000000000..48806143c87c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk13-darwin.nix
@@ -0,0 +1,9 @@
+let
+  sources = builtins.fromJSON (builtins.readFile ./sources.json);
+in
+{
+  jdk-hotspot = import ./jdk-darwin-base.nix sources.openjdk13.mac.jdk.hotspot;
+  jre-hotspot = import ./jdk-darwin-base.nix sources.openjdk13.mac.jre.hotspot;
+  jdk-openj9 = import ./jdk-darwin-base.nix sources.openjdk13.mac.jdk.openj9;
+  jre-openj9 = import ./jdk-darwin-base.nix sources.openjdk13.mac.jre.openj9;
+}
diff --git a/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk13-linux.nix b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk13-linux.nix
new file mode 100644
index 000000000000..1bd7bb884481
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk13-linux.nix
@@ -0,0 +1,9 @@
+let
+  sources = builtins.fromJSON (builtins.readFile ./sources.json);
+in
+{
+  jdk-hotspot = import ./jdk-linux-base.nix sources.openjdk13.linux.jdk.hotspot;
+  jre-hotspot = import ./jdk-linux-base.nix sources.openjdk13.linux.jre.hotspot;
+  jdk-openj9 = import ./jdk-linux-base.nix sources.openjdk13.linux.jdk.openj9;
+  jre-openj9 = import ./jdk-linux-base.nix sources.openjdk13.linux.jre.openj9;
+}
diff --git a/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk8-darwin.nix b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk8-darwin.nix
new file mode 100644
index 000000000000..a170e0141cf0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk8-darwin.nix
@@ -0,0 +1,9 @@
+let
+  sources = builtins.fromJSON (builtins.readFile ./sources.json);
+in
+{
+  jdk-hotspot = import ./jdk-darwin-base.nix sources.openjdk8.mac.jdk.hotspot;
+  jre-hotspot = import ./jdk-darwin-base.nix sources.openjdk8.mac.jre.hotspot;
+  jdk-openj9 = import ./jdk-darwin-base.nix sources.openjdk8.mac.jdk.openj9;
+  jre-openj9 = import ./jdk-darwin-base.nix sources.openjdk8.mac.jre.openj9;
+}
diff --git a/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk8-linux.nix b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk8-linux.nix
new file mode 100644
index 000000000000..4937eace4903
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/jdk8-linux.nix
@@ -0,0 +1,9 @@
+let
+  sources = builtins.fromJSON (builtins.readFile ./sources.json);
+in
+{
+  jdk-hotspot = import ./jdk-linux-base.nix sources.openjdk8.linux.jdk.hotspot;
+  jre-hotspot = import ./jdk-linux-base.nix sources.openjdk8.linux.jre.hotspot;
+  jdk-openj9 = import ./jdk-linux-base.nix sources.openjdk8.linux.jdk.openj9;
+  jre-openj9 = import ./jdk-linux-base.nix sources.openjdk8.linux.jre.openj9;
+}
diff --git a/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/sources.json b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/sources.json
new file mode 100644
index 000000000000..80a16465af25
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-bin/sources.json
@@ -0,0 +1,392 @@
+{
+  "openjdk11": {
+    "linux": {
+      "jdk": {
+        "hotspot": {
+          "aarch64": {
+            "build": "10",
+            "sha256": "04b77f6754aed68528f39750c5cfd6a439190206aff216aa081d62a0e1a794fa",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10/OpenJDK11U-jdk_aarch64_linux_hotspot_11.0.6_10.tar.gz",
+            "version": "11.0.6"
+          },
+          "armv6l": {
+            "build": "10",
+            "sha256": "ab5b76203e54fe7a5221535f6f407efa43153de029a746f60af3cffb7cb5080b",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10/OpenJDK11U-jdk_arm_linux_hotspot_11.0.6_10.tar.gz",
+            "version": "11.0.6"
+          },
+          "armv7l": {
+            "build": "10",
+            "sha256": "ab5b76203e54fe7a5221535f6f407efa43153de029a746f60af3cffb7cb5080b",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10/OpenJDK11U-jdk_arm_linux_hotspot_11.0.6_10.tar.gz",
+            "version": "11.0.6"
+          },
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "10",
+            "sha256": "330d19a2eaa07ed02757d7a785a77bab49f5ee710ea03b4ee2fa220ddd0feffc",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.6_10.tar.gz",
+            "version": "11.0.6"
+          }
+        },
+        "openj9": {
+          "packageType": "jdk",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "10",
+            "sha256": "1530172ee98edd129954fcdca1bf725f7b30c8bfc3cdc381c88de96b7d19e690",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10_openj9-0.18.1/OpenJDK11U-jdk_x64_linux_openj9_11.0.6_10_openj9-0.18.1.tar.gz",
+            "version": "11.0.6"
+          }
+        }
+      },
+      "jre": {
+        "hotspot": {
+          "aarch64": {
+            "build": "10",
+            "sha256": "7ed04ed9ed7271528e7f03490f1fd7dfbbc2d391414bd6fe4dd80ec3bad76d30",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10/OpenJDK11U-jre_aarch64_linux_hotspot_11.0.6_10.tar.gz",
+            "version": "11.0.6"
+          },
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "10",
+            "sha256": "c5a4e69e2be0e3e5f5bb7c759960b20650967d0f571baad4a7f15b2c03bda352",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10/OpenJDK11U-jre_x64_linux_hotspot_11.0.6_10.tar.gz",
+            "version": "11.0.6"
+          }
+        },
+        "openj9": {
+          "packageType": "jre",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "10",
+            "sha256": "056e4b5f7166f5daa44f36b06c735913bda52831d2e77fa2ac371505c66d10c1",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10_openj9-0.18.1/OpenJDK11U-jre_x64_linux_openj9_11.0.6_10_openj9-0.18.1.tar.gz",
+            "version": "11.0.6"
+          }
+        }
+      }
+    },
+    "mac": {
+      "jdk": {
+        "hotspot": {
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "10",
+            "sha256": "b87102274d983bf6bb0aa6c2c623301d0ff5eb7f61043ffd04abb00f962c2dcd",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10/OpenJDK11U-jdk_x64_mac_hotspot_11.0.6_10.tar.gz",
+            "version": "11.0.6"
+          }
+        },
+        "openj9": {
+          "packageType": "jdk",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "10",
+            "sha256": "9a5c5b3bb51a82e666c46b2d1bbafa8c2bbc3aae50194858c8f96c5d43a96f64",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10_openj9-0.18.1/OpenJDK11U-jdk_x64_mac_openj9_11.0.6_10_openj9-0.18.1.tar.gz",
+            "version": "11.0.6"
+          }
+        }
+      },
+      "jre": {
+        "hotspot": {
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "10",
+            "sha256": "ab3c2038a32c62843500109d2efb8f5dacdfa1de3cbb713c8226f26dc603cc33",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10/OpenJDK11U-jre_x64_mac_hotspot_11.0.6_10.tar.gz",
+            "version": "11.0.6"
+          }
+        },
+        "openj9": {
+          "packageType": "jre",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "10",
+            "sha256": "130850133d9701393352c2ce13ab541b4f900ff1f5ddf8257cda624968aada9f",
+            "url": "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.6%2B10_openj9-0.18.1/OpenJDK11U-jre_x64_mac_openj9_11.0.6_10_openj9-0.18.1.tar.gz",
+            "version": "11.0.6"
+          }
+        }
+      }
+    }
+  },
+  "openjdk13": {
+    "linux": {
+      "jdk": {
+        "hotspot": {
+          "aarch64": {
+            "build": "33",
+            "sha256": "74f4110333ac4239564ed864b1d7d69b7af32af39efcfbde9816e1486cb5ae07",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33/OpenJDK13U-jdk_aarch64_linux_hotspot_13_33.tar.gz",
+            "version": "13.0.0"
+          },
+          "armv6l": {
+            "build": "33",
+            "sha256": "477e1b8d26a220d6d570765e9e0a4a34dbb489fab63a420d0859d173efc59adb",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33/OpenJDK13U-jdk_arm_linux_hotspot_13_33.tar.gz",
+            "version": "13.0.0"
+          },
+          "armv7l": {
+            "build": "33",
+            "sha256": "477e1b8d26a220d6d570765e9e0a4a34dbb489fab63a420d0859d173efc59adb",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33/OpenJDK13U-jdk_arm_linux_hotspot_13_33.tar.gz",
+            "version": "13.0.0"
+          },
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "33",
+            "sha256": "e562caeffa89c834a69a44242d802eae3523875e427f07c05b1902c152638368",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33/OpenJDK13U-jdk_x64_linux_hotspot_13_33.tar.gz",
+            "version": "13.0.0"
+          }
+        },
+        "openj9": {
+          "packageType": "jdk",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "33",
+            "sha256": "68ebab0021c719694be8fc868478725a69c5c515cdb62e2933eefe87ba6437df",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33_openj9-0.16.0/OpenJDK13U-jdk_x64_linux_openj9_13_33_openj9-0.16.0.tar.gz",
+            "version": "13.0.0"
+          }
+        }
+      },
+      "jre": {
+        "hotspot": {
+          "aarch64": {
+            "build": "33",
+            "sha256": "2365b7fbba8d9125fb091933aad9f38f8cc1fbb0217cdec9ec75d2000f6d451a",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33/OpenJDK13U-jre_aarch64_linux_hotspot_13_33.tar.gz",
+            "version": "13.0.0"
+          },
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "33",
+            "sha256": "73800a0d7c4e81df408a8518d282aa2c001ce4ee15541574c639dfc3564f708f",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33/OpenJDK13U-jre_x64_linux_hotspot_13_33.tar.gz",
+            "version": "13.0.0"
+          }
+        },
+        "openj9": {
+          "packageType": "jre",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "33",
+            "sha256": "2ee59be5062a81daa7be85be161cab6b245f9a2e2cbd4769ae9edefaac41e31d",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33_openj9-0.16.0/OpenJDK13U-jre_x64_linux_openj9_13_33_openj9-0.16.0.tar.gz",
+            "version": "13.0.0"
+          }
+        }
+      }
+    },
+    "mac": {
+      "jdk": {
+        "hotspot": {
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "33",
+            "sha256": "f948be96daba250b6695e22cb51372d2ba3060e4d778dd09c89548889783099f",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33/OpenJDK13U-jdk_x64_mac_hotspot_13_33.tar.gz",
+            "version": "13.0.0"
+          }
+        },
+        "openj9": {
+          "packageType": "jdk",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "33",
+            "sha256": "583e0defd5c062550896ead7cac383be16f1a81d9b6492dfec26da9af5dcc1c0",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33_openj9-0.16.0/OpenJDK13U-jdk_x64_mac_openj9_13_33_openj9-0.16.0.tar.gz",
+            "version": "13.0.0"
+          }
+        }
+      },
+      "jre": {
+        "hotspot": {
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "33",
+            "sha256": "1c23efba7908de9a611a98e755602f45381a8f7c957adb3fc4012ab1369a352c",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33/OpenJDK13U-jre_x64_mac_hotspot_13_33.tar.gz",
+            "version": "13.0.0"
+          }
+        },
+        "openj9": {
+          "packageType": "jre",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "33",
+            "sha256": "33a60b78138d50cb02325156c7d1fcf588697749a4401f6c11a3cbefa3033127",
+            "url": "https://github.com/AdoptOpenJDK/openjdk13-binaries/releases/download/jdk-13%2B33_openj9-0.16.0/OpenJDK13U-jre_x64_mac_openj9_13_33_openj9-0.16.0.tar.gz",
+            "version": "13.0.0"
+          }
+        }
+      }
+    }
+  },
+  "openjdk8": {
+    "linux": {
+      "jdk": {
+        "hotspot": {
+          "aarch64": {
+            "build": "9",
+            "sha256": "35799a2fd4b467115aff1bc3a54853b5131ba9068e53e1ab0fbe5521a3f2ba83",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_aarch64_linux_hotspot_8u232b09.tar.gz",
+            "version": "8.0.232"
+          },
+          "armv6l": {
+            "build": "9",
+            "sha256": "fdd9f61f1b2df74242da54ee3b3231b0123782a917e9673351276da439c7cab1",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_arm_linux_hotspot_8u232b09.tar.gz",
+            "version": "8.0.232"
+          },
+          "armv7l": {
+            "build": "9",
+            "sha256": "fdd9f61f1b2df74242da54ee3b3231b0123782a917e9673351276da439c7cab1",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jdk_arm_linux_hotspot_8u232b09.tar.gz",
+            "version": "8.0.232"
+          },
+          "armv6l": {
+            "build": "10",
+            "sha256": "7b3d6ade8c25adca01095ba66642132d8c87a1a8caf3883850e34778453afcec",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jdk_arm_linux_hotspot_8u222b10.tar.gz",
+            "version": "8.0.222"
+          },
+          "armv7l": {
+            "build": "10",
+            "sha256": "7b3d6ade8c25adca01095ba66642132d8c87a1a8caf3883850e34778453afcec",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jdk_arm_linux_hotspot_8u222b10.tar.gz",
+            "version": "8.0.222"
+          },
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "8",
+            "sha256": "f39b523c724d0e0047d238eb2bb17a9565a60574cf651206c867ee5fc000ab43",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08/OpenJDK8U-jdk_x64_linux_hotspot_8u242b08.tar.gz",
+            "version": "8.0.242"
+          }
+        },
+        "openj9": {
+          "packageType": "jdk",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "8",
+            "sha256": "ca785af638b24f9d4df896f5a9f557cc9f1e5fa5e2b1174d6b906e3fd5474c2e",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08_openj9-0.18.1/OpenJDK8U-jdk_x64_linux_openj9_8u242b08_openj9-0.18.1.tar.gz",
+            "version": "8.0.242"
+          }
+        }
+      },
+      "jre": {
+        "hotspot": {
+          "aarch64": {
+            "build": "9",
+            "sha256": "4540db665260fdc84ae2f191e21beec9168a70a4227718bee5edd317707e2fda",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jre_aarch64_linux_hotspot_8u232b09.tar.gz",
+            "version": "8.0.232"
+          },
+          "armv6l": {
+            "build": "9",
+            "sha256": "8ab786fc2fa0a282f5cf57f6040f1976c32c3c5e480e900ce5925de6543f6688",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jre_arm_linux_hotspot_8u232b09.tar.gz",
+            "version": "8.0.232"
+          },
+          "armv7l": {
+            "build": "9",
+            "sha256": "8ab786fc2fa0a282f5cf57f6040f1976c32c3c5e480e900ce5925de6543f6688",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u232-b09/OpenJDK8U-jre_arm_linux_hotspot_8u232b09.tar.gz",
+            "version": "8.0.232"
+          },
+          "armv6l": {
+            "build": "10",
+            "sha256": "19de77b74812b90851816bdb991d6473488a10d3ac293c6accf46ae9b1f714a0",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jre_arm_linux_hotspot_8u222b10.tar.gz",
+            "version": "8.0.222"
+          },
+          "armv7l": {
+            "build": "10",
+            "sha256": "19de77b74812b90851816bdb991d6473488a10d3ac293c6accf46ae9b1f714a0",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u222-b10/OpenJDK8U-jre_arm_linux_hotspot_8u222b10.tar.gz",
+            "version": "8.0.222"
+          },
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "8",
+            "sha256": "5edfaefdbb0469d8b24d61c8aef80c076611053b1738029c0232b9a632fe2708",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08/OpenJDK8U-jre_x64_linux_hotspot_8u242b08.tar.gz",
+            "version": "8.0.242"
+          }
+        },
+        "openj9": {
+          "packageType": "jre",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "8",
+            "sha256": "985d3134b64c6196d4c9ddbc87af0c62b0e643cef71b29f3d25a8c7811811745",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08_openj9-0.18.1/OpenJDK8U-jre_x64_linux_openj9_8u242b08_openj9-0.18.1.tar.gz",
+            "version": "8.0.242"
+          }
+        }
+      }
+    },
+    "mac": {
+      "jdk": {
+        "hotspot": {
+          "packageType": "jdk",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "8",
+            "sha256": "06675b7d65bce0313ee1f2e888dd44267e8afeced75e0b39b5ad1f5fdff54e0b",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08/OpenJDK8U-jdk_x64_mac_hotspot_8u242b08.tar.gz",
+            "version": "8.0.242"
+          }
+        },
+        "openj9": {
+          "packageType": "jdk",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "8",
+            "sha256": "665dc9c8239b7270b007ab9dd7522570e2686e327d89caf57a6aa6e5c6450078",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08_openj9-0.18.1/OpenJDK8U-jdk_x64_mac_openj9_8u242b08_openj9-0.18.1.tar.gz",
+            "version": "8.0.242"
+          }
+        }
+      },
+      "jre": {
+        "hotspot": {
+          "packageType": "jre",
+          "vmType": "hotspot",
+          "x86_64": {
+            "build": "8",
+            "sha256": "fae3777e3441dc7384c339a9054aa7efc40cd2c501625a535c2d4648367ccca3",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08/OpenJDK8U-jre_x64_mac_hotspot_8u242b08.tar.gz",
+            "version": "8.0.242"
+          }
+        },
+        "openj9": {
+          "packageType": "jre",
+          "vmType": "openj9",
+          "x86_64": {
+            "build": "8",
+            "sha256": "d4a924558ddda0aed671a67f71714b71c25871a7659fd4c505851cf5ee866de5",
+            "url": "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u242-b08_openj9-0.18.1/OpenJDK8U-jre_x64_mac_openj9_8u242b08_openj9-0.18.1.tar.gz",
+            "version": "8.0.242"
+          }
+        }
+      }
+    }
+  }
+}
diff --git a/nixpkgs/pkgs/development/compilers/adoptopenjdk-icedtea-web/default.nix b/nixpkgs/pkgs/development/compilers/adoptopenjdk-icedtea-web/default.nix
new file mode 100644
index 000000000000..72ed184357c1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-icedtea-web/default.nix
@@ -0,0 +1,63 @@
+{ stdenv, fetchFromGitHub, cargo, rustc, autoreconfHook, jdk, glib, xulrunner, zip, pkgconfig, npapi_sdk, bash, bc }:
+
+stdenv.mkDerivation rec {
+  pname = "adoptopenjdk-icedtea-web";
+
+  version = "1.8.3";
+
+  src = fetchFromGitHub {
+    owner = "AdoptOpenJDK";
+    repo = "IcedTea-Web";
+    rev = "icedtea-web-${version}";
+    sha256 = "0bm5k11i2vgb54ch1bawsmjbwnqnp04saadwm2f2mggmmdc6b1qq";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig bc ];
+  buildInputs = [ cargo rustc glib xulrunner zip npapi_sdk ];
+
+  preConfigure = ''
+    configureFlagsArray+=("BIN_BASH=${bash}/bin/bash")
+  '';
+
+  patches = [ ./patches/0001-make-cargo-work-with-nix-build-on-linux.patch ];
+
+  doCheck = true;
+  preCheck = ''
+    # Needed for the below rust-launcher tests to pass
+    # dirs_paths_helper::tests::check_config_files_paths
+    # dirs_paths_helper::tests::check_legacy_config_files_paths
+
+    mkdir -p $HOME/.icedtea
+    touch $HOME/.icedtea/deployment.properties
+
+    mkdir -p $XDG_CONFIG_HOME/icedtea-web
+    touch $XDG_CONFIG_HOME/icedtea-web/deployment.properties
+  '';
+
+  HOME = "/build";
+  XDG_CONFIG_HOME = "/build";
+
+  configureFlags = [
+    "--with-itw-libs=DISTRIBUTION"
+    "--with-jdk-home=${jdk.home}"
+    "--disable-docs"
+  ];
+
+  mozillaPlugin = "/lib";
+
+  postInstall = ''
+    mkdir -p $out/share/applications
+    cp javaws.desktop itweb-settings.desktop policyeditor.desktop $out/share/applications
+  '';
+
+  meta = {
+    description = "Java web browser plugin and an implementation of Java Web Start";
+    longDescription = ''
+      A Free Software web browser plugin running applets written in the Java
+      programming language and an implementation of Java Web Start, originally
+      based on the NetX project.
+    '';
+    homepage = "https://github.com/adoptopenjdk/icedtea-web";
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/adoptopenjdk-icedtea-web/patches/0001-make-cargo-work-with-nix-build-on-linux.patch b/nixpkgs/pkgs/development/compilers/adoptopenjdk-icedtea-web/patches/0001-make-cargo-work-with-nix-build-on-linux.patch
new file mode 100644
index 000000000000..85cad6cf4678
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/adoptopenjdk-icedtea-web/patches/0001-make-cargo-work-with-nix-build-on-linux.patch
@@ -0,0 +1,46 @@
+Subject: [PATCH] make cargo work with nix-build on linux
+
+---
+ .cargo/config            | 2 ++
+ rust-launcher/Cargo.lock | 4 ++++
+ rust-launcher/Cargo.toml | 7 ++++---
+ 3 files changed, 10 insertions(+), 3 deletions(-)
+ create mode 100644 .cargo/config
+ create mode 100644 rust-launcher/Cargo.lock
+
+diff --git a/.cargo/config b/.cargo/config
+new file mode 100644
+index 0000000..03ec4a2
+--- /dev/null
++++ b/.cargo/config
+@@ -0,0 +1,2 @@
++[net]
++offline=true
+diff --git a/rust-launcher/Cargo.lock b/rust-launcher/Cargo.lock
+new file mode 100644
+index 0000000..6055cc0
+--- /dev/null
++++ b/rust-launcher/Cargo.lock
+@@ -0,0 +1,4 @@
++[[package]]
++name = "launcher"
++version = "1.8.0"
++
+diff --git a/rust-launcher/Cargo.toml b/rust-launcher/Cargo.toml
+index 61ee308..5e6e91b 100644
+--- a/rust-launcher/Cargo.toml
++++ b/rust-launcher/Cargo.toml
+@@ -3,6 +3,7 @@ name = "launcher"
+ version = "1.8.0"
+ authors = ["https://icedtea.classpath.org/wiki/IcedTea-Web"]
+ 
+-[dependencies]
+-[target.'cfg(windows)'.dependencies]
+-dunce = "0.1.1"
++[workspace]
++# We need this too or cargo will fail.  Some files seem to be copied around and
++# cargo thinks we are in a workspace, so let's exclude everything.
++exclude = ["*"]
+-- 
+2.19.2
+
diff --git a/nixpkgs/pkgs/development/compilers/aldor/default.nix b/nixpkgs/pkgs/development/compilers/aldor/default.nix
new file mode 100644
index 000000000000..09ccf9510bbd
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/aldor/default.nix
@@ -0,0 +1,52 @@
+{ fetchgit, stdenv, gmp, which, flex, bison, makeWrapper
+, autoconf, automake, libtool, jdk, perl }:
+
+stdenv.mkDerivation {
+  name = "aldor-1.2.0";
+
+  src = fetchgit {
+    url = "https://github.com/pippijn/aldor";
+    sha256 = "19v07ffq4r1gjnmg7a8ifgjkwan9a3rwbj0qjz8fycwy221844m6";
+    rev = "15471e75f3d65b93150f414ebcaf59a03054b68d";
+  };
+
+  buildInputs = [ gmp which flex bison makeWrapper autoconf automake libtool
+                  jdk perl ];
+
+  preConfigure = ''
+    cd aldor ;
+    ./autogen.sh ;
+  '';
+
+  postInstall = ''
+    for prog in aldor unicl javagen ;
+    do
+      wrapProgram $out/bin/$prog --set ALDORROOT $out \
+        --prefix PATH : ${jdk}/bin \
+        --prefix PATH : ${stdenv.cc}/bin ;
+    done
+  '';
+
+  meta = {
+    # Please become a maintainer to fix this package
+    broken = true;
+    homepage = "http://www.aldor.org/";
+    description = "Programming language with an expressive type system";
+    license = stdenv.lib.licenses.asl20;
+
+    longDescription = ''
+      Aldor is a programming language with an expressive type system well-suited
+      for mathematical computing and which has been used to develop a number of
+      computer algebra libraries. Originally known as A#, Aldor was conceived as
+      an extension language for the Axiom system, but is now used more in other settings.
+      In Aldor, types and functions are first class values that can be constructed
+      and manipulated within programs. Pervasive support for dependent types allows
+      static checking of dynamic objects. What does this mean for a normal user? Aldor
+      solves many difficulties encountered in widely-used object-oriented programming
+      languages. It allows programs to use a natural style, combining the more attractive
+      and powerful properties of functional, object-oriented and aspect-oriented styles.
+    '';
+
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/aliceml/default.nix b/nixpkgs/pkgs/development/compilers/aliceml/default.nix
new file mode 100644
index 000000000000..d3208b12dd68
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/aliceml/default.nix
@@ -0,0 +1,57 @@
+{stdenv, gcc, glibc, fetchurl, fetchgit, libtool, autoconf, automake, file, gnumake, which, zsh, m4, pkg-config, perl, gnome2, gtk2, pango, sqlite, libxml2, zlib, gmp, smlnj }:
+
+stdenv.mkDerivation {
+  name = "aliceml-1.4-7d44dc8e";
+
+  src = fetchgit {
+    url = "https://github.com/aliceml/aliceml";
+    rev = "7d44dc8e4097c6f85888bbf4ff86d51fe05b0a08";
+    sha256 = "1xpvia00cpig0i7qvz29sx7xjic6kd472ng722x4rapz8mjnf8bk";
+    fetchSubmodules = true;
+  };
+
+  gecodeSrc = fetchurl {
+    url = "http://www.gecode.org/download/gecode-1.3.1.tar.gz";
+    sha256 = "0mgc6llbq166jmlq3alvagqsg3730670zvbwwkdgsqklw70v9355";
+  };
+
+  buildInputs = [
+    stdenv gcc glibc
+    libtool gnumake autoconf automake
+    file which zsh m4 gtk2 zlib gmp
+    gnome2.libgnomecanvas pango sqlite
+    libxml2 pkg-config perl smlnj
+  ];
+
+  makePatch = ./make.patch;
+  seamPatch = ./seam.patch;
+
+  phases = [ "unpackPhase" "patchPhase" "configurePhase" "buildPhase" ];
+
+  patchPhase = ''
+    sed -i -e "s@wget ..GECODE_URL. -O - | tar xz@tar xf $gecodeSrc@" make/Makefile
+    patch -p1 <$makePatch
+    patch -p1 <$seamPatch
+  '';
+
+  configurePhase = ''
+    make -C make setup PREFIX="$out"
+  '';
+
+  buildPhase = ''
+    gmp="${gmp.dev}" zlib="${zlib.dev}" PATH=$PATH:`pwd`/seam-support/install/bin make -C make all PREFIX="$out"
+  '';
+
+  meta = {
+    description = "Functional programming language based on Standard ML";
+    longDescription = ''
+      Alice ML is a functional programming language based on Standard ML,
+      extended with rich support for concurrent, distributed, and constraint
+      programming.
+    '';
+    homepage = "https://www.ps.uni-saarland.de/alice/";
+    license = stdenv.lib.licenses.mit;
+    maintainers = [ stdenv.lib.maintainers.doublec ];
+    broken = true;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/aliceml/make.patch b/nixpkgs/pkgs/development/compilers/aliceml/make.patch
new file mode 100644
index 000000000000..78e2b28974e8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/aliceml/make.patch
@@ -0,0 +1,20 @@
+diff --git a/Makefile b/Makefile
+index 6a55b06..84a6000 100644
+--- a/make/Makefile
++++ b/make/Makefile
+@@ -387,6 +387,7 @@ configure-seam-linux64:
+ 	 ../sources/configure \
+ 		--prefix='$(PREFIX)' \
+ 		--with-warnings=yes \
++		--with-zlib='$(zlib)' \
+ 		--disable-lightning)
+ 
+ .PHONY: configure-seam-darwin64
+@@ -434,6 +435,7 @@ configure-alice-ll-linux:
+ 	(cd $(PWD)/alice/build && \
+ 	 ../sources/vm-seam/configure \
+ 		--prefix='$(PREFIX)' \
++		--with-gmp='$(gmp)' \
+ 		--with-warnings=yes)
+ 
+ .PHONY:	rebuild-alice-ll
diff --git a/nixpkgs/pkgs/development/compilers/aliceml/seam.patch b/nixpkgs/pkgs/development/compilers/aliceml/seam.patch
new file mode 100644
index 000000000000..d489037fef4a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/aliceml/seam.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile.cvs b/Makefile.cvs
+index b59434a..cd1316f 100644
+--- a/seam/sources/Makefile.cvs
++++ b/seam/sources/Makefile.cvs
+@@ -32,7 +32,7 @@ autotools:
+ 	aclocal -I .
+ 	autoconf
+ 	automake --add-missing
+-	cd libltdl; aclocal; autoconf; automake --add-missing
++	cd libltdl; chmod +w *; aclocal; autoconf; automake --add-missing
+ 
+ lightning:
+ 	rm -rf lightning
diff --git a/nixpkgs/pkgs/development/compilers/apache-flex-sdk/default.nix b/nixpkgs/pkgs/development/compilers/apache-flex-sdk/default.nix
new file mode 100644
index 000000000000..ed6b2b2ff247
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/apache-flex-sdk/default.nix
@@ -0,0 +1,56 @@
+{ stdenv, fetchurl, makeWrapper, jre }:
+
+let
+  playerglobal_ver = "27.0";
+  playerglobal = fetchurl {
+    url = "https://fpdownload.macromedia.com/get/flashplayer/updaters/27/playerglobal27_0.swc";
+    sha256 = "0qw2bgls8qsmp80j8vpd4c7s0c8anlrk0ac8z42w89bajcdbwk2f";
+  };
+in stdenv.mkDerivation rec {
+  pname = "apache-flex-sdk";
+  version = "4.16.1";
+
+  src = fetchurl {
+    url = "https://www.apache.org/dist/flex/${version}/binaries/${pname}-${version}-bin.tar.gz";
+    sha256 = "13iq16dqvgcpb0p35x66hzxsq5pkbr2lbwr766nnqiryinnagz8p";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  buildInputs = [ jre ];
+
+  buildPhase = ":";
+
+  postPatch = ''
+    shopt -s extglob
+    for i in bin/!(aasdoc|acompc|amxmlc); do
+      substituteInPlace $i --replace "java " "${jre}/bin/java "
+    done
+  '';
+
+  installPhase = ''
+    t=$out/opt/apache-flex-sdk
+    mkdir -p $t $out/bin
+    mv * $t
+    rm $t/bin/*.bat
+    ln -s $t/bin/* $out/bin/
+
+    for i in $out/bin/!(aasdoc|acompc|amxmlc); do
+      wrapProgram $i \
+        --set FLEX_HOME $t \
+        --set PLAYERGLOBAL_HOME $t/frameworks/libs/player/ 
+    done
+
+    mkdir -p $t/frameworks/libs/player/${playerglobal_ver}/
+    cp ${playerglobal} $t/frameworks/libs/player/${playerglobal_ver}/playerglobal.swc
+  '';
+  
+  fixupPhase = ":";
+
+  meta = with stdenv.lib; {
+    description = "Flex SDK for Adobe Flash / ActionScript";
+    homepage = "https://flex.apache.org/";
+    license = with licenses; [ asl20 ];
+    maintainers = with maintainers; [ dywedir ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/arachne-pnr/default.nix b/nixpkgs/pkgs/development/compilers/arachne-pnr/default.nix
new file mode 100644
index 000000000000..613f3fa186aa
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/arachne-pnr/default.nix
@@ -0,0 +1,44 @@
+{ stdenv, fetchFromGitHub, icestorm }:
+
+with builtins;
+
+stdenv.mkDerivation rec {
+  pname = "arachne-pnr";
+  version = "2019.07.29";
+
+  src = fetchFromGitHub {
+    owner  = "yosyshq";
+    repo   = "arachne-pnr";
+    rev    = "c40fb2289952f4f120cc10a5a4c82a6fb88442dc";
+    sha256 = "0lg9rccr486cvips3jf289af2b4a2j9chc8iqnkhykgi1hw4pszc";
+  };
+
+  enableParallelBuilding = true;
+  makeFlags =
+    [ "PREFIX=$(out)"
+      "ICEBOX=${icestorm}/share/icebox"
+    ];
+
+  patchPhase = ''
+    substituteInPlace ./Makefile \
+      --replace 'echo UNKNOWN' 'echo ${substring 0 10 src.rev}'
+  '';
+
+  meta = {
+    description = "Place and route tool for FPGAs";
+    longDescription = ''
+      Arachne-pnr implements the place and route step of
+      the hardware compilation process for FPGAs. It
+      accepts as input a technology-mapped netlist in BLIF
+      format, as output by the Yosys [0] synthesis suite
+      for example. It currently targets the Lattice
+      Semiconductor iCE40 family of FPGAs [1]. Its output
+      is a textual bitstream representation for assembly by
+      the IceStorm [2] icepack command.
+    '';
+    homepage = "https://github.com/cseed/arachne-pnr";
+    license = stdenv.lib.licenses.mit;
+    maintainers = with stdenv.lib.maintainers; [ shell thoughtpolice ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/asn1c/default.nix b/nixpkgs/pkgs/development/compilers/asn1c/default.nix
new file mode 100644
index 000000000000..230ed36fff51
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/asn1c/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl, perl }:
+
+stdenv.mkDerivation rec {
+  pname = "asn1c";
+  version = "0.9.28";
+
+  src = fetchurl {
+    url = "https://lionet.info/soft/asn1c-${version}.tar.gz";
+    sha256 = "1fc64g45ykmv73kdndr4zdm4wxhimhrir4rxnygxvwkych5l81w0";
+  };
+
+  outputs = [ "out" "doc" "man" ];
+
+  buildInputs = [ perl ];
+
+  preConfigure = ''
+    patchShebangs examples/crfc2asn1.pl
+  '';
+
+  postInstall = ''
+    cp -r skeletons/standard-modules $out/share/asn1c
+  '';
+
+  doCheck = true;
+
+  meta = with stdenv.lib; {
+    homepage = "http://lionet.info/asn1c/compiler.html";
+    description = "Open Source ASN.1 Compiler";
+    license = licenses.bsd2;
+    platforms = platforms.all;
+    maintainers = [ maintainers.montag451 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/aspectj/builder.sh b/nixpkgs/pkgs/development/compilers/aspectj/builder.sh
new file mode 100755
index 000000000000..3b4393720042
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/aspectj/builder.sh
@@ -0,0 +1,27 @@
+source $stdenv/setup
+
+export JAVA_HOME=$jre
+
+cat >> props <<EOF
+output.dir=$out
+context.javaPath=$jre
+EOF
+
+mkdir -p $out
+$jre/bin/java -jar $src -text props
+
+echo "Removing files at top level"
+for file in $out/*
+do
+  if test -f $file ; then
+    rm $file
+  fi
+done
+
+cat >> $out/bin/aj-runtime-env <<EOF
+#! $SHELL
+
+export CLASSPATH=$CLASSPATH:.:$out/lib/aspectjrt.jar
+EOF
+
+chmod u+x $out/bin/aj-runtime-env
diff --git a/nixpkgs/pkgs/development/compilers/aspectj/default.nix b/nixpkgs/pkgs/development/compilers/aspectj/default.nix
new file mode 100644
index 000000000000..94dc813d78a2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/aspectj/default.nix
@@ -0,0 +1,21 @@
+{stdenv, fetchurl, jre}:
+
+stdenv.mkDerivation rec {
+  name = "aspectj-1.5.2";
+  builder = ./builder.sh;
+
+  src = fetchurl {
+    url = "http://archive.eclipse.org/tools/aspectj/${name}.jar";
+    sha256 = "1b3mx248dc1xka1vgsl0jj4sm0nfjsqdcj9r9036mvixj1zj3nmh";
+  };
+
+  inherit jre;
+  buildInputs = [jre];
+
+  meta = {
+    homepage = "http://www.eclipse.org/aspectj/";
+    description = "A seamless aspect-oriented extension to the Java programming language";
+    platforms = stdenv.lib.platforms.unix;
+    license = stdenv.lib.licenses.epl10;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/ats/default.nix b/nixpkgs/pkgs/development/compilers/ats/default.nix
new file mode 100644
index 000000000000..f086c36468d7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ats/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl, gmp }:
+
+stdenv.mkDerivation rec {
+  pname = "ats";
+  version = "0.2.12";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/ats-lang/ats-lang-anairiats-${version}.tgz";
+    sha256 = "0l2kj1fzhxwsklwmn5yj2vp9rmw4jg0b18bzwqz72bfi8i39736k";
+  };
+
+  # this is necessary because atxt files usually include some .hats files
+  patches = [ ./install-atsdoc-hats-files.patch ];
+  buildInputs = [ gmp ];
+
+  meta = {
+    description = "Functional programming language with dependent types";
+    homepage    = "http://www.ats-lang.org";
+    license     = stdenv.lib.licenses.gpl3Plus;
+    # TODO: it looks like ATS requires gcc specifically. Someone with more knowledge
+    # will need to experiment.
+    platforms   = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/ats/install-atsdoc-hats-files.patch b/nixpkgs/pkgs/development/compilers/ats/install-atsdoc-hats-files.patch
new file mode 100644
index 000000000000..93c6fa07d8a6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ats/install-atsdoc-hats-files.patch
@@ -0,0 +1,38 @@
+--- ats-lang-anairiats-0.2.11/Makefile	2013-12-10 00:43:52.000000000 +0100
++++ ats-lang-anairiats-0.2.11/Makefile	2014-03-02 07:49:06.985837425 +0100
+@@ -97,7 +97,7 @@
+ 	cd $(abs_top_srcdir)
+ 	[ -d $(bindir2) ] || $(MKDIR_P) $(bindir2)
+ 	$(MKDIR_P) $(ATSLIBHOME2)/bin
+-	find ccomp contrib doc libats libc prelude -type d \
++	find ccomp contrib doc libats libatsdoc libc prelude -type d \
+ 	  -exec $(MKDIR_P) $(ATSLIBHOME2)/\{} \; \
+ 	  -print
+ 
+@@ -105,7 +105,7 @@
+ #
+ # recursively install all files in the list except .svn control files.
+ #
+-	for d in ccomp/runtime contrib doc libats libc prelude; do \
++	for d in ccomp/runtime contrib doc libats libatsdoc libc prelude; do \
+ 	  cd $(abs_top_srcdir) && \
+ 	  $(INSTALL) -d $(ATSLIBHOME2)/"$$d" && \
+ 	  find "$$d" -name .svn -prune -o -type f \
+@@ -143,6 +143,17 @@
+ 	  $(INSTALL) -m 755 ats_env.sh $(bindir2)/"$$b" && \
+ 	  echo [ats_env.sh] is installed into $(bindir2)/"$$b"; \
+ 	done
++#
++# install atsdoc headers
++#
++	for f in \
++	    utils/atsdoc/SATS/*.sats utils/atsdoc/DATS/*.dats utils/atsdoc/HATS/*.hats; \
++	do \
++	  [ -f "$$f" ] || continue; \
++	  cd $(abs_top_srcdir) && \
++	  $(INSTALL) -m 644 -D "$$f" $(ATSLIBHOME2)/"$$f" && \
++	  echo "$$f"; \
++	done
+ 
+ install:: install_files
+ 
diff --git a/nixpkgs/pkgs/development/compilers/ats2/default.nix b/nixpkgs/pkgs/development/compilers/ats2/default.nix
new file mode 100644
index 000000000000..a1e5927e349f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ats2/default.nix
@@ -0,0 +1,57 @@
+{ stdenv, fetchurl, gmp
+, withEmacsSupport ? true
+, withContrib ? true }:
+
+let
+  versionPkg = "0.3.13" ;
+
+  contrib = fetchurl {
+    url = "mirror://sourceforge/ats2-lang/ATS2-Postiats-contrib-${versionPkg}.tgz";
+    sha256 = "5f64172b2df08c8563b01febc32b582b2d7b59c0c514bd2beb727e69bb8e24ee";
+  };
+
+  postInstallContrib = stdenv.lib.optionalString withContrib
+  ''
+    local contribDir=$out/lib/ats2-postiats-*/ ;
+    mkdir -p $contribDir ;
+    tar -xzf "${contrib}" --strip-components 1 -C $contribDir ;
+  '';
+
+  postInstallEmacs = stdenv.lib.optionalString withEmacsSupport
+  ''
+    local siteLispDir=$out/share/emacs/site-lisp/ats2 ;
+    mkdir -p $siteLispDir ;
+    install -m 0644 -v ./utils/emacs/*.el $siteLispDir ;
+  '';
+in
+
+stdenv.mkDerivation rec {
+  pname = "ats2";
+  version = versionPkg;
+
+  src = fetchurl {
+    url = "mirror://sourceforge/ats2-lang/ATS2-Postiats-gmp-${version}.tgz";
+    sha256 = "0056ff5bfa55c9b9831dce004e7b1b9e7a98d56a9d8ae49d827f9fd0ef823c23";
+  };
+
+  buildInputs = [ gmp ];
+
+  setupHook = with stdenv.lib;
+    let
+      hookFiles =
+        [ ./setup-hook.sh ]
+        ++ optional withContrib ./setup-contrib-hook.sh;
+    in
+      builtins.toFile "setupHook.sh"
+      (concatMapStringsSep "\n" builtins.readFile hookFiles);
+
+  postInstall = postInstallContrib + postInstallEmacs;
+
+  meta = with stdenv.lib; {
+    description = "Functional programming language with dependent types";
+    homepage    = "http://www.ats-lang.org";
+    license     = licenses.gpl3Plus;
+    platforms   = platforms.linux;
+    maintainers = with maintainers; [ thoughtpolice ttuegel bbarker ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/ats2/setup-contrib-hook.sh b/nixpkgs/pkgs/development/compilers/ats2/setup-contrib-hook.sh
new file mode 100644
index 000000000000..8c5e123b61c4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ats2/setup-contrib-hook.sh
@@ -0,0 +1 @@
+export PATSHOMERELOC=@out@/lib/ats2-postiats-@version@
diff --git a/nixpkgs/pkgs/development/compilers/ats2/setup-hook.sh b/nixpkgs/pkgs/development/compilers/ats2/setup-hook.sh
new file mode 100644
index 000000000000..67647b1edf69
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ats2/setup-hook.sh
@@ -0,0 +1 @@
+export PATSHOME=@out@/lib/ats2-postiats-@version@
diff --git a/nixpkgs/pkgs/development/compilers/avian/default.nix b/nixpkgs/pkgs/development/compilers/avian/default.nix
new file mode 100644
index 000000000000..7c5db45f31b4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/avian/default.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchFromGitHub, zlib, jdk, CoreServices, Foundation }:
+
+stdenv.mkDerivation rec {
+  pname = "avian";
+  version = "1.2.0";
+
+  src = fetchFromGitHub {
+    owner = "readytalk";
+    repo = "avian";
+    rev = "v${version}";
+    sha256 = "1j2y45cpqk3x6a743mgpg7z3ivwm7qc9jy6xirvay7ah1qyxmm48";
+  };
+
+  buildInputs = [ zlib jdk ]
+    ++ stdenv.lib.optionals stdenv.isDarwin [ CoreServices Foundation ];
+
+  NIX_CFLAGS_COMPILE = "-Wno-error";
+
+  postPatch = ''
+    substituteInPlace makefile \
+        --replace 'g++' 'c++' \
+        --replace 'gcc' 'cc'
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp build/*/avian $out/bin/
+    cp build/*/avian-dynamic $out/bin/
+  '';
+
+  meta = {
+    description = "Lightweight Java virtual machine";
+    longDescription = ''
+      Avian is a lightweight virtual machine and class library designed
+      to provide a useful subset of Java’s features, suitable for
+      building self-contained applications.
+    '';
+    homepage = "https://readytalk.github.io/avian/";
+    license = stdenv.lib.licenses.isc;
+    platforms = stdenv.lib.platforms.all;
+    maintainers = [ stdenv.lib.maintainers.earldouglas ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/avra/default.nix b/nixpkgs/pkgs/development/compilers/avra/default.nix
new file mode 100644
index 000000000000..56bf3e657bec
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/avra/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl, autoconf, automake }:
+stdenv.mkDerivation rec {
+  name = "avra-1.3.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/avra/${name}.tar.bz2";
+    sha256 = "04lp0k0h540l5pmnaai07637f0p4zi766v6sfm7cryfaca3byb56";
+  };
+
+  buildInputs = [ autoconf automake ];
+
+  preConfigure = ''
+    cd src/
+
+    aclocal
+    autoconf
+
+    touch NEWS README AUTHORS ChangeLog
+    automake -a
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Assembler for the Atmel AVR microcontroller family";
+    homepage = "http://avra.sourceforge.net/";
+    license = licenses.gpl2Plus;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/bigloo/default.nix b/nixpkgs/pkgs/development/compilers/bigloo/default.nix
new file mode 100644
index 000000000000..32116048a438
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/bigloo/default.nix
@@ -0,0 +1,57 @@
+{ fetchurl, stdenv, gmp }:
+
+stdenv.mkDerivation rec {
+  pname = "bigloo";
+  version = "4.1a-2";
+
+  src = fetchurl {
+    url = "ftp://ftp-sop.inria.fr/indes/fp/Bigloo/bigloo${version}.tar.gz";
+    sha256 = "09yrz8r0jpj7bda39fdxzrrdyhi851nlfajsyf0b6jxanz6ygcjx";
+  };
+
+  propagatedBuildInputs = [ gmp ];
+
+  preConfigure =
+    # Help libgc's configure.
+    '' export CXXCPP="$CXX -E"
+    '';
+
+  patchPhase = ''
+    # Fix absolute paths.
+    sed -e 's=/bin/mv=mv=g' -e 's=/bin/rm=rm=g'			\
+        -e 's=/tmp=$TMPDIR=g' -i autoconf/*		\
+	[Mm]akefile*   */[Mm]akefile*   */*/[Mm]akefile*	\
+	*/*/*/[Mm]akefile*   */*/*/*/[Mm]akefile*		\
+	comptime/Cc/cc.scm gc/install-*
+
+    # Make sure we don't change string lengths in the generated
+    # C files.
+    sed -e 's=/bin/rm=     rm=g' -e 's=/bin/mv=     mv=g'	\
+	-i comptime/Cc/cc.c
+  '';
+
+  checkTarget = "test";
+
+  # Hack to avoid TMPDIR in RPATHs.
+  preFixup = ''rm -rf "$(pwd)" '';
+
+  meta = {
+    description = "Efficient Scheme compiler";
+    homepage    = "http://www-sop.inria.fr/indes/fp/Bigloo/";
+    license     = stdenv.lib.licenses.gpl2Plus;
+    platforms   = stdenv.lib.platforms.unix;
+    maintainers = with stdenv.lib.maintainers; [ thoughtpolice ];
+
+    longDescription = ''
+      Bigloo is a Scheme implementation devoted to one goal: enabling
+      Scheme based programming style where C(++) is usually
+      required.  Bigloo attempts to make Scheme practical by offering
+      features usually presented by traditional programming languages
+      but not offered by Scheme and functional programming.  Bigloo
+      compiles Scheme modules.  It delivers small and fast stand alone
+      binary executables.  Bigloo enables full connections between
+      Scheme and C programs, between Scheme and Java programs, and
+      between Scheme and C# programs.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/binaryen/0001-Get-rid-of-git-dependency.patch b/nixpkgs/pkgs/development/compilers/binaryen/0001-Get-rid-of-git-dependency.patch
new file mode 100644
index 000000000000..79b053592a95
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/binaryen/0001-Get-rid-of-git-dependency.patch
@@ -0,0 +1,38 @@
+From 1c6af6c68ba3f49ae9e942844c739e934339d3b9 Mon Sep 17 00:00:00 2001
+From: Maximilian Bosch <maximilian@mbosch.me>
+Date: Sat, 14 Mar 2020 00:37:31 +0100
+Subject: [PATCH] Get rid of git dependency
+
+---
+ CMakeLists.txt | 15 +--------------
+ 1 file changed, 1 insertion(+), 14 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4acf703e1..4e9bd60b5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -7,20 +7,7 @@ IF(NOT CMAKE_BUILD_TYPE)
+   SET(CMAKE_BUILD_TYPE "Release")
+ ENDIF()
+ 
+-FIND_PACKAGE(Git QUIET REQUIRED)
+-EXECUTE_PROCESS(COMMAND
+-             "${GIT_EXECUTABLE}" --git-dir=${CMAKE_CURRENT_SOURCE_DIR}/.git describe --tags
+-         RESULT_VARIABLE
+-             GIT_HASH_RESULT
+-         OUTPUT_VARIABLE
+-             GIT_HASH
+-         OUTPUT_STRIP_TRAILING_WHITESPACE)
+-IF(${GIT_HASH_RESULT})
+-  MESSAGE(WARNING "Error running git describe to determine version")
+-  SET(BINARYEN_VERSION_INFO "(unable to determine version)")
+-ELSE()
+-  SET(BINARYEN_VERSION_INFO "${GIT_HASH}")
+-ENDIF()
++SET(BINARYEN_VERSION_INFO "@emscriptenv@")
+ CONFIGURE_FILE(config.h.in config.h)
+ 
+ OPTION(BUILD_STATIC_LIB "Build as a static library" OFF)
+-- 
+2.25.0
+
diff --git a/nixpkgs/pkgs/development/compilers/binaryen/default.nix b/nixpkgs/pkgs/development/compilers/binaryen/default.nix
new file mode 100644
index 000000000000..651c88704da3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/binaryen/default.nix
@@ -0,0 +1,46 @@
+{ stdenv, cmake, python3, fetchFromGitHub, emscriptenRev ? null, substituteAll }:
+
+let
+  defaultVersion = "94";
+
+  # Map from git revs to SHA256 hashes
+  sha256s = {
+    version_94 = "1wk20fhyppb2ljni7ifqnsx9kl1kcl6c0svc0qljf0bs6rvr9qdm";
+    "1.39.1" = "0ygm9m5322h4vfpf3j63q32qxk2l26yk62hh7dkb49j51zwl1y3y";
+  };
+in
+
+stdenv.mkDerivation rec {
+  version = if emscriptenRev == null
+            then defaultVersion
+            else "emscripten-${emscriptenRev}";
+  rev = if emscriptenRev == null
+        then "version_${version}"
+        else emscriptenRev;
+  pname = "binaryen";
+
+  src = fetchFromGitHub {
+    owner = "WebAssembly";
+    repo = "binaryen";
+    sha256 =
+      if builtins.hasAttr rev sha256s
+      then builtins.getAttr rev sha256s
+      else null;
+    inherit rev;
+  };
+
+  patches = stdenv.lib.optional (emscriptenRev != null) (substituteAll {
+    src = ./0001-Get-rid-of-git-dependency.patch;
+    emscriptenv = "1.39.1";
+  });
+
+  nativeBuildInputs = [ cmake python3 ];
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/WebAssembly/binaryen";
+    description = "Compiler infrastructure and toolchain library for WebAssembly, in C++";
+    platforms = platforms.all;
+    maintainers = with maintainers; [ asppsa ];
+    license = licenses.asl20;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/bluespec/default.nix b/nixpkgs/pkgs/development/compilers/bluespec/default.nix
new file mode 100644
index 000000000000..49737b48c575
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/bluespec/default.nix
@@ -0,0 +1,98 @@
+{ stdenv
+, fetchFromGitHub
+, fetchpatch
+, autoconf
+, automake
+, fontconfig
+, gmp
+, gperf
+, haskell
+, libX11
+, libpoly
+, perl
+, pkgconfig
+, verilog
+, xorg
+, zlib
+}:
+
+let
+  # yices wants a libgmp.a and fails otherwise
+  gmpStatic = gmp.override { withStatic = true; };
+
+  # Compiling PreludeBSV fails with more recent GHC versions
+  # > imperative statement (not BVI context)
+  # https://github.com/B-Lang-org/bsc/issues/20#issuecomment-583724030
+  ghcWithPackages = haskell.packages.ghc844.ghc.withPackages (g: (with g; [old-time regex-compat syb]));
+in stdenv.mkDerivation rec {
+  pname = "bluespec";
+  version = "unstable-2020.02.09";
+
+  src = fetchFromGitHub {
+    owner  = "B-Lang-org";
+    repo   = "bsc";
+    rev    = "05c8afb08078e437c635b9c708124b428ac51b3d";
+    sha256 = "06yhpkz7wga1a0p9031cfjqbzw7205bj2jxgdghhfzmllaiphniy";
+    fetchSubmodules = true;
+  };
+
+  enableParallelBuilding = true;
+
+  buildInputs = [
+    zlib
+    gmpStatic gperf libpoly # yices
+    libX11 # tcltk
+    xorg.libXft
+    fontconfig
+  ];
+
+  nativeBuildInputs = [
+    automake autoconf
+    perl
+    pkgconfig
+    ghcWithPackages
+  ];
+
+  checkInputs = [
+    verilog
+  ];
+
+  patches = [
+    # drop stp support https://github.com/B-Lang-org/bsc/pull/31
+    (fetchpatch {
+      url = "https://github.com/flokli/bsc/commit/0bd48ecc2561541dc1368918863c0b2f4915006f.patch";
+      sha256 = "0bam9anld33zfi9d4gs502g94w49zhl5iqmbs2d1p5i19aqpy38l";
+    })
+  ];
+
+  preBuild = ''
+    patchShebangs \
+      src/Verilog/copy_module.pl \
+      src/comp/update-build-version.sh \
+      src/comp/update-build-system.sh \
+      src/comp/wrapper.sh
+
+    substituteInPlace src/comp/Makefile \
+      --replace 'BINDDIR' 'BINDIR' \
+      --replace 'install-bsc install-bluetcl' 'install-bsc install-bluetcl $(UTILEXES) install-utils'
+  '';
+
+  makeFlags = [
+    "NOGIT=1" # https://github.com/B-Lang-org/bsc/issues/12
+    "LDCONFIG=ldconfig" # https://github.com/B-Lang-org/bsc/pull/43
+  ];
+
+  installPhase = "mv inst $out";
+
+  doCheck = true;
+
+  meta = {
+    description = "Toolchain for the Bluespec Hardware Definition Language";
+    homepage    = "https://github.com/B-Lang-org/bsc";
+    license     = stdenv.lib.licenses.bsd3;
+    platforms = [ "x86_64-linux" ];
+    # darwin fails at https://github.com/B-Lang-org/bsc/pull/35#issuecomment-583731562
+    # aarch64 fails, as GHC fails with "ghc: could not execute: opt"
+    maintainers = with stdenv.lib.maintainers; [ flokli thoughtpolice ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/bs-platform/build-bs-platform.nix b/nixpkgs/pkgs/development/compilers/bs-platform/build-bs-platform.nix
new file mode 100644
index 000000000000..71ba415d6202
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/bs-platform/build-bs-platform.nix
@@ -0,0 +1,64 @@
+# This file is based on https://github.com/turboMaCk/bs-platform.nix/blob/master/build-bs-platform.nix
+# to make potential future updates simpler
+
+{ stdenv, fetchFromGitHub, ninja, runCommand, nodejs, python3,
+  ocaml-version, version, src,
+  ocaml ? (import ./ocaml.nix {
+    version = ocaml-version;
+    inherit stdenv;
+    src = "${src}/ocaml";
+  }),
+  custom-ninja ? (ninja.overrideAttrs (attrs: {
+    src = runCommand "ninja-patched-source" {} ''
+      mkdir -p $out
+      tar zxvf ${src}/vendor/ninja.tar.gz -C $out
+    '';
+    patches = [];
+  }))
+}:
+
+let
+  bin_folder = if stdenv.isDarwin then "darwin" else "linux";
+in
+
+stdenv.mkDerivation rec {
+  inherit src version;
+  pname = "bs-platform";
+
+  BS_RELEASE_BUILD = "true";
+
+  # BuckleScript's idiosyncratic build process only builds artifacts required
+  # for editor-tooling to work when this environment variable is set:
+  # https://github.com/BuckleScript/bucklescript/blob/7.2.0/scripts/install.js#L225-L227
+  BS_TRAVIS_CI = "1";
+
+  buildInputs = [ nodejs python3 custom-ninja ];
+
+  patchPhase = ''
+    sed -i 's:./configure.py --bootstrap:python3 ./configure.py --bootstrap:' ./scripts/install.js
+    mkdir -p ./native/${ocaml-version}/bin
+    ln -sf ${ocaml}/bin/*  ./native/${ocaml-version}/bin
+  '';
+
+  # avoid building the development version, will break aarch64 build
+  dontConfigure = true;
+
+  buildPhase = ''
+    # This is an unfortunate name, but it's actually how to build a release
+    # binary for BuckleScript
+    node scripts/install.js
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp -rf jscomp lib ${bin_folder} vendor odoc_gen native bsb bsc bsrefmt $out
+    mkdir -p $out/lib/ocaml
+    cp jscomp/runtime/js.* jscomp/runtime/*.cm* $out/lib/ocaml
+    cp jscomp/others/*.ml jscomp/others/*.mli jscomp/others/*.cm* $out/lib/ocaml
+    cp jscomp/stdlib-406/*.ml jscomp/stdlib-406/*.mli jscomp/stdlib-406/*.cm* $out/lib/ocaml
+    cp bsconfig.json package.json $out
+    ln -s $out/bsb $out/bin/bsb
+    ln -s $out/bsc $out/bin/bsc
+    ln -s $out/bsrefmt $out/bin/bsrefmt
+  '';
+}
diff --git a/nixpkgs/pkgs/development/compilers/bs-platform/default.nix b/nixpkgs/pkgs/development/compilers/bs-platform/default.nix
new file mode 100644
index 000000000000..0fd696c69f0a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/bs-platform/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, runCommand, fetchFromGitHub, ninja, nodejs, python3, ... }:
+let
+  build-bs-platform = import ./build-bs-platform.nix;
+in
+(build-bs-platform rec {
+  inherit stdenv runCommand fetchFromGitHub ninja nodejs python3;
+  version = "7.3.2";
+  ocaml-version = "4.06.1";
+
+  src = fetchFromGitHub {
+    owner = "BuckleScript";
+    repo = "bucklescript";
+    rev = version;
+    sha256 = "1nvp7wiiv149r4qf9bgc84bm4w7s44sjq9i7j103v24wllzz218s";
+    fetchSubmodules = true;
+  };
+}).overrideAttrs (attrs: {
+  meta = with stdenv.lib; {
+    description = "A JavaScript backend for OCaml focused on smooth integration and clean generated code.";
+    homepage = "https://bucklescript.github.io";
+    license = licenses.lgpl3;
+    maintainers = with maintainers; [ turbomack gamb anmonteiro ];
+    platforms = platforms.all;
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/bs-platform/ocaml.nix b/nixpkgs/pkgs/development/compilers/bs-platform/ocaml.nix
new file mode 100644
index 000000000000..9aa34d02b362
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/bs-platform/ocaml.nix
@@ -0,0 +1,16 @@
+{ stdenv, src, version }:
+stdenv.mkDerivation rec {
+  inherit src version;
+  name = "ocaml-${version}+bs";
+  configurePhase = ''
+    ./configure -prefix $out
+  '';
+  buildPhase = ''
+    make -j9 world.opt
+  '';
+
+  meta = with stdenv.lib; {
+    branch = "4.06";
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/bupc/default.nix b/nixpkgs/pkgs/development/compilers/bupc/default.nix
new file mode 100644
index 000000000000..ecdfe8d461a2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/bupc/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchurl, perl, coreutils }:
+
+stdenv.mkDerivation rec {
+  name = "berkeley_upc-2.22.0";
+
+  src = fetchurl {
+    url = "http://upc.lbl.gov/download/release/${name}.tar.gz";
+    sha256 = "041l215x8z1cvjcx7kwjdgiaf9rl2d778k6kiv8q09bc68nwd44m";
+  };
+
+  postPatch = ''
+    patchShebangs .
+  '';
+
+  # Used during the configure phase
+  ENVCMD = "${coreutils}/bin/env";
+
+  nativeBuildInputs = [ coreutils ];
+  buildInputs = [ perl ];
+
+  meta = with stdenv.lib; {
+    description = "A compiler for the Berkely Unified Parallel C language";
+    longDescription = ''
+      Unified Parallel C (UPC) is an extension of the C programming language
+      designed for high performance computing on large-scale parallel
+      machines.The language provides a uniform programming model for both
+      shared and distributed memory hardware. The programmer is presented with
+      a single shared, partitioned address space, where variables may be
+      directly read and written by any processor, but each variable is
+      physically associated with a single processor. UPC uses a Single Program
+      Multiple Data (SPMD) model of computation in which the amount of
+      parallelism is fixed at program startup time, typically with a single
+      thread of execution per processor.
+    '';
+    homepage = "https://upc.lbl.gov/";
+    license = licenses.mit;
+    platforms = with platforms; [ linux ];
+    maintainers = with maintainers; [ zimbatm ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/carp/default.nix b/nixpkgs/pkgs/development/compilers/carp/default.nix
new file mode 100644
index 000000000000..f6c27436c767
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/carp/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, fetchFromGitHub, makeWrapper, clang, haskellPackages }:
+
+haskellPackages.mkDerivation rec {
+
+  pname = "carp";
+  version = "0.3.0";
+
+  src = fetchFromGitHub {
+    owner = "carp-lang";
+    repo = "Carp";
+    rev = "v${version}";
+    sha256 = "07yk3gy4l6h3k7sh8al7lgwk75a13zxwfp7siqpb5gnnqr1z3brc";
+  };
+
+  buildDepends = [ makeWrapper ];
+
+  executableHaskellDepends = with haskellPackages; [
+    HUnit blaze-markup blaze-html split cmdargs ansi-terminal cmark
+    edit-distance
+  ];
+
+  isExecutable = true;
+
+  # The carp executable must know where to find its core libraries and other
+  # files. Set the environment variable CARP_DIR so that it points to the root
+  # of the Carp repo. See:
+  # https://github.com/carp-lang/Carp/blob/master/docs/Install.md#setting-the-carp_dir
+  #
+  # Also, clang must be available run-time because carp is compiled to C which
+  # is then compiled with clang.
+  postInstall = ''
+    wrapProgram $out/bin/carp                                  \
+      --set CARP_DIR $src                                      \
+      --prefix PATH : ${clang}/bin
+    wrapProgram $out/bin/carp-header-parse                     \
+      --set CARP_DIR $src                                      \
+      --prefix PATH : ${clang}/bin
+  '';
+
+  description = "A statically typed lisp, without a GC, for real-time applications";
+  homepage    = "https://github.com/carp-lang/Carp";
+  license     = stdenv.lib.licenses.asl20;
+  maintainers = with stdenv.lib.maintainers; [ jluttine ];
+
+  # Windows not (yet) supported.
+  platforms   = with stdenv.lib.platforms; unix ++ darwin;
+
+}
diff --git a/nixpkgs/pkgs/development/compilers/ccl/default.nix b/nixpkgs/pkgs/development/compilers/ccl/default.nix
new file mode 100644
index 000000000000..573d36cd3f67
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ccl/default.nix
@@ -0,0 +1,93 @@
+{ stdenv, fetchurl, bootstrap_cmds, coreutils, glibc, m4, runtimeShell }:
+
+let
+  options = rec {
+    /* TODO: there are also FreeBSD and Windows versions */
+    x86_64-linux = {
+      arch = "linuxx86";
+      sha256 = "0hs1f3z7crgzvinpj990kv9gvbsipxvcvwbmk54n51nasvc5025q";
+      runtime = "lx86cl64";
+      kernel = "linuxx8664";
+    };
+    i686-linux = {
+      arch = "linuxx86";
+      sha256 = x86_64-linux.sha256;
+      runtime = "lx86cl";
+      kernel = "linuxx8632";
+    };
+    armv7l-linux = {
+      arch = "linuxarm";
+      sha256 = "0p0l1dzsygb6i1xxgbipjpxkn46xhq3jm41a34ga1qqp4x8lkr62";
+      runtime = "armcl";
+      kernel = "linuxarm";
+    };
+    x86_64-darwin = {
+      arch = "darwinx86";
+      sha256 = "5adbea3d8b4a2e29af30d141f781c6613844f468c0ccfa11bae908c3e9641939";
+      runtime = "dx86cl64";
+      kernel = "darwinx8664";
+    };
+    armv6l-linux = armv7l-linux;
+  };
+  cfg = options.${stdenv.hostPlatform.system} or (throw "missing source url for platform ${stdenv.hostPlatform.system}");
+in
+
+stdenv.mkDerivation rec {
+  pname = "ccl";
+  version  = "1.11.5";
+
+  src = fetchurl {
+    url = "https://github.com/Clozure/ccl/releases/download/v${version}/ccl-${version}-${cfg.arch}.tar.gz";
+    sha256 = cfg.sha256;
+  };
+
+  buildInputs = if stdenv.isDarwin then [ bootstrap_cmds m4 ] else [ glibc m4 ];
+
+  CCL_RUNTIME = cfg.runtime;
+  CCL_KERNEL = cfg.kernel;
+
+  postPatch = if stdenv.isDarwin then ''
+    substituteInPlace lisp-kernel/${CCL_KERNEL}/Makefile \
+      --replace "M4 = gm4"   "M4 = m4" \
+      --replace "dtrace"     "/usr/sbin/dtrace" \
+      --replace "/bin/rm"    "${coreutils}/bin/rm" \
+      --replace "/bin/echo"  "${coreutils}/bin/echo"
+
+    substituteInPlace lisp-kernel/m4macros.m4 \
+      --replace "/bin/pwd" "${coreutils}/bin/pwd"
+  '' else ''
+    substituteInPlace lisp-kernel/${CCL_KERNEL}/Makefile \
+      --replace "/bin/rm"    "${coreutils}/bin/rm" \
+      --replace "/bin/echo"  "${coreutils}/bin/echo"
+
+    substituteInPlace lisp-kernel/m4macros.m4 \
+      --replace "/bin/pwd" "${coreutils}/bin/pwd"
+  '';
+
+  buildPhase = ''
+    make -C lisp-kernel/${CCL_KERNEL} clean
+    make -C lisp-kernel/${CCL_KERNEL} all
+
+    ./${CCL_RUNTIME} -n -b -e '(ccl:rebuild-ccl :full t)' -e '(ccl:quit)'
+  '';
+
+  installPhase = ''
+    mkdir -p "$out/share"
+    cp -r .  "$out/share/ccl-installation"
+
+    mkdir -p "$out/bin"
+    echo -e '#!${runtimeShell}\n'"$out/share/ccl-installation/${CCL_RUNTIME}"' "$@"\n' > "$out"/bin/"${CCL_RUNTIME}"
+    chmod a+x "$out"/bin/"${CCL_RUNTIME}"
+    ln -s "$out"/bin/"${CCL_RUNTIME}" "$out"/bin/ccl
+  '';
+
+  hardeningDisable = [ "format" ];
+
+  meta = with stdenv.lib; {
+    description = "Clozure Common Lisp";
+    homepage    = "https://ccl.clozure.com/";
+    maintainers = with maintainers; [ raskin muflax tohl ];
+    platforms   = attrNames options;
+    license     = licenses.lgpl21;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/chez/default.nix b/nixpkgs/pkgs/development/compilers/chez/default.nix
new file mode 100644
index 000000000000..2d2e0df1ec9b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chez/default.nix
@@ -0,0 +1,76 @@
+{ stdenv, fetchFromGitHub
+, coreutils, cctools
+, ncurses, libiconv, libX11, libuuid
+}:
+
+stdenv.mkDerivation rec {
+  pname = "chez-scheme";
+  version = "9.5.2";
+
+  src = fetchFromGitHub {
+    owner  = "cisco";
+    repo   = "ChezScheme";
+    rev    = "refs/tags/v${version}";
+    sha256 = "1gsjmsvsj31q5l9bjvm869y7bakrvl41yq94vyqdx8zwcr1bmpjf";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ coreutils ] ++ stdenv.lib.optional stdenv.isDarwin cctools;
+  buildInputs = [ ncurses libiconv libX11 libuuid ];
+
+  enableParallelBuilding = true;
+
+  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isGNU "-Wno-error=format-truncation";
+
+  /*
+  ** We patch out a very annoying 'feature' in ./configure, which
+  ** tries to use 'git' to update submodules.
+  **
+  ** We have to also fix a few occurrences to tools with absolute
+  ** paths in some helper scripts, otherwise the build will fail on
+  ** NixOS or in any chroot build.
+  */
+  patchPhase = ''
+    substituteInPlace ./configure \
+      --replace "git submodule init && git submodule update || exit 1" "true"
+
+    substituteInPlace ./workarea \
+      --replace "/bin/ln" ln \
+      --replace "/bin/cp" cp
+
+    substituteInPlace ./makefiles/installsh \
+      --replace "/usr/bin/true" "${coreutils}/bin/true"
+
+    substituteInPlace zlib/configure \
+      --replace "/usr/bin/libtool" libtool
+  '';
+
+  /*
+  ** Don't use configureFlags, since that just implicitly appends
+  ** everything onto a --prefix flag, which ./configure gets very angry
+  ** about.
+  **
+  ** Also, carefully set a manual workarea argument, so that we
+  ** can later easily find the machine type that we built Chez
+  ** for.
+  */
+  configurePhase = ''
+    ./configure --threads --installprefix=$out --installman=$out/share/man
+  '';
+
+  /*
+  ** Clean up some of the examples from the build output.
+  */
+  postInstall = ''
+    rm -rf $out/lib/csv${version}/examples
+  '';
+
+  meta = {
+    description  = "A powerful and incredibly fast R6RS Scheme compiler";
+    homepage     = "https://cisco.github.io/ChezScheme/";
+    license      = stdenv.lib.licenses.asl20;
+    maintainers  = with stdenv.lib.maintainers; [ thoughtpolice ];
+    platforms    = stdenv.lib.platforms.unix;
+    badPlatforms = [ "aarch64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/chicken/4/0001-Introduce-CHICKEN_REPOSITORY_EXTRA.patch b/nixpkgs/pkgs/development/compilers/chicken/4/0001-Introduce-CHICKEN_REPOSITORY_EXTRA.patch
new file mode 100644
index 000000000000..ca72ba0119f0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/4/0001-Introduce-CHICKEN_REPOSITORY_EXTRA.patch
@@ -0,0 +1,157 @@
+From 2877f33747e3871c3a682b3a0c812b8ba2e4da5a Mon Sep 17 00:00:00 2001
+From: Caolan McMahon <caolan@caolanmcmahon.com>
+Date: Sat, 25 Jun 2016 11:52:28 +0100
+Subject: [PATCH] Introduce CHICKEN_REPOSITORY_EXTRA
+
+This environment variable works like CHICKEN_REPOSITORY but supports
+multiple paths separated by `:'. Those paths are searched after
+CHICKEN_REPOSITORY when loading extensions via `require-library' and
+friends. It can be accessed and changed at runtime via the new procedure
+`repository-extra-paths' which is analog to `repository-path'.
+
+Original patch by Moritz Heidkamp.
+Updated by Caolan McMahon for CHICKEN 4.11.0
+---
+ chicken-install.scm | 29 ++++++++++++++++++++++++-----
+ chicken.import.scm  |  1 +
+ eval.scm            | 37 +++++++++++++++++++++++++++++++------
+ 3 files changed, 56 insertions(+), 11 deletions(-)
+
+diff --git a/chicken-install.scm b/chicken-install.scm
+index 7bc6041..f557793 100644
+--- a/chicken-install.scm
++++ b/chicken-install.scm
+@@ -120,6 +120,19 @@
+ 		 (sprintf "lib/chicken/~a" (##sys#fudge 42)))
+ 		(repository-path)))))
+ 
++  (define (repo-paths)
++    (if *deploy*
++	*prefix*
++	(if (and *cross-chicken* (not *host-extension*))
++	    (list (make-pathname C_TARGET_LIB_HOME (sprintf "chicken/~a" C_BINARY_VERSION)))
++	    (cons
++	     (if *prefix*
++		 (make-pathname
++			*prefix*
++			(sprintf "lib/chicken/~a" (##sys#fudge 42)))
++		 (repository-path))
++	     (repository-extra-paths)))))
++
+   (define (get-prefix #!optional runtime)
+     (cond ((and *cross-chicken*
+ 		(not *host-extension*))
+@@ -226,10 +239,13 @@
+            (chicken-version) )
+ 	  ;; Duplication of (extension-information) to get custom
+ 	  ;; prefix.  This should be fixed.
+-          ((let* ((ep (##sys#canonicalize-extension-path x 'ext-version))
+-		  (sf (make-pathname (repo-path) ep "setup-info")))
+-	     (and (file-exists? sf)
+-		  (with-input-from-file sf read))) =>
++      ((let ((ep (##sys#canonicalize-extension-path x 'ext-version)))
++         (let loop ((paths (repo-paths)))
++           (cond ((null? paths) #f)
++                 ((let ((sf (make-pathname (car paths) ep "setup-info")))
++                    (and (file-exists? sf)
++                         (with-input-from-file sf read))))
++                 (else (loop (cdr paths)))))) =>
+            (lambda (info)
+              (let ((a (assq 'version info)))
+                (if a
+@@ -776,7 +792,10 @@
+ 		  "installed extension has no information about which egg it belongs to"
+ 		  (pathname-file sf))
+ 		 #f))))
+-      (glob (make-pathname (repo-path) "*" "setup-info")))
++      (append-map
++       (lambda (path)
++       (glob (make-pathname path "*" "setup-info")))
++       (repo-paths)))
+      equal?))
+ 
+   (define (list-available-extensions trans locn)
+diff --git a/chicken.import.scm b/chicken.import.scm
+index f6e3a19..be1637c 100644
+--- a/chicken.import.scm
++++ b/chicken.import.scm
+@@ -200,6 +200,7 @@
+    repl
+    repl-prompt
+    repository-path
++   repository-extra-paths
+    require
+    reset
+    reset-handler
+diff --git a/eval.scm b/eval.scm
+index 6242f62..f7d76d4 100644
+--- a/eval.scm
++++ b/eval.scm
+@@ -81,6 +81,7 @@
+ (define-constant source-file-extension ".scm")
+ (define-constant setup-file-extension "setup-info")
+ (define-constant repository-environment-variable "CHICKEN_REPOSITORY")
++(define-constant repository-extra-environment-variable "CHICKEN_REPOSITORY_EXTRA")
+ (define-constant prefix-environment-variable "CHICKEN_PREFIX")
+ 
+ ; these are actually in unit extras, but that is used by default
+@@ -1176,6 +1177,25 @@
+ 
+ (define ##sys#repository-path repository-path)
+ 
++(define ##sys#repository-extra-paths
++  (let* ((repaths (get-environment-variable repository-extra-environment-variable))
++	 (repaths (if repaths
++		      (let ((len (string-length repaths)))
++			(let loop ((i 0) (offset 0) (res '()))
++			  (cond ((> i len)
++				 (reverse res))
++				((or (= i len) (eq? #\: (string-ref repaths i)))
++				 (loop (+ i 1) (+ i 1) (cons (substring repaths offset i) res)))
++				(else
++				 (loop (+ i 1) offset res)))))
++		      '())))
++    (lambda (#!optional val)
++      (if val
++	  (set! repaths val)
++	  repaths))))
++
++(define repository-extra-paths ##sys#repository-extra-paths)
++
+ (define ##sys#setup-mode #f)
+ 
+ (define ##sys#find-extension
+@@ -1193,6 +1213,7 @@
+ 	(let loop ((paths (##sys#append
+ 			   (if ##sys#setup-mode '(".") '())
+ 			   (if rp (list rp) '())
++			   (##sys#repository-extra-paths)
+ 			   (if inc? ##sys#include-pathnames '())
+ 			   (if ##sys#setup-mode '() '("."))) ))
+ 	  (and (pair? paths)
+@@ -1252,12 +1273,16 @@
+ 	[string-append string-append]
+ 	[read read] )
+     (lambda (id loc)
+-      (and-let* ((rp (##sys#repository-path)))
+-	(let* ((p (##sys#canonicalize-extension-path id loc))
+-	       (rpath (string-append rp "/" p ".")) )
+-	  (cond ((file-exists? (string-append rpath setup-file-extension))
+-		 => (cut with-input-from-file <> read) )
+-		(else #f) ) ) ) ) ))
++      (let loop ((rpaths (cons (##sys#repository-path) (##sys#repository-extra-paths))))
++	(and (pair? rpaths)
++	     (let ((rp (car rpaths)))
++	       (if (not rp)
++		   (loop (cdr rpaths))
++		   (let* ((p (##sys#canonicalize-extension-path id loc))
++			  (rpath (string-append rp "/" p ".")) )
++		     (cond ((file-exists? (string-append rpath setup-file-extension))
++			    => (cut with-input-from-file <> read) )
++			   (else (loop (cdr rpaths))) ) )) ))) ) ))
+ 
+ (define (extension-information ext)
+   (##sys#extension-information ext 'extension-information) )
+-- 
+2.1.4
+
diff --git a/nixpkgs/pkgs/development/compilers/chicken/4/chicken.nix b/nixpkgs/pkgs/development/compilers/chicken/4/chicken.nix
new file mode 100644
index 000000000000..11f4eaada604
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/4/chicken.nix
@@ -0,0 +1,77 @@
+{ stdenv, fetchurl, makeWrapper, bootstrap-chicken ? null }:
+
+let
+  version = "4.13.0";
+  platform = with stdenv;
+    if isDarwin then "macosx"
+    else if isCygwin then "cygwin"
+    else if (isFreeBSD || isOpenBSD) then "bsd"
+    else if isSunOS then "solaris"
+    else "linux"; # Should be a sane default
+  lib = stdenv.lib;
+in
+stdenv.mkDerivation {
+  pname = "chicken";
+  inherit version;
+
+  binaryVersion = 8;
+
+  src = fetchurl {
+    url = "https://code.call-cc.org/releases/${version}/chicken-${version}.tar.gz";
+    sha256 = "0hvckhi5gfny3mlva6d7y9pmx7cbwvq0r7mk11k3sdiik9hlkmdd";
+  };
+
+  setupHook = lib.ifEnable (bootstrap-chicken != null) ./setup-hook.sh;
+
+  buildFlags = [ "PLATFORM=${platform}" "PREFIX=$(out)" "VARDIR=$(out)/var/lib" ];
+  installFlags = [ "PLATFORM=${platform}" "PREFIX=$(out)" "VARDIR=$(out)/var/lib" ];
+
+  # We need a bootstrap-chicken to regenerate the c-files after
+  # applying a patch to add support for CHICKEN_REPOSITORY_EXTRA
+  patches = lib.ifEnable (bootstrap-chicken != null) [
+    ./0001-Introduce-CHICKEN_REPOSITORY_EXTRA.patch
+  ];
+
+  buildInputs = [
+    makeWrapper
+  ] ++ (lib.ifEnable (bootstrap-chicken != null) [
+    bootstrap-chicken
+  ]);
+
+  preBuild = lib.ifEnable (bootstrap-chicken != null) ''
+    # Backup the build* files - those are generated from hostname,
+    # git-tag, etc. and we don't need/want that
+    mkdir -p build-backup
+    mv buildid buildbranch buildtag.h build-backup
+
+    # Regenerate eval.c after the patch
+    make spotless $buildFlags
+
+    mv build-backup/* .
+  '';
+
+  postInstall = ''
+    for f in $out/bin/*
+    do
+      wrapProgram $f \
+        --prefix PATH : ${stdenv.cc}/bin
+    done
+  '';
+
+  # TODO: Assert csi -R files -p '(pathname-file (repository-path))' == binaryVersion
+
+  meta = {
+    homepage = "http://www.call-cc.org/";
+    license = stdenv.lib.licenses.bsd3;
+    maintainers = with stdenv.lib.maintainers; [ corngood ];
+    platforms = stdenv.lib.platforms.linux; # Maybe other non-darwin Unix
+    description = "A portable compiler for the Scheme programming language";
+    longDescription = ''
+      CHICKEN is a compiler for the Scheme programming language.
+      CHICKEN produces portable and efficient C, supports almost all
+      of the R5RS Scheme language standard, and includes many
+      enhancements and extensions. CHICKEN runs on Linux, macOS,
+      Windows, and many Unix flavours.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/chicken/4/default.nix b/nixpkgs/pkgs/development/compilers/chicken/4/default.nix
new file mode 100644
index 000000000000..8d29c7c9a2b5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/4/default.nix
@@ -0,0 +1,21 @@
+{ newScope } :
+let
+  callPackage = newScope self;
+
+  self = {
+    pkgs = self;
+
+    fetchegg = callPackage ./fetchegg { };
+
+    eggDerivation = callPackage ./eggDerivation.nix { };
+
+    chicken = callPackage ./chicken.nix {
+      bootstrap-chicken = self.chicken.override { bootstrap-chicken = null; };
+    };
+
+    chickenEggs = callPackage ./eggs.nix { };
+
+    egg2nix = callPackage ./egg2nix.nix { };
+  };
+
+in self
diff --git a/nixpkgs/pkgs/development/compilers/chicken/4/egg2nix.nix b/nixpkgs/pkgs/development/compilers/chicken/4/egg2nix.nix
new file mode 100644
index 000000000000..977f34692f90
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/4/egg2nix.nix
@@ -0,0 +1,27 @@
+{ stdenv, eggDerivation, fetchurl, chickenEggs }:
+
+# Note: This mostly reimplements the default.nix already contained in
+# the tarball. Is there a nicer way than duplicating code?
+
+let
+  version = "0.5";
+in
+eggDerivation {
+  src = fetchurl {
+    url = "https://github.com/the-kenny/egg2nix/archive/${version}.tar.gz";
+    sha256 = "0adal428v4i7h9lzs7sfq75q2mxhsbf1qqwzrsjv8j41paars20y";
+  };
+
+  name = "egg2nix-${version}";
+  buildInputs = with chickenEggs; [
+    matchable http-client
+  ];
+
+  meta = {
+    description = "Generate nix-expression from CHICKEN scheme eggs";
+    homepage = "https://github.com/the-kenny/egg2nix";
+    license = stdenv.lib.licenses.bsd3;
+    platforms = stdenv.lib.platforms.unix;
+    maintainers = with stdenv.lib.maintainers; [ corngood ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/chicken/4/eggDerivation.nix b/nixpkgs/pkgs/development/compilers/chicken/4/eggDerivation.nix
new file mode 100644
index 000000000000..cd340c221743
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/4/eggDerivation.nix
@@ -0,0 +1,44 @@
+{ stdenv, chicken, makeWrapper }:
+{ name, src
+, buildInputs ? []
+, chickenInstallFlags ? []
+, cscOptions          ? []
+, ...} @ args:
+
+let
+  libPath = "${chicken}/var/lib/chicken/${toString chicken.binaryVersion}/";
+  overrides = import ./overrides.nix;
+  baseName = stdenv.lib.getName name;
+  override = if builtins.hasAttr baseName overrides
+   then
+     builtins.getAttr baseName overrides
+   else
+     {};
+in
+stdenv.mkDerivation ({
+  name = "chicken-${name}";
+  propagatedBuildInputs = buildInputs;
+  buildInputs = [ makeWrapper chicken ];
+
+  CSC_OPTIONS = stdenv.lib.concatStringsSep " " cscOptions;
+
+  CHICKEN_REPOSITORY = libPath;
+  CHICKEN_INSTALL_PREFIX = "$out";
+
+  installPhase = ''
+    runHook preInstall
+
+    chicken-install -p $out ${stdenv.lib.concatStringsSep " " chickenInstallFlags}
+
+    for f in $out/bin/*
+    do
+      wrapProgram $f \
+        --set CHICKEN_REPOSITORY $CHICKEN_REPOSITORY \
+        --prefix CHICKEN_REPOSITORY_EXTRA : "$out/lib/chicken/${toString chicken.binaryVersion}/:$CHICKEN_REPOSITORY_EXTRA" \
+        --prefix CHICKEN_INCLUDE_PATH \; "$CHICKEN_INCLUDE_PATH;$out/share/" \
+        --prefix PATH : "$out/bin:${chicken}/bin:$CHICKEN_REPOSITORY_EXTRA:$CHICKEN_REPOSITORY"
+    done
+
+    runHook postInstall
+  '';
+} // (builtins.removeAttrs args ["name" "buildInputs"]) // override)
diff --git a/nixpkgs/pkgs/development/compilers/chicken/4/eggs.nix b/nixpkgs/pkgs/development/compilers/chicken/4/eggs.nix
new file mode 100644
index 000000000000..6e6f104f8a0c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/4/eggs.nix
@@ -0,0 +1,138 @@
+{ pkgs, stdenv }:
+rec {
+  inherit (pkgs) eggDerivation fetchegg;
+
+  base64 = eggDerivation {
+    name = "base64-3.3.1";
+
+    src = fetchegg {
+      name = "base64";
+      version = "3.3.1";
+      sha256 = "0wmldiwwg1jpcn07wb906nc53si5j7sa83wgyq643xzqcx4v4x1d";
+    };
+
+    buildInputs = [
+      
+    ];
+  };
+
+  defstruct = eggDerivation {
+    name = "defstruct-1.6";
+
+    src = fetchegg {
+      name = "defstruct";
+      version = "1.6";
+      sha256 = "0lsgl32nmb5hxqiii4r3292cx5vqh50kp6v062nfiyid9lhrj0li";
+    };
+
+    buildInputs = [
+      
+    ];
+  };
+
+  http-client = eggDerivation {
+    name = "http-client-0.18";
+
+    src = fetchegg {
+      name = "http-client";
+      version = "0.18";
+      sha256 = "1b9x66kfcglld4xhm06vba00gw37vr07c859kj7lmwnk9nwhcplg";
+    };
+
+    buildInputs = [
+      intarweb
+      uri-common
+      simple-md5
+      sendfile
+    ];
+  };
+
+  intarweb = eggDerivation {
+    name = "intarweb-1.7";
+
+    src = fetchegg {
+      name = "intarweb";
+      version = "1.7";
+      sha256 = "1arjgn5g4jfdzj3nlrhxk235qwf6k6jxr14yhnncnfbgdb820xp8";
+    };
+
+    buildInputs = [
+      defstruct
+      uri-common
+      base64
+    ];
+  };
+
+  matchable = eggDerivation {
+    name = "matchable-3.7";
+
+    src = fetchegg {
+      name = "matchable";
+      version = "3.7";
+      sha256 = "1vc9rpb44fhn0n91hzglin986dw9zj87fikvfrd7j308z22a41yh";
+    };
+
+    buildInputs = [
+      
+    ];
+  };
+
+  sendfile = eggDerivation {
+    name = "sendfile-1.8.3";
+
+    src = fetchegg {
+      name = "sendfile";
+      version = "1.8.3";
+      sha256 = "036x4xdndx7qly94afnag5b9idd1yymdm8d832w2cy054y7lxqsi";
+    };
+
+    buildInputs = [
+      
+    ];
+  };
+
+  simple-md5 = eggDerivation {
+    name = "simple-md5-0.0.1";
+
+    src = fetchegg {
+      name = "simple-md5";
+      version = "0.0.1";
+      sha256 = "1h0b51p9wl1dl3pzs39hdq3hk2qnjgn8n750bgmh0651g4lzmq3i";
+    };
+
+    buildInputs = [
+      
+    ];
+  };
+
+  uri-common = eggDerivation {
+    name = "uri-common-1.4";
+
+    src = fetchegg {
+      name = "uri-common";
+      version = "1.4";
+      sha256 = "01ds1gixcn4rz657x3hr4rhw2496hsjff42ninw0k39l8i1cbh7c";
+    };
+
+    buildInputs = [
+      uri-generic
+      defstruct
+      matchable
+    ];
+  };
+
+  uri-generic = eggDerivation {
+    name = "uri-generic-2.46";
+
+    src = fetchegg {
+      name = "uri-generic";
+      version = "2.46";
+      sha256 = "10ivf4xlmr6jcm00l2phq1y73hjv6g3qgr38ycc8rw56wv6sbm4g";
+    };
+
+    buildInputs = [
+      matchable
+    ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/compilers/chicken/4/eggs.scm b/nixpkgs/pkgs/development/compilers/chicken/4/eggs.scm
new file mode 100644
index 000000000000..d847ae9e29b9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/4/eggs.scm
@@ -0,0 +1,5 @@
+;; Eggs used by egg2nix
+http-client
+intarweb
+matchable
+uri-common
diff --git a/nixpkgs/pkgs/development/compilers/chicken/4/fetchegg/builder.sh b/nixpkgs/pkgs/development/compilers/chicken/4/fetchegg/builder.sh
new file mode 100644
index 000000000000..204661063090
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/4/fetchegg/builder.sh
@@ -0,0 +1,9 @@
+source $stdenv/setup
+
+header "exporting egg ${eggName} (version $version) into $out"
+
+mkdir -p $out
+chicken-install -r "${eggName}:${version}"
+cp -r ${eggName}/* $out/
+
+stopNest
diff --git a/nixpkgs/pkgs/development/compilers/chicken/4/fetchegg/default.nix b/nixpkgs/pkgs/development/compilers/chicken/4/fetchegg/default.nix
new file mode 100644
index 000000000000..d4d33a5593c3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/4/fetchegg/default.nix
@@ -0,0 +1,25 @@
+# Fetches a chicken egg from henrietta using `chicken-install -r'
+# See: http://wiki.call-cc.org/chicken-projects/egg-index-4.html
+
+{ stdenvNoCC, chicken }:
+{ name, version, md5 ? "", sha256 ? "" }:
+
+if md5 != "" then
+  throw "fetchegg does not support md5 anymore, please use sha256"
+else
+stdenvNoCC.mkDerivation {
+  name = "chicken-${name}-export-${version}";
+  builder = ./builder.sh;
+  nativeBuildInputs = [ chicken ];
+
+  outputHashAlgo = "sha256";
+  outputHashMode = "recursive";
+  outputHash = sha256;
+
+  inherit version;
+
+  eggName = name;
+
+  impureEnvVars = stdenvNoCC.lib.fetchers.proxyImpureEnvVars;
+}
+
diff --git a/nixpkgs/pkgs/development/compilers/chicken/4/overrides.nix b/nixpkgs/pkgs/development/compilers/chicken/4/overrides.nix
new file mode 100644
index 000000000000..9fdda9b6d9fe
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/4/overrides.nix
@@ -0,0 +1,10 @@
+{
+  setup-helper = {
+    preBuild = ''
+      substituteInPlace setup-helper.setup \
+        --replace "(chicken-home)" \"$out/share/\"
+
+        cat setup-helper.setup
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/chicken/4/setup-hook.sh b/nixpkgs/pkgs/development/compilers/chicken/4/setup-hook.sh
new file mode 100644
index 000000000000..661dc08c090c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/4/setup-hook.sh
@@ -0,0 +1,6 @@
+addChickenRepositoryPath() {
+    addToSearchPathWithCustomDelimiter : CHICKEN_REPOSITORY_EXTRA "$1/lib/chicken/8/"
+    export CHICKEN_INCLUDE_PATH="$1/share${CHICKEN_INCLUDE_PATH:+;$CHICKEN_INCLUDE_PATH}"
+}
+
+addEnvHooks "$targetOffset" addChickenRepositoryPath
diff --git a/nixpkgs/pkgs/development/compilers/chicken/5/chicken.nix b/nixpkgs/pkgs/development/compilers/chicken/5/chicken.nix
new file mode 100644
index 000000000000..f07b63ea26f4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/5/chicken.nix
@@ -0,0 +1,59 @@
+{ stdenv, fetchurl, makeWrapper, bootstrap-chicken ? null }:
+
+let
+  version = "5.2.0";
+  platform = with stdenv;
+    if isDarwin then "macosx"
+    else if isCygwin then "cygwin"
+    else if (isFreeBSD || isOpenBSD) then "bsd"
+    else if isSunOS then "solaris"
+    else "linux"; # Should be a sane default
+  lib = stdenv.lib;
+in
+stdenv.mkDerivation {
+  pname = "chicken";
+  inherit version;
+
+  binaryVersion = 11;
+
+  src = fetchurl {
+    url = "https://code.call-cc.org/releases/${version}/chicken-${version}.tar.gz";
+    sha256 = "1yl0hxm9cirgcp8jgxp6vv29lpswfvaw3zfkh6rsj0vkrv44k4c1";
+  };
+
+  setupHook = lib.ifEnable (bootstrap-chicken != null) ./setup-hook.sh;
+
+  buildFlags = [ "PLATFORM=${platform}" "PREFIX=$(out)" ];
+  installFlags = [ "PLATFORM=${platform}" "PREFIX=$(out)" ];
+
+  buildInputs = [
+    makeWrapper
+  ] ++ (lib.ifEnable (bootstrap-chicken != null) [
+    bootstrap-chicken
+  ]);
+
+  postInstall = ''
+    for f in $out/bin/*
+    do
+      wrapProgram $f \
+        --prefix PATH : ${stdenv.cc}/bin
+    done
+  '';
+
+  # TODO: Assert csi -R files -p '(pathname-file (repository-path))' == binaryVersion
+
+  meta = {
+    homepage = "http://www.call-cc.org/";
+    license = stdenv.lib.licenses.bsd3;
+    maintainers = with stdenv.lib.maintainers; [ corngood ];
+    platforms = stdenv.lib.platforms.linux; # Maybe other non-darwin Unix
+    description = "A portable compiler for the Scheme programming language";
+    longDescription = ''
+      CHICKEN is a compiler for the Scheme programming language.
+      CHICKEN produces portable and efficient C, supports almost all
+      of the R5RS Scheme language standard, and includes many
+      enhancements and extensions. CHICKEN runs on Linux, macOS,
+      Windows, and many Unix flavours.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/chicken/5/default.nix b/nixpkgs/pkgs/development/compilers/chicken/5/default.nix
new file mode 100644
index 000000000000..8d29c7c9a2b5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/5/default.nix
@@ -0,0 +1,21 @@
+{ newScope } :
+let
+  callPackage = newScope self;
+
+  self = {
+    pkgs = self;
+
+    fetchegg = callPackage ./fetchegg { };
+
+    eggDerivation = callPackage ./eggDerivation.nix { };
+
+    chicken = callPackage ./chicken.nix {
+      bootstrap-chicken = self.chicken.override { bootstrap-chicken = null; };
+    };
+
+    chickenEggs = callPackage ./eggs.nix { };
+
+    egg2nix = callPackage ./egg2nix.nix { };
+  };
+
+in self
diff --git a/nixpkgs/pkgs/development/compilers/chicken/5/egg2nix.nix b/nixpkgs/pkgs/development/compilers/chicken/5/egg2nix.nix
new file mode 100644
index 000000000000..0c18b8db2ded
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/5/egg2nix.nix
@@ -0,0 +1,29 @@
+{ stdenv, eggDerivation, fetchFromGitHub, chickenEggs }:
+
+# Note: This mostly reimplements the default.nix already contained in
+# the tarball. Is there a nicer way than duplicating code?
+
+let
+  version = "c5-git";
+in
+eggDerivation {
+  src = fetchFromGitHub {
+    owner = "corngood";
+    repo = "egg2nix";
+    rev = "chicken-5";
+    sha256 = "1vfnhbcnyakywgjafhs0k5kpsdnrinzvdjxpz3fkwas1jsvxq3d1";
+  };
+
+  name = "egg2nix-${version}";
+  buildInputs = with chickenEggs; [
+    args matchable
+  ];
+
+  meta = {
+    description = "Generate nix-expression from CHICKEN scheme eggs";
+    homepage = "https://github.com/the-kenny/egg2nix";
+    license = stdenv.lib.licenses.bsd3;
+    platforms = stdenv.lib.platforms.unix;
+    maintainers = with stdenv.lib.maintainers; [ corngood ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/chicken/5/eggDerivation.nix b/nixpkgs/pkgs/development/compilers/chicken/5/eggDerivation.nix
new file mode 100644
index 000000000000..f5ed4b4b7f8b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/5/eggDerivation.nix
@@ -0,0 +1,41 @@
+{ stdenv, chicken, makeWrapper }:
+{ name, src
+, buildInputs ? []
+, chickenInstallFlags ? []
+, cscOptions          ? []
+, ...} @ args:
+
+let
+  overrides = import ./overrides.nix;
+  baseName = stdenv.lib.getName name;
+  override = if builtins.hasAttr baseName overrides
+   then
+     builtins.getAttr baseName overrides
+   else
+     {};
+in
+stdenv.mkDerivation ({
+  name = "chicken-${name}";
+  propagatedBuildInputs = buildInputs;
+  buildInputs = [ makeWrapper chicken ];
+
+  CSC_OPTIONS = stdenv.lib.concatStringsSep " " cscOptions;
+
+  installPhase = ''
+    runHook preInstall
+
+    export CHICKEN_INSTALL_PREFIX=$out
+    export CHICKEN_INSTALL_REPOSITORY=$out/lib/chicken/${toString chicken.binaryVersion}
+    chicken-install ${stdenv.lib.concatStringsSep " " chickenInstallFlags}
+
+    for f in $out/bin/*
+    do
+      wrapProgram $f \
+        --prefix CHICKEN_REPOSITORY_PATH : "$out/lib/chicken/${toString chicken.binaryVersion}:$CHICKEN_REPOSITORY_PATH" \
+        --prefix CHICKEN_INCLUDE_PATH : "$CHICKEN_INCLUDE_PATH:$out/share" \
+        --prefix PATH : "$out/bin:${chicken}/bin:$CHICKEN_REPOSITORY_PATH"
+    done
+
+    runHook postInstall
+  '';
+} // (builtins.removeAttrs args ["name" "buildInputs"]) // override)
diff --git a/nixpkgs/pkgs/development/compilers/chicken/5/eggs.nix b/nixpkgs/pkgs/development/compilers/chicken/5/eggs.nix
new file mode 100644
index 000000000000..3c4ae74c1e66
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/5/eggs.nix
@@ -0,0 +1,91 @@
+{ pkgs, stdenv }:
+rec {
+  inherit (pkgs) eggDerivation fetchegg;
+
+  args = eggDerivation {
+    name = "args-1.6.0";
+
+    src = fetchegg {
+      name = "args";
+      version = "1.6.0";
+      sha256 = "1y9sznh4kxqxvhd8k44bjx0s7xspp52sx4bn8i8i0f8lwch6r2g4";
+    };
+
+    buildInputs = [
+      srfi-1
+      srfi-13
+      srfi-37
+    ];
+  };
+
+  matchable = eggDerivation {
+    name = "matchable-1.1";
+
+    src = fetchegg {
+      name = "matchable";
+      version = "1.1";
+      sha256 = "084hm5dvbvgnpb32ispkp3hjili8z02hamln860r99jx68jx6j2v";
+    };
+
+    buildInputs = [
+      
+    ];
+  };
+
+  srfi-1 = eggDerivation {
+    name = "srfi-1-0.5.1";
+
+    src = fetchegg {
+      name = "srfi-1";
+      version = "0.5.1";
+      sha256 = "15x0ajdkw5gb3vgs8flzh5g0pzl3wmcpf11iimlm67mw6fxc8p7j";
+    };
+
+    buildInputs = [
+      
+    ];
+  };
+
+  srfi-13 = eggDerivation {
+    name = "srfi-13-0.3";
+
+    src = fetchegg {
+      name = "srfi-13";
+      version = "0.3";
+      sha256 = "0yaw9i6zhpxl1794pirh168clprjgmsb0xlr96drirjzsslgm3zp";
+    };
+
+    buildInputs = [
+      srfi-14
+    ];
+  };
+
+  srfi-14 = eggDerivation {
+    name = "srfi-14-0.2.1";
+
+    src = fetchegg {
+      name = "srfi-14";
+      version = "0.2.1";
+      sha256 = "0gc33cx4xll9vsf7fm8jvn3gc0604kn3bbi6jfn6xscqp86kqb9p";
+    };
+
+    buildInputs = [
+      
+    ];
+  };
+
+  srfi-37 = eggDerivation {
+    name = "srfi-37-1.4";
+
+    src = fetchegg {
+      name = "srfi-37";
+      version = "1.4";
+      sha256 = "17f593497n70gldkj6iab6ilgryiqar051v6azn1szhnm1lk7dwd";
+    };
+
+    buildInputs = [
+      
+    ];
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/compilers/chicken/5/eggs.scm b/nixpkgs/pkgs/development/compilers/chicken/5/eggs.scm
new file mode 100644
index 000000000000..b743d6e3229d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/5/eggs.scm
@@ -0,0 +1,3 @@
+;; Eggs used by egg2nix
+args
+matchable
diff --git a/nixpkgs/pkgs/development/compilers/chicken/5/fetchegg/builder.sh b/nixpkgs/pkgs/development/compilers/chicken/5/fetchegg/builder.sh
new file mode 100644
index 000000000000..d9adf510f22d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/5/fetchegg/builder.sh
@@ -0,0 +1,10 @@
+source $stdenv/setup
+
+header "exporting egg ${eggName} (version $version) into $out"
+
+mkdir -p $out
+CHICKEN_EGG_CACHE=. chicken-install -r "${eggName}:${version}"
+rm ${eggName}/{STATUS,TIMESTAMP}
+cp -r ${eggName}/* $out/
+
+stopNest
diff --git a/nixpkgs/pkgs/development/compilers/chicken/5/fetchegg/default.nix b/nixpkgs/pkgs/development/compilers/chicken/5/fetchegg/default.nix
new file mode 100644
index 000000000000..24bfbd7a30f4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/5/fetchegg/default.nix
@@ -0,0 +1,25 @@
+# Fetches a chicken egg from henrietta using `chicken-install -r'
+# See: http://wiki.call-cc.org/chicken-projects/egg-index-5.html
+
+{ stdenvNoCC, chicken }:
+{ name, version, md5 ? "", sha256 ? "" }:
+
+if md5 != "" then
+  throw "fetchegg does not support md5 anymore, please use sha256"
+else
+stdenvNoCC.mkDerivation {
+  name = "chicken-${name}-export";
+  builder = ./builder.sh;
+  nativeBuildInputs = [ chicken ];
+
+  outputHashAlgo = "sha256";
+  outputHashMode = "recursive";
+  outputHash = sha256;
+
+  inherit version;
+
+  eggName = name;
+
+  impureEnvVars = stdenvNoCC.lib.fetchers.proxyImpureEnvVars;
+}
+
diff --git a/nixpkgs/pkgs/development/compilers/chicken/5/overrides.nix b/nixpkgs/pkgs/development/compilers/chicken/5/overrides.nix
new file mode 100644
index 000000000000..2c63c0851048
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/5/overrides.nix
@@ -0,0 +1,2 @@
+{
+}
diff --git a/nixpkgs/pkgs/development/compilers/chicken/5/setup-hook.sh b/nixpkgs/pkgs/development/compilers/chicken/5/setup-hook.sh
new file mode 100644
index 000000000000..55324c05508e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/chicken/5/setup-hook.sh
@@ -0,0 +1,6 @@
+addChickenRepositoryPath() {
+    addToSearchPathWithCustomDelimiter : CHICKEN_REPOSITORY_PATH "$1/lib/chicken/11"
+    addToSearchPathWithCustomDelimiter : CHICKEN_INCLUDE_PATH "$1/share"
+}
+
+addEnvHooks "$targetOffset" addChickenRepositoryPath
diff --git a/nixpkgs/pkgs/development/compilers/ciao/default.nix b/nixpkgs/pkgs/development/compilers/ciao/default.nix
new file mode 100644
index 000000000000..be39d81f5581
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ciao/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "ciao";
+  version = "1.19.0";
+  src = fetchFromGitHub {
+    owner = "ciao-lang";
+    repo = "ciao";
+    rev = "v${version}";
+    sha256 = "03qzcb4ivgkiwdpw7a94dn74xqyxjwz5ilrr53rcblsh5ng299jp";
+  };
+
+  configurePhase = ''
+    ./ciao-boot.sh configure --instype=global --prefix=$prefix
+  '';
+
+  buildPhase = ''
+    ./ciao-boot.sh build
+  '';
+
+  installPhase = ''
+    ./ciao-boot.sh install
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://ciao-lang.org/";
+    description = "A general purpose, multi-paradigm programming language in the Prolog family";
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ suhr ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/clasp/default.nix b/nixpkgs/pkgs/development/compilers/clasp/default.nix
new file mode 100644
index 000000000000..664d84921135
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/clasp/default.nix
@@ -0,0 +1,130 @@
+{ stdenv, fetchFromGitHub, fetchFromGitLab
+, llvmPackages
+, cmake, boehmgc, gmp, zlib, ncurses, boost, libelf
+, python, git, sbcl
+, wafHook
+}:
+let
+  sicl = fetchFromGitHub {
+    owner = "Bike";
+    repo = "SICL";
+    rev = "78052fb5f02a3814eb7295f3dcac09f21f98702b";
+    sha256 = "0wnmp40310ls6q9gkr5ysfkj2qirq26ljjicnkqifc53mm0ghz4i";
+  };
+  cst = fetchFromGitHub {
+    owner = "robert-strandh";
+    repo = "Concrete-Syntax-Tree";
+    rev = "8d8c5abf8f1690cb2b765241d81c2eb86d60d77e";
+    sha256 = "1rs8a5nbfffdyli126sccd0z1a8h5axp222b4pgwvgfxsb9w7g3s";
+  };
+  c2mop = fetchFromGitHub {
+    owner = "pcostanza";
+    repo = "closer-mop";
+    rev = "d4d1c7aa6aba9b4ac8b7bb78ff4902a52126633f";
+    sha256 = "1amcv0f3vbsq0aqhai7ki5bi367giway1pbfxyc47r7q3hq5hw3c";
+  };
+  acclimation = fetchFromGitHub {
+    owner = "robert-strandh";
+    repo = "Acclimation";
+    rev = "dd15c86b0866fc5d8b474be0da15c58a3c04c45c";
+    sha256 = "0ql224qs3zgflvdhfbca621v3byhhqfb71kzy70bslyczxv1bsh2";
+  };
+  eclector = fetchFromGitHub {
+    owner = "robert-strandh";
+    repo = "Eclector";
+    rev = "287ce817c0478668bd389051d2cc6b26ddc62ec9";
+    sha256 = "0v7mgkq49ddyx5vvsradcp772y5l7cv9xrll3280hyginpm8w6q3";
+  };
+  alexandria = fetchFromGitHub {
+    owner = "clasp-developers";
+    repo = "alexandria";
+    rev = "e5c54bc30b0887c237bde2827036d17315f88737";
+    sha256 = "14h7a9fwimiw9gqxjm2h47d95bfhrm7b81f6si7x8vy18d78fn4g";
+  };
+  mps = fetchFromGitHub {
+    owner = "Ravenbrook";
+    repo = "mps";
+    rev = "b8a05a3846430bc36c8200f24d248c8293801503";
+    sha256 = "1q2xqdw832jrp0w9yhgr8xihria01j4z132ac16lr9ssqznkprv6";
+  };
+  asdf = fetchFromGitLab {
+    domain = "gitlab.common-lisp.net";
+    owner = "asdf";
+    repo = "asdf";
+    rev = "3.3.1.2";
+    sha256 = "0ljr2vc0cb2wrijcyjmp9hcaj2bdhh05ci3zf4f43hdq6i2fgg6g";
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "clasp";
+  version = "0.8.99.20181128";
+
+  src = fetchFromGitHub {
+    owner = "drmeister";
+    repo = "clasp";
+    rev = "2f2b52ccb750048460562b5987a7eaf7a1aa4445";
+    sha256 = "0ra55vdnk59lygwzlxr5cg16vb9c45fmg59wahaxclwm461w7fwz";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ cmake python git sbcl wafHook ] ++
+    (with llvmPackages; [ llvm clang ]);
+
+  buildInputs = with llvmPackages;
+  (
+   builtins.map (x: stdenv.lib.overrideDerivation x
+           (x: {NIX_CFLAGS_COMPILE= (x.NIX_CFLAGS_COMPILE or "") + " -frtti"; }))
+   [ llvm clang clang-unwrapped clang ]) ++
+  [
+    gmp zlib ncurses
+    boost boehmgc libelf
+    (boost.override {enableStatic = true; enableShared = false;})
+    (stdenv.lib.overrideDerivation boehmgc
+      (x: {configureFlags = (x.configureFlags or []) ++ ["--enable-static"];}))
+  ];
+
+  NIX_CXXSTDLIB_COMPILE = " -frtti ";
+
+  postPatch = ''
+    echo "
+      PREFIX = '$out'
+    " | sed -e 's/^ *//' > wscript.config
+
+    mkdir -p src/lisp/kernel/contrib/sicl
+    mkdir -p src/lisp/kernel/contrib/Concrete-Syntax-Tree
+    mkdir -p src/lisp/kernel/contrib/closer-mop
+    mkdir -p src/lisp/kernel/contrib/Acclimation
+    mkdir -p src/lisp/kernel/contrib/Eclector
+    mkdir -p src/lisp/kernel/contrib/alexandria
+    mkdir -p src/mps
+    mkdir -p src/lisp/modules/asdf
+
+    cp -rfT "${sicl}" src/lisp/kernel/contrib/sicl
+    cp -rfT "${cst}" src/lisp/kernel/contrib/Concrete-Syntax-Tree
+    cp -rfT "${c2mop}" src/lisp/kernel/contrib/closer-mop
+    cp -rfT "${acclimation}" src/lisp/kernel/contrib/Acclimation
+    cp -rfT "${eclector}" src/lisp/kernel/contrib/Eclector
+    cp -rfT "${alexandria}" src/lisp/kernel/contrib/alexandria
+    cp -rfT "${mps}" src/mps
+    cp -rfT "${asdf}" src/lisp/modules/asdf
+
+    chmod -R u+rwX src
+    ( cd src/lisp/modules/asdf; make )
+  '';
+
+  buildTargets = "build_cboehm";
+  installTargets = "install_cboehm";
+
+  CLASP_SRC_DONTTOUCH = "true";
+
+  meta = {
+    inherit version;
+    description = ''A Common Lisp implementation based on LLVM with C++ integration'';
+    license = stdenv.lib.licenses.lgpl21Plus ;
+    maintainers = [stdenv.lib.maintainers.raskin];
+    platforms = stdenv.lib.platforms.linux;
+    # Large, long to build, a private build of clang is needed, a prerelease.
+    hydraPlatforms = [];
+    homepage = "https://github.com/drmeister/clasp";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/clean/chroot-build-support-do-not-rebuild-equal-timestamps.patch b/nixpkgs/pkgs/development/compilers/clean/chroot-build-support-do-not-rebuild-equal-timestamps.patch
new file mode 100644
index 000000000000..3e0fbe6b996d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/clean/chroot-build-support-do-not-rebuild-equal-timestamps.patch
@@ -0,0 +1,17 @@
+The clean command line compiler clm checks modules for freshness by comparing timestamps.
+However, in chroot builds all files installed have the same timestamp.  This leads to clm
+trying to rebuild the library modules distributed with the Clean install every time a user
+compiles any file.  This patch changes the freshness check to use less than instead of less
+than or equal to in order to avoid this.
+
+--- clean-upstream/src/tools/clm/clm.c	2010-12-10 06:12:17.000000000 -0430
++++ clean/src/tools/clm/clm.c	2010-12-25 10:29:09.840675925 -0430
+@@ -250,7 +250,7 @@
+ 		|| (t1.dwHighDateTime==t2.dwHighDateTime && (unsigned)(t1.dwLowDateTime)<=(unsigned)(t2.dwLowDateTime)))
+ #else
+ 	typedef unsigned long FileTime;
+-#	define FILE_TIME_LE(t1,t2) (t1<=t2)
++#	define FILE_TIME_LE(t1,t2) (t1<t2)
+ #endif
+ 
+ typedef struct project_node {
diff --git a/nixpkgs/pkgs/development/compilers/clean/default.nix b/nixpkgs/pkgs/development/compilers/clean/default.nix
new file mode 100644
index 000000000000..0dfd05030b98
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/clean/default.nix
@@ -0,0 +1,52 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation {
+  name = "clean-3.0";
+
+  src =
+    if stdenv.hostPlatform.system == "i686-linux" then (fetchurl {
+      url = "https://ftp.cs.ru.nl/Clean/Clean30/linux/clean3.0_32_boot.tar.gz";
+      sha256 = "0cjxv3vqrg6pz3aicwfdz1zyhk0q650464j3qyl0wzaikh750010";
+    })
+    else if stdenv.hostPlatform.system == "x86_64-linux" then (fetchurl {
+        url = "https://ftp.cs.ru.nl/Clean/Clean30/linux/clean3.0_64_boot.tar.gz";
+        sha256 = "06k283y9adbi28f78k3m5ssg6py73qqkz3sm8dgxc89drv4krl2i";
+    })
+    else throw "Architecture not supported";
+
+  hardeningDisable = [ "format" "pic" ];
+
+  # clm uses timestamps of dcl, icl, abc and o files to decide what must be rebuild
+  # and for chroot builds all of the library files will have equal timestamps.  This
+  # makes clm try to rebuild the library modules (and fail due to absence of write permission
+  # on the Nix store) every time any file is compiled.
+  patches = [ ./chroot-build-support-do-not-rebuild-equal-timestamps.patch ];
+
+  preBuild = ''
+    substituteInPlace Makefile --replace 'INSTALL_DIR = $(CURRENTDIR)' 'INSTALL_DIR = '$out
+
+    substituteInPlace src/tools/clm/clm.c --replace '/usr/bin/gcc' $(type -p gcc)
+    substituteInPlace src/tools/clm/clm.c --replace '/usr/bin/as' $(type -p as)
+
+    cd src
+  '';
+
+  postBuild = ''
+    cd ..
+  '';
+
+  meta = {
+    description = "General purpose, state-of-the-art, pure and lazy functional programming language";
+    longDescription = ''
+      Clean is a general purpose, state-of-the-art, pure and lazy functional
+      programming language designed for making real-world applications. Some
+      of its most notable language features are uniqueness typing, dynamic typing,
+      and generic functions.
+    '';
+
+    homepage = "http://wiki.clean.cs.ru.nl/Clean";
+    license = stdenv.lib.licenses.lgpl21;
+    maintainers = [ stdenv.lib.maintainers.kkallio ];
+    platforms = [ "i686-linux" "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/closure/default.nix b/nixpkgs/pkgs/development/compilers/closure/default.nix
new file mode 100644
index 000000000000..b8b02cb9d68b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/closure/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl, jre, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  pname = "closure-compiler";
+  version = "20200517";
+
+  src = fetchurl {
+    url = "https://dl.google.com/closure-compiler/compiler-${version}.tar.gz";
+    sha256 = "05bbsrxw2nxjlcfc22w1ympi66jnmzymivg29cvidh5n28jgwba2";
+  };
+
+  sourceRoot = ".";
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = [ jre ];
+
+  installPhase = ''
+    mkdir -p $out/share/java $out/bin
+    cp closure-compiler-v${version}.jar $out/share/java
+    makeWrapper ${jre}/bin/java $out/bin/closure-compiler \
+      --add-flags "-jar $out/share/java/closure-compiler-v${version}.jar"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A tool for making JavaScript download and run faster";
+    homepage = "https://developers.google.com/closure/compiler/";
+    license = licenses.asl20;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/cmdstan/default.nix b/nixpkgs/pkgs/development/compilers/cmdstan/default.nix
new file mode 100644
index 000000000000..87d3f0ef00ce
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/cmdstan/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, fetchurl, python, runtimeShell }:
+
+stdenv.mkDerivation {
+  name = "cmdstan-2.17.1";
+
+  src = fetchurl {
+    url = "https://github.com/stan-dev/cmdstan/releases/download/v2.17.1/cmdstan-2.17.1.tar.gz";
+    sha256 = "1vq1cnrkvrvbfl40j6ajc60jdrjcxag1fi6kff5pqmadfdz9564j";
+  };
+
+  buildFlags = [ "build" ];
+  enableParallelBuilding = true;
+
+  doCheck = true;
+  checkInputs = [ python ];
+  checkPhase = "python ./runCmdStanTests.py src/test/interface"; # see #5368
+
+  installPhase = ''
+    mkdir -p $out/opt $out/bin
+    cp -r . $out/opt/cmdstan
+    ln -s $out/opt/cmdstan/bin/stanc $out/bin/stanc
+    ln -s $out/opt/cmdstan/bin/stansummary $out/bin/stansummary
+    cat > $out/bin/stan <<EOF
+    #!${runtimeShell}
+    make -C $out/opt/cmdstan "\$(realpath "\$1")"
+    EOF
+    chmod a+x $out/bin/stan
+  '';
+
+  meta = {
+    description = "Command-line interface to Stan";
+    longDescription = ''
+      Stan is a probabilistic programming language implementing full Bayesian
+      statistical inference with MCMC sampling (NUTS, HMC), approximate Bayesian
+      inference with Variational inference (ADVI) and penalized maximum
+      likelihood estimation with Optimization (L-BFGS).
+    '';
+    homepage = "https://mc-stan.org/interfaces/cmdstan.html";
+    license = stdenv.lib.licenses.bsd3;
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/cmucl/binary.nix b/nixpkgs/pkgs/development/compilers/cmucl/binary.nix
new file mode 100644
index 000000000000..480a7e522b53
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/cmucl/binary.nix
@@ -0,0 +1,44 @@
+{stdenv, fetchurl}:
+
+let
+  inherit (stdenv.hostPlatform) system;
+  version = "21b";
+  downloadUrl = arch:
+    "http://common-lisp.net/project/cmucl/downloads/release/" +
+    "${version}/cmucl-${version}-${arch}.tar.bz2";
+  fetchDist = {arch, sha256}: fetchurl {
+    url = downloadUrl arch;
+    inherit sha256;
+  };
+  dist =
+    if system == "i686-linux" then fetchDist {
+        arch = "x86-linux";
+        sha256 = "13k3b5ygnbsq6n2i3r5i4ljw3r1qlskn2p5f4x9hrx6vfvbb3k7a";
+      }
+    else throw "Unsupported platform for cmucl.";
+in
+
+stdenv.mkDerivation {
+  pname = "cmucl-binary";
+  inherit version;
+
+  buildCommand = ''
+    mkdir -p $out
+    tar -C $out -xjf ${dist}
+    patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+      $out/bin/lisp
+  '';
+
+  meta = {
+    description = "The CMU implementation of Common Lisp";
+    longDescription = ''
+      CMUCL is a free implementation of the Common Lisp programming language
+      which runs on most major Unix platforms.  It mainly conforms to the
+      ANSI Common Lisp standard.
+    '';
+    license = stdenv.lib.licenses.free;		# public domain
+    homepage = "http://www.cons.org/cmucl/";
+    maintainers = [stdenv.lib.maintainers.tohl];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/colm/cross-compile.patch b/nixpkgs/pkgs/development/compilers/colm/cross-compile.patch
new file mode 100644
index 000000000000..470ea23aaf1b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/colm/cross-compile.patch
@@ -0,0 +1,13 @@
+--- a/configure.ac	2019-07-09 22:41:03.166948024 -0700
++++ b/configure.ac	2019-07-09 22:41:16.699948056 -0700
+@@ -40,9 +40,7 @@
+ 
+ dnl Choose a default for the build_manual var. If the dist file is present in
+ dnl the root then default to no, otherwise go for it.
+-AC_CHECK_FILES( [$srcdir/DIST], 
+-	[. $srcdir/DIST;], 
+-	[build_manual=yes; ] )
++build_manual=yes;
+ 
+ dnl Set to true if the manual should be built.
+ AM_CONDITIONAL(BUILD_MANUAL, [test "x$build_manual" = "xyes"])
diff --git a/nixpkgs/pkgs/development/compilers/colm/default.nix b/nixpkgs/pkgs/development/compilers/colm/default.nix
new file mode 100644
index 000000000000..06a56dc42eaf
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/colm/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchurl, makeWrapper, gcc, asciidoc, autoreconfHook }:
+
+stdenv.mkDerivation rec {
+  pname = "colm";
+  version = "0.13.0.7";
+
+  src = fetchurl {
+    url = "https://www.colm.net/files/colm/${pname}-${version}.tar.gz";
+    sha256 = "0f76iri173l2wja2v7qrwmf958cqwh5g9x4bhj2z8wknmlla6gz4";
+  };
+
+  patches = [ ./cross-compile.patch ];
+
+  nativeBuildInputs = [ makeWrapper asciidoc autoreconfHook ];
+
+  doCheck = true;
+
+  postInstall = ''
+    wrapProgram $out/bin/colm \
+      --prefix PATH ":" ${gcc}/bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A programming language for the analysis and transformation of computer languages";
+    homepage = "http://www.colm.net/open-source/colm";
+    license = licenses.gpl2;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ pSub ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/compcert/default.nix b/nixpkgs/pkgs/development/compilers/compcert/default.nix
new file mode 100644
index 000000000000..1665061125d6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/compcert/default.nix
@@ -0,0 +1,73 @@
+{ stdenv, lib, fetchFromGitHub, makeWrapper
+, coq, ocamlPackages, coq2html
+, tools ? stdenv.cc
+}:
+
+assert lib.versionAtLeast ocamlPackages.ocaml.version "4.02";
+assert lib.versionAtLeast coq.coq-version "8.8.0";
+
+let
+  ocaml-pkgs      = with ocamlPackages; [ ocaml findlib menhir ];
+  ccomp-platform = if stdenv.isDarwin then "x86_64-macosx" else "x86_64-linux";
+in
+stdenv.mkDerivation rec {
+  pname = "compcert";
+  version = "3.7";
+
+  src = fetchFromGitHub {
+    owner = "AbsInt";
+    repo = "CompCert";
+    rev = "v${version}";
+    sha256 = "1h4zhk9rrqki193nxs9vjvya7nl9yxjcf07hfqb6g77riy1vd2jr";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+  buildInputs = ocaml-pkgs ++ [ coq coq2html ];
+  enableParallelBuilding = true;
+
+  patchPhase = ''
+    substituteInPlace ./configure \
+      --replace '{toolprefix}gcc' '{toolprefix}cc'
+  '';
+
+  configurePhase = ''
+    ./configure -clightgen \
+      -prefix $out \
+      -toolprefix ${tools}/bin/ \
+      ${ccomp-platform}
+  '';
+
+  installTargets = "documentation install";
+  postInstall = ''
+    # move man into place
+    mkdir -p $man/share
+    mv $out/share/man/ $man/share/
+
+    # move docs into place
+    mkdir -p $doc/share/doc/compcert
+    mv doc/html $doc/share/doc/compcert/
+
+    # install compcert lib files; remove copy from $out, too
+    mkdir -p $lib/lib/coq/${coq.coq-version}/user-contrib/compcert/
+    mv backend cfrontend common cparser driver flocq x86 x86_64 lib \
+      $lib/lib/coq/${coq.coq-version}/user-contrib/compcert/
+    rm -rf $out/lib/compcert/coq
+
+    # wrap ccomp to undefine _FORTIFY_SOURCE; ccomp invokes cc1 which sets
+    # _FORTIFY_SOURCE=2 by default, but undefines __GNUC__ (as it should),
+    # which causes a warning in libc. this suppresses it.
+    for x in ccomp clightgen; do
+      wrapProgram $out/bin/$x --add-flags "-U_FORTIFY_SOURCE"
+    done
+  '';
+
+  outputs = [ "out" "lib" "doc" "man" ];
+
+  meta = with stdenv.lib; {
+    description = "Formally verified C compiler";
+    homepage    = "http://compcert.inria.fr";
+    license     = licenses.inria-compcert;
+    platforms   = [ "x86_64-linux" "x86_64-darwin" ];
+    maintainers = with maintainers; [ thoughtpolice jwiegley vbgl ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/computecpp/default.nix b/nixpkgs/pkgs/development/compilers/computecpp/default.nix
new file mode 100644
index 000000000000..68d11bdf8b19
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/computecpp/default.nix
@@ -0,0 +1,52 @@
+{ stdenv
+, fetchzip
+, pkg-config
+, autoPatchelfHook
+, installShellFiles
+, ncurses5
+, ocl-icd
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "computecpp";
+  version = "1.3.0";
+
+  src = fetchzip {
+    url = "https://computecpp.codeplay.com/downloads/computecpp-ce/${version}/ubuntu-16.04-64bit.tar.gz";
+    sha256 = "1q6gqjpzz4a260gsd6mm1iv4z8ar3vxaypmgdwl8pb4i7kg6ykaz";
+    stripRoot = true;
+  };
+
+  dontStrip = true;
+
+  buildInputs = [ stdenv.cc.cc.lib ncurses5 ocl-icd zlib ];
+  nativeBuildInputs = [ autoPatchelfHook pkg-config installShellFiles ];
+
+  installPhase = ''
+    runHook preInstall
+
+    find ./lib -type f -exec install -D -m 0755 {} -t $out/lib \;
+    find ./bin -type l -exec install -D -m 0755 {} -t $out/bin \;
+    find ./bin -type f -exec install -D -m 0755 {} -t $out/bin \;
+    find ./doc -type f -exec install -D -m 0644 {} -t $out/doc \;
+    find ./include -type f -exec install -D -m 0644 {} -t $out/include \;
+
+    runHook postInstall
+  '';
+
+  passthru = {
+    isClang = true;
+  } // stdenv.lib.optionalAttrs (stdenv.targetPlatform.isLinux || (stdenv.cc.isGNU && stdenv.cc.cc ? gcc)) {
+    gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
+  };
+
+  meta = with stdenv.lib; {
+    description =
+      "Accelerate Complex C++ Applications on Heterogeneous Compute Systems using Open Standards";
+    homepage = "https://www.codeplay.com/products/computesuite/computecpp";
+    license = licenses.unfree;
+    maintainers = with maintainers; [ davidtwco ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/coreclr/default.nix b/nixpkgs/pkgs/development/compilers/coreclr/default.nix
new file mode 100644
index 000000000000..2a44279209c1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/coreclr/default.nix
@@ -0,0 +1,100 @@
+{ config, stdenv
+, fetchFromGitHub
+, fetchpatch
+, which
+, cmake
+, llvmPackages
+, libunwind
+, gettext
+, openssl
+, python2
+, icu
+, lttng-ust
+, liburcu
+, libuuid
+, libkrb5
+, debug ? config.coreclr.debug or false
+}:
+
+stdenv.mkDerivation rec {
+  pname = "coreclr";
+  version = "2.0.7";
+
+  src = fetchFromGitHub {
+    owner  = "dotnet";
+    repo   = "coreclr";
+    rev    = "v${version}";
+    sha256 = "0pzkrfgqywhpijbx7j1v4lxa6270h6whymb64jdkp7yj56ipqh2n";
+  };
+
+  patches = [
+    (fetchpatch {
+      # glibc 2.26
+      url = "https://github.com/dotnet/coreclr/commit/a8f83b615708c529b112898e7d2fbc3f618b26ee.patch";
+      sha256 = "047ph5gip4z2h7liwdxsmpnlaq0sd3hliaw4nyqjp647m80g3ffq";
+    })
+    (fetchpatch {
+      # clang 5
+      url = "https://github.com/dotnet/coreclr/commit/9b22e1a767dee38f351001c5601f56d78766a43e.patch";
+      sha256 = "1w1lxw5ryvhq8m5m0kv880c4bh6y9xdgypkr76sqbh3v568yghzg";
+    })
+  ];
+
+  nativeBuildInputs = [
+    which
+    cmake
+    llvmPackages.clang
+  ];
+
+  buildInputs = [
+    llvmPackages.llvm
+    llvmPackages.lldb
+    libunwind
+    gettext
+    openssl
+    python2
+    icu
+    lttng-ust
+    liburcu
+    libuuid
+    libkrb5
+  ];
+
+  configurePhase = ''
+    # override to avoid cmake running
+    patchShebangs .
+  '';
+
+  BuildArch = if stdenv.is64bit then "x64" else "x86";
+  BuildType = if debug then "Debug" else "Release";
+
+  hardeningDisable = [
+    "strictoverflow"
+    "format"
+  ];
+
+  buildPhase = ''
+    runHook preBuild
+    # disable -Werror which can potentially breaks with every compiler upgrade
+    ./build.sh $BuildArch $BuildType cmakeargs "-DCLR_CMAKE_WARNINGS_ARE_ERRORS=OFF"
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/share/dotnet $out/bin
+    cp -r bin/Product/Linux.$BuildArch.$BuildType/* $out/share/dotnet
+    for cmd in coreconsole corerun createdump crossgen ilasm ildasm mcs superpmi; do
+      ln -s $out/share/dotnet/$cmd $out/bin/$cmd
+    done
+    runHook postInstall
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/dotnet/core/";
+    description = ".NET is a general purpose development platform";
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ kuznero ];
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/crystal/build-package.nix b/nixpkgs/pkgs/development/compilers/crystal/build-package.nix
new file mode 100644
index 000000000000..856c6e58bc18
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/crystal/build-package.nix
@@ -0,0 +1,109 @@
+{ stdenv, lib, crystal, shards, git, pkgconfig, which, linkFarm, fetchFromGitHub, installShellFiles }:
+
+{ # Some projects do not include a lock file, so you can pass one
+  lockFile ? null
+  # Generate shards.nix with `nix-shell -p crystal2nix --run crystal2nix` in the projects root
+, shardsFile ? null
+  # We support different builders. To make things more straight forward, make it
+  # user selectable instead of trying to autodetect
+, format ? "make"
+, installManPages ? true
+  # Specify binaries to build in the form { foo.src = "src/foo.cr"; }
+  # The default `crystal build` options can be overridden with { foo.options = [ "--no-debug" ]; }
+, crystalBinaries ? { }, ... }@args:
+
+assert (builtins.elem format [ "make" "crystal" "shards" ]);
+
+let
+  mkDerivationArgs = builtins.removeAttrs args [
+    "format"
+    "installManPages"
+    "lockFile"
+    "shardsFile"
+    "crystalBinaries"
+  ];
+
+  crystalLib = linkFarm "crystal-lib" (lib.mapAttrsToList (name: value: {
+    inherit name;
+    path = fetchFromGitHub value;
+  }) (import shardsFile));
+
+  # we previously had --no-debug here but that is not recommended by upstream
+  defaultOptions = [ "--release" "--progress" "--verbose" ];
+
+  buildDirectly = shardsFile == null || crystalBinaries != { };
+in stdenv.mkDerivation (mkDerivationArgs // {
+
+  configurePhase = args.configurePhase or lib.concatStringsSep "\n" ([
+    "runHook preConfigure"
+  ] ++ lib.optional (lockFile != null)   "ln -s ${lockFile} ./shard.lock"
+    ++ lib.optional (shardsFile != null) "ln -s ${crystalLib} lib"
+    ++ [ "runHook postConfigure "]);
+
+  CRFLAGS = lib.concatStringsSep " " defaultOptions;
+
+  PREFIX = placeholder "out";
+
+  buildInputs = args.buildInputs or [ ] ++ [ crystal ]
+    ++ lib.optional (format != "crystal") shards;
+
+  nativeBuildInputs = args.nativeBuildInputs or [ ] ++ [ git installShellFiles pkgconfig which ];
+
+  buildPhase = args.buildPhase or (lib.concatStringsSep "\n" ([
+    "runHook preBuild"
+  ] ++ lib.optional (format == "make")
+    ''make ''${buildTargets:-build} $makeFlags''
+  ++ lib.optionals (format == "crystal") (lib.mapAttrsToList (bin: attrs: ''
+        crystal ${lib.escapeShellArgs (["build" "-o" bin
+            (attrs.src or (throw "No source file for crystal binary ${bin} provided"))
+        ] ++ (attrs.options or defaultOptions))}
+      '') crystalBinaries)
+  ++ lib.optional (format == "shards")
+      "shards build --local --production ${lib.concatStringsSep " " defaultOptions}"
+  ++ [ "runHook postBuild" ]));
+
+  installPhase = args.installPhase or (lib.concatStringsSep "\n" ([
+    "runHook preInstall"
+  ] ++ lib.optional (format == "make")
+    ''make ''${installTargets:-install} $installFlags''
+  ++ lib.optionals (format == "crystal") (map (bin: ''
+      install -Dm555 ${lib.escapeShellArgs [ bin "${placeholder "out"}/bin/${bin}" ]}
+    '') (lib.attrNames crystalBinaries))
+  ++ lib.optional (format == "shards")
+      ''install -Dm555 bin/* -t $out/bin''
+  ++ [
+    ''
+      for f in README* *.md LICENSE; do
+        test -f $f && install -Dm444 $f -t $out/share/doc/${args.pname}
+      done
+    ''
+  ] ++ (lib.optional installManPages ''
+      if [ -d man ]; then
+        installManPage man/*.?
+      fi
+  '') ++ [
+    "runHook postInstall"
+  ]));
+
+  doCheck = args.doCheck or true;
+
+  checkPhase = args.checkPhase or (lib.concatStringsSep "\n" ([
+    "runHook preCheck"
+  ] ++ lib.optional (format == "make")
+    ''make ''${checkTarget:-test} $checkFlags''
+  ++ lib.optional (format != "make")
+    ''crystal ''${checkTarget:-spec} $checkFlags''
+  ++ [ "runHook postCheck" ]));
+
+  doInstallCheck = args.doInstallCheck or true;
+
+  installCheckPhase = args.installCheckPhase or ''
+    for f in $out/bin/*; do
+      $f --help
+    done
+  '';
+
+  meta = args.meta or { } // {
+    platforms = args.meta.platforms or crystal.meta.platforms;
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/crystal/crystal2nix.cr b/nixpkgs/pkgs/development/compilers/crystal/crystal2nix.cr
new file mode 100644
index 000000000000..0610de5cfa4d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/crystal/crystal2nix.cr
@@ -0,0 +1,42 @@
+require "yaml"
+require "json"
+
+class PrefetchJSON
+  JSON.mapping(sha256: String)
+end
+
+class ShardLock
+  YAML.mapping(
+    version: Float32,
+    shards: Hash(String, Hash(String, String))
+  )
+end
+
+File.open "shards.nix", "w+" do |file|
+  file.puts %({)
+  yaml = ShardLock.from_yaml(File.read("shard.lock"))
+  yaml.shards.each do |key, value|
+    owner, repo = value["github"].split("/")
+    url = "https://github.com/#{value["github"]}"
+    rev = if value["version"]?
+            "v#{value["version"]}"
+          else
+            value["commit"]
+          end
+
+    sha256 = ""
+    args = ["--url", url, "--rev", rev]
+    Process.run("@nixPrefetchGit@", args: args) do |x|
+      x.error.each_line { |e| puts e }
+      sha256 = PrefetchJSON.from_json(x.output).sha256
+    end
+
+    file.puts %(  #{key} = {)
+    file.puts %(    owner = "#{owner}";)
+    file.puts %(    repo = "#{repo}";)
+    file.puts %(    rev = "#{rev}";)
+    file.puts %(    sha256 = "#{sha256}";)
+    file.puts %(  };)
+  end
+  file.puts %(})
+end
diff --git a/nixpkgs/pkgs/development/compilers/crystal/crystal2nix.nix b/nixpkgs/pkgs/development/compilers/crystal/crystal2nix.nix
new file mode 100644
index 000000000000..5fc40cd23741
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/crystal/crystal2nix.nix
@@ -0,0 +1,22 @@
+{ lib, crystal, nix-prefetch-git }:
+
+crystal.buildCrystalPackage {
+  pname = "crystal2nix";
+  version = "unstable-2018-07-31";
+
+  nixPrefetchGit = "${lib.getBin nix-prefetch-git}/bin/nix-prefetch-git";
+  unpackPhase = "substituteAll ${./crystal2nix.cr} crystal2nix.cr";
+
+  format = "crystal";
+
+  crystalBinaries.crystal2nix.src = "crystal2nix.cr";
+
+  # it will blow up without a shard.yml file
+  doInstallCheck = false;
+
+  meta = with lib; {
+    description = "Utility to convert Crystal's shard.lock files to a Nix file";
+    license = licenses.mit;
+    maintainers = with maintainers; [ manveru ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/crystal/default.nix b/nixpkgs/pkgs/development/compilers/crystal/default.nix
new file mode 100644
index 000000000000..a04d48dd0e5a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/crystal/default.nix
@@ -0,0 +1,225 @@
+{ stdenv, lib, fetchFromGitHub, fetchurl, makeWrapper
+, coreutils, git, gmp, hostname, openssl, readline, tzdata, libxml2, libyaml
+, boehmgc, libatomic_ops, pcre, libevent, libiconv, llvm, clang, which, zlib, pkgconfig
+, callPackage }:
+
+# We need multiple binaries as a given binary isn't always able to build
+# (even slightly) older or newer versions.
+# - 0.26.1 can build 0.25.x and 0.26.x but not 0.27.x
+# - 0.27.2 can build 0.27.x but not 0.25.x, 0.26.x and 0.29.x
+#
+# We need to keep around at least the latest version released with a stable
+# NixOS
+
+let
+  archs = {
+    x86_64-linux  = "linux-x86_64";
+    i686-linux    = "linux-i686";
+    x86_64-darwin = "darwin-x86_64";
+  };
+
+  arch = archs.${stdenv.system} or (throw "system ${stdenv.system} not supported");
+
+  checkInputs = [ git gmp openssl readline libxml2 libyaml ];
+
+  genericBinary = { version, sha256s, rel ? 1 }:
+  stdenv.mkDerivation rec {
+    pname = "crystal-binary";
+    inherit version;
+
+    src = fetchurl {
+      url = "https://github.com/crystal-lang/crystal/releases/download/${version}/crystal-${version}-${toString rel}-${arch}.tar.gz";
+      sha256 = sha256s.${stdenv.system};
+    };
+
+    buildCommand = ''
+      mkdir -p $out
+      tar --strip-components=1 -C $out -xf ${src}
+    '';
+  };
+
+  commonBuildInputs = extraBuildInputs: [
+    boehmgc libatomic_ops pcre libevent libyaml zlib libxml2 openssl
+  ] ++ extraBuildInputs
+    ++ stdenv.lib.optionals stdenv.isDarwin [ libiconv ];
+
+
+  generic = ({ version, sha256, binary, doCheck ? true, extraBuildInputs ? [] }:
+  lib.fix (compiler: stdenv.mkDerivation {
+    pname = "crystal";
+    inherit doCheck version;
+
+    src = fetchFromGitHub {
+      owner  = "crystal-lang";
+      repo   = "crystal";
+      rev    = version;
+      inherit sha256;
+    };
+
+    outputs = [ "out" "lib" "bin" ];
+
+    postPatch = ''
+      substituteInPlace src/crystal/system/unix/time.cr \
+        --replace /usr/share/zoneinfo ${tzdata}/share/zoneinfo
+
+      ln -sf spec/compiler spec/std
+
+      # Dirty fix for when no sandboxing is enabled
+      rm -rf /tmp/crystal
+      mkdir -p /tmp/crystal
+
+      substituteInPlace spec/std/file_spec.cr \
+        --replace '/bin/ls' '${coreutils}/bin/ls' \
+        --replace '/usr/share' '/tmp/crystal' \
+        --replace '/usr' '/tmp'
+
+      substituteInPlace spec/std/process_spec.cr \
+        --replace '/bin/cat' '${coreutils}/bin/cat' \
+        --replace '/bin/ls' '${coreutils}/bin/ls' \
+        --replace '/usr/bin/env' '${coreutils}/bin/env' \
+        --replace '"env"' '"${coreutils}/bin/env"' \
+        --replace '"/usr"' '"/tmp"'
+
+      substituteInPlace spec/std/socket/tcp_server_spec.cr \
+        --replace '{% if flag?(:gnu) %}"listen: "{% else %}"bind: "{% end %}' '"bind: "'
+
+      substituteInPlace spec/std/system_spec.cr \
+        --replace '`hostname`' '`${hostname}/bin/hostname`'
+
+      # See https://github.com/crystal-lang/crystal/pull/8640
+      substituteInPlace spec/std/http/cookie_spec.cr \
+        --replace '01 Jan 2020' '01 Jan #{Time.utc.year + 2}'
+
+      # See https://github.com/crystal-lang/crystal/issues/8629
+      substituteInPlace spec/std/socket/udp_socket_spec.cr \
+        --replace 'it "joins and transmits to multicast groups"' 'pending "joins and transmits to multicast groups"'
+
+      # See https://github.com/crystal-lang/crystal/pull/8699
+      substituteInPlace spec/std/xml/xml_spec.cr \
+        --replace 'it "handles errors"' 'pending "handles errors"'
+    '';
+
+    buildInputs = commonBuildInputs extraBuildInputs;
+
+    nativeBuildInputs = [ binary makeWrapper which pkgconfig llvm ];
+
+    makeFlags = [
+      "CRYSTAL_CONFIG_VERSION=${version}"
+    ];
+
+    buildFlags = [
+      "all" "docs"
+    ];
+
+    LLVM_CONFIG = "${llvm}/bin/llvm-config";
+
+    FLAGS = [
+      "--release"
+      "--single-module" # needed for deterministic builds
+    ];
+
+    # This makes sure we don't keep depending on the previous version of
+    # crystal used to build this one.
+    CRYSTAL_LIBRARY_PATH = "${placeholder "lib"}/crystal";
+
+    # We *have* to add `which` to the PATH or crystal is unable to build stuff
+    # later if which is not available.
+    installPhase = ''
+      runHook preInstall
+
+      install -Dm755 .build/crystal $bin/bin/crystal
+      wrapProgram $bin/bin/crystal \
+          --suffix PATH : ${lib.makeBinPath [ pkgconfig clang which ]} \
+          --suffix CRYSTAL_PATH : lib:$lib/crystal \
+          --suffix CRYSTAL_LIBRARY_PATH : ${
+            lib.makeLibraryPath (commonBuildInputs extraBuildInputs)
+          }
+      install -dm755 $lib/crystal
+      cp -r src/* $lib/crystal/
+
+      install -dm755 $out/share/doc/crystal/api
+      cp -r docs/* $out/share/doc/crystal/api/
+      cp -r samples $out/share/doc/crystal/
+
+      install -Dm644 etc/completion.bash $out/share/bash-completion/completions/crystal
+      install -Dm644 etc/completion.zsh $out/share/zsh/site-functions/_crystal
+
+      install -Dm644 man/crystal.1 $out/share/man/man1/crystal.1
+
+      install -Dm644 -t $out/share/licenses/crystal LICENSE README.md
+
+      mkdir -p $out
+      ln -s $bin/bin $out/bin
+      ln -s $lib $out/lib
+
+      runHook postInstall
+    '';
+
+    enableParallelBuilding = true;
+
+    dontStrip = true;
+
+    checkTarget = "spec";
+
+    preCheck = ''
+      export HOME=/tmp
+      mkdir -p $HOME/test
+
+      export LIBRARY_PATH=${lib.makeLibraryPath checkInputs}:$LIBRARY_PATH
+      export PATH=${lib.makeBinPath checkInputs}:$PATH
+    '';
+
+    passthru.buildCrystalPackage = callPackage ./build-package.nix {
+      crystal = compiler;
+    };
+
+    meta = with lib; {
+      description = "A compiled language with Ruby like syntax and type inference";
+      homepage = "https://crystal-lang.org/";
+      license = licenses.asl20;
+      maintainers = with maintainers; [ manveru david50407 peterhoeg ];
+      platforms = builtins.attrNames archs;
+    };
+  }));
+
+in rec {
+  binaryCrystal_0_31 = genericBinary {
+    version = "0.31.1";
+    sha256s = {
+      x86_64-linux  = "0r8salf572xrnr4m6ll9q5hz6jj8q7ff1rljlhmqb1r26a8mi2ih";
+      i686-linux    = "0hridnis5vvrswflx0q67xfg5hryhz6ivlwrb9n4pryj5d1gwjrr";
+      x86_64-darwin = "1dgxgv0s3swkc5cwawzgpbc6bcd2nx4hjxc7iw2h907y1vgmbipz";
+    };
+  };
+
+  crystal_0_31 = generic {
+    version = "0.31.1";
+    sha256  = "1dswxa32w16gnc6yjym12xj7ibg0g6zk3ngvl76lwdjqb1h6lwz8";
+    doCheck = false; # 5 checks are failing now
+    binary = binaryCrystal_0_31;
+  };
+
+  crystal_0_32 = generic {
+    version = "0.32.1";
+    sha256  = "120ndi3nhh2r52hjvhwfb49cdggr1bzdq6b8xg7irzavhjinfza6";
+    binary = binaryCrystal_0_31;
+  };
+
+  crystal_0_33 = generic {
+    version = "0.33.0";
+    sha256  = "1zg0qixcws81s083wrh54hp83ng2pa8iyyafaha55mzrh8293jbi";
+    binary = binaryCrystal_0_31;
+    doCheck = false; # 4 checks are failing now
+  };
+
+  crystal_0_34 = generic {
+    version = "0.34.0";
+    sha256  = "110lfpxk9jnqyznbfnilys65ixj5sdmy8pvvnlhqhc3ccvrlnmq4";
+    binary = crystal_0_33;
+    doCheck = false; # 4 checks are failing now
+  };
+
+  crystal = crystal_0_34;
+
+  crystal2nix = callPackage ./crystal2nix.nix {};
+}
diff --git a/nixpkgs/pkgs/development/compilers/cudatoolkit/common.nix b/nixpkgs/pkgs/development/compilers/cudatoolkit/common.nix
new file mode 100644
index 000000000000..2e93c0b661b6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/cudatoolkit/common.nix
@@ -0,0 +1,220 @@
+args@
+{ version
+, sha256
+, url ? ""
+, name ? ""
+, developerProgram ? false
+, runPatches ? []
+, addOpenGLRunpath
+, alsaLib
+, expat
+, fetchurl
+, fontconfig
+, freetype
+, gcc
+, gdk-pixbuf
+, glib
+, glibc
+, gtk2
+, lib
+, makeWrapper
+, ncurses5
+, perl
+, python27
+, requireFile
+, stdenv
+, unixODBC
+, xorg
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "cudatoolkit";
+  inherit version runPatches;
+
+  dontPatchELF = true;
+  dontStrip = true;
+
+  src =
+    if developerProgram then
+      requireFile {
+        message = ''
+          This nix expression requires that ${args.name} is already part of the store.
+          Register yourself to NVIDIA Accelerated Computing Developer Program, retrieve the CUDA toolkit
+          at https://developer.nvidia.com/cuda-toolkit, and run the following command in the download directory:
+          nix-prefetch-url file://\$PWD/${args.name}
+        '';
+        inherit (args) name sha256;
+      }
+    else
+      fetchurl {
+        inherit (args) url sha256;
+      };
+
+  outputs = [ "out" "lib" "doc" ];
+
+  nativeBuildInputs = [ perl makeWrapper addOpenGLRunpath ];
+  buildInputs = [ gdk-pixbuf ]; # To get $GDK_PIXBUF_MODULE_FILE via setup-hook
+  runtimeDependencies = [
+    ncurses5 expat python27 zlib glibc
+    xorg.libX11 xorg.libXext xorg.libXrender xorg.libXt xorg.libXtst xorg.libXi xorg.libXext
+    gtk2 glib fontconfig freetype unixODBC alsaLib
+  ];
+
+  rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.cc.cc.lib}/lib64";
+
+  unpackPhase = ''
+    sh $src --keep --noexec
+
+    ${lib.optionalString (lib.versionOlder version "10.1") ''
+      cd pkg/run_files
+      sh cuda-linux*.run --keep --noexec
+      sh cuda-samples*.run --keep --noexec
+      mv pkg ../../$(basename $src)
+      cd ../..
+      rm -rf pkg
+
+      for patch in $runPatches; do
+        sh $patch --keep --noexec
+        mv pkg $(basename $patch)
+      done
+    ''}
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    mkdir $out
+    ${lib.optionalString (lib.versionOlder version "10.1") ''
+    cd $(basename $src)
+    export PERL5LIB=.
+    perl ./install-linux.pl --prefix="$out"
+    cd ..
+    for patch in $runPatches; do
+      cd $(basename $patch)
+      perl ./install_patch.pl --silent --accept-eula --installdir="$out"
+      cd ..
+    done
+    ''}
+    ${lib.optionalString (lib.versionAtLeast version "10.1") ''
+      cd pkg/builds/cuda-toolkit
+      mv * $out/
+    ''}
+
+    rm $out/tools/CUDA_Occupancy_Calculator.xls # FIXME: why?
+
+    ${lib.optionalString (lib.versionOlder version "10.1") ''
+    # let's remove the 32-bit libraries, they confuse the lib64->lib mover
+    rm -rf $out/lib
+    ''}
+
+    # Remove some cruft.
+    ${lib.optionalString ((lib.versionAtLeast version "7.0") && (lib.versionOlder version "10.1"))
+      "rm $out/bin/uninstall*"}
+
+    # Fixup path to samples (needed for cuda 6.5 or else nsight will not find them)
+    if [ -d "$out"/cuda-samples ]; then
+        mv "$out"/cuda-samples "$out"/samples
+    fi
+
+    # Change the #error on GCC > 4.9 to a #warning.
+    sed -i $out/include/host_config.h -e 's/#error\(.*unsupported GNU version\)/#warning\1/'
+
+    # Fix builds with newer glibc version
+    sed -i "1 i#define _BITS_FLOATN_H" "$out/include/host_defines.h"
+
+    # Ensure that cmake can find CUDA.
+    mkdir -p $out/nix-support
+    echo "cmakeFlags+=' -DCUDA_TOOLKIT_ROOT_DIR=$out'" >> $out/nix-support/setup-hook
+
+    # Move some libraries to the lib output so that programs that
+    # depend on them don't pull in this entire monstrosity.
+    mkdir -p $lib/lib
+    mv -v $out/lib64/libcudart* $lib/lib/
+
+    # Remove OpenCL libraries as they are provided by ocl-icd and driver.
+    rm -f $out/lib64/libOpenCL*
+    ${lib.optionalString (lib.versionAtLeast version "10.1") ''
+      mv $out/lib64 $out/lib
+    ''}
+
+    # Set compiler for NVCC.
+    wrapProgram $out/bin/nvcc \
+      --prefix PATH : ${gcc}/bin
+
+    # nvprof do not find any program to profile if LD_LIBRARY_PATH is not set
+    wrapProgram $out/bin/nvprof \
+      --prefix LD_LIBRARY_PATH : $out/lib
+  '' + lib.optionalString (lib.versionOlder version "8.0") ''
+    # Hack to fix building against recent Glibc/GCC.
+    echo "NIX_CFLAGS_COMPILE+=' -D_FORCE_INLINES'" >> $out/nix-support/setup-hook
+  '' + ''
+    runHook postInstall
+  '';
+
+  postInstall = ''
+    for b in nvvp nsight; do
+      wrapProgram "$out/bin/$b" \
+        --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE"
+    done
+  '';
+
+  preFixup = ''
+    while IFS= read -r -d ''$'\0' i; do
+      if ! isELF "$i"; then continue; fi
+      echo "patching $i..."
+      if [[ ! $i =~ \.so ]]; then
+        patchelf \
+          --set-interpreter "''$(cat $NIX_CC/nix-support/dynamic-linker)" $i
+      fi
+      if [[ $i =~ libcudart ]]; then
+        rpath2=
+      else
+        rpath2=$rpath:$lib/lib:$out/jre/lib/amd64/jli:$out/lib:$out/lib64:$out/nvvm/lib:$out/nvvm/lib64
+      fi
+      patchelf --set-rpath "$rpath2" --force-rpath $i
+    done < <(find $out $lib $doc -type f -print0)
+  '';
+
+  # Set RPATH so that libcuda and other libraries in
+  # /run/opengl-driver(-32)/lib can be found. See the explanation in
+  # addOpenGLRunpath.  Don't try to figure out which libraries really need
+  # it, just patch all (but not the stubs libraries). Note that
+  # --force-rpath prevents changing RPATH (set above) to RUNPATH.
+  postFixup = ''
+    addOpenGLRunpath --force-rpath {$out,$lib}/lib/lib*.so
+  '';
+
+  # cuda-gdb doesn't run correctly when not using sandboxing, so
+  # temporarily disabling the install check.  This should be set to true
+  # when we figure out how to get `cuda-gdb --version` to run correctly
+  # when not using sandboxing.
+  doInstallCheck = false;
+  postInstallCheck = let
+  in ''
+    # Smoke test binaries
+    pushd $out/bin
+    for f in *; do
+      case $f in
+        crt)                           continue;;
+        nvcc.profile)                  continue;;
+        nsight_ee_plugins_manage.sh)   continue;;
+        uninstall_cuda_toolkit_6.5.pl) continue;;
+        computeprof|nvvp|nsight)       continue;; # GUIs don't feature "--version"
+        *)                             echo "Executing '$f --version':"; ./$f --version;;
+      esac
+    done
+    popd
+  '';
+  passthru = {
+    cc = gcc;
+    majorVersion = lib.versions.majorMinor version;
+  };
+
+  meta = with stdenv.lib; {
+    description = "A compiler for NVIDIA GPUs, math libraries, and tools";
+    homepage = "https://developer.nvidia.com/cuda-toolkit";
+    platforms = [ "x86_64-linux" ];
+    license = licenses.unfree;
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/compilers/cudatoolkit/default.nix b/nixpkgs/pkgs/development/compilers/cudatoolkit/default.nix
new file mode 100644
index 000000000000..c3b16293204a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/cudatoolkit/default.nix
@@ -0,0 +1,139 @@
+{ lib
+, callPackage
+, fetchurl
+, gcc48
+, gcc6
+, gcc7
+}:
+
+let
+  common = callPackage ./common.nix;
+in rec {
+  cudatoolkit_6 = common {
+    version = "6.0.37";
+    url = "http://developer.download.nvidia.com/compute/cuda/6_0/rel/installers/cuda_6.0.37_linux_64.run";
+    sha256 = "991e436c7a6c94ec67cf44204d136adfef87baa3ded270544fa211179779bc40";
+    gcc = gcc48;
+  };
+
+  cudatoolkit_6_5 = common {
+    version = "6.5.19";
+    url = "http://developer.download.nvidia.com/compute/cuda/6_5/rel/installers/cuda_6.5.19_linux_64.run";
+    sha256 = "1x9zdmk8z784d3d35vr2ak1l4h5v4jfjhpxfi9fl9dvjkcavqyaj";
+    gcc = gcc48;
+  };
+
+  cudatoolkit_7 = common {
+    version = "7.0.28";
+    url = "http://developer.download.nvidia.com/compute/cuda/7_0/Prod/local_installers/cuda_7.0.28_linux.run";
+    sha256 = "1km5hpiimx11jcazg0h3mjzk220klwahs2vfqhjavpds5ff2wafi";
+    gcc = gcc6;
+  };
+
+  cudatoolkit_7_5 = common {
+    version = "7.5.18";
+    url = "http://developer.download.nvidia.com/compute/cuda/7.5/Prod/local_installers/cuda_7.5.18_linux.run";
+    sha256 = "1v2ylzp34ijyhcxyh5p6i0cwawwbbdhni2l5l4qm21s1cx9ish88";
+    gcc = gcc6;
+  };
+
+  cudatoolkit_8 = common {
+    version = "8.0.61.2";
+    url = "https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda_8.0.61_375.26_linux-run";
+    sha256 = "1i4xrsqbad283qffvysn88w2pmxzxbbby41lw0j1113z771akv4w";
+    runPatches = [
+      (fetchurl {
+        url = "https://developer.nvidia.com/compute/cuda/8.0/Prod2/patches/2/cuda_8.0.61.2_linux-run";
+        sha256 = "1iaz5rrsnsb1p99qiqvxn6j3ksc7ry8xlr397kqcjzxqbljbqn9d";
+      })
+    ];
+    gcc = gcc6;
+  };
+
+  cudatoolkit_9_0 = common {
+    version = "9.0.176.1";
+    url = "https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/cuda_9.0.176_384.81_linux-run";
+    sha256 = "0308rmmychxfa4inb1ird9bpgfppgr9yrfg1qp0val5azqik91ln";
+    runPatches = [
+      (fetchurl {
+        url = "https://developer.nvidia.com/compute/cuda/9.0/Prod/patches/1/cuda_9.0.176.1_linux-run";
+        sha256 = "1vbqg97pq9z9c8nqvckiwmq3ljm88m7gaizikzxbvz01izh67gx4";
+      })
+      (fetchurl {
+        url = "https://developer.nvidia.com/compute/cuda/9.0/Prod/patches/2/cuda_9.0.176.2_linux-run";
+        sha256 = "1sz5dijbx9yf7drfipdxav5a5g6sxy4w6vi9xav0lb6m2xnmyd7c";
+      })
+      (fetchurl {
+        url = "https://developer.nvidia.com/compute/cuda/9.0/Prod/patches/3/cuda_9.0.176.3_linux-run";
+        sha256 = "1jm83bxpscpjhzs5q3qijdgjm0r8qrdlgkj7y08fq8c0v8q2r7j2";
+      })
+      (fetchurl {
+        url = "https://developer.nvidia.com/compute/cuda/9.0/Prod/patches/4/cuda_9.0.176.4_linux-run";
+        sha256 = "0pymg3mymsa2n48y0njz3spzlkm15lvjzw8fms1q83zslz4x0lwk";
+      })
+    ];
+    gcc = gcc6;
+  };
+
+  cudatoolkit_9_1 = common {
+    version = "9.1.85.3";
+    url = "https://developer.nvidia.com/compute/cuda/9.1/Prod/local_installers/cuda_9.1.85_387.26_linux";
+    sha256 = "0lz9bwhck1ax4xf1fyb5nicb7l1kssslj518z64iirpy2qmwg5l4";
+    runPatches = [
+      (fetchurl {
+        url = "https://developer.nvidia.com/compute/cuda/9.1/Prod/patches/1/cuda_9.1.85.1_linux";
+        sha256 = "1f53ij5nb7g0vb5pcpaqvkaj1x4mfq3l0mhkfnqbk8sfrvby775g";
+      })
+      (fetchurl {
+        url = "https://developer.nvidia.com/compute/cuda/9.1/Prod/patches/2/cuda_9.1.85.2_linux";
+        sha256 = "16g0w09h3bqmas4hy1m0y6j5ffyharslw52fn25gql57bfihg7ym";
+      })
+      (fetchurl {
+        url = "https://developer.nvidia.com/compute/cuda/9.1/Prod/patches/3/cuda_9.1.85.3_linux";
+        sha256 = "12mcv6f8z33z8y41ja8bv5p5iqhv2vx91mv3b5z6fcj7iqv98422";
+      })
+    ];
+    gcc = gcc6;
+  };
+
+  cudatoolkit_9_2 = common {
+    version = "9.2.148.1";
+    url = "https://developer.nvidia.com/compute/cuda/9.2/Prod2/local_installers/cuda_9.2.148_396.37_linux";
+    sha256 = "04c6v9b50l4awsf9w9zj5vnxvmc0hk0ypcfjksbh4vnzrz14wigm";
+    runPatches = [
+      (fetchurl {
+        url = "https://developer.nvidia.com/compute/cuda/9.2/Prod2/patches/1/cuda_9.2.148.1_linux";
+        sha256 = "1kx6l4yzsamk6q1f4vllcpywhbfr2j5wfl4h5zx8v6dgfpsjm2lw";
+      })
+    ];
+    gcc = gcc7;
+  };
+
+  cudatoolkit_9 = cudatoolkit_9_2;
+
+  cudatoolkit_10_0 = common {
+    version = "10.0.130";
+    url = "https://developer.nvidia.com/compute/cuda/10.0/Prod/local_installers/cuda_10.0.130_410.48_linux";
+    sha256 = "16p3bv1lwmyqpxil8r951h385sy9asc578afrc7lssa68c71ydcj";
+
+    gcc = gcc7;
+  };
+
+  cudatoolkit_10_1 = common {
+    version = "10.1.243";
+    url = "https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_418.87.00_linux.run";
+    sha256 = "0caxhlv2bdq863dfp6wj7nad66ml81vasq2ayf11psvq2b12vhp7";
+
+    gcc = gcc7;
+  };
+
+  cudatoolkit_10_2 = common {
+    version = "10.2.89";
+    url = "http://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda_10.2.89_440.33.01_linux.run";
+    sha256 = "04fasl9sjkb1jvchvqgaqxprnprcz7a8r52249zp2ijarzyhf3an";
+
+    gcc = gcc7;
+  };
+
+  cudatoolkit_10 = cudatoolkit_10_2;
+}
diff --git a/nixpkgs/pkgs/development/compilers/dale/default.nix b/nixpkgs/pkgs/development/compilers/dale/default.nix
new file mode 100644
index 000000000000..cbe4e7ec9260
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dale/default.nix
@@ -0,0 +1,47 @@
+{ stdenv
+, fetchFromGitHub
+, cmake
+, pkgconfig
+, libffi
+, llvm_6
+, doCheck ? false
+, perl
+}:
+
+let version = "20181024";
+
+in stdenv.mkDerivation {
+  pname = "dale";
+  inherit version;
+
+  src = fetchFromGitHub {
+    owner = "tomhrr";
+    repo = "dale";
+    rev = "f5db8b486f4e7c423fc25941a8315f1209bc0e54";
+    sha256 = "0v4ajrzrqvf279kd7wsd9flrpsav57lzxlwwimk9vnfwh7xpzf9v";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ cmake libffi llvm_6 ]
+             ++ stdenv.lib.optional doCheck perl;
+
+  inherit doCheck;
+
+  checkTarget = "tests";
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    description = "Lisp-flavoured C";
+    longDescription = ''
+      Dale is a system (no GC) programming language that uses
+      S-expressions for syntax and supports syntactic macros.
+    '';
+    homepage = "https://github.com/tomhrr/dale";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ amiloradovsky ];
+    platforms = with platforms; [ "i686-linux" "x86_64-linux" ];
+    # failed on Darwin: linker couldn't find the FFI lib
+    # failed on AArch64: because LLVM 3.5 is failed there
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/dasm/default.nix b/nixpkgs/pkgs/development/compilers/dasm/default.nix
new file mode 100644
index 000000000000..1eb233b90b7f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dasm/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "dasm";
+  version = "2.20.13";
+
+  src = fetchFromGitHub {
+    owner = "dasm-assembler";
+    repo = "dasm";
+    rev = version;
+    sha256 = "1nr4kvw42vyc6i4p1c06jlih11rhbjjxc27dc7cx5qj635xf4jcf";
+  };
+
+  configurePhase = false;
+  installPhase = ''
+    mkdir -p $out/bin
+    install bin/* $out/bin
+  '';
+
+  preCheck = ''
+    patchShebangs ./test/
+  '';
+
+  checkTarget = "test";
+  doCheck = true;
+
+  meta = with stdenv.lib; {
+    description = "Assembler for 6502 and other 8-bit microprocessors";
+    homepage = "https://dasm-assembler.github.io";
+    license = licenses.gpl2;
+    maintainers = [ maintainers.jwatt ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/dev86/default.nix b/nixpkgs/pkgs/development/compilers/dev86/default.nix
new file mode 100644
index 000000000000..88b46561241a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dev86/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "dev86";
+  version = "0.16.21";
+
+  src = fetchurl {
+    url = "http://v3.sk/~lkundrak/dev86/Dev86src-${version}.tar.gz";
+    sha256 = "154dyr2ph4n0kwi8yx0n78j128kw29rk9r9f7s2gddzrdl712jr3";
+  };
+
+  hardeningDisable = [ "format" ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  meta = {
+    description = "Linux 8086 development environment";
+    homepage = "http://v3.sk/~lkundrak/dev86/";
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/dmd/binary.nix b/nixpkgs/pkgs/development/compilers/dmd/binary.nix
new file mode 100644
index 000000000000..cd3a15889b21
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dmd/binary.nix
@@ -0,0 +1,52 @@
+{ stdenv, fetchurl, curl, tzdata, autoPatchelfHook, fixDarwinDylibNames, glibc
+, version, hashes }:
+with stdenv;
+let
+  OS = if hostPlatform.isDarwin then "osx" else hostPlatform.parsed.kernel.name;
+  MODEL = toString hostPlatform.parsed.cpu.bits;
+in mkDerivation {
+  pname = "dmd-bootstrap";
+  inherit version;
+
+  src = fetchurl rec {
+    name = "dmd.${version}.${OS}.tar.xz";
+    url = "http://downloads.dlang.org/releases/2.x/${version}/${name}";
+    sha256 = hashes.${OS} or (throw "missing bootstrap sha256 for OS ${OS}");
+  };
+
+  dontConfigure = true;
+  dontBuild = true;
+
+  nativeBuildInputs = [ fixDarwinDylibNames autoPatchelfHook ];
+  propagatedBuildInputs = [ curl tzdata ] ++ lib.optional hostPlatform.isLinux glibc;
+
+  installPhase = ''
+    mkdir -p $out
+
+    # try to copy model-specific binaries into bin first
+    mv ${OS}/bin${MODEL} $out/bin || true
+
+    mv src license.txt ${OS}/* $out/
+
+    # move man into place
+    mkdir -p $out/share
+    mv man $out/share/
+
+    # move docs into place
+    mkdir -p $out/share/doc
+    mv html/d $out/share/doc/
+
+    # fix paths in dmd.conf (one level less)
+    substituteInPlace $out/bin/dmd.conf --replace "/../../" "/../"
+  '';
+
+  meta = with lib; {
+    inherit version;
+    description = "Digital Mars D Compiler Package";
+    # As of 2.075 all sources and binaries use the boost license
+    license = licenses.boost;
+    maintainers = [ maintainers.lionello ];
+    homepage = "https://dlang.org/";
+    platforms = [ "x86_64-darwin" "i686-linux" "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/dmd/bootstrap.nix b/nixpkgs/pkgs/development/compilers/dmd/bootstrap.nix
new file mode 100644
index 000000000000..087781ae2ca4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dmd/bootstrap.nix
@@ -0,0 +1,9 @@
+{ callPackage }:
+callPackage ./binary.nix {
+  version = "2.090.1";
+  hashes = {
+    # Get these from `nix-prefetch-url http://downloads.dlang.org/releases/2.x/2.090.1/dmd.2.090.1.linux.tar.xz` etc..
+    osx = "0rbn7j4dr3q0y09fblpj999bi063pi4230rqd5xgd3gwxxa0cz7l";
+    linux = "1vk6lsvd6y7ccvffd23yial4ig90azaxf2rxc6yvidqd1qhan807";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/dmd/default.nix b/nixpkgs/pkgs/development/compilers/dmd/default.nix
new file mode 100644
index 000000000000..a6d4f7e1e20a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dmd/default.nix
@@ -0,0 +1,167 @@
+{ stdenv, lib, fetchFromGitHub
+, makeWrapper, unzip, which, writeTextFile
+, curl, tzdata, gdb, darwin, git, callPackage
+, targetPackages, fetchpatch, bash
+, dmdBootstrap ? callPackage ./bootstrap.nix { }
+, HOST_DMD ? "${dmdBootstrap}/bin/dmd"
+, version ? "2.091.1"
+, dmdSha256 ? "0brz0n84jdkhr4sq4k91w48p739psbhbb1jk2pi9q60psmx353yr"
+, druntimeSha256 ? "0smgpmfriffh110ksski1s5j921kmxbc2zjy0dyj9ksyrxbzklbl"
+, phobosSha256 ? "1n00anajgibrfs1xzvrmag28hvbvkc0w1fwlimqbznvhf28rhrxs"
+}:
+
+let
+
+  dmdConfFile = writeTextFile {
+      name = "dmd.conf";
+      text = (lib.generators.toINI {} {
+        Environment = {
+          DFLAGS = ''-I@out@/include/dmd -L-L@out@/lib -fPIC ${stdenv.lib.optionalString (!targetPackages.stdenv.cc.isClang) "-L--export-dynamic"}'';
+        };
+      });
+  };
+
+in
+
+stdenv.mkDerivation rec {
+  pname = "dmd";
+  inherit version;
+
+  enableParallelBuilding = true;
+
+  srcs = [
+  (fetchFromGitHub {
+    owner = "dlang";
+    repo = "dmd";
+    rev = "v${version}";
+    sha256 = dmdSha256;
+    name = "dmd";
+  })
+  (fetchFromGitHub {
+    owner = "dlang";
+    repo = "druntime";
+    rev = "v${version}";
+    sha256 = druntimeSha256;
+    name = "druntime";
+  })
+  (fetchFromGitHub {
+    owner = "dlang";
+    repo = "phobos";
+    rev = "v${version}";
+    sha256 = phobosSha256;
+    name = "phobos";
+  })
+  ];
+
+  patchFlags = [ "--directory=dmd" "-p1" "-F3" ];
+  patches = [
+    (fetchpatch {
+     url = "https://github.com/dlang/dmd/commit/4157298cf04f7aae9f701432afd1de7b7e05c30f.patch";
+     sha256 = "0v4xgqmrx5r8vbx5a4v88s0xnm23mam9nm99yfga7s2sxr0hi5p2";
+    })
+    (fetchpatch {
+     url = "https://github.com/dlang/dmd/commit/1b8a4c90b040bf2f0b68a2739de4991315580b13.patch";
+     sha256 = "1iih6aalv4fsw9mbrlrybhngkkchzzrzg7q8zl047w36c0x397cs";
+    })
+  ];
+
+  sourceRoot = ".";
+
+  # https://issues.dlang.org/show_bug.cgi?id=19553
+  hardeningDisable = [ "fortify" ];
+
+  postUnpack = ''
+      patchShebangs .
+  '';
+
+  postPatch = ''
+      substituteInPlace dmd/test/dshell/test6952.d --replace "/usr/bin/env bash" "${bash}/bin/bash"
+  ''
+  + stdenv.lib.optionalString stdenv.hostPlatform.isLinux ''
+      substituteInPlace phobos/std/socket.d --replace "assert(ih.addrList[0] == 0x7F_00_00_01);" ""
+  ''
+  + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
+      substituteInPlace phobos/std/socket.d --replace "foreach (name; names)" "names = []; foreach (name; names)"
+  '';
+
+  nativeBuildInputs = [ makeWrapper unzip which gdb git ]
+
+  ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
+    Foundation
+  ]);
+
+  buildInputs = [ curl tzdata ];
+
+  bits = builtins.toString stdenv.hostPlatform.parsed.cpu.bits;
+  osname = if stdenv.hostPlatform.isDarwin then
+    "osx"
+  else
+    stdenv.hostPlatform.parsed.kernel.name;
+  top = "$(echo $NIX_BUILD_TOP)";
+  pathToDmd = "${top}/dmd/generated/${osname}/release/${bits}/dmd";
+
+  # Buid and install are based on http://wiki.dlang.org/Building_DMD
+  buildPhase = ''
+      cd dmd
+      make -j$NIX_BUILD_CORES -f posix.mak INSTALL_DIR=$out BUILD=release ENABLE_RELEASE=1 PIC=1 HOST_DMD=${HOST_DMD}
+      cd ../druntime
+      make -j$NIX_BUILD_CORES -f posix.mak BUILD=release ENABLE_RELEASE=1 PIC=1 INSTALL_DIR=$out DMD=${pathToDmd}
+      cd ../phobos
+      echo ${tzdata}/share/zoneinfo/ > TZDatabaseDirFile
+      echo ${curl.out}/lib/libcurl${stdenv.hostPlatform.extensions.sharedLibrary} > LibcurlPathFile
+      make -j$NIX_BUILD_CORES -f posix.mak BUILD=release ENABLE_RELEASE=1 PIC=1 INSTALL_DIR=$out DMD=${pathToDmd} DFLAGS="-version=TZDatabaseDir -version=LibcurlPath -J$(pwd)"
+      cd ..
+  '';
+
+  doCheck = true;
+
+  checkPhase = ''
+    cd dmd
+    make -j$NIX_BUILD_CORES -C test -f Makefile PIC=1 CC=$CXX DMD=${pathToDmd} BUILD=release SHELL=$SHELL
+    cd ../druntime
+    make -j$NIX_BUILD_CORES -f posix.mak unittest PIC=1 DMD=${pathToDmd} BUILD=release
+    cd ../phobos
+    make -j$NIX_BUILD_CORES -f posix.mak unittest BUILD=release ENABLE_RELEASE=1 PIC=1 DMD=${pathToDmd} DFLAGS="-version=TZDatabaseDir -version=LibcurlPath -J$(pwd)"
+    cd ..
+  '';
+
+  installPhase = ''
+      cd dmd
+      mkdir $out
+      mkdir $out/bin
+      cp ${pathToDmd} $out/bin
+
+      mkdir -p $out/share/man/man1
+      mkdir -p $out/share/man/man5
+      cp -r docs/man/man1/* $out/share/man/man1/
+      cp -r docs/man/man5/* $out/share/man/man5/
+
+      cd ../druntime
+      mkdir $out/include
+      mkdir $out/include/dmd
+      cp -r import/* $out/include/dmd
+
+      cd ../phobos
+      mkdir $out/lib
+      cp generated/${osname}/release/${bits}/libphobos2.* $out/lib
+
+      cp -r std $out/include/dmd
+      cp -r etc $out/include/dmd
+
+      wrapProgram $out/bin/dmd \
+          --prefix PATH ":" "${targetPackages.stdenv.cc}/bin" \
+          --set-default CC "${targetPackages.stdenv.cc}/bin/cc"
+
+      substitute ${dmdConfFile} "$out/bin/dmd.conf" --subst-var out
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Official reference compiler for the D language";
+    homepage = "http://dlang.org/";
+    # Everything is now Boost licensed, even the backend.
+    # https://github.com/dlang/dmd/pull/6680
+    license = licenses.boost;
+    maintainers = with maintainers; [ ThomasMader lionello ];
+    platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/dotnet/buildDotnet.nix b/nixpkgs/pkgs/development/compilers/dotnet/buildDotnet.nix
new file mode 100644
index 000000000000..20abc1c78b9a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dotnet/buildDotnet.nix
@@ -0,0 +1,74 @@
+{ type
+, version
+, sha512
+}:
+assert builtins.elem type [ "aspnetcore" "netcore" "sdk"];
+{ stdenv
+, fetchurl
+, libunwind
+, openssl
+, icu
+, libuuid
+, zlib
+, curl
+}: 
+let pname = if type == "aspnetcore" then "aspnetcore-runtime" else if type == "netcore" then "dotnet-runtime" else "dotnet-sdk";
+    platform = if stdenv.isDarwin then "osx" else "linux";
+    suffix = {
+      x86_64-linux  = "x64";
+      aarch64-linux = "arm64";
+      x86_64-darwin = "x64";
+    }."${stdenv.hostPlatform.system}" or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+    urls = {
+        aspnetcore = "https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/${version}/${pname}-${version}-${platform}-${suffix}.tar.gz";
+        netcore = "https://dotnetcli.azureedge.net/dotnet/Runtime/${version}/${pname}-${version}-${platform}-${suffix}.tar.gz";
+        sdk = "https://dotnetcli.azureedge.net/dotnet/Sdk/${version}/${pname}-${version}-${platform}-${suffix}.tar.gz";
+    };
+    descriptions = {
+        aspnetcore = "ASP .NET Core runtime ${version}";
+        netcore = ".NET Core runtime ${version}";
+        sdk = ".NET SDK ${version}";
+    };
+in stdenv.mkDerivation rec {
+    inherit pname version;
+
+    rpath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc libunwind libuuid icu openssl zlib curl ];
+
+    src = fetchurl {
+        url = builtins.getAttr type urls;
+        sha512 = sha512."${stdenv.hostPlatform.system}"  or (throw "Missing hash for host system: ${stdenv.hostPlatform.system}");
+    };
+
+    sourceRoot = ".";
+
+    dontPatchELF = true;
+    noDumpEnvVars = true;
+
+    installPhase = ''
+        runHook preInstall
+        mkdir -p $out/bin
+        cp -r ./ $out
+        ln -s $out/dotnet $out/bin/dotnet
+        runHook postInstall
+    '';
+
+    postFixup = stdenv.lib.optionalString stdenv.isLinux ''
+        patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" $out/dotnet
+        patchelf --set-rpath "${rpath}" $out/dotnet
+        find $out -type f -name "*.so" -exec patchelf --set-rpath '$ORIGIN:${rpath}' {} \;
+        find $out -type f -name "apphost" -exec patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" --set-rpath '$ORIGIN:${rpath}' {} \;
+    '';
+
+    doInstallCheck = true;
+    installCheckPhase = ''
+        $out/bin/dotnet --info
+    '';
+
+    meta = with stdenv.lib; {
+        homepage = "https://dotnet.github.io/";
+        description = builtins.getAttr type descriptions;
+        platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
+        maintainers = with maintainers; [ kuznero ];
+        license = licenses.mit;
+    };
+}
diff --git a/nixpkgs/pkgs/development/compilers/dotnet/combinePackages.nix b/nixpkgs/pkgs/development/compilers/dotnet/combinePackages.nix
new file mode 100644
index 000000000000..00fb7c6d9b41
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dotnet/combinePackages.nix
@@ -0,0 +1,20 @@
+packages:
+{ buildEnv, lib }:
+let cli = builtins.head packages;
+in
+assert lib.assertMsg ((builtins.length packages) != 0)
+    ''You must include at least one package, e.g
+      `with dotnetCorePackages; combinePackages {
+          packages = [ sdk_3_0 aspnetcore_2_1 ];
+       };`'' ;
+  buildEnv {
+    name = "dotnet-core-combined";
+    paths = packages;
+    pathsToLink = [ "/host" "/packs" "/sdk" "/shared" "/templates" ];
+    ignoreCollisions = true;
+    postBuild = ''
+      cp ${cli}/dotnet $out/dotnet
+      mkdir $out/bin
+      ln -s $out/dotnet $out/bin/
+    '';
+  }
diff --git a/nixpkgs/pkgs/development/compilers/dotnet/default.nix b/nixpkgs/pkgs/development/compilers/dotnet/default.nix
new file mode 100644
index 000000000000..dd1510548a3c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dotnet/default.nix
@@ -0,0 +1,105 @@
+/*
+How to combine packages for use in development:
+dotnetCombined = with dotnetCorePackages; combinePackages [ sdk_3_1 sdk_2_2 sdk_3_0 sdk aspnetcore_2_1 ];
+*/
+{ callPackage }:
+let
+  buildDotnet = attrs: callPackage (import ./buildDotnet.nix attrs) {};
+  buildAspNetCore = attrs: buildDotnet (attrs // { type = "aspnetcore"; });
+  buildNetCore = attrs: buildDotnet (attrs // { type = "netcore"; });
+  buildNetCoreSdk = attrs: buildDotnet (attrs // { type = "sdk"; });
+in
+rec {
+  combinePackages = attrs: callPackage (import ./combinePackages.nix attrs) {};
+
+  # v2.1.15 (LTS)
+
+  aspnetcore_2_1 = buildAspNetCore {
+    version = "2.1.16";
+    sha512 = {
+      x86_64-linux = "0awdzi8dysbg8xcy4l8wx2sb8gaaklphmwv61qxh7dj6ih4nla34l02xdax1l8nw41znnnqzsa77avglnrz36pckm9mc52m7wc7877h";
+      aarch64-linux = null; # no aarch64 version of this package is available
+      x86_64-darwin = "1psqqpin4hipr2hzfp79712d6cag892jx4fx5001nlsynwrdq3vi4liakz4yz41rvk0jyd7f07z90wj97xlxyrqiqcc1fdbgn2q0px9";
+    };
+  };
+
+  netcore_2_1 = buildNetCore {
+    version = "2.1.16";
+    sha512 = {
+      x86_64-linux = "07vvmza32hsblpw4zpcksm2gicy4agh0d1fwradqj16y6xbh3frdp87mqgbj5m54mmyfp5bc8c46v1w6dfm1w3y80v2y46aynild45l";
+      aarch64-linux = "27ab982vz9rn2vzpq68dqfzhryfixq3s0apx7vi0cwiray3scgfmf45fm7qj63k9mvaqnk5g69i339109yasw3q5vpvpyjc1ykbi710";
+      x86_64-darwin = "2pxqpcw3djr18m0y124fbd6pz4lb5brlgvpvd9pdirkpsar8dmipsrhxcsk0d902zyxzgj1ac1ygzxsz49xvrkmh6s1m3w5fk8fws2f";
+    };
+  };
+
+  sdk_2_1 = buildNetCoreSdk {
+    version = "2.1.804";
+    sha512 = {
+      x86_64-linux = "1kbzxcdgyvs94kkm6ikr1j0p0k3zq30d10sl69ig0rgbqbqm4rpqi6dq94jjbw7q3jlwz83vgq3549q38d2s9kalmzv9lmddn2kkc42";
+      aarch64-linux = "2d97xvhxnkdgghqlichkwdxxh641dzkd9hq5xgffgvbqv1qsh31k9yib2q1nsarpnbx0d758bdn2jm2wvsj7nx0gpxlb3nab0b3hc2g";
+      x86_64-darwin = "0fjn18vizgfdbziklhgppnvka5iw2hb4pfi6047i46il8ydb6z1m40cflq436sdf07sivi0mnldg9247qvqrl6f078w3fwnh3bwlac8";
+    };
+  };
+
+  # v2.2
+
+  sdk_2_2 = throw "Dotnet SDK 2.2 is EOL, please use 3.1";
+
+  # v3.0.2 (Maintenance)
+
+  aspnetcore_3_0 = buildAspNetCore {
+    version = "3.0.3";
+    sha512 = {
+      x86_64-linux = "342v6kxxbxky09d1c392vvr9rm30lf75wccka1bk2h4advlcga5nlgv93g7vrq48bsyxfi5gc36r3b0dlwl1g409g5mlk1042n6d0yq";
+      aarch64-linux = "2xkg4q88q5jw6jdz6cxj8vsjr475nd0fcvifkv1shdm2j9dsjy233hwpxbr140m5n5ggyh6z99238z9j4kp2az977y8y8irz8m8ppvf";
+      x86_64-darwin = "2p04j6p4j93pan71ih13hv57zxalcirh0n3vfjq0cfb80pbhf1f5cgxl24pw6kifh6hhh38rj62c4mr69lxzlqc8sfcfaws8dyz2avm";
+    };
+  };
+
+  netcore_3_0 = buildNetCore {
+    version = "3.0.3";
+    sha512 = {
+      x86_64-linux = "32ykpcw2xx708r2lxcwcbxnmy4sk159rlfjfvkw990qh7n79pm3lm2qwa3zhqcslznmpg18kwxz8qb5fgsa0h49g843xx4kyai0n7rx";
+      aarch64-linux = "1lp8din7d5jv5fkyq1a7m01i1xg9jwpiljvam1kcyzsnwzvi0cb4ji336cfx4lqrn95gvc75gkzi6q8b4fz0h21gvk6z6kmlcr63nyg";
+      x86_64-darwin = "0s20k7xawwd09xhy4xdcxp1rw6jd418ibrvhb509dnj480g48xryda2203g4mpswd24v2kx0n9qzxgbrbq9lvasfglkxi84bbqayp83";
+    };
+  };
+
+  sdk_3_0 = buildNetCoreSdk {
+    version = "3.0.103";
+    sha512 = {
+      x86_64-linux = "2diiplgxs92fkb6ym68b02d79z4qn63x5qlky5lvr757c1zkh0vfpk3khawdg94kdn4qkn6dmyqr0msxqgmiqyhp63cadzqq4vx7b12";
+      aarch64-linux = "32843q2lj7dgciq62g9v1q31vwfjyv5vaxrz712d942mcg5lyzjygwri106bv4naq3a22131ldzwnsifbdn2vq1iz60raqdb7ss9vnf";
+      x86_64-darwin = "3apswk2bhalgi0hm7h2j9p152jvp39h4xilxxzix5j1n36b442l1pwk7lj7019lxafjqkz5y850xkfcp14ks5wcvs33xs2c0aqwxvcn";
+    };
+  };
+
+  # v3.1.1 (LTS)
+
+  aspnetcore_3_1 = buildAspNetCore {
+    version = "3.1.2";
+    sha512 = {
+      x86_64-linux = "27708bk5liz8r39p4dzs41clgq298d49g8ipzdj56pz613vkfyv7bp91666ydz36aazm265j2g9ji3sk1f9kbgv6024zwrly5w9vqrm";
+      aarch64-linux = "2sm5yf376w5dm0za3gbcj251kc909fmlasmlyn70zhqp2jiii075vcqh40racjlwlhsfydx32cw7kgnv238lad5mw5jxy143zql5xl3";
+      x86_64-darwin = "311sihjzg0x5inyrz0px29jikxcibd6l56xfdmxkncgwaikf3663x10dfl246qhz8v0f3lvg2vndgp5icbaqrp8awsnrhsl0vi5d7fh";
+    };
+  };
+
+  netcore_3_1 = buildNetCore {
+    version = "3.1.2";
+    sha512 = {
+      x86_64-linux = "3zwg1anrcni9kagmjxn485bpjvb146hkm7irmikq3v879gjhd2fgpscg226ds83l4pxll3r7lwris6ij952xmy8lsqraapd9111ba14";
+      aarch64-linux = "3hf61d5adlfffy51627ypp36qc5r55g9xwgfxqd0c7vj9bqmpiph673bvqqpr189df9shxr21p94cwrc5n36z72a37vw4ic8ks2yayx";
+      x86_64-darwin = "35flr1p5zpcd77mjsl6qy9ipxc5k9j6pk7ca6mnvqqjf0r3agm3qf8cs5fbraprvkwj8fha3giwbp5xir6050fbb374375idn9x12d8";
+    };
+  };
+
+  sdk_3_1 = buildNetCoreSdk {
+    version = "3.1.102";
+    sha512 = {
+      x86_64-linux = "0lmz8ac5j0i4zcq4904kr6qibvyjcm2ckfg27kqyqfii00qmm80xb5sk3i7f06xqkbgkrqkbg9rsldk75akw6m5dxg932j602bxrb4w";
+      aarch64-linux = "34k6cm69gxm7vcd9m6bp47sdx96j32z6lfhb2vjcdznc6xgs2wy8zcang3b1mjm5919dq7v6iysm6ffcpgjhhphy7prlnaqa69q5mks";
+      x86_64-darwin = "00xs87zj94v6yr6xs294bficp6lxpghyfswhnwqfkx62jy80qr5fa2y7s10ich3cbm2daa8dby56iizdvi7rnlvp23gfkq12gq4w1g8";
+    };
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/dtc/default.nix b/nixpkgs/pkgs/development/compilers/dtc/default.nix
new file mode 100644
index 000000000000..b7fcbe1c611d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/dtc/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, lib, fetchgit, flex, bison, pkgconfig, which
+, pythonSupport ? false, python, swig
+}:
+
+stdenv.mkDerivation rec {
+  pname = "dtc";
+  version = "1.6.0";
+
+  src = fetchgit {
+    url = "https://git.kernel.org/pub/scm/utils/dtc/dtc.git";
+    rev = "refs/tags/v${version}";
+    sha256 = "0li992wwd7kgy71bikanqky49y4hq3p3vx35p2hvyxy1k0wfy7i8";
+  };
+
+  nativeBuildInputs = [ flex bison pkgconfig which ] ++ lib.optionals pythonSupport [ python swig ];
+  buildInputs = lib.optionals pythonSupport [ python ];
+
+  postPatch = ''
+    patchShebangs pylibfdt/
+  '';
+
+  makeFlags = [ "PYTHON=python" ];
+  installFlags = [ "INSTALL=install" "PREFIX=$(out)" "SETUP_PREFIX=$(out)" ];
+
+  meta = with lib; {
+    description = "Device Tree Compiler";
+    homepage = "https://git.kernel.org/cgit/utils/dtc/dtc.git";
+    license = licenses.gpl2; # dtc itself is GPLv2, libfdt is dual GPL/BSD
+    maintainers = [ maintainers.dezgeg ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/ecl/16.1.2.nix b/nixpkgs/pkgs/development/compilers/ecl/16.1.2.nix
new file mode 100644
index 000000000000..a7b2aa6be748
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ecl/16.1.2.nix
@@ -0,0 +1,84 @@
+{ stdenv, fetchurl, fetchpatch
+, libtool, autoconf, automake
+, gmp, mpfr, libffi, makeWrapper
+, noUnicode ? false
+, gcc
+, threadSupport ? false
+, useBoehmgc ? true, boehmgc
+}:
+
+assert useBoehmgc -> boehmgc != null;
+
+let
+  s = # Generated upstream information
+  rec {
+    baseName="ecl";
+    version="16.1.2";
+    name="${baseName}-${version}";
+    url="https://common-lisp.net/project/ecl/static/files/release/ecl-16.1.2.tgz";
+    sha256="16ab8qs3awvdxy8xs8jy82v8r04x4wr70l9l2j45vgag18d2nj1d";
+  };
+  buildInputs = [
+    libtool autoconf automake makeWrapper
+  ];
+  propagatedBuildInputs = [
+    libffi gmp mpfr gcc
+  ] ++ stdenv.lib.optionals useBoehmgc [
+    # replaces ecl's own gc which other packages can depend on, thus propagated
+    boehmgc
+  ];
+in
+stdenv.mkDerivation {
+  inherit (s) name version;
+  inherit buildInputs propagatedBuildInputs;
+
+  src = fetchurl {
+    inherit (s) url sha256;
+  };
+
+  configureFlags = [
+    (if threadSupport then "--enable-threads" else "--disable-threads")
+    "--with-gmp-prefix=${gmp.dev}"
+    "--with-libffi-prefix=${libffi.dev}"
+    ]
+    ++
+    (stdenv.lib.optional (! noUnicode)
+      "--enable-unicode")
+    ;
+
+  patches = [
+    (fetchpatch {
+      # Avoid infinite loop, see https://gitlab.com/embeddable-common-lisp/ecl/issues/43 (fixed upstream)
+      name = "avoid-infinite-loop.patch";
+      url = "https://gitlab.com/embeddable-common-lisp/ecl/commit/caba1989f40ef917e7486f41b9cd5c7e3c5c2d79.patch";
+      sha256 = "07vw91psbc9gdn8grql46ra8lq3bgkzg5v480chnbryna4sv6lbb";
+    })
+    (fetchpatch {
+      # Fix getcwd with long pathnames
+      # Rebased version of
+      # https://gitlab.com/embeddable-common-lisp/ecl/commit/ac5f011f57a85a38627af154bc3ee7580e7fecd4.patch
+      name = "getcwd.patch";
+      url = "https://git.sagemath.org/sage.git/plain/build/pkgs/ecl/patches/16.1.2-getcwd.patch?id=07d6c37d18811e2b377a9689790a7c5e24da16ba";
+      sha256 = "1fbi8gn7rv8nqff5mpaijsrch3k3z7qc5cn4h1vl8qrr8xwqlqhb";
+    })
+    ./ecl-1.16.2-libffi-3.3-abi.patch
+  ];
+
+  hardeningDisable = [ "format" ];
+
+  postInstall = ''
+    sed -e 's/@[-a-zA-Z_]*@//g' -i $out/bin/ecl-config
+    wrapProgram "$out/bin/ecl" \
+      --prefix PATH ':' "${gcc}/bin" \
+      --prefix NIX_LDFLAGS ' ' "-L${gmp.lib or gmp.out or gmp}/lib" \
+      --prefix NIX_LDFLAGS ' ' "-L${libffi.lib or libffi.out or libffi}/lib"
+  '';
+
+  meta = {
+    inherit (s) version;
+    description = "Lisp implementation aiming to be small, fast and easy to embed";
+    license = stdenv.lib.licenses.mit ;
+    maintainers = [stdenv.lib.maintainers.raskin];
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/ecl/default.nix b/nixpkgs/pkgs/development/compilers/ecl/default.nix
new file mode 100644
index 000000000000..65f6884cd558
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ecl/default.nix
@@ -0,0 +1,70 @@
+{stdenv, fetchurl
+, libtool, autoconf, automake
+, gmp, mpfr, libffi, makeWrapper
+, noUnicode ? false
+, gcc
+, threadSupport ? true
+, useBoehmgc ? false, boehmgc
+}:
+let
+  s = # Generated upstream information
+  rec {
+    baseName="ecl";
+    version="16.1.3";
+    name="${baseName}-${version}";
+    hash="0m0j24w5d5a9dwwqyrg0d35c0nys16ijb4r0nyk87yp82v38b9bn";
+    url="https://common-lisp.net/project/ecl/static/files/release/ecl-16.1.3.tgz";
+    sha256="0m0j24w5d5a9dwwqyrg0d35c0nys16ijb4r0nyk87yp82v38b9bn";
+  };
+  buildInputs = [
+    libtool autoconf automake makeWrapper
+  ];
+  propagatedBuildInputs = [
+    libffi gmp mpfr gcc
+    # replaces ecl's own gc which other packages can depend on, thus propagated
+  ] ++ stdenv.lib.optionals useBoehmgc [
+    # replaces ecl's own gc which other packages can depend on, thus propagated
+    boehmgc
+  ];
+in
+stdenv.mkDerivation {
+  inherit (s) name version;
+  inherit buildInputs propagatedBuildInputs;
+
+  src = fetchurl {
+    inherit (s) url sha256;
+  };
+
+  patches = [
+    ./libffi-3.3-abi.patch
+  ];
+
+  configureFlags = [
+    (if threadSupport then "--enable-threads" else "--disable-threads")
+    "--with-gmp-prefix=${gmp.dev}"
+    "--with-libffi-prefix=${libffi.dev}"
+    ]
+    ++
+    (stdenv.lib.optional (! noUnicode)
+      "--enable-unicode")
+    ;
+
+  hardeningDisable = [ "format" ];
+
+  postInstall = ''
+    sed -e 's/@[-a-zA-Z_]*@//g' -i $out/bin/ecl-config
+    wrapProgram "$out/bin/ecl" \
+      --prefix PATH ':' "${gcc}/bin" \
+      --prefix NIX_LDFLAGS ' ' "-L${gmp.lib or gmp.out or gmp}/lib" \
+      --prefix NIX_LDFLAGS ' ' "-L${libffi.lib or libffi.out or libffi}/lib"
+  '';
+
+  meta = {
+    inherit (s) version;
+    description = "Lisp implementation aiming to be small, fast and easy to embed";
+    homepage = "https://common-lisp.net/project/ecl/";
+    license = stdenv.lib.licenses.mit ;
+    maintainers = [stdenv.lib.maintainers.raskin];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/ecl/default.upstream b/nixpkgs/pkgs/development/compilers/ecl/default.upstream
new file mode 100644
index 000000000000..eeb82cbfcab1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ecl/default.upstream
@@ -0,0 +1,2 @@
+url https://common-lisp.net/project/ecl/
+version_link '[.]tgz$'
diff --git a/nixpkgs/pkgs/development/compilers/ecl/ecl-1.16.2-libffi-3.3-abi.patch b/nixpkgs/pkgs/development/compilers/ecl/ecl-1.16.2-libffi-3.3-abi.patch
new file mode 100644
index 000000000000..28dd7d0805b3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ecl/ecl-1.16.2-libffi-3.3-abi.patch
@@ -0,0 +1,15 @@
+diff --git a/src/c/ffi.d b/src/c/ffi.d
+index 8861303e..8a959c23 100644
+--- a/src/c/ffi.d
++++ b/src/c/ffi.d
+@@ -145,8 +145,8 @@ static struct {
+ #elif defined(X86_WIN64)
+         {@':win64', FFI_WIN64},
+ #elif defined(X86_ANY) || defined(X86) || defined(X86_64)
+-        {@':cdecl', FFI_SYSV},
+-        {@':sysv', FFI_SYSV},
++        {@':cdecl', FFI_UNIX64},
++        {@':sysv', FFI_UNIX64},
+         {@':unix64', FFI_UNIX64},
+ #endif
+ };
diff --git a/nixpkgs/pkgs/development/compilers/ecl/libffi-3.3-abi.patch b/nixpkgs/pkgs/development/compilers/ecl/libffi-3.3-abi.patch
new file mode 100644
index 000000000000..0a2b5f4dd568
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ecl/libffi-3.3-abi.patch
@@ -0,0 +1,15 @@
+diff --git a/src/c/ffi.d b/src/c/ffi.d
+index 8174977a..caa69f39 100644
+--- a/src/c/ffi.d
++++ b/src/c/ffi.d
+@@ -133,8 +133,8 @@ static struct {
+ #elif defined(X86_WIN64)
+   {@':win64', FFI_WIN64},
+ #elif defined(X86_ANY) || defined(X86) || defined(X86_64)
+-  {@':cdecl', FFI_SYSV},
+-  {@':sysv', FFI_SYSV},
++  {@':cdecl', FFI_UNIX64},
++  {@':sysv', FFI_UNIX64},
+   {@':unix64', FFI_UNIX64},
+ #endif
+ };
diff --git a/nixpkgs/pkgs/development/compilers/edk2/default.nix b/nixpkgs/pkgs/development/compilers/edk2/default.nix
new file mode 100644
index 000000000000..8a18b6306c27
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/edk2/default.nix
@@ -0,0 +1,108 @@
+{
+  stdenv,
+  clangStdenv,
+  fetchgit,
+  fetchpatch,
+  libuuid,
+  python3,
+  iasl,
+  bc,
+  clang_9,
+  llvmPackages_9,
+  overrideCC,
+  lib,
+}:
+
+let
+  pythonEnv = python3.withPackages (ps: [ps.tkinter]);
+
+targetArch = if stdenv.isi686 then
+  "IA32"
+else if stdenv.isx86_64 then
+  "X64"
+else if stdenv.isAarch64 then
+  "AARCH64"
+else
+  throw "Unsupported architecture";
+
+buildStdenv = if stdenv.isDarwin then
+  overrideCC clangStdenv [ clang_9 llvmPackages_9.llvm llvmPackages_9.lld ]
+else
+  stdenv;
+
+buildType = if stdenv.isDarwin then
+    "CLANGPDB"
+  else
+    "GCC5";
+
+edk2 = buildStdenv.mkDerivation {
+  pname = "edk2";
+  version = "201911";
+
+  # submodules
+  src = fetchgit {
+    url = "https://github.com/tianocore/edk2";
+    rev = "edk2-stable${edk2.version}";
+    sha256 = "1rmvb4w043v25cppsqxqrpzqqcay3yrzsrhhzm2q9bncrj56vm8q";
+  };
+
+  buildInputs = [ libuuid pythonEnv ];
+
+  makeFlags = [ "-C BaseTools" ]
+    ++ lib.optional (stdenv.cc.isClang) [ "BUILD_CC=clang BUILD_CXX=clang++ BUILD_AS=clang" ];
+
+  NIX_CFLAGS_COMPILE = "-Wno-return-type" + lib.optionalString (stdenv.cc.isGNU) " -Wno-error=stringop-truncation";
+
+  hardeningDisable = [ "format" "fortify" ];
+
+  installPhase = ''
+    mkdir -vp $out
+    mv -v BaseTools $out
+    mv -v edksetup.sh $out
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    description = "Intel EFI development kit";
+    homepage = "https://sourceforge.net/projects/edk2/";
+    license = licenses.bsd2;
+    platforms = [ "x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin" ];
+  };
+
+  passthru = {
+    mkDerivation = projectDscPath: attrs: buildStdenv.mkDerivation ({
+      inherit (edk2) src;
+
+      buildInputs = [ bc pythonEnv ] ++ attrs.buildInputs or [];
+
+      prePatch = ''
+        rm -rf BaseTools
+        ln -sv ${edk2}/BaseTools BaseTools
+      '';
+
+      configurePhase = ''
+        runHook preConfigure
+        export WORKSPACE="$PWD"
+        . ${edk2}/edksetup.sh BaseTools
+        runHook postConfigure
+      '';
+
+      buildPhase = ''
+        runHook preBuild
+        build -a ${targetArch} -b RELEASE -t ${buildType} -p ${projectDscPath} -n $NIX_BUILD_CORES $buildFlags
+        runHook postBuild
+      '';
+
+      installPhase = ''
+        runHook preInstall
+        mv -v Build/*/* $out
+        runHook postInstall
+      '';
+    } // removeAttrs attrs [ "buildInputs" ]);
+  };
+};
+
+in
+
+edk2
diff --git a/nixpkgs/pkgs/development/compilers/eli/default.nix b/nixpkgs/pkgs/development/compilers/eli/default.nix
new file mode 100644
index 000000000000..61e5fd70a7c6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/eli/default.nix
@@ -0,0 +1,91 @@
+{ stdenv
+, fetchurl
+, symlinkJoin
+, makeWrapper
+, tcl
+, fontconfig
+, tk
+, ncurses
+, xorg
+, file
+}:
+
+let
+  # eli derives the location of the include folder from the location of the lib folder
+  tk_combined = symlinkJoin {
+    name = "tk_combined";
+    paths = [
+      tk
+      tk.dev
+    ];
+  };
+  curses_combined = symlinkJoin {
+    name = "curses_combined";
+    paths = [
+      ncurses
+      ncurses.dev
+    ];
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "eli";
+  version = "4.8.1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/eli-project/Eli/Eli%20${version}/${pname}-${version}.tar.bz2";
+    sha256="1vran8583hbwrr5dciji4zkhz3f88w4mn8n9sdpr6zw0plpf1whj";
+  };
+
+  buildInputs = [
+    ncurses
+    fontconfig
+  ] ++ (with xorg; [
+    libX11.dev
+    libXt.dev
+    libXaw.dev
+    libXext.dev
+  ]);
+
+  nativeBuildInputs = [
+    file
+    makeWrapper
+  ];
+
+  # skip interactive browser check
+  buildFlags = [ "nobrowsers" ];
+
+
+  preConfigure=''
+    configureFlagsArray=(
+      --with-tcltk="${tcl} ${tk_combined}"
+      --with-curses="${curses_combined}"
+    )
+    export ODIN_LOCALIPC=1
+  '';
+
+  postInstall = ''
+    wrapProgram "$out/bin/eli" \
+      --set ODIN_LOCALIPC 1
+  '';
+
+  # Test if eli starts
+  doInstallCheck = true;
+  installCheckPhase = ''
+    export HOME="$TMP/home"
+    mkdir -p "$HOME"
+    $out/bin/eli "!ls"
+  '';
+
+  meta = {
+    description = "Translator Construction Made Easy";
+    longDescription = ''
+      Eli is a programming environment that supports all phases of translator
+      construction with extensive libraries implementing common tasks, yet handling
+      arbitrary special cases. Output is the C subset of C++.
+    '';
+    homepage = "http://eli-project.sourceforge.net/";
+    license = stdenv.lib.licenses.gpl2;
+    maintainers = with stdenv.lib.maintainers; [ timokau ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/elm/README.md b/nixpkgs/pkgs/development/compilers/elm/README.md
new file mode 100644
index 000000000000..f0254d0f9547
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/README.md
@@ -0,0 +1,24 @@
+# To update Elm:
+
+Modify revision in ./update.sh and run it
+
+# Notes about the build process:
+
+The elm binary embeds a piece of pre-compiled elm code, used by 'elm
+reactor'. This means that the build process for 'elm' effectively
+executes 'elm make'. that in turn expects to retrieve the elm
+dependencies of that code (elm/core, etc.) from
+package.elm-lang.org, as well as a cached bit of metadata
+(versions.dat).
+
+The makeDotElm function lets us retrieve these dependencies in the
+standard nix way. we have to copy them in (rather than symlink) and
+make them writable because the elm compiler writes other .dat files
+alongside the source code. versions.dat was produced during an
+impure build of this same code; the build complains that it can't
+update this cache, but continues past that warning.
+
+Finally, we set ELM_HOME to point to these pre-fetched artifacts so
+that the default of ~/.elm isn't used.
+
+More: https://blog.hercules-ci.com/elm/2019/01/03/elm2nix-0.1/
diff --git a/nixpkgs/pkgs/development/compilers/elm/default.nix b/nixpkgs/pkgs/development/compilers/elm/default.nix
new file mode 100644
index 000000000000..625d7adab411
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/default.nix
@@ -0,0 +1,126 @@
+{ lib, stdenv, pkgs
+, haskell, nodejs
+, fetchurl, fetchpatch, makeWrapper, writeScriptBin }:
+let
+  fetchElmDeps = import ./fetchElmDeps.nix { inherit stdenv lib fetchurl; };
+
+  hsPkgs = haskell.packages.ghc883.override {
+    overrides = self: super: with haskell.lib;
+      let elmPkgs = rec {
+            elm = overrideCabal (self.callPackage ./packages/elm.nix { }) (drv: {
+              # sadly with parallelism most of the time breaks compilation
+              enableParallelBuilding = false;
+              preConfigure = self.fetchElmDeps {
+                elmPackages = (import ./packages/elm-srcs.nix);
+                elmVersion = drv.version;
+                registryDat = ./registry.dat;
+              };
+              buildTools = drv.buildTools or [] ++ [ makeWrapper ];
+              jailbreak = true;
+              postInstall = ''
+                wrapProgram $out/bin/elm \
+                  --prefix PATH ':' ${lib.makeBinPath [ nodejs ]}
+              '';
+            });
+
+            /*
+            The elm-format expression is updated via a script in the https://github.com/avh4/elm-format repo:
+            `package/nix/build.sh`
+            */
+            elm-format = justStaticExecutables (overrideCabal (self.callPackage ./packages/elm-format.nix {}) (drv: {
+              # GHC 8.8.3 support
+              # https://github.com/avh4/elm-format/pull/640
+              patches = [(
+                fetchpatch {
+                  url = "https://github.com/turboMaCk/elm-format/commit/4f4abdc7117ed6ce3335f6cf39b6495b48067b7c.patch";
+                  sha256 = "1zqk6q6w0ph12mnwffgwzf4h1hcgqg0v09ws9q2g5bg2riq4rvd9";
+                }
+              )];
+              # Tests are failing after upgrade to ghc881.
+              # Cause is probably just a minor change in stdout output
+              # see https://github.com/avh4/elm-format/pull/640
+              doCheck = false;
+              jailbreak = true;
+            }));
+
+            elmi-to-json = justStaticExecutables (overrideCabal (self.callPackage ./packages/elmi-to-json.nix {}) (drv: {
+              prePatch = ''
+                substituteInPlace package.yaml --replace "- -Werror" ""
+                hpack
+              '';
+              jailbreak = true;
+            }));
+
+            elm-instrument = justStaticExecutables (overrideCabal (self.callPackage ./packages/elm-instrument.nix {}) (drv: {
+              prePatch = ''
+                sed "s/desc <-.*/let desc = \"${drv.version}\"/g" Setup.hs --in-place
+              '';
+              jailbreak = true;
+              # Tests are failing because of missing instances for Eq and Show type classes
+              doCheck = false;
+            }));
+
+            inherit fetchElmDeps;
+            elmVersion = elmPkgs.elm.version;
+          };
+      in elmPkgs // {
+        inherit elmPkgs;
+
+        # Needed for elm-format
+        indents = self.callPackage ./packages/indents.nix {};
+      };
+  };
+
+  /*
+  Node/NPM based dependecies can be upgraded using script
+  `packages/generate-node-packages.sh`.
+  Packages which rely on `bin-wrap` will fail by default
+  and can be patched using `patchBinwrap` function defined in `packages/patch-binwrap.nix`.
+  */
+  elmNodePackages =
+    let
+      nodePkgs = import ./packages/node-composition.nix {
+          inherit nodejs pkgs;
+          inherit (stdenv.hostPlatform) system;
+        };
+    in with hsPkgs.elmPkgs; {
+      elm-test = patchBinwrap [elmi-to-json] nodePkgs.elm-test;
+      elm-verify-examples = patchBinwrap [elmi-to-json] nodePkgs.elm-verify-examples;
+      elm-coverage =
+        let patched = patchBinwrap [elmi-to-json] nodePkgs.elm-coverage;
+        in patched.override {
+          preRebuild = ''
+            sed 's/\"install\".*/\"install\":\"echo no-op\"/g' --in-place package.json
+
+            # This should not be needed (thanks to binwrap* being nooped) but for some reason it still needs to be done
+            # in case of just this package
+            sed 's/\"install\".*/\"install\":\"echo no-op\",/g' --in-place node_modules/elmi-to-json/package.json
+
+            rm node_modules/elm/install.js
+            echo "console.log('no-op');" > node_modules/elm/install.js
+          '';
+
+          # Link Elm instrument binary
+          postInstall = patched.postInstall + ''
+            mkdir -p unpacked_bin
+            ln -sf ${elm-instrument}/bin/elm-instrument unpacked_bin/elm-instrument
+          '';
+        };
+
+      create-elm-app = patchBinwrap [elmi-to-json] (nodePkgs.create-elm-app.override {
+        preRebuild = ''
+          rm node_modules/elm/install.js
+          echo "console.log('no-op');" > node_modules/elm/install.js
+        '';
+      });
+
+      elm-language-server = nodePkgs."@elm-tooling/elm-language-server";
+
+      inherit (nodePkgs) elm-doc-preview elm-live elm-upgrade elm-xref elm-analyse;
+    };
+
+  patchBinwrap = import ./packages/patch-binwrap.nix { inherit lib writeScriptBin stdenv; };
+
+in hsPkgs.elmPkgs // elmNodePackages // {
+  lib = { inherit patchBinwrap; };
+}
diff --git a/nixpkgs/pkgs/development/compilers/elm/fetchElmDeps.nix b/nixpkgs/pkgs/development/compilers/elm/fetchElmDeps.nix
new file mode 100644
index 000000000000..05dffaa9e2eb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/fetchElmDeps.nix
@@ -0,0 +1,11 @@
+{stdenv, lib, fetchurl}:
+
+{elmPackages, registryDat, elmVersion}:
+
+let
+  makeDotElm = import ./makeDotElm.nix {inherit stdenv lib fetchurl registryDat;};
+
+in
+''
+  export ELM_HOME=`pwd`/.elm
+'' + (makeDotElm elmVersion elmPackages)
diff --git a/nixpkgs/pkgs/development/compilers/elm/makeDotElm.nix b/nixpkgs/pkgs/development/compilers/elm/makeDotElm.nix
new file mode 100644
index 000000000000..b8076d72e481
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/makeDotElm.nix
@@ -0,0 +1,35 @@
+{stdenv, lib, fetchurl, registryDat}:
+
+ver: deps:
+  let cmds = lib.mapAttrsToList (name: info: let
+               pkg = stdenv.mkDerivation {
+                 name = lib.replaceChars ["/"] ["-"] name + "-${info.version}";
+
+                 src = fetchurl {
+                   url = "https://github.com/${name}/archive/${info.version}.tar.gz";
+                   meta.homepage = "https://github.com/${name}/";
+                   inherit (info) sha256;
+                 };
+
+                 configurePhase = ''
+                   true
+                 '';
+
+                 buildPhase = ''
+                   true
+                 '';
+
+                 installPhase = ''
+                   mkdir -p $out
+                   cp -r * $out
+                 '';
+               };
+             in ''
+               mkdir -p .elm/${ver}/packages/${name}
+               cp -R ${pkg} .elm/${ver}/packages/${name}/${info.version}
+             '') deps;
+  in (lib.concatStrings cmds) + ''
+    mkdir -p .elm/${ver}/packages;
+    cp ${registryDat} .elm/${ver}/packages/registry.dat;
+    chmod -R +w .elm
+  ''
diff --git a/nixpkgs/pkgs/development/compilers/elm/packages/README.md b/nixpkgs/pkgs/development/compilers/elm/packages/README.md
new file mode 100644
index 000000000000..5b21736afc00
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/README.md
@@ -0,0 +1,25 @@
+# Elm packages
+
+Mixtures of useful Elm lang tooling containing both Haskell and Node.js based utilities.
+
+## Upgrades
+
+Haskell parts of the ecosystem are using [cabal2nix](https://github.com/NixOS/cabal2nix).
+Please refer to [nix documentation](https://nixos.org/nixpkgs/manual/#how-to-create-nix-builds-for-your-own-private-haskell-packages)
+and [cabal2nix readme](https://github.com/NixOS/cabal2nix#readme) for more information. Elm-format [update scripts](https://github.com/avh4/elm-format/tree/master/package/nix)
+is part of its repository.
+
+Node dependencies are defined in [node-packages.json](node-packages.json).
+[Node2nix](https://github.com/svanderburg/node2nix) is used for generating nix expression
+from this file. Use [generate-node-packages.sh](generate-node-packages.sh) for updates of nix expressions.
+
+## Binwrap Patch
+
+Some node packages might use [binwrap](https://github.com/avh4/binwrap) typically for installing
+[elmi-to-json](https://github.com/stoeffel/elmi-to-json). Binwrap is not compatible with nix.
+To overcome issues with those packages apply [patch-binwrap.nix](patch-binwrap.nix) which essentially does 2 things.
+
+1. It replaces binwrap scripts with noop shell scripts
+2. It uses nix for installing the binaries to expected location in `node_modules`
+
+Example usage be found in `elm/default.nix`.
diff --git a/nixpkgs/pkgs/development/compilers/elm/packages/elm-format.nix b/nixpkgs/pkgs/development/compilers/elm/packages/elm-format.nix
new file mode 100644
index 000000000000..e498b4b1494f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/elm-format.nix
@@ -0,0 +1,40 @@
+{ mkDerivation, fetchgit, ansi-terminal, ansi-wl-pprint, base, binary
+, bytestring, cmark, containers, directory, filepath, free, HUnit
+, indents, json, mtl, optparse-applicative, parsec, process
+, QuickCheck, quickcheck-io, split, stdenv, tasty, tasty-golden
+, tasty-hunit, tasty-quickcheck, text
+}:
+mkDerivation {
+  pname = "elm-format";
+  version = "0.8.3";
+  src = fetchgit {
+    url = "https://github.com/avh4/elm-format";
+    sha256 = "0n6lrqj6mq044hdyraj3ss5cg74dn8k4z05xmwn2apjpm146iaw8";
+    rev = "b97e3593d564a1e069c0a022da8cbd98ca2c5a4b";
+  };
+  postPatch = ''
+    mkdir -p ./generated
+    cat <<EOHS > ./generated/Build_elm_format.hs
+    module Build_elm_format where
+
+    gitDescribe :: String
+    gitDescribe = "0.8.3"
+    EOHS
+  '';
+  isLibrary = false;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    ansi-terminal ansi-wl-pprint base binary bytestring containers
+    directory filepath free indents json mtl optparse-applicative
+    parsec process split text
+  ];
+  executableHaskellDepends = [ base ];
+  testHaskellDepends = [
+    base cmark containers HUnit mtl parsec QuickCheck quickcheck-io
+    split tasty tasty-golden tasty-hunit tasty-quickcheck text
+  ];
+  doHaddock = false;
+  homepage = "https://elm-lang.org";
+  description = "A source code formatter for Elm";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/nixpkgs/pkgs/development/compilers/elm/packages/elm-instrument.nix b/nixpkgs/pkgs/development/compilers/elm/packages/elm-instrument.nix
new file mode 100644
index 000000000000..4d7efcf1083b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/elm-instrument.nix
@@ -0,0 +1,34 @@
+{ mkDerivation, ansi-terminal, ansi-wl-pprint, base, binary
+, bytestring, Cabal, cmark, containers, directory, elm-format
+, fetchgit, filepath, free, HUnit, indents, json, mtl
+, optparse-applicative, parsec, process, QuickCheck, quickcheck-io
+, split, stdenv, tasty, tasty-golden, tasty-hunit, tasty-quickcheck
+, text
+}:
+mkDerivation {
+  pname = "elm-instrument";
+  version = "0.0.7";
+  src = fetchgit {
+    url = "https://github.com/zwilias/elm-instrument";
+    sha256 = "167d7l2547zxdj7i60r6vazznd9ichwc0bqckh3vrh46glkz06jv";
+    rev = "63e15bb5ec5f812e248e61b6944189fa4a0aee4e";
+    fetchSubmodules = true;
+  };
+  isLibrary = true;
+  isExecutable = true;
+  setupHaskellDepends = [ base Cabal directory filepath process ];
+  libraryHaskellDepends = [
+    ansi-terminal ansi-wl-pprint base binary bytestring containers
+    directory filepath free indents json mtl optparse-applicative
+    parsec process split text
+  ];
+  executableHaskellDepends = [ base ];
+  testHaskellDepends = [
+    base cmark containers elm-format HUnit mtl parsec QuickCheck
+    quickcheck-io split tasty tasty-golden tasty-hunit tasty-quickcheck
+    text
+  ];
+  homepage = "https://elm-lang.org";
+  description = "Instrumentation library for Elm";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/nixpkgs/pkgs/development/compilers/elm/packages/elm-srcs.nix b/nixpkgs/pkgs/development/compilers/elm/packages/elm-srcs.nix
new file mode 100644
index 000000000000..0d4523b8b098
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/elm-srcs.nix
@@ -0,0 +1,72 @@
+{
+
+      "elm-explorations/markdown" = {
+        sha256 = "0k3110ixa4wwf3vkkdplagwah9ypr965qxr1y147rnsc1xsxmr6y";
+        version = "1.0.0";
+      };
+
+      "elm/json" = {
+        sha256 = "1a107nmm905dih4w4mjjkkpdcjbgaf5qjvr7fl30kkpkckfjjnrw";
+        version = "1.1.2";
+      };
+
+      "elm/html" = {
+        sha256 = "1n3gpzmpqqdsldys4ipgyl1zacn0kbpc3g4v3hdpiyfjlgh8bf3k";
+        version = "1.0.0";
+      };
+
+      "elm/svg" = {
+        sha256 = "1cwcj73p61q45wqwgqvrvz3aypjyy3fw732xyxdyj6s256hwkn0k";
+        version = "1.0.1";
+      };
+
+      "elm/project-metadata-utils" = {
+        sha256 = "1d4rd4grrnbdvj9gf00h7dr6hbkjzawgkzpizfrkp1z1pyr3mvq9";
+        version = "1.0.0";
+      };
+
+      "elm/browser" = {
+        sha256 = "1zlmx672glg7fdgkvh5jm47y85pv7pdfr5mkhg6x7ar6k000vyka";
+        version = "1.0.1";
+      };
+
+      "elm/core" = {
+        sha256 = "1l0qdbczw91kzz8sx5d5zwz9x662bspy7p21dsr3f2rigxiix2as";
+        version = "1.0.2";
+      };
+
+      "elm/http" = {
+        sha256 = "008bs76mnp48b4dw8qwjj4fyvzbxvlrl4xpa2qh1gg2kfwyw56v1";
+        version = "2.0.0";
+      };
+
+      "elm/bytes" = {
+        sha256 = "040d7irrawcbnq9jxhzx8p9qacdlw5bncy6lgndd6inm53rvvwbp";
+        version = "1.0.7";
+      };
+
+      "elm/file" = {
+        sha256 = "15vw1ilbg0msimq2k9magwigp8lwqrgvz3vk6qia6b3ldahvw8jr";
+        version = "1.0.1";
+      };
+
+      "elm/parser" = {
+        sha256 = "0a3cxrvbm7mwg9ykynhp7vjid58zsw03r63qxipxp3z09qks7512";
+        version = "1.1.0";
+      };
+
+      "elm/url" = {
+        sha256 = "0av8x5syid40sgpl5vd7pry2rq0q4pga28b4yykn9gd9v12rs3l4";
+        version = "1.0.0";
+      };
+
+      "elm/time" = {
+        sha256 = "0vch7i86vn0x8b850w1p69vplll1bnbkp8s383z7pinyg94cm2z1";
+        version = "1.0.0";
+      };
+
+      "elm/virtual-dom" = {
+        sha256 = "0q1v5gi4g336bzz1lgwpn5b1639lrn63d8y6k6pimcyismp2i1yg";
+        version = "1.0.2";
+      };
+}
diff --git a/nixpkgs/pkgs/development/compilers/elm/packages/elm.nix b/nixpkgs/pkgs/development/compilers/elm/packages/elm.nix
new file mode 100644
index 000000000000..644a53fd6190
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/elm.nix
@@ -0,0 +1,31 @@
+{ mkDerivation, ansi-terminal, ansi-wl-pprint, base, binary
+, bytestring, containers, directory, edit-distance, fetchgit
+, file-embed, filelock, filepath, ghc-prim, haskeline, HTTP
+, http-client, http-client-tls, http-types, language-glsl, mtl
+, network, parsec, process, raw-strings-qq, scientific, SHA
+, snap-core, snap-server, stdenv, template-haskell, time
+, unordered-containers, utf8-string, vector, zip-archive
+}:
+mkDerivation {
+  pname = "elm";
+  version = "0.19.1";
+  src = fetchgit {
+    url = "https://github.com/elm/compiler";
+    sha256 = "1rdg3xp3js9xadclk3cdypkscm5wahgsfmm4ldcw3xswzhw6ri8w";
+    rev = "c9aefb6230f5e0bda03205ab0499f6e4af924495";
+    fetchSubmodules = true;
+  };
+  isLibrary = false;
+  isExecutable = true;
+  executableHaskellDepends = [
+    ansi-terminal ansi-wl-pprint base binary bytestring containers
+    directory edit-distance file-embed filelock filepath ghc-prim
+    haskeline HTTP http-client http-client-tls http-types language-glsl
+    mtl network parsec process raw-strings-qq scientific SHA snap-core
+    snap-server template-haskell time unordered-containers utf8-string
+    vector zip-archive
+  ];
+  homepage = "https://elm-lang.org";
+  description = "The `elm` command line interface";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/nixpkgs/pkgs/development/compilers/elm/packages/elmi-to-json.nix b/nixpkgs/pkgs/development/compilers/elm/packages/elmi-to-json.nix
new file mode 100644
index 000000000000..eaed18c5297b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/elmi-to-json.nix
@@ -0,0 +1,27 @@
+{ mkDerivation, aeson, base, binary, bytestring, containers
+, directory, fetchgit, filepath, ghc-prim, hpack
+, optparse-applicative, stdenv, text, unliftio
+, unordered-containers
+}:
+mkDerivation {
+  pname = "elmi-to-json";
+  version = "1.3.0";
+  src = fetchgit {
+    url = "https://github.com/stoeffel/elmi-to-json";
+    sha256 = "11j56vcyhijkwi9hzggkwwmxlhzhgm67ab2m7kxkhcbbqgpasa8n";
+    rev = "ae40d1aa1e3d6878f2af514e611d44890e7abc1e";
+    fetchSubmodules = true;
+  };
+  isLibrary = true;
+  isExecutable = true;
+  libraryHaskellDepends = [
+    aeson base binary bytestring containers directory filepath ghc-prim
+    optparse-applicative text unliftio unordered-containers
+  ];
+  libraryToolDepends = [ hpack ];
+  executableHaskellDepends = [ base ];
+  testHaskellDepends = [ base ];
+  prePatch = "hpack";
+  homepage = "https://github.com/stoeffel/elmi-to-json#readme";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/nixpkgs/pkgs/development/compilers/elm/packages/generate-node-packages.sh b/nixpkgs/pkgs/development/compilers/elm/packages/generate-node-packages.sh
new file mode 100755
index 000000000000..343721208b89
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/generate-node-packages.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+
+ROOT="$(realpath "$(dirname -- "$(readlink -f -- "${BASH_SOURCE[0]}")")"/../../../../..)"
+
+set -eu -o pipefail
+
+rm -f node-env.nix
+$(nix-build $ROOT -A nodePackages.node2nix --no-out-link)/bin/node2nix \
+    --nodejs-10 \
+    -i node-packages.json \
+    -o node-packages.nix \
+    -c node-composition.nix \
+    --no-copy-node-env -e ../../../node-packages/node-env.nix
diff --git a/nixpkgs/pkgs/development/compilers/elm/packages/indents.nix b/nixpkgs/pkgs/development/compilers/elm/packages/indents.nix
new file mode 100644
index 000000000000..6bf7fa7890e8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/indents.nix
@@ -0,0 +1,11 @@
+{ mkDerivation, base, concatenative, mtl, parsec, stdenv }:
+mkDerivation {
+  pname = "indents";
+  version = "0.3.3";
+  sha256 = "b61f51ac894609cb5571cc3ded12db5de97185a8de236c69ec24c87457109f9a";
+  libraryHaskellDepends = [ base concatenative mtl parsec ];
+  doCheck = false;
+  homepage = "http://patch-tag.com/r/salazar/indents";
+  description = "indentation sensitive parser-combinators for parsec";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/nixpkgs/pkgs/development/compilers/elm/packages/node-composition.nix b/nixpkgs/pkgs/development/compilers/elm/packages/node-composition.nix
new file mode 100644
index 000000000000..4add754b5999
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/node-composition.nix
@@ -0,0 +1,17 @@
+# This file has been generated by node2nix 1.8.0. Do not edit!
+
+{pkgs ? import <nixpkgs> {
+    inherit system;
+  }, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-10_x"}:
+
+let
+  nodeEnv = import ../../../node-packages/node-env.nix {
+    inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile;
+    inherit nodejs;
+    libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
+  };
+in
+import ./node-packages.nix {
+  inherit (pkgs) fetchurl fetchgit;
+  inherit nodeEnv;
+}
\ No newline at end of file
diff --git a/nixpkgs/pkgs/development/compilers/elm/packages/node-packages.json b/nixpkgs/pkgs/development/compilers/elm/packages/node-packages.json
new file mode 100644
index 000000000000..29d00ef23ecc
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/node-packages.json
@@ -0,0 +1,12 @@
+[
+    "elm-analyse",
+    "elm-coverage",
+    "elm-doc-preview",
+    "@elm-tooling/elm-language-server",
+    "elm-live",
+    "elm-test",
+    "elm-upgrade",
+    "elm-verify-examples",
+    "elm-xref",
+    "create-elm-app"
+]
diff --git a/nixpkgs/pkgs/development/compilers/elm/packages/node-packages.nix b/nixpkgs/pkgs/development/compilers/elm/packages/node-packages.nix
new file mode 100644
index 000000000000..ba1190750432
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/node-packages.nix
@@ -0,0 +1,14995 @@
+# This file has been generated by node2nix 1.8.0. Do not edit!
+
+{nodeEnv, fetchurl, fetchgit, globalBuildInputs ? []}:
+
+let
+  sources = {
+    "@babel/cli-7.2.3" = {
+      name = "_at_babel_slash_cli";
+      packageName = "@babel/cli";
+      version = "7.2.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/cli/-/cli-7.2.3.tgz";
+        sha512 = "1h5r08pml55n7xvbgqp701sdr9mz4dykd0aj055qgpwk7rmpvq6c6ac24k3x0q6a0iy5szdd66qq73zhkvk8mwq1jkmw9g6p7vxmybd";
+      };
+    };
+    "@babel/code-frame-7.0.0" = {
+      name = "_at_babel_slash_code-frame";
+      packageName = "@babel/code-frame";
+      version = "7.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz";
+        sha512 = "1n9xn1d8d9ai52qv1n1q1a521hrwi2akjlj4lsidm8xr6hbnx1akh3h2lxnl73mwhix4cv2x5iff3m22r4jvpdnygmpb4lsx6wvdw1r";
+      };
+    };
+    "@babel/code-frame-7.8.3" = {
+      name = "_at_babel_slash_code-frame";
+      packageName = "@babel/code-frame";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz";
+        sha512 = "3d85pd9lfbm8yrlpn6wj9g56snbnpr9fx0w1b9x26jbirc2xfrvnifwzprp0f6bhqijshgm0q35axic8d11v4j0kq493dapcyk33n3b";
+      };
+    };
+    "@babel/core-7.3.4" = {
+      name = "_at_babel_slash_core";
+      packageName = "@babel/core";
+      version = "7.3.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/core/-/core-7.3.4.tgz";
+        sha512 = "2n2a167ki533xdbc8n9n3hqa5m3ykxxc8g5p7wn111bgrr9jj7xw2km0dmbglvi5hf85nkb4v7q39l544y9rjnysx6xm8y1wnqjw6wd";
+      };
+    };
+    "@babel/generator-7.9.4" = {
+      name = "_at_babel_slash_generator";
+      packageName = "@babel/generator";
+      version = "7.9.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/generator/-/generator-7.9.4.tgz";
+        sha512 = "10dhzfcyh1jfi1436lwl0ic1z15x4rd0y1ih2n9j8fq7jss6vrbi0ka558wp7ag366hpixbsn59lsp68i6s3hmvhqpgmjw32rmgqcxf";
+      };
+    };
+    "@babel/helper-annotate-as-pure-7.8.3" = {
+      name = "_at_babel_slash_helper-annotate-as-pure";
+      packageName = "@babel/helper-annotate-as-pure";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.8.3.tgz";
+        sha512 = "19zxjzlr2w22hia04020h7cfgvc14ifv25ra5in7c3yi0l7w8r17xmvg62gqn538hpfm5nxq1bxcvn1fgzwxi5ybw2fmi21nqkad3za";
+      };
+    };
+    "@babel/helper-builder-binary-assignment-operator-visitor-7.8.3" = {
+      name = "_at_babel_slash_helper-builder-binary-assignment-operator-visitor";
+      packageName = "@babel/helper-builder-binary-assignment-operator-visitor";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.8.3.tgz";
+        sha512 = "2bhyq7n603yhsvhh8if76f9hspd8ywwfac3xbr01xhbk3qglspkw54w34vasds8ngn1vbi8gl2fbplc8g231mqx8swg455jcjdlxqg5";
+      };
+    };
+    "@babel/helper-create-regexp-features-plugin-7.8.8" = {
+      name = "_at_babel_slash_helper-create-regexp-features-plugin";
+      packageName = "@babel/helper-create-regexp-features-plugin";
+      version = "7.8.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.8.tgz";
+        sha512 = "2mfpciziyvm031vs1rlwyk7861w57k8bl0dxzsq4iqw70klb81lrili086xx973ksc24jdm1fcyn17zvp9dnlgdyyblhh1b15vlz19d";
+      };
+    };
+    "@babel/helper-define-map-7.8.3" = {
+      name = "_at_babel_slash_helper-define-map";
+      packageName = "@babel/helper-define-map";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.8.3.tgz";
+        sha512 = "3z4d17xj2zhm7zk023hs0w9wydxpw5np319d6rlkllcc2zqnxws3m4wdl9lav0chq3p54rfwcmdqqq99qbfp7brnxf6nr38vii831ry";
+      };
+    };
+    "@babel/helper-explode-assignable-expression-7.8.3" = {
+      name = "_at_babel_slash_helper-explode-assignable-expression";
+      packageName = "@babel/helper-explode-assignable-expression";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.8.3.tgz";
+        sha512 = "0iz6s1cb2asrb2iv9kblqv7zdqljaq278iydlnwdrvy4w730nb68c3rzf181w4scfmgmzgc0ykkkj4nkimipgdkxmw3samzrrdixvrp";
+      };
+    };
+    "@babel/helper-function-name-7.8.3" = {
+      name = "_at_babel_slash_helper-function-name";
+      packageName = "@babel/helper-function-name";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz";
+        sha512 = "0w35m1kq2dmsgdgjxvpmg6gxm1rzl1jqf23h3k7pwh9nmwsmqbgv0rzy7fs6dq31dqq6j17bwyww0091r41aj0rl3zi1nj2a1gn0b04";
+      };
+    };
+    "@babel/helper-get-function-arity-7.8.3" = {
+      name = "_at_babel_slash_helper-get-function-arity";
+      packageName = "@babel/helper-get-function-arity";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz";
+        sha512 = "12g2gjipd8svg02d12iqbf0rz4m99g36qccn3f81xij3ac4f7kqzx0407xma49h11j88iz8jil2whj7j96wqpwd67abi23xczwd2l0m";
+      };
+    };
+    "@babel/helper-hoist-variables-7.8.3" = {
+      name = "_at_babel_slash_helper-hoist-variables";
+      packageName = "@babel/helper-hoist-variables";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.8.3.tgz";
+        sha512 = "110zw1xx11769dn6nmx1nrl4afckadg5rb4kbnyn717kyyfprvhvz9q4483ziwjk7502k0bl9kzpxv1c56bfr7cfd94n3fwx0n4jbck";
+      };
+    };
+    "@babel/helper-member-expression-to-functions-7.8.3" = {
+      name = "_at_babel_slash_helper-member-expression-to-functions";
+      packageName = "@babel/helper-member-expression-to-functions";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz";
+        sha512 = "123n860dm1xyq93wl0qjc6025awwl14371k9glbv23dvh5vdgnssi0ck7jj75lffxswv1pcdamcaqlqqqhsvkrn2q8dkfiwmy109vkw";
+      };
+    };
+    "@babel/helper-module-imports-7.8.3" = {
+      name = "_at_babel_slash_helper-module-imports";
+      packageName = "@babel/helper-module-imports";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz";
+        sha512 = "0m3mnvpihbbzmv12qzlpms63wlv1krvd9v6m2r3cga0xyvi6aj40fz8vq9yp6cz3qiw6g8iwp6ax20lzagsbr6w2b0cd9m973g72h27";
+      };
+    };
+    "@babel/helper-module-transforms-7.9.0" = {
+      name = "_at_babel_slash_helper-module-transforms";
+      packageName = "@babel/helper-module-transforms";
+      version = "7.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.9.0.tgz";
+        sha512 = "30gcd0pfjswf9s036nznz9znhb9dwbkzxdb1dyrzvv50vaiyi844s04492jww141ai1k927wx29dly9q1dcc9618g4gg910xp5clnyh";
+      };
+    };
+    "@babel/helper-optimise-call-expression-7.8.3" = {
+      name = "_at_babel_slash_helper-optimise-call-expression";
+      packageName = "@babel/helper-optimise-call-expression";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz";
+        sha512 = "0fs3wpyfm9fmnarclkhbj2c5y1b3hnsjm00myhq6nmmmfap9b12a0vg3ryf0pp9396aawx0rmvq1ymj16hnpp7i0avb6w9sgz93da19";
+      };
+    };
+    "@babel/helper-plugin-utils-7.8.3" = {
+      name = "_at_babel_slash_helper-plugin-utils";
+      packageName = "@babel/helper-plugin-utils";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz";
+        sha512 = "1jj9ibj72hqv1qm4hvdnk728fi9mihrwhq0xcs2qlxbs8iz9d2zb4a23sm7ny0s42asrdyy2s98shgnqm0rhn2314k6pcyxspiymrwg";
+      };
+    };
+    "@babel/helper-regex-7.8.3" = {
+      name = "_at_babel_slash_helper-regex";
+      packageName = "@babel/helper-regex";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.8.3.tgz";
+        sha512 = "18s59gjlmhr59fb91klimh3l4r3xha8mmddi7iz7ssf3jlz3r4j8fmlqmvjv5c98y1nwgzr7xmg0zvj3n9h23p76lzwiz9gsr178sq5";
+      };
+    };
+    "@babel/helper-remap-async-to-generator-7.8.3" = {
+      name = "_at_babel_slash_helper-remap-async-to-generator";
+      packageName = "@babel/helper-remap-async-to-generator";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.8.3.tgz";
+        sha512 = "360dpccwg08h484w138qxqzsq6lwhgp90cmmhsa309drgwi1wd9h463b728cfcip3jyagx3kwdfiyj723lhxf04av00w2hz1sdh634j";
+      };
+    };
+    "@babel/helper-replace-supers-7.8.6" = {
+      name = "_at_babel_slash_helper-replace-supers";
+      packageName = "@babel/helper-replace-supers";
+      version = "7.8.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz";
+        sha512 = "0acgcd28lns7vqyj6s66c00yghxy6kk70iifxmd0yyb229mj4k3nlz0pjavalakn8x1izq5sngznn59iw9c1mwcgzbgyjiqs2nh1qrx";
+      };
+    };
+    "@babel/helper-simple-access-7.8.3" = {
+      name = "_at_babel_slash_helper-simple-access";
+      packageName = "@babel/helper-simple-access";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.8.3.tgz";
+        sha512 = "05xs5m527nwqh8qq916v0yad41rnwm9px7134xh2v13sc4bpygi5vngly5yw9bih573q1l7kxhhkdj358glvhpvwah2aw3r7h799lal";
+      };
+    };
+    "@babel/helper-split-export-declaration-7.8.3" = {
+      name = "_at_babel_slash_helper-split-export-declaration";
+      packageName = "@babel/helper-split-export-declaration";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz";
+        sha512 = "1sgm6wd88kmizvig5m0ims97vmlylfii72xcw4k01h2wsw3cpc312s1asnjrq5y472hcqfh2mwn8dwpqkpcvs0ssqwnz1c1xhwz47fz";
+      };
+    };
+    "@babel/helper-validator-identifier-7.9.0" = {
+      name = "_at_babel_slash_helper-validator-identifier";
+      packageName = "@babel/helper-validator-identifier";
+      version = "7.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz";
+        sha512 = "0gx4vkhiijg7fwwjybwryz8ilwr56ziamj68fnzmam13lbgspdjal8s742nmsc7p84nl87y9sanmd7ywq84wzzmw0gym1yfm101nvz8";
+      };
+    };
+    "@babel/helper-wrap-function-7.8.3" = {
+      name = "_at_babel_slash_helper-wrap-function";
+      packageName = "@babel/helper-wrap-function";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.8.3.tgz";
+        sha512 = "08jncd536l4pg9svm19ksyfadg2c0sxd06zgb4ssdgz04vkm5ybb8x9fvn41i04a9pr7p02vbnzwgkqqip91yin1w8dfkq4nnnqj01c";
+      };
+    };
+    "@babel/helpers-7.9.2" = {
+      name = "_at_babel_slash_helpers";
+      packageName = "@babel/helpers";
+      version = "7.9.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/helpers/-/helpers-7.9.2.tgz";
+        sha512 = "2j2k8r3s6hwlqg3whjxhsm1cpg030hylh2gimbxvi89f5w4s9j6z525hllf11mrgzcc11zsnlvqhczzgl0zyp2gg6y36gnmap7fy0i7";
+      };
+    };
+    "@babel/highlight-7.9.0" = {
+      name = "_at_babel_slash_highlight";
+      packageName = "@babel/highlight";
+      version = "7.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz";
+        sha512 = "2qmdx9wdiv4yy36dc1ljghwd45kq6bhsddcbps8qznsrwvg3zjir6pb7nsfg4ypqrq6z2zif0ysjmwybpqp5xpz6rvymv2pbj54z5ll";
+      };
+    };
+    "@babel/parser-7.9.4" = {
+      name = "_at_babel_slash_parser";
+      packageName = "@babel/parser";
+      version = "7.9.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/parser/-/parser-7.9.4.tgz";
+        sha512 = "0fa6q1spz676yd7fadv1k2ki32yskai2zvzg7i3gwqc98n1082zsg6gb2f3d6rrvm53d73i9zlgcww2g343hq48alzxvs6psni3sbkc";
+      };
+    };
+    "@babel/plugin-proposal-async-generator-functions-7.8.3" = {
+      name = "_at_babel_slash_plugin-proposal-async-generator-functions";
+      packageName = "@babel/plugin-proposal-async-generator-functions";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.8.3.tgz";
+        sha512 = "0rwwfjlp32i4bvax3zzcx990wylgr57wr6x9p6cdf2y145q8b5hjmrgr507d3sgpzmg565c8bzv6ipd44hsyg0vvqarpw1qzwp777rm";
+      };
+    };
+    "@babel/plugin-proposal-json-strings-7.8.3" = {
+      name = "_at_babel_slash_plugin-proposal-json-strings";
+      packageName = "@babel/plugin-proposal-json-strings";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.8.3.tgz";
+        sha512 = "3ahyf2462nwk892y4fa4dpzksln13c50zpwkwn0620d98zbs12mwabdx76mmmjrndqxmlka5zivazxq602nrlf8zh328m6kklsm0s18";
+      };
+    };
+    "@babel/plugin-proposal-object-rest-spread-7.9.0" = {
+      name = "_at_babel_slash_plugin-proposal-object-rest-spread";
+      packageName = "@babel/plugin-proposal-object-rest-spread";
+      version = "7.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.0.tgz";
+        sha512 = "2ik5r2xl569yrh5l5qdh8q3vd18n7c3wfb92xfl8jx57dzvlqn0ypbjyhd8rgv3xp9rj9rinqkvbjf1zvbvp96bdz1qgaz3lszq22jj";
+      };
+    };
+    "@babel/plugin-proposal-optional-catch-binding-7.8.3" = {
+      name = "_at_babel_slash_plugin-proposal-optional-catch-binding";
+      packageName = "@babel/plugin-proposal-optional-catch-binding";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.8.3.tgz";
+        sha512 = "1vxbchc54810whpqi4s5v4v86r30k8cnplwl8krkwj5f29nh1pf91ldlh1v7yfhyczxi1bamlzmxjlga1aw5p6pqd00py64kvn1f2fj";
+      };
+    };
+    "@babel/plugin-proposal-unicode-property-regex-7.8.8" = {
+      name = "_at_babel_slash_plugin-proposal-unicode-property-regex";
+      packageName = "@babel/plugin-proposal-unicode-property-regex";
+      version = "7.8.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.8.tgz";
+        sha512 = "3qaz0kiybhl1f774kv904b7c168i2q3ajpw6ygk4h5llxjlbpk0lr5inzfml5f7y4g0yykzqr1pfbcbfqn5kiwpypq14vi9qdb66n0i";
+      };
+    };
+    "@babel/plugin-syntax-async-generators-7.8.4" = {
+      name = "_at_babel_slash_plugin-syntax-async-generators";
+      packageName = "@babel/plugin-syntax-async-generators";
+      version = "7.8.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz";
+        sha512 = "0vr768w42hfh5r9hz6rqmx5gh8d6phcx615miv2dyhp68g5w3yy9b24c0i8a340bgv2m9jpd5snjldrsx9mwny4hjqrcz8635kjc9xp";
+      };
+    };
+    "@babel/plugin-syntax-json-strings-7.8.3" = {
+      name = "_at_babel_slash_plugin-syntax-json-strings";
+      packageName = "@babel/plugin-syntax-json-strings";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz";
+        sha512 = "08g9zcfg8k58q0bki8ar2b26fadfmmcc3v4znspy4bg0f16mxa5hqqldcc1js74jxcwq45x3q2jx4baq1mf3r3bgglgh7jnd9sa93lm";
+      };
+    };
+    "@babel/plugin-syntax-object-rest-spread-7.8.3" = {
+      name = "_at_babel_slash_plugin-syntax-object-rest-spread";
+      packageName = "@babel/plugin-syntax-object-rest-spread";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz";
+        sha512 = "2a9vg6b6p2rfhcflic2w6rbrbiqrdgj4ra2q20g1qv6ncwmvja2jq8snygwfw1ll1k94rqnbj4hc1fpizgr1v35rfvxqvwr6658r2jy";
+      };
+    };
+    "@babel/plugin-syntax-optional-catch-binding-7.8.3" = {
+      name = "_at_babel_slash_plugin-syntax-optional-catch-binding";
+      packageName = "@babel/plugin-syntax-optional-catch-binding";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz";
+        sha512 = "3frbi2r4lw5ba5mik8ms5bmzw9kc43s4gs39kfxq1jrcmhi4bjnanxch5jb390g7jw3v8a0d28pw81jagja32j6qgm995imyz8c6lz9";
+      };
+    };
+    "@babel/plugin-transform-arrow-functions-7.8.3" = {
+      name = "_at_babel_slash_plugin-transform-arrow-functions";
+      packageName = "@babel/plugin-transform-arrow-functions";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.8.3.tgz";
+        sha512 = "338cllyizyzn9jldb8b19zzc0kzkrdw37rapvkr7sqw32my3zad5sm4vcbg0bvxkfjna8f7xp4fqb1xn0jlr25vfpwa24mwl3w4bi6h";
+      };
+    };
+    "@babel/plugin-transform-async-to-generator-7.8.3" = {
+      name = "_at_babel_slash_plugin-transform-async-to-generator";
+      packageName = "@babel/plugin-transform-async-to-generator";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.8.3.tgz";
+        sha512 = "1alfn84kb2xm5fra8p2zwplf243ncwh74ax888krbhm66ffn9xmaa5ndmlcgqia375zfxrh8fx2jy797wif9pd0wwnqixn3aas7sswa";
+      };
+    };
+    "@babel/plugin-transform-block-scoped-functions-7.8.3" = {
+      name = "_at_babel_slash_plugin-transform-block-scoped-functions";
+      packageName = "@babel/plugin-transform-block-scoped-functions";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.8.3.tgz";
+        sha512 = "2d0kvarza8mnbqfkyl1xbq32vrr2140a73ixv3qh9qmb1pgnnw678x6mpc8yhlzw6vix3gp6falg48h6swjg6pcsz0kdamhwzc0b3my";
+      };
+    };
+    "@babel/plugin-transform-block-scoping-7.8.3" = {
+      name = "_at_babel_slash_plugin-transform-block-scoping";
+      packageName = "@babel/plugin-transform-block-scoping";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.8.3.tgz";
+        sha512 = "3mp8c45pg6kwvci67fndm7k631ab4799di740limmwb7lrch9c9ma8r743lg6dhw7ail9pas486wybc77dqknrf8qc1hdfidrzdhsd4";
+      };
+    };
+    "@babel/plugin-transform-classes-7.9.2" = {
+      name = "_at_babel_slash_plugin-transform-classes";
+      packageName = "@babel/plugin-transform-classes";
+      version = "7.9.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.9.2.tgz";
+        sha512 = "0qnwdi6360a4j2yifxl76d3plhldndy1p4qnswanbr6ldsc3vllbq22h4majaa5jqg7qfxxhagabrwy154s6nd0nb9gpcgkngfsjbac";
+      };
+    };
+    "@babel/plugin-transform-computed-properties-7.8.3" = {
+      name = "_at_babel_slash_plugin-transform-computed-properties";
+      packageName = "@babel/plugin-transform-computed-properties";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.8.3.tgz";
+        sha512 = "36fk87d811md1xxgp154k5i7389qwlibklymq8p5frx64628jaybqvxjjg49y7z5fp201n1820n8ddm633xjl4l85mnff5jjhi6561v";
+      };
+    };
+    "@babel/plugin-transform-destructuring-7.8.8" = {
+      name = "_at_babel_slash_plugin-transform-destructuring";
+      packageName = "@babel/plugin-transform-destructuring";
+      version = "7.8.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.8.8.tgz";
+        sha512 = "0jl5irg4ra9nwbdqzcbi4kyhwd1sah1f8z3ikw5pmdpj79rn1n7hc3f7xxjizf2x3qd6jagzjiihpbd6x1ksq972innpbinbghnw4kr";
+      };
+    };
+    "@babel/plugin-transform-dotall-regex-7.8.3" = {
+      name = "_at_babel_slash_plugin-transform-dotall-regex";
+      packageName = "@babel/plugin-transform-dotall-regex";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.8.3.tgz";
+        sha512 = "0ihnh0bfa5fb3m5wpd5m2nb837kahwcyrzz70x9rs8968qrqf7x6379kgw95l2rpyzmns2589ncr9brh1z5qlc70llc9q37sf7kbfwh";
+      };
+    };
+    "@babel/plugin-transform-duplicate-keys-7.8.3" = {
+      name = "_at_babel_slash_plugin-transform-duplicate-keys";
+      packageName = "@babel/plugin-transform-duplicate-keys";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.8.3.tgz";
+        sha512 = "08ww1bysk4r4s47pp58pw2pdx2f2kxxykdwx1kdsiqgb0z2v0pbfl2d1ni4gcq5g2cmvr8y52zq4sjqdv0lif4liahb8w8v2n44gixk";
+      };
+    };
+    "@babel/plugin-transform-exponentiation-operator-7.8.3" = {
+      name = "_at_babel_slash_plugin-transform-exponentiation-operator";
+      packageName = "@babel/plugin-transform-exponentiation-operator";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.8.3.tgz";
+        sha512 = "26i4rkcf5lgs5ccx03swkk0kb1z9rjvqvjd7jizzch1ldj5m5s60fh3fxwmraj85b5w1l5y5zcpbi1mvb0r5nw9f0170vx6ijw2j0ng";
+      };
+    };
+    "@babel/plugin-transform-for-of-7.9.0" = {
+      name = "_at_babel_slash_plugin-transform-for-of";
+      packageName = "@babel/plugin-transform-for-of";
+      version = "7.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.9.0.tgz";
+        sha512 = "0aphbh180fndrdkpy3vvncgvjx7s260qvx2n6yyfsxprri5gwsz2yn4kf31k0nycwm92zfsss67fqf2nbgyhx1wr3lybh2cx9c2fc4m";
+      };
+    };
+    "@babel/plugin-transform-function-name-7.8.3" = {
+      name = "_at_babel_slash_plugin-transform-function-name";
+      packageName = "@babel/plugin-transform-function-name";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.8.3.tgz";
+        sha512 = "04hzrww1ccdhk8gg5g89zxd90paqsfsxxv2d0jld3sr5lxbkhqnwi6hwp27w58cm3hi0qljwr3ilbgkdwpkzy9rdsgliw5v6jfcxvxc";
+      };
+    };
+    "@babel/plugin-transform-literals-7.8.3" = {
+      name = "_at_babel_slash_plugin-transform-literals";
+      packageName = "@babel/plugin-transform-literals";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.8.3.tgz";
+        sha512 = "38bav1jy57qq8fikvzz2hlmay39i8xg3s12vw1gx3nmm23bxf9dm7h5690700z8mldgc9dxx10sx7z7sgj9fijpgb9ixa3zjbq9yfnx";
+      };
+    };
+    "@babel/plugin-transform-modules-amd-7.9.0" = {
+      name = "_at_babel_slash_plugin-transform-modules-amd";
+      packageName = "@babel/plugin-transform-modules-amd";
+      version = "7.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.9.0.tgz";
+        sha512 = "3wj8qylkfbb2mmi5s3r72yh654s27cqc97lcyi3llr15nw93ynf0sh7grakfihh2ihpxx9yr3icfwrfsx2wpjfc7dw1vp1lbl60765x";
+      };
+    };
+    "@babel/plugin-transform-modules-commonjs-7.9.0" = {
+      name = "_at_babel_slash_plugin-transform-modules-commonjs";
+      packageName = "@babel/plugin-transform-modules-commonjs";
+      version = "7.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.0.tgz";
+        sha512 = "3rag3vbizrryxgh63crd9b5j9dan0hwnkxzzh0ag6rq6g1jl61bs4bkirlr0mbx2q1wz2ld4ipvh5rc1i9yh2aq98w2manap6n44fdb";
+      };
+    };
+    "@babel/plugin-transform-modules-systemjs-7.9.0" = {
+      name = "_at_babel_slash_plugin-transform-modules-systemjs";
+      packageName = "@babel/plugin-transform-modules-systemjs";
+      version = "7.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.9.0.tgz";
+        sha512 = "14zkvrxkxqyava1yschic2apfnpgjsxaizwk1aki9say2ksnj2256lfzgrsxi0f94ql35xikfdwx0kjb80y7clmv6fzp8ysz6zq1j0n";
+      };
+    };
+    "@babel/plugin-transform-modules-umd-7.9.0" = {
+      name = "_at_babel_slash_plugin-transform-modules-umd";
+      packageName = "@babel/plugin-transform-modules-umd";
+      version = "7.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.9.0.tgz";
+        sha512 = "16ys0wvmbpijqqi3yjfhgbcq0h79wgfbi9d2r2379bw6mmhpaqgps74byy16dj65z9p6h07x8hjijx084bh120l374hzdhm89ga8ddr";
+      };
+    };
+    "@babel/plugin-transform-named-capturing-groups-regex-7.8.3" = {
+      name = "_at_babel_slash_plugin-transform-named-capturing-groups-regex";
+      packageName = "@babel/plugin-transform-named-capturing-groups-regex";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.8.3.tgz";
+        sha512 = "2givr1pfhw82nf5drhqd5is8lyikd8njd0lgj9ixkikxllj8c1hd9nirxigd0yn0af62j6djh71sqixd2id76xh9qx4yg8mqpzlbsvz";
+      };
+    };
+    "@babel/plugin-transform-new-target-7.8.3" = {
+      name = "_at_babel_slash_plugin-transform-new-target";
+      packageName = "@babel/plugin-transform-new-target";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.8.3.tgz";
+        sha512 = "0bnq7wb7y55gsll55gvm7w1cdnplmn47sbdxfik4jvy1jayjlg2q4lig22ws8698pfcd8v3p6cq5bvimwnvlwhlgfqrqhlvr358dr22";
+      };
+    };
+    "@babel/plugin-transform-object-super-7.8.3" = {
+      name = "_at_babel_slash_plugin-transform-object-super";
+      packageName = "@babel/plugin-transform-object-super";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.8.3.tgz";
+        sha512 = "06hyil9pvnm5jg66c563cs62035ymbf52sn705wr4rpzl3wn5vly5sghlahrjl5xhw4b91yrrm964l0r0i267rsgb36zd08x29mgcg7";
+      };
+    };
+    "@babel/plugin-transform-parameters-7.9.3" = {
+      name = "_at_babel_slash_plugin-transform-parameters";
+      packageName = "@babel/plugin-transform-parameters";
+      version = "7.9.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.9.3.tgz";
+        sha512 = "09al69prgs8rs1fpkvk4a1grhcs2ggkcw80sq3bch8nybafpwfr9drxn8yhg0fyy98l7mwa0ihw5yvxibwb93ir7chn5vk910ax0fkz";
+      };
+    };
+    "@babel/plugin-transform-regenerator-7.8.7" = {
+      name = "_at_babel_slash_plugin-transform-regenerator";
+      packageName = "@babel/plugin-transform-regenerator";
+      version = "7.8.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.7.tgz";
+        sha512 = "2n9vklnwvsx5nl6p39n3x6ylby7p2l1ymrn9320ggbl2yp95dqfpzh3wlcjkvdswwfgd7zs85jpvqlk2av9kxv0bavlcrvq1603x22c";
+      };
+    };
+    "@babel/plugin-transform-runtime-7.3.4" = {
+      name = "_at_babel_slash_plugin-transform-runtime";
+      packageName = "@babel/plugin-transform-runtime";
+      version = "7.3.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.3.4.tgz";
+        sha512 = "0yb11rhnni08x0l9dhbzz8km2q4g33bpjixvq8hnyp1cghsib2h5xlqrvrl57x7m4h9lakrxd8hhc10cw68r58769wxf0gdxi301aix";
+      };
+    };
+    "@babel/plugin-transform-shorthand-properties-7.8.3" = {
+      name = "_at_babel_slash_plugin-transform-shorthand-properties";
+      packageName = "@babel/plugin-transform-shorthand-properties";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.8.3.tgz";
+        sha512 = "3rh55yhh4q4sy77lmf2cqpscb553j904j99jjfih53hxiz32hgil33ndvbsdxqw84p6g8dk4xs0q27jnhsnzwr1qiq95l30wzlcil13";
+      };
+    };
+    "@babel/plugin-transform-spread-7.8.3" = {
+      name = "_at_babel_slash_plugin-transform-spread";
+      packageName = "@babel/plugin-transform-spread";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.8.3.tgz";
+        sha512 = "3p85332hnhff55y3is8q3hvmq1jgr2dkypaz8ydyawhch6x56a2j28vw2aqxd2w7mbra8c2k9gz71k1ar8r4vcd702hm64vv59r6jqa";
+      };
+    };
+    "@babel/plugin-transform-sticky-regex-7.8.3" = {
+      name = "_at_babel_slash_plugin-transform-sticky-regex";
+      packageName = "@babel/plugin-transform-sticky-regex";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.8.3.tgz";
+        sha512 = "1dmlmw2s1fmy0jllpwqpkdcrlg9rlggm7gxbm0wc5091afpjr1rqmdvb192zqbbfxmcxlq6acndn1p7i9s5vnczw5dr03w2y796lapm";
+      };
+    };
+    "@babel/plugin-transform-template-literals-7.8.3" = {
+      name = "_at_babel_slash_plugin-transform-template-literals";
+      packageName = "@babel/plugin-transform-template-literals";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.8.3.tgz";
+        sha512 = "1qsqiwghf845xmas44mbh7vhhhqv08wfm8g9v7fq4yrwj3f14zvxlp0wc5hlhwzwbg4487dxhv597a42gkn839z2n5h68d4vh310vgk";
+      };
+    };
+    "@babel/plugin-transform-typeof-symbol-7.8.4" = {
+      name = "_at_babel_slash_plugin-transform-typeof-symbol";
+      packageName = "@babel/plugin-transform-typeof-symbol";
+      version = "7.8.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.4.tgz";
+        sha512 = "2mfnlkk7zxq37znqknq8z9wrk5g9r1zs2v1f21w1xnnqp69y5f0dcwclaw6khxbv13whzh27rn2b9wl85qamyy63rgy7glx65zb40nr";
+      };
+    };
+    "@babel/plugin-transform-unicode-regex-7.8.3" = {
+      name = "_at_babel_slash_plugin-transform-unicode-regex";
+      packageName = "@babel/plugin-transform-unicode-regex";
+      version = "7.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.8.3.tgz";
+        sha512 = "1kml3kqk32kcwg2snmk38k4xiisyim2nm4g0xji5h9pgzm2bgwad9ad85kddddqmldkc9i3qyrsf7ai8valp3gf8g96g68x6qkf1rzs";
+      };
+    };
+    "@babel/preset-env-7.3.4" = {
+      name = "_at_babel_slash_preset-env";
+      packageName = "@babel/preset-env";
+      version = "7.3.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.3.4.tgz";
+        sha512 = "203xg6r6imb5gaqxzk06ann6568pgn61398ygl79421ybxkj7xcpijxsvlnzd15zjypr20x9a43flg0mnih8bhdsa00gwqahdyjlv6s";
+      };
+    };
+    "@babel/runtime-7.3.4" = {
+      name = "_at_babel_slash_runtime";
+      packageName = "@babel/runtime";
+      version = "7.3.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/runtime/-/runtime-7.3.4.tgz";
+        sha512 = "3m5vxl1yg3z98wjmhhxyxdwmk2a10yj2dvh42zqvjfl43cwqw2ir57gimhwr7n820bs2w1n0z2575i233xqvd7bnmdb0s2jqyffzxr2";
+      };
+    };
+    "@babel/runtime-7.9.2" = {
+      name = "_at_babel_slash_runtime";
+      packageName = "@babel/runtime";
+      version = "7.9.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.2.tgz";
+        sha512 = "3sh2slrgff4njf77qzi5x2b8l2a2bksb8nfxzcfa0y4vq6g7jcz3vzl1p5kxg96ni206l0z4wvxzm45vr243pzrwv8nwz3fwys86k9l";
+      };
+    };
+    "@babel/template-7.8.6" = {
+      name = "_at_babel_slash_template";
+      packageName = "@babel/template";
+      version = "7.8.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/template/-/template-7.8.6.tgz";
+        sha512 = "0z8kzrpis50nr4vsyqr77cpqad0xfsacw45jdhwsl89mdzpvy8wcvc0kdy938kb0ll069plxhgy3a3fpag408ci2pb47gxzrhy2rcyd";
+      };
+    };
+    "@babel/traverse-7.9.0" = {
+      name = "_at_babel_slash_traverse";
+      packageName = "@babel/traverse";
+      version = "7.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/traverse/-/traverse-7.9.0.tgz";
+        sha512 = "3giz5rwk1g73w7f31fpnpf418bk0pkh05npk3vajnybyxhfxj7s5wcs4z1wlj8f055sxv24lspca5ia36cm2pgf3j9qb7x49y7m01lc";
+      };
+    };
+    "@babel/types-7.9.0" = {
+      name = "_at_babel_slash_types";
+      packageName = "@babel/types";
+      version = "7.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@babel/types/-/types-7.9.0.tgz";
+        sha512 = "2g85q87d2pq07ggy89zwnd847mlxig5blaapazf7940b8vjbff48l2digxcjfi3dg9vnrkv8n4yjz4j8s15nvhry5jk5kz4yllljbq5";
+      };
+    };
+    "@cnakazawa/watch-1.0.4" = {
+      name = "_at_cnakazawa_slash_watch";
+      packageName = "@cnakazawa/watch";
+      version = "1.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.4.tgz";
+        sha512 = "2hl7iz90jal2f27hgyb5rbmcp96p182xkmflyj5rsyqqffng8vkzz3fcjvbvcpdykij40ax4yirdc6p68yrmjvai7hr8y93mj20indz";
+      };
+    };
+    "@hapi/address-2.1.4" = {
+      name = "_at_hapi_slash_address";
+      packageName = "@hapi/address";
+      version = "2.1.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz";
+        sha512 = "1sqi7ls27blq5mlm1r1lbkpyyx347q67x6732qsxw0ms2cqxm814wqpfysa3c64ak47qcfmknk2xsjayi0myv1csr7pvcry162lyga0";
+      };
+    };
+    "@hapi/bourne-1.3.2" = {
+      name = "_at_hapi_slash_bourne";
+      packageName = "@hapi/bourne";
+      version = "1.3.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@hapi/bourne/-/bourne-1.3.2.tgz";
+        sha512 = "2jaj0r6ay5qf2ayzcsb02495kaxxdflks99g9k8ff9fi2qq8xns3f6vjiq4949af9gxjrzq6n7vxry55y3lskg2vm6ywlps7qflvmfm";
+      };
+    };
+    "@hapi/hoek-8.5.1" = {
+      name = "_at_hapi_slash_hoek";
+      packageName = "@hapi/hoek";
+      version = "8.5.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@hapi/hoek/-/hoek-8.5.1.tgz";
+        sha512 = "2ir1zjr8jp78q5v2sm9lh7w5vlb7spdynsy25ndaqgh78d6p9rvmvzc09pzbimbh04p06527jk00jwzadzyffb75jrvbww3r1ny9pn8";
+      };
+    };
+    "@hapi/joi-15.1.1" = {
+      name = "_at_hapi_slash_joi";
+      packageName = "@hapi/joi";
+      version = "15.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@hapi/joi/-/joi-15.1.1.tgz";
+        sha512 = "00w6lcx6spr7z1xbkfady5yxfxkiw4f3crds9l6qirvnsp30c026jziafi6km0p5146dygrfs1rz47j9klph7y6zcfcnaqfjgqmyyvs";
+      };
+    };
+    "@hapi/topo-3.1.6" = {
+      name = "_at_hapi_slash_topo";
+      packageName = "@hapi/topo";
+      version = "3.1.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@hapi/topo/-/topo-3.1.6.tgz";
+        sha512 = "04mh0ix6qpfggy9if6vjicickw0xydydny3hh2vs1q9gji5fg31jyr25mnagl48pl6mzn2p4dc65fbpm7w53bka7zz033qw679a01ml";
+      };
+    };
+    "@mrmlnc/readdir-enhanced-2.2.1" = {
+      name = "_at_mrmlnc_slash_readdir-enhanced";
+      packageName = "@mrmlnc/readdir-enhanced";
+      version = "2.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz";
+        sha512 = "3g9wzm6hszqh30x6hmwc9l4vw51c6a224cp2y9qzlj98vzbwbc4s7lfafi67v8401qagjsdxrndnnannzz6i71krmn8svxwk3lfkwbc";
+      };
+    };
+    "@nodelib/fs.scandir-2.1.3" = {
+      name = "_at_nodelib_slash_fs.scandir";
+      packageName = "@nodelib/fs.scandir";
+      version = "2.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz";
+        sha512 = "07zn0jp8b7nrrpkxwx715n68ncr51xiyz46j8g1fdvy07cr3s60npwhds1difzwdgz762zwirirppmc5dwl5pdqmww1m0zp15hv0sbq";
+      };
+    };
+    "@nodelib/fs.stat-1.1.3" = {
+      name = "_at_nodelib_slash_fs.stat";
+      packageName = "@nodelib/fs.stat";
+      version = "1.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz";
+        sha512 = "0zx6w7vq6bz1fxg0dhvd9nwbrbvghcln2xmj89p93dq84bm8pdiiddds49wn45wplh8f8mdnkjv2w0cjn3a1i83v3yq22wh4q7jc45j";
+      };
+    };
+    "@nodelib/fs.stat-2.0.3" = {
+      name = "_at_nodelib_slash_fs.stat";
+      packageName = "@nodelib/fs.stat";
+      version = "2.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz";
+        sha512 = "2n8008qx9kqgxsgsd22r2xrkm56nwsnwjfws9s4jjmbrk4gz8vfhdw7vp70kn59mqfihkdks6s0101javrpfi7hg8l0qk3nwjp4a03d";
+      };
+    };
+    "@nodelib/fs.walk-1.2.4" = {
+      name = "_at_nodelib_slash_fs.walk";
+      packageName = "@nodelib/fs.walk";
+      version = "1.2.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz";
+        sha512 = "2nsw6dfpkrkm8pxp2d9jlva5mnwqfzssj9r3xlyvrybb26xvjjkw7c0jvfilz08xvvgaanjxvqz6ycqh35avnqwg8mns39biqwmfpym";
+      };
+    };
+    "@sindresorhus/is-0.7.0" = {
+      name = "_at_sindresorhus_slash_is";
+      packageName = "@sindresorhus/is";
+      version = "0.7.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@sindresorhus/is/-/is-0.7.0.tgz";
+        sha512 = "2ilygr40l2yqbk6lix4xnnnqsq6fxa6sysdxg49bg1ax5gzhwy3bcjbdlk7lndgh9055slpx6fybs3p8mhvbsnnjkmkqzrfy8l5mn1q";
+      };
+    };
+    "@sindresorhus/is-2.1.0" = {
+      name = "_at_sindresorhus_slash_is";
+      packageName = "@sindresorhus/is";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@sindresorhus/is/-/is-2.1.0.tgz";
+        sha512 = "0v01lvb36q7cjz2v5spd6h3gcqmw69jmrpa6nsdpdmipxihzn6wv8clkyxibcvxv4b5ajpsz5rg0aiwwhjy7nl0jcwax8sa59zrfwlm";
+      };
+    };
+    "@szmarczak/http-timer-4.0.5" = {
+      name = "_at_szmarczak_slash_http-timer";
+      packageName = "@szmarczak/http-timer";
+      version = "4.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.5.tgz";
+        sha512 = "06naxv8ahcw0kc4pzg2fzqqrmb0ah6lsi3qvy3s4a5x2fkil74z97yiagbykqanf1b0zrzq4lhrip8sc6fs124kiypaqqdmr7v4091z";
+      };
+    };
+    "@types/anymatch-1.3.1" = {
+      name = "_at_types_slash_anymatch";
+      packageName = "@types/anymatch";
+      version = "1.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/anymatch/-/anymatch-1.3.1.tgz";
+        sha512 = "32g2n75z48j6mx4k8iz6hm75q7r6dd24gk40lb02x7bffcjf6zf4ca10g51x8zqd1yr0zq2xny0wrvgfz1ynhmg8hv9l3j1g8yr3q7z";
+      };
+    };
+    "@types/cacheable-request-6.0.1" = {
+      name = "_at_types_slash_cacheable-request";
+      packageName = "@types/cacheable-request";
+      version = "6.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.1.tgz";
+        sha512 = "2nx7h47i6xjvrbxlp329m2sx4qa8s7fw3c7xycfd6gr6wwfkjvyv1j5z1pf151w09vzhn721bjrh8p1ydba3vc5ljdy064177dnlhfa";
+      };
+    };
+    "@types/color-name-1.1.1" = {
+      name = "_at_types_slash_color-name";
+      packageName = "@types/color-name";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz";
+        sha512 = "0yy21xdbsflgxc7lcl8i2cb4mnw9a518gcj77g39hslrlfanliz7agc4dihnkkhcdpnkas7i2sd5lf9f2i4kaq53axkgir3411qxgxf";
+      };
+    };
+    "@types/events-3.0.0" = {
+      name = "_at_types_slash_events";
+      packageName = "@types/events";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz";
+        sha512 = "3v6shgxnlkc7izsc00g8ilpxi1q2mpcmbjyfawyqcj8mwfhlx2cnkm3hj87gsd39yyq33pilb0dbb4cdc8wwhn7dcwj4srg0amrp8qi";
+      };
+    };
+    "@types/glob-7.1.1" = {
+      name = "_at_types_slash_glob";
+      packageName = "@types/glob";
+      version = "7.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz";
+        sha512 = "3dhbgdkzpgx010hfgkhndrb094kbd3z6s4waicihnl0rp3jk0f0gs8vvzi84xzissrhml1dfgvbdhahzbh75nny1g6429fnqvlp866l";
+      };
+    };
+    "@types/html-minifier-terser-5.0.0" = {
+      name = "_at_types_slash_html-minifier-terser";
+      packageName = "@types/html-minifier-terser";
+      version = "5.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-5.0.0.tgz";
+        sha512 = "05y4l2y0vv2pif8awwvi76jy0b19pgwma0d3whwls29q6jzzrwnw1yncza40h1br0zsd980vfwn19hznim1gd031ds634jxh4zm5pmb";
+      };
+    };
+    "@types/http-cache-semantics-4.0.0" = {
+      name = "_at_types_slash_http-cache-semantics";
+      packageName = "@types/http-cache-semantics";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/http-cache-semantics/-/http-cache-semantics-4.0.0.tgz";
+        sha512 = "3a59p84bj2kf33npin2307frq0xhm47cvw2rw1xijb53yalq3m4bhxkjl045jraj56nz13xnis7amcnr0bd5x1r7785wf54dv9z4xbk";
+      };
+    };
+    "@types/keyv-3.1.1" = {
+      name = "_at_types_slash_keyv";
+      packageName = "@types/keyv";
+      version = "3.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.1.tgz";
+        sha512 = "1bydwp0jnaxaygfaw3xj8g6drxla6vamlgd2533jq8iplf1hfll274n67kcqj465la3k515krc53v8aqz23vnl2avxhsra0574niyrh";
+      };
+    };
+    "@types/minimatch-3.0.3" = {
+      name = "_at_types_slash_minimatch";
+      packageName = "@types/minimatch";
+      version = "3.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz";
+        sha512 = "2ff7lcgph45bp2v5zsaxcy00rbh5n5h4njbicwhqilz66pd1lw7xfrpfl4i4ppfcx78zg9cp582b5fjif0dg7r18m44vxfksslvlyml";
+      };
+    };
+    "@types/node-13.11.0" = {
+      name = "_at_types_slash_node";
+      packageName = "@types/node";
+      version = "13.11.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/node/-/node-13.11.0.tgz";
+        sha512 = "32v8pzb6g76fjsp064dr7qqry3f3dbbff56bkzw7qxpzg37kpldx5d61n87183b2s8svx1pid84c225frhy7gp3r6zz4808dfg2dkmq";
+      };
+    };
+    "@types/q-1.5.2" = {
+      name = "_at_types_slash_q";
+      packageName = "@types/q";
+      version = "1.5.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz";
+        sha512 = "17nxpx18sizfrmzc6d7xcc2pr2xn2cq83vh0hm24wpm8ibdlcq5r0m12gbps0sww2jayl9v7lqplss6nsyy6xc4rcn1s4rpmpg5vvki";
+      };
+    };
+    "@types/responselike-1.0.0" = {
+      name = "_at_types_slash_responselike";
+      packageName = "@types/responselike";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/responselike/-/responselike-1.0.0.tgz";
+        sha512 = "161bm0d6lm7yvh41bc6yspj5nb36j9v4nx7d3xfqgc3h2cg6z03ik6kfd8cv1q93qwblz5ibp30a7scscxj8vw963d5qz5f7033d5pk";
+      };
+    };
+    "@types/source-list-map-0.1.2" = {
+      name = "_at_types_slash_source-list-map";
+      packageName = "@types/source-list-map";
+      version = "0.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/source-list-map/-/source-list-map-0.1.2.tgz";
+        sha512 = "2q5qxxw2xrn72030yyfpxzl3b498dw1wbfbb86gk9a4i5mhq3adc2711mfdwyg7ixdy79ax1hdfp0vw0aqzwj32dlyklbbwd75bx4ib";
+      };
+    };
+    "@types/tapable-1.0.5" = {
+      name = "_at_types_slash_tapable";
+      packageName = "@types/tapable";
+      version = "1.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/tapable/-/tapable-1.0.5.tgz";
+        sha512 = "2sv1nmhp8gvylghvxmxvc02zral5hbrhj45cpl5bz7grf36r8mpaihybdvz1nwkkdn325lap4v1q2jbzzy1l3wz2q8bghr6y8rvc0gy";
+      };
+    };
+    "@types/uglify-js-3.0.5" = {
+      name = "_at_types_slash_uglify-js";
+      packageName = "@types/uglify-js";
+      version = "3.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.0.5.tgz";
+        sha512 = "0kqcqx89pacasl4g5azinlm111qla4fn4k5ghsmyc9lsh2a2nhlj74zrm1apzw5zvnaxcl86ysym559000n93szj9ln0saj9151pc9g";
+      };
+    };
+    "@types/webpack-4.41.10" = {
+      name = "_at_types_slash_webpack";
+      packageName = "@types/webpack";
+      version = "4.41.10";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.10.tgz";
+        sha512 = "2f211d97906nnasrwxk3c1f6bd5gc9za6vs3dqp6j5rg928kp975xsj7gfk9sbbvrqcfp0mrb6hjw7fd2m3x1dvcjik60mwmalv935w";
+      };
+    };
+    "@types/webpack-sources-0.1.7" = {
+      name = "_at_types_slash_webpack-sources";
+      packageName = "@types/webpack-sources";
+      version = "0.1.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-0.1.7.tgz";
+        sha512 = "0px6j424ivmklnnzd5kspgsq0irlhf086gbcd74ycjhrmgz0wy6sv4lkz7l5p4ddz6fghjkl3j4vlxi99cnkf2h3masv30bjan8f9jz";
+      };
+    };
+    "@webassemblyjs/ast-1.9.0" = {
+      name = "_at_webassemblyjs_slash_ast";
+      packageName = "@webassemblyjs/ast";
+      version = "1.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz";
+        sha512 = "08744px0y61c8svh84df8xg0m3905gkz9wfjlp9pkk8j5dnfs66l43qff6d60y1n0igdzwdpf9bvrdy4jwrkcjs1l98ivlvpzj1db0b";
+      };
+    };
+    "@webassemblyjs/floating-point-hex-parser-1.9.0" = {
+      name = "_at_webassemblyjs_slash_floating-point-hex-parser";
+      packageName = "@webassemblyjs/floating-point-hex-parser";
+      version = "1.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz";
+        sha512 = "10dqii9lv28nj4ls9wv7ys4ckd7v9iz08cb2alpph0xgz44a437yfa6mdzgnkgw5zcgxjy4xqsxv9sfp49ay8c3hdw01w8jbdq6lvjc";
+      };
+    };
+    "@webassemblyjs/helper-api-error-1.9.0" = {
+      name = "_at_webassemblyjs_slash_helper-api-error";
+      packageName = "@webassemblyjs/helper-api-error";
+      version = "1.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz";
+        sha512 = "2dmpj9vdgdq3wjfa9a6jlb6xrg4d25l2an1r41sw91a7psdc9lp793ca7z7i9q2712p7gp42095r50xfsc2fwci9409npjch670phrm";
+      };
+    };
+    "@webassemblyjs/helper-buffer-1.9.0" = {
+      name = "_at_webassemblyjs_slash_helper-buffer";
+      packageName = "@webassemblyjs/helper-buffer";
+      version = "1.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz";
+        sha512 = "04387f8f3q0kk96h7l1js39xg4xy8ja9bxgqpmfpsj17xma1y3p3risra4yh8j3xbiyn4bxqmcgn6zlwv6n0yzw0jrax1iagbijb6m9";
+      };
+    };
+    "@webassemblyjs/helper-code-frame-1.9.0" = {
+      name = "_at_webassemblyjs_slash_helper-code-frame";
+      packageName = "@webassemblyjs/helper-code-frame";
+      version = "1.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz";
+        sha512 = "1j2zclfh4a784bb015c39kahlmalikwdx0k1xws46iynf1nskcy6szv1cldldn1zhm8ckj8wddfx6idpj3m2qzvw9pda3v4j1s9h40i";
+      };
+    };
+    "@webassemblyjs/helper-fsm-1.9.0" = {
+      name = "_at_webassemblyjs_slash_helper-fsm";
+      packageName = "@webassemblyjs/helper-fsm";
+      version = "1.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz";
+        sha512 = "2bjr61kxvrfhqr7439jkapxcij4cgm9lb32x55qq7hxn07cdkz69aaqvmzqqyir0bn8a1rfblmgvmd53jxg0jgwwjdi1clv2716ix1q";
+      };
+    };
+    "@webassemblyjs/helper-module-context-1.9.0" = {
+      name = "_at_webassemblyjs_slash_helper-module-context";
+      packageName = "@webassemblyjs/helper-module-context";
+      version = "1.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz";
+        sha512 = "3r1d7c1zr0b9f85526k03d1p47kq7qgih4q1fzwxv540aid771cjrmw68f6fipmhzlzxwxhj09q2vrxb96p59v7jd6cplw247r9d41h";
+      };
+    };
+    "@webassemblyjs/helper-wasm-bytecode-1.9.0" = {
+      name = "_at_webassemblyjs_slash_helper-wasm-bytecode";
+      packageName = "@webassemblyjs/helper-wasm-bytecode";
+      version = "1.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz";
+        sha512 = "19im6kssfy0rjipdvz4jp03rjzkwhnvkp1q8zw7mjfx8yf2w7nlxpy5ambbzvlq5jvh8ks6x35nlh0kcmz68hmcqixwfdgjijs55ca7";
+      };
+    };
+    "@webassemblyjs/helper-wasm-section-1.9.0" = {
+      name = "_at_webassemblyjs_slash_helper-wasm-section";
+      packageName = "@webassemblyjs/helper-wasm-section";
+      version = "1.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz";
+        sha512 = "2zs0rl7x9l6adbbiqgw2br1w09b1da351rc69znxakjg9c9wkb227xy374k1zkc7a79rc4q7lgwv9ami3pr4555mipqp4yybpr02wsy";
+      };
+    };
+    "@webassemblyjs/ieee754-1.9.0" = {
+      name = "_at_webassemblyjs_slash_ieee754";
+      packageName = "@webassemblyjs/ieee754";
+      version = "1.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz";
+        sha512 = "17f4ncqxsp9b8ssciw5icvf8bxpd732cda6z1jdbddbxl58m3vkjaxpx3ymi4z0y8nnrify698x8g65w38761rjkgr0pzhlwqkgribm";
+      };
+    };
+    "@webassemblyjs/leb128-1.9.0" = {
+      name = "_at_webassemblyjs_slash_leb128";
+      packageName = "@webassemblyjs/leb128";
+      version = "1.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.9.0.tgz";
+        sha512 = "2kz1bim131l0y9pjznjv3qmw030gli8yb3hhd38hjrc2py5h551lgzcsjlrx6pnpwnq9rdsyh3ppkyarymrpnnqncimlmvhjlrp7m8h";
+      };
+    };
+    "@webassemblyjs/utf8-1.9.0" = {
+      name = "_at_webassemblyjs_slash_utf8";
+      packageName = "@webassemblyjs/utf8";
+      version = "1.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.9.0.tgz";
+        sha512 = "3rlyvh0fy205d045jr17hjj8y641hmhkkzk3gq78865jcqm55ff2n3jbalj5121q8li786hm9jg5ggv66qixp7fsb7i9938dfax15hr";
+      };
+    };
+    "@webassemblyjs/wasm-edit-1.9.0" = {
+      name = "_at_webassemblyjs_slash_wasm-edit";
+      packageName = "@webassemblyjs/wasm-edit";
+      version = "1.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz";
+        sha512 = "33jfv92rsn09qz41blq4a781clr7n5lzpy44zb42fb499mbd1hd4mf0q4l6karmbm8gg552p9ayqgzawz29r2n56gwhrfrldw3g608n";
+      };
+    };
+    "@webassemblyjs/wasm-gen-1.9.0" = {
+      name = "_at_webassemblyjs_slash_wasm-gen";
+      packageName = "@webassemblyjs/wasm-gen";
+      version = "1.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz";
+        sha512 = "26a9wb1a8jglkv330fkmcg7l4z9v1b8ygn32lw96z2wiq1m65f7b3rqp1f1rhgg72sxdx0zsirs6am97phy66svps3y7k0qisikgwbh";
+      };
+    };
+    "@webassemblyjs/wasm-opt-1.9.0" = {
+      name = "_at_webassemblyjs_slash_wasm-opt";
+      packageName = "@webassemblyjs/wasm-opt";
+      version = "1.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz";
+        sha512 = "3c2a28pzyrsdrichvzc0v1kik18sb0pwfjkwhbm1cc6xakfw5wgialgqkrrv9c7ibskwh1k75m9xf9v4hmd42xj6676z1i7l2dy0j22";
+      };
+    };
+    "@webassemblyjs/wasm-parser-1.9.0" = {
+      name = "_at_webassemblyjs_slash_wasm-parser";
+      packageName = "@webassemblyjs/wasm-parser";
+      version = "1.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz";
+        sha512 = "0n0927dbd3wsan69ljwzlp9pi15axs3a11sypfl720s8dm8g0q81kxq0w0qybzgm16fwk073y7ffkhm4gqv0cv496fhkn0iihr29v7p";
+      };
+    };
+    "@webassemblyjs/wast-parser-1.9.0" = {
+      name = "_at_webassemblyjs_slash_wast-parser";
+      packageName = "@webassemblyjs/wast-parser";
+      version = "1.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz";
+        sha512 = "1pkw353ygc8csplwi4nfx5n296wcj4b8yawrl0kxhizq4fdbbsvrhphzzcvx1p8r8ccj9yq2x5yix17q54gyhikcvr74hyhzl095jma";
+      };
+    };
+    "@webassemblyjs/wast-printer-1.9.0" = {
+      name = "_at_webassemblyjs_slash_wast-printer";
+      packageName = "@webassemblyjs/wast-printer";
+      version = "1.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz";
+        sha512 = "2qb0ghchp4dw0yxp9c4h9iw6m7lk58sz7f9j4kmrvp5hj804kwxdskgbjcc96g3r7f3zwvcyw3nlnr718rml73f8gr727bbvq9jg7fq";
+      };
+    };
+    "@xtuc/ieee754-1.2.0" = {
+      name = "_at_xtuc_slash_ieee754";
+      packageName = "@xtuc/ieee754";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz";
+        sha512 = "1wczr2c331gq4q6w6nsiylqs6q6dp0j2lvc231826gfrdhr3lcimmyhswp4g0b5p7k7k525gq6gh0wpg65sjlp2s4f0n6ww18m2fzqd";
+      };
+    };
+    "@xtuc/long-4.2.2" = {
+      name = "_at_xtuc_slash_long";
+      packageName = "@xtuc/long";
+      version = "4.2.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz";
+        sha512 = "00n8akj5s578b8r7vcdz817cnmga21vznz895kygvb0j780968szj171f91b0bgvz880ff7zq025q4087cgxb2fqpyg01sgil2ymq9n";
+      };
+    };
+    "abbrev-1.1.1" = {
+      name = "abbrev";
+      packageName = "abbrev";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz";
+        sha512 = "38s4f3id97wsb0rg9nm9zvxyq0nvwrmrpa5dzvrkp36mf5ibs98b4z6lvsbrwzzs0sbcank6c7gpp06vcwp9acfhp41rzlhi3ybsxwy";
+      };
+    };
+    "accepts-1.3.7" = {
+      name = "accepts";
+      packageName = "accepts";
+      version = "1.3.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz";
+        sha512 = "2j51dxzbgz22q0k7dhivimfsqx9a0f0h9slfd7n20gz3y1944gx3y7xai54za0x3zhbar6vqiaab2i9p913cwqk414qk3cnrm138pr2";
+      };
+    };
+    "acorn-6.4.1" = {
+      name = "acorn";
+      packageName = "acorn";
+      version = "6.4.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz";
+        sha512 = "1s65pswzbh0155lsrdln08lifgs34zb53vkfl8fvxwnfmrc84vj01m9b31w4n846k7vk8lr5ns6wqf0fxc8xz98vkihldxsgn9ksl35";
+      };
+    };
+    "address-1.0.3" = {
+      name = "address";
+      packageName = "address";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/address/-/address-1.0.3.tgz";
+        sha512 = "27dii2i2aw9z3pw09110914532z5dfywxp8gbrfr14737cwy8m0jysam3abmfsbp8g51sd02ys57j5snwly3zfd0vrbli4109rni7ng";
+      };
+    };
+    "ajv-6.12.0" = {
+      name = "ajv";
+      packageName = "ajv";
+      version = "6.12.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz";
+        sha512 = "0gkcic96nmpcq311i2jfwbaa961x0mj7mkl7iwk213hyn4jgxbl0a472lcpg9dr7ybacn3i45fj6q0dz3g8rqmva7r14i9la240ba0g";
+      };
+    };
+    "ajv-errors-1.0.1" = {
+      name = "ajv-errors";
+      packageName = "ajv-errors";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz";
+        sha512 = "24kqslzd256yc0dckqcg8n1rngyfzdflfznp55hnhkv3rhyzirjhpj31rgiiryyjlw8a64x9ba7hdqkpiwf6jpllwyyyhr7zqxmy90c";
+      };
+    };
+    "ajv-keywords-3.4.1" = {
+      name = "ajv-keywords";
+      packageName = "ajv-keywords";
+      version = "3.4.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz";
+        sha512 = "1lyjmfg70gijr3gjs63qmawfazm5mz8vb1bknyy1vzdif6a30vi3dpwkrlv4j4i5dg56jd3fliqgfq0rxbm98a42jxbgnyxmdn65va4";
+      };
+    };
+    "alphanum-sort-1.0.2" = {
+      name = "alphanum-sort";
+      packageName = "alphanum-sort";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz";
+        sha1 = "97a1119649b211ad33691d9f9f486a8ec9fbe0a3";
+      };
+    };
+    "ansi-colors-3.2.4" = {
+      name = "ansi-colors";
+      packageName = "ansi-colors";
+      version = "3.2.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz";
+        sha512 = "2n6gl8300ihln724832pvvzrii5c4qjli9xc16s632ywnyrfbv1kmcqg133v25583hqhflpsfi2yhkjy6nhzj0si5v36zhym0cifxc4";
+      };
+    };
+    "ansi-escapes-3.2.0" = {
+      name = "ansi-escapes";
+      packageName = "ansi-escapes";
+      version = "3.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz";
+        sha512 = "12pp3q4c44hrzr2xl9vqjigwjn2wr1j0lhvshl75z5m6a97hqkd047sdcma1inzjvxhpkzk1qkvag7cw3sya32s9wsfasr6xsnnj63h";
+      };
+    };
+    "ansi-html-0.0.7" = {
+      name = "ansi-html";
+      packageName = "ansi-html";
+      version = "0.0.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz";
+        sha1 = "813584021962a9e9e6fd039f940d12f56ca7859e";
+      };
+    };
+    "ansi-regex-2.1.1" = {
+      name = "ansi-regex";
+      packageName = "ansi-regex";
+      version = "2.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz";
+        sha1 = "c3b33ab5ee360d86e0e628f0468ae7ef27d654df";
+      };
+    };
+    "ansi-regex-3.0.0" = {
+      name = "ansi-regex";
+      packageName = "ansi-regex";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz";
+        sha1 = "ed0317c322064f79466c02966bddb605ab37d998";
+      };
+    };
+    "ansi-regex-4.1.0" = {
+      name = "ansi-regex";
+      packageName = "ansi-regex";
+      version = "4.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz";
+        sha512 = "1v2gfp292kslpvam0l0h1iba35yi0n7dc6qv6fmxsdyfcp6zakkl13vrh3hzsw4zgh50jrrsg7xb2q2hn4g8a0dmf947mfcylymxanm";
+      };
+    };
+    "ansi-regex-5.0.0" = {
+      name = "ansi-regex";
+      packageName = "ansi-regex";
+      version = "5.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz";
+        sha512 = "2bgymyprr0q59vfj2qnmnlcbi60jvry6kzdk94nlw3x6176ar5g0qddm8w01bw7fj2hrb4xlb75x4dqs38198sjachhslcfks7rz3kd";
+      };
+    };
+    "ansi-styles-2.2.1" = {
+      name = "ansi-styles";
+      packageName = "ansi-styles";
+      version = "2.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz";
+        sha1 = "b432dd3358b634cf75e1e4664368240533c1ddbe";
+      };
+    };
+    "ansi-styles-3.2.1" = {
+      name = "ansi-styles";
+      packageName = "ansi-styles";
+      version = "3.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz";
+        sha512 = "2lgkskkj4c1fsnrksy0yffda0wss84p8lfiazdc7jli7iqnvrxkzbxjzpvx13lm28qw0zkawfxvz2bdiisc72ccy7hx8i8rm4iijgam";
+      };
+    };
+    "ansi-styles-4.2.1" = {
+      name = "ansi-styles";
+      packageName = "ansi-styles";
+      version = "4.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz";
+        sha512 = "2619xzd910i29pa6v368sk8jdgjk3yqqvjwbg3hyj6byd3ygcrs3xix3fy03smqgiylhdrkrvyrhhnv1l5pkc64qn7zgmh6rfna6lgm";
+      };
+    };
+    "anymatch-2.0.0" = {
+      name = "anymatch";
+      packageName = "anymatch";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz";
+        sha512 = "03mjsaw6xk4zhvl17fpqn59j4v2bafqs0yfw5y45hl8x97xlihwvjmcx3icnaamvipplnczymvzg4sb4ixwpzak0k3p21c00nqqxmz6";
+      };
+    };
+    "anymatch-3.1.1" = {
+      name = "anymatch";
+      packageName = "anymatch";
+      version = "3.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz";
+        sha512 = "2776jrfn8kh9r6qhz6s43znnwvqmbqrjsch99hdv21j53sj4njyjhrya67drxk8y7hvi28mjvdjj277jy4qd2zfayrjli3cdbdkkkwq";
+      };
+    };
+    "aproba-1.2.0" = {
+      name = "aproba";
+      packageName = "aproba";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz";
+        sha512 = "13mgnbmdhdq0qncijvpip1l39q1a8labcvj3hc3n1yl2zch106mdkn7p7bd5knvmfkkn1js9nd47nzyjk1himbm8ry8i8gd6mk7mlk3";
+      };
+    };
+    "argparse-1.0.10" = {
+      name = "argparse";
+      packageName = "argparse";
+      version = "1.0.10";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz";
+        sha512 = "17fhywmdjcp8g0ys089i5xg26yajkkg9zg8hyry3fghz75b2pq5vdx997dk5p2sc15r9nsj8rmf4f27g81hi92kzj5q86sdmg5ni553";
+      };
+    };
+    "arr-diff-4.0.0" = {
+      name = "arr-diff";
+      packageName = "arr-diff";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz";
+        sha1 = "d6461074febfec71e7e15235761a329a5dc7c520";
+      };
+    };
+    "arr-flatten-1.1.0" = {
+      name = "arr-flatten";
+      packageName = "arr-flatten";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz";
+        sha512 = "2vdly17xk5kw7bfzajrjdnw4ml3wrfblx8064n0i4fxlchcscx2mvnwkq2bnnqvbqvdy4vs9ad462lz0rid7khysly9m9vzjiblly1g";
+      };
+    };
+    "arr-union-3.1.0" = {
+      name = "arr-union";
+      packageName = "arr-union";
+      version = "3.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz";
+        sha1 = "e39b09aea9def866a8f206e288af63919bae39c4";
+      };
+    };
+    "array-filter-0.0.1" = {
+      name = "array-filter";
+      packageName = "array-filter";
+      version = "0.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/array-filter/-/array-filter-0.0.1.tgz";
+        sha1 = "7da8cf2e26628ed732803581fd21f67cacd2eeec";
+      };
+    };
+    "array-flatten-1.1.1" = {
+      name = "array-flatten";
+      packageName = "array-flatten";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz";
+        sha1 = "9a5f699051b1e7073328f2a008968b64ea2955d2";
+      };
+    };
+    "array-flatten-2.1.2" = {
+      name = "array-flatten";
+      packageName = "array-flatten";
+      version = "2.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz";
+        sha512 = "2swmvaw9xcvzv29i247057pq4khyss7gnc0p244v1l2g2p2xpsr47m0dfaf54yscd3fc9njh3kvwly99w8shvd9p5fq6nvwwmqg7mw4";
+      };
+    };
+    "array-map-0.0.0" = {
+      name = "array-map";
+      packageName = "array-map";
+      version = "0.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/array-map/-/array-map-0.0.0.tgz";
+        sha1 = "88a2bab73d1cf7bcd5c1b118a003f66f665fa662";
+      };
+    };
+    "array-reduce-0.0.0" = {
+      name = "array-reduce";
+      packageName = "array-reduce";
+      version = "0.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/array-reduce/-/array-reduce-0.0.0.tgz";
+        sha1 = "173899d3ffd1c7d9383e4479525dbe278cab5f2b";
+      };
+    };
+    "array-union-1.0.2" = {
+      name = "array-union";
+      packageName = "array-union";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz";
+        sha1 = "9a34410e4f4e3da23dea375be5be70f24778ec39";
+      };
+    };
+    "array-union-2.1.0" = {
+      name = "array-union";
+      packageName = "array-union";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz";
+        sha512 = "35whnhqnw23y121ilf8kl79pyqb9bjsg32gsazzlmww9zgk22c5jycf0vlkpsnp67rqw05hhw97hxw216hpnm6bxa620lyqwjhb2v0w";
+      };
+    };
+    "array-uniq-1.0.3" = {
+      name = "array-uniq";
+      packageName = "array-uniq";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz";
+        sha1 = "af6ac877a25cc7f74e058894753858dfdb24fdb6";
+      };
+    };
+    "array-unique-0.3.2" = {
+      name = "array-unique";
+      packageName = "array-unique";
+      version = "0.3.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz";
+        sha1 = "a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428";
+      };
+    };
+    "asap-2.0.6" = {
+      name = "asap";
+      packageName = "asap";
+      version = "2.0.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz";
+        sha1 = "e50347611d7e690943208bbdafebcbc2fb866d46";
+      };
+    };
+    "asn1-0.2.4" = {
+      name = "asn1";
+      packageName = "asn1";
+      version = "0.2.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz";
+        sha512 = "1v2z1ll0l8rif8hh0d03jc49kz3p8hym63q8ixbas48w4a8akl413hwn08nx83m89sj3mxl06aa0grp7n8hj6hcbsb2k3fhj913674g";
+      };
+    };
+    "asn1.js-4.10.1" = {
+      name = "asn1.js";
+      packageName = "asn1.js";
+      version = "4.10.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz";
+        sha512 = "15j9ms7k6dx08m1wqrvc4958vcrshjjpicpxmz9bflsyk0x2r7w20lxlm27jpyj7cwj6158a0582vifk393hqp0ysn9mlbabqw9qzd7";
+      };
+    };
+    "assert-1.5.0" = {
+      name = "assert";
+      packageName = "assert";
+      version = "1.5.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz";
+        sha512 = "1n2xh5m359gm4my50j2206n32q2h044lqrl8h122gjn41fizlrh32j1lj7wqfix1iblyvi7zvdgvzbf97f840lr17vfk8ph1imj0fqh";
+      };
+    };
+    "assert-plus-1.0.0" = {
+      name = "assert-plus";
+      packageName = "assert-plus";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz";
+        sha1 = "f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525";
+      };
+    };
+    "assets-webpack-plugin-3.9.12" = {
+      name = "assets-webpack-plugin";
+      packageName = "assets-webpack-plugin";
+      version = "3.9.12";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/assets-webpack-plugin/-/assets-webpack-plugin-3.9.12.tgz";
+        sha512 = "0s21gk3wrzrj44dcpsxj8yffp5iwnjccj9h7yn3l7qls5gcw0cgbd25qqd04b192px7kyjyfx9adwp3vxp286g27g15vlsg5gyd79ca";
+      };
+    };
+    "assign-symbols-1.0.0" = {
+      name = "assign-symbols";
+      packageName = "assign-symbols";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz";
+        sha1 = "59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367";
+      };
+    };
+    "astral-regex-1.0.0" = {
+      name = "astral-regex";
+      packageName = "astral-regex";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz";
+        sha512 = "0ga6b0jymkw4jrfvjilhfrddml29l1nrvj7r57d140p7rn31mmbni4j9z343v2zzz2zcnlsr2s17kmlgjkyvs9pxrf88an11pm9y77r";
+      };
+    };
+    "async-0.9.2" = {
+      name = "async";
+      packageName = "async";
+      version = "0.9.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/async/-/async-0.9.2.tgz";
+        sha1 = "aea74d5e61c1f899613bf64bda66d4c78f2fd17d";
+      };
+    };
+    "async-1.0.0" = {
+      name = "async";
+      packageName = "async";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/async/-/async-1.0.0.tgz";
+        sha1 = "f8fc04ca3a13784ade9e1641af98578cfbd647a9";
+      };
+    };
+    "async-2.6.3" = {
+      name = "async";
+      packageName = "async";
+      version = "2.6.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/async/-/async-2.6.3.tgz";
+        sha512 = "1g679kw2qqpqx1yd4s778r8rw3cv9qwmib5x3klk64kcl5ndw71bljcpav5jkk6grizlpvrqszsbs6fkmnlvcq5fnz2q33mrnb6zyfd";
+      };
+    };
+    "async-each-1.0.3" = {
+      name = "async-each";
+      packageName = "async-each";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz";
+        sha512 = "00vbg0zvq40mmvzz9q3klkk5ly5jh75kc8s3bf7j2ff9zivla3wlc8d622gajjq4w66mln5570dc936my6wh08ippfj5jagj51s3xfg";
+      };
+    };
+    "async-limiter-1.0.1" = {
+      name = "async-limiter";
+      packageName = "async-limiter";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz";
+        sha512 = "0sy81yyf4na58ic2m0ib0prkb9njb1qzl7wf3vlq4hhm4xnwgxaph0lr43gs1sd0rai2xp1h6phlwvni9jiggm94dd54i0wc1cabhvj";
+      };
+    };
+    "asynckit-0.4.0" = {
+      name = "asynckit";
+      packageName = "asynckit";
+      version = "0.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz";
+        sha1 = "c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79";
+      };
+    };
+    "atob-2.1.2" = {
+      name = "atob";
+      packageName = "atob";
+      version = "2.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz";
+        sha512 = "1rbq2rl2ry0y3nkqs3013vgjrnzf03609rg58092r8zkvzzn6v15grhv2yhzb48sz74zmjcj8ix7f5whrfp4zvsxyzrh64fhs9awvjs";
+      };
+    };
+    "autoprefixer-8.6.5" = {
+      name = "autoprefixer";
+      packageName = "autoprefixer";
+      version = "8.6.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/autoprefixer/-/autoprefixer-8.6.5.tgz";
+        sha512 = "25g0ccq9v5sb77q5yhffaxnva8ps64yqp82rzn9jfwl2hpcqbv02175icm0v6c6k4aywnayf6di6cq44agrlzjc6sfbrzp8flvqkd9w";
+      };
+    };
+    "aws-sign2-0.7.0" = {
+      name = "aws-sign2";
+      packageName = "aws-sign2";
+      version = "0.7.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz";
+        sha1 = "b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8";
+      };
+    };
+    "aws4-1.9.1" = {
+      name = "aws4";
+      packageName = "aws4";
+      version = "1.9.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz";
+        sha512 = "2x4b6c0ny64yv6ljfs6sv82akh200klmnh1m1i18hdj28ksxkr9c0szphnwcasy3g5y3l1wn858wcxnc2gi9q5wql8s678fc61xbhf0";
+      };
+    };
+    "babel-extract-comments-1.0.0" = {
+      name = "babel-extract-comments";
+      packageName = "babel-extract-comments";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/babel-extract-comments/-/babel-extract-comments-1.0.0.tgz";
+        sha512 = "1ay21zjvpavyw19hzijli4ax209jw3lxrn2lfzdyd8v29b76r4i35nq4q6iff2zlz88x2py8lkvyczb5l41fnyx0chxlxg5hj5v6rd9";
+      };
+    };
+    "babel-loader-8.0.4" = {
+      name = "babel-loader";
+      packageName = "babel-loader";
+      version = "8.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/babel-loader/-/babel-loader-8.0.4.tgz";
+        sha512 = "2pn5lfvi0s3fhz6fllidilfkz4h9v3l4632p55h9pyzccqda3fgpn2ayywyg2shfcw3y3q900xhkc7k63zyly3myqb9g80k8lv6243y";
+      };
+    };
+    "babel-plugin-dynamic-import-node-2.3.0" = {
+      name = "babel-plugin-dynamic-import-node";
+      packageName = "babel-plugin-dynamic-import-node";
+      version = "2.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz";
+        sha512 = "2ay3wlyykpjfs9awvl9xigggavibxvbi9hx1mplf87zmqff733aag7hzw89c4f28wf4hxcr404lsp01ndan45yxm9f1q44hjy98bam3";
+      };
+    };
+    "babel-plugin-syntax-object-rest-spread-6.13.0" = {
+      name = "babel-plugin-syntax-object-rest-spread";
+      packageName = "babel-plugin-syntax-object-rest-spread";
+      version = "6.13.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz";
+        sha1 = "fd6536f2bce13836ffa3a5458c4903a597bb3bf5";
+      };
+    };
+    "babel-plugin-transform-object-rest-spread-6.26.0" = {
+      name = "babel-plugin-transform-object-rest-spread";
+      packageName = "babel-plugin-transform-object-rest-spread";
+      version = "6.26.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz";
+        sha1 = "0f36692d50fef6b7e2d4b3ac1478137a963b7b06";
+      };
+    };
+    "babel-runtime-6.18.0" = {
+      name = "babel-runtime";
+      packageName = "babel-runtime";
+      version = "6.18.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.18.0.tgz";
+        sha1 = "0f4177ffd98492ef13b9f823e9994a02584c9078";
+      };
+    };
+    "babel-runtime-6.26.0" = {
+      name = "babel-runtime";
+      packageName = "babel-runtime";
+      version = "6.26.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz";
+        sha1 = "965c7058668e82b55d7bfe04ff2337bc8b5647fe";
+      };
+    };
+    "babylon-6.18.0" = {
+      name = "babylon";
+      packageName = "babylon";
+      version = "6.18.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz";
+        sha512 = "1qk460vyxfs08g8586jdc02wqzyy2y06596qcn1na9bz7yxra6vgh6177qf345xai0virpaz56bkpgmfcrd8yx5l2vjkn49y66h9xdb";
+      };
+    };
+    "balanced-match-1.0.0" = {
+      name = "balanced-match";
+      packageName = "balanced-match";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz";
+        sha1 = "89b4d199ab2bee49de164ea02b89ce462d71b767";
+      };
+    };
+    "base-0.11.2" = {
+      name = "base";
+      packageName = "base";
+      version = "0.11.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/base/-/base-0.11.2.tgz";
+        sha512 = "11dwi4v72034dqafp0qxsg8h6cpn92vv4vf909a9fybd69yfg6gqn4hhav6x59r1wbi8h1qlgfh9np0340mpljv1hc9v9p02giqygp5";
+      };
+    };
+    "base64-js-1.3.1" = {
+      name = "base64-js";
+      packageName = "base64-js";
+      version = "1.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz";
+        sha512 = "3mbfy80f2q6z8fwzch81hn7z0wjjsz6lwzz4jwrgr62pyql94mwi21k0l28xba2q1pydf8hf0jzzvr8w34rjmk135pjpmqfcj5kid4q";
+      };
+    };
+    "batch-0.6.1" = {
+      name = "batch";
+      packageName = "batch";
+      version = "0.6.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz";
+        sha1 = "dc34314f4e679318093fc760272525f94bf25c16";
+      };
+    };
+    "bcrypt-pbkdf-1.0.2" = {
+      name = "bcrypt-pbkdf";
+      packageName = "bcrypt-pbkdf";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz";
+        sha1 = "a4301d389b6a43f9b67ff3ca11a3f6637e360e9e";
+      };
+    };
+    "big.js-3.2.0" = {
+      name = "big.js";
+      packageName = "big.js";
+      version = "3.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz";
+        sha512 = "3qicqys1bg16slzbzjn3f0fir82r4d1h6lvy5y0cqqwzbs2iaxf93xgi6x47m7l87i102ifjn4qvjbf764gyncsxcqw7lw33mk7y4zs";
+      };
+    };
+    "big.js-5.2.2" = {
+      name = "big.js";
+      packageName = "big.js";
+      version = "5.2.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz";
+        sha512 = "2cin34lhbrlligarblnrqnl6f419mkpqd4abjms0y1fk1mxzb6rqvh1sg0zif7bgskirhh6shxnqa444syk4cf87fmndil954xzc8mz";
+      };
+    };
+    "binary-0.3.0" = {
+      name = "binary";
+      packageName = "binary";
+      version = "0.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz";
+        sha1 = "9f60553bc5ce8c3386f3b553cff47462adecaa79";
+      };
+    };
+    "binary-extensions-1.13.1" = {
+      name = "binary-extensions";
+      packageName = "binary-extensions";
+      version = "1.13.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz";
+        sha512 = "0drjfs8xmgc4rfi8nbbx7adsinnc5m0nc96dw3r3gars8zvg1kzay5a7a5s3islf13wmw7q9v15i7d2gdghs1lp6rh2wl6x80hcqzjj";
+      };
+    };
+    "binary-extensions-2.0.0" = {
+      name = "binary-extensions";
+      packageName = "binary-extensions";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz";
+        sha512 = "2izzpdg2m0av5pzbv1zyjfi15ddz5yk1d4h9cilzc8z6pzq5abcicnm2xx4b2jdrjk2l4h3zfawsxhnbzlgvlv4700q5930k796s69y";
+      };
+    };
+    "bindings-1.5.0" = {
+      name = "bindings";
+      packageName = "bindings";
+      version = "1.5.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz";
+        sha512 = "24xpa35sym31k1x9hs78jbmsh58yx7ldkn03d4g5qhmvm0bi5cwqvpn2s6r8hkwhks5mhm81gz878gbp5g9b2s7zniy7gm1z6vvysm7";
+      };
+    };
+    "binwrap-0.2.2" = {
+      name = "binwrap";
+      packageName = "binwrap";
+      version = "0.2.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/binwrap/-/binwrap-0.2.2.tgz";
+        sha512 = "1rh0lsxhj45r639casyzy4jncilkcfygfzz2h7hqm7rjbh0za510z2qmqjbzyrx98618fmcycgraqq115fbwh7n33wi29ipk75azrb3";
+      };
+    };
+    "bluebird-3.7.2" = {
+      name = "bluebird";
+      packageName = "bluebird";
+      version = "3.7.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz";
+        sha512 = "2v12rs2wvv94hrlyv0nadxn9x11796k9mk7a8vg0bqsry8m2pbyy9dribalwikh34qkk3rp6gnis849y5z9x5mxzbbdgkfhc3l674sy";
+      };
+    };
+    "bn.js-4.11.8" = {
+      name = "bn.js";
+      packageName = "bn.js";
+      version = "4.11.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz";
+        sha512 = "20bg51v29zygy89w84qb64pkjikxfjdsgjs0ry6pvv8fkwn5kd1izrqn022d838q3rcaq8dmy033g7q8b6960j4f8ipan74y9ydimr2";
+      };
+    };
+    "body-parser-1.18.2" = {
+      name = "body-parser";
+      packageName = "body-parser";
+      version = "1.18.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz";
+        sha1 = "87678a19d84b47d859b83199bd59bce222b10454";
+      };
+    };
+    "body-parser-1.19.0" = {
+      name = "body-parser";
+      packageName = "body-parser";
+      version = "1.19.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz";
+        sha512 = "2rl5ww96fwgmxdqhqmnknsaafw44vsr2xz7vf7nax8qz9jy8bmmdyawcy6yfny0wm7pi8m2jssakzjc1nin8z8207kv0gclpnrhy4bn";
+      };
+    };
+    "bonjour-3.5.0" = {
+      name = "bonjour";
+      packageName = "bonjour";
+      version = "3.5.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz";
+        sha1 = "8e890a183d8ee9a2393b3844c691a42bcf7bc9f5";
+      };
+    };
+    "boolbase-1.0.0" = {
+      name = "boolbase";
+      packageName = "boolbase";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz";
+        sha1 = "68dff5fbe60c51eb37725ea9e3ed310dcc1e776e";
+      };
+    };
+    "brace-expansion-1.1.11" = {
+      name = "brace-expansion";
+      packageName = "brace-expansion";
+      version = "1.1.11";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz";
+        sha512 = "248cnpbbf0p32h53rd3g8wzpgrkaj4p078ra1g6l16f82i6bzkvmhwqan5rk88apbll9ly1476kngd7f7z27i3b3zxpbb3064f8yaw8";
+      };
+    };
+    "braces-2.3.2" = {
+      name = "braces";
+      packageName = "braces";
+      version = "2.3.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz";
+        sha512 = "3gxrfbb03jf6nh75n99snhv4a9jni48hfc0gkj5yl1cginpqx3d73dnp8snph1fdkc804iz6zg0aqibifjnscjfbpfziw2g7yg5pmv8";
+      };
+    };
+    "braces-3.0.2" = {
+      name = "braces";
+      packageName = "braces";
+      version = "3.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz";
+        sha512 = "38dmhgggv4r7xf3chli957yj4gzfv9xhif8zzaqjnxavkrs1qbmj9m84vxh42n1jl9sddy16ryp4g93l1p8dvrc1pbcvk2ippwadjvg";
+      };
+    };
+    "brorand-1.1.0" = {
+      name = "brorand";
+      packageName = "brorand";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz";
+        sha1 = "12c25efe40a45e3c323eb8675a0a0ce57b22371f";
+      };
+    };
+    "browserify-aes-1.2.0" = {
+      name = "browserify-aes";
+      packageName = "browserify-aes";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz";
+        sha512 = "22gkxh9wf4hjxkyvj427k9r76xkz9vs63s1drwcggbpv0r7qdclzdvw167s7iq8936zak241cc5ck3bqkp6hy99zlkrbcmfl5g8gc7v";
+      };
+    };
+    "browserify-cipher-1.0.1" = {
+      name = "browserify-cipher";
+      packageName = "browserify-cipher";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz";
+        sha512 = "3bz6v63l37ndb18236yjdkbxjcvy4x16a8j7vsqxqprvnkcnkq1hg1ffd1c9zk9a3j555ppnpisfyh0x4adlb8lmpwbfa8i837n9y5h";
+      };
+    };
+    "browserify-des-1.0.2" = {
+      name = "browserify-des";
+      packageName = "browserify-des";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz";
+        sha512 = "3j1gv3firnsbjppm47ldxbav9rmh3plq026zn728wvhgf19i4r7kxzyyj7hpibhjv61lcm9i4b869yy90c8hfj7w8rmr17p2zbhwah6";
+      };
+    };
+    "browserify-rsa-4.0.1" = {
+      name = "browserify-rsa";
+      packageName = "browserify-rsa";
+      version = "4.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz";
+        sha1 = "21e0abfaf6f2029cf2fafb133567a701d4135524";
+      };
+    };
+    "browserify-sign-4.0.4" = {
+      name = "browserify-sign";
+      packageName = "browserify-sign";
+      version = "4.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz";
+        sha1 = "aa4eb68e5d7b658baa6bf6a57e630cbd7a93d298";
+      };
+    };
+    "browserify-zlib-0.2.0" = {
+      name = "browserify-zlib";
+      packageName = "browserify-zlib";
+      version = "0.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz";
+        sha512 = "24488d4s6d901hj9d9jdddapmcvmibbdpjq6nv3bpyjx72546fcqa0vripy0ydsrw1jk6bakfzvynh5i9cz0g59hrmn4ph75d3kdpk7";
+      };
+    };
+    "browserslist-3.2.8" = {
+      name = "browserslist";
+      packageName = "browserslist";
+      version = "3.2.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/browserslist/-/browserslist-3.2.8.tgz";
+        sha512 = "00i65frm5jkbv8pzc13i02fzd39q0ahh653zzjzhq35pz6p0idajfjqg1b7mnnlvxymihcpmd1cfhwaj51hnqjmh4alrg8sjrq6hxaq";
+      };
+    };
+    "browserslist-4.1.1" = {
+      name = "browserslist";
+      packageName = "browserslist";
+      version = "4.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/browserslist/-/browserslist-4.1.1.tgz";
+        sha512 = "3clmw7m8rqcpk4qygqml0750q666n48jv76xgw4v7vsff8yyxylgb8lh9hkfx282pg4sj5ggzzysd2gjmaas88nsicyp930xg1jn6jl";
+      };
+    };
+    "browserslist-4.11.1" = {
+      name = "browserslist";
+      packageName = "browserslist";
+      version = "4.11.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/browserslist/-/browserslist-4.11.1.tgz";
+        sha512 = "3kf0caz4k8wilf978inqj6sgcxbsb9y7rc7m54gv7is132s81fc984wmrh8wl8hglcyvkxwwxm0vd2lf5qz8nx2qc6lca7b83gfn90c";
+      };
+    };
+    "bser-2.1.1" = {
+      name = "bser";
+      packageName = "bser";
+      version = "2.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz";
+        sha512 = "30jby01rqjgx78xnzyysjav12c0cj8dcwd40wprcfh1jn3768cdkb834q1zyf3wivhifi47xqa7jai7x16m1jv1mq4g40f69ws56341";
+      };
+    };
+    "buffer-4.9.2" = {
+      name = "buffer";
+      packageName = "buffer";
+      version = "4.9.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz";
+        sha512 = "1d85syv6ashl8f3a6h553d185cg3vq6nhjqnc80vr2z3bak0c9xbm1jawfk9zs43xz34yih6h6j3bhb3njkahdqpji12fsc4kfsmby6";
+      };
+    };
+    "buffer-from-1.1.1" = {
+      name = "buffer-from";
+      packageName = "buffer-from";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz";
+        sha512 = "3c0m16i3fdv3vlq2zz8dakrnhqvs16gvggj485f91fiaa5v0p7pyhamcdw5fggr7djzd8nshmvz4hgbp7714smqxlld2an28q8if1ri";
+      };
+    };
+    "buffer-indexof-1.1.1" = {
+      name = "buffer-indexof";
+      packageName = "buffer-indexof";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz";
+        sha512 = "3bgz1zhq9ng3gypq825f00p9qi9y6z7wvkkf28nhjlyifnb3lk1dkmbya84k0ja79zv8kmmhvalwcnnz92533ip7pnjp3is1w9cxyp3";
+      };
+    };
+    "buffer-xor-1.0.3" = {
+      name = "buffer-xor";
+      packageName = "buffer-xor";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz";
+        sha1 = "26e61ed1422fb70dd42e6e36729ed51d855fe8d9";
+      };
+    };
+    "buffers-0.1.1" = {
+      name = "buffers";
+      packageName = "buffers";
+      version = "0.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz";
+        sha1 = "b24579c3bed4d6d396aeee6d9a8ae7f5482ab7bb";
+      };
+    };
+    "builtin-status-codes-3.0.0" = {
+      name = "builtin-status-codes";
+      packageName = "builtin-status-codes";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz";
+        sha1 = "85982878e21b98e1c66425e03d0174788f569ee8";
+      };
+    };
+    "bytes-3.0.0" = {
+      name = "bytes";
+      packageName = "bytes";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz";
+        sha1 = "d32815404d689699f85a4ea4fa8755dd13a96048";
+      };
+    };
+    "bytes-3.1.0" = {
+      name = "bytes";
+      packageName = "bytes";
+      version = "3.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz";
+        sha512 = "073ccjmvxf726gcgzy0pksvi8x8r51dq6hyv69sc75ynrin7anwk9q3sqhbbbjhqjjrmq42s5f5gdbcgj2jxai6ldpyq6y2ny78payd";
+      };
+    };
+    "cacache-10.0.4" = {
+      name = "cacache";
+      packageName = "cacache";
+      version = "10.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cacache/-/cacache-10.0.4.tgz";
+        sha512 = "0f1zwi8bbiia995410m24xljd0ra0vk579q7rk48p7mrq9nbilx3qa2rnp7hjdwnvx28zfad0rfdcwyq3blzkb3rk8b9yl77crp960f";
+      };
+    };
+    "cacache-12.0.4" = {
+      name = "cacache";
+      packageName = "cacache";
+      version = "12.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cacache/-/cacache-12.0.4.tgz";
+        sha512 = "00qxfz1yqkizw00vx1948yfzilxv1c4pzxknh5hbwby5cgiyrzb488qwcdff4qdrbwm13skvhpxpshryw30py3s4bpgny98il3lqjvb";
+      };
+    };
+    "cache-base-1.0.1" = {
+      name = "cache-base";
+      packageName = "cache-base";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz";
+        sha512 = "36i943khi87af4gif9r6imjgybqxq9cbd69z2h8p2s2j6scfbhrv7j3n591xl982fmyq29rkwh70a6qdcf3v0piwzfh8n2jf571v9q0";
+      };
+    };
+    "cacheable-lookup-2.0.1" = {
+      name = "cacheable-lookup";
+      packageName = "cacheable-lookup";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-2.0.1.tgz";
+        sha512 = "2714rgpq0wwdfnahlxn4a3g1fr6mf5dj2f3lkl874x991d7ilqvccrja0j4hk8nbc7g7yivvp9b2pf4rrgq3fpj6ghdjwck4fr1phqh";
+      };
+    };
+    "cacheable-request-2.1.4" = {
+      name = "cacheable-request";
+      packageName = "cacheable-request";
+      version = "2.1.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cacheable-request/-/cacheable-request-2.1.4.tgz";
+        sha1 = "0d808801b6342ad33c91df9d0b44dc09b91e5c3d";
+      };
+    };
+    "cacheable-request-7.0.1" = {
+      name = "cacheable-request";
+      packageName = "cacheable-request";
+      version = "7.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.1.tgz";
+        sha512 = "1kmzafhx567pf4kbwdg03gxjx0d1l6j8lnb05y7f66kn8c1szz41kawa2jkf4zndaihac3i1yv7yjg6mrkk2lxs2b0wm7h0lqkjdpcn";
+      };
+    };
+    "call-me-maybe-1.0.1" = {
+      name = "call-me-maybe";
+      packageName = "call-me-maybe";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz";
+        sha1 = "26d208ea89e37b5cbde60250a15f031c16a4d66b";
+      };
+    };
+    "caller-callsite-2.0.0" = {
+      name = "caller-callsite";
+      packageName = "caller-callsite";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz";
+        sha1 = "847e0fce0a223750a9a027c54b33731ad3154134";
+      };
+    };
+    "caller-path-2.0.0" = {
+      name = "caller-path";
+      packageName = "caller-path";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz";
+        sha1 = "468f83044e369ab2010fac5f06ceee15bb2cb1f4";
+      };
+    };
+    "callsites-2.0.0" = {
+      name = "callsites";
+      packageName = "callsites";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz";
+        sha1 = "06eb84f00eea413da86affefacbffb36093b3c50";
+      };
+    };
+    "camel-case-4.1.1" = {
+      name = "camel-case";
+      packageName = "camel-case";
+      version = "4.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/camel-case/-/camel-case-4.1.1.tgz";
+        sha512 = "3llmv9zy6jv6wn9nyxai15vw5zpjjpax70zzsz10gnd55kp1p86x59swnnylp20gjhgdnq5pj4ycfvd85n14bsjf9j82zdqq5cvdxpd";
+      };
+    };
+    "camelcase-3.0.0" = {
+      name = "camelcase";
+      packageName = "camelcase";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz";
+        sha1 = "32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a";
+      };
+    };
+    "camelcase-5.3.1" = {
+      name = "camelcase";
+      packageName = "camelcase";
+      version = "5.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz";
+        sha512 = "0kg17fpj4c7akmpa9x0a3fi5glrc3y5k3ppjcpb3pd02ylg3fnzfdvz0pixd223crbs5980sjaxsk9q8kcqxm5d9cb7rlkv3m614vrg";
+      };
+    };
+    "caniuse-api-3.0.0" = {
+      name = "caniuse-api";
+      packageName = "caniuse-api";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz";
+        sha512 = "2xvajfx062fy4i060qa7p4acawzmcpqs69jmklswq856lyzjq6p8vjgm5zi21ll5gxm7vvyc5xsh9bd30v5bppszr59c19zi2wg1i3f";
+      };
+    };
+    "caniuse-lite-1.0.30001039" = {
+      name = "caniuse-lite";
+      packageName = "caniuse-lite";
+      version = "1.0.30001039";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001039.tgz";
+        sha512 = "3qyz2ijjl61hkbifqpr2k8nrjw9gqlamp914lagh29kf1az6hkslbklljq5ss31n8lblczdvdi3pjjs2hgq71w52sr8gpyk4icdpv29";
+      };
+    };
+    "capture-exit-2.0.0" = {
+      name = "capture-exit";
+      packageName = "capture-exit";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/capture-exit/-/capture-exit-2.0.0.tgz";
+        sha512 = "3m6md2j1rsn26hijf0yfbbfnx6w2jrrqhr2b2xwjc9lyzvypidyz5krczc9wb04z1vq4mgb759ljwn7iggiiigijzhp38lk162zy91y";
+      };
+    };
+    "case-sensitive-paths-webpack-plugin-2.3.0" = {
+      name = "case-sensitive-paths-webpack-plugin";
+      packageName = "case-sensitive-paths-webpack-plugin";
+      version = "2.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.3.0.tgz";
+        sha512 = "1fzkc65mi135002lk75zd133f7k3cda42n14yb5lc6inqj10xpd2d3zyhc3bjq1k7zfdrlkxq9c26mdz48dpd30bqbmbjxwjjfj11pz";
+      };
+    };
+    "caseless-0.12.0" = {
+      name = "caseless";
+      packageName = "caseless";
+      version = "0.12.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz";
+        sha1 = "1b681c21ff84033c826543090689420d187151dc";
+      };
+    };
+    "caw-2.0.1" = {
+      name = "caw";
+      packageName = "caw";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/caw/-/caw-2.0.1.tgz";
+        sha512 = "2wa0gi2wljxw00rvqz454sgdr8yy90z8lhprxjc1prwi695lnzrh6sk0qqhp63h9gmbldyvvzfvm8k1jk0sbv6icdawcss441jky3qa";
+      };
+    };
+    "chainsaw-0.1.0" = {
+      name = "chainsaw";
+      packageName = "chainsaw";
+      version = "0.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz";
+        sha1 = "5eab50b28afe58074d0d58291388828b5e5fbc98";
+      };
+    };
+    "chalk-1.1.3" = {
+      name = "chalk";
+      packageName = "chalk";
+      version = "1.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz";
+        sha1 = "a8115c55e4a702fe4d150abd3872822a7e09fc98";
+      };
+    };
+    "chalk-2.4.1" = {
+      name = "chalk";
+      packageName = "chalk";
+      version = "2.4.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz";
+        sha512 = "1yl5ffjp5w65b9ydnw4vp13n563121hs64xbnajif51grhpqmslaqllj24zm1pfaw9ywvdx69n8ppa3riwlps25k5934zgnbf3pmcrr";
+      };
+    };
+    "chalk-2.4.2" = {
+      name = "chalk";
+      packageName = "chalk";
+      version = "2.4.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz";
+        sha512 = "2wr55z22i274wadq2cvpxga28a8igq9whc4m1q06sz5sn2hc4amradd5vd02wm92vyfg2qrb0bysd5drv7mfmlb2wqdf939v5zvxn1j";
+      };
+    };
+    "chalk-3.0.0" = {
+      name = "chalk";
+      packageName = "chalk";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz";
+        sha512 = "31damxvnvxjdp3hhqfn9nxi6hrw9cmmy5vlf0nqfvns1qhp3ybc0y7viswj1jdxvc0w1f3zapjsl89hx9hcwv2p8jca7m7qczlw2gg0";
+      };
+    };
+    "chardet-0.7.0" = {
+      name = "chardet";
+      packageName = "chardet";
+      version = "0.7.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz";
+        sha512 = "1qg04aw34n3l68g6s6li7pfdspkj3zmb7qsqf096h19jwc34mv8sbhik4xcx9aazys1ycb5k736f4lql46s0rhl361pmlz1r86j4gwr";
+      };
+    };
+    "charenc-0.0.2" = {
+      name = "charenc";
+      packageName = "charenc";
+      version = "0.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz";
+        sha1 = "c0a1d2f3a7092e03774bfa83f14c0fc5790a8667";
+      };
+    };
+    "chokidar-2.1.8" = {
+      name = "chokidar";
+      packageName = "chokidar";
+      version = "2.1.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz";
+        sha512 = "21d2yf3364v025ivy6ak1bh61qvvq9llryh8c1rhvrif1kalx0j996x8m0qs717cgl97q5c40awyv8gi8hbmpgfpl6zvkff6xmm8rk6";
+      };
+    };
+    "chokidar-3.0.2" = {
+      name = "chokidar";
+      packageName = "chokidar";
+      version = "3.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/chokidar/-/chokidar-3.0.2.tgz";
+        sha512 = "0l3pn1afpk9h62fjazidrp2dpgigsqwmpjy92686srm8j8ky8zx8072s00jmvz1mr8g78dj70y0vdg9j1h6m6vfp8sk4di3x3cx30vk";
+      };
+    };
+    "chokidar-3.2.1" = {
+      name = "chokidar";
+      packageName = "chokidar";
+      version = "3.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/chokidar/-/chokidar-3.2.1.tgz";
+        sha512 = "3mkp71nvz0h69nzh9z15is5l5lpmcs7nf5nypdv5s47fi1z1an9qm29677y5j6sviwky0kr82z4cild7f6qxgnpnflyq5gr8qz4ygpy";
+      };
+    };
+    "chokidar-3.3.0" = {
+      name = "chokidar";
+      packageName = "chokidar";
+      version = "3.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz";
+        sha512 = "3hbyi14x38mvx936wbajln4g1l8fcyi8fwvcrhf2jqn0yzcyda1d20q67k445j9bvs5kr7jdhd2s07srb2pnm7hxmjngp2k6wn8lsbl";
+      };
+    };
+    "chownr-1.1.4" = {
+      name = "chownr";
+      packageName = "chownr";
+      version = "1.1.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz";
+        sha512 = "1b03acmav1awkygrda5h64pn8msd6wda119q553hik728i1j72bfqyq7yzn1x7nmw28hvg9mcyh7krsj8vwsq3karnn55mj6smip7cc";
+      };
+    };
+    "chrome-trace-event-1.0.2" = {
+      name = "chrome-trace-event";
+      packageName = "chrome-trace-event";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz";
+        sha512 = "06mh145f12ppkxn7xdzrvh7rrjg9c770rqai08m8r5i31br1ihc96i63dyn0c4arfl1hl0za33kzy5i09x4agz77c11xv7hb33z7vzm";
+      };
+    };
+    "cipher-base-1.0.4" = {
+      name = "cipher-base";
+      packageName = "cipher-base";
+      version = "1.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz";
+        sha512 = "3cm9kdc1sv7pakzlhrc1pazdvg9lk4hv31lximwbcrgmwfzg6imxrndszgx9yzlizknfh2b73cr7b5mfcv50bldpyq6jr5s4zknsj1a";
+      };
+    };
+    "class-utils-0.3.6" = {
+      name = "class-utils";
+      packageName = "class-utils";
+      version = "0.3.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz";
+        sha512 = "1xcqwmfmsbrm2ck76brwiqjmcza655khgh5szh6wngk357i37sgwsga1pbarwzaz9hvzkriqhq6j0z5mv0pmz61cf9wxvk3y5mlzs58";
+      };
+    };
+    "clean-css-4.2.3" = {
+      name = "clean-css";
+      packageName = "clean-css";
+      version = "4.2.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz";
+        sha512 = "0ad50l577m99sgpcdd49zspq8h9n9i3hhngapg9y5q76s7zwdz3hmaw2kc2jg30lk4z3wlyp9kgiyg71dvg0fg89g1xyr3qvq61dhsm";
+      };
+    };
+    "cli-cursor-2.1.0" = {
+      name = "cli-cursor";
+      packageName = "cli-cursor";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz";
+        sha1 = "b35dac376479facc3e94747d41d0d0f5238ffcb5";
+      };
+    };
+    "cli-table-0.3.1" = {
+      name = "cli-table";
+      packageName = "cli-table";
+      version = "0.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cli-table/-/cli-table-0.3.1.tgz";
+        sha1 = "f53b05266a8b1a0b934b3d0821e6e2dc5914ae23";
+      };
+    };
+    "cli-width-2.2.0" = {
+      name = "cli-width";
+      packageName = "cli-width";
+      version = "2.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz";
+        sha1 = "ff19ede8a9a5e579324147b0c11f0fbcbabed639";
+      };
+    };
+    "cliui-3.2.0" = {
+      name = "cliui";
+      packageName = "cliui";
+      version = "3.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz";
+        sha1 = "120601537a916d29940f934da3b48d585a39213d";
+      };
+    };
+    "cliui-4.1.0" = {
+      name = "cliui";
+      packageName = "cliui";
+      version = "4.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz";
+        sha512 = "26knyxdavl3y7kq82vfa094ym3n05vy2h2j5srb9fhhy8l43l0kwlasah5i78jks77zqgc373hbf96xcxv6am042gpbw35x452vwlg0";
+      };
+    };
+    "cliui-5.0.0" = {
+      name = "cliui";
+      packageName = "cliui";
+      version = "5.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz";
+        sha512 = "1fg1afsij2xwc4gpqbyhrp3s7q19w7bmii0ghmdv6cdx6giz3v0yqn25i3g7fw2lpi388jpvaf6nf9z2c7xp7w7psrww7569548d1rx";
+      };
+    };
+    "cliui-6.0.0" = {
+      name = "cliui";
+      packageName = "cliui";
+      version = "6.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz";
+        sha512 = "2nrnc0jqyx39906mqm5rb1svgckj19nfhs2101bm0pmirf4fglfzjzxrfr3si7vfl8bhz84xg9fv8v295y83l6yn8rz0ph2va11pb5p";
+      };
+    };
+    "clone-response-1.0.2" = {
+      name = "clone-response";
+      packageName = "clone-response";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz";
+        sha1 = "d1dc973920314df67fbeb94223b4ee350239e96b";
+      };
+    };
+    "coa-2.0.2" = {
+      name = "coa";
+      packageName = "coa";
+      version = "2.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/coa/-/coa-2.0.2.tgz";
+        sha512 = "1f80c0924lf6b1w99d89a62dbp6sc8mkndhv2gd5lz4l87vca1df8hglf3pd28v1i4x411akwjl3sixwmgf1m8lknw2r78hwqdy77xb";
+      };
+    };
+    "code-point-at-1.1.0" = {
+      name = "code-point-at";
+      packageName = "code-point-at";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz";
+        sha1 = "0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77";
+      };
+    };
+    "collection-visit-1.0.0" = {
+      name = "collection-visit";
+      packageName = "collection-visit";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz";
+        sha1 = "4bc0373c164bc3291b4d368c829cf1a80a59dca0";
+      };
+    };
+    "color-3.1.2" = {
+      name = "color";
+      packageName = "color";
+      version = "3.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/color/-/color-3.1.2.tgz";
+        sha512 = "2k8bl73w917gsvrf34vprlahwjr6wj4al3rmhb25388gk1kkjgma55v1a80766b3slgppl1xgkm32f3b0rbqhvrkxcjq1wvfy2cjx5x";
+      };
+    };
+    "color-convert-1.9.3" = {
+      name = "color-convert";
+      packageName = "color-convert";
+      version = "1.9.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz";
+        sha512 = "0d5pmdh1dh0qbpjrzdczwqkh0jwf8gxhq71mknwlxqz80h1q6kdrpghq4qfp0y4v650ia2jdihmzpb2n8hg00h72lnx05dgvysi9w21";
+      };
+    };
+    "color-convert-2.0.1" = {
+      name = "color-convert";
+      packageName = "color-convert";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz";
+        sha512 = "0ljb8898z3dy87kw5y4xzfajw793q0bqvkp039sk5k3bps50mgjg6iz6fz2klal75vgx3zcv4a6jahx0p5n22lsdzqyz2pvr0z044a5";
+      };
+    };
+    "color-name-1.1.3" = {
+      name = "color-name";
+      packageName = "color-name";
+      version = "1.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz";
+        sha1 = "a7d0558bd89c42f795dd42328f740831ca53bc25";
+      };
+    };
+    "color-name-1.1.4" = {
+      name = "color-name";
+      packageName = "color-name";
+      version = "1.1.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz";
+        sha512 = "102q02y0q23lgfnxmqq3arriahq9jsbkx3pyhcyaqrfzq6zqyiw6xirgn8p36zv5y0znlwbdf620dx537ij4ixn6nqavpcn1gfbxv3l";
+      };
+    };
+    "color-string-1.5.3" = {
+      name = "color-string";
+      packageName = "color-string";
+      version = "1.5.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/color-string/-/color-string-1.5.3.tgz";
+        sha512 = "11p4cihq5874fmyvwkh0fp4dr2syliqsgg610rw46lsav41l6wcm4bgpkrl34gip3cqncw0ppmqwfknm5v02m1fj8qqk8cnlzk84bbl";
+      };
+    };
+    "colors-1.0.3" = {
+      name = "colors";
+      packageName = "colors";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz";
+        sha1 = "0433f44d809680fdeb60ed260f1b0c262e82a40b";
+      };
+    };
+    "colors-1.4.0" = {
+      name = "colors";
+      packageName = "colors";
+      version = "1.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz";
+        sha512 = "2saczc8hcdmgns1cp1g1p7g2sq4yksrik0ffvfkhkavmmgx8haqm034a4c9zj8im6kfjh00n2xi360yqfy7vbsi98zri0943r72mrbb";
+      };
+    };
+    "combined-stream-1.0.8" = {
+      name = "combined-stream";
+      packageName = "combined-stream";
+      version = "1.0.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz";
+        sha512 = "1v09nkip7zpn3k3prkkg53w331rhczpfgcqb0q42i97nafra43l2khl5zvhd4ar0qmh145nmw7944jy8p108ny0xpgy29gf2wqph0qm";
+      };
+    };
+    "commander-2.14.1" = {
+      name = "commander";
+      packageName = "commander";
+      version = "2.14.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/commander/-/commander-2.14.1.tgz";
+        sha512 = "11j7mwxfdnhi3yfkhxjvfkg1mzdsi3wq7iygma6ksmj1f7hfs0z8rpfcysqmy85f67mqvzhda3w1lyy1jqxxm31k799sazbipm7b17r";
+      };
+    };
+    "commander-2.17.1" = {
+      name = "commander";
+      packageName = "commander";
+      version = "2.17.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz";
+        sha512 = "21fbnprzkj53pjsp5wd7f5wa50jrirag11gq351jr8hhrib5gw62kylpvcddv3c2a1vcs1p8llq80wdnflh6lny3frnq7v7l6vi9wy0";
+      };
+    };
+    "commander-2.20.3" = {
+      name = "commander";
+      packageName = "commander";
+      version = "2.20.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz";
+        sha512 = "1qqrwy7z476gqa94kjjyyzyi3x49k28ji7znbc65plrp67yzmpa2yyslh6bl965yl4jqb2fwb2ljzhgcvv2xxj8ab86n5rgryc6958s";
+      };
+    };
+    "commander-3.0.2" = {
+      name = "commander";
+      packageName = "commander";
+      version = "3.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/commander/-/commander-3.0.2.tgz";
+        sha512 = "2ilf2mvb0dww4ghk17nncvymsankhk01lf7l0vls1dzf25ih2djz36n8xz6xh2rh5iacn1i7azfcfm80wyf0rc81f53q17q400z9ahr";
+      };
+    };
+    "commander-4.1.1" = {
+      name = "commander";
+      packageName = "commander";
+      version = "4.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz";
+        sha512 = "1cblg9al7s2w55kglhr3skkiw5m55apxk6idj5j0d0nrxi2djizbz9gv3cap5dd16acshaikaxzwx009vzdl08z2zrhik3433rsdqil";
+      };
+    };
+    "common-tags-1.8.0" = {
+      name = "common-tags";
+      packageName = "common-tags";
+      version = "1.8.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/common-tags/-/common-tags-1.8.0.tgz";
+        sha512 = "2vvj4chc55svz1wkvkg2r38n3n0qs238fgcjpnn1hrz9w1hd3r23j4dc2vcz61can4c8m0n94bwa9j0j3wcp56wn6zra6mdwz9a1zp8";
+      };
+    };
+    "commondir-1.0.1" = {
+      name = "commondir";
+      packageName = "commondir";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz";
+        sha1 = "ddd800da0c66127393cca5950ea968a3aaf1253b";
+      };
+    };
+    "compare-versions-3.6.0" = {
+      name = "compare-versions";
+      packageName = "compare-versions";
+      version = "3.6.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/compare-versions/-/compare-versions-3.6.0.tgz";
+        sha512 = "029zalmhpzy6rz52kpc6z465asw21dl1jhmsvijp9z3l9hjvp1zq82r0bsm5d4hc8z17f4hs5drv3pbdy456bmfxs0q1krmikc1z82v";
+      };
+    };
+    "component-emitter-1.3.0" = {
+      name = "component-emitter";
+      packageName = "component-emitter";
+      version = "1.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz";
+        sha512 = "136ravx3m3gf0ca84sf21hj47wmpqyjzmx6yvhj0b14mga7xcxfcgdc7yj9z8klcbr4yfqzy88fksmf233qx68a9ysw7yh1lixyrpa5";
+      };
+    };
+    "compressible-2.0.18" = {
+      name = "compressible";
+      packageName = "compressible";
+      version = "2.0.18";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz";
+        sha512 = "13341lfj8d36v6gha16xmv92w4875z8irqdbns3jxlkc3a63aswys5sajq97y1sd42l08inw1l0s51r4l9lv20w6gy14nsxzvnfnp80";
+      };
+    };
+    "compression-1.7.4" = {
+      name = "compression";
+      packageName = "compression";
+      version = "1.7.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz";
+        sha512 = "24kqcbwm455isy2yiyfrdrsh011qi09pbgylw1jws2yfmiwmwp2j8pmax52c41z3x1n84v1j5va29dnxwygkl4pw599b9gx6c7qi94d";
+      };
+    };
+    "concat-map-0.0.1" = {
+      name = "concat-map";
+      packageName = "concat-map";
+      version = "0.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz";
+        sha1 = "d8a96bd77fd68df7793a73036a3ba0d5405d477b";
+      };
+    };
+    "concat-stream-1.5.2" = {
+      name = "concat-stream";
+      packageName = "concat-stream";
+      version = "1.5.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/concat-stream/-/concat-stream-1.5.2.tgz";
+        sha1 = "708978624d856af41a5a741defdd261da752c266";
+      };
+    };
+    "concat-stream-1.6.2" = {
+      name = "concat-stream";
+      packageName = "concat-stream";
+      version = "1.6.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz";
+        sha512 = "05nnf80j9ls12y3cw2dfnc6rmand3ya5sx9cqn9dgg19ljzdnyfjjv8ig79xi73gr2y4rkfzn9wjip2zzwp5n2d49njd3ki2a1c3cfv";
+      };
+    };
+    "config-chain-1.1.12" = {
+      name = "config-chain";
+      packageName = "config-chain";
+      version = "1.1.12";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/config-chain/-/config-chain-1.1.12.tgz";
+        sha512 = "2hg7rni4gx8l765i8qzkp9dv69c8r06i8rxxkkkrsklbd8iz6ingxnp10r4fqqrm9jxy3gp8yp0lzpybwdf27kq49abkyxwrchqwmvb";
+      };
+    };
+    "connect-history-api-fallback-1.6.0" = {
+      name = "connect-history-api-fallback";
+      packageName = "connect-history-api-fallback";
+      version = "1.6.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz";
+        sha512 = "0p9s5aqb76hamj9z64zd53ndh5r1jv76iw97hwrylmwwjprjn1246hrr5nvp5vs1xwwipq6dv7zj4qwywbn3n4cxc3llfdzvbvh37kv";
+      };
+    };
+    "console-browserify-1.2.0" = {
+      name = "console-browserify";
+      packageName = "console-browserify";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz";
+        sha512 = "168x7bp4xr522yw92himv9xv14q336ps1kkg79qcmarg3q4yzpd52pa8x8zgq11b6996f8053799k6365437si3pk85w5z4y8xiijb4";
+      };
+    };
+    "constants-browserify-1.0.0" = {
+      name = "constants-browserify";
+      packageName = "constants-browserify";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz";
+        sha1 = "c20b96d8c617748aaf1c16021760cd27fcb8cb75";
+      };
+    };
+    "content-disposition-0.5.2" = {
+      name = "content-disposition";
+      packageName = "content-disposition";
+      version = "0.5.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz";
+        sha1 = "0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4";
+      };
+    };
+    "content-disposition-0.5.3" = {
+      name = "content-disposition";
+      packageName = "content-disposition";
+      version = "0.5.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz";
+        sha512 = "3976ggkw1lp21a6m3s19blb9a74kq7a0spw47v0m3vvi1k5wiamrsn20slcr9byx80x2la2sppkwjp7x10gc58142dl7412pvpv84qk";
+      };
+    };
+    "content-type-1.0.4" = {
+      name = "content-type";
+      packageName = "content-type";
+      version = "1.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz";
+        sha512 = "1f4y61wc913jrnga7nny83gzf9l2488q6sl1ry9lbwgh5x5d3va0xcc0xrmjk6gdxl6d4r6rsk800xp5bazhjrx05yx1wpc8c8gg0w4";
+      };
+    };
+    "convert-source-map-1.7.0" = {
+      name = "convert-source-map";
+      packageName = "convert-source-map";
+      version = "1.7.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz";
+        sha512 = "2hgf7brri4yaflx3y24d2cvznsk0km17mq8mp7sb2hhskf45hcamlgf8vzzbimw36lw128bjbf442p2rx96d1bhn9sk044p69gn8lp0";
+      };
+    };
+    "cookie-0.3.1" = {
+      name = "cookie";
+      packageName = "cookie";
+      version = "0.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz";
+        sha1 = "e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb";
+      };
+    };
+    "cookie-0.4.0" = {
+      name = "cookie";
+      packageName = "cookie";
+      version = "0.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz";
+        sha512 = "1g7bscknfpc6zgznz77hvll6cy5m9jv7zg9nkpdqzmgi0vhv75kh8iyqf6rdslkml47l3jihsz7hy0i8x5n6bfx9ba0kvvrp9y7qypq";
+      };
+    };
+    "cookie-signature-1.0.6" = {
+      name = "cookie-signature";
+      packageName = "cookie-signature";
+      version = "1.0.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz";
+        sha1 = "e303a882b342cc3ee8ca513a79999734dab3ae2c";
+      };
+    };
+    "copy-concurrently-1.0.5" = {
+      name = "copy-concurrently";
+      packageName = "copy-concurrently";
+      version = "1.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz";
+        sha512 = "3c1ggiqqnjgqlwdnimx94gm176c8rjsrih5qw2lbm642l8x7grx07v065k4j89c1p0adkm7v6sz11drb6j6sp51np2m1cazvycnhrvz";
+      };
+    };
+    "copy-descriptor-0.1.1" = {
+      name = "copy-descriptor";
+      packageName = "copy-descriptor";
+      version = "0.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz";
+        sha1 = "676f6eb3c39997c2ee1ac3a924fd6124748f578d";
+      };
+    };
+    "copy-webpack-plugin-5.1.1" = {
+      name = "copy-webpack-plugin";
+      packageName = "copy-webpack-plugin";
+      version = "5.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-5.1.1.tgz";
+        sha512 = "1p74sgd6krkddnl160vhab1v634p3n24fy8nzbs7hr9l1snhwxslv3c2xb22599gcc96r3g0m5b9ngx3a17gc3m82ij0xxwj3jlqpiz";
+      };
+    };
+    "core-js-2.6.11" = {
+      name = "core-js";
+      packageName = "core-js";
+      version = "2.6.11";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz";
+        sha512 = "1db6yjq48a8kkrfrxd0miblcf7nk2b4afgpr8dfgjl3jvz3xclvrqmz590hx2h59jh79lgl35r101lw5jqs46qybizdbpgzljjyf277";
+      };
+    };
+    "core-js-3.6.4" = {
+      name = "core-js";
+      packageName = "core-js";
+      version = "3.6.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/core-js/-/core-js-3.6.4.tgz";
+        sha512 = "35hfghyllz0wqcz293wdsy4vry8yjx8m9b7f1gr4s8m528d4vqiva2na7b5mwddj0jzrfhimzvzpm9gvykrbqkm47v9708d4wcq75p2";
+      };
+    };
+    "core-util-is-1.0.2" = {
+      name = "core-util-is";
+      packageName = "core-util-is";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz";
+        sha1 = "b5fd54220aa2bc5ab57aab7140c940754503c1a7";
+      };
+    };
+    "cosmiconfig-2.2.2" = {
+      name = "cosmiconfig";
+      packageName = "cosmiconfig";
+      version = "2.2.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-2.2.2.tgz";
+        sha512 = "3j2bwqqxpllfpdbnnjl2n380q8mcvz08p2xi5c7kzhqrscl8f3lmpa11jzsn76b5q2rz4604bffg2vxbbx4rrlmvgr82g8500pmf8qs";
+      };
+    };
+    "cosmiconfig-5.2.1" = {
+      name = "cosmiconfig";
+      packageName = "cosmiconfig";
+      version = "5.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz";
+        sha512 = "287zy383n43wsxg7y8jwzzf3slyn945k312ilkg7l7c96j458cy25jab60692lb1zvggrcm28hilkr6vsp2garryggshj1mgaqn1bhz";
+      };
+    };
+    "create-ecdh-4.0.3" = {
+      name = "create-ecdh";
+      packageName = "create-ecdh";
+      version = "4.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz";
+        sha512 = "1mhn55gf43qsdrp2klyyyxqjsd5mw9l6s51vsfj7wl44pq7ymfw68r8wkd4yd8dd6adg3k6q18sddxfjljr0gbk56lh3cqfyd00gc8r";
+      };
+    };
+    "create-hash-1.2.0" = {
+      name = "create-hash";
+      packageName = "create-hash";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz";
+        sha512 = "055xaldi3hy1bjxhvznh3470j1kq2xk827mxal79bgqik3lblax6s4inxqby27ymgcghl2hn7wnx9fnacmyq3q93hk6y327cc41nkfg";
+      };
+    };
+    "create-hmac-1.1.7" = {
+      name = "create-hmac";
+      packageName = "create-hmac";
+      version = "1.1.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz";
+        sha512 = "0p2jhk94k3as67lhrr1jyljkr0y65snxjzqnix0nifnfcanhilccrzkc47gwlg5wy0m8l1gv12lj78ivgmw5m1ww4f8iylr52bbv49h";
+      };
+    };
+    "crocks-0.12.1" = {
+      name = "crocks";
+      packageName = "crocks";
+      version = "0.12.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/crocks/-/crocks-0.12.1.tgz";
+        sha512 = "0qic3mmpra56jzjnkqhc1pq1wzzlsacpl4r9a7c1qks0dkfw1lvva0iyqhjkp1zjvyf7d55vcidmlxpc17x4y9pbx858gk600kr386s";
+      };
+    };
+    "cross-spawn-5.0.1" = {
+      name = "cross-spawn";
+      packageName = "cross-spawn";
+      version = "5.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.0.1.tgz";
+        sha1 = "a3bbb302db2297cbea3c04edf36941f4613aa399";
+      };
+    };
+    "cross-spawn-5.1.0" = {
+      name = "cross-spawn";
+      packageName = "cross-spawn";
+      version = "5.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz";
+        sha1 = "e8bd0efee58fcff6f8f94510a0a554bbfa235449";
+      };
+    };
+    "cross-spawn-6.0.5" = {
+      name = "cross-spawn";
+      packageName = "cross-spawn";
+      version = "6.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz";
+        sha512 = "1csj16gwq9riz0pm73dlxhbnsl1r3ldc5v0aincwj71ambi6xf3kc1kgsbwaakd8rj16k4mrli2syrjd57g6cr81zdzivdd2jn4ndbr";
+      };
+    };
+    "cross-spawn-7.0.0" = {
+      name = "cross-spawn";
+      packageName = "cross-spawn";
+      version = "7.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.0.tgz";
+        sha512 = "2vnqmy0kzk78wrwyz8533a4li5x1gx1mxj5qi73v17sxis3fsxhamlhblqdn06nkvj09mphm72ivjinpa7l6s3d0xki655nq94gqkz9";
+      };
+    };
+    "cross-spawn-7.0.1" = {
+      name = "cross-spawn";
+      packageName = "cross-spawn";
+      version = "7.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.1.tgz";
+        sha512 = "21fi60ixr252k0gn4mwbd6k36fhbw4mjl75jq6h49yzqm47mgfaapnzb2zb8nvlaf8yxq5n4zzgbb371y3j0z36vx1mmh0jrsizifxv";
+      };
+    };
+    "cross-spawn-7.0.2" = {
+      name = "cross-spawn";
+      packageName = "cross-spawn";
+      version = "7.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.2.tgz";
+        sha512 = "33hqaimyh16rpn80vgg92ihza7cvx5xwnxadalkzsag2sifp40w1q90wpm9ayz4k6scqcnc17c8wfmc22qib1khzm582jxp07qqcgiw";
+      };
+    };
+    "crypt-0.0.2" = {
+      name = "crypt";
+      packageName = "crypt";
+      version = "0.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz";
+        sha1 = "88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b";
+      };
+    };
+    "crypto-browserify-3.12.0" = {
+      name = "crypto-browserify";
+      packageName = "crypto-browserify";
+      version = "3.12.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz";
+        sha512 = "1d3mrhqlay037azmjp2ml5a8yyls9ijdhilv6f0znz0ajgfm972yr9bhm78wqi09p4crc3shgflk50jc63zijsqv777ikkyi2j2qgkz";
+      };
+    };
+    "css-color-names-0.0.4" = {
+      name = "css-color-names";
+      packageName = "css-color-names";
+      version = "0.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz";
+        sha1 = "808adc2e79cf84738069b646cb20ec27beb629e0";
+      };
+    };
+    "css-declaration-sorter-4.0.1" = {
+      name = "css-declaration-sorter";
+      packageName = "css-declaration-sorter";
+      version = "4.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-4.0.1.tgz";
+        sha512 = "02cfxb0d2yngcgfhk64i1sgg22sg0qd0llh8hkd5k7zwm7skwlwdibag8dv0zszdwj1mf2kjg9qb10zxichaafngqa4846jli451k05";
+      };
+    };
+    "css-loader-3.4.2" = {
+      name = "css-loader";
+      packageName = "css-loader";
+      version = "3.4.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/css-loader/-/css-loader-3.4.2.tgz";
+        sha512 = "36dsndmik7z39c4mvjpjdkjw44n2lnvkafsr6gm0xk9p4ys04j5d2j8m1zkwsmhzcd1jnlgx0hx2lndlzxgjb994fs89ljksv6vi2ld";
+      };
+    };
+    "css-select-1.2.0" = {
+      name = "css-select";
+      packageName = "css-select";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz";
+        sha1 = "2b3a110539c5355f1cd8d314623e870b121ec858";
+      };
+    };
+    "css-select-2.1.0" = {
+      name = "css-select";
+      packageName = "css-select";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz";
+        sha512 = "16wjx4f410fs6vdg0hgmf0b437d19f9gx73pbb9bj0l2dkrwiin4kg3rk8as74m6lr29kl05csjms6dwjcwsbssvl3vmh5908nkpa8f";
+      };
+    };
+    "css-select-base-adapter-0.1.1" = {
+      name = "css-select-base-adapter";
+      packageName = "css-select-base-adapter";
+      version = "0.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz";
+        sha512 = "3prww0p33p31w3r3qw6hlmqabd6s1vgjb73pjv4xiy63nfb56yjhby47zpnj4q19abvvchrkbh7n6hzcgyw34zly8s05ldv25wmw1cd";
+      };
+    };
+    "css-tree-1.0.0-alpha.37" = {
+      name = "css-tree";
+      packageName = "css-tree";
+      version = "1.0.0-alpha.37";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz";
+        sha512 = "27dw695h47z8hlav2dn6mcm8fxli9gljif9jiwdxdvg70yn4129lpwwiq53mx4anajcxl28w82zvwjk8w6x34qjhga3x7rb1lk5dk0c";
+      };
+    };
+    "css-tree-1.0.0-alpha.39" = {
+      name = "css-tree";
+      packageName = "css-tree";
+      version = "1.0.0-alpha.39";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.39.tgz";
+        sha512 = "2fay50khaq33f27bwnjc7cxvny8xb7y7fnfdrp8ffcxyika56mmbiw8wk05dw1djdvxw5475jn16fy6b14z6zfvyi378001i08y8jzd";
+      };
+    };
+    "css-what-2.1.3" = {
+      name = "css-what";
+      packageName = "css-what";
+      version = "2.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/css-what/-/css-what-2.1.3.tgz";
+        sha512 = "092jz28b0dcfww936mpi3blcr79h3dzl0ksq69ismfks6q03vfm23d7i271jpvymy7fs9d7mqak1m1vlw6wfpzfhxgj6rmf7yh0zqbb";
+      };
+    };
+    "css-what-3.2.1" = {
+      name = "css-what";
+      packageName = "css-what";
+      version = "3.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/css-what/-/css-what-3.2.1.tgz";
+        sha512 = "0djs0gslzbmmdrlzzd6wqvil6dnjirpdpfb5hxd3gdswxkyj4caxwmak6nabgn6spnm9p0xbb8hlqdwp68fbqp4nfkgqklhr2ian0sv";
+      };
+    };
+    "cssesc-3.0.0" = {
+      name = "cssesc";
+      packageName = "cssesc";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz";
+        sha512 = "1bgy350qm3f9vcr9yssaj62kkfiqf3fkdfw0z7xqy7b9qy4p8774n3460wzsh9a1ra26s1msfs2gnrn9jza21i76mkmvmyar0jzydpx";
+      };
+    };
+    "cssnano-4.1.10" = {
+      name = "cssnano";
+      packageName = "cssnano";
+      version = "4.1.10";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cssnano/-/cssnano-4.1.10.tgz";
+        sha512 = "1lr95m334m2kzy2l8l9arg688wi21ha5wslfm9kh8ks00j546fzy3sw8m83ccmgkansp56v9xxkgmwjz2kajnnrh08zzqw7bvwg42g7";
+      };
+    };
+    "cssnano-preset-default-4.0.7" = {
+      name = "cssnano-preset-default";
+      packageName = "cssnano-preset-default";
+      version = "4.0.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-4.0.7.tgz";
+        sha512 = "2q4cndyhj7jwz0mjwpavg3vggb703pmxrg1h06aqlm752q71misnkga66j4imxwpc3fidk5g6pgp05fzp966wsx18grvsm13lghfin7";
+      };
+    };
+    "cssnano-util-get-arguments-4.0.0" = {
+      name = "cssnano-util-get-arguments";
+      packageName = "cssnano-util-get-arguments";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cssnano-util-get-arguments/-/cssnano-util-get-arguments-4.0.0.tgz";
+        sha1 = "ed3a08299f21d75741b20f3b81f194ed49cc150f";
+      };
+    };
+    "cssnano-util-get-match-4.0.0" = {
+      name = "cssnano-util-get-match";
+      packageName = "cssnano-util-get-match";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cssnano-util-get-match/-/cssnano-util-get-match-4.0.0.tgz";
+        sha1 = "c0e4ca07f5386bb17ec5e52250b4f5961365156d";
+      };
+    };
+    "cssnano-util-raw-cache-4.0.1" = {
+      name = "cssnano-util-raw-cache";
+      packageName = "cssnano-util-raw-cache";
+      version = "4.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cssnano-util-raw-cache/-/cssnano-util-raw-cache-4.0.1.tgz";
+        sha512 = "105dpashgi6r1x5yxknn3c9ksn3bj04hgzy3q1jv4h6l1j3zjgp1nm6kckmc5j58cw9xirccvlpamnbwiynag4jwzr60vxncasrifx8";
+      };
+    };
+    "cssnano-util-same-parent-4.0.1" = {
+      name = "cssnano-util-same-parent";
+      packageName = "cssnano-util-same-parent";
+      version = "4.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz";
+        sha512 = "3apdjffzy480hz1vghhhah8a90d1ah2vz624apbn2gn7847v4mpjfz7phwk959wfs11fqp4md9vbb25850fjmhh0f488aiywvjb3hjr";
+      };
+    };
+    "csso-4.0.3" = {
+      name = "csso";
+      packageName = "csso";
+      version = "4.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/csso/-/csso-4.0.3.tgz";
+        sha512 = "0fk58wf7qcd30fdfrrwvhh9swyrlzbz63z9kkmhq2557c32627dzjkh8w2ha000ngbsc6w19249lpbn2wzb3s8978mlflii5fkyrg9l";
+      };
+    };
+    "cycle-1.0.3" = {
+      name = "cycle";
+      packageName = "cycle";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz";
+        sha1 = "21e80b2be8580f98b468f379430662b046c34ad2";
+      };
+    };
+    "cyclist-1.0.1" = {
+      name = "cyclist";
+      packageName = "cyclist";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz";
+        sha1 = "596e9698fd0c80e12038c2b82d6eb1b35b6224d9";
+      };
+    };
+    "dashdash-1.14.1" = {
+      name = "dashdash";
+      packageName = "dashdash";
+      version = "1.14.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz";
+        sha1 = "853cfa0f7cbe2fed5de20326b8dd581035f6e2f0";
+      };
+    };
+    "debug-2.6.9" = {
+      name = "debug";
+      packageName = "debug";
+      version = "2.6.9";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz";
+        sha512 = "0q0fsr8bk1m83z0am0h2xn09vyfcf18adscxms8hclznwks1aihsisd96h8npx0idq5wwnypnqrkyk25m5d9zh3dk7rjs29nybc8bkc";
+      };
+    };
+    "debug-3.2.6" = {
+      name = "debug";
+      packageName = "debug";
+      version = "3.2.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz";
+        sha512 = "1cyv14044rfh792n1hhsa44kk8dk95zk14w96i49gwq6g9wi6h9vn90xaragfy7rvggqvj178l5f16c78g47xgrwhjx3bp7zs6pxscr";
+      };
+    };
+    "debug-4.1.1" = {
+      name = "debug";
+      packageName = "debug";
+      version = "4.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz";
+        sha512 = "1kmf9j5pka2rsljg5x6shniwmgs9444ksgdn0d3fjmis7yghxxn2zj526s36ip8rmpfni9zpj8z74w7irax32a67j59xw38wk6hi055";
+      };
+    };
+    "decamelize-1.2.0" = {
+      name = "decamelize";
+      packageName = "decamelize";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz";
+        sha1 = "f6534d15148269b20352e7bee26f501f9a191290";
+      };
+    };
+    "decode-uri-component-0.2.0" = {
+      name = "decode-uri-component";
+      packageName = "decode-uri-component";
+      version = "0.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz";
+        sha1 = "eb3913333458775cb84cd1a1fae062106bb87545";
+      };
+    };
+    "decompress-response-3.3.0" = {
+      name = "decompress-response";
+      packageName = "decompress-response";
+      version = "3.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz";
+        sha1 = "80a4dd323748384bfa248083622aedec982adff3";
+      };
+    };
+    "decompress-response-5.0.0" = {
+      name = "decompress-response";
+      packageName = "decompress-response";
+      version = "5.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/decompress-response/-/decompress-response-5.0.0.tgz";
+        sha512 = "0rnf28sjgvk6j7kjw5pw6604hzpvbb6w3j8p1rykk7klpyd4568r0adaaiqylsg2xnhz38lxg66zp5bl3zr5wmjbcl6iigf4rdmddjc";
+      };
+    };
+    "deep-equal-0.2.2" = {
+      name = "deep-equal";
+      packageName = "deep-equal";
+      version = "0.2.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/deep-equal/-/deep-equal-0.2.2.tgz";
+        sha1 = "84b745896f34c684e98f2ce0e42abaf43bba017d";
+      };
+    };
+    "deep-equal-1.1.1" = {
+      name = "deep-equal";
+      packageName = "deep-equal";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz";
+        sha512 = "3r4bwyfb492cwv2lz8slgy0ch8gx4wx1smr39qzjscnqvwswnk3r748qdmh8i5867sdm017rwjj2fgl3d2c3p4qz08mgab20zj5rpy9";
+      };
+    };
+    "deep-extend-0.6.0" = {
+      name = "deep-extend";
+      packageName = "deep-extend";
+      version = "0.6.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz";
+        sha512 = "0wc0sqg1aqx864bxf8xa4j8ncrc8rcvmiaj1sp3x1np2i8hdjybzjfd0w9gbf1yasmwycwzzg1mz6smr3q42hhv4pjx2qcgwqhg3q9c";
+      };
+    };
+    "default-gateway-4.2.0" = {
+      name = "default-gateway";
+      packageName = "default-gateway";
+      version = "4.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/default-gateway/-/default-gateway-4.2.0.tgz";
+        sha512 = "2067xswfnhdrq76l5wqibx50y8r46q0sdbkax2nxq6gq0ljjrrmmq95k99vnkgcz5xc7r1hhv0w7bw978krjxvdmnawam3ma2nhraw7";
+      };
+    };
+    "defer-to-connect-2.0.0" = {
+      name = "defer-to-connect";
+      packageName = "defer-to-connect";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.0.tgz";
+        sha512 = "0i5i9bz9viv04jwx2lnk4485zggbrsnljkfx7dr2n4iaikvgdf8lfmx98wyyq7ba92azw0pr42fxlq2sadwfka64ksjffbg9rvzd0kd";
+      };
+    };
+    "define-properties-1.1.3" = {
+      name = "define-properties";
+      packageName = "define-properties";
+      version = "1.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz";
+        sha512 = "1fsa8nx7qgi958fykj36cndsf8ygj3132if6k4a36mkf11bl2j2gn7dn2nz07mfsygkx0415yxrjpzx8j369z1767fvr57nm1h9zjnw";
+      };
+    };
+    "define-property-0.2.5" = {
+      name = "define-property";
+      packageName = "define-property";
+      version = "0.2.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz";
+        sha1 = "c35b1ef918ec3c990f9a5bc57be04aacec5c8116";
+      };
+    };
+    "define-property-1.0.0" = {
+      name = "define-property";
+      packageName = "define-property";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz";
+        sha1 = "769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6";
+      };
+    };
+    "define-property-2.0.2" = {
+      name = "define-property";
+      packageName = "define-property";
+      version = "2.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz";
+        sha512 = "1hrk3pzr4hyhfnrjy1msrlj2zh769x4l35q9fq0a2cy2glq3h1iwjkpmvz39y9idwy71h9hd98lydi92485bzkff1dzm70wbr8vc0lg";
+      };
+    };
+    "del-4.1.1" = {
+      name = "del";
+      packageName = "del";
+      version = "4.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/del/-/del-4.1.1.tgz";
+        sha512 = "1fkk8r4abk9009whl0yqapv13rjzj6mr01ghkxpbjkrvr6a6n6hg492mdr72wf3dc13zp3dmzq6z4bzm31h59q7q4anjgrf988sw0a3";
+      };
+    };
+    "delayed-stream-1.0.0" = {
+      name = "delayed-stream";
+      packageName = "delayed-stream";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz";
+        sha1 = "df3ae199acadfb7d440aaae0b29e2272b24ec619";
+      };
+    };
+    "depd-1.1.1" = {
+      name = "depd";
+      packageName = "depd";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz";
+        sha1 = "5783b4e1c459f06fa5ca27f991f3d06e7a310359";
+      };
+    };
+    "depd-1.1.2" = {
+      name = "depd";
+      packageName = "depd";
+      version = "1.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz";
+        sha1 = "9bcd52e14c097763e749b274c4346ed2e560b5a9";
+      };
+    };
+    "des.js-1.0.1" = {
+      name = "des.js";
+      packageName = "des.js";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz";
+        sha512 = "085ljc5q2yk3jabd61p91n821q4prv13qalbfni9ybcb900b4mmcdnndi5b5prfs9wybp13asd13shlxgrbsgvyfx7nbgvby6jkhhj3";
+      };
+    };
+    "destroy-1.0.4" = {
+      name = "destroy";
+      packageName = "destroy";
+      version = "1.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz";
+        sha1 = "978857442c44749e4206613e37946205826abd80";
+      };
+    };
+    "detect-node-2.0.4" = {
+      name = "detect-node";
+      packageName = "detect-node";
+      version = "2.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/detect-node/-/detect-node-2.0.4.tgz";
+        sha512 = "0mncqs8asq6722qr5jcv5bwi1653nd4s61s9mb9iyk3jkv83w9iynwjfd6ynp1jwsmr7qaspk6yd1x8c05qi9pxikikwfkbnajd3334";
+      };
+    };
+    "detect-port-alt-1.1.6" = {
+      name = "detect-port-alt";
+      packageName = "detect-port-alt";
+      version = "1.1.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/detect-port-alt/-/detect-port-alt-1.1.6.tgz";
+        sha512 = "3jmpnxszsgf863rw2247kalaihrslvrsp49qvnhymgx1skhhsfs51nkf3galxkn5lk39zw9p53xqbpdy620q6j60i2z5acbvy935m76";
+      };
+    };
+    "diffie-hellman-5.0.3" = {
+      name = "diffie-hellman";
+      packageName = "diffie-hellman";
+      version = "5.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz";
+        sha512 = "37186rz3862gn294acnwnm59jwm62x1rz9ca0y5anvmj0a7abs4rhw974qp1j684qpd4rxb8c2kagv21hapxfddr2q72zvyv7ya19lj";
+      };
+    };
+    "dir-glob-2.2.2" = {
+      name = "dir-glob";
+      packageName = "dir-glob";
+      version = "2.2.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz";
+        sha512 = "2rlgbmwy8bl5xqrwifdqhggx21ac4c8k6vgq7ia2h6cxmaiprrlm1p99cn4hb4dmax9wwk4vx96bc50b7ngxgx74fvqbk0njj5w3lkz";
+      };
+    };
+    "dir-glob-3.0.1" = {
+      name = "dir-glob";
+      packageName = "dir-glob";
+      version = "3.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz";
+        sha512 = "0h761rklv8qk0vhv6ms98gsvdiyk8455iqqh6wh8dfal5xjx87gmmpyg7773zdrxwvhnzw58pan4rdqjfwkhcv653gsbq4is6kxcjjs";
+      };
+    };
+    "dns-equal-1.0.0" = {
+      name = "dns-equal";
+      packageName = "dns-equal";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz";
+        sha1 = "b39e7f1da6eb0a75ba9c17324b34753c47e0654d";
+      };
+    };
+    "dns-packet-1.3.1" = {
+      name = "dns-packet";
+      packageName = "dns-packet";
+      version = "1.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.1.tgz";
+        sha512 = "19g682cvkba33mwrism28hibd2nv9xd16k5bj807jx3ih1cc7ff9dn8chmfjnqgglzl6lq3m3jarxng9vbarccgchd0aq118d15yk6i";
+      };
+    };
+    "dns-txt-2.0.2" = {
+      name = "dns-txt";
+      packageName = "dns-txt";
+      version = "2.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz";
+        sha1 = "b91d806f5d27188e4ab3e7d107d881a1cc4642b6";
+      };
+    };
+    "dom-converter-0.2.0" = {
+      name = "dom-converter";
+      packageName = "dom-converter";
+      version = "0.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz";
+        sha512 = "06bmys00dd8r5s4k2xi892s3xhgwnwj704y2jbpd2bgdm0vvmv0wv81npa6bfb2s7jvk2ny516cxhfy0jpjmj4qhzywlf6zhfjg5pc1";
+      };
+    };
+    "dom-serializer-0.2.2" = {
+      name = "dom-serializer";
+      packageName = "dom-serializer";
+      version = "0.2.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz";
+        sha512 = "3v6s9yk4g6cw8chgrba79rbahiqw782013df898df7k7d81n69x2135qashgf23q59zr3w42qncyf4hszlll8knkhv0xccifdplzz6v";
+      };
+    };
+    "domain-browser-1.2.0" = {
+      name = "domain-browser";
+      packageName = "domain-browser";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz";
+        sha512 = "1fcxv8rzfhs99afvhji7bs5ppxwn9mw040ixdgvkm6iabz72q61arly2lr57086rjn4g2vkb3rkih1cyc7z35kzv1jjciwyrs4g4y4f";
+      };
+    };
+    "domelementtype-1.3.1" = {
+      name = "domelementtype";
+      packageName = "domelementtype";
+      version = "1.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz";
+        sha512 = "3gmb8frh13hzm986ggv14h63h5033jp045mvy1wrcj9j56j822a86arwq7x743i6glkv1bw6qwqriivypd0icbkzi492cm96kwq28h5";
+      };
+    };
+    "domelementtype-2.0.1" = {
+      name = "domelementtype";
+      packageName = "domelementtype";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz";
+        sha512 = "00vkhxlz4gkgfqzkp7faclfand3fr36zi4lpr50rjwbx54nfpr2fy612p2ixzpysqi28nfyzznngx5gvgcd13b52iy6ar8q7d88fwz4";
+      };
+    };
+    "domhandler-2.4.2" = {
+      name = "domhandler";
+      packageName = "domhandler";
+      version = "2.4.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz";
+        sha512 = "307i53zii3hv9zr3skxhp9pxa09ki0xwx9q1k7mxnq3hanjanlpr1mmavfzz68r2h6cl1bnv2836plrhk02rpa7yfzrpdq73pib88i6";
+      };
+    };
+    "domutils-1.5.1" = {
+      name = "domutils";
+      packageName = "domutils";
+      version = "1.5.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz";
+        sha1 = "dcd8488a26f563d61079e48c9f7b7e32373682cf";
+      };
+    };
+    "domutils-1.7.0" = {
+      name = "domutils";
+      packageName = "domutils";
+      version = "1.7.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz";
+        sha512 = "076s2v293f9jixaddq6qmjc76y3z0kqddmjb4nclydp23y0jzpg6f7h32j6adilfdjxwwhxkclrhc1vn7rbsidvzcq32dkzq9fpc1rf";
+      };
+    };
+    "dot-case-3.0.3" = {
+      name = "dot-case";
+      packageName = "dot-case";
+      version = "3.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/dot-case/-/dot-case-3.0.3.tgz";
+        sha512 = "1w5d7iardzdlbrww41km4v8wmhlzbiizk4jvr4n95xdqrwg228v0jfbkvc3vxjvl0vr0d8dfv5wlr8102z3rc7ikcgj92ci1sd0877f";
+      };
+    };
+    "dot-prop-5.2.0" = {
+      name = "dot-prop";
+      packageName = "dot-prop";
+      version = "5.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/dot-prop/-/dot-prop-5.2.0.tgz";
+        sha512 = "3afnifh0aygp94kbnxph4rkg71zmgx2lwv2hhsja42kvryzcy30k767avsjpbvs6qksnbzifi5blka8c679gg7aw160sjd869l34idq";
+      };
+    };
+    "dotenv-5.0.1" = {
+      name = "dotenv";
+      packageName = "dotenv";
+      version = "5.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/dotenv/-/dotenv-5.0.1.tgz";
+        sha512 = "2ixnvlqm3fb7javs7yhqb26afyf3wkd3hqpspwrg89mcfwshwyva5473zv7hhh3rrvn0vqywp5vnwkdq9r5mgkhapxhczz3zaw3q2z0";
+      };
+    };
+    "duplexer-0.1.1" = {
+      name = "duplexer";
+      packageName = "duplexer";
+      version = "0.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz";
+        sha1 = "ace6ff808c1ce66b57d1ebf97977acb02334cfc1";
+      };
+    };
+    "duplexer3-0.1.4" = {
+      name = "duplexer3";
+      packageName = "duplexer3";
+      version = "0.1.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz";
+        sha1 = "ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2";
+      };
+    };
+    "duplexify-3.7.1" = {
+      name = "duplexify";
+      packageName = "duplexify";
+      version = "3.7.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz";
+        sha512 = "3k23dn0v8n7r3ds3v137vmw1vg3ngd6fw3bb4hasa6bm40qasvdaidjwx0wb4gakp8xvdrsckjn0wkmmi90z8a2sswj8cxhznxgrg6k";
+      };
+    };
+    "ecc-jsbn-0.1.2" = {
+      name = "ecc-jsbn";
+      packageName = "ecc-jsbn";
+      version = "0.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz";
+        sha1 = "3a83a904e54353287874c564b7549386849a98c9";
+      };
+    };
+    "ee-first-1.1.1" = {
+      name = "ee-first";
+      packageName = "ee-first";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz";
+        sha1 = "590c61156b0ae2f4f0255732a158b266bc56b21d";
+      };
+    };
+    "electron-to-chromium-1.3.397" = {
+      name = "electron-to-chromium";
+      packageName = "electron-to-chromium";
+      version = "1.3.397";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.397.tgz";
+        sha512 = "3cfkdvg9vdi3s7f5jh2hk2l0gqnfkqd5sw3v22cfx3za6vpfvdhx6hc8779bzwj8isagxxj0hwc9fdxhsx4w0k9fp939jzvkzb1vifd";
+      };
+    };
+    "elliptic-6.5.2" = {
+      name = "elliptic";
+      packageName = "elliptic";
+      version = "6.5.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz";
+        sha512 = "33kzl02iwbq3pl33ihcdq9nm48yzhfj96183zzra06hp3z6bacz3d99pl74jziwygys4npxbxwnvszz12wl8lpkjw8b4r9ki797p33z";
+      };
+    };
+    "elm-0.19.1" = {
+      name = "elm";
+      packageName = "elm";
+      version = "0.19.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/elm/-/elm-0.19.1.tgz";
+        sha512 = "1y57kz7w9064cmchjigsn0man2vw8b97fx9a88rxjfmxpqn1v7rdqi0kakivh0d0rkmjllbgz81zl742yq7fsyrfl1qdglrjas4xs5d";
+      };
+    };
+    "elm-0.19.1-3" = {
+      name = "elm";
+      packageName = "elm";
+      version = "0.19.1-3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/elm/-/elm-0.19.1-3.tgz";
+        sha512 = "1lmaszcl984nawb51x833i84ywff32l8wm63dkbaglvyc7312kllhqiw79ng3q7i928azlck8iy2xmki71fsqy9qz768mlw01xzlbgb";
+      };
+    };
+    "elm-analyse-git://github.com/elm-tooling/elm-analyse#1a665a6e540d7d11b29b3c5e3c52089704325d9c" = {
+      name = "elm-analyse";
+      packageName = "elm-analyse";
+      version = "0.16.5";
+      src = fetchgit {
+        url = "git://github.com/elm-tooling/elm-analyse";
+        rev = "1a665a6e540d7d11b29b3c5e3c52089704325d9c";
+        sha256 = "a442bce37ae37a65c1488c66e477c404da1c7f137a6668d89c4b09de845ca374";
+      };
+    };
+    "elm-asset-webpack-loader-1.1.2" = {
+      name = "elm-asset-webpack-loader";
+      packageName = "elm-asset-webpack-loader";
+      version = "1.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/elm-asset-webpack-loader/-/elm-asset-webpack-loader-1.1.2.tgz";
+        sha512 = "0sd764hrl2vzqvidwcpajafn8l24rd25v1bx534y92bvd5da96djd520r1sl0kbbd8n10690r963qs6zrnlz8hhdznvbp1m36vxidcf";
+      };
+    };
+    "elm-hot-1.1.4" = {
+      name = "elm-hot";
+      packageName = "elm-hot";
+      version = "1.1.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/elm-hot/-/elm-hot-1.1.4.tgz";
+        sha512 = "2grbnfn0995mgsbg3jnzs9b94sk2si3n0fazl66na6lhvfyzj3vzblxn47f1b68hdr2i3l8pvj42wc47dqpynmci7mjg4n5izzczw58";
+      };
+    };
+    "elm-hot-webpack-loader-1.1.6" = {
+      name = "elm-hot-webpack-loader";
+      packageName = "elm-hot-webpack-loader";
+      version = "1.1.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/elm-hot-webpack-loader/-/elm-hot-webpack-loader-1.1.6.tgz";
+        sha512 = "2s6yhby0lmvjl8979zxpzdqhdwvy21m42ml4mlrh02hcq0zn5zirshwjsazy2rs8bz0j2qmv4cambh5jya1vdjkpv7izzmww7mbg3vx";
+      };
+    };
+    "elm-test-0.19.1" = {
+      name = "elm-test";
+      packageName = "elm-test";
+      version = "0.19.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/elm-test/-/elm-test-0.19.1.tgz";
+        sha512 = "2677ylcn8afd1z2hsk628i7dkc8cp4pb6aassgwv6y6cky0w5393ahkydvy39jlqi95gghiybql8ga26m1r7dylp6dsvaviz1kn09jb";
+      };
+    };
+    "elm-test-0.19.1-revision2" = {
+      name = "elm-test";
+      packageName = "elm-test";
+      version = "0.19.1-revision2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/elm-test/-/elm-test-0.19.1-revision2.tgz";
+        sha512 = "24qc3z9z059c0dp97lfpsqgigxks6dd8akf14p3wvnvsy5ih3nf4947qc94xfrr0jdql0nnq12727nyyyyz3zrfyy54y85jayckcnyd";
+      };
+    };
+    "elm-webpack-loader-6.0.0" = {
+      name = "elm-webpack-loader";
+      packageName = "elm-webpack-loader";
+      version = "6.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/elm-webpack-loader/-/elm-webpack-loader-6.0.0.tgz";
+        sha512 = "0qd4ac4xsbhp76jaqpcr9skahccpj7vva111bxinnbmcl5p7n5y8ryy539hnzvxq3gy3j3x68ikil2fcvzqaf3mnm3jrwn5ix98m5w3";
+      };
+    };
+    "elmi-to-json-1.2.0" = {
+      name = "elmi-to-json";
+      packageName = "elmi-to-json";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/elmi-to-json/-/elmi-to-json-1.2.0.tgz";
+        sha512 = "3yyy4v1cp6bqkriy1dhq77dsliafaxpcmacyxyk5gwk7kflw9lafhh6l0lsrqwlb2nb2qp4l7g0qib7pm80c7kqskswlq5zvv7agn6c";
+      };
+    };
+    "elmi-to-json-1.3.0" = {
+      name = "elmi-to-json";
+      packageName = "elmi-to-json";
+      version = "1.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/elmi-to-json/-/elmi-to-json-1.3.0.tgz";
+        sha512 = "0m6ryjnwyvjg5nif66bn9vlpwgrkc6vkrbx15aq4f1in806xm7j2ljdjri8z8syczh651k7bwmsckbwnw8q30g390mrbrnvygkl6vga";
+      };
+    };
+    "emoji-regex-7.0.3" = {
+      name = "emoji-regex";
+      packageName = "emoji-regex";
+      version = "7.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz";
+        sha512 = "2s4i22ccvwa2l4xwl9yz6mkyn2kpf58hp1nqiwmmgqlpyr57345i3ll0l4656ryik6a6wz1lgk4vbl6y0dwj5hx2kcbpv0h8924n00b";
+      };
+    };
+    "emoji-regex-8.0.0" = {
+      name = "emoji-regex";
+      packageName = "emoji-regex";
+      version = "8.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz";
+        sha512 = "3l88qajsl4nn4jy6gfp9fq41z6m68nykklbg1piszmhjgniiw51b3pbnf57lvbw3d6jv3xj1v16z0d5651wzs81q0g0sf4dqp6xha1i";
+      };
+    };
+    "emojis-list-2.1.0" = {
+      name = "emojis-list";
+      packageName = "emojis-list";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz";
+        sha1 = "4daa4d9db00f9819880c79fa457ae5b09a1fd389";
+      };
+    };
+    "emojis-list-3.0.0" = {
+      name = "emojis-list";
+      packageName = "emojis-list";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz";
+        sha512 = "3cib7aw0206bfcb324aqh3fsda46mjxghd08gaasxagv6jfc74r2jvcv78rb8h10m879w42nbrn3q8rjifg9s5rclbpr2hzq7bqqk7y";
+      };
+    };
+    "encodeurl-1.0.2" = {
+      name = "encodeurl";
+      packageName = "encodeurl";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz";
+        sha1 = "ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59";
+      };
+    };
+    "end-of-stream-1.4.4" = {
+      name = "end-of-stream";
+      packageName = "end-of-stream";
+      version = "1.4.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz";
+        sha512 = "3jyw0a0c7m1yxglwk7i5jh8zb3vvx7f9l4frbskxkgf9cyf4i8ww26p8bimnsryrh1dx7lwrxq64vbpjwfcv1svd4lg8m07fa53bv7s";
+      };
+    };
+    "enhanced-resolve-4.1.1" = {
+      name = "enhanced-resolve";
+      packageName = "enhanced-resolve";
+      version = "4.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.1.tgz";
+        sha512 = "2w4dww5r1bxbycbb3kq0pdl9v56942678c53j9rwikxf05xd2n5h0b3a6914wxcmzr9wx4m0w56adp3qp21rk1wzkhbybxb9z67djpp";
+      };
+    };
+    "entities-1.1.2" = {
+      name = "entities";
+      packageName = "entities";
+      version = "1.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz";
+        sha512 = "3dv4zcyi5bjn1q5sd46vapv1y0wilalg5bwh5cf62w8bpiwms4q9c3yhfvvj6fh2fkc3bcdwsjabrs4d3j86ji0c6xkn5vmi4qxjqkz";
+      };
+    };
+    "entities-2.0.0" = {
+      name = "entities";
+      packageName = "entities";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz";
+        sha512 = "0pqz0h0aafqad2dm3qs73sqk6nhgr7icrfqwnxbzysbdkh11grcbssa7m1nkyzc22g9zwpi752fpw5r58rrldhjjlqh4isj89bzpmqg";
+      };
+    };
+    "errno-0.1.7" = {
+      name = "errno";
+      packageName = "errno";
+      version = "0.1.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz";
+        sha512 = "2bdzcjwgdkg5yrvlw6my57pn77k4j7a2pzppwqrq4va9f5bd4b5mzbhwpklhsy1jl7w9sjvnfs30h42nhz2dbdfhagnh8dk6l2d3yii";
+      };
+    };
+    "error-ex-1.3.2" = {
+      name = "error-ex";
+      packageName = "error-ex";
+      version = "1.3.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz";
+        sha512 = "3igrl2amb9mpa9d2z6qghz3ljqd7amjla8ahfs5fdgl0w52pw6gz3y32q5fk229yvfyg3x9kpfygadcm2w0lv4hv4nj25cyd8v4glgd";
+      };
+    };
+    "es-abstract-1.17.5" = {
+      name = "es-abstract";
+      packageName = "es-abstract";
+      version = "1.17.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz";
+        sha512 = "2kayciqh331d3kp1l8wdsp33kzdc02rv72z6x2327w2i6yks9b7xwxbg1xdrrkhaglr06liqzdjavq9qk9d487sf572rjfv62xml7q5";
+      };
+    };
+    "es-to-primitive-1.2.1" = {
+      name = "es-to-primitive";
+      packageName = "es-to-primitive";
+      version = "1.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz";
+        sha512 = "2y6j97j2f10gc52kw7qin10gm24m5hz1qq7ph6jf89y8a9i8vb268f2q0z78qjmngc765y9v0f1ldc5qb10b638yqlabda90sbaa8s0";
+      };
+    };
+    "es6-promisify-6.1.0" = {
+      name = "es6-promisify";
+      packageName = "es6-promisify";
+      version = "6.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/es6-promisify/-/es6-promisify-6.1.0.tgz";
+        sha512 = "2pr75bj70p2qd7if8kpmm7pqfgkq9317mvb09q8pfrha2kcvn8g0y3b7a63iwm28wh36d0a681j3zaig10hwk7xasn5n42zzbcj8awc";
+      };
+    };
+    "escape-html-1.0.3" = {
+      name = "escape-html";
+      packageName = "escape-html";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz";
+        sha1 = "0258eae4d3d0c0974de1c169188ef0051d1d1988";
+      };
+    };
+    "escape-string-regexp-1.0.5" = {
+      name = "escape-string-regexp";
+      packageName = "escape-string-regexp";
+      version = "1.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz";
+        sha1 = "1b61c0562190a8dff6ae3bb2cf0200ca130b86d4";
+      };
+    };
+    "escape-string-regexp-2.0.0" = {
+      name = "escape-string-regexp";
+      packageName = "escape-string-regexp";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz";
+        sha512 = "3xkdrhqvjj7430kp98pllh0yxbawxp4z1fnvbw5cawjr6mlbgyrd2v3b3kalrx3s515zc731a6ckmb10x9vaizf6sf4b5g84lndr72j";
+      };
+    };
+    "eslint-scope-4.0.3" = {
+      name = "eslint-scope";
+      packageName = "eslint-scope";
+      version = "4.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz";
+        sha512 = "2p4myi99y1nk5dy7fvmbspjdynigw3dzkhcm7zaiwfyw2wp6j61y0i8mba18ksv9qi2s1wp6w6xhn7471qs631bqwmz8fzmvas6xdd7";
+      };
+    };
+    "esprima-4.0.1" = {
+      name = "esprima";
+      packageName = "esprima";
+      version = "4.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz";
+        sha512 = "3h999di4dnwxb22lxlb7cbz42nalrv8g8sqdvrkkl5c27gnwhp1rva4039hmq6g1i0y4mfjgx6p4i2vwxxl0zlahfzdd9fl1qbqasvq";
+      };
+    };
+    "esrecurse-4.2.1" = {
+      name = "esrecurse";
+      packageName = "esrecurse";
+      version = "4.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz";
+        sha512 = "06zyknk70y80n428x20wvjqy5822wgz2yaxzw387njnz3ar6ixzjcxzr2jsl8wrm0m9jpa4ysbcr9znpk6gbkqd7wby084zxw3l317b";
+      };
+    };
+    "estraverse-4.3.0" = {
+      name = "estraverse";
+      packageName = "estraverse";
+      version = "4.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz";
+        sha512 = "2kh3lczc7smb84ryllqrdvrknxl3h47khh7li6n9m76mj9jfh1ahz2jm8ffpcaac7i4k8zkf3sc3nczzp7djgqmsi6wrkynywlygnfz";
+      };
+    };
+    "etag-1.8.1" = {
+      name = "etag";
+      packageName = "etag";
+      version = "1.8.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz";
+        sha1 = "41ae2eeb65efa62268aebfea83ac7d79299b0887";
+      };
+    };
+    "eventemitter3-3.1.2" = {
+      name = "eventemitter3";
+      packageName = "eventemitter3";
+      version = "3.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz";
+        sha512 = "3hv1mm8y1m0ayl0ds213ajdpc0xwalhi1iwvy2zdkg4kys5vdy97s8jz0sfvd91a3xwyy4946wmzk2lc1kpzww94pj307nmw8hm1yxn";
+      };
+    };
+    "eventemitter3-4.0.0" = {
+      name = "eventemitter3";
+      packageName = "eventemitter3";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.0.tgz";
+        sha512 = "05cdww9h7f3kjfmv478p0rcq2ia3lcrvqmsh155hd6wm895i2jn6j68w0ly09c3gjn8hshfdvnh99qchipbclycnb241y993m2d5sm9";
+      };
+    };
+    "events-3.1.0" = {
+      name = "events";
+      packageName = "events";
+      version = "3.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/events/-/events-3.1.0.tgz";
+        sha512 = "1d21craxji58ccc5l8c39mw7pgk0is7gj1sixm8v1va1zc81hrw8426b9rhrv7z2kwqvix5l7cyfc8awwypj19him6ffd67qbqaxzs6";
+      };
+    };
+    "eventsource-0.1.6" = {
+      name = "eventsource";
+      packageName = "eventsource";
+      version = "0.1.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/eventsource/-/eventsource-0.1.6.tgz";
+        sha1 = "0acede849ed7dd1ccc32c811bb11b944d4f29232";
+      };
+    };
+    "eventsource-1.0.7" = {
+      name = "eventsource";
+      packageName = "eventsource";
+      version = "1.0.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/eventsource/-/eventsource-1.0.7.tgz";
+        sha512 = "02zyvvhbzxhb7q9pzn867l80whipj03h4nkzjw1r8kppkmgaw0fcgvnkkv11fkfnlcdhkr9f55xrap5qpvbggkad4y4jkymxgpzbfg0";
+      };
+    };
+    "evp_bytestokey-1.0.3" = {
+      name = "evp_bytestokey";
+      packageName = "evp_bytestokey";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz";
+        sha512 = "1wd18zxd7n42asa63aa4k1bdf58warg29c7c8cdzzkd4r1wva7qwzqnn52h8g8hqwj7bxjkk3ryghajrvz4i27h5bzp30p8hjiqdzgx";
+      };
+    };
+    "exec-sh-0.3.4" = {
+      name = "exec-sh";
+      packageName = "exec-sh";
+      version = "0.3.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.4.tgz";
+        sha512 = "3a56in0wklcqf6hk0n22z22yg9kzb7y4xj7yfmj2sahbnkjbr5s0sngpzrr60r5rq9b3f0f1m13da5fn9mfz7p3b5nbxgxmrs8lhhdh";
+      };
+    };
+    "execa-1.0.0" = {
+      name = "execa";
+      packageName = "execa";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz";
+        sha512 = "0nbazkdhh5zqw7l7y4ml860h6pbn72x5kp2iaknqbdk0ygcrp3yh6bnq0brzzsyk3f72ard3ss3kp9a2ffsglib3yiamqwm4mrz3mk9";
+      };
+    };
+    "execa-4.0.0" = {
+      name = "execa";
+      packageName = "execa";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/execa/-/execa-4.0.0.tgz";
+        sha512 = "06ajp8gz1276n02cd50rh0q2qfhxrj623shfcc7fq6iafmk43kzwifyfm1nfc7jhkdhn8r4fn2rf9h2bcjsvl2mcpwq81kp0p3x9c15";
+      };
+    };
+    "expand-brackets-2.1.4" = {
+      name = "expand-brackets";
+      packageName = "expand-brackets";
+      version = "2.1.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz";
+        sha1 = "b77735e315ce30f6b6eff0f83b04151a22449622";
+      };
+    };
+    "expand-tilde-2.0.2" = {
+      name = "expand-tilde";
+      packageName = "expand-tilde";
+      version = "2.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz";
+        sha1 = "97e801aa052df02454de46b02bf621642cdc8502";
+      };
+    };
+    "express-4.16.3" = {
+      name = "express";
+      packageName = "express";
+      version = "4.16.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/express/-/express-4.16.3.tgz";
+        sha1 = "6af8a502350db3246ecc4becf6b5a34d22f7ed53";
+      };
+    };
+    "express-4.17.1" = {
+      name = "express";
+      packageName = "express";
+      version = "4.17.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/express/-/express-4.17.1.tgz";
+        sha512 = "3i2sxjf2x1r9wbfdyh5ll8ybbnqq6n4xfxdlc4dsqhssljrlih18csqg142lf16lcfcdgsmvf9pff0rzxjw7p0shnlmpajipwxpswlq";
+      };
+    };
+    "express-ws-2.0.0" = {
+      name = "express-ws";
+      packageName = "express-ws";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/express-ws/-/express-ws-2.0.0.tgz";
+        sha1 = "96d13fa41c8de8fa5dcbfa2dacace6f594272888";
+      };
+    };
+    "express-ws-4.0.0" = {
+      name = "express-ws";
+      packageName = "express-ws";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/express-ws/-/express-ws-4.0.0.tgz";
+        sha512 = "1ih0006jpjcg33hwp2whynvvdcnqy87nbhpv636v3d6vzp8yjbzhfy8nxhi284nh9nj46nyy7ywj2i58j6v1iaqi3v48i1hq31r8k18";
+      };
+    };
+    "extend-3.0.2" = {
+      name = "extend";
+      packageName = "extend";
+      version = "3.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz";
+        sha512 = "3zad2109w3q3gh46s5msrnzfy2nl581sqpy20b52fs7v5pdjh3irpg7szl3xvh4sfy63218jy8ry6qlnir3baxbbfrb03swkw5swfky";
+      };
+    };
+    "extend-shallow-2.0.1" = {
+      name = "extend-shallow";
+      packageName = "extend-shallow";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz";
+        sha1 = "51af7d614ad9a9f610ea1bafbb989d6b1c56890f";
+      };
+    };
+    "extend-shallow-3.0.2" = {
+      name = "extend-shallow";
+      packageName = "extend-shallow";
+      version = "3.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz";
+        sha1 = "26a71aaf073b39fb2127172746131c2704028db8";
+      };
+    };
+    "external-editor-3.1.0" = {
+      name = "external-editor";
+      packageName = "external-editor";
+      version = "3.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz";
+        sha512 = "1xm0arqcf7jp9kgq1g67ss2jvj8kblzbb7dd7sj2gm1g8cj4ilcwnn8vwspz3rh83yjphbl1lvqdyivrji6ccmnp3k2rmk9gl4kii44";
+      };
+    };
+    "extglob-2.0.4" = {
+      name = "extglob";
+      packageName = "extglob";
+      version = "2.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz";
+        sha512 = "2klp0045k4wnaspb9khqx90ddv7rjg997mlyp5qz41sl2yqdrpw8g8wji77qq16aawl4yhvg0f993ln48lja0kfmy0wnbh4g50zlrin";
+      };
+    };
+    "extsprintf-1.3.0" = {
+      name = "extsprintf";
+      packageName = "extsprintf";
+      version = "1.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz";
+        sha1 = "96918440e3041a7a414f8c52e3c574eb3c3e1e05";
+      };
+    };
+    "eyes-0.1.8" = {
+      name = "eyes";
+      packageName = "eyes";
+      version = "0.1.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz";
+        sha1 = "62cf120234c683785d902348a800ef3e0cc20bc0";
+      };
+    };
+    "fast-deep-equal-3.1.1" = {
+      name = "fast-deep-equal";
+      packageName = "fast-deep-equal";
+      version = "3.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz";
+        sha512 = "1j7wq3vqvfgnpd2sjblnlgryxlic2fsy343fx8w4ywb2mngj1w5afq8fmly8cp9fi66dhz1fhcfpn23g5zasnzs6n1snb83qkkilhgi";
+      };
+    };
+    "fast-diff-1.2.0" = {
+      name = "fast-diff";
+      packageName = "fast-diff";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz";
+        sha512 = "3iz2v3js0dw0ds77cg0v543ba30in2ld6ynakphh1g6nbrdpn4qkydrk6m3qa76ckh1nmqh73ck383zj7b7jw6bczjxbxwbkx7si6y4";
+      };
+    };
+    "fast-glob-2.2.7" = {
+      name = "fast-glob";
+      packageName = "fast-glob";
+      version = "2.2.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz";
+        sha512 = "2rwrxvdl61rfj9v6hgif4qilfh3g4kqsjk380f2avp0g3m76h6q7n553gdh0nig13hchkwi7pwyxn0ff5vv90fbcj70jr6f051swll3";
+      };
+    };
+    "fast-glob-3.2.2" = {
+      name = "fast-glob";
+      packageName = "fast-glob";
+      version = "3.2.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.2.tgz";
+        sha512 = "3n0a23s3nq6f339d9hw9mw4plbzcdmglhzm09w7azz5fb34xiw60rhhhsvcvqw8c86h3ryfvmk1k624jlf36w3wrrijjhrfivd7qdah";
+      };
+    };
+    "fast-json-stable-stringify-2.1.0" = {
+      name = "fast-json-stable-stringify";
+      packageName = "fast-json-stable-stringify";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz";
+        sha512 = "0gz06zkjlqc4r59ka14n3vwqjdgn40zd8r115ql3rkwqb7j42frmnsj3axr7p2md8ik52nqjn3myyv8ddavdhl4cq3xz4wbbz07y5wn";
+      };
+    };
+    "fastq-1.7.0" = {
+      name = "fastq";
+      packageName = "fastq";
+      version = "1.7.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fastq/-/fastq-1.7.0.tgz";
+        sha512 = "1yjamwzvgz5f73c2xc5r4pnhprczp52i9za26qi04w144c7hbjp00s0mykg3b0f23ifgnl5vf54cq7by4gh2bw87sx9lxy7350rvrk0";
+      };
+    };
+    "faye-websocket-0.10.0" = {
+      name = "faye-websocket";
+      packageName = "faye-websocket";
+      version = "0.10.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz";
+        sha1 = "4e492f8d04dfb6f89003507f6edbf2d501e7c6f4";
+      };
+    };
+    "faye-websocket-0.11.3" = {
+      name = "faye-websocket";
+      packageName = "faye-websocket";
+      version = "0.11.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.3.tgz";
+        sha512 = "0wgmgai5pj0yjcc4gs5b6r94gr8ycsbv1xyjw055cxfy4vm6yrpqp0mpr89ychmzgr5y0mggqrljf9jhb8n5iq63bi3r9yqidpbhv0g";
+      };
+    };
+    "fb-watchman-2.0.1" = {
+      name = "fb-watchman";
+      packageName = "fb-watchman";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz";
+        sha512 = "1b67x7n9c1irns63lipsffgi0zm9kfms6k87mznvhak81dijqvfy26nqr3j5mw41mqb3vbbhxbbmcdgc787laz3kaq45slq0wlwjhqf";
+      };
+    };
+    "figgy-pudding-3.5.2" = {
+      name = "figgy-pudding";
+      packageName = "figgy-pudding";
+      version = "3.5.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz";
+        sha512 = "1pk6h8pjvxp20pk6y7yagg9vfd4b1y29salqya7mf8kr0rhrk970hyy4d97kh8pk14jbnfayhwqlm4s6h7g63b3pid6lzzwy4ingfyi";
+      };
+    };
+    "figures-2.0.0" = {
+      name = "figures";
+      packageName = "figures";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz";
+        sha1 = "3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962";
+      };
+    };
+    "file-loader-1.1.11" = {
+      name = "file-loader";
+      packageName = "file-loader";
+      version = "1.1.11";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz";
+        sha512 = "0p00kmxlfgsw0mn4y5h5njv0g1y7gakpygdv6wz318wzpll8zd44r7q0fvym4v837054n04d22r2klkqnckr3k0x2hc2ln79qfphr2c";
+      };
+    };
+    "file-uri-to-path-1.0.0" = {
+      name = "file-uri-to-path";
+      packageName = "file-uri-to-path";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz";
+        sha512 = "0px1qliabg53lwfq4izc9vdll68sd08nlczi2ms5nvg7frm3y6zgy07vdvxywazab26jc723qpmh9a6h3bdp685iddzsmgvfarpx6yi";
+      };
+    };
+    "filesize-3.6.1" = {
+      name = "filesize";
+      packageName = "filesize";
+      version = "3.6.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz";
+        sha512 = "1rfby2136b86m318244b42lrcx9hc28vz71cv9i84cd5z7dd3cwvj1gx8mykbjh937yyi1h4q5kk3vhjcldc8pkd2f7iapszgbd3a7c";
+      };
+    };
+    "fill-range-4.0.0" = {
+      name = "fill-range";
+      packageName = "fill-range";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz";
+        sha1 = "d544811d428f98eb06a63dc402d2403c328c38f7";
+      };
+    };
+    "fill-range-7.0.1" = {
+      name = "fill-range";
+      packageName = "fill-range";
+      version = "7.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz";
+        sha512 = "2jrai6ri6sni8xyi8yji49ai8vkczbbiw6pb3pd9bcdizb58ncgnhnfmghhw87flm8y96y2z16738lwdyshby665nv60ljcwwbkvsm8";
+      };
+    };
+    "finalhandler-1.1.1" = {
+      name = "finalhandler";
+      packageName = "finalhandler";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz";
+        sha512 = "2v4ymv7dvpxpnrid4cn8qni5k5l024zc2qzg8ipkbxwmqjbaiygbx0hvbnr0ywfy0is4ngyhp6ljgjh4wmk6fqc3hd3wyzxil798lb3";
+      };
+    };
+    "finalhandler-1.1.2" = {
+      name = "finalhandler";
+      packageName = "finalhandler";
+      version = "1.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz";
+        sha512 = "1cfqk6g78cb12b1cki4pbcspsy40d0yny513myqji716njyhc5hrj7ll539kz96m6vn27168hhyqvd52cr5x1cs85mm7igfkrdrq1b8";
+      };
+    };
+    "find-0.2.7" = {
+      name = "find";
+      packageName = "find";
+      version = "0.2.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/find/-/find-0.2.7.tgz";
+        sha1 = "7afbd00f8f08c5b622f97cda6f714173d547bb3f";
+      };
+    };
+    "find-0.2.9" = {
+      name = "find";
+      packageName = "find";
+      version = "0.2.9";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/find/-/find-0.2.9.tgz";
+        sha1 = "4b73f1ff9e56ad91b76e716407fe5ffe6554bb8c";
+      };
+    };
+    "find-cache-dir-1.0.0" = {
+      name = "find-cache-dir";
+      packageName = "find-cache-dir";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz";
+        sha1 = "9288e3e9e3cc3748717d39eade17cf71fc30ee6f";
+      };
+    };
+    "find-cache-dir-2.1.0" = {
+      name = "find-cache-dir";
+      packageName = "find-cache-dir";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz";
+        sha512 = "0wjlwmvadzac6hwmxv6hsc16z3285i2y0nkwpg4366flza0rx30s3ncx93xn8hkkpxr493zi5b0h94jczinr87h2m6gbhrl265qzbjf";
+      };
+    };
+    "find-elm-dependencies-2.0.2" = {
+      name = "find-elm-dependencies";
+      packageName = "find-elm-dependencies";
+      version = "2.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/find-elm-dependencies/-/find-elm-dependencies-2.0.2.tgz";
+        sha512 = "32n3i133knsr1q5ld28ljk3s9yq2i124q8rg8cdb5ar0bp7wgc2a87cfkwhvql8vwzd35w0qf9bfhfa7g1imdk212y523qwnw4m9klw";
+      };
+    };
+    "find-parent-dir-0.3.0" = {
+      name = "find-parent-dir";
+      packageName = "find-parent-dir";
+      version = "0.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.0.tgz";
+        sha1 = "33c44b429ab2b2f0646299c5f9f718f376ff8d54";
+      };
+    };
+    "find-up-1.1.2" = {
+      name = "find-up";
+      packageName = "find-up";
+      version = "1.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz";
+        sha1 = "6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f";
+      };
+    };
+    "find-up-2.1.0" = {
+      name = "find-up";
+      packageName = "find-up";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz";
+        sha1 = "45d1b7e506c717ddd482775a2b77920a3c0c57a7";
+      };
+    };
+    "find-up-3.0.0" = {
+      name = "find-up";
+      packageName = "find-up";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz";
+        sha512 = "2bg49lifm64h5jqjc20612wrx7cazw9np9ms02ys94kif4li8cp5in4rvmb1c1ssa8yhbsqkgprykkj4lf3jbz8qrgp1mf8c93gl86p";
+      };
+    };
+    "find-up-4.1.0" = {
+      name = "find-up";
+      packageName = "find-up";
+      version = "4.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz";
+        sha512 = "2bi4wmj1qymhj4ap1nay5isn0w7x6ymxp30h5y1jv0hx7q0inmirmr09mn621h4alg0gpv2hjwl6ai2giw6pz7qvb85aqizsh0v14ry";
+      };
+    };
+    "firstline-1.2.0" = {
+      name = "firstline";
+      packageName = "firstline";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/firstline/-/firstline-1.2.0.tgz";
+        sha1 = "c9f4886e7f7fbf0afc12d71941dce06b192aea05";
+      };
+    };
+    "firstline-2.0.2" = {
+      name = "firstline";
+      packageName = "firstline";
+      version = "2.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/firstline/-/firstline-2.0.2.tgz";
+        sha512 = "317ml53ziaxxnvxxp6fwwxxk2w323334kw64d40asdkir6v10br55qb264xk5i9iqh6q1gpwz0ypfwbnk4vjq9pkw123093imy2d9zh";
+      };
+    };
+    "flush-write-stream-1.1.1" = {
+      name = "flush-write-stream";
+      packageName = "flush-write-stream";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz";
+        sha512 = "3pkp1ymgv73zg0d94la628nagxyngq7zm1jmngx6vjc6vi5d4jkmvfygvgac6w6x929hqljwygaidq2znk3l5xd4apdvxvpas21g7nx";
+      };
+    };
+    "follow-redirects-1.11.0" = {
+      name = "follow-redirects";
+      packageName = "follow-redirects";
+      version = "1.11.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.11.0.tgz";
+        sha512 = "2c9vyshmpm00crjxya51av36d379damv2inkkqmfdy6j5kizkc2a1s151h35lfzcnyqmx5bpgaxnp8g77dcs35cmk0zgw35x5bv9699";
+      };
+    };
+    "for-in-1.0.2" = {
+      name = "for-in";
+      packageName = "for-in";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz";
+        sha1 = "81068d295a8142ec0ac726c6e2200c30fb6d5e80";
+      };
+    };
+    "forever-agent-0.6.1" = {
+      name = "forever-agent";
+      packageName = "forever-agent";
+      version = "0.6.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz";
+        sha1 = "fbc71f0c41adeb37f96c577ad1ed42d8fdacca91";
+      };
+    };
+    "form-data-2.3.3" = {
+      name = "form-data";
+      packageName = "form-data";
+      version = "2.3.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz";
+        sha512 = "0jj3hgqp9pmxmfavx6rvdfl3r4yf98clpsarqadz3hq0dxhjlh2ppd9x8bvmaq3nwjdqpdvqx25pwyin4ipixhgsn7s3p9fcc3wllnn";
+      };
+    };
+    "forwarded-0.1.2" = {
+      name = "forwarded";
+      packageName = "forwarded";
+      version = "0.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz";
+        sha1 = "98c23dab1175657b8c0573e8ceccd91b0ff18c84";
+      };
+    };
+    "fragment-cache-0.2.1" = {
+      name = "fragment-cache";
+      packageName = "fragment-cache";
+      version = "0.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz";
+        sha1 = "4290fad27f13e89be7f33799c6bc5a0abfff0d19";
+      };
+    };
+    "fresh-0.5.2" = {
+      name = "fresh";
+      packageName = "fresh";
+      version = "0.5.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz";
+        sha1 = "3d8cadd90d976569fa835ab1f8e4b23a105605a7";
+      };
+    };
+    "from2-2.3.0" = {
+      name = "from2";
+      packageName = "from2";
+      version = "2.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz";
+        sha1 = "8bfb5502bde4a4d36cfdeea007fcca21d7e382af";
+      };
+    };
+    "fs-extra-2.0.0" = {
+      name = "fs-extra";
+      packageName = "fs-extra";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fs-extra/-/fs-extra-2.0.0.tgz";
+        sha1 = "337352bded4a0b714f3eb84de8cea765e9d37600";
+      };
+    };
+    "fs-extra-4.0.3" = {
+      name = "fs-extra";
+      packageName = "fs-extra";
+      version = "4.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz";
+        sha512 = "05bphjab1lk12dz3qf87dywgpsjsx0f59kpligxqph53yicigij2gsmvkppgyhpi70h3q3id3ymz30c02v3pphakn06k8vm6xsdpamb";
+      };
+    };
+    "fs-extra-5.0.0" = {
+      name = "fs-extra";
+      packageName = "fs-extra";
+      version = "5.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz";
+        sha512 = "1ssfaw678600iy330a73gqk65ns22sz4ng7jwndj1fxahj8qddrsy2w4mr4ikx28qhdj8rf49n428qnl657bbpag9r3g3qv2vhyd8zb";
+      };
+    };
+    "fs-extra-6.0.1" = {
+      name = "fs-extra";
+      packageName = "fs-extra";
+      version = "6.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz";
+        sha512 = "049jki4y8l719y7754fp6v52jm5r8cw8c4qhag4zgglmc0j19k1dhsbdsahijgv9hzvwz8g76009c8cy8xjg6jhb1a7dkb1m288hz0s";
+      };
+    };
+    "fs-extra-7.0.1" = {
+      name = "fs-extra";
+      packageName = "fs-extra";
+      version = "7.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz";
+        sha512 = "05qcmykw9czycnn3r2rrlspzd4dznr4796abdqzw150j7rafnlq8n4wp4dai34swb23lfvhw8s31l1k83vpwxqddyf1k724jq4dm430";
+      };
+    };
+    "fs-extra-8.1.0" = {
+      name = "fs-extra";
+      packageName = "fs-extra";
+      version = "8.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz";
+        sha512 = "3i4dsx067a564yx62qy0gz15zvsihqybmmx56lqz4cbgh4fiv5ikrj53wa1rfcijlnkywx18az05m1541dm04gb51af57561s0506fa";
+      };
+    };
+    "fs-minipass-1.2.7" = {
+      name = "fs-minipass";
+      packageName = "fs-minipass";
+      version = "1.2.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz";
+        sha512 = "1644yfnzfqikaff5s68dm4qfrblxrz68ynigkyzyixjqazxlli0svj1nxkawz35sv2vb3vjh41f1rhg0j4nr770a53fzqbjc4j94r0r";
+      };
+    };
+    "fs-readdir-recursive-1.1.0" = {
+      name = "fs-readdir-recursive";
+      packageName = "fs-readdir-recursive";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz";
+        sha512 = "129732drwnm77iq4y1xr69pl9iqqhgj4w61ckmna6i923rjpp0rphzbg8bn8rmfsb6cndfswgwwdh9p2y6kf3zbvgs9gnkbamgagmhq";
+      };
+    };
+    "fs-write-stream-atomic-1.0.10" = {
+      name = "fs-write-stream-atomic";
+      packageName = "fs-write-stream-atomic";
+      version = "1.0.10";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz";
+        sha1 = "b47df53493ef911df75731e70a9ded0189db40c9";
+      };
+    };
+    "fs.realpath-1.0.0" = {
+      name = "fs.realpath";
+      packageName = "fs.realpath";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz";
+        sha1 = "1504ad2523158caa40db4a2787cb01411994ea4f";
+      };
+    };
+    "fsevents-1.2.12" = {
+      name = "fsevents";
+      packageName = "fsevents";
+      version = "1.2.12";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fsevents/-/fsevents-1.2.12.tgz";
+        sha512 = "38n3fx736zykzjypx7imagh6daz9yl98a8v3lw7xy8qs2k0wa2sdsjrdmhwg914mj648j0wzc02mz7f5ii6ql8nlwyb44vvvcm7y1qs";
+      };
+    };
+    "fsevents-2.1.2" = {
+      name = "fsevents";
+      packageName = "fsevents";
+      version = "2.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/fsevents/-/fsevents-2.1.2.tgz";
+        sha512 = "1j5ssfzy4xklkj74z7q64dpcld4zicsva1ihfys8dwa9l5apv7q350g4vg65nfp58c7aqkai1qmjlc3xshb97p5h3lsrl0r3j407327";
+      };
+    };
+    "function-bind-1.1.1" = {
+      name = "function-bind";
+      packageName = "function-bind";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz";
+        sha512 = "38chm1mh077ksx6hy2sssfz4q29hf0ncb9k6ila7si54zqcpl5fxd1rh6wi82blqp7jcspf4aynr7jqhbsg2yc9y42xpqqp6c1jz2n8";
+      };
+    };
+    "get-caller-file-1.0.3" = {
+      name = "get-caller-file";
+      packageName = "get-caller-file";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz";
+        sha512 = "3mw8nv3r73b3lp2pzj116p27flkrv1vq6v0ika46w3xqfinm6gxn38glryibvy834mja8ib4j9cjq27qn164z3793c9g88y79asppny";
+      };
+    };
+    "get-caller-file-2.0.5" = {
+      name = "get-caller-file";
+      packageName = "get-caller-file";
+      version = "2.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz";
+        sha512 = "0b7da6kb3xqk26cw4i6kb1lk911z06z53if2g8l23hmfpbhl6vfbn8iip55j1yplbqnly2abb9d349r6ky2z570839q3p9z2gf4y88g";
+      };
+    };
+    "get-own-enumerable-property-symbols-3.0.2" = {
+      name = "get-own-enumerable-property-symbols";
+      packageName = "get-own-enumerable-property-symbols";
+      version = "3.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz";
+        sha512 = "3m4dzkl08xi19c8aim6hxfy32zxi969r2zfzz9swbvsl5jzcnxn2x9y19kp9ri7k7qw07rz2m7c5g0134rm1i4i43j5bkyfymbh2i93";
+      };
+    };
+    "get-proxy-2.1.0" = {
+      name = "get-proxy";
+      packageName = "get-proxy";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/get-proxy/-/get-proxy-2.1.0.tgz";
+        sha512 = "0kjf4p1krvzah7k5yngvvc39b7jnkzqlp3cdab8451zh1q4mxmav111dmycnadv28ja2wvcwvavjl7w550ja7qyw4dx976n0illhrnf";
+      };
+    };
+    "get-stream-3.0.0" = {
+      name = "get-stream";
+      packageName = "get-stream";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz";
+        sha1 = "8e943d1358dc37555054ecbe2edb05aa174ede14";
+      };
+    };
+    "get-stream-4.1.0" = {
+      name = "get-stream";
+      packageName = "get-stream";
+      version = "4.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz";
+        sha512 = "3pwlllj9naaqzlc5axbxz4jqg3v533xd9jz945mjd3zmca3hh3pr1dpwc7416kjszw6igk060v6x2dgwpr7m1rd4djavmvr8bhavihq";
+      };
+    };
+    "get-stream-5.1.0" = {
+      name = "get-stream";
+      packageName = "get-stream";
+      version = "5.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz";
+        sha512 = "21v525x0f3qrc6f343xp3wjwwrjf1l3x0lmp34hivvvmdcz0a681s0b9wx4k5r3r8jyhc5kd6dqrwqjhpbl285xg333gkgbxhagayhi";
+      };
+    };
+    "get-value-2.0.6" = {
+      name = "get-value";
+      packageName = "get-value";
+      version = "2.0.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz";
+        sha1 = "dc15ca1c672387ca76bd37ac0a395ba2042a2c28";
+      };
+    };
+    "getpass-0.1.7" = {
+      name = "getpass";
+      packageName = "getpass";
+      version = "0.1.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz";
+        sha1 = "5eff8e3e684d569ae4cb2b1282604e8ba62149fa";
+      };
+    };
+    "glob-7.1.4" = {
+      name = "glob";
+      packageName = "glob";
+      version = "7.1.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz";
+        sha512 = "3a8rf655jknn8ccr4p47spa74d8q4j4znjal0arh502m9pg1iq1cln8qjssv7lhc0gvdfm6zfrha6k3xinilm2swfj756m1jxxcyhl6";
+      };
+    };
+    "glob-7.1.6" = {
+      name = "glob";
+      packageName = "glob";
+      version = "7.1.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz";
+        sha512 = "020qv13jbi1v4y5xavf6fw08h9svy4q9p67m4avkrrhgdjmk0c5k3h19bv7k6yn1vfxljpjw9kg81fbdg9v83cjplxvkn3v4v1v21ig";
+      };
+    };
+    "glob-parent-3.1.0" = {
+      name = "glob-parent";
+      packageName = "glob-parent";
+      version = "3.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz";
+        sha1 = "9e6af6299d8d3bd2bd40430832bd113df906c5ae";
+      };
+    };
+    "glob-parent-5.1.1" = {
+      name = "glob-parent";
+      packageName = "glob-parent";
+      version = "5.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz";
+        sha512 = "1hi3ypyic536qm0jd2aw65wbaian4vxmgsnprw6p1mdfd75ks5x1mrgkgzl41xr6hnav27fqzpm227rj7qq8vcwb63m37m9cda3wwhn";
+      };
+    };
+    "glob-to-regexp-0.3.0" = {
+      name = "glob-to-regexp";
+      packageName = "glob-to-regexp";
+      version = "0.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz";
+        sha1 = "8c5a1494d2066c570cc3bfe4496175acc4d502ab";
+      };
+    };
+    "global-modules-1.0.0" = {
+      name = "global-modules";
+      packageName = "global-modules";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz";
+        sha512 = "1pgpsvm0rm1fnqmblx77xs67gh8c80nf4dsgcgalhh9phmlp8ahn5w7vzx3xkwyxw3fg33h8vhh3plsycw6fd7c2r76mm7m8w9fkb5h";
+      };
+    };
+    "global-prefix-1.0.2" = {
+      name = "global-prefix";
+      packageName = "global-prefix";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz";
+        sha1 = "dbf743c6c14992593c655568cb66ed32c0122ebe";
+      };
+    };
+    "globals-11.12.0" = {
+      name = "globals";
+      packageName = "globals";
+      version = "11.12.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz";
+        sha512 = "1ab6f0n8yjl3zkl6dwhvxpxh63b4acc7nj7i21z3dx1fz1jv1c3673qpkwiavmcbbf8jlkxapx0x8ybzz5w2yra4ln24lh687y6kq2q";
+      };
+    };
+    "globby-11.0.0" = {
+      name = "globby";
+      packageName = "globby";
+      version = "11.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/globby/-/globby-11.0.0.tgz";
+        sha512 = "094y6k3zjiyzmq9xqilgz3p88c5465cmzsxc31gkm7fxb0vj9i2kdvxv28c4izppgrfgvpwwvcbvivlnhcf6rhv0iqfxikpfhba3rwa";
+      };
+    };
+    "globby-6.1.0" = {
+      name = "globby";
+      packageName = "globby";
+      version = "6.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz";
+        sha1 = "f5a6d70e8395e21c858fb0489d64df02424d506c";
+      };
+    };
+    "globby-7.1.1" = {
+      name = "globby";
+      packageName = "globby";
+      version = "7.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/globby/-/globby-7.1.1.tgz";
+        sha1 = "fb2ccff9401f8600945dfada97440cca972b8680";
+      };
+    };
+    "globby-8.0.1" = {
+      name = "globby";
+      packageName = "globby";
+      version = "8.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/globby/-/globby-8.0.1.tgz";
+        sha512 = "2kvb22azhxv632w6jbgssa2k29c3vwann1f7g3ra974lg41hcw4s7cbc8260y0kycv93nfvkxsc9wyycsl4xmfjbi5s170ij6ndijm0";
+      };
+    };
+    "got-10.7.0" = {
+      name = "got";
+      packageName = "got";
+      version = "10.7.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/got/-/got-10.7.0.tgz";
+        sha512 = "0k2vbyaqxs8ikrf2fp7jm1q0147bshpmy94wr1wqlqharvgk1wfachm3yxaf8jn70bdmxl4ph3vnb351hrlwp4k27mfb0rxviwc6r39";
+      };
+    };
+    "got-8.3.2" = {
+      name = "got";
+      packageName = "got";
+      version = "8.3.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/got/-/got-8.3.2.tgz";
+        sha512 = "05i0zb81f4c0z48y9mjckyajm586ygznh8y8di5g0qrg3vi9hpbw2q3cf548as8zx9b4g1q5zf2cab43yx21wnan1l0qsz19zjhjdda";
+      };
+    };
+    "graceful-fs-4.2.3" = {
+      name = "graceful-fs";
+      packageName = "graceful-fs";
+      version = "4.2.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz";
+        sha512 = "12xdl6ai5jdxcpcavw2hk4zpiknz7g7f2cvgawzwlzv7cy7qf7riq8ymkgqdqxjkpl1mg627dxa65zc9b0yqhflsmqlfg5q3481azbb";
+      };
+    };
+    "gzip-size-5.0.0" = {
+      name = "gzip-size";
+      packageName = "gzip-size";
+      version = "5.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/gzip-size/-/gzip-size-5.0.0.tgz";
+        sha512 = "007247c436qdpsvrraz3qgssvq0yzi4xinaydxjprr2dslsynhy09lpnlgd52pxkql3880j340fq4qs4rq6s5qfbgksmji5cyi3n8p6";
+      };
+    };
+    "handle-thing-2.0.1" = {
+      name = "handle-thing";
+      packageName = "handle-thing";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz";
+        sha512 = "174zcs1shwmzgb8dxckn95s38pz30irzkrp8zw1rx5drqydb5x6mn1cnc3m6nklbq0jyilpfcrf9br9zrrxlfpcv0him5sy3k4gh2gm";
+      };
+    };
+    "har-schema-2.0.0" = {
+      name = "har-schema";
+      packageName = "har-schema";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz";
+        sha1 = "a94c2224ebcac04782a0d9035521f24735b7ec92";
+      };
+    };
+    "har-validator-5.1.3" = {
+      name = "har-validator";
+      packageName = "har-validator";
+      version = "5.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz";
+        sha512 = "3kaldgfsh3lfvgvw31s8b7q345zf7ixjahllncdckcw6qfs3gnbsamdxgs9kfigq7rwmja7v51ghh7y0rsp6q7jmvmbydhh645wxnxh";
+      };
+    };
+    "has-1.0.3" = {
+      name = "has";
+      packageName = "has";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/has/-/has-1.0.3.tgz";
+        sha512 = "37vh53c11hws66navka0w9xxm6rcr034bxpyvaldiqz1msafqf0jpi1aqxbaygs53arz9y510qg6dl6vrm285hrxniygs2l8lxnyrvz";
+      };
+    };
+    "has-ansi-2.0.0" = {
+      name = "has-ansi";
+      packageName = "has-ansi";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz";
+        sha1 = "34f5049ce1ecdf2b0649af3ef24e45ed35416d91";
+      };
+    };
+    "has-flag-3.0.0" = {
+      name = "has-flag";
+      packageName = "has-flag";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz";
+        sha1 = "b5d454dc2199ae225699f3467e5a07f3b955bafd";
+      };
+    };
+    "has-flag-4.0.0" = {
+      name = "has-flag";
+      packageName = "has-flag";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz";
+        sha512 = "0ylry8j6wanggw1786jw36k056caw516fasjfz5jl945p7g0zl2aqxsjd5fxxfah3hlhrbflnsb88vx42080sfsfbb38aimyi7hja8k";
+      };
+    };
+    "has-symbol-support-x-1.4.2" = {
+      name = "has-symbol-support-x";
+      packageName = "has-symbol-support-x";
+      version = "1.4.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz";
+        sha512 = "0kljkjnsw7jnqm8dpf05rd7a59xjfwlbmp1qxs5kdda78zwwqfpkq5ryc2510iyam6v5vbyy0h7bpkwqadajq1ag2zaa7dymyyhwfnx";
+      };
+    };
+    "has-symbols-1.0.1" = {
+      name = "has-symbols";
+      packageName = "has-symbols";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz";
+        sha512 = "0mb9d5yqvznqmq073hdc4wl7175niiqpkpb7iqqv8p0q6xgmrhfap9ni6iwrx44w8p9vyg8n3zsllil5pdflzlh462dkydymfi2rdrw";
+      };
+    };
+    "has-to-string-tag-x-1.4.1" = {
+      name = "has-to-string-tag-x";
+      packageName = "has-to-string-tag-x";
+      version = "1.4.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz";
+        sha512 = "0bqvhd628h3lrsydbp1xllh7jp23c58j7d4z0x0v9ddffindkk1zfrqmzm28z47ipjp0zxlmzvmlzk98zf9mzjsc47bmp1ydizcmmmx";
+      };
+    };
+    "has-value-0.3.1" = {
+      name = "has-value";
+      packageName = "has-value";
+      version = "0.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz";
+        sha1 = "7b1f58bada62ca827ec0a2078025654845995e1f";
+      };
+    };
+    "has-value-1.0.0" = {
+      name = "has-value";
+      packageName = "has-value";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz";
+        sha1 = "18b281da585b1c5c51def24c930ed29a0be6b177";
+      };
+    };
+    "has-values-0.1.4" = {
+      name = "has-values";
+      packageName = "has-values";
+      version = "0.1.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz";
+        sha1 = "6d61de95d91dfca9b9a02089ad384bff8f62b771";
+      };
+    };
+    "has-values-1.0.0" = {
+      name = "has-values";
+      packageName = "has-values";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz";
+        sha1 = "95b0b63fec2146619a6fe57fe75628d5a39efe4f";
+      };
+    };
+    "hash-base-3.0.4" = {
+      name = "hash-base";
+      packageName = "hash-base";
+      version = "3.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz";
+        sha1 = "5fc8686847ecd73499403319a6b0a3f3f6ae4918";
+      };
+    };
+    "hash.js-1.1.7" = {
+      name = "hash.js";
+      packageName = "hash.js";
+      version = "1.1.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz";
+        sha512 = "1f5xc15zpy3b7hssv57xnd92ja5r073zvd2pczvncxmy1jnbjcx716riyr2syvah88qk7328a6fz049mziv2k837093xqxd86r9m8xm";
+      };
+    };
+    "he-1.2.0" = {
+      name = "he";
+      packageName = "he";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/he/-/he-1.2.0.tgz";
+        sha512 = "0dwml2q9r97ga11qbbn5sb46v4g47lx174dz9g1jgxpycknhg1d5dlsij2vja905p8h243jj51hfa5cmzh8n9rdcs8r78lg86fl7z8p";
+      };
+    };
+    "hex-color-regex-1.1.0" = {
+      name = "hex-color-regex";
+      packageName = "hex-color-regex";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/hex-color-regex/-/hex-color-regex-1.1.0.tgz";
+        sha512 = "16nq2pq6pbpjp3xhvxzyr0qv7vn58pp9h29j8abcxkibz0ibgh9lls5ws73qwhz75nl8wsrjkri8ka6rjm7c41v52md7aifbc61znwp";
+      };
+    };
+    "hmac-drbg-1.0.1" = {
+      name = "hmac-drbg";
+      packageName = "hmac-drbg";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz";
+        sha1 = "d2745701025a6c775a6c545793ed502fc0c649a1";
+      };
+    };
+    "homedir-polyfill-1.0.3" = {
+      name = "homedir-polyfill";
+      packageName = "homedir-polyfill";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz";
+        sha512 = "1qc7ngn9k1w5lcqx2ygqb2x9f03knfbsym25l6qsp6q9qdcxa4fzwwjsh9d9lm5l1569v19rjp7sdnz11087f4b6sv34rav9rcacabr";
+      };
+    };
+    "hosted-git-info-2.8.8" = {
+      name = "hosted-git-info";
+      packageName = "hosted-git-info";
+      version = "2.8.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz";
+        sha512 = "19a25b4xb3hg00d1nsirc3xfcc07rplbh6msa49rgc8xg5rg38y1z8rfrf0dmll8k4jaml8z337bi6y2cgah66jnwxinn0sch5k7z3z";
+      };
+    };
+    "hpack.js-2.1.6" = {
+      name = "hpack.js";
+      packageName = "hpack.js";
+      version = "2.1.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz";
+        sha1 = "87774c0949e513f42e84575b3c45681fade2a0b2";
+      };
+    };
+    "hsl-regex-1.0.0" = {
+      name = "hsl-regex";
+      packageName = "hsl-regex";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/hsl-regex/-/hsl-regex-1.0.0.tgz";
+        sha1 = "d49330c789ed819e276a4c0d272dffa30b18fe6e";
+      };
+    };
+    "hsla-regex-1.0.0" = {
+      name = "hsla-regex";
+      packageName = "hsla-regex";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/hsla-regex/-/hsla-regex-1.0.0.tgz";
+        sha1 = "c1ce7a3168c8c6614033a4b5f7877f3b225f9c38";
+      };
+    };
+    "html-comment-regex-1.1.2" = {
+      name = "html-comment-regex";
+      packageName = "html-comment-regex";
+      version = "1.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.2.tgz";
+        sha512 = "2cqjc2vwxqb38sr58kl1gj9vv949wmmnb1i2f3gms2pszqqaf9mjci0q13w3086wia9n7nfxwmk73d68gcjjjkgs1c0w99n0vjkmqrz";
+      };
+    };
+    "html-entities-1.2.1" = {
+      name = "html-entities";
+      packageName = "html-entities";
+      version = "1.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz";
+        sha1 = "0df29351f0721163515dfb9e5543e5f6eed5162f";
+      };
+    };
+    "html-minifier-terser-5.0.5" = {
+      name = "html-minifier-terser";
+      packageName = "html-minifier-terser";
+      version = "5.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-5.0.5.tgz";
+        sha512 = "1xh7yad8rlhvqdxf8nzq146y3ay9ifan1yi8whkpgl2nz04d49g325lbkcwaf2fvhz8xmy0bqq124n7ia6jz8plf63zp1sh10b8a53h";
+      };
+    };
+    "html-webpack-plugin-4.0.4" = {
+      name = "html-webpack-plugin";
+      packageName = "html-webpack-plugin";
+      version = "4.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-4.0.4.tgz";
+        sha512 = "30npn4h34f7ghwsirydj6icfav14sq5slwk3lpd043jgng2gkii00df1cj6hhldj8d2pmmfvg9aslrgyr2cdanjvw988z658v6i0485";
+      };
+    };
+    "htmlparser2-3.10.1" = {
+      name = "htmlparser2";
+      packageName = "htmlparser2";
+      version = "3.10.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz";
+        sha512 = "04y4izmqmlxvcv7fj67dqaiiwrnq75j6n6yv9a6990y6s23lrj6ipbx0y0i57z8gqzq2ddhb2dj2dflskk2ia7wl81vjcfl50v9w212";
+      };
+    };
+    "http-cache-semantics-3.8.1" = {
+      name = "http-cache-semantics";
+      packageName = "http-cache-semantics";
+      version = "3.8.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz";
+        sha512 = "3gsj16kpvygynld5ajbvg8ii3n3bka4waamdzx30wwhz72mdr6wvffm20rfnxwzid9fq49d5g333yjq5dz1qqbnk9bwcmrj9f5bda75";
+      };
+    };
+    "http-cache-semantics-4.1.0" = {
+      name = "http-cache-semantics";
+      packageName = "http-cache-semantics";
+      version = "4.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz";
+        sha512 = "1qvqr3inc283iggn9x9wwiv1zb634i5zmlh8dnl2c5n4czaf2yibs4dncrgxfg7zrdfkcali22mvys4pgyhmfqjb57b91qlay9czaki";
+      };
+    };
+    "http-deceiver-1.2.7" = {
+      name = "http-deceiver";
+      packageName = "http-deceiver";
+      version = "1.2.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz";
+        sha1 = "fa7168944ab9a519d337cb0bec7284dc3e723d87";
+      };
+    };
+    "http-errors-1.6.2" = {
+      name = "http-errors";
+      packageName = "http-errors";
+      version = "1.6.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz";
+        sha1 = "0a002cc85707192a7e7946ceedc11155f60ec736";
+      };
+    };
+    "http-errors-1.6.3" = {
+      name = "http-errors";
+      packageName = "http-errors";
+      version = "1.6.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz";
+        sha1 = "8b55680bb4be283a0b5bf4ea2e38580be1d9320d";
+      };
+    };
+    "http-errors-1.7.2" = {
+      name = "http-errors";
+      packageName = "http-errors";
+      version = "1.7.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz";
+        sha512 = "13c4825kzqlxdqfjrlrwh15ira0bjm9m3b8qcrfzaysiky1m3gb6dv6gcjgpnap9mbl0fajqiibzp1w5r8qnyn8glaj4wgzf6vh2i5r";
+      };
+    };
+    "http-errors-1.7.3" = {
+      name = "http-errors";
+      packageName = "http-errors";
+      version = "1.7.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz";
+        sha512 = "1zx0vws4k6lcw8j8pgc2yrwfw56s6n2z4dvhd9lcj9l1ywnl9ssianilmrlzr6ravkqxv0xbdqg4cn0q3l72d8h0achvcdbqp8dfd35";
+      };
+    };
+    "http-parser-js-0.4.10" = {
+      name = "http-parser-js";
+      packageName = "http-parser-js";
+      version = "0.4.10";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.10.tgz";
+        sha1 = "92c9c1374c35085f75db359ec56cc257cbb93fa4";
+      };
+    };
+    "http-proxy-1.17.0" = {
+      name = "http-proxy";
+      packageName = "http-proxy";
+      version = "1.17.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/http-proxy/-/http-proxy-1.17.0.tgz";
+        sha512 = "3z80svhb9hi5fawc8za5qn75lybr53646gfsqm2hkqss4pr186pp7k6f5jnjgw7vrkgjy4yzvb34729q6kvrikn4xgq9gfdg7xsgajd";
+      };
+    };
+    "http-proxy-1.18.0" = {
+      name = "http-proxy";
+      packageName = "http-proxy";
+      version = "1.18.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.0.tgz";
+        sha512 = "2jhzdgr7gcgj58mf798ak1a638wm4mnp45pk48im1rf03dpw39alpyabd7rqwqgjrilaggnmh6nd3m9pqnyn76q3mw5g7rzjf43d0pk";
+      };
+    };
+    "http-proxy-middleware-0.19.1" = {
+      name = "http-proxy-middleware";
+      packageName = "http-proxy-middleware";
+      version = "0.19.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz";
+        sha512 = "3fl42r9rpdqm0jrrd2wqws6syv02r8cqgy0j6ddrjvn5p3by8shm0mmbych1g5k9i5agc70x6z2904nrgidkdnlq1pwafqhcf0i6xn8";
+      };
+    };
+    "http-proxy-middleware-0.20.0" = {
+      name = "http-proxy-middleware";
+      packageName = "http-proxy-middleware";
+      version = "0.20.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.20.0.tgz";
+        sha512 = "21l9r4302hy4pdns6p52jw6mb3mcjqia6vydc5r1fmhifd5a5xrkwg0pmwgiqb0kyrwy4k47wqkzw8sc5zl0cq7i17rh437pn9l1lkl";
+      };
+    };
+    "http-signature-1.2.0" = {
+      name = "http-signature";
+      packageName = "http-signature";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz";
+        sha1 = "9aecd925114772f3d95b65a60abb8f7c18fbace1";
+      };
+    };
+    "https-browserify-1.0.0" = {
+      name = "https-browserify";
+      packageName = "https-browserify";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz";
+        sha1 = "ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73";
+      };
+    };
+    "human-signals-1.1.1" = {
+      name = "human-signals";
+      packageName = "human-signals";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz";
+        sha512 = "1kz5n441pr99yhsdpw8sdamc8c44nc6jiipq41iqvsi1djabh15z8vmqkyqy63hjp6da0szqfk2607vfyqh81pav55k6akwz7p2wi28";
+      };
+    };
+    "i-0.3.6" = {
+      name = "i";
+      packageName = "i";
+      version = "0.3.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/i/-/i-0.3.6.tgz";
+        sha1 = "d96c92732076f072711b6b10fd7d4f65ad8ee23d";
+      };
+    };
+    "iconv-lite-0.4.19" = {
+      name = "iconv-lite";
+      packageName = "iconv-lite";
+      version = "0.4.19";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz";
+        sha512 = "0jj1pdq3j9ak8cixn2kjp7ip8hf3xgnb85j4jr32yf9rry620v9072c0kk577mllfk1zl9wzs5ypwzbp7vbhf7j31d5rrqgwb0nldm1";
+      };
+    };
+    "iconv-lite-0.4.24" = {
+      name = "iconv-lite";
+      packageName = "iconv-lite";
+      version = "0.4.24";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz";
+        sha512 = "2n3ygx6km56rdcd5kq52bs2113xqm3vlw2kb9r7pnmxd2qhxrfahp2ngc4w7x8x76fyfpapnixnbjq1i24nc11mj6q7rghwj2fifwxz";
+      };
+    };
+    "icss-utils-4.1.1" = {
+      name = "icss-utils";
+      packageName = "icss-utils";
+      version = "4.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/icss-utils/-/icss-utils-4.1.1.tgz";
+        sha512 = "0yccn3a8gi1sxrbw7ymv239zs4myhrbavs2wvgv8qn3cjbs4r62f01jgsj26jzlq0vy7ycz400xp6qs5l2g21qvhg5c3j6n1gpnm8g1";
+      };
+    };
+    "ieee754-1.1.13" = {
+      name = "ieee754";
+      packageName = "ieee754";
+      version = "1.1.13";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz";
+        sha512 = "179jm8fhl2advz4j63klrp57sm99wvyb5jcxwfr9rhi730ybcxkyfqrr0pmwvir12zjzpkwwvjjkjclwrss7lpab7dg2myqc8izpxz2";
+      };
+    };
+    "iferr-0.1.5" = {
+      name = "iferr";
+      packageName = "iferr";
+      version = "0.1.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz";
+        sha1 = "c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501";
+      };
+    };
+    "ignore-3.3.10" = {
+      name = "ignore";
+      packageName = "ignore";
+      version = "3.3.10";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz";
+        sha512 = "2x7za00gs7ipwcq29bslxcdv7j47m28jx14n9ybs5h2icr4024jn5ppmbs6953g2qb3amhs1gg5x0s48ky3mk7ybi36wchsb7kks2ry";
+      };
+    };
+    "ignore-5.1.4" = {
+      name = "ignore";
+      packageName = "ignore";
+      version = "5.1.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz";
+        sha512 = "3q41bskh27g3dd95nqaf3lg1ck1iv1dbb6hhzg1jqlkk6j80q5sxb4i3n4k6rfw5nmnvrflaxvi281c7cv2ljlsxip6skb4m14x8dik";
+      };
+    };
+    "immer-1.7.2" = {
+      name = "immer";
+      packageName = "immer";
+      version = "1.7.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/immer/-/immer-1.7.2.tgz";
+        sha512 = "32d76qv6hnprfz8mc75aw3nvwh46ydlni7lf6fvw7sqljhqlr7p6pk101mw04zfpj2p08nb71b0zc438ak764qf4z1p5ydx1dryhjp1";
+      };
+    };
+    "import-fresh-2.0.0" = {
+      name = "import-fresh";
+      packageName = "import-fresh";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz";
+        sha1 = "d81355c15612d386c61f9ddd3922d4304822a546";
+      };
+    };
+    "import-local-2.0.0" = {
+      name = "import-local";
+      packageName = "import-local";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz";
+        sha512 = "04jd526svpmpgya7i580qcb13s9b6bw4s9hng2fsni2gxsz6h8vqxl8gbm5k575yxm5aqhy001rl7p1iy60rsi6371cvynfdpi39avg";
+      };
+    };
+    "imurmurhash-0.1.4" = {
+      name = "imurmurhash";
+      packageName = "imurmurhash";
+      version = "0.1.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz";
+        sha1 = "9218b9b2b928a238b13dc4fb6b6d576f231453ea";
+      };
+    };
+    "indexes-of-1.0.1" = {
+      name = "indexes-of";
+      packageName = "indexes-of";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz";
+        sha1 = "f30f716c8e2bd346c7b67d3df3915566a7c05607";
+      };
+    };
+    "infer-owner-1.0.4" = {
+      name = "infer-owner";
+      packageName = "infer-owner";
+      version = "1.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz";
+        sha512 = "3s364ysa3q0sxc852a6rlbx0y8spayvg5csradd7s9vn2fr0ky3xpfhy5kkv6afgji3df7kyiswx296kwfakydii9xygqzxgkwn6a90";
+      };
+    };
+    "inflight-1.0.6" = {
+      name = "inflight";
+      packageName = "inflight";
+      version = "1.0.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz";
+        sha1 = "49bd6331d7d02d0c09bc910a1075ba8165b56df9";
+      };
+    };
+    "inherits-2.0.1" = {
+      name = "inherits";
+      packageName = "inherits";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz";
+        sha1 = "b17d08d326b4423e568eff719f91b0b1cbdf69f1";
+      };
+    };
+    "inherits-2.0.3" = {
+      name = "inherits";
+      packageName = "inherits";
+      version = "2.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz";
+        sha1 = "633c2c83e3da42a502f52466022480f4208261de";
+      };
+    };
+    "inherits-2.0.4" = {
+      name = "inherits";
+      packageName = "inherits";
+      version = "2.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz";
+        sha512 = "30rw2i1k63pbf0n5dbwly05h95cdp1kj8c9r15gv1cwha141g61k56fx4qwsvhpm1ksnf7agch1wxirs3s0m31wbfvmcqizgrlwdywk";
+      };
+    };
+    "ini-1.3.5" = {
+      name = "ini";
+      packageName = "ini";
+      version = "1.3.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz";
+        sha512 = "1rjbvf1rg5ywhnba08sgagn2qf23lab330qrqmh7d891zap3xpxcyfyj1cblpf0f0rypglcfacybzyrpd4996aa1mbc820awa33k5j5";
+      };
+    };
+    "inquirer-6.2.0" = {
+      name = "inquirer";
+      packageName = "inquirer";
+      version = "6.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/inquirer/-/inquirer-6.2.0.tgz";
+        sha512 = "1x0h1ww7c5dqlkxw4l5y64zw0sknw2z3p2zmkbyajahy74ndsb69ah54x4ya8wlv18mk4wdx4f67c37rk5f5hk0chc6ahrjhqdi10a0";
+      };
+    };
+    "internal-ip-4.3.0" = {
+      name = "internal-ip";
+      packageName = "internal-ip";
+      version = "4.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/internal-ip/-/internal-ip-4.3.0.tgz";
+        sha512 = "05c6ydjyg8633b07vn5g168r5lxwvl5k1mjm55brfx35c1z18195bh67f7cfk4bjvyapxfhh8q5i7pv75k353rfp0rcpkgsa2iw2p2b";
+      };
+    };
+    "into-stream-3.1.0" = {
+      name = "into-stream";
+      packageName = "into-stream";
+      version = "3.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz";
+        sha1 = "96fb0a936c12babd6ff1752a17d05616abd094c6";
+      };
+    };
+    "invariant-2.2.4" = {
+      name = "invariant";
+      packageName = "invariant";
+      version = "2.2.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz";
+        sha512 = "0sa0bflh46zr7zqdifqk3a48bmqlmpikrnmwvgz8nx6979piw2m92qrn1g5xnpjzxn864y2jq3gl84jkws2dad3mlwr6s3fa10my4m6";
+      };
+    };
+    "invert-kv-1.0.0" = {
+      name = "invert-kv";
+      packageName = "invert-kv";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz";
+        sha1 = "104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6";
+      };
+    };
+    "invert-kv-2.0.0" = {
+      name = "invert-kv";
+      packageName = "invert-kv";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz";
+        sha512 = "0lamd4l8hybnh42bg1nav09fj3h7k31vnvsqbqk3mhbhml32042k8hpixhiapqfssi1jyhnw31mdv9zx0fvxzxqi8igahyh5zznzxf0";
+      };
+    };
+    "ip-1.1.5" = {
+      name = "ip";
+      packageName = "ip";
+      version = "1.1.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz";
+        sha1 = "bdded70114290828c0a039e72ef25f5aaec4354a";
+      };
+    };
+    "ip-regex-2.1.0" = {
+      name = "ip-regex";
+      packageName = "ip-regex";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz";
+        sha1 = "fa78bf5d2e6913c911ce9f819ee5146bb6d844e9";
+      };
+    };
+    "ipaddr.js-1.9.1" = {
+      name = "ipaddr.js";
+      packageName = "ipaddr.js";
+      version = "1.9.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz";
+        sha512 = "3gcwhv1wa2hb1vljlcmzhvzliks9rj7nzsw165vgy69jakw8g55ky474mj4j41vfbid8viy9nhwn9kx8pfqrikyl29i98zi9vmkz8nh";
+      };
+    };
+    "is-absolute-url-2.1.0" = {
+      name = "is-absolute-url";
+      packageName = "is-absolute-url";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz";
+        sha1 = "50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6";
+      };
+    };
+    "is-absolute-url-3.0.3" = {
+      name = "is-absolute-url";
+      packageName = "is-absolute-url";
+      version = "3.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-3.0.3.tgz";
+        sha512 = "3ssxj0ds0anzx5qcgn5lcawrsv3br0zbi1qcfpi9sslp4iwzb0hr9aqy3y72rf9c0bwb0h5svy7l341j0arlkyvx2yp85pfgqhqv6d2";
+      };
+    };
+    "is-accessor-descriptor-0.1.6" = {
+      name = "is-accessor-descriptor";
+      packageName = "is-accessor-descriptor";
+      version = "0.1.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz";
+        sha1 = "a9e12cb3ae8d876727eeef3843f8a0897b5c98d6";
+      };
+    };
+    "is-accessor-descriptor-1.0.0" = {
+      name = "is-accessor-descriptor";
+      packageName = "is-accessor-descriptor";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz";
+        sha512 = "1qllik6fjwfq17ic0fxwqyll8mrhmcm36xfsq45xc57mq9ah4i4nn4f8fvgb0gx4kpl3jlpkzndp0xlmmf2mh0xmggw6mhw74fng64v";
+      };
+    };
+    "is-arguments-1.0.4" = {
+      name = "is-arguments";
+      packageName = "is-arguments";
+      version = "1.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz";
+        sha512 = "0n6f8bxyg7bn669kd50zw62x8fjgbckgkfxs9mnka3iw3mklg60ijk5v312y9hd30jvxawag77nv3c0jr4wkvywn2wlwd3wdd379y64";
+      };
+    };
+    "is-arrayish-0.2.1" = {
+      name = "is-arrayish";
+      packageName = "is-arrayish";
+      version = "0.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz";
+        sha1 = "77c99840527aa8ecb1a8ba697b80645a7a926a9d";
+      };
+    };
+    "is-arrayish-0.3.2" = {
+      name = "is-arrayish";
+      packageName = "is-arrayish";
+      version = "0.3.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz";
+        sha512 = "1cmy0k81vgz5z55rdyxfnx307053ksyp1lfgyj5jldkqqzmkx1z2k63fvzn7lgj8wdakmsa1mw408rm5xxfpk3avjqbnrb5yl56lm3r";
+      };
+    };
+    "is-binary-path-1.0.1" = {
+      name = "is-binary-path";
+      packageName = "is-binary-path";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz";
+        sha1 = "75f16642b480f187a711c814161fd3a4a7655898";
+      };
+    };
+    "is-binary-path-2.1.0" = {
+      name = "is-binary-path";
+      packageName = "is-binary-path";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz";
+        sha512 = "1gldm4swvg3612pg55yjza8dvpv4daf374dijjg8kcmndlq55933pdd7gw4gq4c2aa5fn9vnasz3h9spg3pd8p1rafkr91sxdhi3hb4";
+      };
+    };
+    "is-buffer-1.1.6" = {
+      name = "is-buffer";
+      packageName = "is-buffer";
+      version = "1.1.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz";
+        sha512 = "3kr8dm9qyklmm2xyiz75s8db90bfilfals4x0g276kncihrrrz0ar4y6dqpvc7pwy7h43jay1bayi1r62x97nzvcswkk4ap18pl1irm";
+      };
+    };
+    "is-callable-1.1.5" = {
+      name = "is-callable";
+      packageName = "is-callable";
+      version = "1.1.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz";
+        sha512 = "3wmff73yzck45x5shydqswbww8zkl03i43yhy7mm6av9770yvd2gj7xfrc8f45fw2ncn7mwblxvxlcap5rngmklkjiis902qgkay8hi";
+      };
+    };
+    "is-color-stop-1.1.0" = {
+      name = "is-color-stop";
+      packageName = "is-color-stop";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-color-stop/-/is-color-stop-1.1.0.tgz";
+        sha1 = "cfff471aee4dd5c9e158598fbe12967b5cdad345";
+      };
+    };
+    "is-data-descriptor-0.1.4" = {
+      name = "is-data-descriptor";
+      packageName = "is-data-descriptor";
+      version = "0.1.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz";
+        sha1 = "0b5ee648388e2c860282e793f1856fec3f301b56";
+      };
+    };
+    "is-data-descriptor-1.0.0" = {
+      name = "is-data-descriptor";
+      packageName = "is-data-descriptor";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz";
+        sha512 = "0ny6kxc752fg3z6fmj8a7fw2lai2y17d9fx0028nvyv1qj0sa30rfryhv9xd7b7is1yfs0val6amsy2b22rh589il10md36a75mgd4d";
+      };
+    };
+    "is-date-object-1.0.2" = {
+      name = "is-date-object";
+      packageName = "is-date-object";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz";
+        sha512 = "39f971gzwirnxjw4b72c175nbn1hnmrn1wljvbzvxv69hw9vpialhjafh9nkh0g3p26a49zss3rr7pxfww1f6day4s89hmqkm7l6aai";
+      };
+    };
+    "is-descriptor-0.1.6" = {
+      name = "is-descriptor";
+      packageName = "is-descriptor";
+      version = "0.1.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz";
+        sha512 = "0gbflcxmd30gzj91y19fylsfalirl6qg71sxjximc8lc2vxkg5h9scnahvxsczymchlx742i8ai489843ys431vyw73rp418jpxiw3a";
+      };
+    };
+    "is-descriptor-1.0.2" = {
+      name = "is-descriptor";
+      packageName = "is-descriptor";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz";
+        sha512 = "2v1a9mn2rzz52v8vs3i7njk9pv95fh971yc81xr0zkaw3dff4gbv1zv048xyjysfgwpajbyryk2px8hinwwh0wagblmw6chdbjsrs6r";
+      };
+    };
+    "is-directory-0.3.1" = {
+      name = "is-directory";
+      packageName = "is-directory";
+      version = "0.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz";
+        sha1 = "61339b6f2475fc772fd9c9d83f5c8575dc154ae1";
+      };
+    };
+    "is-extendable-0.1.1" = {
+      name = "is-extendable";
+      packageName = "is-extendable";
+      version = "0.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz";
+        sha1 = "62b110e289a471418e3ec36a617d472e301dfc89";
+      };
+    };
+    "is-extendable-1.0.1" = {
+      name = "is-extendable";
+      packageName = "is-extendable";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz";
+        sha512 = "0w73qlx9ynmv2iznw1kll86yd04z4rsz3788nzgh7amcnpsbyxbrs734im9dibqgps6pjyz61s8kp4lcsbjsdfrlc51m1pm2hrxgfba";
+      };
+    };
+    "is-extglob-2.1.1" = {
+      name = "is-extglob";
+      packageName = "is-extglob";
+      version = "2.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz";
+        sha1 = "a88c02535791f02ed37c76a1b9ea9773c833f8c2";
+      };
+    };
+    "is-fullwidth-code-point-1.0.0" = {
+      name = "is-fullwidth-code-point";
+      packageName = "is-fullwidth-code-point";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz";
+        sha1 = "ef9e31386f031a7f0d643af82fde50c457ef00cb";
+      };
+    };
+    "is-fullwidth-code-point-2.0.0" = {
+      name = "is-fullwidth-code-point";
+      packageName = "is-fullwidth-code-point";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz";
+        sha1 = "a3b30a5c4f199183167aaab93beefae3ddfb654f";
+      };
+    };
+    "is-fullwidth-code-point-3.0.0" = {
+      name = "is-fullwidth-code-point";
+      packageName = "is-fullwidth-code-point";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz";
+        sha512 = "119fphi7bl53f72b5n0jc61iqlkw6fjmxqhhpbp3ap79vnvp123f3qw5sanin1cfr5cjaa2z0bc6pcdkvbaiz90bc92pc5yxgkscafg";
+      };
+    };
+    "is-glob-3.1.0" = {
+      name = "is-glob";
+      packageName = "is-glob";
+      version = "3.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz";
+        sha1 = "7ba5ae24217804ac70707b96922567486cc3e84a";
+      };
+    };
+    "is-glob-4.0.1" = {
+      name = "is-glob";
+      packageName = "is-glob";
+      version = "4.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz";
+        sha512 = "19c23n8r8rfbz5rgs5csbjbpwgxvwi7y6kpsvlylgs2v1r1z2zm18qzzz2g8vnnwaldn5c4qalpc6p88rl0gjrrm278j52ks0m2svg4";
+      };
+    };
+    "is-number-3.0.0" = {
+      name = "is-number";
+      packageName = "is-number";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz";
+        sha1 = "24fd6201a4782cf50561c810276afc7d12d71195";
+      };
+    };
+    "is-number-7.0.0" = {
+      name = "is-number";
+      packageName = "is-number";
+      version = "7.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz";
+        sha512 = "2g7332xqrb0cm36cn6rwdmgq7sllf9w19sf6jy4w0s4vgqdq1kngsnpz0z49i3vnknk8ms442yjllrdbqxbap9ajprc8yrs91za4l73";
+      };
+    };
+    "is-obj-1.0.1" = {
+      name = "is-obj";
+      packageName = "is-obj";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz";
+        sha1 = "3e4729ac1f5fde025cd7d83a896dab9f4f67db0f";
+      };
+    };
+    "is-obj-2.0.0" = {
+      name = "is-obj";
+      packageName = "is-obj";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz";
+        sha512 = "3rji48hhgd1433ipvrz0v97fcg39v3wz6awfs6advkwlhb032wadkxks4wnncbx6rk9vjp5kza6kmwf1rvkjs4l21qkqwqvfwdq7fkn";
+      };
+    };
+    "is-object-1.0.1" = {
+      name = "is-object";
+      packageName = "is-object";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz";
+        sha1 = "8952688c5ec2ffd6b03ecc85e769e02903083470";
+      };
+    };
+    "is-path-cwd-2.2.0" = {
+      name = "is-path-cwd";
+      packageName = "is-path-cwd";
+      version = "2.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz";
+        sha512 = "0aws7clcb9cyvvb4430df9fhfnpg9bl1n07ymzp7jdzia0bvjg25gyd39xp2xhgkgpkqazw8csglblifdql0rpj4kfwg1r26xnkdpn3";
+      };
+    };
+    "is-path-in-cwd-2.1.0" = {
+      name = "is-path-in-cwd";
+      packageName = "is-path-in-cwd";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz";
+        sha512 = "12yyg4jlg5mmiy2g0r91hz29v3jh5g2wyhdgs1qrfswx2sp7bfsn5g4632yfxmhrpjcy03bxfj12v93yd6pdykkpsmyz912g1f1rnmc";
+      };
+    };
+    "is-path-inside-2.1.0" = {
+      name = "is-path-inside";
+      packageName = "is-path-inside";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-path-inside/-/is-path-inside-2.1.0.tgz";
+        sha512 = "0b5h3ls9n24ma1wqpfsv7n034ryz86rfn1vkz5g0sih2abi9wrs0vx6w583s6qhcgqa6rx5w5layfz7hlakhxvf07qcnnn36x7s2b62";
+      };
+    };
+    "is-plain-obj-1.1.0" = {
+      name = "is-plain-obj";
+      packageName = "is-plain-obj";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz";
+        sha1 = "71a50c8429dfca773c92a390a4a03b39fcd51d3e";
+      };
+    };
+    "is-plain-object-2.0.4" = {
+      name = "is-plain-object";
+      packageName = "is-plain-object";
+      version = "2.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz";
+        sha512 = "0xgsjz9m3kg5pm36lcchblxk53qay59ya7wi5jgdmz0dsl5b0j2j7wcd48yyfaip1m70mj9aqf8kib02fn62k0hy0vxg2hng60yk4w7";
+      };
+    };
+    "is-promise-2.1.0" = {
+      name = "is-promise";
+      packageName = "is-promise";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz";
+        sha1 = "79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa";
+      };
+    };
+    "is-regex-1.0.5" = {
+      name = "is-regex";
+      packageName = "is-regex";
+      version = "1.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz";
+        sha512 = "1hqaalcf1yqll2yzm71a1axvid0x87jp41hyicw16rl12rrh6sp6srr9lk7wxm6a1vl3ypw8qyd0imbq8fl2h7yq8l8xawdnkbrclmy";
+      };
+    };
+    "is-regexp-1.0.0" = {
+      name = "is-regexp";
+      packageName = "is-regexp";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz";
+        sha1 = "fd2d883545c46bac5a633e7b9a09e87fa2cb5069";
+      };
+    };
+    "is-resolvable-1.1.0" = {
+      name = "is-resolvable";
+      packageName = "is-resolvable";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz";
+        sha512 = "0r8v3dkj5qbfh2wlj4w1msyqsw6j5myvxi88wkw36isscb97yyc2yc1pwm64djrmh1css6jp9p08cx1zb479fg4gv26prciaifdh05a";
+      };
+    };
+    "is-retry-allowed-1.2.0" = {
+      name = "is-retry-allowed";
+      packageName = "is-retry-allowed";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz";
+        sha512 = "134jdgzg4p15g5jvwsmb0bmglmymn1pyk6r2w8q1fm728f15l7k12sqmfngn0mg3vs34gzg12v684fp9c99l6jnv737b6rgmiwd8ij5";
+      };
+    };
+    "is-root-2.0.0" = {
+      name = "is-root";
+      packageName = "is-root";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-root/-/is-root-2.0.0.tgz";
+        sha512 = "0z1d0v0af41vz1cwff6262h8zkb0569fwq8yx8gbmrpqp0rc2b3y67b36w2jg4fhv3416m592qqpaarw4g48q9kwjbs63qh9wi4kyhp";
+      };
+    };
+    "is-stream-1.1.0" = {
+      name = "is-stream";
+      packageName = "is-stream";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz";
+        sha1 = "12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44";
+      };
+    };
+    "is-stream-2.0.0" = {
+      name = "is-stream";
+      packageName = "is-stream";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz";
+        sha512 = "09j5ybpil7bgiffzq9gw66svm3rrgx634aghkwyslbdx382iqpy991cf3kwfk2jh9bi8fjz5wa996wsjwmq21lzz5svgbsld7wk4ajw";
+      };
+    };
+    "is-svg-3.0.0" = {
+      name = "is-svg";
+      packageName = "is-svg";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-svg/-/is-svg-3.0.0.tgz";
+        sha512 = "36jn8w0rn8szd1vpk2pb9b7bnq3bfvwlakxmk1h792hgirxmh5bz8bi5sq6qmz54kx7aq7acbs232gdnwzmdm8jisp1sbbpmqf24bl2";
+      };
+    };
+    "is-symbol-1.0.3" = {
+      name = "is-symbol";
+      packageName = "is-symbol";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz";
+        sha512 = "1lmzzy2360gfg5639x8mzi5fpc1bgpdx0ffjlqaz9affd0lvvpi7yjwk15jsm1y1l8rf5jahyapv6rm2w3p86gxkghsp0jjlj2s621v";
+      };
+    };
+    "is-typedarray-1.0.0" = {
+      name = "is-typedarray";
+      packageName = "is-typedarray";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz";
+        sha1 = "e479c80858df0c1b11ddda6940f96011fcda4a9a";
+      };
+    };
+    "is-utf8-0.2.1" = {
+      name = "is-utf8";
+      packageName = "is-utf8";
+      version = "0.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz";
+        sha1 = "4b0da1442104d1b336340e80797e865cf39f7d72";
+      };
+    };
+    "is-windows-1.0.2" = {
+      name = "is-windows";
+      packageName = "is-windows";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz";
+        sha512 = "0h9a8zw2ddl25yryp7i376iqjdvlsx4gw93sxy4067dw2yi98m3krfwd9xgi9q5w0idw9rqnyhhncr38xsppyi5izkb7ngai58bawkr";
+      };
+    };
+    "is-wsl-1.1.0" = {
+      name = "is-wsl";
+      packageName = "is-wsl";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz";
+        sha1 = "1f16e4aa22b04d1336b66188a66af3c600c3a66d";
+      };
+    };
+    "isarray-1.0.0" = {
+      name = "isarray";
+      packageName = "isarray";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz";
+        sha1 = "bb935d48582cba168c06834957a54a3e07124f11";
+      };
+    };
+    "isexe-2.0.0" = {
+      name = "isexe";
+      packageName = "isexe";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz";
+        sha1 = "e8fbf374dc556ff8947a10dcb0572d633f2cfa10";
+      };
+    };
+    "isobject-2.1.0" = {
+      name = "isobject";
+      packageName = "isobject";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz";
+        sha1 = "f065561096a3f1da2ef46272f815c840d87e0c89";
+      };
+    };
+    "isobject-3.0.1" = {
+      name = "isobject";
+      packageName = "isobject";
+      version = "3.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz";
+        sha1 = "4e431e92b11a9731636aa1f9c8d1ccbcfdab78df";
+      };
+    };
+    "isstream-0.1.2" = {
+      name = "isstream";
+      packageName = "isstream";
+      version = "0.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz";
+        sha1 = "47e63f7af55afa6f92e1500e690eb8b8529c099a";
+      };
+    };
+    "isurl-1.0.0" = {
+      name = "isurl";
+      packageName = "isurl";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz";
+        sha512 = "3vs53bpdrwiwwcql2xs20jmd8qha27k4iypdhr0b3isgdaj18vz80nhxwvvqxk6y3x5vj3slchxl0r91gjhz487xmkkp52gridg5zyl";
+      };
+    };
+    "js-levenshtein-1.1.6" = {
+      name = "js-levenshtein";
+      packageName = "js-levenshtein";
+      version = "1.1.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz";
+        sha512 = "3x709s9ph1yxikp636493f7nkd2qbbrv7qrk0xykq9vgmq2sy1gc4h6rhzfqmji1fjqcayvgkppf675sz1429w1cdmb9dhravbl2q2z";
+      };
+    };
+    "js-tokens-4.0.0" = {
+      name = "js-tokens";
+      packageName = "js-tokens";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz";
+        sha512 = "0lwyvximqkf1q5w94x2747nj2v035is66vzalrbl3f2gdh9k1m3m29p8zw6r65ps5784x2lxwz8akmv085l4ai358rwbp84axz59lj5";
+      };
+    };
+    "js-yaml-3.13.1" = {
+      name = "js-yaml";
+      packageName = "js-yaml";
+      version = "3.13.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz";
+        sha512 = "0kkjjrr0znm2ka89ywc5518c8dw0210z91fm94c7v11l8c96mkjh0ddld5mb7jmmnpzap7vn0fhvr29lma63c9is2ixq3fpp0xxrxk1";
+      };
+    };
+    "jsbn-0.1.1" = {
+      name = "jsbn";
+      packageName = "jsbn";
+      version = "0.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz";
+        sha1 = "a5e654c2e5a2deb5f201d96cefbca80c0ef2f513";
+      };
+    };
+    "jsesc-0.5.0" = {
+      name = "jsesc";
+      packageName = "jsesc";
+      version = "0.5.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz";
+        sha1 = "e7dee66e35d6fc16f710fe91d5cf69f70f08911d";
+      };
+    };
+    "jsesc-2.5.2" = {
+      name = "jsesc";
+      packageName = "jsesc";
+      version = "2.5.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz";
+        sha512 = "20bfkjw0zjachan7rfv75dn5ky7l12xhyz919mdhh9fjn395ss454ykknjza7fwyx09dj89makcs1xi341dvv4k1cvj94739ifbp2rr";
+      };
+    };
+    "json-buffer-3.0.0" = {
+      name = "json-buffer";
+      packageName = "json-buffer";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz";
+        sha1 = "5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898";
+      };
+    };
+    "json-buffer-3.0.1" = {
+      name = "json-buffer";
+      packageName = "json-buffer";
+      version = "3.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz";
+        sha512 = "14iysr3lrpg8rlrd1q7qv6xwc9abgnfd1yw2wk08lahqhzz6jjrjwxd3k4q6y80p39qp251kdkgxmrx9ydmgglr9k8ag6knyh2pkdg1";
+      };
+    };
+    "json-parse-better-errors-1.0.2" = {
+      name = "json-parse-better-errors";
+      packageName = "json-parse-better-errors";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz";
+        sha512 = "2pv1kaf7gjr0bhr2djaf1i88li7q3v5daz4zm4hz57i4h21jgryihxb5c2h0p0q1vrq1ffyg279hp0vjrg73shvxr5lir6plxjb5fls";
+      };
+    };
+    "json-schema-0.2.3" = {
+      name = "json-schema";
+      packageName = "json-schema";
+      version = "0.2.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz";
+        sha1 = "b480c892e59a2f05954ce727bd3f2a4e882f9e13";
+      };
+    };
+    "json-schema-traverse-0.4.1" = {
+      name = "json-schema-traverse";
+      packageName = "json-schema-traverse";
+      version = "0.4.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz";
+        sha512 = "1bbgxs4777gn3q3yxi0n792cgz9pimf85pypr0w4wzpb22nr8fl9xi98pkcqd3n4fn7lnzffpq7qwpcl4dqc15py19lwqa2jwgw5dn5";
+      };
+    };
+    "json-stable-stringify-1.0.1" = {
+      name = "json-stable-stringify";
+      packageName = "json-stable-stringify";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz";
+        sha1 = "9a759d39c5f2ff503fd5300646ed445f88c4f9af";
+      };
+    };
+    "json-stringify-safe-5.0.1" = {
+      name = "json-stringify-safe";
+      packageName = "json-stringify-safe";
+      version = "5.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz";
+        sha1 = "1296a2d58fd45f19a0f6ce01d65701e2c735b6eb";
+      };
+    };
+    "json3-3.3.3" = {
+      name = "json3";
+      packageName = "json3";
+      version = "3.3.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/json3/-/json3-3.3.3.tgz";
+        sha512 = "049m3dzsr3mcgk3g8hw79w9lr296zxs0qmmn45ngfzinyxsvqh6k52i49690bfjlhsv16yrs87vh4nh6lfy80xrdh02haicnnczrgvk";
+      };
+    };
+    "json5-0.5.1" = {
+      name = "json5";
+      packageName = "json5";
+      version = "0.5.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz";
+        sha1 = "1eade7acc012034ad84e2396767ead9fa5495821";
+      };
+    };
+    "json5-1.0.1" = {
+      name = "json5";
+      packageName = "json5";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz";
+        sha512 = "0xzlb8ipv7y4s06gdr1j09fgp9a8xcjrwy5qq739vgadwzfyslk6xph4f9d8zv7rrc0fg3qn6fpwg3y1mrzf0hbi5qp8yng11cvi938";
+      };
+    };
+    "json5-2.1.2" = {
+      name = "json5";
+      packageName = "json5";
+      version = "2.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/json5/-/json5-2.1.2.tgz";
+        sha512 = "2ln46a38zniy6a7n5kb5mc4vxs81ylfnp08wg7g0swcpjw1fgscnws4jf9x68wv8f5x911r19wf56j8952k9fqrqvrdv24xhm1hx19j";
+      };
+    };
+    "jsonfile-2.4.0" = {
+      name = "jsonfile";
+      packageName = "jsonfile";
+      version = "2.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz";
+        sha1 = "3736a2b428b87bbda0cc83b53fa3d633a35c2ae8";
+      };
+    };
+    "jsonfile-4.0.0" = {
+      name = "jsonfile";
+      packageName = "jsonfile";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz";
+        sha1 = "8771aae0799b64076b76640fca058f9c10e33ecb";
+      };
+    };
+    "jsonify-0.0.0" = {
+      name = "jsonify";
+      packageName = "jsonify";
+      version = "0.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz";
+        sha1 = "2c74b6ee41d93ca51b7b5aaee8f503631d252a73";
+      };
+    };
+    "jsprim-1.4.1" = {
+      name = "jsprim";
+      packageName = "jsprim";
+      version = "1.4.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz";
+        sha1 = "313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2";
+      };
+    };
+    "keyv-3.0.0" = {
+      name = "keyv";
+      packageName = "keyv";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/keyv/-/keyv-3.0.0.tgz";
+        sha512 = "32ga97c763vprf4sjbb2f7gbngfppq9n1hy4cpq2h4yb1msrhh2zjimxib7p09mzgynm6askbigxlsqsm11p644avp4sf5nmng8f2vs";
+      };
+    };
+    "keyv-4.0.0" = {
+      name = "keyv";
+      packageName = "keyv";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/keyv/-/keyv-4.0.0.tgz";
+        sha512 = "2i48smwjjjg1l31fm6cflailqiwx8a4f1bcszskxn40zqxg9h2sgi5r04nym2vd9wy630jmdhpn311qybvjsf7w5maz96i2q09sif2k";
+      };
+    };
+    "killable-1.0.1" = {
+      name = "killable";
+      packageName = "killable";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz";
+        sha512 = "272kk46rkfh4wq4mispvvy174y6fj8rlnf1m5z8pszpa2igz586k5f8vzz3q3nckxwvkcyqzf48sndd48krwzr9ag22mhjlm4nasfig";
+      };
+    };
+    "kind-of-3.2.2" = {
+      name = "kind-of";
+      packageName = "kind-of";
+      version = "3.2.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz";
+        sha1 = "31ea21a734bab9bbb0f32466d893aea51e4a3c64";
+      };
+    };
+    "kind-of-4.0.0" = {
+      name = "kind-of";
+      packageName = "kind-of";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz";
+        sha1 = "20813df3d712928b207378691a45066fae72dd57";
+      };
+    };
+    "kind-of-5.1.0" = {
+      name = "kind-of";
+      packageName = "kind-of";
+      version = "5.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz";
+        sha512 = "0zk87sccrjx6pgf9n74v4msnqwq5siyhrkpaklx7yk85ygy5ypcgmyfhbd5mmcyd53x8zcw0gzvp9bhbglziqbhp7a6n5zsf6p08q9l";
+      };
+    };
+    "kind-of-6.0.3" = {
+      name = "kind-of";
+      packageName = "kind-of";
+      version = "6.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz";
+        sha512 = "23pm3j7jjxhl5igjj2mg91b2w2x6j39axjy2y7b1z0dp9jgnhxl885znwwvglzhnb5ssdc4v5vy04ks7xpwgzllyy1ngdmxbyxbbi3m";
+      };
+    };
+    "klaw-2.1.1" = {
+      name = "klaw";
+      packageName = "klaw";
+      version = "2.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/klaw/-/klaw-2.1.1.tgz";
+        sha1 = "42b76894701169cc910fd0d19ce677b5fb378af1";
+      };
+    };
+    "last-call-webpack-plugin-3.0.0" = {
+      name = "last-call-webpack-plugin";
+      packageName = "last-call-webpack-plugin";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/last-call-webpack-plugin/-/last-call-webpack-plugin-3.0.0.tgz";
+        sha512 = "3kqxr8xv0rsarmna01c0nhhvkbi9j76r6f2mwa2515dgskwf5dw7ml5iww9bqwr7s8g8yvy8cm8v305b62kqwyav9lsyrc8c6bkd8pc";
+      };
+    };
+    "latest-version-4.0.0" = {
+      name = "latest-version";
+      packageName = "latest-version";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/latest-version/-/latest-version-4.0.0.tgz";
+        sha512 = "37c4yh5igfqlfkxkd25rgnjrksv9xnkj1zc03n0a8zbpgx7rc1xl0ln562x81cm804pwicav8nw8f116bpxhc6bh9ph52chns9k50vg";
+      };
+    };
+    "lcid-1.0.0" = {
+      name = "lcid";
+      packageName = "lcid";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz";
+        sha1 = "308accafa0bc483a3867b4b6f2b9506251d1b835";
+      };
+    };
+    "lcid-2.0.0" = {
+      name = "lcid";
+      packageName = "lcid";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz";
+        sha512 = "1wcm03j1xmwayngclsgc7xk3rfsn8d3lcas6yfxszjpjwa37nwiia213cxkagdfc56anijwb679bg42ak1w59d0bkq6j47wqdpw9wva";
+      };
+    };
+    "load-json-file-1.1.0" = {
+      name = "load-json-file";
+      packageName = "load-json-file";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz";
+        sha1 = "956905708d58b4bab4c2261b04f59f31c99374c0";
+      };
+    };
+    "loader-runner-2.4.0" = {
+      name = "loader-runner";
+      packageName = "loader-runner";
+      version = "2.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz";
+        sha512 = "13mmy8rws80fp5mw0b7qwq5zvvlwq8v20hykp1npzsc5i5sw426j6sgi77js3lrqzbc8b7gjxhsrf26bi8xnn7ii8q64p2wskrspj96";
+      };
+    };
+    "loader-utils-1.1.0" = {
+      name = "loader-utils";
+      packageName = "loader-utils";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz";
+        sha1 = "c98aef488bcceda2ffb5e2de646d6a754429f5cd";
+      };
+    };
+    "loader-utils-1.4.0" = {
+      name = "loader-utils";
+      packageName = "loader-utils";
+      version = "1.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz";
+        sha512 = "1sdj0mw1y0adq9fpaafpv91yz2ijx06s6fpzjfs0db47cry0q2xjcahr5aksf6vlxp7ripisvjz21hjkkdzrwh8pc3zm7vdq141czd8";
+      };
+    };
+    "locate-path-2.0.0" = {
+      name = "locate-path";
+      packageName = "locate-path";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz";
+        sha1 = "2b568b265eec944c6d9c0de9c3dbbbca0354cd8e";
+      };
+    };
+    "locate-path-3.0.0" = {
+      name = "locate-path";
+      packageName = "locate-path";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz";
+        sha512 = "3jbllbkvv54d6k6zss6spzsknz5icscyfclf377jjpndb8mmacq0v9vjr1w07zjn14gaz4d2hfi0yaqk4nvg6hbm16qi70nrkivn0zc";
+      };
+    };
+    "locate-path-5.0.0" = {
+      name = "locate-path";
+      packageName = "locate-path";
+      version = "5.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz";
+        sha512 = "3r6llra9imfvg31342986kfkzm34ficva43avn7cng5inb9f5xrnr64jm4pykjjjbjs9np0mhia370ysnf97w4m6jqgnniyjbv71f5p";
+      };
+    };
+    "lodash-4.17.15" = {
+      name = "lodash";
+      packageName = "lodash";
+      version = "4.17.15";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz";
+        sha512 = "3a41cs1932x00vd7h32v6rfkaak3vhkwv4x0bg27ilhlmbpl95r3abc4vja21k42cdfprsy3sdfcp2xs02sfp1fflf7m3n2gd29q4zk";
+      };
+    };
+    "lodash._reinterpolate-3.0.0" = {
+      name = "lodash._reinterpolate";
+      packageName = "lodash._reinterpolate";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz";
+        sha1 = "0ccf2d89166af03b3663c796538b75ac6e114d9d";
+      };
+    };
+    "lodash.memoize-4.1.2" = {
+      name = "lodash.memoize";
+      packageName = "lodash.memoize";
+      version = "4.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz";
+        sha1 = "bcc6c49a42a2840ed997f323eada5ecd182e0bfe";
+      };
+    };
+    "lodash.template-4.5.0" = {
+      name = "lodash.template";
+      packageName = "lodash.template";
+      version = "4.5.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz";
+        sha512 = "3y567dmr1cb5vl7mf23r20iwxr6c3pc9p6wmpal1k61x039xys53b76nddyq8ydyyhnzacw1jjgsccfr87p8qjwi1a2g6i428bxi2zk";
+      };
+    };
+    "lodash.templatesettings-4.2.0" = {
+      name = "lodash.templatesettings";
+      packageName = "lodash.templatesettings";
+      version = "4.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz";
+        sha512 = "1jkf1vq05gx9z319z598cdf335qi0jsg1pfxbxg51fsjr9m6nfrqkdabg43knd3xrr7gchgkclyxnmzpvrszqq9crkay0dpx37hpn5j";
+      };
+    };
+    "lodash.uniq-4.5.0" = {
+      name = "lodash.uniq";
+      packageName = "lodash.uniq";
+      version = "4.5.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz";
+        sha1 = "d0225373aeb652adc1bc82e4945339a842754773";
+      };
+    };
+    "loglevel-1.6.7" = {
+      name = "loglevel";
+      packageName = "loglevel";
+      version = "1.6.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/loglevel/-/loglevel-1.6.7.tgz";
+        sha512 = "3y57kcbhh98x86dpx7apanxgnkqf5chybr4jnwhzljd3k2n9knm5h7fp9aiv6bzpyvq1xg0qssgg3i47ddiz80h7vahfj6hb8n9x3bi";
+      };
+    };
+    "loose-envify-1.4.0" = {
+      name = "loose-envify";
+      packageName = "loose-envify";
+      version = "1.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz";
+        sha512 = "3fhlaj5f55z0d4f45a5vsyz1r5k40qy6mfbxphjgnz8x4jx4d1g4pz4v2793viw0hk04a1a6zbiqxbjsjzhidp9jmmzhngzd8yb2awp";
+      };
+    };
+    "lower-case-2.0.1" = {
+      name = "lower-case";
+      packageName = "lower-case";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/lower-case/-/lower-case-2.0.1.tgz";
+        sha512 = "2nvzg5awqkqrrj7g32x95c48sghvbqvnisp439rxgh9fkwwkkq7jzpjivsx6bvmrybsr7a6rgazw6554llb26aldiq5fvyb69ya099f";
+      };
+    };
+    "lowercase-keys-1.0.0" = {
+      name = "lowercase-keys";
+      packageName = "lowercase-keys";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz";
+        sha1 = "4e3366b39e7f5457e35f1324bdf6f88d0bfc7306";
+      };
+    };
+    "lowercase-keys-1.0.1" = {
+      name = "lowercase-keys";
+      packageName = "lowercase-keys";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz";
+        sha512 = "1a7qa1zn5zl1nf7i6w3299lc3biabfb0w2c30cl770l2dbldvi72nwvjdlinhx7j0ldip82sj710aprdjbmbg782i2pa3jpbgmy6qhv";
+      };
+    };
+    "lowercase-keys-2.0.0" = {
+      name = "lowercase-keys";
+      packageName = "lowercase-keys";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz";
+        sha512 = "2c8fy71cr597nqfq7savid5rdk1msa2pcvxkn504w8bksci9vpm7x3a9yy87zc1lb5chzqnii12rd1h0jpc8k3kxy2c787w5snmg8xn";
+      };
+    };
+    "lru-cache-4.1.5" = {
+      name = "lru-cache";
+      packageName = "lru-cache";
+      version = "4.1.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz";
+        sha512 = "3k64s8pgffvqc84ar3r2jjvxnrll916m1q6s4m2k8pq2gqvlrzy11hdhvx2662fa4x7h1hcpn9wmy4kk28rgk3sj76w2fpn8dn6armi";
+      };
+    };
+    "lru-cache-5.1.1" = {
+      name = "lru-cache";
+      packageName = "lru-cache";
+      version = "5.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz";
+        sha512 = "3vjhn04mjkxbkfb4fh7xnlghlgmqffqp5i1w2vg1ndgh5izv7nwvr8lq1n1hypfs5pm3bvbk7wf3fjm2pavld1hipz0n8rp012l14ra";
+      };
+    };
+    "make-dir-1.3.0" = {
+      name = "make-dir";
+      packageName = "make-dir";
+      version = "1.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz";
+        sha512 = "2qkk2yzlzrfwnmw8l80cn4l91rfin7fmqn81j39s32i8gzijilbmc798wy51bs3m5gqa6dgrns95gals771jbbl4s4jgdl9ni3za3fv";
+      };
+    };
+    "make-dir-2.1.0" = {
+      name = "make-dir";
+      packageName = "make-dir";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz";
+        sha512 = "12asfdw6jlwcqjli9xywj755wznjxadmh7q6abrhldss26wdsik8w39dqww20i3ilr9mjam1r80ickwzlp9w7dz15bvqa1wszwmfbrd";
+      };
+    };
+    "makeerror-1.0.11" = {
+      name = "makeerror";
+      packageName = "makeerror";
+      version = "1.0.11";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz";
+        sha1 = "e01a5c9109f2af79660e4e8b9587790184f5a96c";
+      };
+    };
+    "map-age-cleaner-0.1.3" = {
+      name = "map-age-cleaner";
+      packageName = "map-age-cleaner";
+      version = "0.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz";
+        sha512 = "3gk1kdfw4z4pjghrxyn53gyb40gbk71ycv5mi2mbidwxg76mbfgkxcn88zkcrjw38mq6vn5kcarw4n5zq79ligh5k1s6gr8fgmg373c";
+      };
+    };
+    "map-cache-0.2.2" = {
+      name = "map-cache";
+      packageName = "map-cache";
+      version = "0.2.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz";
+        sha1 = "c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf";
+      };
+    };
+    "map-visit-1.0.0" = {
+      name = "map-visit";
+      packageName = "map-visit";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz";
+        sha1 = "ecdca8f13144e660f1b5bd41f12f3479d98dfb8f";
+      };
+    };
+    "md5-2.2.1" = {
+      name = "md5";
+      packageName = "md5";
+      version = "2.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/md5/-/md5-2.2.1.tgz";
+        sha1 = "53ab38d5fe3c8891ba465329ea23fac0540126f9";
+      };
+    };
+    "md5.js-1.3.5" = {
+      name = "md5.js";
+      packageName = "md5.js";
+      version = "1.3.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz";
+        sha512 = "29ds70y468n42xivsz4vrgy8rp2x4nxz52z1vkd1k49556gvn74pq998s510g3jgz9972m9yxs6yk1kw752blq97b9w8gaddkwlyay6";
+      };
+    };
+    "mdn-data-2.0.4" = {
+      name = "mdn-data";
+      packageName = "mdn-data";
+      version = "2.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz";
+        sha512 = "1q3dcqzncmynfxw8fbqvgwk8va8mac3lqpd9blz4knhj88fdmdcc863lscf5mm1h0ak34n9zr7bf7bgdzpqgfk8xr83xsilmhsdfpc9";
+      };
+    };
+    "mdn-data-2.0.6" = {
+      name = "mdn-data";
+      packageName = "mdn-data";
+      version = "2.0.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.6.tgz";
+        sha512 = "0w2lssr5jjc55m8zhx3c9n9c6qnq9ivsv2fm25d0dr7hkppcmpbrcsqdwdnc8p7c4q0nni2qws676wh8pv7rnr4h93h75v8pnzy62xd";
+      };
+    };
+    "media-typer-0.3.0" = {
+      name = "media-typer";
+      packageName = "media-typer";
+      version = "0.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz";
+        sha1 = "8710d7af0aa626f8fffa1ce00168545263255748";
+      };
+    };
+    "mem-4.3.0" = {
+      name = "mem";
+      packageName = "mem";
+      version = "4.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz";
+        sha512 = "3znrz98ggx92y1crm2y017k8lriwz4m9y4w451wm0h1jzsq7jgpafymdvgpznvx07l3xw8inznd78zzwyxdzhb0aq8scki9iwdrnzd9";
+      };
+    };
+    "memory-fs-0.4.1" = {
+      name = "memory-fs";
+      packageName = "memory-fs";
+      version = "0.4.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz";
+        sha1 = "3a9a20b8462523e447cfbc7e8bb80ed667bfc552";
+      };
+    };
+    "memory-fs-0.5.0" = {
+      name = "memory-fs";
+      packageName = "memory-fs";
+      version = "0.5.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz";
+        sha512 = "0cgni6pl3js3s6ylnj3j9sydf6z5sbnpyi42xdh4437rd6c7xgbapzdq84wn8dzxrcf7sva66z7m6mna61sdagfs41078aa9rsjn3cc";
+      };
+    };
+    "merge-descriptors-1.0.1" = {
+      name = "merge-descriptors";
+      packageName = "merge-descriptors";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz";
+        sha1 = "b00aaa556dd8b44568150ec9d1b953f3f90cbb61";
+      };
+    };
+    "merge-stream-2.0.0" = {
+      name = "merge-stream";
+      packageName = "merge-stream";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz";
+        sha512 = "3gyvijjr3va5jwglqgv7sqxm4a6nhzhj32sl68ffjf8axkzi5z25g0nl2r2mvw1kjs3z49wxjdclljkk4whzpqka4vzjg9fwylgzfv9";
+      };
+    };
+    "merge2-1.3.0" = {
+      name = "merge2";
+      packageName = "merge2";
+      version = "1.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/merge2/-/merge2-1.3.0.tgz";
+        sha512 = "1inz1swib3crzbwlqrpy74dhmn520qgzg5lkfmm3k1334lpb98d0xjpa6ydpdgwnp013j1n5m2yqkac4r75w6lbcj94hfj1v40h6gns";
+      };
+    };
+    "methods-1.1.2" = {
+      name = "methods";
+      packageName = "methods";
+      version = "1.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz";
+        sha1 = "5529a4d67654134edcc5266656835b0f851afcee";
+      };
+    };
+    "micromatch-3.1.10" = {
+      name = "micromatch";
+      packageName = "micromatch";
+      version = "3.1.10";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz";
+        sha512 = "1r9rsac8gdslsplya0cnzyk6q0bh7m0wnxccdisacr5327k5k0v6f48dzp0022z8qqpzpvxw7sv1gzhvrqn6v5sz7qcvx37by1a8s1i";
+      };
+    };
+    "micromatch-4.0.2" = {
+      name = "micromatch";
+      packageName = "micromatch";
+      version = "4.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz";
+        sha512 = "3jiz9pr94hycvjgzxbxi0jfz7n142n3z5w14im7i0088lymjpvj8xrapr8s66xcp13ylh374hbpm9ixp8rln55n7lrcll6c4qfnkcfb";
+      };
+    };
+    "miller-rabin-4.0.1" = {
+      name = "miller-rabin";
+      packageName = "miller-rabin";
+      version = "4.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz";
+        sha512 = "12277knznlw4myxmgg6vgkrwmrhj9dyniscrlph3s08ndi2q25v3wrv6rwanvz29v5k5x756xa5yif4xllrghpn3jqaamnr3cp5ypnp";
+      };
+    };
+    "mime-1.4.1" = {
+      name = "mime";
+      packageName = "mime";
+      version = "1.4.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz";
+        sha512 = "2sz22r1xrnyvq6jg0h6b6cab3s3xdsfqa0n6vl9xv9gq3ppcxrcpg2hqfc41xjwnfwfkr6240l5gys7nds61ch6xcb3gr3fwsl7x398";
+      };
+    };
+    "mime-1.6.0" = {
+      name = "mime";
+      packageName = "mime";
+      version = "1.6.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz";
+        sha512 = "1x901mk5cdib4xp27v4ivwwr7mhy64r4rk953bzivi5p9lf2bhw88ra2rhkd254xkdx2d3q30zkq239vc4yx4pfsj4hpys8rbr6fif7";
+      };
+    };
+    "mime-2.4.3" = {
+      name = "mime";
+      packageName = "mime";
+      version = "2.4.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mime/-/mime-2.4.3.tgz";
+        sha512 = "1kxc6r0xfiblss3gn102f4akmmm3jgcsj95n1hm8qgy4k8f5z2qn8bym7v4aa52dk68mjdzl9rvrn9sv70k3n9kwnmbiyn4jx2cy2j2";
+      };
+    };
+    "mime-2.4.4" = {
+      name = "mime";
+      packageName = "mime";
+      version = "2.4.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mime/-/mime-2.4.4.tgz";
+        sha512 = "0c4qs0w88nqz2v7441rw9bbsgrsh50cifwmqm2i7c96yz2ncdy35cb5g42zhr6z0wmqqcwq5la04nnf1n4y3zncvgyg8b721hvnc71d";
+      };
+    };
+    "mime-db-1.43.0" = {
+      name = "mime-db";
+      packageName = "mime-db";
+      version = "1.43.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mime-db/-/mime-db-1.43.0.tgz";
+        sha512 = "36x3p6lll5v1g7na92kbba0bpcl36i1argsqn8iy4mgz3zh3llnqhzhfw0l26jqcb0mh9rhhmrx718kvqzchga6y79qdg9884c6r5zv";
+      };
+    };
+    "mime-types-2.1.26" = {
+      name = "mime-types";
+      packageName = "mime-types";
+      version = "2.1.26";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mime-types/-/mime-types-2.1.26.tgz";
+        sha512 = "1cxsgrndjg6jyfqzm74hv6cmy9lil52f1kzkq2niknaiqz20p3yiw0fpgsyld2zrbxr9abpdabz1q6nqa50xr9a0cmbjbi0cqymlnnk";
+      };
+    };
+    "mimic-fn-1.2.0" = {
+      name = "mimic-fn";
+      packageName = "mimic-fn";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz";
+        sha512 = "1clrrqw75rmpkw0x53axy8va2hq2gzynz9zb58m0xv1nh3lg81cv4dfdy7pk9vrlb9ydwmj6klpicwkv2bjx3m8aj4fi2ph3jxkizwd";
+      };
+    };
+    "mimic-fn-2.1.0" = {
+      name = "mimic-fn";
+      packageName = "mimic-fn";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz";
+        sha512 = "1r8csnc32c6rrvy8d5d1g33gba52m1863wdwl7qbancmzn795726im9mrwp20k3d8pl4x4msp7n6wpldvcwkmk5y4cy0h84ka9wx9is";
+      };
+    };
+    "mimic-response-1.0.1" = {
+      name = "mimic-response";
+      packageName = "mimic-response";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz";
+        sha512 = "32nwz24nh1f2nbpk8i638ff8hsg1ajmc6746abkssjr951z28362k5a92dd1cfr7bd1l9f507cn0pbam04ixfgsaygskv87g6v1r4cg";
+      };
+    };
+    "mimic-response-2.1.0" = {
+      name = "mimic-response";
+      packageName = "mimic-response";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz";
+        sha512 = "080nd6134s2xyc8jb63q7hqszh9a52py287g4zqw1sy06nq0x9ac8bf2pwx7z9ygj4610ij6nk8a42q4ll4hwjgsg8xwblj7x4s6yn1";
+      };
+    };
+    "mini-css-extract-plugin-0.4.5" = {
+      name = "mini-css-extract-plugin";
+      packageName = "mini-css-extract-plugin";
+      version = "0.4.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.4.5.tgz";
+        sha512 = "3dnk581xzzd2njvqxkqy7ihwbk9pr4r4qyc0cqn2nkmrdlflldw01vcmhqy3v0jknxhpvjpy7a7v67ljl5n5xh2hxv7mdp4syf5m83n";
+      };
+    };
+    "minimalistic-assert-1.0.1" = {
+      name = "minimalistic-assert";
+      packageName = "minimalistic-assert";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz";
+        sha512 = "3y39pa1xxg7j49vya7xca4p1mg89d0df56hj4yjhpyhmza3g5qvpgp11xs11wkd48zzy7ym970jfbn0ppimmczpijns249j7q05rljj";
+      };
+    };
+    "minimalistic-crypto-utils-1.0.1" = {
+      name = "minimalistic-crypto-utils";
+      packageName = "minimalistic-crypto-utils";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz";
+        sha1 = "f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a";
+      };
+    };
+    "minimatch-3.0.4" = {
+      name = "minimatch";
+      packageName = "minimatch";
+      version = "3.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz";
+        sha512 = "1879a3j85h92ypvb7lpv1dqpcxl49rqnbgs5la18zmj1yqhwl60c2m74254wbr5pp3znckqpkg9dvjyrz6hfz8b9vag5a3j910db4f8";
+      };
+    };
+    "minimist-1.2.0" = {
+      name = "minimist";
+      packageName = "minimist";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz";
+        sha1 = "a35008b20f41383eec1fb914f4cd5df79a264284";
+      };
+    };
+    "minimist-1.2.5" = {
+      name = "minimist";
+      packageName = "minimist";
+      version = "1.2.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz";
+        sha512 = "0pif0kjsr0cdm73cyicn9xdx9zkly45w4akmyfa39lkaf6lzysfr8kr145p54wjk26pbsk0w0qfdds3k4bxy4wl5l210i1b8qsngkql";
+      };
+    };
+    "minipass-2.9.0" = {
+      name = "minipass";
+      packageName = "minipass";
+      version = "2.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz";
+        sha512 = "1x0k2ycn1r5fig2zy7jj5vjsc7sxdl2a8lidvzsfyhcbrmvyvlbkmb3ga6l8njclvhjz2yrcx57jn26bckzrms017zb2yan1y7d85y3";
+      };
+    };
+    "minizlib-1.3.3" = {
+      name = "minizlib";
+      packageName = "minizlib";
+      version = "1.3.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz";
+        sha512 = "3slcgy5kqasjl8k1n2indaaw0k6j2ipapzxrcqyy2zrwpv8z9w2im5i8c2c73pqdgkd31rwf5bajgv4pm2i6m9jg51cfmp694w0r5p9";
+      };
+    };
+    "mississippi-2.0.0" = {
+      name = "mississippi";
+      packageName = "mississippi";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mississippi/-/mississippi-2.0.0.tgz";
+        sha512 = "2gnigixsj38hrqchkf6k8wqywihq6l14pg0qb23x3qpjn56vybljv3nz1z7cbzhl952h1xfw28vsqm09pjhpv9zs9sm43rdxazkqync";
+      };
+    };
+    "mississippi-3.0.0" = {
+      name = "mississippi";
+      packageName = "mississippi";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz";
+        sha512 = "2895y9fw0xa9bmwbbkv3ziz5gnvr2b9k6kgh1b815ppwhgpcnbzsmn3bjvd2c1852hfakgnxw5hbn8kr8ff1pfbnm8x0lk3qm5gb3n7";
+      };
+    };
+    "mixin-deep-1.3.2" = {
+      name = "mixin-deep";
+      packageName = "mixin-deep";
+      version = "1.3.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz";
+        sha512 = "08fzp03g97vcq1dm4qs3kfjbazfs8h2m99bzdhn9caddpi4xr9bw9n9adlrv24qwfdw2jphwfhjszdwnykawd3ysj4ihp76zygh66jr";
+      };
+    };
+    "mkdirp-0.5.3" = {
+      name = "mkdirp";
+      packageName = "mkdirp";
+      version = "0.5.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.3.tgz";
+        sha512 = "0376f05nckrbra8z0qvw9p5bz1w4vyvalyh8bplzqdlm099dj958xqjckbya4gx36mr8f1fq1iybr0x0z2f9yqdgdhwkivan71a1v9z";
+      };
+    };
+    "mkdirp-0.5.5" = {
+      name = "mkdirp";
+      packageName = "mkdirp";
+      version = "0.5.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz";
+        sha512 = "32zxwnp110xb9sm0w7xdr51v2zj4k0b07yq702phnac2l8c91mxw6va27y193m42nvnw5dhby2jzg3b24fzjzkdr8337slz8ja81a9l";
+      };
+    };
+    "moment-2.24.0" = {
+      name = "moment";
+      packageName = "moment";
+      version = "2.24.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz";
+        sha512 = "111s7ki890wwh47hr44ps1q5vsh23jpp56dlgvyzz7hg71np9xkrc7k683qvfs7zyijb9fdcwzvinjcnbz36lhn0hg2hhknm7xxypkd";
+      };
+    };
+    "move-concurrently-1.0.1" = {
+      name = "move-concurrently";
+      packageName = "move-concurrently";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz";
+        sha1 = "be2c005fda32e0b29af1f05d7c4b33214c701f92";
+      };
+    };
+    "ms-2.0.0" = {
+      name = "ms";
+      packageName = "ms";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz";
+        sha1 = "5608aeadfc00be6c2901df5f9861788de0d597c8";
+      };
+    };
+    "ms-2.1.1" = {
+      name = "ms";
+      packageName = "ms";
+      version = "2.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz";
+        sha512 = "352z145jr1zx0w6kmlz2jxcaw6j2pwwg9va3x4gk731zw1agka2b213avw12zx6hgn071ibm0f3p80n5cdv896npay4s6jwbrv7w2mn";
+      };
+    };
+    "ms-2.1.2" = {
+      name = "ms";
+      packageName = "ms";
+      version = "2.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz";
+        sha512 = "3dqfiiw6nxvvi24fndbzlccnjcas99bsd1kz5m2r78lzgpp6vx57jzbmxq3k1m7bsw88rwra0n4848l720fxxn5x20djck3wp3hysdh";
+      };
+    };
+    "multicast-dns-6.2.3" = {
+      name = "multicast-dns";
+      packageName = "multicast-dns";
+      version = "6.2.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz";
+        sha512 = "3m42kr8y2s1krl4gzb5xsa9v3h01xalvrgdkj99gyfaq7761asmj5m6kzm70mxb22125gia12g7rmarnzmh09403j8j2cyvx7jqjblf";
+      };
+    };
+    "multicast-dns-service-types-1.1.0" = {
+      name = "multicast-dns-service-types";
+      packageName = "multicast-dns-service-types";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz";
+        sha1 = "899f11d9686e5e05cb91b35d5f0e63b773cfc901";
+      };
+    };
+    "murmur-hash-js-1.0.0" = {
+      name = "murmur-hash-js";
+      packageName = "murmur-hash-js";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/murmur-hash-js/-/murmur-hash-js-1.0.0.tgz";
+        sha1 = "5041049269c96633c866386960b2f4289e75e5b0";
+      };
+    };
+    "mustache-3.2.1" = {
+      name = "mustache";
+      packageName = "mustache";
+      version = "3.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mustache/-/mustache-3.2.1.tgz";
+        sha512 = "288avkys1mgcwdv33piblh5i715m64cl4z06ixvr71r4xddk49s4z625i6739hiyakk4j3lqygbjff8ysnpn10j95gs39abawq6yi24";
+      };
+    };
+    "mute-stream-0.0.7" = {
+      name = "mute-stream";
+      packageName = "mute-stream";
+      version = "0.0.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz";
+        sha1 = "3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab";
+      };
+    };
+    "mute-stream-0.0.8" = {
+      name = "mute-stream";
+      packageName = "mute-stream";
+      version = "0.0.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz";
+        sha512 = "001y43826xy43brn2n49xwvg7pjkn95d938fg0sk04jr9x4ak36w247lxnj48xim5c7ljk4czdgdk3myh08darj9qn2anr8x5cdcxly";
+      };
+    };
+    "nan-2.14.0" = {
+      name = "nan";
+      packageName = "nan";
+      version = "2.14.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz";
+        sha512 = "115f4m91pjscflwskc29clsspd2z02gdbz0dbj63ja8bf67nraw14gvppl4872y9z2f5vbjlkpg1i4625zvalx3gp04vvn2gs7qblr0";
+      };
+    };
+    "nanomatch-1.2.13" = {
+      name = "nanomatch";
+      packageName = "nanomatch";
+      version = "1.2.13";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz";
+        sha512 = "04al0wvh9hw1p9bblk847c5nbi3lcjz2pg5yzpqdzgllk57firrqinn4yk169iddaagdf9s5l987xh43z87w3hm9h0pqv0i7pcix6ky";
+      };
+    };
+    "ncp-1.0.1" = {
+      name = "ncp";
+      packageName = "ncp";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ncp/-/ncp-1.0.1.tgz";
+        sha1 = "d15367e5cb87432ba117d2bf80fdf45aecfb4246";
+      };
+    };
+    "negotiator-0.6.2" = {
+      name = "negotiator";
+      packageName = "negotiator";
+      version = "0.6.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz";
+        sha512 = "0xi79rad0khwah5v2k6pvh8ajjgi7hp3zlkg6gk11pv70ydcq7li0kzcv1gnaf13gmblzhvx7hxs2nhypphb0sp4cggiy4ympndr5c5";
+      };
+    };
+    "neo-async-2.6.1" = {
+      name = "neo-async";
+      packageName = "neo-async";
+      version = "2.6.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz";
+        sha512 = "1kvffl97cs76iidch6z424p50m0wdryx6h6b1jdgr71bfg035szlxcdl6dz9jy71aj8msvprdq2ilbs9jisbim3g1b4l2bfy3qsc9lb";
+      };
+    };
+    "nice-try-1.0.5" = {
+      name = "nice-try";
+      packageName = "nice-try";
+      version = "1.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz";
+        sha512 = "0swp764n5mcgqfjbm3hsw9iayqy46490y4lvqyk6www0a02bw130mji8lvsvlr34sc29rai5i4vpwwhh76mzplf6ljrlvwyszjphy6n";
+      };
+    };
+    "no-case-3.0.3" = {
+      name = "no-case";
+      packageName = "no-case";
+      version = "3.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/no-case/-/no-case-3.0.3.tgz";
+        sha512 = "17pqh35wma9y45ac1apa90fy5l1rl9g0z85mnqhpzgldgz7i09v2j735mkss3q33ns4zzbzapxsg5qldy8b17q2s95x0zq2ajcky5ks";
+      };
+    };
+    "node-elm-compiler-5.0.4" = {
+      name = "node-elm-compiler";
+      packageName = "node-elm-compiler";
+      version = "5.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/node-elm-compiler/-/node-elm-compiler-5.0.4.tgz";
+        sha512 = "0k6azydldy2w6xamqcm77lm9brm4hn8vxn0na1i7y1s0ikfiblw7f2kd0qg5i793s7ymms50mqxrjg0kggpklbwj03bcym20kqi62sm";
+      };
+    };
+    "node-forge-0.9.0" = {
+      name = "node-forge";
+      packageName = "node-forge";
+      version = "0.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/node-forge/-/node-forge-0.9.0.tgz";
+        sha512 = "0lhlm8x38i28zwmjycgdcyzcqlb0x3z8scjx7vm3s4ypj99bfj7pmv18yxjsnz532z7g9li2aa1x54hbv61dmvbvm4yj3z9ml6rl17c";
+      };
+    };
+    "node-int64-0.4.0" = {
+      name = "node-int64";
+      packageName = "node-int64";
+      version = "0.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz";
+        sha1 = "87a9065cdb355d3182d8f94ce11188b825c68a3b";
+      };
+    };
+    "node-libs-browser-2.2.1" = {
+      name = "node-libs-browser";
+      packageName = "node-libs-browser";
+      version = "2.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz";
+        sha512 = "3jhlmpgvcnjkg1bh3qp6rqp4a4plsih4bcfqkg0by0acj58r2m1x1jlsgw1k114920vlsvwl563lfjh844mpm02ykcs14gxq47xrz47";
+      };
+    };
+    "node-releases-1.1.53" = {
+      name = "node-releases";
+      packageName = "node-releases";
+      version = "1.1.53";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/node-releases/-/node-releases-1.1.53.tgz";
+        sha512 = "2ww5b7j2zf3ip1ld49jij1c3h7ba402j2p257w9450qqhj0pbf2q3bh4ihs80rl0kx9r84q7qychakxs9z29pczlnhzsybh0p4k77y2";
+      };
+    };
+    "node-watch-0.5.5" = {
+      name = "node-watch";
+      packageName = "node-watch";
+      version = "0.5.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/node-watch/-/node-watch-0.5.5.tgz";
+        sha512 = "0wamm245lxkvx31zim6cf1hbqwmmy8bvv1jifm1m23fpiwg6jml1bsl9k748wmns914626yhjr0rhiix3g78njir8agvs684vd4vp6g";
+      };
+    };
+    "nopt-1.0.10" = {
+      name = "nopt";
+      packageName = "nopt";
+      version = "1.0.10";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz";
+        sha1 = "6ddd21bd2a31417b92727dd585f8a6f37608ebee";
+      };
+    };
+    "normalize-package-data-2.5.0" = {
+      name = "normalize-package-data";
+      packageName = "normalize-package-data";
+      version = "2.5.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz";
+        sha512 = "1wbwhlsm965n61y23wrm50ric9l7rig90wvx7hjdl34np6n1bbqcc67wgm494z303s6y5aj4xjyism3n6kikp40iz9qaizlfhvqr47z";
+      };
+    };
+    "normalize-path-2.1.1" = {
+      name = "normalize-path";
+      packageName = "normalize-path";
+      version = "2.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz";
+        sha1 = "1ab28b556e198363a8c1a6f7e6fa20137fe6aed9";
+      };
+    };
+    "normalize-path-3.0.0" = {
+      name = "normalize-path";
+      packageName = "normalize-path";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz";
+        sha512 = "0n301s7qa4645iyk3zpcgin8r19p0p8h8g50c3mnnrl9n3m9rpyxv79hjl6miix9daq12s69am1sbskhqnzbabmn2id0nippgj6rrp9";
+      };
+    };
+    "normalize-range-0.1.2" = {
+      name = "normalize-range";
+      packageName = "normalize-range";
+      version = "0.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz";
+        sha1 = "2d10c06bdfd312ea9777695a4d28439456b75942";
+      };
+    };
+    "normalize-url-2.0.1" = {
+      name = "normalize-url";
+      packageName = "normalize-url";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz";
+        sha512 = "0rykwifg14xfgm9m6md48rkqqxa2cya4xdsv7jjciacis2nz6dzaccpzyldlpvy14rvihpxbdiysfn49a8x8x5jw84klmxzh9di98qg";
+      };
+    };
+    "normalize-url-3.3.0" = {
+      name = "normalize-url";
+      packageName = "normalize-url";
+      version = "3.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz";
+        sha512 = "1k9wdhamvss3wbk5kf7cxyaz3jrdxa6f4n9gk9sxmvhv7y7qlwqf7s6dmvb01pxs6vh03n0ygdxcw6dfsx9swkapcz5l5vfny5lkqjk";
+      };
+    };
+    "normalize-url-4.5.0" = {
+      name = "normalize-url";
+      packageName = "normalize-url";
+      version = "4.5.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz";
+        sha512 = "02k93b4vrh4rvz479dc5rjv43v54pzz5k5kn21cx6gl2b1c45s3sb29cy4cyifvfl9zqghs9m1f5kcv0hp4cwp8sigyqx9i6p5kpkns";
+      };
+    };
+    "npm-conf-1.1.3" = {
+      name = "npm-conf";
+      packageName = "npm-conf";
+      version = "1.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/npm-conf/-/npm-conf-1.1.3.tgz";
+        sha512 = "1rx44jzcf3byibrwmgyr0598hng4snjfj9bx29xm7bi5y1bqkbvb2krh8z0ccpzv3aps71qwrq55a56l1qkzlan118xyfn9j5nkh9v2";
+      };
+    };
+    "npm-run-path-2.0.2" = {
+      name = "npm-run-path";
+      packageName = "npm-run-path";
+      version = "2.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz";
+        sha1 = "35a9232dfa35d7067b4cb2ddf2357b1871536c5f";
+      };
+    };
+    "npm-run-path-4.0.1" = {
+      name = "npm-run-path";
+      packageName = "npm-run-path";
+      version = "4.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz";
+        sha512 = "1dw51xws0pd54mna4n5x07w9bh0zn3xdyq1pxf49w79kall1q4625hyi2vpblar83p2yr5xm018v14l9q6fxrwa6khvrvxvjp6id3sb";
+      };
+    };
+    "nth-check-1.0.2" = {
+      name = "nth-check";
+      packageName = "nth-check";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz";
+        sha512 = "0g2sh2g0bndg2df1nsbqm3vw97krfwk37bd4r7sbw2vqxwnbm28xdc33xgjrd4pigwm6sa2g9wlnk3166b51lwv6z7pqjmw7dv4xq2r";
+      };
+    };
+    "num2fraction-1.2.2" = {
+      name = "num2fraction";
+      packageName = "num2fraction";
+      version = "1.2.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz";
+        sha1 = "6f682b6a027a4e9ddfa4564cd2589d1d4e669ede";
+      };
+    };
+    "number-is-nan-1.0.1" = {
+      name = "number-is-nan";
+      packageName = "number-is-nan";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz";
+        sha1 = "097b602b53422a522c1afb8790318336941a011d";
+      };
+    };
+    "oauth-sign-0.9.0" = {
+      name = "oauth-sign";
+      packageName = "oauth-sign";
+      version = "0.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz";
+        sha512 = "1jz644r7ybsq688ifahm64ih3ljqjjskm533bgir20pvc350f9cl0z162scih0r1idx8lpw5f8hxa2pkf0lhbdhr5y6ak2ga5863v3x";
+      };
+    };
+    "object-assign-4.1.1" = {
+      name = "object-assign";
+      packageName = "object-assign";
+      version = "4.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz";
+        sha1 = "2109adc7965887cfc05cbbd442cac8bfbb360863";
+      };
+    };
+    "object-copy-0.1.0" = {
+      name = "object-copy";
+      packageName = "object-copy";
+      version = "0.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz";
+        sha1 = "7e7d858b781bd7c991a41ba975ed3812754e998c";
+      };
+    };
+    "object-inspect-1.7.0" = {
+      name = "object-inspect";
+      packageName = "object-inspect";
+      version = "1.7.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz";
+        sha512 = "19lmsxagwl8zzqckw6p0bdjwjbq2bshicnw78az9ka40d0gjghmdm0ify1n3857fxadv43c6v0g27rk1dl514iwh40a5i3mv0fl9fkb";
+      };
+    };
+    "object-is-1.0.2" = {
+      name = "object-is";
+      packageName = "object-is";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/object-is/-/object-is-1.0.2.tgz";
+        sha512 = "0wsh2mh2v96a9jvknzxad6bxhj8skpsanvcmfldzdj6vlc4y4ffjsjwwpg1awwqwdl0nldilcxpvq00nnd2br7qmlmrqxsrpgws35hj";
+      };
+    };
+    "object-keys-1.1.1" = {
+      name = "object-keys";
+      packageName = "object-keys";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz";
+        sha512 = "0nf2rr25ncya39v7cq274x3w4drfbdrc3iqdwd017s1wndwh9plsjagbvhl6j6l6piipprdsvgfx4vfz8q2piz7bi4bjcll8d4h9q1n";
+      };
+    };
+    "object-visit-1.0.1" = {
+      name = "object-visit";
+      packageName = "object-visit";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz";
+        sha1 = "f79c4493af0c5377b59fe39d395e41042dd045bb";
+      };
+    };
+    "object.assign-4.1.0" = {
+      name = "object.assign";
+      packageName = "object.assign";
+      version = "4.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz";
+        sha512 = "3krdp08gvbxvipalq64qy7bm86znxxdb7ap6bjki235qs17i9fsn6hqd22ga31sqyqa6iyy5xjfnnqc7lsck1kaybwsh154mrxcj4bv";
+      };
+    };
+    "object.entries-1.1.1" = {
+      name = "object.entries";
+      packageName = "object.entries";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/object.entries/-/object.entries-1.1.1.tgz";
+        sha512 = "2qp48plcipnz0hpb1bjd7qk60f929qsw5i29jhsa11p2ilxn1d1x1c3gyyaakgmi9v3jqrzmlcxydq8szvhqrpb4snrgj8x33n92nla";
+      };
+    };
+    "object.getownpropertydescriptors-2.1.0" = {
+      name = "object.getownpropertydescriptors";
+      packageName = "object.getownpropertydescriptors";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz";
+        sha512 = "1b08dy2xs3gqhwviks5245b0m3fa6kkdcqi8wldr5cfvkpgwbvdx474k9y5cjnsf2z075gysifxsc39i59fslxrl55kgpa03xmcx7b7";
+      };
+    };
+    "object.pick-1.3.0" = {
+      name = "object.pick";
+      packageName = "object.pick";
+      version = "1.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz";
+        sha1 = "87a10ac4c1694bd2e1cbf53591a66141fb5dd747";
+      };
+    };
+    "object.values-1.1.1" = {
+      name = "object.values";
+      packageName = "object.values";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz";
+        sha512 = "1w7lyv8q705mag20f36afs0qcnxjnpdg45xxnkq1ilqfd9rnf21fzbh0ib4vhwz0pzjynmqaszrsjccgk6vmgv4jas2pwla1pibjdjr";
+      };
+    };
+    "obuf-1.1.2" = {
+      name = "obuf";
+      packageName = "obuf";
+      version = "1.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz";
+        sha512 = "0vcjqppr8sr1in2haifxl9q8v6kgn8pddc4ffkjbx5n2fasb3kdrx7mybkfxqdaqfch2hqrwa87rrwllqd5lrmx73md609682xp0z9x";
+      };
+    };
+    "on-finished-2.3.0" = {
+      name = "on-finished";
+      packageName = "on-finished";
+      version = "2.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz";
+        sha1 = "20f1336481b083cd75337992a16971aa2d906947";
+      };
+    };
+    "on-headers-1.0.2" = {
+      name = "on-headers";
+      packageName = "on-headers";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz";
+        sha512 = "2n6994y8y4b146a5wpzzgw779yc227cqkmwsifc3fbn2kc9dzypjigqf72bpgsqrk7gs93l6fk4iqdk752jnsnpr89j58sbabw09455";
+      };
+    };
+    "once-1.4.0" = {
+      name = "once";
+      packageName = "once";
+      version = "1.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/once/-/once-1.4.0.tgz";
+        sha1 = "583b1aa775961d4b113ac17d9c50baef9dd76bd1";
+      };
+    };
+    "onetime-2.0.1" = {
+      name = "onetime";
+      packageName = "onetime";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz";
+        sha1 = "067428230fd67443b2794b22bba528b6867962d4";
+      };
+    };
+    "onetime-5.1.0" = {
+      name = "onetime";
+      packageName = "onetime";
+      version = "5.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz";
+        sha512 = "3lscn8ddi5nifjriym6zgmh0l8cn60g1d97d8ydnw19ssdyi2s0winvrx0j7gbb05lpf795a5v7wbm1jx54szh3452kbhg1y6815mz4";
+      };
+    };
+    "open-6.4.0" = {
+      name = "open";
+      packageName = "open";
+      version = "6.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/open/-/open-6.4.0.tgz";
+        sha512 = "0da91ydfkavxd733v8b3bvcrp681xirng4nyrazinl5bc2y3aacjd2g1bnapmzpp7g85bk42qh064hclbflj7jrkg94gvq5z1aafmr0";
+      };
+    };
+    "opn-5.4.0" = {
+      name = "opn";
+      packageName = "opn";
+      version = "5.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/opn/-/opn-5.4.0.tgz";
+        sha512 = "15vx11m9g7ljkb0rahxyxkvlbvf81rlgdbw5n7a5ffj2q80msblibdpy5nbrhhlnraplh0fmf4ksp6c1rqbmvgh4splmzvjslslqpv0";
+      };
+    };
+    "opn-5.5.0" = {
+      name = "opn";
+      packageName = "opn";
+      version = "5.5.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/opn/-/opn-5.5.0.tgz";
+        sha512 = "2qa90jg1bw4yx1an6vbx2cp7lpk6xwa94yrbr6mkpl2h95wl4iinlmlzzy2z5ihm79d4ypkjkf3w5m7cjl79775amsbav5x021fk89y";
+      };
+    };
+    "optimize-css-assets-webpack-plugin-5.0.3" = {
+      name = "optimize-css-assets-webpack-plugin";
+      packageName = "optimize-css-assets-webpack-plugin";
+      version = "5.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/optimize-css-assets-webpack-plugin/-/optimize-css-assets-webpack-plugin-5.0.3.tgz";
+        sha512 = "0l72h39ll7vgrkls1d7xz21s4bpv54wmpzdxylldnwrf6sx70qacgh5jjrdc5i8fzw9caw9bk38hvda7f7w14m2a0nlds2j4jydpmxb";
+      };
+    };
+    "options-0.0.6" = {
+      name = "options";
+      packageName = "options";
+      version = "0.0.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/options/-/options-0.0.6.tgz";
+        sha1 = "ec22d312806bb53e731773e7cdaefcf1c643128f";
+      };
+    };
+    "original-1.0.2" = {
+      name = "original";
+      packageName = "original";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/original/-/original-1.0.2.tgz";
+        sha512 = "038qn5613vi5gjik4pmng7zf2ib4w81hjyzy9dhflj7kw1p1ll09nq63x9rnkyyflkv33lq8bx0fbw1gzlpp4asy24l7adam2bma847";
+      };
+    };
+    "os-browserify-0.3.0" = {
+      name = "os-browserify";
+      packageName = "os-browserify";
+      version = "0.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz";
+        sha1 = "854373c7f5c2315914fc9bfc6bd8238fdda1ec27";
+      };
+    };
+    "os-homedir-1.0.2" = {
+      name = "os-homedir";
+      packageName = "os-homedir";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz";
+        sha1 = "ffbc4988336e0e833de0c168c7ef152121aa7fb3";
+      };
+    };
+    "os-locale-1.4.0" = {
+      name = "os-locale";
+      packageName = "os-locale";
+      version = "1.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz";
+        sha1 = "20f9f17ae29ed345e8bde583b13d2009803c14d9";
+      };
+    };
+    "os-locale-3.1.0" = {
+      name = "os-locale";
+      packageName = "os-locale";
+      version = "3.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz";
+        sha512 = "3frcfnhc4914snsnfqyqrz253i5dd31202gbx4dzkp6bvc8f7wnqhfyc89zp662v016gdqa7wb1z2g6p8nzk6cxzwscwn0qii3pgjb7";
+      };
+    };
+    "os-tmpdir-1.0.2" = {
+      name = "os-tmpdir";
+      packageName = "os-tmpdir";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz";
+        sha1 = "bbe67406c79aa85c5cfec766fe5734555dfa1274";
+      };
+    };
+    "output-file-sync-2.0.1" = {
+      name = "output-file-sync";
+      packageName = "output-file-sync";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/output-file-sync/-/output-file-sync-2.0.1.tgz";
+        sha512 = "36zk3d8yzp1i0lxpbv4fk0j853snx2gzaxkfzcx6vgdylnhj3gs6fdr6jf0qw14amcgagbd9r8pcws46n2pky3740bh4nmvm7i6hf4q";
+      };
+    };
+    "p-cancelable-0.4.1" = {
+      name = "p-cancelable";
+      packageName = "p-cancelable";
+      version = "0.4.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz";
+        sha512 = "02ipk9sgz2q0msm9h53lxbjvqprh9k6zj8q21dvczv6p6a5d4q5yqcmwj6xm0icmdc94n42plfmwlymnqn4f15pgci5j1zgq81vbmhw";
+      };
+    };
+    "p-cancelable-2.0.0" = {
+      name = "p-cancelable";
+      packageName = "p-cancelable";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.0.0.tgz";
+        sha512 = "0va49l2crhr6kr1lgbrjc69hz9scdrarzbrzpvddkfdb9wdr16bv48qajb2m0n6fjammxhvj68d4r35wyfy209rnajfv6nccq7dgwy2";
+      };
+    };
+    "p-defer-1.0.0" = {
+      name = "p-defer";
+      packageName = "p-defer";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz";
+        sha1 = "9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c";
+      };
+    };
+    "p-event-4.1.0" = {
+      name = "p-event";
+      packageName = "p-event";
+      version = "4.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/p-event/-/p-event-4.1.0.tgz";
+        sha512 = "2059kalwqi0hxv1rnpk504n5piz0cjqw6ifah5mq9vh9y9g26w70x3imkfp2x1smzz8hrqhzy3w3k5cd993f1wcbzjhgcl2l79ivw72";
+      };
+    };
+    "p-finally-1.0.0" = {
+      name = "p-finally";
+      packageName = "p-finally";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz";
+        sha1 = "3fbcfb15b899a44123b34b6dcc18b724336a2cae";
+      };
+    };
+    "p-is-promise-1.1.0" = {
+      name = "p-is-promise";
+      packageName = "p-is-promise";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz";
+        sha1 = "9c9456989e9f6588017b0434d56097675c3da05e";
+      };
+    };
+    "p-is-promise-2.1.0" = {
+      name = "p-is-promise";
+      packageName = "p-is-promise";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz";
+        sha512 = "0z3jpi001p4scg2h40kyy7mjvscz8l9mpdp79lhk9b19lyiz140gbwi8963dr5nrysmkrl0hy52v6ikg2wzfsmk8m6ccasgak1b8xb3";
+      };
+    };
+    "p-limit-1.3.0" = {
+      name = "p-limit";
+      packageName = "p-limit";
+      version = "1.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz";
+        sha512 = "3sh18calqxbww99pxc84hldflmj0i915g8npihlmazw8wjqabihi9475v0ll3fhx44sxn35j014j1k5d2xr73q3mpwkmx09n2q1gxxy";
+      };
+    };
+    "p-limit-2.2.2" = {
+      name = "p-limit";
+      packageName = "p-limit";
+      version = "2.2.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz";
+        sha512 = "36v4kvifp6msn6gaal1pgwy5qi56fbv8295221a6araml7nzxsnw2jfy7i6k7ybxy3dida9xxnyx447s8i8f15m27xklacwfz27wr2q";
+      };
+    };
+    "p-locate-2.0.0" = {
+      name = "p-locate";
+      packageName = "p-locate";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz";
+        sha1 = "20a0103b222a70c8fd39cc2e580680f3dde5ec43";
+      };
+    };
+    "p-locate-3.0.0" = {
+      name = "p-locate";
+      packageName = "p-locate";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz";
+        sha512 = "14sa2r3zdhvy3sq757d4l21nxrlb7picyigb8zm956bbjadcv22chrfa95wzzrf28z0cyj62b6yihhdc9508q82gs2q3yz8yk1pdvf7";
+      };
+    };
+    "p-locate-4.1.0" = {
+      name = "p-locate";
+      packageName = "p-locate";
+      version = "4.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz";
+        sha512 = "3n0ljmpk3p2j4aaz345w5gkqr128xkhflcb83k75fgns5ddd4bpx7l0q50w9kwy5792xb8d3dpf8bwgzif3463spf3140rhzmkmkgs7";
+      };
+    };
+    "p-map-2.1.0" = {
+      name = "p-map";
+      packageName = "p-map";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz";
+        sha512 = "0bx813aqd3627xffp035h9nimfd19i0l6may47yd0k7x2bngiyp8z31im58ac1nnxy3gdb3yiilagbyqlb7qwc8wdw06f3wjwmgqxnb";
+      };
+    };
+    "p-retry-3.0.1" = {
+      name = "p-retry";
+      packageName = "p-retry";
+      version = "3.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/p-retry/-/p-retry-3.0.1.tgz";
+        sha512 = "3gknqxqyn23vmgcqsvnvspzynkbkfn74f3plq72wj54kcyy5f3mbq3lw8pj2gwpmbkqcv7w0wvk3vv54dlny5j5dgv48khkwviqckjw";
+      };
+    };
+    "p-timeout-2.0.1" = {
+      name = "p-timeout";
+      packageName = "p-timeout";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/p-timeout/-/p-timeout-2.0.1.tgz";
+        sha512 = "0h1wg3bw3pyf3vlnxxfnrs3h33lwbx5n1lz4cz8ivh7bi8vjd6makxf6p1xz1d70ww3gj2ghryhbg6w1myxacgirk51ym23qzksdizk";
+      };
+    };
+    "p-try-1.0.0" = {
+      name = "p-try";
+      packageName = "p-try";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz";
+        sha1 = "cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3";
+      };
+    };
+    "p-try-2.2.0" = {
+      name = "p-try";
+      packageName = "p-try";
+      version = "2.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz";
+        sha512 = "1skmb50xzdk3qzd1f9l5mw8xp29frkizl63bhb9l1amivqybqb23n2824906vx790hjlwyhhrfzpzr5xr6ilzvy1xyl0ly0ah0wz2a7";
+      };
+    };
+    "package-json-5.0.0" = {
+      name = "package-json";
+      packageName = "package-json";
+      version = "5.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/package-json/-/package-json-5.0.0.tgz";
+        sha512 = "0p21ljjj6v8r8a8fvl691yyfy7n79anx5940c80byrdfwimpnvqwiznwagrvshhnvlmawz8c40nwhf37nqwaa44j3mn44p5ahad1q8i";
+      };
+    };
+    "pako-1.0.11" = {
+      name = "pako";
+      packageName = "pako";
+      version = "1.0.11";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz";
+        sha512 = "1imm2ygnj1himskq6lblzdh3ngc6p9gkvhrbzivalqf3nwafzfglpmbh8wkaz0rsiaxh67jzxbb16m2ygapfcnfwqg9gkdqzkqc24p2";
+      };
+    };
+    "parallel-transform-1.2.0" = {
+      name = "parallel-transform";
+      packageName = "parallel-transform";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz";
+        sha512 = "35gr4098wc5ibbrpckgva8l9v50z6mcii4y3kv6wc1ymz3aj2i444y3m2qm2ngf0k02ylqkg3gn7g6awkqfs56ppljy5wmpifcd4srz";
+      };
+    };
+    "param-case-3.0.3" = {
+      name = "param-case";
+      packageName = "param-case";
+      version = "3.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/param-case/-/param-case-3.0.3.tgz";
+        sha512 = "162w23h2rysv24bd7qhl4qhv1fd2rvb0n6ai8vg1q463b0wl5gfsqdcgxyn3484b2bj250rd9i7dqv9y374csdarlmy9mww5755aq2m";
+      };
+    };
+    "parse-asn1-5.1.5" = {
+      name = "parse-asn1";
+      packageName = "parse-asn1";
+      version = "5.1.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.5.tgz";
+        sha512 = "16n59f599pq8832a6c5wyxnqdf4vrqrdnclzs6vp9m2z2h9qmxamjk6xcrl1aal758jyba0pvyz1bkf7npm7achfxxa29jwaygihhwf";
+      };
+    };
+    "parse-json-2.2.0" = {
+      name = "parse-json";
+      packageName = "parse-json";
+      version = "2.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz";
+        sha1 = "f480f40434ef80741f8469099f8dea18f55a4dc9";
+      };
+    };
+    "parse-json-4.0.0" = {
+      name = "parse-json";
+      packageName = "parse-json";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz";
+        sha1 = "be35f5425be1f7f6c747184f98a788cb99477ee0";
+      };
+    };
+    "parse-passwd-1.0.0" = {
+      name = "parse-passwd";
+      packageName = "parse-passwd";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz";
+        sha1 = "6d5b934a456993b23d37f40a382d6f1666a8e5c6";
+      };
+    };
+    "parseurl-1.3.3" = {
+      name = "parseurl";
+      packageName = "parseurl";
+      version = "1.3.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz";
+        sha512 = "2lzxqjq4zp60k9gbskpqz7pr1yvb0c6nygd42sia7n6km2gc0cc844nlc5d6r9sshrjhjvs284143jzvz9wzd4r6xr9dz2k24xrwb0a";
+      };
+    };
+    "pascal-case-3.1.1" = {
+      name = "pascal-case";
+      packageName = "pascal-case";
+      version = "3.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.1.tgz";
+        sha512 = "10g214vi3ifgjl3g2ficxdnrxdlgdb3qvr7h0cljj0hbd5kmvcigr9k852m63invlksnbcx359wkmywxaw75xh29naspcibl8m8g1sw";
+      };
+    };
+    "pascalcase-0.1.1" = {
+      name = "pascalcase";
+      packageName = "pascalcase";
+      version = "0.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz";
+        sha1 = "b363e55e8006ca6fe21784d2db22bd15d7917f14";
+      };
+    };
+    "path-browserify-0.0.1" = {
+      name = "path-browserify";
+      packageName = "path-browserify";
+      version = "0.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz";
+        sha512 = "2avzhwqw37c6l7a0f276z7qzchzhwppinxhgg6q7by5bskwb7q7sfhwijb6fx4ingbdzb4i1pw6la5pg0izb5s4z69268278gil1ah5";
+      };
+    };
+    "path-dirname-1.0.2" = {
+      name = "path-dirname";
+      packageName = "path-dirname";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz";
+        sha1 = "cc33d24d525e099a5388c0336c6e32b9160609e0";
+      };
+    };
+    "path-exists-2.1.0" = {
+      name = "path-exists";
+      packageName = "path-exists";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz";
+        sha1 = "0feb6c64f0fc518d9a754dd5efb62c7022761f4b";
+      };
+    };
+    "path-exists-3.0.0" = {
+      name = "path-exists";
+      packageName = "path-exists";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz";
+        sha1 = "ce0ebeaa5f78cb18925ea7d810d7b59b010fd515";
+      };
+    };
+    "path-exists-4.0.0" = {
+      name = "path-exists";
+      packageName = "path-exists";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz";
+        sha512 = "3zvnv1dp30y10br2qy98z8760jssvps6g9swamdclgxsmhm14dyq0yacrj0d4mk915qhr1z0yh8l3dyd68wn7h7bgv8d39vjk5m0kva";
+      };
+    };
+    "path-is-absolute-1.0.1" = {
+      name = "path-is-absolute";
+      packageName = "path-is-absolute";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz";
+        sha1 = "174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f";
+      };
+    };
+    "path-is-inside-1.0.2" = {
+      name = "path-is-inside";
+      packageName = "path-is-inside";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz";
+        sha1 = "365417dede44430d1c11af61027facf074bdfc53";
+      };
+    };
+    "path-key-2.0.1" = {
+      name = "path-key";
+      packageName = "path-key";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz";
+        sha1 = "411cadb574c5a140d3a4b1910d40d80cc9f40b40";
+      };
+    };
+    "path-key-3.1.1" = {
+      name = "path-key";
+      packageName = "path-key";
+      version = "3.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz";
+        sha512 = "3ll9f60sa4xi9iswmzar1hldsdhg1y8wy94wa0qmrcapf0prj95yng3bw7fkbi3jh44jc3hjymxwhxg7j7a2b9incijvywx98vrwfd2";
+      };
+    };
+    "path-parse-1.0.6" = {
+      name = "path-parse";
+      packageName = "path-parse";
+      version = "1.0.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz";
+        sha512 = "37qw5986wccpwwqckqky509s4nd6zwv200s9r2v6mcf5nsyxgf2x00m4yp918mkkz84sdh4q0kjbg0hhfq4flpz0l6v47hvc57qwa8r";
+      };
+    };
+    "path-to-regexp-0.1.7" = {
+      name = "path-to-regexp";
+      packageName = "path-to-regexp";
+      version = "0.1.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz";
+        sha1 = "df604178005f522f15eb4490e7247a1bfaa67f8c";
+      };
+    };
+    "path-type-1.1.0" = {
+      name = "path-type";
+      packageName = "path-type";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz";
+        sha1 = "59c44f7ee491da704da415da5a4070ba4f8fe441";
+      };
+    };
+    "path-type-3.0.0" = {
+      name = "path-type";
+      packageName = "path-type";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz";
+        sha512 = "2z1csf4c3fmlwl0ahk533z5zqkjdf36ccfx11kakl9xran9f5asxm4cxjq4lx1kwqdp8gki786cgpldvgrkvfc7pcvh07j5ssqm8rjg";
+      };
+    };
+    "path-type-4.0.0" = {
+      name = "path-type";
+      packageName = "path-type";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz";
+        sha512 = "2zw0czk4p8vimrxap6mlnw17lbjrhisby3z1m2j0qdhjcnxlv9lk5d8yxirrqy4ax6ar5qx14rpshmbpvzg9b4mnpzy03aclvqrncl0";
+      };
+    };
+    "pbkdf2-3.0.17" = {
+      name = "pbkdf2";
+      packageName = "pbkdf2";
+      version = "3.0.17";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz";
+        sha512 = "2s4nd3yv3kkyywvh5rkrvbr6w2h6a4q786v548w895ralcq9cllqzyxr0jgxf911k3zpmzycimsg3ggww3lkrhd3bk9wribrgjaby2k";
+      };
+    };
+    "pem-1.14.2" = {
+      name = "pem";
+      packageName = "pem";
+      version = "1.14.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pem/-/pem-1.14.2.tgz";
+        sha512 = "0w57ydgr6304raqbf2svkvkxjw6r91kgdk926wljdpybpmr1xr7y94j4sqi63gc4dm6vi5x6wii8kx6p13awzp6i2kp05nrmnvczsac";
+      };
+    };
+    "performance-now-2.1.0" = {
+      name = "performance-now";
+      packageName = "performance-now";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz";
+        sha1 = "6309f4e0e5fa913ec1c69307ae364b4b377c9e7b";
+      };
+    };
+    "picomatch-2.2.2" = {
+      name = "picomatch";
+      packageName = "picomatch";
+      version = "2.2.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz";
+        sha512 = "1d2xjd4r28xk5ggmns7n33nvga0ywk30plvs17dr70qwq0jc17p8kmfsm50idvj6xdrj1fikz0yv63x1pychmz90bs6mkj7wvskyhxb";
+      };
+    };
+    "pify-2.3.0" = {
+      name = "pify";
+      packageName = "pify";
+      version = "2.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz";
+        sha1 = "ed141a6ac043a849ea588498e7dca8b15330e90c";
+      };
+    };
+    "pify-3.0.0" = {
+      name = "pify";
+      packageName = "pify";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz";
+        sha1 = "e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176";
+      };
+    };
+    "pify-4.0.1" = {
+      name = "pify";
+      packageName = "pify";
+      version = "4.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz";
+        sha512 = "3d9a1zsv7ca8ffpp7ffl67vp0ahiq78ix1jl21b4nfklinh2ilwh6c45f93syclab0b49p3cfq8d4agpphrbmf6xgfxgzjv268387xq";
+      };
+    };
+    "pinkie-2.0.4" = {
+      name = "pinkie";
+      packageName = "pinkie";
+      version = "2.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz";
+        sha1 = "72556b80cfa0d48a974e80e77248e80ed4f7f870";
+      };
+    };
+    "pinkie-promise-2.0.1" = {
+      name = "pinkie-promise";
+      packageName = "pinkie-promise";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz";
+        sha1 = "2135d6dfa7a358c069ac9b178776288228450ffa";
+      };
+    };
+    "pjson-1.0.9" = {
+      name = "pjson";
+      packageName = "pjson";
+      version = "1.0.9";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pjson/-/pjson-1.0.9.tgz";
+        sha512 = "1sh37y91m7ii0xy1213jw8ja42309mhxzrv0nvnxl77002lfc0m95fjbnwdn6r0cib8js60v54f2r02n4fcwl98jm74m49kfqglj572";
+      };
+    };
+    "pkg-dir-2.0.0" = {
+      name = "pkg-dir";
+      packageName = "pkg-dir";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz";
+        sha1 = "f6d5d1109e19d63edf428e0bd57e12777615334b";
+      };
+    };
+    "pkg-dir-3.0.0" = {
+      name = "pkg-dir";
+      packageName = "pkg-dir";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz";
+        sha512 = "2znan90js3xrk8a8cvzv7vrjma5dgr9hkk4kpcgciyawbjz404a4rpdj6gngx1dc7f1xzmfm3q0an1rq69qyk2cmawhsy98i40pnkpw";
+      };
+    };
+    "pkg-up-2.0.0" = {
+      name = "pkg-up";
+      packageName = "pkg-up";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz";
+        sha1 = "c819ac728059a461cab1c3889a2be3c49a004d7f";
+      };
+    };
+    "pkginfo-0.3.1" = {
+      name = "pkginfo";
+      packageName = "pkginfo";
+      version = "0.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz";
+        sha1 = "5b29f6a81f70717142e09e765bbeab97b4f81e21";
+      };
+    };
+    "pkginfo-0.4.1" = {
+      name = "pkginfo";
+      packageName = "pkginfo";
+      version = "0.4.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pkginfo/-/pkginfo-0.4.1.tgz";
+        sha1 = "b5418ef0439de5425fc4995042dced14fb2a84ff";
+      };
+    };
+    "portfinder-1.0.25" = {
+      name = "portfinder";
+      packageName = "portfinder";
+      version = "1.0.25";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/portfinder/-/portfinder-1.0.25.tgz";
+        sha512 = "0388smj2gw4cwp6pddy75jr5x6sha60s4w055dpxpag7fi9ql9vxrkidnzc1v5h2zp6ra350y8q4n6lqsg0dq12blsm1iavf2f4jjg8";
+      };
+    };
+    "posix-character-classes-0.1.1" = {
+      name = "posix-character-classes";
+      packageName = "posix-character-classes";
+      version = "0.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz";
+        sha1 = "01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab";
+      };
+    };
+    "postcss-6.0.23" = {
+      name = "postcss";
+      packageName = "postcss";
+      version = "6.0.23";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss/-/postcss-6.0.23.tgz";
+        sha512 = "1m7l8kr2bwwm21ki5jvrkfaxfxg5nqjn4zk9xf0b7rzyq1xz4s64cm5wh34qf0c13vva14wbmvfkwg7yndmcpnmcq9m7pc93vba90xj";
+      };
+    };
+    "postcss-7.0.27" = {
+      name = "postcss";
+      packageName = "postcss";
+      version = "7.0.27";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss/-/postcss-7.0.27.tgz";
+        sha512 = "1sm64zw7m5fj7ni24kn3xcjnncf9c0jva67x209x5bz33kf1yvr9dwd9bwk2csavbh42a5yh2q61n9z2rjivdpxswgxanqwyd609r2s";
+      };
+    };
+    "postcss-calc-7.0.2" = {
+      name = "postcss-calc";
+      packageName = "postcss-calc";
+      version = "7.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.2.tgz";
+        sha512 = "2yialb25zhak51b057lni6kr12p4aicp8w8m13krhsjq24ghz99l3v6mp5qhc6ihymc2bfqn1sqckmz5mcph3qwplmr5s90fladk1xf";
+      };
+    };
+    "postcss-colormin-4.0.3" = {
+      name = "postcss-colormin";
+      packageName = "postcss-colormin";
+      version = "4.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-4.0.3.tgz";
+        sha512 = "0vhqbcpm535dwjglgk0svgxghy7063rwkd7i1rh8ykqmyz9imclbp5blj99i64awgjx6fk68xksqs3r3x6x38vxhx84r96rs00ha92v";
+      };
+    };
+    "postcss-convert-values-4.0.1" = {
+      name = "postcss-convert-values";
+      packageName = "postcss-convert-values";
+      version = "4.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-4.0.1.tgz";
+        sha512 = "0jw9v1315cyal4mc0vd8acqy7g8r6hizrx7pldmzin7dnwbb1pj00q6c301cn8dpwkc5wfcphjqw8zwskjx19wrs01abv5vbjiisara";
+      };
+    };
+    "postcss-discard-comments-4.0.2" = {
+      name = "postcss-discard-comments";
+      packageName = "postcss-discard-comments";
+      version = "4.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-4.0.2.tgz";
+        sha512 = "29fj6haa98fxl30bgk20jxngsis7r73k0n6zkc0aydqliqj9vddrx3g03zrxhf5k82pyf6kcbhb151kiff1kfw5vigy92kxdqvsv6s4";
+      };
+    };
+    "postcss-discard-duplicates-4.0.2" = {
+      name = "postcss-discard-duplicates";
+      packageName = "postcss-discard-duplicates";
+      version = "4.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-4.0.2.tgz";
+        sha512 = "2hkmiwkgz59h7dvgm53nfwv2pc4ymjx82i1mfrfx3lvh3yc2rj8jpvq7in5cpj26aqlbhr2jzg7slc2qibk810qcsbhhd0gb13izm34";
+      };
+    };
+    "postcss-discard-empty-4.0.1" = {
+      name = "postcss-discard-empty";
+      packageName = "postcss-discard-empty";
+      version = "4.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-4.0.1.tgz";
+        sha512 = "39k3fi493q6ixpvh0rs3ald21h8mnp0vkls85wfgbhyb5x21dz2xb6knc1xav5ygjzkyckl0wmxd9m2qybqmvzq9pii17pk6r7s5n87";
+      };
+    };
+    "postcss-discard-overridden-4.0.1" = {
+      name = "postcss-discard-overridden";
+      packageName = "postcss-discard-overridden";
+      version = "4.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-4.0.1.tgz";
+        sha512 = "179r7sbkc1x3x2mv5g2il2vhx0akmcd61lai2y8ipk8g5vy13pd6nr57xak319ll3wn60mih08y5zz32g2i40sj6dbhvvn381n3d1i1";
+      };
+    };
+    "postcss-flexbugs-fixes-3.3.1" = {
+      name = "postcss-flexbugs-fixes";
+      packageName = "postcss-flexbugs-fixes";
+      version = "3.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-flexbugs-fixes/-/postcss-flexbugs-fixes-3.3.1.tgz";
+        sha512 = "3xsv14h0z6rs754dhwmmmkcqpbjd9kck8k78ydv7yqcdfyvb370lz2w5mrbvz1igcw7qv8lzd3814bbipkzdcby54ix25zn6w668bzp";
+      };
+    };
+    "postcss-load-config-1.2.0" = {
+      name = "postcss-load-config";
+      packageName = "postcss-load-config";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-1.2.0.tgz";
+        sha1 = "539e9afc9ddc8620121ebf9d8c3673e0ce50d28a";
+      };
+    };
+    "postcss-load-options-1.2.0" = {
+      name = "postcss-load-options";
+      packageName = "postcss-load-options";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-load-options/-/postcss-load-options-1.2.0.tgz";
+        sha1 = "b098b1559ddac2df04bc0bb375f99a5cfe2b6d8c";
+      };
+    };
+    "postcss-load-plugins-2.3.0" = {
+      name = "postcss-load-plugins";
+      packageName = "postcss-load-plugins";
+      version = "2.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz";
+        sha1 = "745768116599aca2f009fad426b00175049d8d92";
+      };
+    };
+    "postcss-loader-2.1.5" = {
+      name = "postcss-loader";
+      packageName = "postcss-loader";
+      version = "2.1.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-loader/-/postcss-loader-2.1.5.tgz";
+        sha512 = "2r4igq1b6l10xxgqwf5mhvn2afwjs63d1f1j1ndgxzikd5ncqlanpgirq5syb4kn440lpc24h2dbm04ivhxc2wznpsly9yyk43y8pm5";
+      };
+    };
+    "postcss-merge-longhand-4.0.11" = {
+      name = "postcss-merge-longhand";
+      packageName = "postcss-merge-longhand";
+      version = "4.0.11";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-4.0.11.tgz";
+        sha512 = "2zp1rk4fk9lcg6d4x9yfr1n7zp8kzj5vghnjji9229qv8sbb24ij0y33sj6kwv1m5h7s5a3b72ja7wf1h8rpy5jlxiz4phydb77yp3a";
+      };
+    };
+    "postcss-merge-rules-4.0.3" = {
+      name = "postcss-merge-rules";
+      packageName = "postcss-merge-rules";
+      version = "4.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-4.0.3.tgz";
+        sha512 = "08rwihmvnqrz9ia48czncj4i50hrii7xgrvdff49a1yb1v28fd8z41bk21j3invi8d3s0x1iihn0598yczm3xwss378rgcvajpvgdsk";
+      };
+    };
+    "postcss-minify-font-values-4.0.2" = {
+      name = "postcss-minify-font-values";
+      packageName = "postcss-minify-font-values";
+      version = "4.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-4.0.2.tgz";
+        sha512 = "2vdpqczvay1n44i15jg66gf28pj777img4cps6vx830hhif65w6y92zr555xr5c0f46wnkbx9h0idnldzvghf7x7mrlyid7lcxniklg";
+      };
+    };
+    "postcss-minify-gradients-4.0.2" = {
+      name = "postcss-minify-gradients";
+      packageName = "postcss-minify-gradients";
+      version = "4.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-4.0.2.tgz";
+        sha512 = "3whlz4gqxsd8f0g908qwpqn0bmgm1sz3iscx5i4ys15b1kd4bi8cx01kcvjpa18d567kh38kchb7yr7297xakvp0bzwfxcdag1dz8x8";
+      };
+    };
+    "postcss-minify-params-4.0.2" = {
+      name = "postcss-minify-params";
+      packageName = "postcss-minify-params";
+      version = "4.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-4.0.2.tgz";
+        sha512 = "1d4037bvr8ws41rvsrnhcmlx57s6czqxr8wwpwdp9wzrz76wxwn1zxpvq9mdalki6vn3ncm0b63qgiv96f09088zzw15lri675rddqv";
+      };
+    };
+    "postcss-minify-selectors-4.0.2" = {
+      name = "postcss-minify-selectors";
+      packageName = "postcss-minify-selectors";
+      version = "4.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-4.0.2.tgz";
+        sha512 = "3gaxsjc0lh0lwy3jri4bsx18fsmx34qsh07bk43pqw3pxr04bq66vw88rr7jijdn745pw96dhkagmds32745ra7yrip13d5b24vb50g";
+      };
+    };
+    "postcss-modules-extract-imports-2.0.0" = {
+      name = "postcss-modules-extract-imports";
+      packageName = "postcss-modules-extract-imports";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz";
+        sha512 = "1cwpb0nbsgvwyxf6kr3wmpnsc0dgyx0mcapbp1103klr5gq7pmg6d423dah9k4sxzxvpz7b62ncjwvlc21ah5k0wl86yj5qsh60p9id";
+      };
+    };
+    "postcss-modules-local-by-default-3.0.2" = {
+      name = "postcss-modules-local-by-default";
+      packageName = "postcss-modules-local-by-default";
+      version = "3.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-3.0.2.tgz";
+        sha512 = "0hxy2fkb9wv78ws2ki52j3rx5j2m1xy9yg8k9mcn5cjlynwbf9kykmysiqlrcpax3yan7y35ccvg7mf4cg87x38vdzq5qlcxbqxbkwc";
+      };
+    };
+    "postcss-modules-scope-2.2.0" = {
+      name = "postcss-modules-scope";
+      packageName = "postcss-modules-scope";
+      version = "2.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-2.2.0.tgz";
+        sha512 = "1fnivyay60x7kkg653ks8az8palhp4vprn0n0kj75dvc8f761p8q2bvaq95dbspayxzqyjnw4qvwz47wrzyr0kc3rzdg90i6fqj08b3";
+      };
+    };
+    "postcss-modules-values-3.0.0" = {
+      name = "postcss-modules-values";
+      packageName = "postcss-modules-values";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-3.0.0.tgz";
+        sha512 = "1r2657ijhxmh1dszbwr1k8mdpda7r8w8gj5x4q76bya68pvwyx9vir5y1kg9qqwxhqn5qymldbm5m22cqmwrzhmk51rzbc163kc9zyp";
+      };
+    };
+    "postcss-normalize-charset-4.0.1" = {
+      name = "postcss-normalize-charset";
+      packageName = "postcss-normalize-charset";
+      version = "4.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz";
+        sha512 = "3g41krdk4hzkzly9kw24zwg3dbmxzaiq9wfsin6c8691f9rv94fz8sxinwg7h5v420h7nvcipqg07dxrmxif8adxnva31snp6pc5ic0";
+      };
+    };
+    "postcss-normalize-display-values-4.0.2" = {
+      name = "postcss-normalize-display-values";
+      packageName = "postcss-normalize-display-values";
+      version = "4.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-4.0.2.tgz";
+        sha512 = "2wi1jy4i45d607gv94743b94ii3q66vm059z6zg7hcdvvayalkcjm6ylkpz4dfvh18l3p632cb0z1wvyzzsj00knnavynwcqrra6pfw";
+      };
+    };
+    "postcss-normalize-positions-4.0.2" = {
+      name = "postcss-normalize-positions";
+      packageName = "postcss-normalize-positions";
+      version = "4.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-4.0.2.tgz";
+        sha512 = "1s6phjg5gbhmhr5ycjw4q6lr5vi8sz542kqhzj41xsbc0nkbas87npz1z3s3rsr30br7pqmdkjj423s0cb2fpsx6hz139ris3zzfmqf";
+      };
+    };
+    "postcss-normalize-repeat-style-4.0.2" = {
+      name = "postcss-normalize-repeat-style";
+      packageName = "postcss-normalize-repeat-style";
+      version = "4.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-4.0.2.tgz";
+        sha512 = "3wkb4bcky7wf9vs92wq6qcwldzxbnbnrww43fyb5i6vi66gzgs5xlhhm8m0na72hqxk08bzjcn52xwwz7vv7j6d2sl2p98chrss1y5a";
+      };
+    };
+    "postcss-normalize-string-4.0.2" = {
+      name = "postcss-normalize-string";
+      packageName = "postcss-normalize-string";
+      version = "4.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-4.0.2.tgz";
+        sha512 = "1wg89sywdpnm8pck61g313d9igh8cpmqlgv6x6cdixgc98046irm7yq1nwygk5adz990q9h9frskbm358zkfmlgmcm7q3kvvyhi3ca6";
+      };
+    };
+    "postcss-normalize-timing-functions-4.0.2" = {
+      name = "postcss-normalize-timing-functions";
+      packageName = "postcss-normalize-timing-functions";
+      version = "4.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-4.0.2.tgz";
+        sha512 = "3h7jmkpmrh0yw6w06k28dgfmhn4g4pbkr3p4wc3n7m8psd4z06q4193l59nha3wd3rf6w44j2qzilmb450x7gpgv7xgwx2yvrihkk39";
+      };
+    };
+    "postcss-normalize-unicode-4.0.1" = {
+      name = "postcss-normalize-unicode";
+      packageName = "postcss-normalize-unicode";
+      version = "4.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-4.0.1.tgz";
+        sha512 = "311iz04wy12nd657s0l1hs8fm9550gzxjkig30cx6wyc7pxlcfraxfjkzdpi30nqplb9rz6k03y7wdnmvkhislzppz8j2dhmm97rpd1";
+      };
+    };
+    "postcss-normalize-url-4.0.1" = {
+      name = "postcss-normalize-url";
+      packageName = "postcss-normalize-url";
+      version = "4.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-4.0.1.tgz";
+        sha512 = "1a19pc9bvl37skha2a49r50yvfxhg21idcz965v4ir6adhqvy27m40zvmbd27wnlq3djch92xisk6aas9znlk2sxlp7q81ybrl1b6m7";
+      };
+    };
+    "postcss-normalize-whitespace-4.0.2" = {
+      name = "postcss-normalize-whitespace";
+      packageName = "postcss-normalize-whitespace";
+      version = "4.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-4.0.2.tgz";
+        sha512 = "2s0cgihhy92iqlwlsma7llzfnhi0yznf2n0d0bip7hgc3p182l9yywjjzynxah0m04i7xp146awmrzsjnicl7xzwrypl8zc18i11vxl";
+      };
+    };
+    "postcss-ordered-values-4.1.2" = {
+      name = "postcss-ordered-values";
+      packageName = "postcss-ordered-values";
+      version = "4.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-4.1.2.tgz";
+        sha512 = "01rn75rgd2s1jx2q21jc4vhj7zbjzwma81yy5nzay11vs9vb3c9bimnyvab097ff88a77y73f2561cpxp9ax5qp9dppqsjl3rp8xw6r";
+      };
+    };
+    "postcss-reduce-initial-4.0.3" = {
+      name = "postcss-reduce-initial";
+      packageName = "postcss-reduce-initial";
+      version = "4.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-4.0.3.tgz";
+        sha512 = "067nl9p2zm8v4vyxs57iz14gxd5vyjn8vqdf78z197zsp5abrvh65d3lajgj5a06gd544c0gqcc48964p80z7rkdyim9flljr3sd9c0";
+      };
+    };
+    "postcss-reduce-transforms-4.0.2" = {
+      name = "postcss-reduce-transforms";
+      packageName = "postcss-reduce-transforms";
+      version = "4.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-4.0.2.tgz";
+        sha512 = "014hrwaf4hyzkglss6k9s77qg6d0ysdh1i71n49ian03j8b0kd1pjm9jzsyx4b436fqz6iz3x1l7pjngja32mwj5q29wh1naj1n4i8h";
+      };
+    };
+    "postcss-safe-parser-4.0.2" = {
+      name = "postcss-safe-parser";
+      packageName = "postcss-safe-parser";
+      version = "4.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-4.0.2.tgz";
+        sha512 = "3b624jkq9r4n23xq425mb6s1wb71m6nvk8h2g9gyq3k7n12z99hb4viy8fnp3wiinxm7mzkpvzxhrkzmb4zvby4ga7v0d4n2j9rw3jk";
+      };
+    };
+    "postcss-selector-parser-3.1.2" = {
+      name = "postcss-selector-parser";
+      packageName = "postcss-selector-parser";
+      version = "3.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz";
+        sha512 = "224wav8lxk3x5gjdxig09wdjnnkixl6j941a9z6y8w9dnr0dlgvjrrv36hadqkw12rfg5c483ij2lmpcydf63nr79r1bfcnkgzwkdw7";
+      };
+    };
+    "postcss-selector-parser-6.0.2" = {
+      name = "postcss-selector-parser";
+      packageName = "postcss-selector-parser";
+      version = "6.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz";
+        sha512 = "031v34kpl4kypkmy5bi46kk3n0dcbczavi0zlcy5r0pzaxc5432rmfjb3fjkap0vni5gh7gvahfr43wdd5ah9120b73933x3r0zd8yz";
+      };
+    };
+    "postcss-svgo-4.0.2" = {
+      name = "postcss-svgo";
+      packageName = "postcss-svgo";
+      version = "4.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-4.0.2.tgz";
+        sha512 = "27pwrvcvx4w37dz649dsawii4q43znabznk1nqvza2y1lmd4av4mh5ddz68vagghih2k6505680w9l0pddzhwh08as5kh6min735b0b";
+      };
+    };
+    "postcss-unique-selectors-4.0.1" = {
+      name = "postcss-unique-selectors";
+      packageName = "postcss-unique-selectors";
+      version = "4.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-4.0.1.tgz";
+        sha512 = "2k15zwvbnbqb3diyrk5bbb38jdkyzfq2drvs16frm4ix432djb4y1c8r8p2c0blb6x170c1qjghb3lhc1iaxjlqq588ybpjm9asg5pq";
+      };
+    };
+    "postcss-value-parser-3.3.1" = {
+      name = "postcss-value-parser";
+      packageName = "postcss-value-parser";
+      version = "3.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz";
+        sha512 = "34qs1g2jb9y7k8ydk013zqgkcmwclfa0n4f98kfpqbhczldnk5sbyyyj3zj7mmrqcahx3w9080g7ma4f1q58frlgiw4lmhvl3mq9154";
+      };
+    };
+    "postcss-value-parser-4.0.3" = {
+      name = "postcss-value-parser";
+      packageName = "postcss-value-parser";
+      version = "4.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.3.tgz";
+        sha512 = "2p1bcqas3ldbvc3pjzyic1w4kvi5hm5k1apps8vj0dpfw4nl6rca26i6fnjyy8qml78s2spiqn38sv1i2k7kwlc210yx7lddyj7if1p";
+      };
+    };
+    "prepend-http-2.0.0" = {
+      name = "prepend-http";
+      packageName = "prepend-http";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz";
+        sha1 = "e92434bfa5ea8c19f41cdfd401d741a3c819d897";
+      };
+    };
+    "pretty-bytes-5.3.0" = {
+      name = "pretty-bytes";
+      packageName = "pretty-bytes";
+      version = "5.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.3.0.tgz";
+        sha512 = "1v427fxhwc53139189yd8i8y9vb41sm5arjs0ib2i0zbbf16f9bjpwdy44x5zi40r8gklq5xns92k3jiqg6i6w58xwamnzxwf3sncc6";
+      };
+    };
+    "pretty-error-2.1.1" = {
+      name = "pretty-error";
+      packageName = "pretty-error";
+      version = "2.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.1.tgz";
+        sha1 = "5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3";
+      };
+    };
+    "private-0.1.8" = {
+      name = "private";
+      packageName = "private";
+      version = "0.1.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/private/-/private-0.1.8.tgz";
+        sha512 = "2dgznnpxsgy9bgp4kfby1is72blvca4lhmqb3nlja8yiig1v52c12p5yw0aag8jqazhkqvihpxmqf9gsjlg5dr1jb56jxzgnqrazy2n";
+      };
+    };
+    "process-0.11.10" = {
+      name = "process";
+      packageName = "process";
+      version = "0.11.10";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/process/-/process-0.11.10.tgz";
+        sha1 = "7332300e840161bda3e69a1d1d91a7d4bc16f182";
+      };
+    };
+    "process-nextick-args-1.0.7" = {
+      name = "process-nextick-args";
+      packageName = "process-nextick-args";
+      version = "1.0.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz";
+        sha1 = "150e20b756590ad3f91093f25a4f2ad8bff30ba3";
+      };
+    };
+    "process-nextick-args-2.0.1" = {
+      name = "process-nextick-args";
+      packageName = "process-nextick-args";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz";
+        sha512 = "1mgan8li4i2l4y7lsr7snks85n6xg5x693cqmzpid3fkk9br7v5xzgvh1zlfs08zkxn6s0n6qhykr64mszjfyxd77dhmdi1jhx992yy";
+      };
+    };
+    "promise-8.1.0" = {
+      name = "promise";
+      packageName = "promise";
+      version = "8.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/promise/-/promise-8.1.0.tgz";
+        sha512 = "3fk4wirp8c5j0drwrlmr69qq3y3ribwfl36dzdaxprq26fd63j7hkmvm4vnnhg5203y40lbpd38sd0akkc8iwqm7pnbyf0bfam00kjv";
+      };
+    };
+    "promise-inflight-1.0.1" = {
+      name = "promise-inflight";
+      packageName = "promise-inflight";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz";
+        sha1 = "98472870bf228132fcbdd868129bad12c3c029e3";
+      };
+    };
+    "prompt-1.0.0" = {
+      name = "prompt";
+      packageName = "prompt";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/prompt/-/prompt-1.0.0.tgz";
+        sha1 = "8e57123c396ab988897fb327fd3aedc3e735e4fe";
+      };
+    };
+    "proto-list-1.2.4" = {
+      name = "proto-list";
+      packageName = "proto-list";
+      version = "1.2.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz";
+        sha1 = "212d5bfe1318306a420f6402b8e26ff39647a849";
+      };
+    };
+    "proxy-addr-2.0.6" = {
+      name = "proxy-addr";
+      packageName = "proxy-addr";
+      version = "2.0.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz";
+        sha512 = "0xy6dm0910h3nsa0ik45yccdfm6f84nl3h9dpkb22crqhdr3mmiczcbrq9z53gq7l2ijxhxi3pzsfzafrzymw4c1nn68ml1y2pdy7vn";
+      };
+    };
+    "prr-1.0.1" = {
+      name = "prr";
+      packageName = "prr";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz";
+        sha1 = "d3fc114ba06995a45ec6893f484ceb1d78f5f476";
+      };
+    };
+    "pseudomap-1.0.2" = {
+      name = "pseudomap";
+      packageName = "pseudomap";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz";
+        sha1 = "f052a28da70e618917ef0a8ac34c1ae5a68286b3";
+      };
+    };
+    "psl-1.8.0" = {
+      name = "psl";
+      packageName = "psl";
+      version = "1.8.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz";
+        sha512 = "0hn7s5bxnn3k2hiqh8fmm7bvq4vd6j0a5hwj09jk31r1ylv6q28g5hl3z70m3gycwfb40vdp04fqi59hdjih3jz0fhszg0s5b7lx1s4";
+      };
+    };
+    "public-encrypt-4.0.3" = {
+      name = "public-encrypt";
+      packageName = "public-encrypt";
+      version = "4.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz";
+        sha512 = "3qnsvs746b98ifyv12qj1g6hl6fq25vip5mswhvn3gnl7r32fids6mw3jb0gdcqrrl5x9ik475sf0vx6mbhmif49idkwjwrhbr5lnnd";
+      };
+    };
+    "pump-2.0.1" = {
+      name = "pump";
+      packageName = "pump";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz";
+        sha512 = "288hcmlwdnqda84ylx9cv413ic0r59k0dp71hy7a200jsb7h1y63277jwdp1jdp13c1b3pl6g2gzr5gjv9p72f5sp7w3p0d34swrqxf";
+      };
+    };
+    "pump-3.0.0" = {
+      name = "pump";
+      packageName = "pump";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz";
+        sha512 = "31n24fqakqmhzk2ch644gziskmysmrgiwclsdsr0rwk9spgikqpwickbnayap0rynfjlq72s7iny2p35n3qszypr97ws5njkpx741ig";
+      };
+    };
+    "pumpify-1.5.1" = {
+      name = "pumpify";
+      packageName = "pumpify";
+      version = "1.5.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz";
+        sha512 = "1sxm2mh7jmxhjqdrpdqrhc61ipk2cjyyyvsn9hmxlxnlpsasyzjdicl98pm63zv30012qhrxl57vdpdnnq2m2hl4w4ybgn7gqimjad0";
+      };
+    };
+    "punycode-1.3.2" = {
+      name = "punycode";
+      packageName = "punycode";
+      version = "1.3.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz";
+        sha1 = "9653a036fb7c1ee42342f2325cceefea3926c48d";
+      };
+    };
+    "punycode-1.4.1" = {
+      name = "punycode";
+      packageName = "punycode";
+      version = "1.4.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz";
+        sha1 = "c0d5a63b2718800ad8e1eb0fa5269c84dd41845e";
+      };
+    };
+    "punycode-2.1.1" = {
+      name = "punycode";
+      packageName = "punycode";
+      version = "2.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz";
+        sha512 = "381vqgh5xkqzrr6cxbzfykgnnk83m7qgpx3wjwj1hddn3sg2aibjxyr30rajpgv4js0cqknrbzwbfk5ryhiiyigzfjrk3zysy6i26sx";
+      };
+    };
+    "q-1.5.1" = {
+      name = "q";
+      packageName = "q";
+      version = "1.5.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/q/-/q-1.5.1.tgz";
+        sha1 = "7e32f75b41381291d04611f1bf14109ac00651d7";
+      };
+    };
+    "qs-6.5.1" = {
+      name = "qs";
+      packageName = "qs";
+      version = "6.5.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz";
+        sha512 = "3waqapyj1k4g135sgj636rmswiaixq19is1rw0rpv4qp6k7dl0a9nwy06m7yl5lbdk9p6xpwwngnggbzlzaz6rh11c86j2nvnnf273r";
+      };
+    };
+    "qs-6.5.2" = {
+      name = "qs";
+      packageName = "qs";
+      version = "6.5.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz";
+        sha512 = "0c46ws0x9g3mmkgfmvd78bzvnmv2b8ryg4ah6jvyyqgjv9v994z7xdyvsc4vg9sf98gg7phvy3q1ahgaj5fy3dwzf2rki6bixgl15ip";
+      };
+    };
+    "qs-6.7.0" = {
+      name = "qs";
+      packageName = "qs";
+      version = "6.7.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz";
+        sha512 = "34x6fm4dnq8m0kps5ann831k8fvx7jzlrcw8vvri0ki2g2ywdrjr8j5y14bvj9c0fd01ndsyx43y6ji51bfhnxk2gr5fpsks52429sl";
+      };
+    };
+    "query-string-5.1.1" = {
+      name = "query-string";
+      packageName = "query-string";
+      version = "5.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz";
+        sha512 = "0kkwn38nmjd6n6byiz52gngvyiw46fbibx9c9p1vzn9g7l11f2jpbs39d4aqajk7kk2a6k69wx5bjgavbg1lh275ih6k84jdnr8wdc2";
+      };
+    };
+    "querystring-0.2.0" = {
+      name = "querystring";
+      packageName = "querystring";
+      version = "0.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz";
+        sha1 = "b209849203bb25df820da756e747005878521620";
+      };
+    };
+    "querystring-es3-0.2.1" = {
+      name = "querystring-es3";
+      packageName = "querystring-es3";
+      version = "0.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz";
+        sha1 = "9ec61f79049875707d69414596fd907a4d711e73";
+      };
+    };
+    "querystringify-2.1.1" = {
+      name = "querystringify";
+      packageName = "querystringify";
+      version = "2.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz";
+        sha512 = "1yd3j6k7rr39qm5zsh0k86znfksfcz9rbj48vv2dbsicnvvgzvw1vwl17vk2jlxszwqjiqsj9hy88r74wsdxf8by7a3wia2hk2cpdy3";
+      };
+    };
+    "randombytes-2.1.0" = {
+      name = "randombytes";
+      packageName = "randombytes";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz";
+        sha512 = "2cimbs750ysa2wxsiw9mmc1xqjb8w0c4s22p2mv2n676s8hchvzcl1l5p78jnk62d2jzacpr9zbl9w64kaqnipcbaa25q7ywn47g2dx";
+      };
+    };
+    "randomfill-1.0.4" = {
+      name = "randomfill";
+      packageName = "randomfill";
+      version = "1.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz";
+        sha512 = "0pm7c7mw7a3qwjr21f8cvxaa2sq5l4svqs51lppn833x0yvz3yx8x4vbd4rswjynykvlgvn4hrpq327pvbzp428f4b1fciy3xnmrfgk";
+      };
+    };
+    "range-parser-1.2.1" = {
+      name = "range-parser";
+      packageName = "range-parser";
+      version = "1.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz";
+        sha512 = "15b00vag4wijzsp0lwi9jznpz16n858vq5p1p3dgjrqqil9c6d4x55s1nl1fi4cbq8307bylbvkd9qkhyk6qib8ksh8raibxb3jrf0y";
+      };
+    };
+    "raw-body-2.3.2" = {
+      name = "raw-body";
+      packageName = "raw-body";
+      version = "2.3.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz";
+        sha1 = "bcd60c77d3eb93cde0050295c3f379389bc88f89";
+      };
+    };
+    "raw-body-2.4.0" = {
+      name = "raw-body";
+      packageName = "raw-body";
+      version = "2.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz";
+        sha512 = "3flyhj96ayiy8is22lwh9sp1yqq9ksym43x22yri2ikzladqqzxj6z657bc0xb5f2wl7qr2ja4byf57c9f7l2d3wqdglxih886zrv70";
+      };
+    };
+    "rc-1.2.8" = {
+      name = "rc";
+      packageName = "rc";
+      version = "1.2.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz";
+        sha512 = "0xhy1n9n3y6cp28f8f0f2mi0xzc7ay1g5nhbp64fyvcwv9q30zq2zvyc5q2d0al8aa0hx101yq2y6d2ln4r5jxnqifh1pd3la1ccxnb";
+      };
+    };
+    "react-dev-utils-6.1.1" = {
+      name = "react-dev-utils";
+      packageName = "react-dev-utils";
+      version = "6.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-6.1.1.tgz";
+        sha512 = "3gzi6h19w4dkr566jbw277xi1gvrq8r18x2b0wbz5zwjjj25gs0vr1p4kjyyx03351c2nkm09sfyd4l4j7lw8playqdwm98lzrwj5jf";
+      };
+    };
+    "react-error-overlay-4.0.1" = {
+      name = "react-error-overlay";
+      packageName = "react-error-overlay";
+      version = "4.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-4.0.1.tgz";
+        sha512 = "2viss03mfyx7xkwyfv6kj5p7j03wpjrq0qjkljc1w715n7q9xb8i0ixhy5vvwfibnsydgr0ib9wifx9bpwm5va808d4ylv40q61nxf5";
+      };
+    };
+    "react-error-overlay-5.1.6" = {
+      name = "react-error-overlay";
+      packageName = "react-error-overlay";
+      version = "5.1.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-5.1.6.tgz";
+        sha512 = "3az1p6ci7r6nf917lkw5lr2plssa9ajmr3l3z77h6vyrsjwbyjbdw3zqzjlil7135bgbvgfg78a9qgmjnz02y5yas1qkv3q6k93wmjz";
+      };
+    };
+    "read-1.0.7" = {
+      name = "read";
+      packageName = "read";
+      version = "1.0.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/read/-/read-1.0.7.tgz";
+        sha1 = "b3da19bd052431a97671d44a42634adf710b40c4";
+      };
+    };
+    "read-pkg-1.1.0" = {
+      name = "read-pkg";
+      packageName = "read-pkg";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz";
+        sha1 = "f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28";
+      };
+    };
+    "read-pkg-up-1.0.1" = {
+      name = "read-pkg-up";
+      packageName = "read-pkg-up";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz";
+        sha1 = "9d63c13276c065918d57f002a57f40a1b643fb02";
+      };
+    };
+    "readable-stream-2.0.6" = {
+      name = "readable-stream";
+      packageName = "readable-stream";
+      version = "2.0.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/readable-stream/-/readable-stream-2.0.6.tgz";
+        sha1 = "8f90341e68a53ccc928788dacfcd11b36eb9b78e";
+      };
+    };
+    "readable-stream-2.3.7" = {
+      name = "readable-stream";
+      packageName = "readable-stream";
+      version = "2.3.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz";
+        sha512 = "0zrh6gjjzwwycwydra51xcrgjgzyqv6dq38bfpwzmlqn702mwb4nj4sjjn499rycqndfk6rby0dksnq72x8pcbvqv0b2893mvq6if0i";
+      };
+    };
+    "readable-stream-3.6.0" = {
+      name = "readable-stream";
+      packageName = "readable-stream";
+      version = "3.6.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz";
+        sha512 = "1s8hs6ax9jwmmw558j3hyfx5lfn7qf66xg0giplz9jci7d8zp2d8vh96dzlis6xzpxfa5b2zbm8nm4mgsr71r6rl3w3qyfanb5qfn05";
+      };
+    };
+    "readdirp-2.2.1" = {
+      name = "readdirp";
+      packageName = "readdirp";
+      version = "2.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz";
+        sha512 = "2yzl88bp25ig1xnrzqmqiwpfxyqkmdw27h3p90a4a58q0964xcijcx4i948msnlvin9f6hn5hmpxj1s90jzkj8aqxr5d04mmzr3z5fl";
+      };
+    };
+    "readdirp-3.1.3" = {
+      name = "readdirp";
+      packageName = "readdirp";
+      version = "3.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/readdirp/-/readdirp-3.1.3.tgz";
+        sha512 = "3snxi021w9pg57mc4wmvpch80fscyqwbrbhwb8541kn7z6xray7ncg6ixykk7vx556lfjnyi4cx6dk0a6zcwk0yg4m6jfr3d561zsv4";
+      };
+    };
+    "readdirp-3.2.0" = {
+      name = "readdirp";
+      packageName = "readdirp";
+      version = "3.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz";
+        sha512 = "0chzz12q3inpmwm6b4gi7g9n39jp24ah3mmjgss87hfsbx86vnxf49bx9wk2ng66037x2fh0cjf5rgx00c1m86lqlh7r6g9xm13ifbj";
+      };
+    };
+    "readdirp-3.4.0" = {
+      name = "readdirp";
+      packageName = "readdirp";
+      version = "3.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz";
+        sha512 = "0cs2zxxilvxnj5n2726vpigp95pyc33q9qimcigd349sr2d3rfiqg6hh6qdraqmnw9fhky8zhl8071s58zp52pb5d2741nrbg9v85yk";
+      };
+    };
+    "recursive-readdir-2.2.2" = {
+      name = "recursive-readdir";
+      packageName = "recursive-readdir";
+      version = "2.2.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.2.tgz";
+        sha512 = "0bb5d70l5lg02x515r2klvjhhz6xcxdb4ykbx16wq45l822bbsdd8sbki7vb28j17xr7181fmwlzhx3bizvr5xdq6cxpv53sidrq44x";
+      };
+    };
+    "regenerate-1.4.0" = {
+      name = "regenerate";
+      packageName = "regenerate";
+      version = "1.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz";
+        sha512 = "0m5jil0f2yz4js80jxvwilkhq6im5h6h0pa4disk3fsv9lm23lz8ly5219518j47v4fn0h248s9jf5pqhxhcr6z5cmxvbnna0js6vnl";
+      };
+    };
+    "regenerate-unicode-properties-8.2.0" = {
+      name = "regenerate-unicode-properties";
+      packageName = "regenerate-unicode-properties";
+      version = "8.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz";
+        sha512 = "225dbzqx56z4pkl71954di1140528vik4pc7q0zxw4k10k6pq5pdqdvhfry1cyj1waqjg4kacgzvnfxhz5wkhz37pnqybnabdiy7l0p";
+      };
+    };
+    "regenerator-runtime-0.11.1" = {
+      name = "regenerator-runtime";
+      packageName = "regenerator-runtime";
+      version = "0.11.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz";
+        sha512 = "03d4l8l8cyywh93wf5vw84lq56jh1b1d7jll4ny4z060j9hvx7w5q3q0b8q227jm93749k1c9h86r2pz0bm2xq5vp14g3r2kbvqc2rj";
+      };
+    };
+    "regenerator-runtime-0.12.1" = {
+      name = "regenerator-runtime";
+      packageName = "regenerator-runtime";
+      version = "0.12.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz";
+        sha512 = "0g2nsc66ha0z9d4p7hxi0lhwqilbbg1ff6pz1mpzn8x4yvrg7zadvk08l4ph8h56156g82df6jjyg8nb2j5w7wpi4w5l3pgbxrlip51";
+      };
+    };
+    "regenerator-runtime-0.13.5" = {
+      name = "regenerator-runtime";
+      packageName = "regenerator-runtime";
+      version = "0.13.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz";
+        sha512 = "2a918h23x10x6v446prj8l20irllscvw554hqk8r9pb9vyi7zk7fzcl0bq2dvc218dbpb3chdg9bxx06z7xs5pcrka2j5ja5bq70bk5";
+      };
+    };
+    "regenerator-runtime-0.9.6" = {
+      name = "regenerator-runtime";
+      packageName = "regenerator-runtime";
+      version = "0.9.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.9.6.tgz";
+        sha1 = "d33eb95d0d2001a4be39659707c51b0cb71ce029";
+      };
+    };
+    "regenerator-transform-0.14.4" = {
+      name = "regenerator-transform";
+      packageName = "regenerator-transform";
+      version = "0.14.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.4.tgz";
+        sha512 = "1pvch513p14nghc7cnlrrb0isf1sc97asa9nvvk5bq8jkvpilf8j2wqsv8r9qgxyvc15h9gz1c7n73yz1ndlczmlv56px28y0l5m8hi";
+      };
+    };
+    "regex-not-1.0.2" = {
+      name = "regex-not";
+      packageName = "regex-not";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz";
+        sha512 = "3cggngaj8m70zdn8kghha4mhvavm7jfy5xm2iqi94w4gi5m5irs3nlrgg975w2231y49jnnw7zhsg648pbkl9zb6vwhii83926q7917";
+      };
+    };
+    "regexp.prototype.flags-1.3.0" = {
+      name = "regexp.prototype.flags";
+      packageName = "regexp.prototype.flags";
+      version = "1.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.0.tgz";
+        sha512 = "24rfa56w9i13nr9hfwm8rnvnsji46alvzzm0m62ahpw6grjpvd4108vbar6i26cgr5vjj04rchzgkgwp4mynwsjcajm7rrxk05k9r6v";
+      };
+    };
+    "regexpu-core-4.7.0" = {
+      name = "regexpu-core";
+      packageName = "regexpu-core";
+      version = "4.7.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.0.tgz";
+        sha512 = "1hpk2aqc7j93nmm07zq652k0cf1yhhwzj7mzxyqygcz5dxcr9kz5qci1izykg1j5gwzh7qa523jryqg4iqsvryqx9rsp7y835fhl3jd";
+      };
+    };
+    "registry-auth-token-3.4.0" = {
+      name = "registry-auth-token";
+      packageName = "registry-auth-token";
+      version = "3.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.4.0.tgz";
+        sha512 = "3w8zjx5s044i7wr9bqqgjfkjawg0cajc9j9gmzkqs0i420algjvkd5k27j9pvhx1yq7nvdchsl96zcyjf64n14765q0f18y1wbkmcz0";
+      };
+    };
+    "registry-url-3.1.0" = {
+      name = "registry-url";
+      packageName = "registry-url";
+      version = "3.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz";
+        sha1 = "3d4ef870f73dde1d77f0cf9a381432444e174942";
+      };
+    };
+    "regjsgen-0.5.1" = {
+      name = "regjsgen";
+      packageName = "regjsgen";
+      version = "0.5.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.1.tgz";
+        sha512 = "35ax8xcn4cw0g7c2295pqza2wg3mmym2dxii4rnlsfgb5ppdr5zxg74wr4hg3cxyhr8qbfirl4rv9968bw4rxrlnwwdrcy3k0cp7b76";
+      };
+    };
+    "regjsparser-0.6.4" = {
+      name = "regjsparser";
+      packageName = "regjsparser";
+      version = "0.6.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.4.tgz";
+        sha512 = "0ksbypdbmkzwvi33jcx15lh2h1x3zxl311702paqw4fkjc682zbkqjsh970jd0z9q9la8454p5hd6li40pahl7lygj0f3jgyzpvr0zb";
+      };
+    };
+    "relateurl-0.2.7" = {
+      name = "relateurl";
+      packageName = "relateurl";
+      version = "0.2.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz";
+        sha1 = "54dbf377e51440aca90a4cd274600d3ff2d888a9";
+      };
+    };
+    "remove-trailing-separator-1.1.0" = {
+      name = "remove-trailing-separator";
+      packageName = "remove-trailing-separator";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz";
+        sha1 = "c24bce2a283adad5bc3f58e0d48249b92379d8ef";
+      };
+    };
+    "renderkid-2.0.3" = {
+      name = "renderkid";
+      packageName = "renderkid";
+      version = "2.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/renderkid/-/renderkid-2.0.3.tgz";
+        sha512 = "0cg3aidnv7kgvxnn1a17s6mzzvvjgr9vsqsdiaim8cz89w8vvjin44668r3xgvbp7zdplcifn5w118bzl3p5rr9q3116r64kr18ph6g";
+      };
+    };
+    "repeat-element-1.1.3" = {
+      name = "repeat-element";
+      packageName = "repeat-element";
+      version = "1.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz";
+        sha512 = "3dbpfrs4yh7dd9572m6dc8cxcgqacnvd24xm9licnw1hygqv51a18a84gm04sjssajbm437rq01raggrzmnzk4jnmbnxrnmk78sl4ba";
+      };
+    };
+    "repeat-string-1.6.1" = {
+      name = "repeat-string";
+      packageName = "repeat-string";
+      version = "1.6.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz";
+        sha1 = "8dcae470e1c88abc2d600fff4a776286da75e637";
+      };
+    };
+    "request-2.88.0" = {
+      name = "request";
+      packageName = "request";
+      version = "2.88.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/request/-/request-2.88.0.tgz";
+        sha512 = "2339w6v6d7n7pj0085vkfvk0864gs8kfh1kghbl3smj7s21ny3k265in140frsaipc6bvqbi4k696ic4z13d6a56dfvc653p15822il";
+      };
+    };
+    "request-2.88.2" = {
+      name = "request";
+      packageName = "request";
+      version = "2.88.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/request/-/request-2.88.2.tgz";
+        sha512 = "23hm71jcxrwvp33azx8mx3w6dg21fr4w6lwvkvxyf6ckvhk3hz9dk8lzgkbiyzfl9ylhp4n807xp88ppq4gj5h07cmrgxf6nwxfvjrj";
+      };
+    };
+    "request-promise-4.2.5" = {
+      name = "request-promise";
+      packageName = "request-promise";
+      version = "4.2.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/request-promise/-/request-promise-4.2.5.tgz";
+        sha512 = "0748za8mwvj5605cgqxn24sydig74m341wi9x04dar6xid0jmlwdjy0k4haf838p05w1jf79a4r7p4y59n2i7yfmflxj5d45jjdw2b6";
+      };
+    };
+    "request-promise-core-1.1.3" = {
+      name = "request-promise-core";
+      packageName = "request-promise-core";
+      version = "1.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.3.tgz";
+        sha512 = "00riv5nw32j70g67b1ll1h599bvdbnkgasnwl1m26pfdgdmgr6zaq500mprx5n77yrnhza27vs3c9icb4z5h6wnwmlha6f81bw3d2s0";
+      };
+    };
+    "require-directory-2.1.1" = {
+      name = "require-directory";
+      packageName = "require-directory";
+      version = "2.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz";
+        sha1 = "8c64ad5fd30dab1c976e2344ffe7f792a6a6df42";
+      };
+    };
+    "require-from-string-1.2.1" = {
+      name = "require-from-string";
+      packageName = "require-from-string";
+      version = "1.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz";
+        sha1 = "529c9ccef27380adfec9a2f965b649bbee636418";
+      };
+    };
+    "require-main-filename-1.0.1" = {
+      name = "require-main-filename";
+      packageName = "require-main-filename";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz";
+        sha1 = "97f717b69d48784f5f526a6c5aa8ffdda055a4d1";
+      };
+    };
+    "require-main-filename-2.0.0" = {
+      name = "require-main-filename";
+      packageName = "require-main-filename";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz";
+        sha512 = "2d0gd2x49nz3hgfwms6326sjw5fx7gqf997dnggc7l084cibgang6wr6ryksky32fvdz1bq72xm73kfxd3lj2qnfyjsp57jq287k8rl";
+      };
+    };
+    "requires-port-1.0.0" = {
+      name = "requires-port";
+      packageName = "requires-port";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz";
+        sha1 = "925d2601d39ac485e091cf0da5c6e694dc3dcaff";
+      };
+    };
+    "resolve-1.15.1" = {
+      name = "resolve";
+      packageName = "resolve";
+      version = "1.15.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz";
+        sha512 = "3pr5zjp8nh6qfllxnpqx531srx1igzdm28j4zg1y53yzc8qxp16yx01pw8cp7y4frla90gnpv622d6bi6aayi03iqlkb8gdjklji2pk";
+      };
+    };
+    "resolve-cwd-2.0.0" = {
+      name = "resolve-cwd";
+      packageName = "resolve-cwd";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-2.0.0.tgz";
+        sha1 = "00a9f7387556e27038eae232caa372a6a59b665a";
+      };
+    };
+    "resolve-dir-1.0.1" = {
+      name = "resolve-dir";
+      packageName = "resolve-dir";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz";
+        sha1 = "79a40644c362be82f26effe739c9bb5382046f43";
+      };
+    };
+    "resolve-from-3.0.0" = {
+      name = "resolve-from";
+      packageName = "resolve-from";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz";
+        sha1 = "b22c7af7d9d6881bc8b6e653335eebcb0a188748";
+      };
+    };
+    "resolve-url-0.2.1" = {
+      name = "resolve-url";
+      packageName = "resolve-url";
+      version = "0.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz";
+        sha1 = "2c637fe77c893afd2a663fe21aa9080068e2052a";
+      };
+    };
+    "responselike-1.0.2" = {
+      name = "responselike";
+      packageName = "responselike";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz";
+        sha1 = "918720ef3b631c5642be068f15ade5a46f4ba1e7";
+      };
+    };
+    "responselike-2.0.0" = {
+      name = "responselike";
+      packageName = "responselike";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/responselike/-/responselike-2.0.0.tgz";
+        sha512 = "05s3yp7f127kahmmajjyy5fbgvpz4b1d2dfhbv0ifp2b7yw6f1xj2f3vvw7ni08dlhfm37s6hmqp9v8w3xzml8fcxnda1skf6xkqzn4";
+      };
+    };
+    "restore-cursor-2.0.0" = {
+      name = "restore-cursor";
+      packageName = "restore-cursor";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz";
+        sha1 = "9f7ee287f82fd326d4fd162923d62129eee0dfaf";
+      };
+    };
+    "ret-0.1.15" = {
+      name = "ret";
+      packageName = "ret";
+      version = "0.1.15";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz";
+        sha512 = "2d7igpgyzdlpx2ni0sql8gsnqk9qivfsw6bn1aklm19kbhgxjzmlazz8szfsbdpjka4gk6i3zf0jqa0llaf7dni636fnbwfmyjmhfad";
+      };
+    };
+    "retry-0.12.0" = {
+      name = "retry";
+      packageName = "retry";
+      version = "0.12.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz";
+        sha1 = "1b42a6266a21f07421d1b0b54b7dc167b01c013b";
+      };
+    };
+    "reusify-1.0.4" = {
+      name = "reusify";
+      packageName = "reusify";
+      version = "1.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz";
+        sha512 = "37z410bxpvfjlxmd0rfrzmvd4dl33kqqgi51xp8hbbxxwzdddy5q1b20x9msvqhxvhj93w85fr2hlizsi7rfx91j3gcyzdpqvrwgnak";
+      };
+    };
+    "revalidator-0.1.8" = {
+      name = "revalidator";
+      packageName = "revalidator";
+      version = "0.1.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/revalidator/-/revalidator-0.1.8.tgz";
+        sha1 = "fece61bfa0c1b52a206bd6b18198184bdd523a3b";
+      };
+    };
+    "rgb-regex-1.0.1" = {
+      name = "rgb-regex";
+      packageName = "rgb-regex";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/rgb-regex/-/rgb-regex-1.0.1.tgz";
+        sha1 = "c0e0d6882df0e23be254a475e8edd41915feaeb1";
+      };
+    };
+    "rgba-regex-1.0.0" = {
+      name = "rgba-regex";
+      packageName = "rgba-regex";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/rgba-regex/-/rgba-regex-1.0.0.tgz";
+        sha1 = "43374e2e2ca0968b0ef1523460b7d730ff22eeb3";
+      };
+    };
+    "rimraf-2.6.3" = {
+      name = "rimraf";
+      packageName = "rimraf";
+      version = "2.6.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz";
+        sha512 = "242p51rnhbah4ip4k2bqgnn5kx5v7byi6rd7jphxh7g92y8wh523zmqdr3jzyzr156p98kx7igb3mhh3l3fmf1iga06l0zcjmdrw2lv";
+      };
+    };
+    "rimraf-2.7.1" = {
+      name = "rimraf";
+      packageName = "rimraf";
+      version = "2.7.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz";
+        sha512 = "3ixwnv4h7x38jd12vyzhx6m6adnfhz1zv881allalyqs8sy3q3zgwldngk4cqslnn2d46l0g91yz8wprmzcsvas9573vp8al9ldns5r";
+      };
+    };
+    "ripemd160-2.0.2" = {
+      name = "ripemd160";
+      packageName = "ripemd160";
+      version = "2.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz";
+        sha512 = "0hbd4cqbkycj691cj7gm40x3x5w46xk56xkg6n11wskc3k4xbdz1xxxyy6r27rcwipkzp19y1fmpfmb4lgf10l8asn6prdn11m24bla";
+      };
+    };
+    "rsvp-4.8.5" = {
+      name = "rsvp";
+      packageName = "rsvp";
+      version = "4.8.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/rsvp/-/rsvp-4.8.5.tgz";
+        sha512 = "2wdl1qh3bdrji9q0whkrhj7gzryfipskamagkg5dq54phmg5c7ifp8va0b8saxs4xmi6c5mlvkh6gbk6r4nqrld4v8ykx5f0ja0xwwx";
+      };
+    };
+    "run-async-2.4.0" = {
+      name = "run-async";
+      packageName = "run-async";
+      version = "2.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz";
+        sha512 = "2k7xr99g0l8qvqzd66mpwp3wylfay2i27dh5ca3bmr92l5yixlk0dh53z9ljvyrm3mi7jz89il8gq55sgdv8d8p0v96wbkvyy3xp564";
+      };
+    };
+    "run-parallel-1.1.9" = {
+      name = "run-parallel";
+      packageName = "run-parallel";
+      version = "1.1.9";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz";
+        sha512 = "3sl2kbxcwy92faw7zm0z4vql32622mag0bh6dv4bjk7cvc8a9sarvdclr9508hknhl0b7v8kzqvg3klvvff7psmvkfg9hy32i4sfjhc";
+      };
+    };
+    "run-queue-1.0.3" = {
+      name = "run-queue";
+      packageName = "run-queue";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz";
+        sha1 = "e848396f057d223f24386924618e25694161ec47";
+      };
+    };
+    "rxjs-6.5.5" = {
+      name = "rxjs";
+      packageName = "rxjs";
+      version = "6.5.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/rxjs/-/rxjs-6.5.5.tgz";
+        sha512 = "0csbv2i7lf85kcn3x59ry96c41zx735f8mmaqzid9vp7xz072bxma44arky971djavsjqkdgss4igp4ljwhbgx81psdg198b3xhix2r";
+      };
+    };
+    "safe-buffer-5.1.1" = {
+      name = "safe-buffer";
+      packageName = "safe-buffer";
+      version = "5.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz";
+        sha512 = "1p28rllll1w65yzq5azi4izx962399xdsdlfbaynn7vmp981hiss05jhiy9hm7sbbfk3b4dhlcv0zy07fc59mnc07hdv6wcgqkcvawh";
+      };
+    };
+    "safe-buffer-5.1.2" = {
+      name = "safe-buffer";
+      packageName = "safe-buffer";
+      version = "5.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz";
+        sha512 = "3xbm0dkya4bc3zwfwpdzbl8ngq0aai5ihlp2v3s39y7162c7wyvv9izj3g8hv6dy6vm2lq48lmfzygk0kxwbjb6xic7k4a329j99p8r";
+      };
+    };
+    "safe-buffer-5.2.0" = {
+      name = "safe-buffer";
+      packageName = "safe-buffer";
+      version = "5.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz";
+        sha512 = "1pb164cfv1ip3s1rp008433rak88mdcch24q84cbfndg0dzky2ij8vjvsiyx2qf3rg4dgs82zk7vnrd9hkqqdcvp4lbk5ymcr8314bx";
+      };
+    };
+    "safe-regex-1.1.0" = {
+      name = "safe-regex";
+      packageName = "safe-regex";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz";
+        sha1 = "40a3669f3b077d1e943d44629e157dd48023bf2e";
+      };
+    };
+    "safename-1.0.2" = {
+      name = "safename";
+      packageName = "safename";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/safename/-/safename-1.0.2.tgz";
+        sha1 = "e659f8ea3ce2148880fbf56de78d8e061f229031";
+      };
+    };
+    "safer-buffer-2.1.2" = {
+      name = "safer-buffer";
+      packageName = "safer-buffer";
+      version = "2.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz";
+        sha512 = "2v99f22kh56y72d3s8wrgdvf5n10ry40dh3fwnsxr4d5rfvxdfxfmc3qyqkscnj4f8799jy9bpg6cm21x2d811dr9ib83wjrlmkg6k1";
+      };
+    };
+    "sane-4.1.0" = {
+      name = "sane";
+      packageName = "sane";
+      version = "4.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/sane/-/sane-4.1.0.tgz";
+        sha512 = "1jdy0h2kdi5d2lnxafnbxnqssf306v0pffvw10jspi9v899n7rxknzs78k7nnrgy1mgyfragq91y4ci7z7xksbp92xw6py80h1g65l6";
+      };
+    };
+    "sax-1.2.4" = {
+      name = "sax";
+      packageName = "sax";
+      version = "1.2.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz";
+        sha512 = "1dn291mjsda42w8kldlbmngk6dhjxfbvvd5lckyqmwbjaj6069iq3wx0nvcfglwnpddz2qa93lzf4hv77iz43bd2qixa079sjzl799n";
+      };
+    };
+    "schema-utils-0.4.7" = {
+      name = "schema-utils";
+      packageName = "schema-utils";
+      version = "0.4.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz";
+        sha512 = "2fx9w14jysc2biw8niqw9cjrw8y73qnrlx5p4l3ksw1k4j3jsnm4lbkkqlckyij6d8fhjl69hzv64cyzwnwlgdm3ny65h1gmi9v1y5z";
+      };
+    };
+    "schema-utils-1.0.0" = {
+      name = "schema-utils";
+      packageName = "schema-utils";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz";
+        sha512 = "3kgnvyq6cxrlx9xwba75z4wp364mf4y4d66d92zwhjdw8nqg5jxzp1bfl6n5srl0aircw32nmry28a4476cpb3ijqzz78hars4wqvlb";
+      };
+    };
+    "schema-utils-2.6.5" = {
+      name = "schema-utils";
+      packageName = "schema-utils";
+      version = "2.6.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/schema-utils/-/schema-utils-2.6.5.tgz";
+        sha512 = "14vmb36crpgskhlwsh3ip0vss6pq08pa5lajyvxa968a61nj2qjva4ww0grfhd3ygzxanwb8v31n1grfd6gs8qz3vav8hp2mk0fx9g4";
+      };
+    };
+    "select-hose-2.0.0" = {
+      name = "select-hose";
+      packageName = "select-hose";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz";
+        sha1 = "625d8658f865af43ec962bfc376a37359a4994ca";
+      };
+    };
+    "selfsigned-1.10.7" = {
+      name = "selfsigned";
+      packageName = "selfsigned";
+      version = "1.10.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.7.tgz";
+        sha512 = "165gijv79k6g333d52fwfnna4z0myalk0cywvf9b6pysjfwlib4cvldycwx6yiiy099v9s0yhgvhq1sn21dqy7r85kq4n6y5h2g1kgh";
+      };
+    };
+    "semver-5.7.1" = {
+      name = "semver";
+      packageName = "semver";
+      version = "5.7.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz";
+        sha512 = "0cl68vp0ymkjpvim4s24v3awyk37d1bfbqrqv4ybwfi8yxga3d8fma2d6bh8dd4i2dsfwca324vaxm5dms61kdlmihdarfgzw6rmaxi";
+      };
+    };
+    "semver-6.3.0" = {
+      name = "semver";
+      packageName = "semver";
+      version = "6.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz";
+        sha512 = "17wg4dv63jhss5hwqd135zz67r5c30b7a1xz33kfa7knxr0wfypyb8mj2xmc3l71qkxrz569n89xwp5d77m7adn0sr5wzfjlh2m6zvg";
+      };
+    };
+    "semver-7.1.3" = {
+      name = "semver";
+      packageName = "semver";
+      version = "7.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/semver/-/semver-7.1.3.tgz";
+        sha512 = "32cdpngjcravgf06jc8ny0d3qq8q5a9llmlxvnafjlgqxj6g5l088cx2w27c94rahds21zph8in4b67c5yxk6n2js0j1xc0z36k8hvs";
+      };
+    };
+    "semver-regex-1.0.0" = {
+      name = "semver-regex";
+      packageName = "semver-regex";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/semver-regex/-/semver-regex-1.0.0.tgz";
+        sha1 = "92a4969065f9c70c694753d55248fc68f8f652c9";
+      };
+    };
+    "semver-sort-0.0.4" = {
+      name = "semver-sort";
+      packageName = "semver-sort";
+      version = "0.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/semver-sort/-/semver-sort-0.0.4.tgz";
+        sha1 = "34fdbddc6a6b2b4161398c3c4dba56243bfeaa8b";
+      };
+    };
+    "send-0.16.2" = {
+      name = "send";
+      packageName = "send";
+      version = "0.16.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/send/-/send-0.16.2.tgz";
+        sha512 = "1kh8iy2h9x6mqbb0kssb4d966irri0z8g2151jwx47q32dbmds01j9fs2c8hln68dqqh0ims8p450z3xfw6vs8v2k253c1cyla1ibhk";
+      };
+    };
+    "send-0.17.1" = {
+      name = "send";
+      packageName = "send";
+      version = "0.17.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/send/-/send-0.17.1.tgz";
+        sha512 = "016qgvxg1si6vn34p7piyc8mhvmav1zscm294wkcjf221y1l9zk5kwk5z6yn1ixspj12df25bpazb2h3fdclcf59xqc2h4w46r4mi86";
+      };
+    };
+    "serialize-javascript-1.9.1" = {
+      name = "serialize-javascript";
+      packageName = "serialize-javascript";
+      version = "1.9.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.9.1.tgz";
+        sha512 = "3a0kvzr1rq0l6v4l587sv58i0xgajs9863srkhxxlzq3dk5mj8r5sag4yyxfidzsbwcbygbg7wdm2nja97kg5n4y9plxsl9hpkzymni";
+      };
+    };
+    "serialize-javascript-2.1.2" = {
+      name = "serialize-javascript";
+      packageName = "serialize-javascript";
+      version = "2.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz";
+        sha512 = "26vhlfjji0jk84cvbcpna4h1nfvdwj19g7rjmvz9mzlm277cpgz7xw9q61yrp3x4amas66fxrz0p2rrndv737j4imw4a5ql0614xkxf";
+      };
+    };
+    "serve-index-1.9.1" = {
+      name = "serve-index";
+      packageName = "serve-index";
+      version = "1.9.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz";
+        sha1 = "d3768d69b1e7d82e5ce050fff5b453bea12a9239";
+      };
+    };
+    "serve-static-1.13.2" = {
+      name = "serve-static";
+      packageName = "serve-static";
+      version = "1.13.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz";
+        sha512 = "2gkkd7jlmrn2a8d736x3fcij9jj16aglbq6pcivb897g01k1dlrpvb565d3hq9zwafyr60zlcqr5flgd2yqs36s8wxpylxqnck5vyx7";
+      };
+    };
+    "serve-static-1.14.1" = {
+      name = "serve-static";
+      packageName = "serve-static";
+      version = "1.14.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz";
+        sha512 = "0551vv6s1vgk5krzdn9cwnybsv6g4cyqpkk1dlkyv1pd8n7m8r7pi12r16bw12dzwl6ghj4qwizjsxc8vl26lv9c61fkq9r059yzji4";
+      };
+    };
+    "set-blocking-2.0.0" = {
+      name = "set-blocking";
+      packageName = "set-blocking";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz";
+        sha1 = "045f9782d011ae9a6803ddd382b24392b3d890f7";
+      };
+    };
+    "set-value-2.0.1" = {
+      name = "set-value";
+      packageName = "set-value";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz";
+        sha512 = "15idn47lw67wfq0qfva85xnphqxkzz5apix6gwcnylmqw4ch7bqhq4vzdh53f327agpcg6pdzkbj8m72wm887wd8lqaydw20zbxq497";
+      };
+    };
+    "setimmediate-1.0.5" = {
+      name = "setimmediate";
+      packageName = "setimmediate";
+      version = "1.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz";
+        sha1 = "290cbb232e306942d7d7ea9b83732ab7856f8285";
+      };
+    };
+    "setprototypeof-1.0.3" = {
+      name = "setprototypeof";
+      packageName = "setprototypeof";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz";
+        sha1 = "66567e37043eeb4f04d91bd658c0cbefb55b8e04";
+      };
+    };
+    "setprototypeof-1.1.0" = {
+      name = "setprototypeof";
+      packageName = "setprototypeof";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz";
+        sha512 = "2jlhhawfqdiga1m6if01ks1q3yx56k5vj6wf372589vkswvdflw7224viivxali56b0jjsckpmjy10rj6fcakhw2dbq2psr197kzw86";
+      };
+    };
+    "setprototypeof-1.1.1" = {
+      name = "setprototypeof";
+      packageName = "setprototypeof";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz";
+        sha512 = "01qxzb0a6jrcxa6qh776v04ihqrmcy3qfbp9drfsjhfcsmaqd21mppr3ndj970ixfh6bpm8ai45jyqyzjfjw26pcyd82y6pyrcl1xr6";
+      };
+    };
+    "sha.js-2.4.11" = {
+      name = "sha.js";
+      packageName = "sha.js";
+      version = "2.4.11";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz";
+        sha512 = "2lihh3p2mrwymrly93ni37b1dvzwbm1jc47iqp66ax4bj41js4mr94wghv3c2agq98bb44nxxddn2n67ab978zk00xx2znw3vj2kha0";
+      };
+    };
+    "shebang-command-1.2.0" = {
+      name = "shebang-command";
+      packageName = "shebang-command";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz";
+        sha1 = "44aac65b695b03398968c39f363fee5deafdf1ea";
+      };
+    };
+    "shebang-command-2.0.0" = {
+      name = "shebang-command";
+      packageName = "shebang-command";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz";
+        sha512 = "066cirpvgdn5ywf1lpad9wrzkbk19mdwm662mk09mhlsw16rigayybrp18jna89zbqw06v43nnpbxjzxcx0wsnxmikdfqk96vdnnz4h";
+      };
+    };
+    "shebang-regex-1.0.0" = {
+      name = "shebang-regex";
+      packageName = "shebang-regex";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz";
+        sha1 = "da42f49740c0b42db2ca9728571cb190c98efea3";
+      };
+    };
+    "shebang-regex-3.0.0" = {
+      name = "shebang-regex";
+      packageName = "shebang-regex";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz";
+        sha512 = "3a1nivszhfclgwknyblqnd1nis1i1g3v571pbrhrf2dhpdbnkliswcw10s9k883cnxk01xd2z26x0s7qg0annp0vvwpvisw3cb9vvzg";
+      };
+    };
+    "shell-quote-1.6.1" = {
+      name = "shell-quote";
+      packageName = "shell-quote";
+      version = "1.6.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/shell-quote/-/shell-quote-1.6.1.tgz";
+        sha1 = "f4781949cce402697127430ea3b3c5476f481767";
+      };
+    };
+    "signal-exit-3.0.3" = {
+      name = "signal-exit";
+      packageName = "signal-exit";
+      version = "3.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz";
+        sha512 = "26893dbicabdw7f4klf18aiw4r88b8ndc9rchbpsaxb3ibvkk37gkffghac7g62clqkhk7szyfwnfxcsfs23wcjq6qm6lxwa3s7hhjm";
+      };
+    };
+    "simple-swizzle-0.2.2" = {
+      name = "simple-swizzle";
+      packageName = "simple-swizzle";
+      version = "0.2.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz";
+        sha1 = "a4da6b635ffcccca33f70d17cb92592de95e557a";
+      };
+    };
+    "slash-1.0.0" = {
+      name = "slash";
+      packageName = "slash";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz";
+        sha1 = "c41f2f6c39fc16d1cd17ad4b5d896114ae470d55";
+      };
+    };
+    "slash-2.0.0" = {
+      name = "slash";
+      packageName = "slash";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz";
+        sha512 = "3sbrc1b1qf9m7lhlljmnc51k9bl7jbc9zfmdc4z55iafsck65d9ll77bifknvgvgbc0f0a7cvm1b785ab5d1avm27lm7kvnd3fs30k5";
+      };
+    };
+    "slash-3.0.0" = {
+      name = "slash";
+      packageName = "slash";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz";
+        sha512 = "3cj4cvlh36f0h6f3dslbkwa3y9nnny8qmwbf4kw3xy8vfbg5mypknds3j2cdhf7xg82hm8smdl8cq88xn4nyw1b9677xjwvly2kbm43";
+      };
+    };
+    "slice-ansi-2.1.0" = {
+      name = "slice-ansi";
+      packageName = "slice-ansi";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz";
+        sha512 = "2hri697iq2zbwfqga7889i00ry55xb9zj48wf292qn7wk0dyl2ymd1bjph6a79glqyhj4lajd4fyhmxmqdhnpxd55fvjq1hf45rbvs2";
+      };
+    };
+    "snapdragon-0.8.2" = {
+      name = "snapdragon";
+      packageName = "snapdragon";
+      version = "0.8.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz";
+        sha512 = "2b0sap2q0c6qbfkw6znql845b143frn5gkkz4gpirjhgwa2j3wy3jsvrfg51s5c1w1m4nkgis97x9yvmzsc533kap9j3h3zcffqxp0n";
+      };
+    };
+    "snapdragon-node-2.1.1" = {
+      name = "snapdragon-node";
+      packageName = "snapdragon-node";
+      version = "2.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz";
+        sha512 = "2gk18pdld8ij1bpa2mdwl8f7i4rl5d4ys3qw31hipj56wslnsfhp1vxp3q36kj1m4f34wzzlvj0282qx5xlflqf978xyqlc2viyaviv";
+      };
+    };
+    "snapdragon-util-3.0.1" = {
+      name = "snapdragon-util";
+      packageName = "snapdragon-util";
+      version = "3.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz";
+        sha512 = "1jsaqma4ycl2iq0761i1w7758z1kq7gbsij4xfb7p5cnw0qa62pszv6pr3j856n3pbxww7wwxs5wvcg2cb6vy020kw3bchashqs9clr";
+      };
+    };
+    "sockjs-0.3.19" = {
+      name = "sockjs";
+      packageName = "sockjs";
+      version = "0.3.19";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/sockjs/-/sockjs-0.3.19.tgz";
+        sha512 = "0pn77r3rgi2blxla6ilhf4madx8n0cprzb295mw5knx2hyhiwn60z8n8n8clsb1l0wddcrjj5x4rn24ydf2wnxbrn63xwb5lsa293sp";
+      };
+    };
+    "sockjs-client-1.1.5" = {
+      name = "sockjs-client";
+      packageName = "sockjs-client";
+      version = "1.1.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.1.5.tgz";
+        sha1 = "1bb7c0f7222c40f42adf14f4442cbd1269771a83";
+      };
+    };
+    "sockjs-client-1.4.0" = {
+      name = "sockjs-client";
+      packageName = "sockjs-client";
+      version = "1.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.4.0.tgz";
+        sha512 = "3pa683q7x6az2iwmd2bh0d2zwdkgklkfi4vpkwnxw4b49mgfdjkal83i9lzxlz6f6sqybyvb0mlyw0mmg9mdd76fawvi7izxz48ndp7";
+      };
+    };
+    "sort-keys-2.0.0" = {
+      name = "sort-keys";
+      packageName = "sort-keys";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz";
+        sha1 = "658535584861ec97d730d6cf41822e1f56684128";
+      };
+    };
+    "source-list-map-2.0.1" = {
+      name = "source-list-map";
+      packageName = "source-list-map";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz";
+        sha512 = "0izwdwncwz4s14qn5ahkb2mpcdpxq2arn5185dlhljns4nylsw2xfm425zi115ik4kz1vfa97qyix3vf3i149dyi1ndq61iaf0knx5a";
+      };
+    };
+    "source-map-0.5.7" = {
+      name = "source-map";
+      packageName = "source-map";
+      version = "0.5.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz";
+        sha1 = "8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc";
+      };
+    };
+    "source-map-0.6.1" = {
+      name = "source-map";
+      packageName = "source-map";
+      version = "0.6.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz";
+        sha512 = "3p7hw8p69ikj5mwapmqkacsjnbvdfk5ylyamjg9x5izkl717xvzj0vk3fnmx1n4pf54h5rs7r8ig5kk4jv4ycqqj0hv75cnx6k1lf2j";
+      };
+    };
+    "source-map-resolve-0.5.3" = {
+      name = "source-map-resolve";
+      packageName = "source-map-resolve";
+      version = "0.5.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz";
+        sha512 = "2gq1flmkac2lzw8rs6vpch0sanmv8r9gv6bggwkgxzj3n7gw33lbqzk7nk9vvsckdjjkm132jzbl3nxc69cf9bb7xz4wnhpgd3gxp0y";
+      };
+    };
+    "source-map-support-0.5.16" = {
+      name = "source-map-support";
+      packageName = "source-map-support";
+      version = "0.5.16";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz";
+        sha512 = "1ayqxcigra517ylxbrvri7jlw55cv0m6a8j9j6060c5xsh519ip69jjp4jk6bqcj5ra5y318k6la6lfhpsj0k8hhkyw1szbj128pz3r";
+      };
+    };
+    "source-map-url-0.4.0" = {
+      name = "source-map-url";
+      packageName = "source-map-url";
+      version = "0.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz";
+        sha1 = "3e935d7ddd73631b97659956d55128e87b5084a3";
+      };
+    };
+    "spdx-correct-3.1.0" = {
+      name = "spdx-correct";
+      packageName = "spdx-correct";
+      version = "3.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz";
+        sha512 = "3qslnh3c2x2g8lar94rladm2rz692d5ds1bp1cpl223jf67jnazl9ipy4n17n7vqvgwimij36gz740nfqr5pyxq8x6n02rd4xj89gcn";
+      };
+    };
+    "spdx-exceptions-2.2.0" = {
+      name = "spdx-exceptions";
+      packageName = "spdx-exceptions";
+      version = "2.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz";
+        sha512 = "12c442riig2hk7014ahh40chwirmmsl9dr4cnm2dr2bdbv1lnal8xxwsfx403pqkx7ib06gm2hyyd98kn30kxanjm92yai5y44h0x6r";
+      };
+    };
+    "spdx-expression-parse-3.0.0" = {
+      name = "spdx-expression-parse";
+      packageName = "spdx-expression-parse";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz";
+        sha512 = "351djgqvsgqmfg6h764c2k09dmixczw5073jirm8km6i1yym4xjrzc7g5ckwkidi3gls7s910m4ahl8sh37dsb478j8j3sigbfq63k2";
+      };
+    };
+    "spdx-license-ids-3.0.5" = {
+      name = "spdx-license-ids";
+      packageName = "spdx-license-ids";
+      version = "3.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz";
+        sha512 = "3sk6sk6r05ikn5qslbh04h54mv4a34wn4d76s800h94padnjydfvvq73ij6jh81yrigspyr50ay878jjwpj2mcq38br371jkb6mdq97";
+      };
+    };
+    "spdy-4.0.2" = {
+      name = "spdy";
+      packageName = "spdy";
+      version = "4.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz";
+        sha512 = "2h06dvjrd0vv66jpc6cnrkvbvihcfvr325dkpbif6kxnvn8zvgpvgj748whffn0sc0lk87yd8l8k6k595fvwbc2ysjy4msh0rjs13mg";
+      };
+    };
+    "spdy-transport-3.0.0" = {
+      name = "spdy-transport";
+      packageName = "spdy-transport";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz";
+        sha512 = "1rha3zyhardm434kr4h4y44wxpd49hqzzxqk1d9lqg91bkzfbp6qkh9nahdkkmpgbkc5021x8c8cy1aqnaph5ib1a9hx32j9qadbhl6";
+      };
+    };
+    "split-1.0.1" = {
+      name = "split";
+      packageName = "split";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/split/-/split-1.0.1.tgz";
+        sha512 = "2916kdi862ik0dlvr2wf2kvzmw8i8wk5spbr9wpdcksrkhrl3m0082jj1q4mqzvv50mlah5s4vcy6k18nacbj09kxbzp2pbysh8wg4r";
+      };
+    };
+    "split-string-3.1.0" = {
+      name = "split-string";
+      packageName = "split-string";
+      version = "3.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz";
+        sha512 = "25ih1dx2qb3lawqjxj85znd4l3x8nnigrcdlpfw8064gh2mwxic9bgg5ylgxm9gjl3v8dmyc47rycp8xvqz78jqalg0g9yqj225acrp";
+      };
+    };
+    "sprintf-js-1.0.3" = {
+      name = "sprintf-js";
+      packageName = "sprintf-js";
+      version = "1.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz";
+        sha1 = "04e6926f662895354f3dd015203633b857297e2c";
+      };
+    };
+    "sshpk-1.16.1" = {
+      name = "sshpk";
+      packageName = "sshpk";
+      version = "1.16.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz";
+        sha512 = "0i4jnrxh6i17qij2vfki7qxmk435cnacvg363qg0hya5incfj57akgbas8zcx2cl5pds9jfgfyhqm8wlqz6damsg059gymv99aylx8x";
+      };
+    };
+    "ssri-5.3.0" = {
+      name = "ssri";
+      packageName = "ssri";
+      version = "5.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz";
+        sha512 = "00qc3iqsi21cc2az3nz36q88psab4ickpzranndk6vmrb6yhn5xsq3kgp21x3lp0406bdaalpb59xy7zzqnl40ans69v3z2l8z8h52x";
+      };
+    };
+    "ssri-6.0.1" = {
+      name = "ssri";
+      packageName = "ssri";
+      version = "6.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz";
+        sha512 = "107yg08ib4232ppannc6fw8ml8p1fssnvcf88cpq3s5ybq3r5ppxnmc32rp40i0ppbgxcw9q04d5rc90if0q3xyp953swad93biws6x";
+      };
+    };
+    "stable-0.1.8" = {
+      name = "stable";
+      packageName = "stable";
+      version = "0.1.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz";
+        sha512 = "3mw0cg71gcp6hfg3x0snaxcva4yqnifs11vbs3ba4agmcz8njmz70ndk5d8z97441jdvjhvb8aq8r44ngd8z4iw5hpgfmff372nlbwf";
+      };
+    };
+    "stack-trace-0.0.10" = {
+      name = "stack-trace";
+      packageName = "stack-trace";
+      version = "0.0.10";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz";
+        sha1 = "547c70b347e8d32b4e108ea1a2a159e5fdde19c0";
+      };
+    };
+    "static-extend-0.1.2" = {
+      name = "static-extend";
+      packageName = "static-extend";
+      version = "0.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz";
+        sha1 = "60809c39cbff55337226fd5e0b520f341f1fb5c6";
+      };
+    };
+    "statuses-1.4.0" = {
+      name = "statuses";
+      packageName = "statuses";
+      version = "1.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz";
+        sha512 = "1xxwqpj713rq1idbmp7mj7cj9dl52lazgpd5x8a9g88jawbkn9xpwbgljl7cvnd0jqkll2zpdj5xy63dlis9l2k8vmx1n1gvyv8456f";
+      };
+    };
+    "statuses-1.5.0" = {
+      name = "statuses";
+      packageName = "statuses";
+      version = "1.5.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz";
+        sha1 = "161c7dac177659fd9811f43771fa99381478628c";
+      };
+    };
+    "stealthy-require-1.1.1" = {
+      name = "stealthy-require";
+      packageName = "stealthy-require";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz";
+        sha1 = "35b09875b4ff49f26a777e509b3090a3226bf24b";
+      };
+    };
+    "stream-browserify-2.0.2" = {
+      name = "stream-browserify";
+      packageName = "stream-browserify";
+      version = "2.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz";
+        sha512 = "2mfvadpwj9mzxps4arl1frxlkz96hfp0sc5pvq76s0ijf8fgw26mm3a721zq3iz1f8155w3a41wkixbdlwn1cavv0mzics796da2zlx";
+      };
+    };
+    "stream-each-1.2.3" = {
+      name = "stream-each";
+      packageName = "stream-each";
+      version = "1.2.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz";
+        sha512 = "0pxki70s41jg18b738qvcwxlcakp6658ksicxkcgg8wp9q97fwp3mv13c5k38k47vxkyyk951k7gzavs3r7b93ackdyznh8zzch4lxy";
+      };
+    };
+    "stream-http-2.8.3" = {
+      name = "stream-http";
+      packageName = "stream-http";
+      version = "2.8.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz";
+        sha512 = "19y2xbs1xzzpjwfdczl21d0d76ahd7013cr3mhfa6a8nbwwv9jpncng8idf0g8hnmnq2mcl3xh912rjlasl06wsz44qw3j7hdya8d7r";
+      };
+    };
+    "stream-shift-1.0.1" = {
+      name = "stream-shift";
+      packageName = "stream-shift";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz";
+        sha512 = "1ai59bc5x8d6a1c37fp2d2gi6q7x6fhza2jsf1sblrdvbza8j14a4xnp20lg65b8lzm0s95m3pqizblbj6ks44qf73gdllhbahaqa02";
+      };
+    };
+    "strict-uri-encode-1.1.0" = {
+      name = "strict-uri-encode";
+      packageName = "strict-uri-encode";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz";
+        sha1 = "279b225df1d582b1f54e65addd4352e18faa0713";
+      };
+    };
+    "string-replace-loader-2.2.0" = {
+      name = "string-replace-loader";
+      packageName = "string-replace-loader";
+      version = "2.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/string-replace-loader/-/string-replace-loader-2.2.0.tgz";
+        sha512 = "134pqnxfq8nmn7k4q06xwvd01cw8009gzr8nlmh071l1qcnvf1cg2km2r3z3rx5ahdw0mvjpls45wlwn3wdzb8v0nfmbi9y5xj7hjsj";
+      };
+    };
+    "string-width-1.0.2" = {
+      name = "string-width";
+      packageName = "string-width";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz";
+        sha1 = "118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3";
+      };
+    };
+    "string-width-2.1.1" = {
+      name = "string-width";
+      packageName = "string-width";
+      version = "2.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz";
+        sha512 = "29s1fqgr4mnhfxwczgdghfmmc1f792m9hysvcjxw2h5lfj8ndf2b6gm02m96qk5m75g4aisijvng4pk618anwbr8i9ay2jyszkqgslw";
+      };
+    };
+    "string-width-3.1.0" = {
+      name = "string-width";
+      packageName = "string-width";
+      version = "3.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz";
+        sha512 = "3bix3jva53vcp1im3aa1y2v1lywkm7ix81gkwkj4915s2675pmw1c9n5x98q1m985hzgwkk1fnc2q78qz7s0fixhf994md3lazxr9xx";
+      };
+    };
+    "string-width-4.2.0" = {
+      name = "string-width";
+      packageName = "string-width";
+      version = "4.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz";
+        sha512 = "1xbbkr5nbg13x7hdllv0fd9a9b15b6ddzi41aswxpil3rd3yvjclpyk12p7wman4s8dqrvavgfmamdq764c089k1rpap0md7wjgjk6d";
+      };
+    };
+    "string.prototype.trimend-1.0.0" = {
+      name = "string.prototype.trimend";
+      packageName = "string.prototype.trimend";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.0.tgz";
+        sha512 = "181zx0q2zkix0hnlhji6z79wdzp5vzp992c1bv2h0gxmcmmyxy19xj184fjvljlncnic3mhv95vn559s8iwcljfhg4dgi5zlqd6fhhh";
+      };
+    };
+    "string.prototype.trimleft-2.1.2" = {
+      name = "string.prototype.trimleft";
+      packageName = "string.prototype.trimleft";
+      version = "2.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz";
+        sha512 = "15qfz59cpsj9svgvcs24q6h47jfy5zfhg7dy3b8ik3nvf97vhvijy8d51vrprx4z0vfyscg7i2xv9qs960h1pvnmzm1n95m6svk8840";
+      };
+    };
+    "string.prototype.trimright-2.1.2" = {
+      name = "string.prototype.trimright";
+      packageName = "string.prototype.trimright";
+      version = "2.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz";
+        sha512 = "0b5kvxgqr55r745bccsjz35w9galqf42rm3lf5f4p2i21c4yq5l0fz0s03z4gq1d7yi52i3x6n8fa1n3fhlplc8d49vlaipqvp51m34";
+      };
+    };
+    "string.prototype.trimstart-1.0.0" = {
+      name = "string.prototype.trimstart";
+      packageName = "string.prototype.trimstart";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.0.tgz";
+        sha512 = "3ir4q4zbjch2mkkxdn1xq5xb939s03n958b47bs6gkkds4dhljw6w4529vml982kdrf0iiyib54nrnxviaipw790ji8h5ad9n1zq8w8";
+      };
+    };
+    "string_decoder-0.10.31" = {
+      name = "string_decoder";
+      packageName = "string_decoder";
+      version = "0.10.31";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz";
+        sha1 = "62e203bc41766c6c28c9fc84301dab1c5310fa94";
+      };
+    };
+    "string_decoder-1.1.1" = {
+      name = "string_decoder";
+      packageName = "string_decoder";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz";
+        sha512 = "315yd4vzwrwk3vwj1klf46y1cj2jbvf88066y2rnwhksb98phj46jkxixbwsp3h607w7czy7cby522s7sx8mvspdpdm3s72y2ga3x4z";
+      };
+    };
+    "stringify-object-3.3.0" = {
+      name = "stringify-object";
+      packageName = "stringify-object";
+      version = "3.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz";
+        sha512 = "2pk4j3smpmlm6jkpqqaqwh2jks1hmg5rfk9kqd9msxm5dh5zlf5c2j0m2khy8iajf65f9zr13zy03yi10pj1jv3yn8a15jy3lba4ymc";
+      };
+    };
+    "strip-ansi-3.0.1" = {
+      name = "strip-ansi";
+      packageName = "strip-ansi";
+      version = "3.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz";
+        sha1 = "6a385fb8853d952d5ff05d0e8aaf94278dc63dcf";
+      };
+    };
+    "strip-ansi-4.0.0" = {
+      name = "strip-ansi";
+      packageName = "strip-ansi";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz";
+        sha1 = "a8479022eb1ac368a871389b635262c505ee368f";
+      };
+    };
+    "strip-ansi-5.2.0" = {
+      name = "strip-ansi";
+      packageName = "strip-ansi";
+      version = "5.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz";
+        sha512 = "1cf4mpsr46nik5xxyb9wc4cz6c4yymi2ijpfx1nghnkl39l8pgq1sc7q19jzrjkwpn9i7hwg4q3rs4ny3vssrc6506an1lv0bb6rr0f";
+      };
+    };
+    "strip-ansi-6.0.0" = {
+      name = "strip-ansi";
+      packageName = "strip-ansi";
+      version = "6.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz";
+        sha512 = "3mjvs0jv5m5npyr79f0br9kc7nr52ghv6p8gnkmm25adgr0psxalfzlanvzbnqfn87jf6vspvbx2r30px94fnyb446xch6zni7cmsq2";
+      };
+    };
+    "strip-bom-2.0.0" = {
+      name = "strip-bom";
+      packageName = "strip-bom";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz";
+        sha1 = "6219a85616520491f35788bdbf1447a99c7e6b0e";
+      };
+    };
+    "strip-comments-1.0.2" = {
+      name = "strip-comments";
+      packageName = "strip-comments";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/strip-comments/-/strip-comments-1.0.2.tgz";
+        sha512 = "0bln256gbzpmrbc1hg4pwkfh9vwncdzgdr6h3bhkmilz5syb1rlsk9rvc6kjqbh6rfhvqv7jwdnppsfdnpdg58444r1mviqaxm7pgwh";
+      };
+    };
+    "strip-eof-1.0.0" = {
+      name = "strip-eof";
+      packageName = "strip-eof";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz";
+        sha1 = "bb43ff5598a6eb05d89b59fcd129c983313606bf";
+      };
+    };
+    "strip-final-newline-2.0.0" = {
+      name = "strip-final-newline";
+      packageName = "strip-final-newline";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz";
+        sha512 = "264panbfx7nxdqgcsb6x1gk226kifd6zpksjmdbjp2xsjirbr91gkcj51ssy2j225n8vd1rjj6wlf4vdqaxyrdrmcpxgp84s1y6zfh6";
+      };
+    };
+    "strip-json-comments-2.0.1" = {
+      name = "strip-json-comments";
+      packageName = "strip-json-comments";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz";
+        sha1 = "3c531942e908c2697c0ec344858c286c7ca0a60a";
+      };
+    };
+    "style-loader-0.21.0" = {
+      name = "style-loader";
+      packageName = "style-loader";
+      version = "0.21.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/style-loader/-/style-loader-0.21.0.tgz";
+        sha512 = "33b6cg091mx8mgafvf8d1815mc55w3rqk0527z2l536z5ipprjwkdpm62qyi71snx625y2kqpr6nqfvvmdv7jn30qz8ip950yq0vrag";
+      };
+    };
+    "stylehacks-4.0.3" = {
+      name = "stylehacks";
+      packageName = "stylehacks";
+      version = "4.0.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/stylehacks/-/stylehacks-4.0.3.tgz";
+        sha512 = "3zfkv97pqkc0k51zsjb6dbyhs1lnf05c4vik7klpyzv7chdqqc49038hlm4rpskfy4nhmpjaib22qqzkfwzx6lfw5c4k53hsa9lnsgc";
+      };
+    };
+    "sums-0.2.4" = {
+      name = "sums";
+      packageName = "sums";
+      version = "0.2.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/sums/-/sums-0.2.4.tgz";
+        sha1 = "d78c14398297d604fe6588dc3b03deca7b91ba93";
+      };
+    };
+    "supports-color-2.0.0" = {
+      name = "supports-color";
+      packageName = "supports-color";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz";
+        sha1 = "535d045ce6b6363fa40117084629995e9df324c7";
+      };
+    };
+    "supports-color-5.5.0" = {
+      name = "supports-color";
+      packageName = "supports-color";
+      version = "5.5.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz";
+        sha512 = "2ihqi2z38fr1sq2jvwqgjqymncmkhxqz0x3bi97w4b4fn24wsdy71j139p95sb3nfrh3a449n0sqhm1z0jsi04860y8vdy8sp0n6da2";
+      };
+    };
+    "supports-color-6.1.0" = {
+      name = "supports-color";
+      packageName = "supports-color";
+      version = "6.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz";
+        sha512 = "30pwyjmww4d54bf2m6lpw20ly4blhb88sy3gn6qcjih2rfq1s5zsl1nszzwgj2j1gqn3c8mw52df0z26rqyk8flzimb70scdmz67vd9";
+      };
+    };
+    "supports-color-7.1.0" = {
+      name = "supports-color";
+      packageName = "supports-color";
+      version = "7.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz";
+        sha512 = "3k12babask2rk5v9n9wdgng00rqac2w5wwvkawlx3brjpqvfpy4j70650ggw5pa7bm5hnn1ppsppsqrcwrvjsk1mxb3vi993yjqh551";
+      };
+    };
+    "svgo-1.3.2" = {
+      name = "svgo";
+      packageName = "svgo";
+      version = "1.3.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz";
+        sha512 = "1biic6k5zbjbibabxnqg6cs0hz8vb69zb4kjgwh6nwxqigx23m7gaggva58cpqp7z2a403q9n1sqlfm6yx660nz1dj90iri0sqvy76a";
+      };
+    };
+    "table-5.4.6" = {
+      name = "table";
+      packageName = "table";
+      version = "5.4.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/table/-/table-5.4.6.tgz";
+        sha512 = "19b85vbk5rflp8b200akryyzrk92yj7v2pk64mmvy3y00x7ibfcbiqwmba2q14h9rvfsj9bxvmvyfxma4hswy8bw8dpm3hzdvr1qqf2";
+      };
+    };
+    "tapable-1.1.3" = {
+      name = "tapable";
+      packageName = "tapable";
+      version = "1.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz";
+        sha512 = "283f6rp3hhj0lvi5smcvh4mq56mifjchgv6qlnr4qb1xs2fsyb2vy71b308h1285nngcz8q7cbmjp8qqzh0im71mx5wr3v6hrnvyqp1";
+      };
+    };
+    "tar-4.4.13" = {
+      name = "tar";
+      packageName = "tar";
+      version = "4.4.13";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz";
+        sha512 = "10gwhmgx7fh619zv48r2lnm42qr7rw4qa9ph7142rizcn8in9dpi49jbmmv8ism60rcg1a7b4103r598jngi1rcn50sw7b8n1570rf3";
+      };
+    };
+    "temp-0.9.0" = {
+      name = "temp";
+      packageName = "temp";
+      version = "0.9.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/temp/-/temp-0.9.0.tgz";
+        sha512 = "36zr3d39z8wdb7v4z9inkii3cd1qsc49bf8z2s4ic671dlf2aab95w9z1lg9fivbvwd9cbpghxvfgiz3l3jb1fzwh2d984900yj3xb1";
+      };
+    };
+    "temp-0.9.1" = {
+      name = "temp";
+      packageName = "temp";
+      version = "0.9.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/temp/-/temp-0.9.1.tgz";
+        sha512 = "1w4xzn45b7a3qd9vvwfc80ah8xnbvdw8ng5jfhkdivs7kxc1wyjvlf6zza2wgkf3s7av5izd1bfjazahx3i79cy8zwidmws5f18xjsq";
+      };
+    };
+    "terser-4.6.10" = {
+      name = "terser";
+      packageName = "terser";
+      version = "4.6.10";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/terser/-/terser-4.6.10.tgz";
+        sha512 = "16fv61l1ffv807q775lmwr3bffdh60399bcz3jgm32n4g607madq6pk3vhv2kfisgz4lvivihpvxbixl5nsmv66hbh53mx88gfpzcd9";
+      };
+    };
+    "terser-webpack-plugin-1.4.3" = {
+      name = "terser-webpack-plugin";
+      packageName = "terser-webpack-plugin";
+      version = "1.4.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz";
+        sha512 = "2n44cgqgz070skn207m3l6zg3q444p1db54g0j87fcjxwyhmlfvgg3kak5v1ffhg765cdxah1l99kjdcy74mc75nlq7907zbiq5xk20";
+      };
+    };
+    "text-table-0.2.0" = {
+      name = "text-table";
+      packageName = "text-table";
+      version = "0.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz";
+        sha1 = "7f5ee823ae805207c00af2df4a84ec3fcfa570b4";
+      };
+    };
+    "through-2.3.8" = {
+      name = "through";
+      packageName = "through";
+      version = "2.3.8";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/through/-/through-2.3.8.tgz";
+        sha1 = "0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5";
+      };
+    };
+    "through2-2.0.1" = {
+      name = "through2";
+      packageName = "through2";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/through2/-/through2-2.0.1.tgz";
+        sha1 = "384e75314d49f32de12eebb8136b8eb6b5d59da9";
+      };
+    };
+    "through2-2.0.5" = {
+      name = "through2";
+      packageName = "through2";
+      version = "2.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz";
+        sha512 = "14xi6lbly1f37015ny2pzcnf5kaksjmpnhm61gfhwn686w5ac519qb1icxdda974n84f342g0y15kysj1hci2vl40z91aiivyhx2spy";
+      };
+    };
+    "thunky-1.1.0" = {
+      name = "thunky";
+      packageName = "thunky";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz";
+        sha512 = "2n8ys98dmv1625inb52cdr421ry82ri2sninmss1njzy9hxrlblw3fkvgr3na4d69glygww3g80bj4pgr9ik1zcm10ki0gd2yf3nxkq";
+      };
+    };
+    "timed-out-4.0.1" = {
+      name = "timed-out";
+      packageName = "timed-out";
+      version = "4.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz";
+        sha1 = "f32eacac5a175bea25d7fab565ab3ed8741ef56f";
+      };
+    };
+    "timers-browserify-2.0.11" = {
+      name = "timers-browserify";
+      packageName = "timers-browserify";
+      version = "2.0.11";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.11.tgz";
+        sha512 = "0lrwqck7qvpvxswx5kmydj9nmn2rwckzzfpdf5mf869fqrs9girj45i80hdv99b81m4g8fgwqx2lqk04k7zars7rldq3r89r3m9aipb";
+      };
+    };
+    "timsort-0.3.0" = {
+      name = "timsort";
+      packageName = "timsort";
+      version = "0.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz";
+        sha1 = "405411a8e7e6339fe64db9a234de11dc31e02bd4";
+      };
+    };
+    "tmp-0.0.31" = {
+      name = "tmp";
+      packageName = "tmp";
+      version = "0.0.31";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/tmp/-/tmp-0.0.31.tgz";
+        sha1 = "8f38ab9438e17315e5dbd8b3657e8bfb277ae4a7";
+      };
+    };
+    "tmp-0.0.33" = {
+      name = "tmp";
+      packageName = "tmp";
+      version = "0.0.33";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz";
+        sha512 = "0drg2bck1cj8677rgs1l98v7vqaxawcqh6ja87qilwnd719l5y0lzv5ssn3pcwa37fdbg4188y6x15a90vkllyvfpd9v7fai2b8j44d";
+      };
+    };
+    "tmp-0.1.0" = {
+      name = "tmp";
+      packageName = "tmp";
+      version = "0.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/tmp/-/tmp-0.1.0.tgz";
+        sha512 = "0mygbkw1yiz5b0mvdivsmwfaw12w70fjvgd3mn2wny7ggrx69swy5kj11xm3llrv98slhjx9d7pmcd8aa94492r0cfnfv139wmpddi7";
+      };
+    };
+    "tmpl-1.0.4" = {
+      name = "tmpl";
+      packageName = "tmpl";
+      version = "1.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz";
+        sha1 = "23640dd7b42d00433911140820e5cf440e521dd1";
+      };
+    };
+    "to-arraybuffer-1.0.1" = {
+      name = "to-arraybuffer";
+      packageName = "to-arraybuffer";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz";
+        sha1 = "7d229b1fcc637e466ca081180836a7aabff83f43";
+      };
+    };
+    "to-fast-properties-2.0.0" = {
+      name = "to-fast-properties";
+      packageName = "to-fast-properties";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz";
+        sha1 = "dc5e698cbd079265bc73e0377681a4e4e83f616e";
+      };
+    };
+    "to-object-path-0.3.0" = {
+      name = "to-object-path";
+      packageName = "to-object-path";
+      version = "0.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz";
+        sha1 = "297588b7b0e7e0ac08e04e672f85c1f4999e17af";
+      };
+    };
+    "to-readable-stream-2.1.0" = {
+      name = "to-readable-stream";
+      packageName = "to-readable-stream";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-2.1.0.tgz";
+        sha512 = "3pw9wwllhic73ya7g935mwmw4lrjwxf0vxxngs5iqbwlasxbrv506bas7sqqfmmmf7p9lx0g907ihysaxivv78ln8bj3m5067l1lx53";
+      };
+    };
+    "to-regex-3.0.2" = {
+      name = "to-regex";
+      packageName = "to-regex";
+      version = "3.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz";
+        sha512 = "03lcq1y1ks55lss37m3cx52f8f4wj85rqsxfxrhi3y8rqa0iiny6df8ardg2f742z870v7xw749lcsxh8yplsmbvaig4rrds1w6asqm";
+      };
+    };
+    "to-regex-range-2.1.1" = {
+      name = "to-regex-range";
+      packageName = "to-regex-range";
+      version = "2.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz";
+        sha1 = "7c80c17b9dfebe599e27367e0d4dd5590141db38";
+      };
+    };
+    "to-regex-range-5.0.1" = {
+      name = "to-regex-range";
+      packageName = "to-regex-range";
+      version = "5.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz";
+        sha512 = "2qkrna8q80arai14s6f17djc3cgwiilnhibfykwzkif4gs9ny3fmqmxqf56fvc7fjwyr01p97nk1ckd67s8476cslmj3rwp7s5zp4zb";
+      };
+    };
+    "toidentifier-1.0.0" = {
+      name = "toidentifier";
+      packageName = "toidentifier";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz";
+        sha512 = "1bip1yxcfy4c0yl2kwmj9jyzfg1ixyj564wd1aaf46rabdiasx62yznb8bwn9cki886f353axgca42zma7q9rb4b50lhm1zz7y8g8y9";
+      };
+    };
+    "touch-3.1.0" = {
+      name = "touch";
+      packageName = "touch";
+      version = "3.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz";
+        sha512 = "2a3sk3562y1ihbl06r5g1pzs37mwhhnz8f8vvcc0k8bhykczzgv9dyw71kkz4mbf81iq7wbf2nq7hpy6z6zhanj8s9d6bjk5r9pq72q";
+      };
+    };
+    "tough-cookie-2.4.3" = {
+      name = "tough-cookie";
+      packageName = "tough-cookie";
+      version = "2.4.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz";
+        sha512 = "2akhyixx49dkqadghzwj53xwfa1aikf0iv04ib9zj0kbilkzxxh16j5c6vfkcwm3cy29y46q3d8lzinsy6ql2cvb1wcw31gzs9jp6s3";
+      };
+    };
+    "tough-cookie-2.5.0" = {
+      name = "tough-cookie";
+      packageName = "tough-cookie";
+      version = "2.5.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz";
+        sha512 = "3xgcny117pqhfncr4gbmagzlnjiqqgq0lrvmljdfcdy64nc0xjfcbf1r08dmp1v1m3s51kq0yxc18nl3j9lbpr5bp5lgmi6719yqlly";
+      };
+    };
+    "traverse-0.3.9" = {
+      name = "traverse";
+      packageName = "traverse";
+      version = "0.3.9";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz";
+        sha1 = "717b8f220cc0bb7b44e40514c22b2e8bbc70d8b9";
+      };
+    };
+    "traverse-chain-0.1.0" = {
+      name = "traverse-chain";
+      packageName = "traverse-chain";
+      version = "0.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/traverse-chain/-/traverse-chain-0.1.0.tgz";
+        sha1 = "61dbc2d53b69ff6091a12a168fd7d433107e40f1";
+      };
+    };
+    "tslib-1.11.1" = {
+      name = "tslib";
+      packageName = "tslib";
+      version = "1.11.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz";
+        sha512 = "0c0k843zya7w9k5snfr3g76wz2vyl99q149safl5g364jjwq839h3qf8c17i8mahdcqc3zj3xgfv0nv9pcxfm8axva0d49w4vqvr5b9";
+      };
+    };
+    "tty-browserify-0.0.0" = {
+      name = "tty-browserify";
+      packageName = "tty-browserify";
+      version = "0.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz";
+        sha1 = "a157ba402da24e9bf957f9aa69d524eed42901a6";
+      };
+    };
+    "tunnel-agent-0.6.0" = {
+      name = "tunnel-agent";
+      packageName = "tunnel-agent";
+      version = "0.6.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz";
+        sha1 = "27a5dea06b36b04a0a9966774b290868f0fc40fd";
+      };
+    };
+    "tweetnacl-0.14.5" = {
+      name = "tweetnacl";
+      packageName = "tweetnacl";
+      version = "0.14.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz";
+        sha1 = "5ae68177f192d4456269d108afa93ff8743f4f64";
+      };
+    };
+    "type-fest-0.10.0" = {
+      name = "type-fest";
+      packageName = "type-fest";
+      version = "0.10.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/type-fest/-/type-fest-0.10.0.tgz";
+        sha512 = "25w8hvjk21iqndawz9h3713dmahzg2w3nf4ipfkgfnlhzk1jdlq2jadyd6lr1sgidbyxbp97mcgci1zw4qd6b0gjvqglz9cis77si8i";
+      };
+    };
+    "type-is-1.6.18" = {
+      name = "type-is";
+      packageName = "type-is";
+      version = "1.6.18";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz";
+        sha512 = "3r7402x79nilhdgk4z21yjh5y9vix8lwlll1kzcn8jd2m89vzksdb6wddia77cxv3iwhd6i5hkv6n7diwjbhpy7y03i2kqlvfplli2f";
+      };
+    };
+    "typedarray-0.0.6" = {
+      name = "typedarray";
+      packageName = "typedarray";
+      version = "0.0.6";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz";
+        sha1 = "867ac74e3864187b1d3d47d996a78ec5c8830777";
+      };
+    };
+    "uglify-es-3.3.10" = {
+      name = "uglify-es";
+      packageName = "uglify-es";
+      version = "3.3.10";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.10.tgz";
+        sha512 = "31s7k004qjdb42cavkpgszzvz9zm3aw2iv80k1hrykx202x9wb03451l58fhlba1spjgpdq96w7vm6rvavkcwrxj87aynxkq25czz5c";
+      };
+    };
+    "uglifyjs-webpack-plugin-1.3.0" = {
+      name = "uglifyjs-webpack-plugin";
+      packageName = "uglifyjs-webpack-plugin";
+      version = "1.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.3.0.tgz";
+        sha512 = "21rq1kl3wanb1w9jp90w5m1anksk2rffnls8sk324lqwwvhyskh64443jm1ixdl5zjf6717khdp3xm23388yyzz1ximqch03mrciwd2";
+      };
+    };
+    "ultron-1.0.2" = {
+      name = "ultron";
+      packageName = "ultron";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ultron/-/ultron-1.0.2.tgz";
+        sha1 = "ace116ab557cd197386a4e88f4685378c8b2e4fa";
+      };
+    };
+    "ultron-1.1.1" = {
+      name = "ultron";
+      packageName = "ultron";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ultron/-/ultron-1.1.1.tgz";
+        sha512 = "0x78hsv3jykmjl6qdqlqiz7v5nf06li8b5yvzpj6grnzwbcjch8ngyg55lm8g8mg4znvk7qbryvrr2dxacz3cvyb1nsm64qsw21g0ah";
+      };
+    };
+    "unicode-canonical-property-names-ecmascript-1.0.4" = {
+      name = "unicode-canonical-property-names-ecmascript";
+      packageName = "unicode-canonical-property-names-ecmascript";
+      version = "1.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz";
+        sha512 = "2frn6cxiqmhndpdcmrcd2590rx0b4bhn4pvqag2kgif3pqnw52622lpwd0jzz5a9h9jg03yb96m82zf8vvcfrrni43qlxw7fnfwsflc";
+      };
+    };
+    "unicode-match-property-ecmascript-1.0.4" = {
+      name = "unicode-match-property-ecmascript";
+      packageName = "unicode-match-property-ecmascript";
+      version = "1.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz";
+        sha512 = "2p78i127lk184hfbwyzd4xy6hrgg5gz8s3raf83pqx59rqk2dg339m7dnbi4pvysf7390jpnz84ds8ylwxdf3vynbnzjkbgbs3ji11g";
+      };
+    };
+    "unicode-match-property-value-ecmascript-1.2.0" = {
+      name = "unicode-match-property-value-ecmascript";
+      packageName = "unicode-match-property-value-ecmascript";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz";
+        sha512 = "0hxphkw10m0pz129gv1ngjcj5yaw6qk2zvdbx4yp5410lk15pnb7xs2s0gp469650zk66ydd8xp6kicia258vpx4s9gk88mchf90fy2";
+      };
+    };
+    "unicode-property-aliases-ecmascript-1.1.0" = {
+      name = "unicode-property-aliases-ecmascript";
+      packageName = "unicode-property-aliases-ecmascript";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz";
+        sha512 = "112w9mql1a57imkl581n0gx21pycfl0cdh5zsfmwxhmv4ipn7g8icjqlvqjsgi2vhahldq2i69qial99fa8ys4qv98fnng93wzai91y";
+      };
+    };
+    "union-value-1.0.1" = {
+      name = "union-value";
+      packageName = "union-value";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz";
+        sha512 = "1g7i0bs3sa35zpsrr2l3wsz4j6bqpxgm77kg2fdz89irzw6nrk6j93j61wr134mg9rbf039xa4pp1dw0iqfsv15rkf8jn8y2fdxg5xl";
+      };
+    };
+    "uniq-1.0.1" = {
+      name = "uniq";
+      packageName = "uniq";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz";
+        sha1 = "b31c5ae8254844a3a8281541ce2b04b865a734ff";
+      };
+    };
+    "uniqs-2.0.0" = {
+      name = "uniqs";
+      packageName = "uniqs";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz";
+        sha1 = "ffede4b36b25290696e6e165d4a59edb998e6b02";
+      };
+    };
+    "unique-filename-1.1.1" = {
+      name = "unique-filename";
+      packageName = "unique-filename";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz";
+        sha512 = "0sp2fs9gsv3l6mc9kdk09z835d54gw04x02dlz9q208mda3f6bmqd4vix4634kv9njvvxcz3iswcj6fwcmszvima7wpv5knia678sjn";
+      };
+    };
+    "unique-slug-2.0.2" = {
+      name = "unique-slug";
+      packageName = "unique-slug";
+      version = "2.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz";
+        sha512 = "3dz3f3rqwqssr86c072j9m8m7l98l20b3i75diqrq5l871d647jmdf7pjjml7l83iqvjnb2frz7h6xbs8rpx3rkvk1h5i6swvsap1ff";
+      };
+    };
+    "universalify-0.1.2" = {
+      name = "universalify";
+      packageName = "universalify";
+      version = "0.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz";
+        sha512 = "29d9b6i7rf460m0c5761z6xzzjdl2q81ri19x5qcnvi9l85jp71f7lbr7bdk7sx3k3sqwcp9vfpmlh7srgfnzlmssr5j0lpj0imw4mc";
+      };
+    };
+    "unpipe-1.0.0" = {
+      name = "unpipe";
+      packageName = "unpipe";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz";
+        sha1 = "b2bf4ee8514aae6165b4817829d21b2ef49904ec";
+      };
+    };
+    "unquote-1.1.1" = {
+      name = "unquote";
+      packageName = "unquote";
+      version = "1.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz";
+        sha1 = "8fded7324ec6e88a0ff8b905e7c098cdc086d544";
+      };
+    };
+    "unset-value-1.0.0" = {
+      name = "unset-value";
+      packageName = "unset-value";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz";
+        sha1 = "8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559";
+      };
+    };
+    "unzip-stream-0.3.0" = {
+      name = "unzip-stream";
+      packageName = "unzip-stream";
+      version = "0.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/unzip-stream/-/unzip-stream-0.3.0.tgz";
+        sha512 = "3j7r4r1rzgz3kisp8d5jk1sckr8f9jxz4ln29wfkl139a6p1qpr4s6cm9581fscqjwc71fqafd4584myll8z31arz3ps8a6qzy62v9l";
+      };
+    };
+    "upath-1.2.0" = {
+      name = "upath";
+      packageName = "upath";
+      version = "1.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz";
+        sha512 = "230pbhzxv0jr9n43qhghbsdbsp1rwalc3rclaqscwjaazi35s6vzw9p66s3ypk6yn3jgpmqflda2yh8j2rlypz9vihasfw5m6jhd739";
+      };
+    };
+    "upgrade-1.1.0" = {
+      name = "upgrade";
+      packageName = "upgrade";
+      version = "1.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/upgrade/-/upgrade-1.1.0.tgz";
+        sha1 = "4a50875ec5c715d19379799f0590a0e796958f61";
+      };
+    };
+    "uri-js-4.2.2" = {
+      name = "uri-js";
+      packageName = "uri-js";
+      version = "4.2.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz";
+        sha512 = "2fz60s71ghl56ddfiiaws81xpiidlbjk69jyjmahz190d2advy9zdbcwh5if4rgg5hxdbfxhkwiipjrnjy8w834bxsmzambd2p4b3r9";
+      };
+    };
+    "urix-0.1.0" = {
+      name = "urix";
+      packageName = "urix";
+      version = "0.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz";
+        sha1 = "da937f7a62e21fec1fd18d49b35c2935067a6c72";
+      };
+    };
+    "url-0.11.0" = {
+      name = "url";
+      packageName = "url";
+      version = "0.11.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/url/-/url-0.11.0.tgz";
+        sha1 = "3838e97cfc60521eb73c525a8e55bfdd9e2e28f1";
+      };
+    };
+    "url-loader-1.1.2" = {
+      name = "url-loader";
+      packageName = "url-loader";
+      version = "1.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/url-loader/-/url-loader-1.1.2.tgz";
+        sha512 = "27fp8dsaysmpx7yh2xnc15wngi1qk2n859q75hqjfxaskswh0hl5qxjz7mkk3hrz4v2lf516zfxw5xqd76lvb66pgm165iwdhmf8wbm";
+      };
+    };
+    "url-parse-1.4.7" = {
+      name = "url-parse";
+      packageName = "url-parse";
+      version = "1.4.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/url-parse/-/url-parse-1.4.7.tgz";
+        sha512 = "2bdb8rqxq8xd530jx6q8awb1y9idrvd8cfznrlyc1h8j4ra1icxcssfg7qldhssj6dxvibkvx6rnn1ljkjbxi95l58dn1y35ibrlyvp";
+      };
+    };
+    "url-parse-lax-3.0.0" = {
+      name = "url-parse-lax";
+      packageName = "url-parse-lax";
+      version = "3.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz";
+        sha1 = "16b5cafc07dbe3676c1b1999177823d6503acb0c";
+      };
+    };
+    "url-to-options-1.0.1" = {
+      name = "url-to-options";
+      packageName = "url-to-options";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz";
+        sha1 = "1505a03a289a48cbd7a434efbaeec5055f5633a9";
+      };
+    };
+    "use-3.1.1" = {
+      name = "use";
+      packageName = "use";
+      version = "3.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/use/-/use-3.1.1.tgz";
+        sha512 = "2hzzynss1cv7kn1lf40hqk16qmbf38g7a28m27pcg05mg6vpf7sj0gy175fdscz534fxdi14622rmq3sdpib9c5ypjympjfg5ai40bk";
+      };
+    };
+    "util-0.10.3" = {
+      name = "util";
+      packageName = "util";
+      version = "0.10.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/util/-/util-0.10.3.tgz";
+        sha1 = "7afb1afe50805246489e3db7fe0ed379336ac0f9";
+      };
+    };
+    "util-0.11.1" = {
+      name = "util";
+      packageName = "util";
+      version = "0.11.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/util/-/util-0.11.1.tgz";
+        sha512 = "0fpzl6qczbzr5jniy99vgfxz1k4gdfl13lwwhlfysj22rm18ikfici89wpgv34v67ckays1d500fgk2dlzw95zncn9jvkdygjr40a0x";
+      };
+    };
+    "util-deprecate-1.0.2" = {
+      name = "util-deprecate";
+      packageName = "util-deprecate";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz";
+        sha1 = "450d4dc9fa70de732762fbd2d4a28981419a0ccf";
+      };
+    };
+    "util.promisify-1.0.0" = {
+      name = "util.promisify";
+      packageName = "util.promisify";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz";
+        sha512 = "28cvjkydplc2vpnqff8vylscx8851srnkl54y6i54pl6lhpr6548plvyj833jk2mfaf8h31gbn60s00azd28rzc5q5gm1hgcc1smvlb";
+      };
+    };
+    "util.promisify-1.0.1" = {
+      name = "util.promisify";
+      packageName = "util.promisify";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.1.tgz";
+        sha512 = "2n8sxd1qdzc7pn348ayx8jm13kvi9wyjkshzwy1fam3aiy8phv8lbikbli433qvnq3ndnqj8yhcf9dgavm2xv6cvzk7cyy7zl5nkll3";
+      };
+    };
+    "utila-0.4.0" = {
+      name = "utila";
+      packageName = "utila";
+      version = "0.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz";
+        sha1 = "8a16a05d445657a3aea5eecc5b12a4fa5379772c";
+      };
+    };
+    "utile-0.3.0" = {
+      name = "utile";
+      packageName = "utile";
+      version = "0.3.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/utile/-/utile-0.3.0.tgz";
+        sha1 = "1352c340eb820e4d8ddba039a4fbfaa32ed4ef3a";
+      };
+    };
+    "utils-merge-1.0.1" = {
+      name = "utils-merge";
+      packageName = "utils-merge";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz";
+        sha1 = "9f95710f50a267947b2ccc124741c1028427e713";
+      };
+    };
+    "uuid-3.4.0" = {
+      name = "uuid";
+      packageName = "uuid";
+      version = "3.4.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz";
+        sha512 = "3y9pcli1v8nqryqd2c4pxj9kcv92mjc22z4smg08pdjzrbwda19xmjbzms1dwr04995h4carz9s8mldbiqb8708694lwr501r3q6d0y";
+      };
+    };
+    "validate-npm-package-license-3.0.4" = {
+      name = "validate-npm-package-license";
+      packageName = "validate-npm-package-license";
+      version = "3.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz";
+        sha512 = "09vn7gn5jp2c07pxplc11lvk7ybfaz0rp3qzflyiyhnahkfgh76bij31ll5rg01ranlmljrky2q25d1f6bbd0h23pzxxi5z93csd4hf";
+      };
+    };
+    "vary-1.1.2" = {
+      name = "vary";
+      packageName = "vary";
+      version = "1.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz";
+        sha1 = "2299f02c6ded30d4a5961b0b9f74524a18f634fc";
+      };
+    };
+    "vendors-1.0.4" = {
+      name = "vendors";
+      packageName = "vendors";
+      version = "1.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/vendors/-/vendors-1.0.4.tgz";
+        sha512 = "3gn1qs4d8i7gd3qakdk95wn5a5sq2y2nw9zmm6v9fbxi31slyfj9b23m9w5m7qv7j73h936ln9z2i5nwg0kzf6bvar80bqkk7mqcfzy";
+      };
+    };
+    "verror-1.10.0" = {
+      name = "verror";
+      packageName = "verror";
+      version = "1.10.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz";
+        sha1 = "3a105ca17053af55d6e270c1f8288682e18da400";
+      };
+    };
+    "vm-browserify-1.1.2" = {
+      name = "vm-browserify";
+      packageName = "vm-browserify";
+      version = "1.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz";
+        sha512 = "00japcjqx1df1bgck837ds0xvg5dr7g4j30a38zhbmanqss2kyxs4p7pgmldlnxpa31js50gydy8x9qi89s4x74iidf6k6nfgqsc5ns";
+      };
+    };
+    "vscode-jsonrpc-5.0.1" = {
+      name = "vscode-jsonrpc";
+      packageName = "vscode-jsonrpc";
+      version = "5.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-5.0.1.tgz";
+        sha512 = "384pcmr3aa875r6s41lafcgwbkcahimsdw5933mnnzz2x233q8kl7g7k6lj7r3glmp83pwq338g3h8dmmmmfmbr34861p3hkcz8vwr6";
+      };
+    };
+    "vscode-languageserver-6.1.1" = {
+      name = "vscode-languageserver";
+      packageName = "vscode-languageserver";
+      version = "6.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-6.1.1.tgz";
+        sha512 = "06xr3d8zihlfb1rfblzhk4jxy9y8hk4b0yfib0hhnywknif9w3l483wv16msq0a7k44yiq5ynkhid79df1js30y9mbkx4008nk89rqf";
+      };
+    };
+    "vscode-languageserver-protocol-3.15.3" = {
+      name = "vscode-languageserver-protocol";
+      packageName = "vscode-languageserver-protocol";
+      version = "3.15.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.15.3.tgz";
+        sha512 = "2zyg6f9vc3kac0sl30b3lh5zf92rj7aips62jc261j17214gix4zwa7rgaz20a5m43czchnsg7bdqqv95krbpr91miihhc0fg02xcyf";
+      };
+    };
+    "vscode-languageserver-textdocument-1.0.1" = {
+      name = "vscode-languageserver-textdocument";
+      packageName = "vscode-languageserver-textdocument";
+      version = "1.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.1.tgz";
+        sha512 = "1s7rs7mqr3cnpja4fsm58kbni5m6b4qx3ijjavllllhs3gql0nw3pr84kncpmfwn4xzchg95cbzk36cfb9r04mpjcf5j87v6l70k1sh";
+      };
+    };
+    "vscode-languageserver-types-3.15.1" = {
+      name = "vscode-languageserver-types";
+      packageName = "vscode-languageserver-types";
+      version = "3.15.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.15.1.tgz";
+        sha512 = "1jvind0f20qqmjc1lv1g4dwl0kd07ykb8x9fb6v80bazf3bvr4pn3ppv8rnmcaa1biqn8lfb3bkwm31kghx1dsf35mn8d1b8hylrbzr";
+      };
+    };
+    "vscode-uri-2.1.1" = {
+      name = "vscode-uri";
+      packageName = "vscode-uri";
+      version = "2.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/vscode-uri/-/vscode-uri-2.1.1.tgz";
+        sha512 = "3s05w58p3l2hmv5dqj3ll07l9rvy06lcr9s3fnzvm27wa3anvnlk6v10w7zmwsafh11pzsgvm17pa29wyfaycagaky5g784dac673vr";
+      };
+    };
+    "walker-1.0.7" = {
+      name = "walker";
+      packageName = "walker";
+      version = "1.0.7";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz";
+        sha1 = "2f7f9b8fd10d677262b18a884e28d19618e028fb";
+      };
+    };
+    "watchpack-1.6.1" = {
+      name = "watchpack";
+      packageName = "watchpack";
+      version = "1.6.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/watchpack/-/watchpack-1.6.1.tgz";
+        sha512 = "1j6fr0rjlw663ssnc3z7bgv6621zrwj6qsza68h9rbpgy9nl205wp74iyrh62q3l46230qf8awnmdw77fi7vcm2747bcfh5yn2pv0gq";
+      };
+    };
+    "wbuf-1.7.3" = {
+      name = "wbuf";
+      packageName = "wbuf";
+      version = "1.7.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz";
+        sha512 = "066j9njgvk6mkjalv1zf1p8w9m2hrl97vz1iw8q6g9zlplhphz54j5j0ma0x9053zhczbyi3k1nr493vgnx1lk22hdwp2glg8x11kiv";
+      };
+    };
+    "web-tree-sitter-0.16.2" = {
+      name = "web-tree-sitter";
+      packageName = "web-tree-sitter";
+      version = "0.16.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/web-tree-sitter/-/web-tree-sitter-0.16.2.tgz";
+        sha512 = "2ik05lyzg1xzqrizpfbhxb3ix62zmhs505q85828555saxpwlpffgqig00lm67myj4f24p1qsn42cc2sdms0gk18s0d08i7xsm4f5mz";
+      };
+    };
+    "webpack-4.42.1" = {
+      name = "webpack";
+      packageName = "webpack";
+      version = "4.42.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/webpack/-/webpack-4.42.1.tgz";
+        sha512 = "13b4jgmj0vf8qa13n1cddqaqk28qd1kmfhxqa5gj5sfvhmjjlgkl8rwqjsw4lydilpz39p2m506j91bgm91988if93gf49a50rdhrs8";
+      };
+    };
+    "webpack-dev-middleware-3.7.2" = {
+      name = "webpack-dev-middleware";
+      packageName = "webpack-dev-middleware";
+      version = "3.7.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.7.2.tgz";
+        sha512 = "27qjisacr2wrfj7r3z5hh2x7nrhadc27vg4kcalrdc7rrn8gnnlk64zf1pqmlkffy8klh8r0dr259v1sf6fjm886j5qlqjvpkcbh46p";
+      };
+    };
+    "webpack-dev-server-3.10.3" = {
+      name = "webpack-dev-server";
+      packageName = "webpack-dev-server";
+      version = "3.10.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.10.3.tgz";
+        sha512 = "1wl6ahwwfvm7620d70by2abmqgvw54mdhr8bxhdnnsvjzincy83rg80vffb1vwm2cvxwdc9qpp7ipq8bqrkf773fi6lbk0qzxxdd2bv";
+      };
+    };
+    "webpack-log-2.0.0" = {
+      name = "webpack-log";
+      packageName = "webpack-log";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/webpack-log/-/webpack-log-2.0.0.tgz";
+        sha512 = "191qr8nb4rszy53q0ydqfxr1pirimc3k3bi7mhgin5f15cd7vd28maxanyb248kdivmajhji580fv3a1i584icz3cc9bwvzykd0czvi";
+      };
+    };
+    "webpack-manifest-plugin-2.2.0" = {
+      name = "webpack-manifest-plugin";
+      packageName = "webpack-manifest-plugin";
+      version = "2.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/webpack-manifest-plugin/-/webpack-manifest-plugin-2.2.0.tgz";
+        sha512 = "00w35bc3s8hks7621pdrh0396c091yd4kf58y3yw4vldi861kw2m6vwgjfqa4bk4msgaj6d5ndxal1df9a37wpaznrz71walb49hbpm";
+      };
+    };
+    "webpack-sources-1.4.3" = {
+      name = "webpack-sources";
+      packageName = "webpack-sources";
+      version = "1.4.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz";
+        sha512 = "1wn7ixcv4b15kj3jn4c08n3pgrrd2kgzm2llh9viqx6a6k3j6rqzd5iksxdkalzaz6iic1q4fjj6wr9wfa07llf5a751mkgg3fx414n";
+      };
+    };
+    "websocket-driver-0.7.3" = {
+      name = "websocket-driver";
+      packageName = "websocket-driver";
+      version = "0.7.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.3.tgz";
+        sha512 = "0b5m603phj37lw5vb70ijc77g29cz7vn1w1bs7rhkx1ax3gil0wys841m14gnm3p95lc630hs370dngh68p7aaq69yqw1yvysb5d73f";
+      };
+    };
+    "websocket-extensions-0.1.3" = {
+      name = "websocket-extensions";
+      packageName = "websocket-extensions";
+      version = "0.1.3";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.3.tgz";
+        sha512 = "0d1n4yv45ibxf72hj7qka3j7v53dwn58savfiyvsppqhhrgg3g648ykk5v7fpb53hz85kj87m4f45r7d5iazx4yqgs381z6qnfd98cy";
+      };
+    };
+    "whatwg-fetch-2.0.4" = {
+      name = "whatwg-fetch";
+      packageName = "whatwg-fetch";
+      version = "2.0.4";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz";
+        sha512 = "2g4p2ymmww4wm7cf86xwpb0dndwlxk1gg3brsrj892a4z593h25hyhqv0rmv4hzz4zxv3smmaflsnhilakfpr6y8f2gf3sfd8ckbi3m";
+      };
+    };
+    "which-1.3.1" = {
+      name = "which";
+      packageName = "which";
+      version = "1.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/which/-/which-1.3.1.tgz";
+        sha512 = "0hr4hxkk8yb9fz993bs69pf8z2z2qb6sdpxfxb84sd16lja9fsx444pk1ang1ivmjjv5srnsm6fihdj593w7rwxdh834cdmd9hms4hz";
+      };
+    };
+    "which-2.0.1" = {
+      name = "which";
+      packageName = "which";
+      version = "2.0.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/which/-/which-2.0.1.tgz";
+        sha512 = "3ph3rnxyan638n4pzf6cvnky97ss1nn321h1q1zxi848b8x2p3d273mmr4csbvhyy0l608n8a6fn1fc7q7680a4jryx1hpcwij83c9p";
+      };
+    };
+    "which-2.0.2" = {
+      name = "which";
+      packageName = "which";
+      version = "2.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/which/-/which-2.0.2.tgz";
+        sha512 = "1nf5j1l1b0k8jmah5l6w4d3f5hmlcn70ghr5d0mmvxjiyq3nf1dfxmnii5945hn32n7mh99mkwj5bk3nwmdy9dxjzpp6nskbm73gch4";
+      };
+    };
+    "which-module-1.0.0" = {
+      name = "which-module";
+      packageName = "which-module";
+      version = "1.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz";
+        sha1 = "bba63ca861948994ff307736089e3b96026c2a4f";
+      };
+    };
+    "which-module-2.0.0" = {
+      name = "which-module";
+      packageName = "which-module";
+      version = "2.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz";
+        sha1 = "d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a";
+      };
+    };
+    "winston-2.1.1" = {
+      name = "winston";
+      packageName = "winston";
+      version = "2.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/winston/-/winston-2.1.1.tgz";
+        sha1 = "3c9349d196207fd1bdff9d4bc43ef72510e3a12e";
+      };
+    };
+    "workbox-background-sync-4.3.1" = {
+      name = "workbox-background-sync";
+      packageName = "workbox-background-sync";
+      version = "4.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/workbox-background-sync/-/workbox-background-sync-4.3.1.tgz";
+        sha512 = "130y345yhgrh3zfgiccy1s6m3z2crx1w6f9cydmvabb489xxjnrm7qg3i1yaggfj3vvs032zaqdmkcx0h8m91zhxp5jwph99yyn9qfn";
+      };
+    };
+    "workbox-broadcast-update-4.3.1" = {
+      name = "workbox-broadcast-update";
+      packageName = "workbox-broadcast-update";
+      version = "4.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/workbox-broadcast-update/-/workbox-broadcast-update-4.3.1.tgz";
+        sha512 = "1n0q0vrpbjhpfwa6ga71qv6pvygbml40kgvkrcnqq4vx8csdy2z9gi9yrnm8vq9cxjz391s7x4c9a541273ml8k9j5r53i56a1ryd1i";
+      };
+    };
+    "workbox-build-4.3.1" = {
+      name = "workbox-build";
+      packageName = "workbox-build";
+      version = "4.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/workbox-build/-/workbox-build-4.3.1.tgz";
+        sha512 = "33ng87ll8lgd7pwjk7fxky8n3wl2fh2s6wnirm2hyrrwsixiz7alhr89jnnlc0d19yb9sz3lp8dfki7pyaaih6df3i3pb65vnn70xsh";
+      };
+    };
+    "workbox-cacheable-response-4.3.1" = {
+      name = "workbox-cacheable-response";
+      packageName = "workbox-cacheable-response";
+      version = "4.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/workbox-cacheable-response/-/workbox-cacheable-response-4.3.1.tgz";
+        sha512 = "2ksgzx6ybrks9h3apmybh68wkb53psjkacnz7v6lxyjmk8jz2w0pk62pv01yd7vl8pdhg387a0c7apn9qkr03blpq7c5kxs76bnm7j6";
+      };
+    };
+    "workbox-core-4.3.1" = {
+      name = "workbox-core";
+      packageName = "workbox-core";
+      version = "4.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/workbox-core/-/workbox-core-4.3.1.tgz";
+        sha512 = "0m3cfqadsbnzp5viw4d5ym72532mp0w4kx7w01db1vpxxkmvx8rvq49wjg4a85ia03h1g3lqw02ir5b896d0v9d03qs6c76aa7bsw13";
+      };
+    };
+    "workbox-expiration-4.3.1" = {
+      name = "workbox-expiration";
+      packageName = "workbox-expiration";
+      version = "4.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/workbox-expiration/-/workbox-expiration-4.3.1.tgz";
+        sha512 = "0zwr054a2rjvmlp73a1d6x2cw7x7rvajb8zbl5pm0xlnrh4fy2z1m7nklzvkd79jblxhhfc931n6gkdxsssaavdyspqnhic0j34phmy";
+      };
+    };
+    "workbox-google-analytics-4.3.1" = {
+      name = "workbox-google-analytics";
+      packageName = "workbox-google-analytics";
+      version = "4.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/workbox-google-analytics/-/workbox-google-analytics-4.3.1.tgz";
+        sha512 = "1v0bql2z41fal9w7zacvclnf5yh2ylnhv2d8ny8l75cl9qznrk3lbagn16raj48yvq5p0vjgsksl4jqyav45c0l11wvwfdfh81a6c67";
+      };
+    };
+    "workbox-navigation-preload-4.3.1" = {
+      name = "workbox-navigation-preload";
+      packageName = "workbox-navigation-preload";
+      version = "4.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/workbox-navigation-preload/-/workbox-navigation-preload-4.3.1.tgz";
+        sha512 = "0xhpw0szfaqspkdmw7nzdfqcvijmxi9kz9wmawaq71kgnn8fd0gbjwqic4signyj68hxd52j7dq66mdn301ggphxdsql785gagzlkib";
+      };
+    };
+    "workbox-precaching-4.3.1" = {
+      name = "workbox-precaching";
+      packageName = "workbox-precaching";
+      version = "4.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/workbox-precaching/-/workbox-precaching-4.3.1.tgz";
+        sha512 = "2ls1a25idywxi2v60aa2snmi0c07ayqp5n7d1yrafjn5hkhsl4sk1j1gx445hf5h8wni4nci0nlkbnn5n7sgsgkzqi84gicczzs0956";
+      };
+    };
+    "workbox-range-requests-4.3.1" = {
+      name = "workbox-range-requests";
+      packageName = "workbox-range-requests";
+      version = "4.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/workbox-range-requests/-/workbox-range-requests-4.3.1.tgz";
+        sha512 = "1j267fikkf08y96msxa5vkgaswdhp4jhgirvva3cv8x57yma9dhbbapyivccyryvrfpfvd7jpk5yq67gwll3wlz4nlmqk52vwpy3qab";
+      };
+    };
+    "workbox-routing-4.3.1" = {
+      name = "workbox-routing";
+      packageName = "workbox-routing";
+      version = "4.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/workbox-routing/-/workbox-routing-4.3.1.tgz";
+        sha512 = "3xdf0mryy66n2mk28ljbvw9yfvb647w4j10cpxz2dp5n4hvxd25aa1h9k9f3jk1n4smp9gqjd1yxigldrplsysaifn8kq60w2nfsihn";
+      };
+    };
+    "workbox-strategies-4.3.1" = {
+      name = "workbox-strategies";
+      packageName = "workbox-strategies";
+      version = "4.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/workbox-strategies/-/workbox-strategies-4.3.1.tgz";
+        sha512 = "23k6inrsahycsk4ban80q2jw3zy8fydjr6pkp1sjrq28ybcr0pvgpa86038l3yd1sakxkiz32zfyh4n8650lhm7bwfnym36n3kq9zqp";
+      };
+    };
+    "workbox-streams-4.3.1" = {
+      name = "workbox-streams";
+      packageName = "workbox-streams";
+      version = "4.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/workbox-streams/-/workbox-streams-4.3.1.tgz";
+        sha512 = "2wbc90ms21pr4fdwp2mifggynwgy4a18rhzs8lj4spz9xjhv85q1561047dq55776agxqqk88k29lwxzvpxw9gyhli2vzszrn5ara70";
+      };
+    };
+    "workbox-sw-4.3.1" = {
+      name = "workbox-sw";
+      packageName = "workbox-sw";
+      version = "4.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/workbox-sw/-/workbox-sw-4.3.1.tgz";
+        sha512 = "3vypra50sn2adwr7dwb7g4h75ay9fsyzwnmz4nbdgsjh3sd4l7ikhnbg02kqlqfsbj79nbby0lp7h20z9a61wndh2wy1nlbq2xdsdfj";
+      };
+    };
+    "workbox-webpack-plugin-4.3.1" = {
+      name = "workbox-webpack-plugin";
+      packageName = "workbox-webpack-plugin";
+      version = "4.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/workbox-webpack-plugin/-/workbox-webpack-plugin-4.3.1.tgz";
+        sha512 = "08lqpz6fx1gh855d9fqj2ac15fsi07zx0pl79068a78bhzdj6rnm2gzwkr17kc5bgvr12nf96d01cp7ipqndz8wdp5h3wqvqdvn77w0";
+      };
+    };
+    "workbox-window-4.3.1" = {
+      name = "workbox-window";
+      packageName = "workbox-window";
+      version = "4.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/workbox-window/-/workbox-window-4.3.1.tgz";
+        sha512 = "0g784xkl3xda99q27b8z0n5jvgnqclcpr9l3a6h2psrcj7ijv13dh4kkqwac1klcqk0garwbjlspvrmfq5d777434vwrrw83qm1d60b";
+      };
+    };
+    "worker-farm-1.7.0" = {
+      name = "worker-farm";
+      packageName = "worker-farm";
+      version = "1.7.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz";
+        sha512 = "37m9wq9rvylb71n9kw3qghinwa3x4sggz82k29aall83izni78ijnh8rd6nhas8advw0lbnhby8z74vjlhp3sjsr4qm1wjw6r0kgz5f";
+      };
+    };
+    "wrap-ansi-2.1.0" = {
+      name = "wrap-ansi";
+      packageName = "wrap-ansi";
+      version = "2.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz";
+        sha1 = "d8fc3d284dd05794fe84973caecdd1cf824fdd85";
+      };
+    };
+    "wrap-ansi-5.1.0" = {
+      name = "wrap-ansi";
+      packageName = "wrap-ansi";
+      version = "5.1.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz";
+        sha512 = "3nmsfqfd98a7bgjyhd334y5gzc98nnkipfkmk2z1v4m0acagmpq951d8brmrsxvpnk256fbrp7zkn5n8v02pn4q4zai7zgnvy47yba0";
+      };
+    };
+    "wrap-ansi-6.2.0" = {
+      name = "wrap-ansi";
+      packageName = "wrap-ansi";
+      version = "6.2.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz";
+        sha512 = "1f4kz05shsh3xrqa0saaf5hbjp9kzxm7ykg8jmb6l49q8cfyhkrl45kk85p4jw1h95il3qadmsj2cy44yrbp119fd47jrdi25q4zadg";
+      };
+    };
+    "wrappy-1.0.2" = {
+      name = "wrappy";
+      packageName = "wrappy";
+      version = "1.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz";
+        sha1 = "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f";
+      };
+    };
+    "ws-1.1.5" = {
+      name = "ws";
+      packageName = "ws";
+      version = "1.1.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ws/-/ws-1.1.5.tgz";
+        sha512 = "3iv2yz706h7wyg563jsfjdykkkxs8j49vz60r6qx5by0npfhs98rgc114kdqs15sc52mldscc22bkfpkrs08cwlqaxx8lfdjn5alwm3";
+      };
+    };
+    "ws-3.3.1" = {
+      name = "ws";
+      packageName = "ws";
+      version = "3.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ws/-/ws-3.3.1.tgz";
+        sha512 = "3y6jiddhkfn0qgl1bq8whpn8s7l4vh981nnjih1k81wa7mxgbj6c9nnayxk1hz4qdxy34f8wbzv6kq6pdcsg7n98a1c5jyhr52fw3zh";
+      };
+    };
+    "ws-5.2.2" = {
+      name = "ws";
+      packageName = "ws";
+      version = "5.2.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz";
+        sha512 = "0f6ay7yn6xslzh3h66d5krqnp48d9g3ikwk0ijiyyxfkwaqxxf3b0qdswy6ych79mj44315qd16snlnk6m6npc5l0habgy5lc7wb8cd";
+      };
+    };
+    "ws-6.2.1" = {
+      name = "ws";
+      packageName = "ws";
+      version = "6.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ws/-/ws-6.2.1.tgz";
+        sha512 = "2l27cfiaw6syjvy6vbpqf5c2swd37bqviizzck6842xlankppm9j1sg79x3m8jpda8v6khcpnm5ssab1b8vf34qpviv41ww5mf8130q";
+      };
+    };
+    "ws-7.1.1" = {
+      name = "ws";
+      packageName = "ws";
+      version = "7.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/ws/-/ws-7.1.1.tgz";
+        sha512 = "3f5849ggay87yr83snnkb1p2myb2gk8zswyd5v5m2y0kcvy02bvgi7mn7di8rs7zljpzra5sf1k4d17wyyv48d60ssccyc3d7yl73d3";
+      };
+    };
+    "xmlbuilder-13.0.2" = {
+      name = "xmlbuilder";
+      packageName = "xmlbuilder";
+      version = "13.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-13.0.2.tgz";
+        sha512 = "00nxfgckvb3i20my8mmpc2s3bp59qxkfy926lv9ynbnfyqw7h5hq8cims6q86nr2wqnxq3b6rjvm28kn7700fmhfndq438xcj5p9v0j";
+      };
+    };
+    "xtend-4.0.2" = {
+      name = "xtend";
+      packageName = "xtend";
+      version = "4.0.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz";
+        sha512 = "08w1d6fg23v422cfwd55306pfs9n9cqpz6hycahq3adm3n29wmhl9bmpn4vk75rlzgwn7hp4n3idqxvw8c53zbr04h7a98p43b199ic";
+      };
+    };
+    "y18n-3.2.1" = {
+      name = "y18n";
+      packageName = "y18n";
+      version = "3.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz";
+        sha1 = "6d15fba884c08679c0d77e88e7759e811e07fa41";
+      };
+    };
+    "y18n-4.0.0" = {
+      name = "y18n";
+      packageName = "y18n";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz";
+        sha512 = "3zj75gvpcgiphxpci4ji1znykk9n4cs0aw3dd6inwdvkmxyqn2483vya70lssjwq8alspnpw88vgii21fdrcn2vmfyppzgf4mkvzm5g";
+      };
+    };
+    "yallist-2.1.2" = {
+      name = "yallist";
+      packageName = "yallist";
+      version = "2.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz";
+        sha1 = "1c11f9218f076089a47dd512f93c6699a6a81d52";
+      };
+    };
+    "yallist-3.1.1" = {
+      name = "yallist";
+      packageName = "yallist";
+      version = "3.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz";
+        sha512 = "3ig31a6zfbdlrs3l77a8avpp17hajryhyq2xk4h3ayc4dmxch146rdk7q1s1jgx9qvmxq125r0xq2bvnq0rq63m75k9y7wglm0hd1bb";
+      };
+    };
+    "yargs-12.0.5" = {
+      name = "yargs";
+      packageName = "yargs";
+      version = "12.0.5";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz";
+        sha512 = "1kjmh68p4rb4c04s0gk4ra20crfr32h6v9zhj4clrz61xanslza9g3drbf6471mmvqq3vmxk04grmgillx1rsp6v2zim7wqnr6gq71f";
+      };
+    };
+    "yargs-13.3.2" = {
+      name = "yargs";
+      packageName = "yargs";
+      version = "13.3.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz";
+        sha512 = "19rg5b2rhj2kg44as5vv9jxmpr39lw250885w6nlfwyhvwd5nxnnx7fc35v7h615i65cik7k3wi7ac20c91kcgfi5wy7blgk31xjz81";
+      };
+    };
+    "yargs-15.3.1" = {
+      name = "yargs";
+      packageName = "yargs";
+      version = "15.3.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/yargs/-/yargs-15.3.1.tgz";
+        sha512 = "10c3d3i284v9l92r3ayx2z43hf4kw4adrlmp6vrjlcrq7mm3xh62c10q79jx73qm4dymnb9222zjr15n4l5w9pq0pn6xhr3c4fvaqzp";
+      };
+    };
+    "yargs-6.6.0" = {
+      name = "yargs";
+      packageName = "yargs";
+      version = "6.6.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz";
+        sha1 = "782ec21ef403345f830a808ca3d513af56065208";
+      };
+    };
+    "yargs-parser-11.1.1" = {
+      name = "yargs-parser";
+      packageName = "yargs-parser";
+      version = "11.1.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz";
+        sha512 = "14iaywclwncdp3p7878q12cqgdc5rbkl0f6ghi9g7k7f4f1bbqi41dc5ki6hnqmy6jbfk0kx88m47vk3igrql5j6i7ar2a3cbyh3a8b";
+      };
+    };
+    "yargs-parser-13.1.2" = {
+      name = "yargs-parser";
+      packageName = "yargs-parser";
+      version = "13.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz";
+        sha512 = "375nan6m28q81h8q9a8vmcxgiq7s81yn1ql7zdikac0c4j2kmxdjzmbq14fcp9jm4ilcfzkd9ym4x7c80s7r6g488wf13zz2wsyqmny";
+      };
+    };
+    "yargs-parser-18.1.2" = {
+      name = "yargs-parser";
+      packageName = "yargs-parser";
+      version = "18.1.2";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.2.tgz";
+        sha512 = "00h0d3ibv9x6gi9mz2fxg2an5r23vxsvl2svgj8kz6czjgwmw57rrz7fd4dc88cnd2kva21s6a5gahc616djp5xp1c2vk683lshyll6";
+      };
+    };
+    "yargs-parser-4.2.1" = {
+      name = "yargs-parser";
+      packageName = "yargs-parser";
+      version = "4.2.1";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz";
+        sha1 = "29cceac0dc4f03c6c87b4a9f217dd18c9f74871c";
+      };
+    };
+    "yn-4.0.0" = {
+      name = "yn";
+      packageName = "yn";
+      version = "4.0.0";
+      src = fetchurl {
+        url = "https://registry.npmjs.org/yn/-/yn-4.0.0.tgz";
+        sha512 = "214zjzw9f245al1vhnvhw1ac5xq2sa5d34xa8h0hj3ck2x7nbdkx3j2lgd8zf4cb6bnn0ngffcwkbnl2qy9kq17w6f14kxq4j4a5rc6";
+      };
+    };
+  };
+in
+{
+  elm-analyse = nodeEnv.buildNodePackage {
+    name = "elm-analyse";
+    packageName = "elm-analyse";
+    version = "0.16.5";
+    src = fetchurl {
+      url = "https://registry.npmjs.org/elm-analyse/-/elm-analyse-0.16.5.tgz";
+      sha512 = "0m37f2yxpjlh0b46n8ijx0zxl51swikdsgj8rm61kfy32c45fz98c2a1zxqlwyk98fblc92jc9zg2bhqxgs7civf01ndylwacc61dr3";
+    };
+    dependencies = [
+      sources."accepts-1.3.7"
+      sources."ajv-6.12.0"
+      sources."array-flatten-1.1.1"
+      sources."asn1-0.2.4"
+      sources."assert-plus-1.0.0"
+      sources."async-limiter-1.0.1"
+      sources."asynckit-0.4.0"
+      sources."aws-sign2-0.7.0"
+      sources."aws4-1.9.1"
+      sources."babel-runtime-6.18.0"
+      sources."bcrypt-pbkdf-1.0.2"
+      sources."body-parser-1.19.0"
+      sources."bytes-3.1.0"
+      sources."caseless-0.12.0"
+      sources."combined-stream-1.0.8"
+      sources."concat-stream-1.5.2"
+      sources."content-disposition-0.5.2"
+      sources."content-type-1.0.4"
+      sources."cookie-0.3.1"
+      sources."cookie-signature-1.0.6"
+      sources."core-js-2.6.11"
+      sources."core-util-is-1.0.2"
+      sources."dashdash-1.14.1"
+      sources."debug-2.6.9"
+      sources."delayed-stream-1.0.0"
+      sources."depd-1.1.2"
+      sources."destroy-1.0.4"
+      sources."ecc-jsbn-0.1.2"
+      sources."ee-first-1.1.1"
+      sources."encodeurl-1.0.2"
+      sources."escape-html-1.0.3"
+      sources."etag-1.8.1"
+      (sources."express-4.16.3" // {
+        dependencies = [
+          sources."body-parser-1.18.2"
+          sources."bytes-3.0.0"
+          sources."http-errors-1.6.3"
+          sources."iconv-lite-0.4.19"
+          sources."qs-6.5.1"
+          (sources."raw-body-2.3.2" // {
+            dependencies = [
+              sources."depd-1.1.1"
+              sources."http-errors-1.6.2"
+              sources."setprototypeof-1.0.3"
+            ];
+          })
+          sources."setprototypeof-1.1.0"
+          sources."statuses-1.4.0"
+        ];
+      })
+      (sources."express-ws-2.0.0" // {
+        dependencies = [
+          sources."ws-1.1.5"
+        ];
+      })
+      sources."extend-3.0.2"
+      sources."extsprintf-1.3.0"
+      sources."fast-deep-equal-3.1.1"
+      sources."fast-json-stable-stringify-2.1.0"
+      (sources."finalhandler-1.1.1" // {
+        dependencies = [
+          sources."statuses-1.4.0"
+        ];
+      })
+      sources."find-0.2.7"
+      sources."forever-agent-0.6.1"
+      sources."form-data-2.3.3"
+      sources."forwarded-0.1.2"
+      sources."fresh-0.5.2"
+      sources."fs-extra-2.0.0"
+      sources."getpass-0.1.7"
+      sources."graceful-fs-4.2.3"
+      sources."har-schema-2.0.0"
+      sources."har-validator-5.1.3"
+      sources."http-errors-1.7.2"
+      sources."http-signature-1.2.0"
+      sources."iconv-lite-0.4.24"
+      sources."inherits-2.0.3"
+      sources."ipaddr.js-1.9.1"
+      sources."is-stream-1.1.0"
+      sources."is-typedarray-1.0.0"
+      sources."is-wsl-1.1.0"
+      sources."isarray-1.0.0"
+      sources."isstream-0.1.2"
+      sources."jsbn-0.1.1"
+      sources."json-schema-0.2.3"
+      sources."json-schema-traverse-0.4.1"
+      sources."json-stringify-safe-5.0.1"
+      sources."jsonfile-2.4.0"
+      sources."jsprim-1.4.1"
+      sources."lodash-4.17.15"
+      sources."media-typer-0.3.0"
+      sources."merge-descriptors-1.0.1"
+      sources."methods-1.1.2"
+      sources."mime-1.4.1"
+      sources."mime-db-1.43.0"
+      sources."mime-types-2.1.26"
+      sources."minimist-1.2.0"
+      sources."ms-2.0.0"
+      sources."negotiator-0.6.2"
+      sources."node-watch-0.5.5"
+      sources."oauth-sign-0.9.0"
+      sources."on-finished-2.3.0"
+      sources."opn-5.4.0"
+      sources."options-0.0.6"
+      sources."os-homedir-1.0.2"
+      sources."os-tmpdir-1.0.2"
+      sources."parseurl-1.3.3"
+      sources."path-to-regexp-0.1.7"
+      sources."performance-now-2.1.0"
+      sources."process-nextick-args-1.0.7"
+      sources."proxy-addr-2.0.6"
+      sources."psl-1.8.0"
+      sources."punycode-2.1.1"
+      sources."qs-6.7.0"
+      sources."range-parser-1.2.1"
+      sources."raw-body-2.4.0"
+      sources."readable-stream-2.0.6"
+      sources."regenerator-runtime-0.9.6"
+      (sources."request-2.88.0" // {
+        dependencies = [
+          sources."qs-6.5.2"
+          sources."safe-buffer-5.2.0"
+        ];
+      })
+      sources."safe-buffer-5.1.1"
+      sources."safer-buffer-2.1.2"
+      (sources."send-0.16.2" // {
+        dependencies = [
+          sources."http-errors-1.6.3"
+          sources."setprototypeof-1.1.0"
+          sources."statuses-1.4.0"
+        ];
+      })
+      sources."serve-static-1.13.2"
+      sources."setprototypeof-1.1.1"
+      sources."sshpk-1.16.1"
+      sources."statuses-1.5.0"
+      sources."string_decoder-0.10.31"
+      sources."sums-0.2.4"
+      sources."through2-2.0.1"
+      sources."tmp-0.0.31"
+      sources."toidentifier-1.0.0"
+      (sources."tough-cookie-2.4.3" // {
+        dependencies = [
+          sources."punycode-1.4.1"
+        ];
+      })
+      sources."traverse-chain-0.1.0"
+      sources."tunnel-agent-0.6.0"
+      sources."tweetnacl-0.14.5"
+      sources."type-is-1.6.18"
+      sources."typedarray-0.0.6"
+      sources."ultron-1.0.2"
+      sources."unpipe-1.0.0"
+      sources."uri-js-4.2.2"
+      sources."util-deprecate-1.0.2"
+      sources."utils-merge-1.0.1"
+      sources."uuid-3.4.0"
+      sources."vary-1.1.2"
+      sources."verror-1.10.0"
+      (sources."ws-3.3.1" // {
+        dependencies = [
+          sources."ultron-1.1.1"
+        ];
+      })
+      sources."xtend-4.0.2"
+    ];
+    buildInputs = globalBuildInputs;
+    meta = {
+      description = "A tool that allows you analyse your Elm code and identifies deficiencies and best practices.";
+      license = "MIT";
+    };
+    production = true;
+    bypassCache = true;
+    reconstructLock = true;
+  };
+  elm-coverage = nodeEnv.buildNodePackage {
+    name = "elm-coverage";
+    packageName = "elm-coverage";
+    version = "0.3.0";
+    src = fetchurl {
+      url = "https://registry.npmjs.org/elm-coverage/-/elm-coverage-0.3.0.tgz";
+      sha512 = "378i24sqwydr323g5n696d0nz12d5ld8496fb3wmznf5fhv7p8ahvgf6a6cjfp78y0i53cr5v5jsa3hmb0xplc3jkrk5s5fn3s4wyaq";
+    };
+    dependencies = [
+      sources."@types/color-name-1.1.1"
+      sources."abbrev-1.1.1"
+      sources."ajv-6.12.0"
+      sources."ansi-regex-4.1.0"
+      sources."ansi-styles-3.2.1"
+      sources."anymatch-3.1.1"
+      sources."asn1-0.2.4"
+      sources."assert-plus-1.0.0"
+      sources."astral-regex-1.0.0"
+      sources."asynckit-0.4.0"
+      sources."aws-sign2-0.7.0"
+      sources."aws4-1.9.1"
+      sources."balanced-match-1.0.0"
+      sources."bcrypt-pbkdf-1.0.2"
+      sources."binary-0.3.0"
+      sources."binary-extensions-2.0.0"
+      sources."binwrap-0.2.2"
+      sources."bluebird-3.7.2"
+      sources."brace-expansion-1.1.11"
+      sources."braces-3.0.2"
+      sources."buffers-0.1.1"
+      sources."camelcase-5.3.1"
+      sources."caseless-0.12.0"
+      sources."chainsaw-0.1.0"
+      (sources."chalk-2.4.2" // {
+        dependencies = [
+          sources."supports-color-5.5.0"
+        ];
+      })
+      sources."chokidar-3.2.1"
+      sources."chownr-1.1.4"
+      (sources."cliui-6.0.0" // {
+        dependencies = [
+          sources."ansi-regex-5.0.0"
+          sources."emoji-regex-8.0.0"
+          sources."is-fullwidth-code-point-3.0.0"
+          sources."string-width-4.2.0"
+          sources."strip-ansi-6.0.0"
+        ];
+      })
+      sources."color-convert-1.9.3"
+      sources."color-name-1.1.3"
+      sources."combined-stream-1.0.8"
+      sources."concat-map-0.0.1"
+      sources."core-util-is-1.0.2"
+      sources."cross-spawn-5.1.0"
+      sources."dashdash-1.14.1"
+      sources."decamelize-1.2.0"
+      sources."delayed-stream-1.0.0"
+      sources."ecc-jsbn-0.1.2"
+      sources."elm-0.19.1"
+      (sources."elm-test-0.19.1" // {
+        dependencies = [
+          (sources."cross-spawn-7.0.0" // {
+            dependencies = [
+              sources."which-1.3.1"
+            ];
+          })
+          sources."fs-extra-8.1.0"
+          sources."which-2.0.1"
+        ];
+      })
+      sources."elmi-to-json-1.2.0"
+      sources."emoji-regex-7.0.3"
+      sources."escape-string-regexp-1.0.5"
+      sources."extend-3.0.2"
+      sources."extsprintf-1.3.0"
+      sources."fast-deep-equal-3.1.1"
+      sources."fast-json-stable-stringify-2.1.0"
+      sources."fill-range-7.0.1"
+      sources."find-0.2.9"
+      (sources."find-elm-dependencies-2.0.2" // {
+        dependencies = [
+          sources."firstline-1.2.0"
+        ];
+      })
+      sources."find-parent-dir-0.3.0"
+      sources."find-up-4.1.0"
+      sources."firstline-2.0.2"
+      sources."forever-agent-0.6.1"
+      sources."form-data-2.3.3"
+      sources."fs-extra-4.0.3"
+      sources."fs-minipass-1.2.7"
+      sources."fs.realpath-1.0.0"
+      sources."fsevents-2.1.2"
+      sources."get-caller-file-2.0.5"
+      sources."getpass-0.1.7"
+      sources."glob-7.1.4"
+      sources."glob-parent-5.1.1"
+      sources."graceful-fs-4.2.3"
+      sources."har-schema-2.0.0"
+      sources."har-validator-5.1.3"
+      sources."has-flag-3.0.0"
+      sources."http-signature-1.2.0"
+      sources."inflight-1.0.6"
+      sources."inherits-2.0.4"
+      sources."is-binary-path-2.1.0"
+      sources."is-extglob-2.1.1"
+      sources."is-fullwidth-code-point-2.0.0"
+      sources."is-glob-4.0.1"
+      sources."is-number-7.0.0"
+      sources."is-typedarray-1.0.0"
+      sources."is-wsl-1.1.0"
+      sources."isexe-2.0.0"
+      sources."isstream-0.1.2"
+      sources."jsbn-0.1.1"
+      sources."json-schema-0.2.3"
+      sources."json-schema-traverse-0.4.1"
+      sources."json-stringify-safe-5.0.1"
+      sources."jsonfile-4.0.0"
+      sources."jsprim-1.4.1"
+      sources."locate-path-5.0.0"
+      sources."lodash-4.17.15"
+      (sources."lru-cache-4.1.5" // {
+        dependencies = [
+          sources."yallist-2.1.2"
+        ];
+      })
+      sources."mime-db-1.43.0"
+      sources."mime-types-2.1.26"
+      sources."minimatch-3.0.4"
+      sources."minimist-1.2.5"
+      sources."minipass-2.9.0"
+      sources."minizlib-1.3.3"
+      sources."mkdirp-0.5.5"
+      sources."moment-2.24.0"
+      sources."murmur-hash-js-1.0.0"
+      sources."mustache-3.2.1"
+      sources."nice-try-1.0.5"
+      (sources."node-elm-compiler-5.0.4" // {
+        dependencies = [
+          sources."cross-spawn-6.0.5"
+          sources."path-key-2.0.1"
+        ];
+      })
+      sources."nopt-1.0.10"
+      sources."normalize-path-3.0.0"
+      sources."oauth-sign-0.9.0"
+      sources."once-1.4.0"
+      sources."opn-5.5.0"
+      sources."os-tmpdir-1.0.2"
+      sources."p-limit-2.2.2"
+      sources."p-locate-4.1.0"
+      sources."p-try-2.2.0"
+      sources."path-exists-4.0.0"
+      sources."path-is-absolute-1.0.1"
+      sources."path-key-3.1.1"
+      sources."performance-now-2.1.0"
+      sources."picomatch-2.2.2"
+      sources."pseudomap-1.0.2"
+      sources."psl-1.8.0"
+      sources."punycode-2.1.1"
+      sources."qs-6.5.2"
+      sources."readdirp-3.1.3"
+      sources."request-2.88.2"
+      sources."request-promise-4.2.5"
+      sources."request-promise-core-1.1.3"
+      sources."require-directory-2.1.1"
+      sources."require-main-filename-2.0.0"
+      sources."rimraf-2.6.3"
+      sources."safe-buffer-5.2.0"
+      sources."safer-buffer-2.1.2"
+      sources."semver-5.7.1"
+      sources."set-blocking-2.0.0"
+      sources."shebang-command-1.2.0"
+      sources."shebang-regex-1.0.0"
+      sources."slice-ansi-2.1.0"
+      sources."split-1.0.1"
+      sources."sshpk-1.16.1"
+      sources."stealthy-require-1.1.1"
+      sources."string-width-3.1.0"
+      sources."strip-ansi-5.2.0"
+      (sources."supports-color-7.1.0" // {
+        dependencies = [
+          sources."has-flag-4.0.0"
+        ];
+      })
+      sources."table-5.4.6"
+      sources."tar-4.4.13"
+      sources."temp-0.9.0"
+      sources."through-2.3.8"
+      sources."tmp-0.0.33"
+      sources."to-regex-range-5.0.1"
+      sources."touch-3.1.0"
+      sources."tough-cookie-2.5.0"
+      sources."traverse-0.3.9"
+      sources."traverse-chain-0.1.0"
+      sources."tunnel-agent-0.6.0"
+      sources."tweetnacl-0.14.5"
+      sources."universalify-0.1.2"
+      sources."unzip-stream-0.3.0"
+      sources."upgrade-1.1.0"
+      sources."uri-js-4.2.2"
+      sources."uuid-3.4.0"
+      sources."verror-1.10.0"
+      sources."which-1.3.1"
+      sources."which-module-2.0.0"
+      (sources."wrap-ansi-6.2.0" // {
+        dependencies = [
+          sources."ansi-regex-5.0.0"
+          sources."ansi-styles-4.2.1"
+          sources."color-convert-2.0.1"
+          sources."color-name-1.1.4"
+          sources."emoji-regex-8.0.0"
+          sources."is-fullwidth-code-point-3.0.0"
+          sources."string-width-4.2.0"
+          sources."strip-ansi-6.0.0"
+        ];
+      })
+      sources."wrappy-1.0.2"
+      sources."xmlbuilder-13.0.2"
+      sources."y18n-4.0.0"
+      sources."yallist-3.1.1"
+      (sources."yargs-15.3.1" // {
+        dependencies = [
+          sources."ansi-regex-5.0.0"
+          sources."emoji-regex-8.0.0"
+          sources."is-fullwidth-code-point-3.0.0"
+          sources."string-width-4.2.0"
+          sources."strip-ansi-6.0.0"
+        ];
+      })
+      sources."yargs-parser-18.1.2"
+    ];
+    buildInputs = globalBuildInputs;
+    meta = {
+      description = "> Work in progress - Code coverage tooling for Elm";
+      homepage = "https://github.com/zwilias/elm-coverage#readme";
+      license = "BSD-3-Clause";
+    };
+    production = true;
+    bypassCache = true;
+    reconstructLock = true;
+  };
+  elm-doc-preview = nodeEnv.buildNodePackage {
+    name = "elm-doc-preview";
+    packageName = "elm-doc-preview";
+    version = "3.0.4";
+    src = fetchurl {
+      url = "https://registry.npmjs.org/elm-doc-preview/-/elm-doc-preview-3.0.4.tgz";
+      sha512 = "2cg4fjgjxg94lhak20inr9v05bkr2iyh64acg2msc4dr4jwq97542r115mpyzxc7rxsa2pg3jfflmqv74vy22v9zb9pzqdgh83ipfml";
+    };
+    dependencies = [
+      sources."@cnakazawa/watch-1.0.4"
+      sources."@sindresorhus/is-0.7.0"
+      sources."accepts-1.3.7"
+      sources."ansi-styles-3.2.1"
+      sources."anymatch-2.0.0"
+      sources."arr-diff-4.0.0"
+      sources."arr-flatten-1.1.0"
+      sources."arr-union-3.1.0"
+      sources."array-flatten-1.1.1"
+      sources."array-unique-0.3.2"
+      sources."assign-symbols-1.0.0"
+      sources."async-limiter-1.0.1"
+      sources."atob-2.1.2"
+      sources."balanced-match-1.0.0"
+      (sources."base-0.11.2" // {
+        dependencies = [
+          sources."define-property-1.0.0"
+        ];
+      })
+      sources."batch-0.6.1"
+      sources."body-parser-1.19.0"
+      sources."brace-expansion-1.1.11"
+      (sources."braces-2.3.2" // {
+        dependencies = [
+          sources."extend-shallow-2.0.1"
+        ];
+      })
+      sources."bser-2.1.1"
+      sources."bytes-3.1.0"
+      sources."cache-base-1.0.1"
+      (sources."cacheable-request-2.1.4" // {
+        dependencies = [
+          sources."lowercase-keys-1.0.0"
+        ];
+      })
+      sources."capture-exit-2.0.0"
+      sources."chalk-2.4.2"
+      (sources."class-utils-0.3.6" // {
+        dependencies = [
+          sources."define-property-0.2.5"
+          (sources."is-accessor-descriptor-0.1.6" // {
+            dependencies = [
+              sources."kind-of-3.2.2"
+            ];
+          })
+          (sources."is-data-descriptor-0.1.4" // {
+            dependencies = [
+              sources."kind-of-3.2.2"
+            ];
+          })
+          sources."is-descriptor-0.1.6"
+          sources."kind-of-5.1.0"
+        ];
+      })
+      sources."clone-response-1.0.2"
+      sources."collection-visit-1.0.0"
+      sources."color-convert-1.9.3"
+      sources."color-name-1.1.3"
+      sources."commander-3.0.2"
+      sources."component-emitter-1.3.0"
+      sources."concat-map-0.0.1"
+      sources."content-disposition-0.5.3"
+      sources."content-type-1.0.4"
+      sources."cookie-0.4.0"
+      sources."cookie-signature-1.0.6"
+      sources."copy-descriptor-0.1.1"
+      sources."core-js-3.6.4"
+      sources."core-util-is-1.0.2"
+      sources."cross-spawn-6.0.5"
+      sources."debug-2.6.9"
+      sources."decode-uri-component-0.2.0"
+      sources."decompress-response-3.3.0"
+      sources."deep-extend-0.6.0"
+      sources."define-properties-1.1.3"
+      sources."define-property-2.0.2"
+      sources."depd-1.1.2"
+      sources."destroy-1.0.4"
+      sources."duplexer3-0.1.4"
+      sources."ee-first-1.1.1"
+      sources."encodeurl-1.0.2"
+      sources."end-of-stream-1.4.4"
+      sources."es-abstract-1.17.5"
+      sources."es-to-primitive-1.2.1"
+      sources."escape-html-1.0.3"
+      sources."escape-string-regexp-1.0.5"
+      sources."etag-1.8.1"
+      sources."exec-sh-0.3.4"
+      (sources."execa-1.0.0" // {
+        dependencies = [
+          sources."get-stream-4.1.0"
+        ];
+      })
+      (sources."expand-brackets-2.1.4" // {
+        dependencies = [
+          sources."define-property-0.2.5"
+          sources."extend-shallow-2.0.1"
+          (sources."is-accessor-descriptor-0.1.6" // {
+            dependencies = [
+              sources."kind-of-3.2.2"
+            ];
+          })
+          (sources."is-data-descriptor-0.1.4" // {
+            dependencies = [
+              sources."kind-of-3.2.2"
+            ];
+          })
+          sources."is-descriptor-0.1.6"
+          sources."kind-of-5.1.0"
+        ];
+      })
+      sources."express-4.17.1"
+      (sources."express-ws-4.0.0" // {
+        dependencies = [
+          sources."ws-5.2.2"
+        ];
+      })
+      (sources."extend-shallow-3.0.2" // {
+        dependencies = [
+          sources."is-extendable-1.0.1"
+        ];
+      })
+      (sources."extglob-2.0.4" // {
+        dependencies = [
+          sources."define-property-1.0.0"
+          sources."extend-shallow-2.0.1"
+        ];
+      })
+      sources."fb-watchman-2.0.1"
+      (sources."fill-range-4.0.0" // {
+        dependencies = [
+          sources."extend-shallow-2.0.1"
+        ];
+      })
+      sources."finalhandler-1.1.2"
+      sources."for-in-1.0.2"
+      sources."forwarded-0.1.2"
+      sources."fragment-cache-0.2.1"
+      sources."fresh-0.5.2"
+      sources."from2-2.3.0"
+      sources."fs.realpath-1.0.0"
+      sources."function-bind-1.1.1"
+      sources."get-stream-3.0.0"
+      sources."get-value-2.0.6"
+      sources."glob-7.1.6"
+      sources."got-8.3.2"
+      sources."has-1.0.3"
+      sources."has-flag-3.0.0"
+      sources."has-symbol-support-x-1.4.2"
+      sources."has-symbols-1.0.1"
+      sources."has-to-string-tag-x-1.4.1"
+      sources."has-value-1.0.0"
+      (sources."has-values-1.0.0" // {
+        dependencies = [
+          sources."kind-of-4.0.0"
+        ];
+      })
+      sources."http-cache-semantics-3.8.1"
+      sources."http-errors-1.7.2"
+      sources."iconv-lite-0.4.24"
+      sources."inflight-1.0.6"
+      sources."inherits-2.0.3"
+      sources."ini-1.3.5"
+      sources."into-stream-3.1.0"
+      sources."ipaddr.js-1.9.1"
+      sources."is-accessor-descriptor-1.0.0"
+      sources."is-buffer-1.1.6"
+      sources."is-callable-1.1.5"
+      sources."is-data-descriptor-1.0.0"
+      sources."is-date-object-1.0.2"
+      sources."is-descriptor-1.0.2"
+      sources."is-extendable-0.1.1"
+      (sources."is-number-3.0.0" // {
+        dependencies = [
+          sources."kind-of-3.2.2"
+        ];
+      })
+      sources."is-object-1.0.1"
+      sources."is-plain-obj-1.1.0"
+      sources."is-plain-object-2.0.4"
+      sources."is-regex-1.0.5"
+      sources."is-retry-allowed-1.2.0"
+      sources."is-stream-1.1.0"
+      sources."is-symbol-1.0.3"
+      sources."is-windows-1.0.2"
+      sources."is-wsl-1.1.0"
+      sources."isarray-1.0.0"
+      sources."isexe-2.0.0"
+      sources."isobject-3.0.1"
+      sources."isurl-1.0.0"
+      sources."json-buffer-3.0.0"
+      sources."keyv-3.0.0"
+      sources."kind-of-6.0.3"
+      sources."latest-version-4.0.0"
+      sources."lowercase-keys-1.0.1"
+      sources."makeerror-1.0.11"
+      sources."map-cache-0.2.2"
+      sources."map-visit-1.0.0"
+      sources."media-typer-0.3.0"
+      sources."merge-descriptors-1.0.1"
+      sources."methods-1.1.2"
+      sources."micromatch-3.1.10"
+      sources."mime-1.6.0"
+      sources."mime-db-1.43.0"
+      sources."mime-types-2.1.26"
+      sources."mimic-response-1.0.1"
+      sources."minimatch-3.0.4"
+      sources."minimist-1.2.5"
+      (sources."mixin-deep-1.3.2" // {
+        dependencies = [
+          sources."is-extendable-1.0.1"
+        ];
+      })
+      sources."ms-2.0.0"
+      sources."nanomatch-1.2.13"
+      sources."negotiator-0.6.2"
+      sources."nice-try-1.0.5"
+      sources."node-int64-0.4.0"
+      sources."normalize-path-2.1.1"
+      sources."normalize-url-2.0.1"
+      sources."npm-run-path-2.0.2"
+      sources."object-assign-4.1.1"
+      (sources."object-copy-0.1.0" // {
+        dependencies = [
+          sources."define-property-0.2.5"
+          sources."is-accessor-descriptor-0.1.6"
+          sources."is-data-descriptor-0.1.4"
+          (sources."is-descriptor-0.1.6" // {
+            dependencies = [
+              sources."kind-of-5.1.0"
+            ];
+          })
+          sources."kind-of-3.2.2"
+        ];
+      })
+      sources."object-inspect-1.7.0"
+      sources."object-keys-1.1.1"
+      sources."object-visit-1.0.1"
+      sources."object.assign-4.1.0"
+      sources."object.getownpropertydescriptors-2.1.0"
+      sources."object.pick-1.3.0"
+      sources."on-finished-2.3.0"
+      sources."once-1.4.0"
+      sources."opn-5.5.0"
+      sources."p-cancelable-0.4.1"
+      sources."p-finally-1.0.0"
+      sources."p-is-promise-1.1.0"
+      sources."p-timeout-2.0.1"
+      sources."package-json-5.0.0"
+      sources."parseurl-1.3.3"
+      sources."pascalcase-0.1.1"
+      sources."path-is-absolute-1.0.1"
+      sources."path-key-2.0.1"
+      sources."path-to-regexp-0.1.7"
+      sources."pify-3.0.0"
+      sources."posix-character-classes-0.1.1"
+      sources."prepend-http-2.0.0"
+      sources."process-nextick-args-2.0.1"
+      sources."proxy-addr-2.0.6"
+      sources."pump-3.0.0"
+      sources."qs-6.7.0"
+      sources."query-string-5.1.1"
+      sources."range-parser-1.2.1"
+      sources."raw-body-2.4.0"
+      sources."rc-1.2.8"
+      sources."readable-stream-2.3.7"
+      sources."regex-not-1.0.2"
+      sources."registry-auth-token-3.4.0"
+      sources."registry-url-3.1.0"
+      sources."remove-trailing-separator-1.1.0"
+      sources."repeat-element-1.1.3"
+      sources."repeat-string-1.6.1"
+      sources."resolve-url-0.2.1"
+      sources."responselike-1.0.2"
+      sources."ret-0.1.15"
+      sources."rimraf-2.7.1"
+      sources."rsvp-4.8.5"
+      sources."safe-buffer-5.1.2"
+      sources."safe-regex-1.1.0"
+      sources."safer-buffer-2.1.2"
+      sources."sane-4.1.0"
+      sources."semver-5.7.1"
+      (sources."send-0.17.1" // {
+        dependencies = [
+          sources."ms-2.1.1"
+        ];
+      })
+      (sources."serve-index-1.9.1" // {
+        dependencies = [
+          sources."http-errors-1.6.3"
+          sources."setprototypeof-1.1.0"
+        ];
+      })
+      sources."serve-static-1.14.1"
+      (sources."set-value-2.0.1" // {
+        dependencies = [
+          sources."extend-shallow-2.0.1"
+        ];
+      })
+      sources."setprototypeof-1.1.1"
+      sources."shebang-command-1.2.0"
+      sources."shebang-regex-1.0.0"
+      sources."signal-exit-3.0.3"
+      (sources."snapdragon-0.8.2" // {
+        dependencies = [
+          sources."define-property-0.2.5"
+          sources."extend-shallow-2.0.1"
+          (sources."is-accessor-descriptor-0.1.6" // {
+            dependencies = [
+              sources."kind-of-3.2.2"
+            ];
+          })
+          (sources."is-data-descriptor-0.1.4" // {
+            dependencies = [
+              sources."kind-of-3.2.2"
+            ];
+          })
+          sources."is-descriptor-0.1.6"
+          sources."kind-of-5.1.0"
+        ];
+      })
+      (sources."snapdragon-node-2.1.1" // {
+        dependencies = [
+          sources."define-property-1.0.0"
+        ];
+      })
+      (sources."snapdragon-util-3.0.1" // {
+        dependencies = [
+          sources."kind-of-3.2.2"
+        ];
+      })
+      sources."sort-keys-2.0.0"
+      sources."source-map-0.5.7"
+      sources."source-map-resolve-0.5.3"
+      sources."source-map-url-0.4.0"
+      sources."split-string-3.1.0"
+      (sources."static-extend-0.1.2" // {
+        dependencies = [
+          sources."define-property-0.2.5"
+          (sources."is-accessor-descriptor-0.1.6" // {
+            dependencies = [
+              sources."kind-of-3.2.2"
+            ];
+          })
+          (sources."is-data-descriptor-0.1.4" // {
+            dependencies = [
+              sources."kind-of-3.2.2"
+            ];
+          })
+          sources."is-descriptor-0.1.6"
+          sources."kind-of-5.1.0"
+        ];
+      })
+      sources."statuses-1.5.0"
+      sources."strict-uri-encode-1.1.0"
+      sources."string.prototype.trimend-1.0.0"
+      sources."string.prototype.trimleft-2.1.2"
+      sources."string.prototype.trimright-2.1.2"
+      sources."string.prototype.trimstart-1.0.0"
+      sources."string_decoder-1.1.1"
+      sources."strip-eof-1.0.0"
+      sources."strip-json-comments-2.0.1"
+      sources."supports-color-5.5.0"
+      sources."timed-out-4.0.1"
+      sources."tmp-0.1.0"
+      sources."tmpl-1.0.4"
+      (sources."to-object-path-0.3.0" // {
+        dependencies = [
+          sources."kind-of-3.2.2"
+        ];
+      })
+      sources."to-regex-3.0.2"
+      sources."to-regex-range-2.1.1"
+      sources."toidentifier-1.0.0"
+      sources."type-is-1.6.18"
+      sources."union-value-1.0.1"
+      sources."unpipe-1.0.0"
+      (sources."unset-value-1.0.0" // {
+        dependencies = [
+          (sources."has-value-0.3.1" // {
+            dependencies = [
+              sources."isobject-2.1.0"
+            ];
+          })
+          sources."has-values-0.1.4"
+        ];
+      })
+      sources."urix-0.1.0"
+      sources."url-parse-lax-3.0.0"
+      sources."url-to-options-1.0.1"
+      sources."use-3.1.1"
+      sources."util-deprecate-1.0.2"
+      sources."util.promisify-1.0.1"
+      sources."utils-merge-1.0.1"
+      sources."vary-1.1.2"
+      sources."walker-1.0.7"
+      sources."which-1.3.1"
+      sources."wrappy-1.0.2"
+      sources."ws-6.2.1"
+    ];
+    buildInputs = globalBuildInputs;
+    meta = {
+      description = "Elm offline documentation previewer with hot reloading.";
+      homepage = "https://github.com/dmy/elm-doc-preview#readme";
+      license = "BSD-3-Clause";
+    };
+    production = true;
+    bypassCache = true;
+    reconstructLock = true;
+  };
+  "@elm-tooling/elm-language-server" = nodeEnv.buildNodePackage {
+    name = "_at_elm-tooling_slash_elm-language-server";
+    packageName = "@elm-tooling/elm-language-server";
+    version = "1.7.1";
+    src = fetchurl {
+      url = "https://registry.npmjs.org/@elm-tooling/elm-language-server/-/elm-language-server-1.7.1.tgz";
+      sha512 = "25ha586wi38w5bh15dvskvixbw8n1ca5y5x3j2593d0nlrlqr69garz2bd444asgad1yvjkf62dfjdswy3nw1l0nrhpphiryd8hlnzx";
+    };
+    dependencies = [
+      sources."@nodelib/fs.scandir-2.1.3"
+      sources."@nodelib/fs.stat-2.0.3"
+      sources."@nodelib/fs.walk-1.2.4"
+      sources."accepts-1.3.7"
+      sources."ajv-6.12.0"
+      sources."array-flatten-1.1.1"
+      sources."array-union-2.1.0"
+      sources."asn1-0.2.4"
+      sources."assert-plus-1.0.0"
+      sources."async-limiter-1.0.1"
+      sources."asynckit-0.4.0"
+      sources."aws-sign2-0.7.0"
+      sources."aws4-1.9.1"
+      sources."babel-runtime-6.18.0"
+      sources."bcrypt-pbkdf-1.0.2"
+      sources."body-parser-1.19.0"
+      sources."braces-3.0.2"
+      sources."bytes-3.1.0"
+      sources."caseless-0.12.0"
+      sources."combined-stream-1.0.8"
+      sources."concat-stream-1.5.2"
+      sources."content-disposition-0.5.2"
+      sources."content-type-1.0.4"
+      sources."cookie-0.3.1"
+      sources."cookie-signature-1.0.6"
+      sources."core-js-2.6.11"
+      sources."core-util-is-1.0.2"
+      sources."cross-spawn-7.0.2"
+      sources."dashdash-1.14.1"
+      sources."debug-2.6.9"
+      sources."delayed-stream-1.0.0"
+      sources."depd-1.1.2"
+      sources."destroy-1.0.4"
+      sources."dir-glob-3.0.1"
+      sources."ecc-jsbn-0.1.2"
+      sources."ee-first-1.1.1"
+      sources."elm-analyse-git://github.com/elm-tooling/elm-analyse#1a665a6e540d7d11b29b3c5e3c52089704325d9c"
+      sources."encodeurl-1.0.2"
+      sources."end-of-stream-1.4.4"
+      sources."escape-html-1.0.3"
+      sources."etag-1.8.1"
+      (sources."execa-4.0.0" // {
+        dependencies = [
+          sources."is-stream-2.0.0"
+        ];
+      })
+      (sources."express-4.16.3" // {
+        dependencies = [
+          sources."body-parser-1.18.2"
+          sources."bytes-3.0.0"
+          sources."http-errors-1.6.3"
+          sources."iconv-lite-0.4.19"
+          sources."qs-6.5.1"
+          (sources."raw-body-2.3.2" // {
+            dependencies = [
+              sources."depd-1.1.1"
+              sources."http-errors-1.6.2"
+              sources."setprototypeof-1.0.3"
+            ];
+          })
+          sources."setprototypeof-1.1.0"
+          sources."statuses-1.4.0"
+        ];
+      })
+      (sources."express-ws-2.0.0" // {
+        dependencies = [
+          sources."ws-1.1.5"
+        ];
+      })
+      sources."extend-3.0.2"
+      sources."extsprintf-1.3.0"
+      sources."fast-deep-equal-3.1.1"
+      sources."fast-diff-1.2.0"
+      sources."fast-glob-3.2.2"
+      sources."fast-json-stable-stringify-2.1.0"
+      sources."fastq-1.7.0"
+      sources."fill-range-7.0.1"
+      (sources."finalhandler-1.1.1" // {
+        dependencies = [
+          sources."statuses-1.4.0"
+        ];
+      })
+      sources."find-0.2.7"
+      sources."forever-agent-0.6.1"
+      sources."form-data-2.3.3"
+      sources."forwarded-0.1.2"
+      sources."fresh-0.5.2"
+      sources."fs-extra-2.0.0"
+      sources."get-stream-5.1.0"
+      sources."getpass-0.1.7"
+      sources."glob-parent-5.1.1"
+      sources."globby-11.0.0"
+      sources."graceful-fs-4.2.3"
+      sources."har-schema-2.0.0"
+      sources."har-validator-5.1.3"
+      sources."http-errors-1.7.2"
+      sources."http-signature-1.2.0"
+      sources."human-signals-1.1.1"
+      sources."iconv-lite-0.4.24"
+      sources."ignore-5.1.4"
+      sources."inherits-2.0.3"
+      sources."ipaddr.js-1.9.1"
+      sources."is-extglob-2.1.1"
+      sources."is-glob-4.0.1"
+      sources."is-number-7.0.0"
+      sources."is-stream-1.1.0"
+      sources."is-typedarray-1.0.0"
+      sources."is-wsl-1.1.0"
+      sources."isarray-1.0.0"
+      sources."isexe-2.0.0"
+      sources."isstream-0.1.2"
+      sources."jsbn-0.1.1"
+      sources."json-schema-0.2.3"
+      sources."json-schema-traverse-0.4.1"
+      sources."json-stringify-safe-5.0.1"
+      sources."jsonfile-2.4.0"
+      sources."jsprim-1.4.1"
+      sources."lodash-4.17.15"
+      sources."media-typer-0.3.0"
+      sources."merge-descriptors-1.0.1"
+      sources."merge-stream-2.0.0"
+      sources."merge2-1.3.0"
+      sources."methods-1.1.2"
+      sources."micromatch-4.0.2"
+      sources."mime-1.4.1"
+      sources."mime-db-1.43.0"
+      sources."mime-types-2.1.26"
+      sources."mimic-fn-2.1.0"
+      sources."minimist-1.2.0"
+      sources."ms-2.0.0"
+      sources."negotiator-0.6.2"
+      sources."node-watch-0.5.5"
+      sources."npm-run-path-4.0.1"
+      sources."oauth-sign-0.9.0"
+      sources."on-finished-2.3.0"
+      sources."once-1.4.0"
+      sources."onetime-5.1.0"
+      sources."opn-5.4.0"
+      sources."options-0.0.6"
+      sources."os-homedir-1.0.2"
+      sources."os-tmpdir-1.0.2"
+      sources."parseurl-1.3.3"
+      sources."path-key-3.1.1"
+      sources."path-to-regexp-0.1.7"
+      sources."path-type-4.0.0"
+      sources."performance-now-2.1.0"
+      sources."picomatch-2.2.2"
+      sources."pjson-1.0.9"
+      sources."process-nextick-args-1.0.7"
+      sources."proxy-addr-2.0.6"
+      sources."psl-1.8.0"
+      sources."pump-3.0.0"
+      sources."punycode-2.1.1"
+      sources."qs-6.7.0"
+      sources."range-parser-1.2.1"
+      sources."raw-body-2.4.0"
+      sources."readable-stream-2.0.6"
+      sources."regenerator-runtime-0.9.6"
+      (sources."request-2.88.0" // {
+        dependencies = [
+          sources."qs-6.5.2"
+          sources."safe-buffer-5.2.0"
+        ];
+      })
+      sources."reusify-1.0.4"
+      sources."run-parallel-1.1.9"
+      sources."rxjs-6.5.5"
+      sources."safe-buffer-5.1.1"
+      sources."safer-buffer-2.1.2"
+      (sources."send-0.16.2" // {
+        dependencies = [
+          sources."http-errors-1.6.3"
+          sources."setprototypeof-1.1.0"
+          sources."statuses-1.4.0"
+        ];
+      })
+      sources."serve-static-1.13.2"
+      sources."setprototypeof-1.1.1"
+      sources."shebang-command-2.0.0"
+      sources."shebang-regex-3.0.0"
+      sources."signal-exit-3.0.3"
+      sources."slash-3.0.0"
+      sources."sshpk-1.16.1"
+      sources."statuses-1.5.0"
+      sources."string_decoder-0.10.31"
+      sources."strip-final-newline-2.0.0"
+      sources."sums-0.2.4"
+      sources."through2-2.0.1"
+      sources."tmp-0.0.31"
+      sources."to-regex-range-5.0.1"
+      sources."toidentifier-1.0.0"
+      (sources."tough-cookie-2.4.3" // {
+        dependencies = [
+          sources."punycode-1.4.1"
+        ];
+      })
+      sources."traverse-chain-0.1.0"
+      sources."tslib-1.11.1"
+      sources."tunnel-agent-0.6.0"
+      sources."tweetnacl-0.14.5"
+      sources."type-is-1.6.18"
+      sources."typedarray-0.0.6"
+      sources."ultron-1.0.2"
+      sources."unpipe-1.0.0"
+      sources."uri-js-4.2.2"
+      sources."util-deprecate-1.0.2"
+      sources."utils-merge-1.0.1"
+      sources."uuid-3.4.0"
+      sources."vary-1.1.2"
+      sources."verror-1.10.0"
+      sources."vscode-jsonrpc-5.0.1"
+      sources."vscode-languageserver-6.1.1"
+      sources."vscode-languageserver-protocol-3.15.3"
+      sources."vscode-languageserver-textdocument-1.0.1"
+      sources."vscode-languageserver-types-3.15.1"
+      sources."vscode-uri-2.1.1"
+      sources."web-tree-sitter-0.16.2"
+      sources."which-2.0.2"
+      sources."wrappy-1.0.2"
+      (sources."ws-3.3.1" // {
+        dependencies = [
+          sources."ultron-1.1.1"
+        ];
+      })
+      sources."xtend-4.0.2"
+    ];
+    buildInputs = globalBuildInputs;
+    meta = {
+      description = "Implementation of an elm language server in node.";
+      homepage = "https://github.com/elm-tooling/elm-language-server#readme";
+      license = "MIT";
+    };
+    production = true;
+    bypassCache = true;
+    reconstructLock = true;
+  };
+  elm-live = nodeEnv.buildNodePackage {
+    name = "elm-live";
+    packageName = "elm-live";
+    version = "4.0.2";
+    src = fetchurl {
+      url = "https://registry.npmjs.org/elm-live/-/elm-live-4.0.2.tgz";
+      sha512 = "1ri6f1ij6617nk0nsgrdfnzwac2hgisf7rvgrq4m8vny6a8f18bg5kb3bmal5mb51fsns2s3k678l6pal5v45ay1fdwps25kjyd93g0";
+    };
+    dependencies = [
+      sources."ansi-regex-2.1.1"
+      sources."ansi-styles-2.2.1"
+      sources."anymatch-3.1.1"
+      sources."async-limiter-1.0.1"
+      sources."binary-extensions-2.0.0"
+      sources."braces-3.0.2"
+      sources."chalk-1.1.3"
+      sources."charenc-0.0.2"
+      sources."chokidar-3.0.2"
+      sources."commander-2.17.1"
+      sources."crocks-0.12.1"
+      sources."cross-spawn-5.0.1"
+      sources."crypt-0.0.2"
+      sources."debug-2.6.9"
+      sources."default-gateway-4.2.0"
+      sources."depd-1.1.2"
+      sources."destroy-1.0.4"
+      sources."ee-first-1.1.1"
+      sources."elm-hot-1.1.4"
+      sources."encodeurl-1.0.2"
+      sources."end-of-stream-1.4.4"
+      sources."es6-promisify-6.1.0"
+      sources."escape-html-1.0.3"
+      sources."escape-string-regexp-1.0.5"
+      sources."etag-1.8.1"
+      sources."eventemitter3-3.1.2"
+      (sources."execa-1.0.0" // {
+        dependencies = [
+          sources."cross-spawn-6.0.5"
+        ];
+      })
+      sources."fill-range-7.0.1"
+      sources."finalhandler-1.1.2"
+      (sources."follow-redirects-1.11.0" // {
+        dependencies = [
+          sources."debug-3.2.6"
+          sources."ms-2.1.2"
+        ];
+      })
+      sources."fresh-0.5.2"
+      sources."fsevents-2.1.2"
+      sources."get-stream-4.1.0"
+      sources."glob-parent-5.1.1"
+      sources."has-ansi-2.0.0"
+      sources."http-errors-1.7.3"
+      sources."http-proxy-1.17.0"
+      sources."inherits-2.0.4"
+      sources."internal-ip-4.3.0"
+      sources."ip-regex-2.1.0"
+      sources."ipaddr.js-1.9.1"
+      sources."is-binary-path-2.1.0"
+      sources."is-buffer-1.1.6"
+      sources."is-extglob-2.1.1"
+      sources."is-glob-4.0.1"
+      sources."is-number-7.0.0"
+      sources."is-stream-1.1.0"
+      sources."is-wsl-1.1.0"
+      sources."isexe-2.0.0"
+      sources."lru-cache-4.1.5"
+      sources."md5-2.2.1"
+      sources."mime-2.4.3"
+      sources."ms-2.0.0"
+      sources."nice-try-1.0.5"
+      sources."normalize-path-3.0.0"
+      sources."npm-run-path-2.0.2"
+      sources."on-finished-2.3.0"
+      sources."once-1.4.0"
+      sources."open-6.4.0"
+      sources."os-tmpdir-1.0.2"
+      sources."p-finally-1.0.0"
+      sources."parseurl-1.3.3"
+      sources."path-key-2.0.1"
+      sources."pem-1.14.2"
+      sources."picomatch-2.2.2"
+      sources."pseudomap-1.0.2"
+      sources."pump-3.0.0"
+      sources."range-parser-1.2.1"
+      sources."readdirp-3.4.0"
+      sources."requires-port-1.0.0"
+      sources."semver-5.7.1"
+      (sources."send-0.17.1" // {
+        dependencies = [
+          sources."mime-1.6.0"
+          sources."ms-2.1.1"
+        ];
+      })
+      sources."serve-static-1.14.1"
+      sources."setprototypeof-1.1.1"
+      sources."shebang-command-1.2.0"
+      sources."shebang-regex-1.0.0"
+      sources."signal-exit-3.0.3"
+      sources."statuses-1.5.0"
+      sources."strip-ansi-3.0.1"
+      sources."strip-eof-1.0.0"
+      sources."supports-color-2.0.0"
+      sources."to-regex-range-5.0.1"
+      sources."toidentifier-1.0.0"
+      sources."unpipe-1.0.0"
+      sources."which-1.3.1"
+      sources."wrappy-1.0.2"
+      sources."ws-7.1.1"
+      sources."yallist-2.1.2"
+    ];
+    buildInputs = globalBuildInputs;
+    meta = {
+      description = "A flexible dev server for Elm. Live reload included!";
+      homepage = "https://github.com/wking-io/elm-live#readme";
+      license = "MIT";
+    };
+    production = true;
+    bypassCache = true;
+    reconstructLock = true;
+  };
+  elm-test = nodeEnv.buildNodePackage {
+    name = "elm-test";
+    packageName = "elm-test";
+    version = "0.19.1-revision2";
+    src = fetchurl {
+      url = "https://registry.npmjs.org/elm-test/-/elm-test-0.19.1-revision2.tgz";
+      sha512 = "24qc3z9z059c0dp97lfpsqgigxks6dd8akf14p3wvnvsy5ih3nf4947qc94xfrr0jdql0nnq12727nyyyyz3zrfyy54y85jayckcnyd";
+    };
+    dependencies = [
+      sources."@types/color-name-1.1.1"
+      sources."ajv-6.12.0"
+      sources."ansi-styles-4.2.1"
+      sources."anymatch-3.1.1"
+      sources."asn1-0.2.4"
+      sources."assert-plus-1.0.0"
+      sources."asynckit-0.4.0"
+      sources."aws-sign2-0.7.0"
+      sources."aws4-1.9.1"
+      sources."balanced-match-1.0.0"
+      sources."bcrypt-pbkdf-1.0.2"
+      sources."binary-0.3.0"
+      sources."binary-extensions-2.0.0"
+      sources."binwrap-0.2.2"
+      sources."bluebird-3.7.2"
+      sources."brace-expansion-1.1.11"
+      sources."braces-3.0.2"
+      sources."buffers-0.1.1"
+      sources."caseless-0.12.0"
+      sources."chainsaw-0.1.0"
+      sources."chalk-3.0.0"
+      sources."chokidar-3.3.0"
+      sources."chownr-1.1.4"
+      sources."color-convert-2.0.1"
+      sources."color-name-1.1.4"
+      sources."combined-stream-1.0.8"
+      sources."concat-map-0.0.1"
+      sources."core-util-is-1.0.2"
+      sources."cross-spawn-7.0.1"
+      sources."dashdash-1.14.1"
+      sources."delayed-stream-1.0.0"
+      sources."ecc-jsbn-0.1.2"
+      sources."elmi-to-json-1.3.0"
+      sources."extend-3.0.2"
+      sources."extsprintf-1.3.0"
+      sources."fast-deep-equal-3.1.1"
+      sources."fast-json-stable-stringify-2.1.0"
+      sources."fill-range-7.0.1"
+      (sources."find-elm-dependencies-2.0.2" // {
+        dependencies = [
+          sources."firstline-1.2.0"
+        ];
+      })
+      sources."find-parent-dir-0.3.0"
+      sources."firstline-2.0.2"
+      sources."forever-agent-0.6.1"
+      sources."form-data-2.3.3"
+      sources."fs-extra-8.1.0"
+      sources."fs-minipass-1.2.7"
+      sources."fs.realpath-1.0.0"
+      sources."fsevents-2.1.2"
+      sources."getpass-0.1.7"
+      sources."glob-7.1.6"
+      sources."glob-parent-5.1.1"
+      sources."graceful-fs-4.2.3"
+      sources."har-schema-2.0.0"
+      sources."har-validator-5.1.3"
+      sources."has-flag-4.0.0"
+      sources."http-signature-1.2.0"
+      sources."inflight-1.0.6"
+      sources."inherits-2.0.4"
+      sources."is-binary-path-2.1.0"
+      sources."is-extglob-2.1.1"
+      sources."is-glob-4.0.1"
+      sources."is-number-7.0.0"
+      sources."is-typedarray-1.0.0"
+      sources."isexe-2.0.0"
+      sources."isstream-0.1.2"
+      sources."jsbn-0.1.1"
+      sources."json-schema-0.2.3"
+      sources."json-schema-traverse-0.4.1"
+      sources."json-stringify-safe-5.0.1"
+      sources."jsonfile-4.0.0"
+      sources."jsprim-1.4.1"
+      sources."lodash-4.17.15"
+      sources."mime-db-1.43.0"
+      sources."mime-types-2.1.26"
+      sources."minimatch-3.0.4"
+      sources."minimist-1.2.5"
+      sources."minipass-2.9.0"
+      sources."minizlib-1.3.3"
+      sources."mkdirp-0.5.5"
+      sources."murmur-hash-js-1.0.0"
+      sources."mustache-3.2.1"
+      sources."nice-try-1.0.5"
+      (sources."node-elm-compiler-5.0.4" // {
+        dependencies = [
+          sources."cross-spawn-6.0.5"
+          sources."path-key-2.0.1"
+          sources."shebang-command-1.2.0"
+          sources."shebang-regex-1.0.0"
+          sources."which-1.3.1"
+        ];
+      })
+      sources."normalize-path-3.0.0"
+      sources."oauth-sign-0.9.0"
+      sources."once-1.4.0"
+      sources."path-is-absolute-1.0.1"
+      sources."path-key-3.1.1"
+      sources."performance-now-2.1.0"
+      sources."picomatch-2.2.2"
+      sources."psl-1.8.0"
+      sources."punycode-2.1.1"
+      sources."qs-6.5.2"
+      sources."readdirp-3.2.0"
+      sources."request-2.88.2"
+      sources."request-promise-4.2.5"
+      sources."request-promise-core-1.1.3"
+      sources."rimraf-2.6.3"
+      sources."safe-buffer-5.2.0"
+      sources."safer-buffer-2.1.2"
+      sources."semver-5.7.1"
+      sources."shebang-command-2.0.0"
+      sources."shebang-regex-3.0.0"
+      sources."split-1.0.1"
+      sources."sshpk-1.16.1"
+      sources."stealthy-require-1.1.1"
+      sources."supports-color-7.1.0"
+      sources."tar-4.4.13"
+      sources."temp-0.9.1"
+      sources."through-2.3.8"
+      sources."to-regex-range-5.0.1"
+      sources."tough-cookie-2.5.0"
+      sources."traverse-0.3.9"
+      sources."tunnel-agent-0.6.0"
+      sources."tweetnacl-0.14.5"
+      sources."universalify-0.1.2"
+      sources."unzip-stream-0.3.0"
+      sources."uri-js-4.2.2"
+      sources."uuid-3.4.0"
+      sources."verror-1.10.0"
+      sources."which-2.0.1"
+      sources."wrappy-1.0.2"
+      sources."xmlbuilder-13.0.2"
+      sources."yallist-3.1.1"
+    ];
+    buildInputs = globalBuildInputs;
+    meta = {
+      description = "Run elm-test suites.";
+      homepage = "https://github.com/rtfeldman/node-test-runner#readme";
+      license = "BSD-3-Clause";
+    };
+    production = true;
+    bypassCache = true;
+    reconstructLock = true;
+  };
+  elm-upgrade = nodeEnv.buildNodePackage {
+    name = "elm-upgrade";
+    packageName = "elm-upgrade";
+    version = "0.19.8";
+    src = fetchurl {
+      url = "https://registry.npmjs.org/elm-upgrade/-/elm-upgrade-0.19.8.tgz";
+      sha512 = "3rqgj507b7yb9ljc0rbfj7fi18h5lh33wvfr1kfdpqklvx3q84jfrma01fwrraxx1jlllhis9r1cpzcbcgmjlvygc2d5frhimbp60sb";
+    };
+    dependencies = [
+      sources."@sindresorhus/is-2.1.0"
+      sources."@szmarczak/http-timer-4.0.5"
+      sources."@types/cacheable-request-6.0.1"
+      sources."@types/http-cache-semantics-4.0.0"
+      sources."@types/keyv-3.1.1"
+      sources."@types/node-13.11.0"
+      sources."@types/responselike-1.0.0"
+      sources."cacheable-lookup-2.0.1"
+      sources."cacheable-request-7.0.1"
+      sources."caw-2.0.1"
+      (sources."clone-response-1.0.2" // {
+        dependencies = [
+          sources."mimic-response-1.0.1"
+        ];
+      })
+      sources."config-chain-1.1.12"
+      sources."decompress-response-5.0.0"
+      sources."defer-to-connect-2.0.0"
+      sources."duplexer3-0.1.4"
+      sources."end-of-stream-1.4.4"
+      sources."fs-extra-8.1.0"
+      sources."get-proxy-2.1.0"
+      sources."get-stream-5.1.0"
+      sources."got-10.7.0"
+      sources."graceful-fs-4.2.3"
+      sources."has-symbol-support-x-1.4.2"
+      sources."has-to-string-tag-x-1.4.1"
+      sources."http-cache-semantics-4.1.0"
+      sources."ini-1.3.5"
+      sources."is-object-1.0.1"
+      sources."isexe-2.0.0"
+      sources."isurl-1.0.0"
+      sources."json-buffer-3.0.1"
+      sources."jsonfile-4.0.0"
+      sources."keyv-4.0.0"
+      sources."lowercase-keys-2.0.0"
+      sources."mimic-response-2.1.0"
+      sources."normalize-url-4.5.0"
+      sources."npm-conf-1.1.3"
+      sources."once-1.4.0"
+      sources."p-cancelable-2.0.0"
+      sources."p-event-4.1.0"
+      sources."p-finally-1.0.0"
+      sources."p-timeout-2.0.1"
+      sources."pify-3.0.0"
+      sources."proto-list-1.2.4"
+      sources."pump-3.0.0"
+      sources."responselike-2.0.0"
+      sources."safe-buffer-5.2.0"
+      sources."safename-1.0.2"
+      sources."semver-7.1.3"
+      sources."to-readable-stream-2.1.0"
+      sources."tunnel-agent-0.6.0"
+      sources."type-fest-0.10.0"
+      sources."universalify-0.1.2"
+      sources."url-to-options-1.0.1"
+      sources."which-2.0.2"
+      sources."wrappy-1.0.2"
+      sources."yn-4.0.0"
+    ];
+    buildInputs = globalBuildInputs;
+    meta = {
+      description = "Upgrade Elm projects";
+      homepage = "https://github.com/avh4/elm-upgrade#readme";
+      license = "MIT";
+    };
+    production = true;
+    bypassCache = true;
+    reconstructLock = true;
+  };
+  elm-verify-examples = nodeEnv.buildNodePackage {
+    name = "elm-verify-examples";
+    packageName = "elm-verify-examples";
+    version = "5.0.0";
+    src = fetchurl {
+      url = "https://registry.npmjs.org/elm-verify-examples/-/elm-verify-examples-5.0.0.tgz";
+      sha512 = "2npciwj93dprxgd9m14wz73q0bq8jqr3wq2027dvphm6jjl6r13yc9v5xl4g72rrjjrb81hnpk5y1q855lzcxbc8h49spb19zwsy0vl";
+    };
+    dependencies = [
+      sources."ajv-6.12.0"
+      sources."ansi-regex-4.1.0"
+      sources."ansi-styles-3.2.1"
+      sources."anymatch-3.1.1"
+      sources."asn1-0.2.4"
+      sources."assert-plus-1.0.0"
+      sources."asynckit-0.4.0"
+      sources."aws-sign2-0.7.0"
+      sources."aws4-1.9.1"
+      sources."balanced-match-1.0.0"
+      sources."bcrypt-pbkdf-1.0.2"
+      sources."binary-0.3.0"
+      sources."binary-extensions-2.0.0"
+      sources."binwrap-0.2.2"
+      sources."bluebird-3.7.2"
+      sources."brace-expansion-1.1.11"
+      sources."braces-3.0.2"
+      sources."buffers-0.1.1"
+      sources."camelcase-5.3.1"
+      sources."caseless-0.12.0"
+      sources."chainsaw-0.1.0"
+      sources."chalk-2.4.2"
+      sources."chokidar-3.2.1"
+      sources."chownr-1.1.4"
+      sources."cliui-5.0.0"
+      sources."color-convert-1.9.3"
+      sources."color-name-1.1.3"
+      sources."combined-stream-1.0.8"
+      sources."concat-map-0.0.1"
+      sources."core-util-is-1.0.2"
+      (sources."cross-spawn-7.0.0" // {
+        dependencies = [
+          sources."which-1.3.1"
+        ];
+      })
+      sources."dashdash-1.14.1"
+      sources."decamelize-1.2.0"
+      sources."delayed-stream-1.0.0"
+      sources."ecc-jsbn-0.1.2"
+      (sources."elm-test-0.19.1" // {
+        dependencies = [
+          sources."fs-extra-8.1.0"
+          sources."has-flag-4.0.0"
+          sources."supports-color-7.1.0"
+        ];
+      })
+      sources."elmi-to-json-1.2.0"
+      sources."emoji-regex-7.0.3"
+      sources."escape-string-regexp-1.0.5"
+      sources."extend-3.0.2"
+      sources."extsprintf-1.3.0"
+      sources."fast-deep-equal-3.1.1"
+      sources."fast-json-stable-stringify-2.1.0"
+      sources."fill-range-7.0.1"
+      (sources."find-elm-dependencies-2.0.2" // {
+        dependencies = [
+          sources."firstline-1.2.0"
+        ];
+      })
+      sources."find-parent-dir-0.3.0"
+      sources."find-up-3.0.0"
+      sources."firstline-2.0.2"
+      sources."forever-agent-0.6.1"
+      sources."form-data-2.3.3"
+      sources."fs-extra-5.0.0"
+      sources."fs-minipass-1.2.7"
+      sources."fs.realpath-1.0.0"
+      sources."fsevents-2.1.2"
+      sources."get-caller-file-2.0.5"
+      sources."getpass-0.1.7"
+      sources."glob-7.1.4"
+      sources."glob-parent-5.1.1"
+      sources."graceful-fs-4.2.3"
+      sources."har-schema-2.0.0"
+      sources."har-validator-5.1.3"
+      sources."has-flag-3.0.0"
+      sources."http-signature-1.2.0"
+      sources."inflight-1.0.6"
+      sources."inherits-2.0.4"
+      sources."is-binary-path-2.1.0"
+      sources."is-extglob-2.1.1"
+      sources."is-fullwidth-code-point-2.0.0"
+      sources."is-glob-4.0.1"
+      sources."is-number-7.0.0"
+      sources."is-typedarray-1.0.0"
+      sources."isexe-2.0.0"
+      sources."isstream-0.1.2"
+      sources."jsbn-0.1.1"
+      sources."json-schema-0.2.3"
+      sources."json-schema-traverse-0.4.1"
+      sources."json-stringify-safe-5.0.1"
+      sources."jsonfile-4.0.0"
+      sources."jsprim-1.4.1"
+      sources."locate-path-3.0.0"
+      sources."lodash-4.17.15"
+      sources."mime-db-1.43.0"
+      sources."mime-types-2.1.26"
+      sources."minimatch-3.0.4"
+      sources."minimist-1.2.5"
+      sources."minipass-2.9.0"
+      sources."minizlib-1.3.3"
+      sources."mkdirp-0.5.5"
+      sources."murmur-hash-js-1.0.0"
+      sources."mustache-3.2.1"
+      sources."nice-try-1.0.5"
+      (sources."node-elm-compiler-5.0.4" // {
+        dependencies = [
+          sources."cross-spawn-6.0.5"
+          sources."path-key-2.0.1"
+          sources."which-1.3.1"
+        ];
+      })
+      sources."normalize-path-3.0.0"
+      sources."oauth-sign-0.9.0"
+      sources."once-1.4.0"
+      sources."p-limit-2.2.2"
+      sources."p-locate-3.0.0"
+      sources."p-try-2.2.0"
+      sources."path-exists-3.0.0"
+      sources."path-is-absolute-1.0.1"
+      sources."path-key-3.1.1"
+      sources."performance-now-2.1.0"
+      sources."picomatch-2.2.2"
+      sources."psl-1.8.0"
+      sources."punycode-2.1.1"
+      sources."qs-6.5.2"
+      sources."readdirp-3.1.3"
+      sources."request-2.88.2"
+      sources."request-promise-4.2.5"
+      sources."request-promise-core-1.1.3"
+      sources."require-directory-2.1.1"
+      sources."require-main-filename-2.0.0"
+      sources."rimraf-2.7.1"
+      sources."safe-buffer-5.2.0"
+      sources."safer-buffer-2.1.2"
+      sources."semver-5.7.1"
+      sources."set-blocking-2.0.0"
+      sources."shebang-command-1.2.0"
+      sources."shebang-regex-1.0.0"
+      sources."split-1.0.1"
+      sources."sshpk-1.16.1"
+      sources."stealthy-require-1.1.1"
+      sources."string-width-3.1.0"
+      sources."strip-ansi-5.2.0"
+      sources."supports-color-5.5.0"
+      sources."tar-4.4.13"
+      (sources."temp-0.9.0" // {
+        dependencies = [
+          sources."rimraf-2.6.3"
+        ];
+      })
+      sources."through-2.3.8"
+      sources."to-regex-range-5.0.1"
+      sources."tough-cookie-2.5.0"
+      sources."traverse-0.3.9"
+      sources."tunnel-agent-0.6.0"
+      sources."tweetnacl-0.14.5"
+      sources."universalify-0.1.2"
+      sources."unzip-stream-0.3.0"
+      sources."uri-js-4.2.2"
+      sources."uuid-3.4.0"
+      sources."verror-1.10.0"
+      sources."which-2.0.1"
+      sources."which-module-2.0.0"
+      sources."wrap-ansi-5.1.0"
+      sources."wrappy-1.0.2"
+      sources."xmlbuilder-13.0.2"
+      sources."y18n-4.0.0"
+      sources."yallist-3.1.1"
+      sources."yargs-13.3.2"
+      sources."yargs-parser-13.1.2"
+    ];
+    buildInputs = globalBuildInputs;
+    meta = {
+      description = "Verify examples in Elm doc-comments";
+      license = "BSD-3-Clause";
+    };
+    production = true;
+    bypassCache = true;
+    reconstructLock = true;
+  };
+  elm-xref = nodeEnv.buildNodePackage {
+    name = "elm-xref";
+    packageName = "elm-xref";
+    version = "4.1.0";
+    src = fetchurl {
+      url = "https://registry.npmjs.org/elm-xref/-/elm-xref-4.1.0.tgz";
+      sha512 = "24a79m9qhs2ycldf36p7qyr0dj8jvqja0cycp5gr01nkrdhlin4idh33wbvr7yghh5vbf53j3vbi0r9kjp1crs4cy1jvb80iccxayfv";
+    };
+    dependencies = [
+      sources."bluebird-3.7.2"
+      sources."compare-versions-3.6.0"
+      sources."core-util-is-1.0.2"
+      sources."fs-extra-6.0.1"
+      sources."graceful-fs-4.2.3"
+      sources."inherits-2.0.4"
+      sources."isarray-1.0.0"
+      sources."jsonfile-4.0.0"
+      sources."klaw-2.1.1"
+      sources."minimist-1.2.5"
+      sources."process-nextick-args-2.0.1"
+      sources."readable-stream-2.3.7"
+      sources."safe-buffer-5.1.2"
+      sources."semver-6.3.0"
+      sources."semver-regex-1.0.0"
+      (sources."semver-sort-0.0.4" // {
+        dependencies = [
+          sources."semver-5.7.1"
+        ];
+      })
+      sources."string_decoder-1.1.1"
+      sources."through2-2.0.5"
+      sources."universalify-0.1.2"
+      sources."util-deprecate-1.0.2"
+      sources."xtend-4.0.2"
+    ];
+    buildInputs = globalBuildInputs;
+    meta = {
+      description = "Cross referencing tool for Elm - find usages and unused code";
+      homepage = "https://github.com/zwilias/elm-xref#readme";
+      license = "BSD-3-Clause";
+    };
+    production = true;
+    bypassCache = true;
+    reconstructLock = true;
+  };
+  create-elm-app = nodeEnv.buildNodePackage {
+    name = "create-elm-app";
+    packageName = "create-elm-app";
+    version = "4.2.4";
+    src = fetchurl {
+      url = "https://registry.npmjs.org/create-elm-app/-/create-elm-app-4.2.4.tgz";
+      sha512 = "007cbn1hd7hb48mwrn7sg132vj9y0bw17jwgc2fi5m4z8zi24992qqgkdqzqz3bwh7khh1f0y35fzn6va384rlahmwyykxrj62hpl06";
+    };
+    dependencies = [
+      sources."@babel/cli-7.2.3"
+      sources."@babel/code-frame-7.8.3"
+      sources."@babel/core-7.3.4"
+      sources."@babel/generator-7.9.4"
+      sources."@babel/helper-annotate-as-pure-7.8.3"
+      sources."@babel/helper-builder-binary-assignment-operator-visitor-7.8.3"
+      sources."@babel/helper-create-regexp-features-plugin-7.8.8"
+      sources."@babel/helper-define-map-7.8.3"
+      sources."@babel/helper-explode-assignable-expression-7.8.3"
+      sources."@babel/helper-function-name-7.8.3"
+      sources."@babel/helper-get-function-arity-7.8.3"
+      sources."@babel/helper-hoist-variables-7.8.3"
+      sources."@babel/helper-member-expression-to-functions-7.8.3"
+      sources."@babel/helper-module-imports-7.8.3"
+      sources."@babel/helper-module-transforms-7.9.0"
+      sources."@babel/helper-optimise-call-expression-7.8.3"
+      sources."@babel/helper-plugin-utils-7.8.3"
+      sources."@babel/helper-regex-7.8.3"
+      sources."@babel/helper-remap-async-to-generator-7.8.3"
+      sources."@babel/helper-replace-supers-7.8.6"
+      sources."@babel/helper-simple-access-7.8.3"
+      sources."@babel/helper-split-export-declaration-7.8.3"
+      sources."@babel/helper-validator-identifier-7.9.0"
+      sources."@babel/helper-wrap-function-7.8.3"
+      sources."@babel/helpers-7.9.2"
+      sources."@babel/highlight-7.9.0"
+      sources."@babel/parser-7.9.4"
+      sources."@babel/plugin-proposal-async-generator-functions-7.8.3"
+      sources."@babel/plugin-proposal-json-strings-7.8.3"
+      sources."@babel/plugin-proposal-object-rest-spread-7.9.0"
+      sources."@babel/plugin-proposal-optional-catch-binding-7.8.3"
+      sources."@babel/plugin-proposal-unicode-property-regex-7.8.8"
+      sources."@babel/plugin-syntax-async-generators-7.8.4"
+      sources."@babel/plugin-syntax-json-strings-7.8.3"
+      sources."@babel/plugin-syntax-object-rest-spread-7.8.3"
+      sources."@babel/plugin-syntax-optional-catch-binding-7.8.3"
+      sources."@babel/plugin-transform-arrow-functions-7.8.3"
+      sources."@babel/plugin-transform-async-to-generator-7.8.3"
+      sources."@babel/plugin-transform-block-scoped-functions-7.8.3"
+      sources."@babel/plugin-transform-block-scoping-7.8.3"
+      sources."@babel/plugin-transform-classes-7.9.2"
+      sources."@babel/plugin-transform-computed-properties-7.8.3"
+      sources."@babel/plugin-transform-destructuring-7.8.8"
+      sources."@babel/plugin-transform-dotall-regex-7.8.3"
+      sources."@babel/plugin-transform-duplicate-keys-7.8.3"
+      sources."@babel/plugin-transform-exponentiation-operator-7.8.3"
+      sources."@babel/plugin-transform-for-of-7.9.0"
+      sources."@babel/plugin-transform-function-name-7.8.3"
+      sources."@babel/plugin-transform-literals-7.8.3"
+      sources."@babel/plugin-transform-modules-amd-7.9.0"
+      sources."@babel/plugin-transform-modules-commonjs-7.9.0"
+      sources."@babel/plugin-transform-modules-systemjs-7.9.0"
+      sources."@babel/plugin-transform-modules-umd-7.9.0"
+      sources."@babel/plugin-transform-named-capturing-groups-regex-7.8.3"
+      sources."@babel/plugin-transform-new-target-7.8.3"
+      sources."@babel/plugin-transform-object-super-7.8.3"
+      sources."@babel/plugin-transform-parameters-7.9.3"
+      sources."@babel/plugin-transform-regenerator-7.8.7"
+      sources."@babel/plugin-transform-runtime-7.3.4"
+      sources."@babel/plugin-transform-shorthand-properties-7.8.3"
+      sources."@babel/plugin-transform-spread-7.8.3"
+      sources."@babel/plugin-transform-sticky-regex-7.8.3"
+      sources."@babel/plugin-transform-template-literals-7.8.3"
+      sources."@babel/plugin-transform-typeof-symbol-7.8.4"
+      sources."@babel/plugin-transform-unicode-regex-7.8.3"
+      sources."@babel/preset-env-7.3.4"
+      (sources."@babel/runtime-7.3.4" // {
+        dependencies = [
+          sources."regenerator-runtime-0.12.1"
+        ];
+      })
+      sources."@babel/template-7.8.6"
+      sources."@babel/traverse-7.9.0"
+      sources."@babel/types-7.9.0"
+      sources."@hapi/address-2.1.4"
+      sources."@hapi/bourne-1.3.2"
+      sources."@hapi/hoek-8.5.1"
+      sources."@hapi/joi-15.1.1"
+      sources."@hapi/topo-3.1.6"
+      sources."@mrmlnc/readdir-enhanced-2.2.1"
+      sources."@nodelib/fs.stat-1.1.3"
+      sources."@types/anymatch-1.3.1"
+      sources."@types/color-name-1.1.1"
+      sources."@types/events-3.0.0"
+      sources."@types/glob-7.1.1"
+      sources."@types/html-minifier-terser-5.0.0"
+      sources."@types/minimatch-3.0.3"
+      sources."@types/node-13.11.0"
+      sources."@types/q-1.5.2"
+      sources."@types/source-list-map-0.1.2"
+      sources."@types/tapable-1.0.5"
+      (sources."@types/uglify-js-3.0.5" // {
+        dependencies = [
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."@types/webpack-4.41.10" // {
+        dependencies = [
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."@types/webpack-sources-0.1.7" // {
+        dependencies = [
+          sources."source-map-0.6.1"
+        ];
+      })
+      sources."@webassemblyjs/ast-1.9.0"
+      sources."@webassemblyjs/floating-point-hex-parser-1.9.0"
+      sources."@webassemblyjs/helper-api-error-1.9.0"
+      sources."@webassemblyjs/helper-buffer-1.9.0"
+      sources."@webassemblyjs/helper-code-frame-1.9.0"
+      sources."@webassemblyjs/helper-fsm-1.9.0"
+      sources."@webassemblyjs/helper-module-context-1.9.0"
+      sources."@webassemblyjs/helper-wasm-bytecode-1.9.0"
+      sources."@webassemblyjs/helper-wasm-section-1.9.0"
+      sources."@webassemblyjs/ieee754-1.9.0"
+      sources."@webassemblyjs/leb128-1.9.0"
+      sources."@webassemblyjs/utf8-1.9.0"
+      sources."@webassemblyjs/wasm-edit-1.9.0"
+      sources."@webassemblyjs/wasm-gen-1.9.0"
+      sources."@webassemblyjs/wasm-opt-1.9.0"
+      sources."@webassemblyjs/wasm-parser-1.9.0"
+      sources."@webassemblyjs/wast-parser-1.9.0"
+      sources."@webassemblyjs/wast-printer-1.9.0"
+      sources."@xtuc/ieee754-1.2.0"
+      sources."@xtuc/long-4.2.2"
+      sources."accepts-1.3.7"
+      sources."acorn-6.4.1"
+      sources."address-1.0.3"
+      sources."ajv-6.12.0"
+      sources."ajv-errors-1.0.1"
+      sources."ajv-keywords-3.4.1"
+      sources."alphanum-sort-1.0.2"
+      sources."ansi-colors-3.2.4"
+      sources."ansi-escapes-3.2.0"
+      sources."ansi-html-0.0.7"
+      sources."ansi-regex-2.1.1"
+      sources."ansi-styles-3.2.1"
+      sources."anymatch-3.1.1"
+      sources."aproba-1.2.0"
+      sources."argparse-1.0.10"
+      sources."arr-diff-4.0.0"
+      sources."arr-flatten-1.1.0"
+      sources."arr-union-3.1.0"
+      sources."array-filter-0.0.1"
+      sources."array-flatten-2.1.2"
+      sources."array-map-0.0.0"
+      sources."array-reduce-0.0.0"
+      sources."array-union-1.0.2"
+      sources."array-uniq-1.0.3"
+      sources."array-unique-0.3.2"
+      sources."asap-2.0.6"
+      sources."asn1-0.2.4"
+      sources."asn1.js-4.10.1"
+      (sources."assert-1.5.0" // {
+        dependencies = [
+          sources."inherits-2.0.1"
+          sources."util-0.10.3"
+        ];
+      })
+      sources."assert-plus-1.0.0"
+      (sources."assets-webpack-plugin-3.9.12" // {
+        dependencies = [
+          sources."mkdirp-0.5.3"
+        ];
+      })
+      sources."assign-symbols-1.0.0"
+      sources."async-0.9.2"
+      sources."async-each-1.0.3"
+      sources."async-limiter-1.0.1"
+      sources."asynckit-0.4.0"
+      sources."atob-2.1.2"
+      (sources."autoprefixer-8.6.5" // {
+        dependencies = [
+          sources."browserslist-3.2.8"
+        ];
+      })
+      sources."aws-sign2-0.7.0"
+      sources."aws4-1.9.1"
+      sources."babel-extract-comments-1.0.0"
+      sources."babel-loader-8.0.4"
+      sources."babel-plugin-dynamic-import-node-2.3.0"
+      sources."babel-plugin-syntax-object-rest-spread-6.13.0"
+      sources."babel-plugin-transform-object-rest-spread-6.26.0"
+      (sources."babel-runtime-6.26.0" // {
+        dependencies = [
+          sources."regenerator-runtime-0.11.1"
+        ];
+      })
+      sources."babylon-6.18.0"
+      sources."balanced-match-1.0.0"
+      (sources."base-0.11.2" // {
+        dependencies = [
+          sources."define-property-1.0.0"
+        ];
+      })
+      sources."base64-js-1.3.1"
+      sources."batch-0.6.1"
+      sources."bcrypt-pbkdf-1.0.2"
+      sources."big.js-5.2.2"
+      sources."binary-0.3.0"
+      sources."binary-extensions-2.0.0"
+      sources."bindings-1.5.0"
+      sources."binwrap-0.2.2"
+      sources."bluebird-3.7.2"
+      sources."bn.js-4.11.8"
+      (sources."body-parser-1.19.0" // {
+        dependencies = [
+          sources."bytes-3.1.0"
+          sources."debug-2.6.9"
+          sources."ms-2.0.0"
+          sources."qs-6.7.0"
+        ];
+      })
+      (sources."bonjour-3.5.0" // {
+        dependencies = [
+          sources."deep-equal-1.1.1"
+        ];
+      })
+      sources."boolbase-1.0.0"
+      sources."brace-expansion-1.1.11"
+      sources."braces-3.0.2"
+      sources."brorand-1.1.0"
+      sources."browserify-aes-1.2.0"
+      sources."browserify-cipher-1.0.1"
+      sources."browserify-des-1.0.2"
+      sources."browserify-rsa-4.0.1"
+      sources."browserify-sign-4.0.4"
+      sources."browserify-zlib-0.2.0"
+      sources."browserslist-4.11.1"
+      sources."buffer-4.9.2"
+      sources."buffer-from-1.1.1"
+      sources."buffer-indexof-1.1.1"
+      sources."buffer-xor-1.0.3"
+      sources."buffers-0.1.1"
+      sources."builtin-status-codes-3.0.0"
+      sources."bytes-3.0.0"
+      sources."cacache-12.0.4"
+      sources."cache-base-1.0.1"
+      sources."call-me-maybe-1.0.1"
+      sources."caller-callsite-2.0.0"
+      sources."caller-path-2.0.0"
+      sources."callsites-2.0.0"
+      sources."camel-case-4.1.1"
+      sources."camelcase-5.3.1"
+      sources."caniuse-api-3.0.0"
+      sources."caniuse-lite-1.0.30001039"
+      sources."case-sensitive-paths-webpack-plugin-2.3.0"
+      sources."caseless-0.12.0"
+      sources."chainsaw-0.1.0"
+      (sources."chalk-2.4.2" // {
+        dependencies = [
+          sources."escape-string-regexp-1.0.5"
+        ];
+      })
+      sources."chardet-0.7.0"
+      (sources."chokidar-3.3.0" // {
+        dependencies = [
+          sources."glob-parent-5.1.1"
+        ];
+      })
+      sources."chownr-1.1.4"
+      sources."chrome-trace-event-1.0.2"
+      sources."cipher-base-1.0.4"
+      (sources."class-utils-0.3.6" // {
+        dependencies = [
+          sources."define-property-0.2.5"
+          (sources."is-accessor-descriptor-0.1.6" // {
+            dependencies = [
+              sources."kind-of-3.2.2"
+            ];
+          })
+          (sources."is-data-descriptor-0.1.4" // {
+            dependencies = [
+              sources."kind-of-3.2.2"
+            ];
+          })
+          sources."is-descriptor-0.1.6"
+          sources."kind-of-5.1.0"
+        ];
+      })
+      (sources."clean-css-4.2.3" // {
+        dependencies = [
+          sources."source-map-0.6.1"
+        ];
+      })
+      sources."cli-cursor-2.1.0"
+      sources."cli-table-0.3.1"
+      sources."cli-width-2.2.0"
+      (sources."cliui-3.2.0" // {
+        dependencies = [
+          sources."strip-ansi-3.0.1"
+        ];
+      })
+      sources."coa-2.0.2"
+      sources."code-point-at-1.1.0"
+      sources."collection-visit-1.0.0"
+      sources."color-3.1.2"
+      sources."color-convert-1.9.3"
+      sources."color-name-1.1.3"
+      sources."color-string-1.5.3"
+      sources."colors-1.0.3"
+      sources."combined-stream-1.0.8"
+      sources."commander-2.20.3"
+      sources."common-tags-1.8.0"
+      sources."commondir-1.0.1"
+      sources."component-emitter-1.3.0"
+      sources."compressible-2.0.18"
+      (sources."compression-1.7.4" // {
+        dependencies = [
+          sources."debug-2.6.9"
+          sources."ms-2.0.0"
+        ];
+      })
+      sources."concat-map-0.0.1"
+      sources."concat-stream-1.6.2"
+      sources."connect-history-api-fallback-1.6.0"
+      sources."console-browserify-1.2.0"
+      sources."constants-browserify-1.0.0"
+      sources."content-disposition-0.5.3"
+      sources."content-type-1.0.4"
+      sources."convert-source-map-1.7.0"
+      sources."cookie-0.4.0"
+      sources."cookie-signature-1.0.6"
+      sources."copy-concurrently-1.0.5"
+      sources."copy-descriptor-0.1.1"
+      (sources."copy-webpack-plugin-5.1.1" // {
+        dependencies = [
+          sources."find-cache-dir-2.1.0"
+          sources."find-up-3.0.0"
+          sources."locate-path-3.0.0"
+          sources."make-dir-2.1.0"
+          sources."p-limit-2.2.2"
+          sources."p-locate-3.0.0"
+          sources."p-try-2.2.0"
+          sources."pify-4.0.1"
+          sources."pkg-dir-3.0.0"
+        ];
+      })
+      sources."core-js-2.6.11"
+      sources."core-util-is-1.0.2"
+      sources."cosmiconfig-5.2.1"
+      sources."create-ecdh-4.0.3"
+      sources."create-hash-1.2.0"
+      sources."create-hmac-1.1.7"
+      sources."cross-spawn-6.0.5"
+      sources."crypto-browserify-3.12.0"
+      sources."css-color-names-0.0.4"
+      (sources."css-declaration-sorter-4.0.1" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."css-loader-3.4.2" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."postcss-value-parser-4.0.3"
+          sources."schema-utils-2.6.5"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      sources."css-select-1.2.0"
+      sources."css-select-base-adapter-0.1.1"
+      (sources."css-tree-1.0.0-alpha.37" // {
+        dependencies = [
+          sources."source-map-0.6.1"
+        ];
+      })
+      sources."css-what-2.1.3"
+      sources."cssesc-3.0.0"
+      (sources."cssnano-4.1.10" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."cssnano-preset-default-4.0.7" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      sources."cssnano-util-get-arguments-4.0.0"
+      sources."cssnano-util-get-match-4.0.0"
+      (sources."cssnano-util-raw-cache-4.0.1" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      sources."cssnano-util-same-parent-4.0.1"
+      (sources."csso-4.0.3" // {
+        dependencies = [
+          sources."css-tree-1.0.0-alpha.39"
+          sources."mdn-data-2.0.6"
+          sources."source-map-0.6.1"
+        ];
+      })
+      sources."cycle-1.0.3"
+      sources."cyclist-1.0.1"
+      sources."dashdash-1.14.1"
+      sources."debug-4.1.1"
+      sources."decamelize-1.2.0"
+      sources."decode-uri-component-0.2.0"
+      sources."deep-equal-0.2.2"
+      sources."default-gateway-4.2.0"
+      sources."define-properties-1.1.3"
+      sources."define-property-2.0.2"
+      (sources."del-4.1.1" // {
+        dependencies = [
+          (sources."globby-6.1.0" // {
+            dependencies = [
+              sources."pify-2.3.0"
+            ];
+          })
+          sources."pify-4.0.1"
+        ];
+      })
+      sources."delayed-stream-1.0.0"
+      sources."depd-1.1.2"
+      sources."des.js-1.0.1"
+      sources."destroy-1.0.4"
+      sources."detect-node-2.0.4"
+      (sources."detect-port-alt-1.1.6" // {
+        dependencies = [
+          sources."debug-2.6.9"
+          sources."ms-2.0.0"
+        ];
+      })
+      sources."diffie-hellman-5.0.3"
+      sources."dir-glob-2.2.2"
+      sources."dns-equal-1.0.0"
+      sources."dns-packet-1.3.1"
+      sources."dns-txt-2.0.2"
+      sources."dom-converter-0.2.0"
+      (sources."dom-serializer-0.2.2" // {
+        dependencies = [
+          sources."domelementtype-2.0.1"
+        ];
+      })
+      sources."domain-browser-1.2.0"
+      sources."domelementtype-1.3.1"
+      sources."domhandler-2.4.2"
+      sources."domutils-1.5.1"
+      sources."dot-case-3.0.3"
+      sources."dot-prop-5.2.0"
+      sources."dotenv-5.0.1"
+      sources."duplexer-0.1.1"
+      sources."duplexify-3.7.1"
+      sources."ecc-jsbn-0.1.2"
+      sources."ee-first-1.1.1"
+      sources."electron-to-chromium-1.3.397"
+      sources."elliptic-6.5.2"
+      sources."elm-0.19.1-3"
+      sources."elm-asset-webpack-loader-1.1.2"
+      sources."elm-hot-1.1.4"
+      sources."elm-hot-webpack-loader-1.1.6"
+      (sources."elm-test-0.19.1-revision2" // {
+        dependencies = [
+          sources."ansi-styles-4.2.1"
+          sources."chalk-3.0.0"
+          sources."color-convert-2.0.1"
+          sources."color-name-1.1.4"
+          sources."cross-spawn-7.0.1"
+          sources."fs-extra-8.1.0"
+          sources."has-flag-4.0.0"
+          sources."path-key-3.1.1"
+          sources."shebang-command-2.0.0"
+          sources."shebang-regex-3.0.0"
+          sources."supports-color-7.1.0"
+          sources."which-2.0.1"
+        ];
+      })
+      sources."elm-webpack-loader-6.0.0"
+      sources."elmi-to-json-1.3.0"
+      sources."emojis-list-3.0.0"
+      sources."encodeurl-1.0.2"
+      sources."end-of-stream-1.4.4"
+      (sources."enhanced-resolve-4.1.1" // {
+        dependencies = [
+          sources."memory-fs-0.5.0"
+        ];
+      })
+      sources."entities-2.0.0"
+      sources."errno-0.1.7"
+      sources."error-ex-1.3.2"
+      sources."es-abstract-1.17.5"
+      sources."es-to-primitive-1.2.1"
+      sources."escape-html-1.0.3"
+      sources."escape-string-regexp-2.0.0"
+      sources."eslint-scope-4.0.3"
+      sources."esprima-4.0.1"
+      sources."esrecurse-4.2.1"
+      sources."estraverse-4.3.0"
+      sources."etag-1.8.1"
+      sources."eventemitter3-4.0.0"
+      sources."events-3.1.0"
+      sources."eventsource-0.1.6"
+      sources."evp_bytestokey-1.0.3"
+      sources."execa-1.0.0"
+      (sources."expand-brackets-2.1.4" // {
+        dependencies = [
+          sources."debug-2.6.9"
+          sources."define-property-0.2.5"
+          sources."extend-shallow-2.0.1"
+          (sources."is-accessor-descriptor-0.1.6" // {
+            dependencies = [
+              sources."kind-of-3.2.2"
+            ];
+          })
+          (sources."is-data-descriptor-0.1.4" // {
+            dependencies = [
+              sources."kind-of-3.2.2"
+            ];
+          })
+          sources."is-descriptor-0.1.6"
+          sources."kind-of-5.1.0"
+          sources."ms-2.0.0"
+        ];
+      })
+      sources."expand-tilde-2.0.2"
+      (sources."express-4.17.1" // {
+        dependencies = [
+          sources."array-flatten-1.1.1"
+          sources."debug-2.6.9"
+          sources."ms-2.0.0"
+          sources."qs-6.7.0"
+        ];
+      })
+      sources."extend-3.0.2"
+      (sources."extend-shallow-3.0.2" // {
+        dependencies = [
+          sources."is-extendable-1.0.1"
+        ];
+      })
+      sources."external-editor-3.1.0"
+      (sources."extglob-2.0.4" // {
+        dependencies = [
+          sources."define-property-1.0.0"
+          sources."extend-shallow-2.0.1"
+        ];
+      })
+      sources."extsprintf-1.3.0"
+      sources."eyes-0.1.8"
+      sources."fast-deep-equal-3.1.1"
+      (sources."fast-glob-2.2.7" // {
+        dependencies = [
+          (sources."braces-2.3.2" // {
+            dependencies = [
+              sources."extend-shallow-2.0.1"
+            ];
+          })
+          (sources."fill-range-4.0.0" // {
+            dependencies = [
+              sources."extend-shallow-2.0.1"
+            ];
+          })
+          (sources."is-number-3.0.0" // {
+            dependencies = [
+              sources."kind-of-3.2.2"
+            ];
+          })
+          sources."micromatch-3.1.10"
+          sources."to-regex-range-2.1.1"
+        ];
+      })
+      sources."fast-json-stable-stringify-2.1.0"
+      sources."faye-websocket-0.11.3"
+      sources."figgy-pudding-3.5.2"
+      (sources."figures-2.0.0" // {
+        dependencies = [
+          sources."escape-string-regexp-1.0.5"
+        ];
+      })
+      (sources."file-loader-1.1.11" // {
+        dependencies = [
+          sources."schema-utils-0.4.7"
+        ];
+      })
+      sources."file-uri-to-path-1.0.0"
+      sources."filesize-3.6.1"
+      sources."fill-range-7.0.1"
+      (sources."finalhandler-1.1.2" // {
+        dependencies = [
+          sources."debug-2.6.9"
+          sources."ms-2.0.0"
+        ];
+      })
+      sources."find-cache-dir-1.0.0"
+      (sources."find-elm-dependencies-2.0.2" // {
+        dependencies = [
+          sources."firstline-1.2.0"
+        ];
+      })
+      sources."find-parent-dir-0.3.0"
+      sources."find-up-2.1.0"
+      sources."firstline-2.0.2"
+      sources."flush-write-stream-1.1.1"
+      (sources."follow-redirects-1.11.0" // {
+        dependencies = [
+          sources."debug-3.2.6"
+        ];
+      })
+      sources."for-in-1.0.2"
+      sources."forever-agent-0.6.1"
+      sources."form-data-2.3.3"
+      sources."forwarded-0.1.2"
+      sources."fragment-cache-0.2.1"
+      sources."fresh-0.5.2"
+      sources."from2-2.3.0"
+      sources."fs-extra-6.0.1"
+      sources."fs-minipass-1.2.7"
+      sources."fs-readdir-recursive-1.1.0"
+      sources."fs-write-stream-atomic-1.0.10"
+      sources."fs.realpath-1.0.0"
+      sources."fsevents-2.1.2"
+      sources."function-bind-1.1.1"
+      sources."get-caller-file-1.0.3"
+      sources."get-own-enumerable-property-symbols-3.0.2"
+      sources."get-stream-4.1.0"
+      sources."get-value-2.0.6"
+      sources."getpass-0.1.7"
+      sources."glob-7.1.6"
+      (sources."glob-parent-3.1.0" // {
+        dependencies = [
+          sources."is-glob-3.1.0"
+        ];
+      })
+      sources."glob-to-regexp-0.3.0"
+      sources."global-modules-1.0.0"
+      sources."global-prefix-1.0.2"
+      sources."globals-11.12.0"
+      (sources."globby-7.1.1" // {
+        dependencies = [
+          sources."slash-1.0.0"
+        ];
+      })
+      sources."graceful-fs-4.2.3"
+      sources."gzip-size-5.0.0"
+      sources."handle-thing-2.0.1"
+      sources."har-schema-2.0.0"
+      sources."har-validator-5.1.3"
+      sources."has-1.0.3"
+      sources."has-flag-3.0.0"
+      sources."has-symbols-1.0.1"
+      sources."has-value-1.0.0"
+      (sources."has-values-1.0.0" // {
+        dependencies = [
+          (sources."is-number-3.0.0" // {
+            dependencies = [
+              sources."kind-of-3.2.2"
+            ];
+          })
+          sources."kind-of-4.0.0"
+        ];
+      })
+      sources."hash-base-3.0.4"
+      sources."hash.js-1.1.7"
+      sources."he-1.2.0"
+      sources."hex-color-regex-1.1.0"
+      sources."hmac-drbg-1.0.1"
+      sources."homedir-polyfill-1.0.3"
+      sources."hosted-git-info-2.8.8"
+      sources."hpack.js-2.1.6"
+      sources."hsl-regex-1.0.0"
+      sources."hsla-regex-1.0.0"
+      sources."html-comment-regex-1.1.2"
+      sources."html-entities-1.2.1"
+      (sources."html-minifier-terser-5.0.5" // {
+        dependencies = [
+          sources."commander-4.1.1"
+        ];
+      })
+      (sources."html-webpack-plugin-4.0.4" // {
+        dependencies = [
+          sources."util.promisify-1.0.0"
+        ];
+      })
+      (sources."htmlparser2-3.10.1" // {
+        dependencies = [
+          sources."entities-1.1.2"
+          sources."readable-stream-3.6.0"
+        ];
+      })
+      sources."http-deceiver-1.2.7"
+      (sources."http-errors-1.7.2" // {
+        dependencies = [
+          sources."inherits-2.0.3"
+        ];
+      })
+      sources."http-parser-js-0.4.10"
+      sources."http-proxy-1.18.0"
+      sources."http-proxy-middleware-0.20.0"
+      sources."http-signature-1.2.0"
+      sources."https-browserify-1.0.0"
+      sources."i-0.3.6"
+      sources."iconv-lite-0.4.24"
+      (sources."icss-utils-4.1.1" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      sources."ieee754-1.1.13"
+      sources."iferr-0.1.5"
+      sources."ignore-3.3.10"
+      sources."immer-1.7.2"
+      sources."import-fresh-2.0.0"
+      (sources."import-local-2.0.0" // {
+        dependencies = [
+          sources."find-up-3.0.0"
+          sources."locate-path-3.0.0"
+          sources."p-limit-2.2.2"
+          sources."p-locate-3.0.0"
+          sources."p-try-2.2.0"
+          sources."pkg-dir-3.0.0"
+        ];
+      })
+      sources."imurmurhash-0.1.4"
+      sources."indexes-of-1.0.1"
+      sources."infer-owner-1.0.4"
+      sources."inflight-1.0.6"
+      sources."inherits-2.0.4"
+      sources."ini-1.3.5"
+      (sources."inquirer-6.2.0" // {
+        dependencies = [
+          sources."ansi-regex-3.0.0"
+          sources."is-fullwidth-code-point-2.0.0"
+          sources."mute-stream-0.0.7"
+          sources."string-width-2.1.1"
+          sources."strip-ansi-4.0.0"
+        ];
+      })
+      sources."internal-ip-4.3.0"
+      sources."invariant-2.2.4"
+      sources."invert-kv-1.0.0"
+      sources."ip-1.1.5"
+      sources."ip-regex-2.1.0"
+      sources."ipaddr.js-1.9.1"
+      sources."is-absolute-url-2.1.0"
+      sources."is-accessor-descriptor-1.0.0"
+      sources."is-arguments-1.0.4"
+      sources."is-arrayish-0.2.1"
+      sources."is-binary-path-2.1.0"
+      sources."is-buffer-1.1.6"
+      sources."is-callable-1.1.5"
+      sources."is-color-stop-1.1.0"
+      sources."is-data-descriptor-1.0.0"
+      sources."is-date-object-1.0.2"
+      sources."is-descriptor-1.0.2"
+      sources."is-directory-0.3.1"
+      sources."is-extendable-0.1.1"
+      sources."is-extglob-2.1.1"
+      sources."is-fullwidth-code-point-1.0.0"
+      sources."is-glob-4.0.1"
+      sources."is-number-7.0.0"
+      sources."is-obj-2.0.0"
+      sources."is-path-cwd-2.2.0"
+      sources."is-path-in-cwd-2.1.0"
+      sources."is-path-inside-2.1.0"
+      sources."is-plain-obj-1.1.0"
+      sources."is-plain-object-2.0.4"
+      sources."is-promise-2.1.0"
+      sources."is-regex-1.0.5"
+      sources."is-regexp-1.0.0"
+      sources."is-resolvable-1.1.0"
+      sources."is-root-2.0.0"
+      sources."is-stream-1.1.0"
+      sources."is-svg-3.0.0"
+      sources."is-symbol-1.0.3"
+      sources."is-typedarray-1.0.0"
+      sources."is-utf8-0.2.1"
+      sources."is-windows-1.0.2"
+      sources."is-wsl-1.1.0"
+      sources."isarray-1.0.0"
+      sources."isexe-2.0.0"
+      sources."isobject-3.0.1"
+      sources."isstream-0.1.2"
+      sources."js-levenshtein-1.1.6"
+      sources."js-tokens-4.0.0"
+      sources."js-yaml-3.13.1"
+      sources."jsbn-0.1.1"
+      sources."jsesc-2.5.2"
+      sources."json-parse-better-errors-1.0.2"
+      sources."json-schema-0.2.3"
+      sources."json-schema-traverse-0.4.1"
+      sources."json-stable-stringify-1.0.1"
+      sources."json-stringify-safe-5.0.1"
+      sources."json3-3.3.3"
+      sources."json5-2.1.2"
+      sources."jsonfile-4.0.0"
+      sources."jsonify-0.0.0"
+      sources."jsprim-1.4.1"
+      sources."killable-1.0.1"
+      sources."kind-of-6.0.3"
+      sources."last-call-webpack-plugin-3.0.0"
+      sources."lcid-1.0.0"
+      (sources."load-json-file-1.1.0" // {
+        dependencies = [
+          sources."parse-json-2.2.0"
+          sources."pify-2.3.0"
+        ];
+      })
+      sources."loader-runner-2.4.0"
+      (sources."loader-utils-1.4.0" // {
+        dependencies = [
+          sources."json5-1.0.1"
+        ];
+      })
+      sources."locate-path-2.0.0"
+      sources."lodash-4.17.15"
+      sources."lodash._reinterpolate-3.0.0"
+      sources."lodash.memoize-4.1.2"
+      sources."lodash.template-4.5.0"
+      sources."lodash.templatesettings-4.2.0"
+      sources."lodash.uniq-4.5.0"
+      sources."loglevel-1.6.7"
+      sources."loose-envify-1.4.0"
+      sources."lower-case-2.0.1"
+      sources."lru-cache-5.1.1"
+      sources."make-dir-1.3.0"
+      sources."map-age-cleaner-0.1.3"
+      sources."map-cache-0.2.2"
+      sources."map-visit-1.0.0"
+      sources."md5.js-1.3.5"
+      sources."mdn-data-2.0.4"
+      sources."media-typer-0.3.0"
+      (sources."mem-4.3.0" // {
+        dependencies = [
+          sources."mimic-fn-2.1.0"
+        ];
+      })
+      sources."memory-fs-0.4.1"
+      sources."merge-descriptors-1.0.1"
+      sources."merge2-1.3.0"
+      sources."methods-1.1.2"
+      sources."micromatch-4.0.2"
+      sources."miller-rabin-4.0.1"
+      sources."mime-2.4.4"
+      sources."mime-db-1.43.0"
+      sources."mime-types-2.1.26"
+      sources."mimic-fn-1.2.0"
+      sources."mini-css-extract-plugin-0.4.5"
+      sources."minimalistic-assert-1.0.1"
+      sources."minimalistic-crypto-utils-1.0.1"
+      sources."minimatch-3.0.4"
+      sources."minimist-1.2.5"
+      sources."minipass-2.9.0"
+      sources."minizlib-1.3.3"
+      sources."mississippi-3.0.0"
+      (sources."mixin-deep-1.3.2" // {
+        dependencies = [
+          sources."is-extendable-1.0.1"
+        ];
+      })
+      sources."mkdirp-0.5.5"
+      sources."move-concurrently-1.0.1"
+      sources."ms-2.1.2"
+      sources."multicast-dns-6.2.3"
+      sources."multicast-dns-service-types-1.1.0"
+      sources."murmur-hash-js-1.0.0"
+      sources."mustache-3.2.1"
+      sources."mute-stream-0.0.8"
+      sources."nan-2.14.0"
+      sources."nanomatch-1.2.13"
+      sources."ncp-1.0.1"
+      sources."negotiator-0.6.2"
+      sources."neo-async-2.6.1"
+      sources."nice-try-1.0.5"
+      sources."no-case-3.0.3"
+      sources."node-elm-compiler-5.0.4"
+      sources."node-forge-0.9.0"
+      (sources."node-libs-browser-2.2.1" // {
+        dependencies = [
+          sources."punycode-1.4.1"
+        ];
+      })
+      sources."node-releases-1.1.53"
+      sources."normalize-package-data-2.5.0"
+      sources."normalize-path-3.0.0"
+      sources."normalize-range-0.1.2"
+      sources."normalize-url-3.3.0"
+      sources."npm-run-path-2.0.2"
+      sources."nth-check-1.0.2"
+      sources."num2fraction-1.2.2"
+      sources."number-is-nan-1.0.1"
+      sources."oauth-sign-0.9.0"
+      sources."object-assign-4.1.1"
+      (sources."object-copy-0.1.0" // {
+        dependencies = [
+          sources."define-property-0.2.5"
+          sources."is-accessor-descriptor-0.1.6"
+          sources."is-data-descriptor-0.1.4"
+          (sources."is-descriptor-0.1.6" // {
+            dependencies = [
+              sources."kind-of-5.1.0"
+            ];
+          })
+          sources."kind-of-3.2.2"
+        ];
+      })
+      sources."object-inspect-1.7.0"
+      sources."object-is-1.0.2"
+      sources."object-keys-1.1.1"
+      sources."object-visit-1.0.1"
+      sources."object.assign-4.1.0"
+      sources."object.entries-1.1.1"
+      sources."object.getownpropertydescriptors-2.1.0"
+      sources."object.pick-1.3.0"
+      sources."object.values-1.1.1"
+      sources."obuf-1.1.2"
+      sources."on-finished-2.3.0"
+      sources."on-headers-1.0.2"
+      sources."once-1.4.0"
+      sources."onetime-2.0.1"
+      sources."opn-5.4.0"
+      sources."optimize-css-assets-webpack-plugin-5.0.3"
+      sources."original-1.0.2"
+      sources."os-browserify-0.3.0"
+      sources."os-homedir-1.0.2"
+      sources."os-locale-1.4.0"
+      sources."os-tmpdir-1.0.2"
+      sources."output-file-sync-2.0.1"
+      sources."p-defer-1.0.0"
+      sources."p-finally-1.0.0"
+      sources."p-is-promise-2.1.0"
+      sources."p-limit-1.3.0"
+      sources."p-locate-2.0.0"
+      sources."p-map-2.1.0"
+      sources."p-retry-3.0.1"
+      sources."p-try-1.0.0"
+      sources."pako-1.0.11"
+      sources."parallel-transform-1.2.0"
+      sources."param-case-3.0.3"
+      sources."parse-asn1-5.1.5"
+      sources."parse-json-4.0.0"
+      sources."parse-passwd-1.0.0"
+      sources."parseurl-1.3.3"
+      sources."pascal-case-3.1.1"
+      sources."pascalcase-0.1.1"
+      sources."path-browserify-0.0.1"
+      sources."path-dirname-1.0.2"
+      sources."path-exists-3.0.0"
+      sources."path-is-absolute-1.0.1"
+      sources."path-is-inside-1.0.2"
+      sources."path-key-2.0.1"
+      sources."path-parse-1.0.6"
+      sources."path-to-regexp-0.1.7"
+      sources."path-type-3.0.0"
+      sources."pbkdf2-3.0.17"
+      sources."performance-now-2.1.0"
+      sources."picomatch-2.2.2"
+      sources."pify-3.0.0"
+      sources."pinkie-2.0.4"
+      sources."pinkie-promise-2.0.1"
+      sources."pkg-dir-2.0.0"
+      sources."pkg-up-2.0.0"
+      sources."pkginfo-0.4.1"
+      (sources."portfinder-1.0.25" // {
+        dependencies = [
+          sources."async-2.6.3"
+          sources."debug-3.2.6"
+        ];
+      })
+      sources."posix-character-classes-0.1.1"
+      (sources."postcss-6.0.23" // {
+        dependencies = [
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."postcss-calc-7.0.2" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."postcss-value-parser-4.0.3"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-colormin-4.0.3" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-convert-values-4.0.1" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-discard-comments-4.0.2" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-discard-duplicates-4.0.2" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-discard-empty-4.0.1" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-discard-overridden-4.0.1" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      sources."postcss-flexbugs-fixes-3.3.1"
+      (sources."postcss-load-config-1.2.0" // {
+        dependencies = [
+          sources."cosmiconfig-2.2.2"
+          sources."parse-json-2.2.0"
+        ];
+      })
+      (sources."postcss-load-options-1.2.0" // {
+        dependencies = [
+          sources."cosmiconfig-2.2.2"
+          sources."parse-json-2.2.0"
+        ];
+      })
+      (sources."postcss-load-plugins-2.3.0" // {
+        dependencies = [
+          sources."cosmiconfig-2.2.2"
+          sources."parse-json-2.2.0"
+        ];
+      })
+      (sources."postcss-loader-2.1.5" // {
+        dependencies = [
+          sources."schema-utils-0.4.7"
+        ];
+      })
+      (sources."postcss-merge-longhand-4.0.11" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-merge-rules-4.0.3" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."postcss-selector-parser-3.1.2"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-minify-font-values-4.0.2" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-minify-gradients-4.0.2" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-minify-params-4.0.2" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-minify-selectors-4.0.2" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."postcss-selector-parser-3.1.2"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-modules-extract-imports-2.0.0" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-modules-local-by-default-3.0.2" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."postcss-value-parser-4.0.3"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-modules-scope-2.2.0" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-modules-values-3.0.0" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-normalize-charset-4.0.1" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-normalize-display-values-4.0.2" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-normalize-positions-4.0.2" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-normalize-repeat-style-4.0.2" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-normalize-string-4.0.2" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-normalize-timing-functions-4.0.2" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-normalize-unicode-4.0.1" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-normalize-url-4.0.1" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-normalize-whitespace-4.0.2" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-ordered-values-4.1.2" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-reduce-initial-4.0.3" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-reduce-transforms-4.0.2" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-safe-parser-4.0.2" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      sources."postcss-selector-parser-6.0.2"
+      (sources."postcss-svgo-4.0.2" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      (sources."postcss-unique-selectors-4.0.1" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      sources."postcss-value-parser-3.3.1"
+      sources."pretty-bytes-5.3.0"
+      sources."pretty-error-2.1.1"
+      sources."private-0.1.8"
+      sources."process-0.11.10"
+      sources."process-nextick-args-2.0.1"
+      sources."promise-8.1.0"
+      sources."promise-inflight-1.0.1"
+      (sources."prompt-1.0.0" // {
+        dependencies = [
+          sources."colors-1.4.0"
+        ];
+      })
+      sources."proxy-addr-2.0.6"
+      sources."prr-1.0.1"
+      sources."pseudomap-1.0.2"
+      sources."psl-1.8.0"
+      sources."public-encrypt-4.0.3"
+      sources."pump-3.0.0"
+      (sources."pumpify-1.5.1" // {
+        dependencies = [
+          sources."pump-2.0.1"
+        ];
+      })
+      sources."punycode-2.1.1"
+      sources."q-1.5.1"
+      sources."qs-6.5.2"
+      sources."querystring-0.2.0"
+      sources."querystring-es3-0.2.1"
+      sources."querystringify-2.1.1"
+      sources."randombytes-2.1.0"
+      sources."randomfill-1.0.4"
+      sources."range-parser-1.2.1"
+      (sources."raw-body-2.4.0" // {
+        dependencies = [
+          sources."bytes-3.1.0"
+        ];
+      })
+      (sources."react-dev-utils-6.1.1" // {
+        dependencies = [
+          sources."@babel/code-frame-7.0.0"
+          sources."ansi-regex-3.0.0"
+          sources."big.js-3.2.0"
+          sources."browserslist-4.1.1"
+          sources."chalk-2.4.1"
+          sources."debug-2.6.9"
+          sources."emojis-list-2.1.0"
+          sources."escape-string-regexp-1.0.5"
+          sources."find-up-3.0.0"
+          sources."globby-8.0.1"
+          sources."json5-0.5.1"
+          sources."loader-utils-1.1.0"
+          sources."locate-path-3.0.0"
+          sources."ms-2.0.0"
+          sources."p-limit-2.2.2"
+          sources."p-locate-3.0.0"
+          sources."p-try-2.2.0"
+          sources."react-error-overlay-5.1.6"
+          sources."slash-1.0.0"
+          sources."sockjs-client-1.1.5"
+          sources."strip-ansi-4.0.0"
+        ];
+      })
+      sources."react-error-overlay-4.0.1"
+      sources."read-1.0.7"
+      (sources."read-pkg-1.1.0" // {
+        dependencies = [
+          sources."path-type-1.1.0"
+          sources."pify-2.3.0"
+        ];
+      })
+      (sources."read-pkg-up-1.0.1" // {
+        dependencies = [
+          sources."find-up-1.1.2"
+          sources."path-exists-2.1.0"
+        ];
+      })
+      sources."readable-stream-2.3.7"
+      sources."readdirp-3.2.0"
+      sources."recursive-readdir-2.2.2"
+      sources."regenerate-1.4.0"
+      sources."regenerate-unicode-properties-8.2.0"
+      sources."regenerator-runtime-0.13.5"
+      (sources."regenerator-transform-0.14.4" // {
+        dependencies = [
+          sources."@babel/runtime-7.9.2"
+        ];
+      })
+      sources."regex-not-1.0.2"
+      sources."regexp.prototype.flags-1.3.0"
+      sources."regexpu-core-4.7.0"
+      sources."regjsgen-0.5.1"
+      (sources."regjsparser-0.6.4" // {
+        dependencies = [
+          sources."jsesc-0.5.0"
+        ];
+      })
+      sources."relateurl-0.2.7"
+      sources."remove-trailing-separator-1.1.0"
+      (sources."renderkid-2.0.3" // {
+        dependencies = [
+          sources."strip-ansi-3.0.1"
+        ];
+      })
+      sources."repeat-element-1.1.3"
+      sources."repeat-string-1.6.1"
+      sources."request-2.88.2"
+      sources."request-promise-4.2.5"
+      sources."request-promise-core-1.1.3"
+      sources."require-directory-2.1.1"
+      sources."require-from-string-1.2.1"
+      sources."require-main-filename-1.0.1"
+      sources."requires-port-1.0.0"
+      sources."resolve-1.15.1"
+      sources."resolve-cwd-2.0.0"
+      sources."resolve-dir-1.0.1"
+      sources."resolve-from-3.0.0"
+      sources."resolve-url-0.2.1"
+      sources."restore-cursor-2.0.0"
+      sources."ret-0.1.15"
+      sources."retry-0.12.0"
+      sources."revalidator-0.1.8"
+      sources."rgb-regex-1.0.1"
+      sources."rgba-regex-1.0.0"
+      sources."rimraf-2.7.1"
+      sources."ripemd160-2.0.2"
+      sources."run-async-2.4.0"
+      sources."run-queue-1.0.3"
+      sources."rxjs-6.5.5"
+      sources."safe-buffer-5.1.2"
+      sources."safe-regex-1.1.0"
+      sources."safer-buffer-2.1.2"
+      sources."sax-1.2.4"
+      sources."schema-utils-1.0.0"
+      sources."select-hose-2.0.0"
+      sources."selfsigned-1.10.7"
+      sources."semver-5.7.1"
+      (sources."send-0.17.1" // {
+        dependencies = [
+          (sources."debug-2.6.9" // {
+            dependencies = [
+              sources."ms-2.0.0"
+            ];
+          })
+          sources."mime-1.6.0"
+          sources."ms-2.1.1"
+        ];
+      })
+      sources."serialize-javascript-2.1.2"
+      (sources."serve-index-1.9.1" // {
+        dependencies = [
+          sources."debug-2.6.9"
+          sources."http-errors-1.6.3"
+          sources."inherits-2.0.3"
+          sources."ms-2.0.0"
+          sources."setprototypeof-1.1.0"
+        ];
+      })
+      sources."serve-static-1.14.1"
+      sources."set-blocking-2.0.0"
+      (sources."set-value-2.0.1" // {
+        dependencies = [
+          sources."extend-shallow-2.0.1"
+        ];
+      })
+      sources."setimmediate-1.0.5"
+      sources."setprototypeof-1.1.1"
+      sources."sha.js-2.4.11"
+      sources."shebang-command-1.2.0"
+      sources."shebang-regex-1.0.0"
+      sources."shell-quote-1.6.1"
+      sources."signal-exit-3.0.3"
+      (sources."simple-swizzle-0.2.2" // {
+        dependencies = [
+          sources."is-arrayish-0.3.2"
+        ];
+      })
+      sources."slash-2.0.0"
+      (sources."snapdragon-0.8.2" // {
+        dependencies = [
+          sources."debug-2.6.9"
+          sources."define-property-0.2.5"
+          sources."extend-shallow-2.0.1"
+          (sources."is-accessor-descriptor-0.1.6" // {
+            dependencies = [
+              sources."kind-of-3.2.2"
+            ];
+          })
+          (sources."is-data-descriptor-0.1.4" // {
+            dependencies = [
+              sources."kind-of-3.2.2"
+            ];
+          })
+          sources."is-descriptor-0.1.6"
+          sources."kind-of-5.1.0"
+          sources."ms-2.0.0"
+        ];
+      })
+      (sources."snapdragon-node-2.1.1" // {
+        dependencies = [
+          sources."define-property-1.0.0"
+        ];
+      })
+      (sources."snapdragon-util-3.0.1" // {
+        dependencies = [
+          sources."kind-of-3.2.2"
+        ];
+      })
+      (sources."sockjs-0.3.19" // {
+        dependencies = [
+          sources."faye-websocket-0.10.0"
+        ];
+      })
+      (sources."sockjs-client-1.4.0" // {
+        dependencies = [
+          sources."debug-3.2.6"
+          sources."eventsource-1.0.7"
+        ];
+      })
+      sources."source-list-map-2.0.1"
+      sources."source-map-0.5.7"
+      sources."source-map-resolve-0.5.3"
+      (sources."source-map-support-0.5.16" // {
+        dependencies = [
+          sources."source-map-0.6.1"
+        ];
+      })
+      sources."source-map-url-0.4.0"
+      sources."spdx-correct-3.1.0"
+      sources."spdx-exceptions-2.2.0"
+      sources."spdx-expression-parse-3.0.0"
+      sources."spdx-license-ids-3.0.5"
+      sources."spdy-4.0.2"
+      (sources."spdy-transport-3.0.0" // {
+        dependencies = [
+          sources."readable-stream-3.6.0"
+        ];
+      })
+      sources."split-1.0.1"
+      sources."split-string-3.1.0"
+      sources."sprintf-js-1.0.3"
+      sources."sshpk-1.16.1"
+      sources."ssri-6.0.1"
+      sources."stable-0.1.8"
+      sources."stack-trace-0.0.10"
+      (sources."static-extend-0.1.2" // {
+        dependencies = [
+          sources."define-property-0.2.5"
+          (sources."is-accessor-descriptor-0.1.6" // {
+            dependencies = [
+              sources."kind-of-3.2.2"
+            ];
+          })
+          (sources."is-data-descriptor-0.1.4" // {
+            dependencies = [
+              sources."kind-of-3.2.2"
+            ];
+          })
+          sources."is-descriptor-0.1.6"
+          sources."kind-of-5.1.0"
+        ];
+      })
+      sources."statuses-1.5.0"
+      sources."stealthy-require-1.1.1"
+      sources."stream-browserify-2.0.2"
+      sources."stream-each-1.2.3"
+      sources."stream-http-2.8.3"
+      sources."stream-shift-1.0.1"
+      sources."string-replace-loader-2.2.0"
+      (sources."string-width-1.0.2" // {
+        dependencies = [
+          sources."strip-ansi-3.0.1"
+        ];
+      })
+      sources."string.prototype.trimend-1.0.0"
+      sources."string.prototype.trimleft-2.1.2"
+      sources."string.prototype.trimright-2.1.2"
+      sources."string.prototype.trimstart-1.0.0"
+      sources."string_decoder-1.1.1"
+      (sources."stringify-object-3.3.0" // {
+        dependencies = [
+          sources."is-obj-1.0.1"
+        ];
+      })
+      (sources."strip-ansi-6.0.0" // {
+        dependencies = [
+          sources."ansi-regex-5.0.0"
+        ];
+      })
+      sources."strip-bom-2.0.0"
+      sources."strip-comments-1.0.2"
+      sources."strip-eof-1.0.0"
+      (sources."style-loader-0.21.0" // {
+        dependencies = [
+          sources."schema-utils-0.4.7"
+        ];
+      })
+      (sources."stylehacks-4.0.3" // {
+        dependencies = [
+          sources."postcss-7.0.27"
+          sources."postcss-selector-parser-3.1.2"
+          sources."source-map-0.6.1"
+          sources."supports-color-6.1.0"
+        ];
+      })
+      sources."supports-color-5.5.0"
+      (sources."svgo-1.3.2" // {
+        dependencies = [
+          sources."css-select-2.1.0"
+          sources."css-what-3.2.1"
+          sources."domutils-1.7.0"
+        ];
+      })
+      sources."tapable-1.1.3"
+      sources."tar-4.4.13"
+      (sources."temp-0.9.1" // {
+        dependencies = [
+          sources."rimraf-2.6.3"
+        ];
+      })
+      (sources."terser-4.6.10" // {
+        dependencies = [
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."terser-webpack-plugin-1.4.3" // {
+        dependencies = [
+          sources."find-cache-dir-2.1.0"
+          sources."find-up-3.0.0"
+          sources."locate-path-3.0.0"
+          sources."make-dir-2.1.0"
+          sources."p-limit-2.2.2"
+          sources."p-locate-3.0.0"
+          sources."p-try-2.2.0"
+          sources."pify-4.0.1"
+          sources."pkg-dir-3.0.0"
+          sources."source-map-0.6.1"
+        ];
+      })
+      sources."text-table-0.2.0"
+      sources."through-2.3.8"
+      sources."through2-2.0.5"
+      sources."thunky-1.1.0"
+      sources."timers-browserify-2.0.11"
+      sources."timsort-0.3.0"
+      sources."tmp-0.0.33"
+      sources."to-arraybuffer-1.0.1"
+      sources."to-fast-properties-2.0.0"
+      (sources."to-object-path-0.3.0" // {
+        dependencies = [
+          sources."kind-of-3.2.2"
+        ];
+      })
+      sources."to-regex-3.0.2"
+      sources."to-regex-range-5.0.1"
+      sources."toidentifier-1.0.0"
+      sources."tough-cookie-2.5.0"
+      sources."traverse-0.3.9"
+      sources."tslib-1.11.1"
+      sources."tty-browserify-0.0.0"
+      sources."tunnel-agent-0.6.0"
+      sources."tweetnacl-0.14.5"
+      sources."type-is-1.6.18"
+      sources."typedarray-0.0.6"
+      (sources."uglify-es-3.3.10" // {
+        dependencies = [
+          sources."commander-2.14.1"
+          sources."source-map-0.6.1"
+        ];
+      })
+      (sources."uglifyjs-webpack-plugin-1.3.0" // {
+        dependencies = [
+          sources."cacache-10.0.4"
+          sources."lru-cache-4.1.5"
+          sources."mississippi-2.0.0"
+          sources."pump-2.0.1"
+          sources."schema-utils-0.4.7"
+          sources."serialize-javascript-1.9.1"
+          sources."source-map-0.6.1"
+          sources."ssri-5.3.0"
+          sources."yallist-2.1.2"
+        ];
+      })
+      sources."unicode-canonical-property-names-ecmascript-1.0.4"
+      sources."unicode-match-property-ecmascript-1.0.4"
+      sources."unicode-match-property-value-ecmascript-1.2.0"
+      sources."unicode-property-aliases-ecmascript-1.1.0"
+      sources."union-value-1.0.1"
+      sources."uniq-1.0.1"
+      sources."uniqs-2.0.0"
+      sources."unique-filename-1.1.1"
+      sources."unique-slug-2.0.2"
+      sources."universalify-0.1.2"
+      sources."unpipe-1.0.0"
+      sources."unquote-1.1.1"
+      (sources."unset-value-1.0.0" // {
+        dependencies = [
+          (sources."has-value-0.3.1" // {
+            dependencies = [
+              sources."isobject-2.1.0"
+            ];
+          })
+          sources."has-values-0.1.4"
+        ];
+      })
+      sources."unzip-stream-0.3.0"
+      sources."upath-1.2.0"
+      sources."uri-js-4.2.2"
+      sources."urix-0.1.0"
+      (sources."url-0.11.0" // {
+        dependencies = [
+          sources."punycode-1.3.2"
+        ];
+      })
+      sources."url-loader-1.1.2"
+      sources."url-parse-1.4.7"
+      sources."use-3.1.1"
+      (sources."util-0.11.1" // {
+        dependencies = [
+          sources."inherits-2.0.3"
+        ];
+      })
+      sources."util-deprecate-1.0.2"
+      sources."util.promisify-1.0.1"
+      sources."utila-0.4.0"
+      sources."utile-0.3.0"
+      sources."utils-merge-1.0.1"
+      sources."uuid-3.4.0"
+      sources."validate-npm-package-license-3.0.4"
+      sources."vary-1.1.2"
+      sources."vendors-1.0.4"
+      sources."verror-1.10.0"
+      sources."vm-browserify-1.1.2"
+      (sources."watchpack-1.6.1" // {
+        dependencies = [
+          sources."anymatch-2.0.0"
+          sources."binary-extensions-1.13.1"
+          sources."braces-2.3.2"
+          sources."chokidar-2.1.8"
+          sources."extend-shallow-2.0.1"
+          sources."fill-range-4.0.0"
+          sources."fsevents-1.2.12"
+          sources."is-binary-path-1.0.1"
+          sources."is-number-3.0.0"
+          sources."kind-of-3.2.2"
+          sources."micromatch-3.1.10"
+          sources."normalize-path-2.1.1"
+          sources."readdirp-2.2.1"
+          sources."to-regex-range-2.1.1"
+        ];
+      })
+      sources."wbuf-1.7.3"
+      (sources."webpack-4.42.1" // {
+        dependencies = [
+          sources."braces-2.3.2"
+          sources."extend-shallow-2.0.1"
+          sources."fill-range-4.0.0"
+          sources."is-number-3.0.0"
+          sources."kind-of-3.2.2"
+          sources."micromatch-3.1.10"
+          sources."to-regex-range-2.1.1"
+        ];
+      })
+      sources."webpack-dev-middleware-3.7.2"
+      (sources."webpack-dev-server-3.10.3" // {
+        dependencies = [
+          sources."ansi-regex-3.0.0"
+          sources."anymatch-2.0.0"
+          sources."binary-extensions-1.13.1"
+          sources."braces-2.3.2"
+          sources."chokidar-2.1.8"
+          (sources."cliui-4.1.0" // {
+            dependencies = [
+              sources."strip-ansi-4.0.0"
+            ];
+          })
+          sources."extend-shallow-2.0.1"
+          sources."fill-range-4.0.0"
+          sources."find-up-3.0.0"
+          sources."fsevents-1.2.12"
+          sources."http-proxy-middleware-0.19.1"
+          sources."invert-kv-2.0.0"
+          sources."is-absolute-url-3.0.3"
+          sources."is-binary-path-1.0.1"
+          sources."is-fullwidth-code-point-2.0.0"
+          sources."is-number-3.0.0"
+          sources."kind-of-3.2.2"
+          sources."lcid-2.0.0"
+          sources."locate-path-3.0.0"
+          sources."micromatch-3.1.10"
+          sources."normalize-path-2.1.1"
+          sources."opn-5.5.0"
+          sources."os-locale-3.1.0"
+          sources."p-limit-2.2.2"
+          sources."p-locate-3.0.0"
+          sources."p-try-2.2.0"
+          sources."readdirp-2.2.1"
+          sources."semver-6.3.0"
+          (sources."string-width-2.1.1" // {
+            dependencies = [
+              sources."strip-ansi-4.0.0"
+            ];
+          })
+          sources."strip-ansi-3.0.1"
+          sources."supports-color-6.1.0"
+          sources."to-regex-range-2.1.1"
+          sources."which-module-2.0.0"
+          sources."yargs-12.0.5"
+          sources."yargs-parser-11.1.1"
+        ];
+      })
+      sources."webpack-log-2.0.0"
+      (sources."webpack-manifest-plugin-2.2.0" // {
+        dependencies = [
+          sources."fs-extra-7.0.1"
+        ];
+      })
+      (sources."webpack-sources-1.4.3" // {
+        dependencies = [
+          sources."source-map-0.6.1"
+        ];
+      })
+      sources."websocket-driver-0.7.3"
+      sources."websocket-extensions-0.1.3"
+      sources."whatwg-fetch-2.0.4"
+      sources."which-1.3.1"
+      sources."which-module-1.0.0"
+      (sources."winston-2.1.1" // {
+        dependencies = [
+          sources."async-1.0.0"
+          sources."pkginfo-0.3.1"
+        ];
+      })
+      sources."workbox-background-sync-4.3.1"
+      sources."workbox-broadcast-update-4.3.1"
+      (sources."workbox-build-4.3.1" // {
+        dependencies = [
+          sources."fs-extra-4.0.3"
+        ];
+      })
+      sources."workbox-cacheable-response-4.3.1"
+      sources."workbox-core-4.3.1"
+      sources."workbox-expiration-4.3.1"
+      sources."workbox-google-analytics-4.3.1"
+      sources."workbox-navigation-preload-4.3.1"
+      sources."workbox-precaching-4.3.1"
+      sources."workbox-range-requests-4.3.1"
+      sources."workbox-routing-4.3.1"
+      sources."workbox-strategies-4.3.1"
+      sources."workbox-streams-4.3.1"
+      sources."workbox-sw-4.3.1"
+      sources."workbox-webpack-plugin-4.3.1"
+      sources."workbox-window-4.3.1"
+      sources."worker-farm-1.7.0"
+      (sources."wrap-ansi-2.1.0" // {
+        dependencies = [
+          sources."strip-ansi-3.0.1"
+        ];
+      })
+      sources."wrappy-1.0.2"
+      sources."ws-6.2.1"
+      sources."xmlbuilder-13.0.2"
+      sources."xtend-4.0.2"
+      sources."y18n-4.0.0"
+      sources."yallist-3.1.1"
+      (sources."yargs-6.6.0" // {
+        dependencies = [
+          sources."camelcase-3.0.0"
+          sources."y18n-3.2.1"
+        ];
+      })
+      (sources."yargs-parser-4.2.1" // {
+        dependencies = [
+          sources."camelcase-3.0.0"
+        ];
+      })
+    ];
+    buildInputs = globalBuildInputs;
+    meta = {
+      description = "Elm apps with zero configuration";
+      homepage = "https://github.com/halfzebra/create-elm-app#readme";
+      license = "MIT";
+    };
+    production = true;
+    bypassCache = true;
+    reconstructLock = true;
+  };
+}
\ No newline at end of file
diff --git a/nixpkgs/pkgs/development/compilers/elm/packages/patch-binwrap.nix b/nixpkgs/pkgs/development/compilers/elm/packages/patch-binwrap.nix
new file mode 100644
index 000000000000..30f54e6f5ac5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/packages/patch-binwrap.nix
@@ -0,0 +1,30 @@
+{ writeScriptBin, stdenv, lib }:
+let
+  # Patching binwrap by NoOp script
+  binwrap = writeScriptBin "binwrap" ''
+    #! ${stdenv.shell}
+    echo "binwrap called: Returning 0"
+    return 0
+  '';
+  binwrap-install = writeScriptBin "binwrap-install" ''
+    #! ${stdenv.shell}
+    echo "binwrap-install called: Doing nothing"
+  '';
+in
+targets:
+pkg:
+pkg.override {
+  nativeBuildInputs = pkg.nativeBuildInputs ++ [ binwrap binwrap-install ];
+
+  # Manually install targets
+  # by symlinking binaries into `node_modules`
+  postInstall = let
+    binFile = module: lib.strings.removeSuffix ("-" + module.version) module.name;
+  in ''
+    ${lib.concatStrings (map (module: ''
+        echo "linking ${binFile module}"
+        ln -sf ${module}/bin/${binFile module} \
+            node_modules/${binFile module}/bin/${binFile module}
+    '') targets)}
+  '';
+}
diff --git a/nixpkgs/pkgs/development/compilers/elm/registry.dat b/nixpkgs/pkgs/development/compilers/elm/registry.dat
new file mode 100644
index 000000000000..14fcb12a7460
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/registry.dat
Binary files differdiff --git a/nixpkgs/pkgs/development/compilers/elm/update.sh b/nixpkgs/pkgs/development/compilers/elm/update.sh
new file mode 100755
index 000000000000..c2500b462adf
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/elm/update.sh
@@ -0,0 +1,9 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -p cabal2nix elm2nix -i bash ../../..
+
+cabal2nix https://github.com/elm/compiler --revision c9aefb6230f5e0bda03205ab0499f6e4af924495 > packages/elm.nix
+echo "need to manually copy registry.dat from an existing elm project"
+#elm2nix snapshot > registry.dat
+pushd "$(nix-build -A elmPackages.elm.src --no-out-link ../../../..)/reactor"
+  elm2nix convert > $OLDPWD/packages/elm-srcs.nix
+popd
diff --git a/nixpkgs/pkgs/development/compilers/emscripten/default.nix b/nixpkgs/pkgs/development/compilers/emscripten/default.nix
new file mode 100644
index 000000000000..cd5142acce88
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/emscripten/default.nix
@@ -0,0 +1,70 @@
+{ emscriptenVersion, stdenv, fetchFromGitHub, emscriptenfastcomp, python, nodejs, closurecompiler
+, jre, binaryen, enableWasm ? true ,  cmake
+}:
+
+let
+  rev = emscriptenVersion;
+  appdir = "share/emscripten";
+  binaryenVersioned = binaryen.override { emscriptenRev = rev; };
+in
+
+stdenv.mkDerivation {
+  name = "emscripten-${rev}";
+
+  src = fetchFromGitHub {
+    owner = "emscripten-core";
+    repo = "emscripten";
+    sha256 = "1j3f0hpy05qskaiyv75l7wv4n0nzxhrh9b296zchx3f6f9h2rghq";
+    inherit rev;
+  };
+
+  buildInputs = [ nodejs cmake python ];
+
+  buildCommand = ''
+    mkdir -p $out/${appdir}
+    cp -r $src/* $out/${appdir}
+    chmod -R +w $out/${appdir}
+    grep -rl '^#!/usr.*python' $out/${appdir} | xargs sed -i -s 's@^#!/usr.*python.*@#!${python}/bin/python@'
+    sed -i -e "s,EM_CONFIG = '~/.emscripten',EM_CONFIG = '$out/${appdir}/config'," $out/${appdir}/tools/shared.py
+    sed -i -e 's,^.*did not see a source tree above the LLVM.*$,      return True,' $out/${appdir}/tools/shared.py
+    sed -i -e 's,def check_sanity(force=False):,def check_sanity(force=False):\n  return,' $out/${appdir}/tools/shared.py
+    # fixes cmake support
+    sed -i -e "s/print \('emcc (Emscript.*\)/sys.stderr.write(\1); sys.stderr.flush()/g" $out/${appdir}/emcc.py
+    mkdir $out/bin
+    ln -s $out/${appdir}/{em++,em-config,emar,embuilder.py,emcc,emcmake,emconfigure,emlink.py,emmake,emranlib,emrun,emscons} $out/bin
+
+    echo "EMSCRIPTEN_ROOT = '$out/${appdir}'" > $out/${appdir}/config
+    echo "LLVM_ROOT = '${emscriptenfastcomp}/bin'" >> $out/${appdir}/config
+    echo "PYTHON = '${python}/bin/python'" >> $out/${appdir}/config
+    echo "NODE_JS = '${nodejs}/bin/node'" >> $out/${appdir}/config
+    echo "JS_ENGINES = [NODE_JS]" >> $out/${appdir}/config
+    echo "COMPILER_ENGINE = NODE_JS" >> $out/${appdir}/config
+    echo "CLOSURE_COMPILER = '${closurecompiler}/share/java/closure-compiler-v${closurecompiler.version}.jar'" >> $out/${appdir}/config
+    echo "JAVA = '${jre}/bin/java'" >> $out/${appdir}/config
+    # to make the test(s) below work
+    echo "SPIDERMONKEY_ENGINE = []" >> $out/${appdir}/config
+  ''
+  + stdenv.lib.optionalString enableWasm ''
+    echo "BINARYEN_ROOT = '${binaryenVersioned}'" >> $out/share/emscripten/config
+  ''
+  +
+  ''
+    echo "--------------- running test -----------------"
+    # quick hack to get the test working
+    HOME=$TMPDIR
+    cp $out/${appdir}/config $HOME/.emscripten
+    export PATH=$PATH:$out/bin
+
+    #export EMCC_DEBUG=2  
+    ${python}/bin/python $src/tests/runner.py test_hello_world
+    echo "--------------- /running test -----------------"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/emscripten-core/emscripten";
+    description = "An LLVM-to-JavaScript Compiler";
+    platforms = platforms.all;
+    maintainers = with maintainers; [ qknight matthewbauer ];
+    license = licenses.ncsa;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/emscripten/fastcomp/default.nix b/nixpkgs/pkgs/development/compilers/emscripten/fastcomp/default.nix
new file mode 100644
index 000000000000..57496d288605
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/emscripten/fastcomp/default.nix
@@ -0,0 +1,28 @@
+{ newScope, stdenv, binutils, wrapCCWith, symlinkJoin }:
+let
+  callPackage = newScope (self // {inherit stdenv;});
+
+  self = {
+    emscriptenfastcomp-unwrapped = callPackage ./emscripten-fastcomp.nix {};
+    emscriptenfastcomp-wrapped = wrapCCWith {
+      cc = self.emscriptenfastcomp-unwrapped;
+      # Never want Apple's cctools for WASM target
+      bintools = binutils;
+      libc = stdenv.cc.libc;
+      extraBuildCommands = ''
+        # hardening flags break WASM support
+        cat > $out/nix-support/add-hardening.sh
+      '';
+    };
+    emscriptenfastcomp = symlinkJoin {
+      name = "emscriptenfastcomp-${stdenv.lib.getVersion self.emscriptenfastcomp-unwrapped}";
+      paths = [ self.emscriptenfastcomp-wrapped self.emscriptenfastcomp-unwrapped ];
+      preferLocalBuild = false;
+      allowSubstitutes = true;
+      postBuild = ''
+        # replace unwrapped clang-3.9 binary by wrapper
+        ln -sf $out/bin/clang $out/bin/clang-[0-9]*
+      '';
+    };
+  };
+in self
diff --git a/nixpkgs/pkgs/development/compilers/emscripten/fastcomp/emscripten-fastcomp.nix b/nixpkgs/pkgs/development/compilers/emscripten/fastcomp/emscripten-fastcomp.nix
new file mode 100644
index 000000000000..520a34afe58d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/emscripten/fastcomp/emscripten-fastcomp.nix
@@ -0,0 +1,55 @@
+{ emscriptenVersion, stdenv, fetchFromGitHub, cmake, python, gtest, ... }:
+
+let
+  rev = emscriptenVersion;
+  gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
+in
+stdenv.mkDerivation rec {
+  name = "emscripten-fastcomp-${rev}";
+
+  src = fetchFromGitHub {
+    owner = "emscripten-core";
+    repo = "emscripten-fastcomp";
+    sha256 = "0bd0l5k2fa4k0nax2cpxi003pqffqivx4z4m2j5xdha1a12sid8i";
+    inherit rev;
+  };
+
+  srcFL = fetchFromGitHub {
+    owner = "emscripten-core";
+    repo = "emscripten-fastcomp-clang";
+    sha256 = "1iw2qplhp489qzw0rma73sab7asnm27g4m95sr36c6kq9cq6agri";
+    inherit rev;
+  };
+
+  nativeBuildInputs = [ cmake python gtest ];
+  preConfigure = ''
+    cp -Lr ${srcFL} tools/clang
+    chmod +w -R tools/clang
+  '';
+  cmakeFlags = [
+    "-DCMAKE_BUILD_TYPE=Release"
+    "-DLLVM_TARGETS_TO_BUILD='X86;JSBackend'"
+    "-DLLVM_INCLUDE_EXAMPLES=OFF"
+    "-DLLVM_INCLUDE_TESTS=ON"
+    #"-DLLVM_CONFIG=${llvm}/bin/llvm-config"
+    "-DLLVM_BUILD_TESTS=ON"
+    "-DCLANG_INCLUDE_TESTS=ON"
+  ] ++ (stdenv.lib.optional stdenv.isLinux
+    # necessary for clang to find crtend.o
+    "-DGCC_INSTALL_PREFIX=${gcc}"
+  );
+  enableParallelBuilding = true;
+
+  passthru = {
+    isClang = true;
+    inherit gcc;
+  };
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/emscripten-core/emscripten-fastcomp";
+    description = "Emscripten LLVM";
+    platforms = platforms.all;
+    maintainers = with maintainers; [ qknight matthewbauer ];
+    license = stdenv.lib.licenses.ncsa;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/eql/default.nix b/nixpkgs/pkgs/development/compilers/eql/default.nix
new file mode 100644
index 000000000000..aac619126896
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/eql/default.nix
@@ -0,0 +1,60 @@
+{ stdenv, fetchgit, qt4, ecl, xorgserver, xkbcomp, xkeyboard_config }:
+
+stdenv.mkDerivation rec {
+  version = src.rev;
+  pname = "eql-git";
+  src = fetchgit {
+    rev = "9097bf98446ee33c07bb155d800395775ce0d9b2";
+    url = "https://gitlab.com/eql/eql.git";
+    sha256 = "17h23qr7fyr9hvjgiq0yhacmjs43x06vh8978aq42ymcgipxdcww";
+  };
+
+  buildInputs = [ ecl qt4 xorgserver xkbcomp xkeyboard_config ];
+
+  NIX_CFLAGS_COMPILE = "-fPIC";
+
+  postPatch = ''
+    sed -re 's@[(]in-home "gui/.command-history"[)]@(concatenate '"'"'string (ext:getenv "HOME") "/.eql-gui-command-history")@' -i gui/gui.lisp
+  '';
+
+  buildPhase = ''
+    cd src
+    ecl -shell make-eql-lib.lisp
+    qmake eql_lib.pro
+    make
+    cd ..
+
+    cd src
+    qmake eql_exe.pro
+    make
+    cd ..
+    cd src
+  '';
+
+  installPhase = ''
+    cd ..
+    mkdir -p $out/bin $out/lib/eql/ $out/include $out/include/gen $out/lib
+    cp -r . $out/lib/eql/build-dir
+    ln -s $out/lib/eql/build-dir/eql $out/bin
+    ln -s $out/lib/eql/build-dir/src/*.h $out/include
+    ln -s $out/lib/eql/build-dir/src/gen/*.h $out/include/gen
+    ln -s $out/lib/eql/build-dir/libeql*.so* $out/lib
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Embedded Qt Lisp (ECL+Qt)";
+    maintainers = with maintainers; [ raskin ];
+    platforms = platforms.linux;
+    license = licenses.mit;
+  };
+
+  passthru = {
+    updateInfo = {
+      downloadPage = "http://password-taxi.at/EQL";
+      method = "fetchgit";
+      rev = src.rev;
+      url = src.url;
+      hash = src.sha256;
+    };
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/factor-lang/default.nix b/nixpkgs/pkgs/development/compilers/factor-lang/default.nix
new file mode 100644
index 000000000000..2c7edb9c1703
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/factor-lang/default.nix
@@ -0,0 +1,104 @@
+{ stdenv, fetchurl, glib, git,
+  rlwrap, curl, pkgconfig, perl, makeWrapper, tzdata, ncurses,
+  pango, cairo, gtk2, gdk-pixbuf, gtkglext,
+  mesa, xorg, openssl, unzip }:
+
+stdenv.mkDerivation rec {
+  pname = "factor-lang";
+  version = "0.98";
+  rev = "7999e72aecc3c5bc4019d43dc4697f49678cc3b4";
+
+  src = fetchurl {
+    url = "https://downloads.factorcode.org/releases/0.98/factor-src-0.98.zip";
+    sha256 = "01ip9mbnar4sv60d2wcwfz62qaamdvbykxw3gbhzqa25z36vi3ri";
+  };
+
+  patches = [
+    ./staging-command-line-0.98-pre.patch
+    ./workdir-0.98-pre.patch
+    ./fuel-dir.patch
+  ];
+
+  buildInputs = with xorg; [ git rlwrap curl pkgconfig perl makeWrapper
+    libX11 pango cairo gtk2 gdk-pixbuf gtkglext
+    mesa libXmu libXt libICE libSM openssl unzip ];
+
+  buildPhase = ''
+    sed -ie '4i GIT_LABEL = heads/master-${rev}' GNUmakefile
+    make linux-x86-64
+    # De-memoize xdg-* functions, otherwise they break the image.
+    sed -ie 's/^MEMO:/:/' basis/xdg/xdg.factor
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin $out/lib/factor
+    # The released image has library path info embedded, so we
+    # first have to recreate the boot image with Nix paths, and
+    # then use it to build the Nix release image.
+    cp boot.unix-x86.64.image $out/lib/factor/factor.image
+
+    cp -r basis core extra $out/lib/factor
+
+    # Factor uses XDG_CACHE_HOME for cache during compilation.
+    # We can't have that. So set it to $TMPDIR/.cache
+    export XDG_CACHE_HOME=$TMPDIR/.cache && mkdir -p $XDG_CACHE_HOME
+
+    # There is no ld.so.cache in NixOS so we construct one
+    # out of known libraries. The side effect is that find-lib
+    # will work only on the known libraries. There does not seem
+    # to be a generic solution here.
+    find $(echo ${stdenv.lib.makeLibraryPath (with xorg; [
+        glib libX11 pango cairo gtk2 gdk-pixbuf gtkglext
+        mesa libXmu libXt libICE libSM ])} | sed -e 's#:# #g') -name \*.so.\* > $TMPDIR/so.lst
+
+    (echo $(cat $TMPDIR/so.lst | wc -l) "libs found in cache \`/etc/ld.so.cache'";
+    for l in $(<$TMPDIR/so.lst);
+    do
+      echo "	$(basename $l) (libc6,x86-64) => $l";
+    done)> $out/lib/factor/ld.so.cache
+
+    sed -ie "s#/sbin/ldconfig -p#cat $out/lib/factor/ld.so.cache#g" \
+      $out/lib/factor/basis/alien/libraries/finder/linux/linux.factor
+
+    sed -ie 's#/usr/share/zoneinfo/#${tzdata}/share/zoneinfo/#g' \
+      $out/lib/factor/extra/tzinfo/tzinfo.factor
+
+    sed -ie 's#/usr/share/terminfo#${ncurses.out}/share/terminfo#g' \
+      $out/lib/factor/extra/terminfo/terminfo.factor
+
+    cp ./factor $out/bin
+    wrapProgram $out/bin/factor --prefix LD_LIBRARY_PATH : \
+      "${stdenv.lib.makeLibraryPath (with xorg; [ glib
+        libX11 pango cairo gtk2 gdk-pixbuf gtkglext
+        mesa libXmu libXt libICE libSM openssl])}"
+
+    sed -ie 's#/bin/.factor-wrapped#/lib/factor/factor#g' $out/bin/factor
+    mv $out/bin/.factor-wrapped $out/lib/factor/factor
+
+    # build full factor image from boot image
+    (cd $out/bin && ./factor  -script -e='"unix-x86.64" USING: system bootstrap.image memory ; make-image save 0 exit' )
+
+    # make a new bootstrap image
+    (cd $out/bin && ./factor  -script -e='"unix-x86.64" USING: system tools.deploy.backend ; make-boot-image 0 exit' )
+
+    # rebuild final full factor image to include all patched sources
+    (cd $out/lib/factor && ./factor -i=boot.unix-x86.64.image)
+
+    # install fuel mode for emacs
+    mkdir -p $out/share/emacs/site-lisp
+    # update default paths in factor-listener.el for fuel mode
+    substituteInPlace misc/fuel/fuel-listener.el \
+      --subst-var-by fuel_factor_root_dir $out/lib/factor \
+      --subst-var-by fuel_listener_factor_binary $out/bin/factor
+    cp misc/fuel/*.el $out/share/emacs/site-lisp/
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://factorcode.org";
+    license = licenses.bsd2;
+    description = "A concatenative, stack-based programming language";
+
+    maintainers = [ maintainers.vrthra maintainers.spacefrogg ];
+    platforms = [ "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/factor-lang/fuel-dir.patch b/nixpkgs/pkgs/development/compilers/factor-lang/fuel-dir.patch
new file mode 100644
index 000000000000..8f45b0372469
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/factor-lang/fuel-dir.patch
@@ -0,0 +1,20 @@
+diff --git a/misc/fuel/fuel-listener.el b/misc/fuel/fuel-listener.el
+index 2d1b182a75..bf2e573425 100644
+--- a/misc/fuel/fuel-listener.el
++++ b/misc/fuel/fuel-listener.el
+@@ -30,13 +30,13 @@
+   "Interacting with a Factor listener inside Emacs."
+   :group 'fuel)
+ 
+-(defcustom fuel-factor-root-dir nil
++(defcustom fuel-factor-root-dir "@fuel_factor_root_dir@"
+   "Full path to the factor root directory when starting a listener."
+   :type 'directory
+   :group 'fuel-listener)
+ 
+ ;;; Is factor.com still valid on Windows...?
+-(defcustom fuel-listener-factor-binary nil
++(defcustom fuel-listener-factor-binary "@fuel_listener_factor_binary@"
+   "Full path to the factor executable to use when starting a listener."
+   :type '(file :must-match t)
+   :group 'fuel-listener)
diff --git a/nixpkgs/pkgs/development/compilers/factor-lang/staging-command-line-0.98-pre.patch b/nixpkgs/pkgs/development/compilers/factor-lang/staging-command-line-0.98-pre.patch
new file mode 100644
index 000000000000..57fc657ddcf3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/factor-lang/staging-command-line-0.98-pre.patch
@@ -0,0 +1,13 @@
+diff --git a/basis/tools/deploy/backend/backend.factor b/basis/tools/deploy/backend/backend.factor
+index ec86089dbe..b146168ec9 100644
+--- a/basis/tools/deploy/backend/backend.factor
++++ b/basis/tools/deploy/backend/backend.factor
+@@ -69,7 +69,7 @@ ERROR: can't-deploy-library-file library ;
+             [ staging-image-name "-output-image=" prepend , ]
+             [ " " join "-include=" prepend , ] bi
+         ] [
+-            input-image-name "-i=" prepend ,
++            input-image-name resource-path "-i=" prepend ,
+             "-resource-path=" "" resource-path append ,
+             "-run=tools.deploy.restage" ,
+         ] bi
diff --git a/nixpkgs/pkgs/development/compilers/factor-lang/workdir-0.98-pre.patch b/nixpkgs/pkgs/development/compilers/factor-lang/workdir-0.98-pre.patch
new file mode 100644
index 000000000000..f1498743dd67
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/factor-lang/workdir-0.98-pre.patch
@@ -0,0 +1,24 @@
+diff --git a/core/io/pathnames/pathnames.factor b/core/io/pathnames/pathnames.factor
+index 2d382e49d1..d4d9228d6c 100644
+--- a/core/io/pathnames/pathnames.factor
++++ b/core/io/pathnames/pathnames.factor
+@@ -144,7 +144,10 @@ GENERIC: vocab-path ( path -- newpath )
+ GENERIC: absolute-path ( path -- path' )
+ 
+ M: string absolute-path
+-    "resource:" ?head [
++    "resource:work" ?head [
++        trim-head-separators "/var/lib/factor" prepend-path
++        absolute-path ]
++    [ "resource:" ?head [
+         trim-head-separators resource-path
+         absolute-path
+     ] [
+@@ -158,6 +161,7 @@ M: string absolute-path
+         ] [
+             current-directory get prepend-path
+         ] if ] if
++      ] if
+     ] if ;
+ 
+ M: object normalize-path ( path -- path' )
diff --git a/nixpkgs/pkgs/development/compilers/fasm/bin.nix b/nixpkgs/pkgs/development/compilers/fasm/bin.nix
new file mode 100644
index 000000000000..c595c86615b8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fasm/bin.nix
@@ -0,0 +1,24 @@
+{ stdenvNoCC, lib, fetchurl }:
+
+stdenvNoCC.mkDerivation rec {
+  pname = "fasm-bin";
+
+  version = "1.73.24";
+
+  src = fetchurl {
+    url = "https://flatassembler.net/fasm-${version}.tgz";
+    sha256 = "142vxhs8mh8isvlzq7ir0asmqda410phzxmk9gk9b43dldskkj7k";
+  };
+
+  installPhase = ''
+    install -D fasm${lib.optionalString stdenvNoCC.isx86_64 ".x64"} $out/bin/fasm
+  '';
+
+  meta = with lib; {
+    description = "x86(-64) macro assembler to binary, MZ, PE, COFF, and ELF";
+    homepage = "https://flatassembler.net/download.php";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ orivej ];
+    platforms = [ "i686-linux" "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/fasm/default.nix b/nixpkgs/pkgs/development/compilers/fasm/default.nix
new file mode 100644
index 000000000000..f17d18bf92a6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fasm/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, lib, fasm-bin, isx86_64 }:
+
+stdenv.mkDerivation {
+  inherit (fasm-bin) version src meta;
+
+  pname = "fasm";
+
+  nativeBuildInputs = [ fasm-bin ];
+
+  buildPhase = ''
+    fasm source/Linux${lib.optionalString isx86_64 "/x64"}/fasm.asm fasm
+    for tool in listing prepsrc symbols; do
+      fasm tools/libc/$tool.asm
+      cc -o tools/libc/fasm-$tool tools/libc/$tool.o
+    done
+  '';
+
+  outputs = [ "out" "doc" ];
+
+  installPhase = ''
+    install -Dt $out/bin fasm tools/libc/fasm-*
+
+    docs=$doc/share/doc/fasm
+    mkdir -p $docs
+    cp -r examples/ *.txt tools/fas.txt $docs
+    cp tools/readme.txt $docs/tools.txt
+  '';
+}
diff --git a/nixpkgs/pkgs/development/compilers/flutter/default.nix b/nixpkgs/pkgs/development/compilers/flutter/default.nix
new file mode 100644
index 000000000000..afc8fbd7f499
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/default.nix
@@ -0,0 +1,31 @@
+{ callPackage }:
+
+let
+  mkFlutter = opts: callPackage (import ./flutter.nix opts) { };
+  getPatches = dir:
+    let files = builtins.attrNames (builtins.readDir dir);
+    in map (f: dir + ("/" + f)) files;
+in {
+  stable = mkFlutter {
+    pname = "flutter";
+    channel = "stable";
+    version = "1.12.13+hotfix.9";
+    sha256Hash = "1ql3zvmmk5zk47y30lajxaam04q6vr373dayq15jv4vpc0fzif1y";
+    patches = getPatches ./patches/stable;
+  };
+  beta = mkFlutter {
+    pname = "flutter-beta";
+    channel = "beta";
+    version = "1.15.17";
+    sha256Hash = "0iil6y6y477dhjgzx54ab5m9nj0jg4xl8x4zzd9iwh8m756r7qsd";
+    patches = getPatches ./patches/beta;
+  };
+  dev = mkFlutter rec {
+    pname = "flutter-dev";
+    channel = "dev";
+    version = "1.17.0-dev.5.0";
+    filename = "flutter_linux_${version}-${channel}.tar.xz";
+    sha256Hash = "0ks2jf2bd42y2jsc91p33r57q7j3m94d8ihkmlxzwi53x1mwp0pk";
+    patches = getPatches ./patches/beta;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/flutter/flutter.nix b/nixpkgs/pkgs/development/compilers/flutter/flutter.nix
new file mode 100644
index 000000000000..fad2a646a165
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/flutter.nix
@@ -0,0 +1,129 @@
+{ channel, pname, version, sha256Hash, patches
+, filename ? "flutter_linux_v${version}-${channel}.tar.xz" }:
+
+{ bash, buildFHSUserEnv, cacert, coreutils, git, makeWrapper, runCommand, stdenv
+, fetchurl, alsaLib, dbus, expat, libpulseaudio, libuuid, libX11, libxcb
+, libXcomposite, libXcursor, libXdamage, libXfixes, libGL, nspr, nss, systemd }:
+
+let
+  drvName = "flutter-${channel}-${version}";
+  flutter = stdenv.mkDerivation {
+    name = "${drvName}-unwrapped";
+
+    src = fetchurl {
+      url =
+        "https://storage.googleapis.com/flutter_infra/releases/${channel}/linux/${filename}";
+      sha256 = sha256Hash;
+    };
+
+    buildInputs = [ makeWrapper git ];
+
+    inherit patches;
+
+    postPatch = ''
+      patchShebangs --build ./bin/
+      find ./bin/ -executable -type f -exec patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) {} \;
+    '';
+
+    buildPhase = ''
+      FLUTTER_ROOT=$(pwd)
+      FLUTTER_TOOLS_DIR="$FLUTTER_ROOT/packages/flutter_tools"
+      SNAPSHOT_PATH="$FLUTTER_ROOT/bin/cache/flutter_tools.snapshot"
+      STAMP_PATH="$FLUTTER_ROOT/bin/cache/flutter_tools.stamp"
+      SCRIPT_PATH="$FLUTTER_TOOLS_DIR/bin/flutter_tools.dart"
+      DART_SDK_PATH="$FLUTTER_ROOT/bin/cache/dart-sdk"
+
+      DART="$DART_SDK_PATH/bin/dart"
+      PUB="$DART_SDK_PATH/bin/pub"
+
+      HOME=../.. # required for pub upgrade --offline, ~/.pub-cache
+                 # path is relative otherwise it's replaced by /build/flutter
+
+      (cd "$FLUTTER_TOOLS_DIR" && "$PUB" upgrade --offline)
+
+      local revision="$(cd "$FLUTTER_ROOT"; git rev-parse HEAD)"
+      "$DART" --snapshot="$SNAPSHOT_PATH" --packages="$FLUTTER_TOOLS_DIR/.packages" "$SCRIPT_PATH"
+      echo "$revision" > "$STAMP_PATH"
+      echo -n "${version}" > version
+
+      rm -rf bin/cache/{artifacts,downloads}
+      rm -f  bin/cache/*.stamp
+    '';
+
+    installPhase = ''
+      mkdir -p $out
+      cp -r . $out
+    '';
+  };
+
+  # Wrap flutter inside an fhs user env to allow execution of binary,
+  # like adb from $ANDROID_HOME or java from android-studio.
+  fhsEnv = buildFHSUserEnv {
+    name = "${drvName}-fhs-env";
+    multiPkgs = pkgs: [
+      # Flutter only use these certificates
+      (runCommand "fedoracert" { } ''
+        mkdir -p $out/etc/pki/tls/
+        ln -s ${cacert}/etc/ssl/certs $out/etc/pki/tls/certs
+      '')
+      pkgs.zlib
+    ];
+    targetPkgs = pkgs:
+      with pkgs; [
+        bash
+        curl
+        git
+        unzip
+        which
+        xz
+
+        # flutter test requires this lib
+        libGLU
+
+        # for android emulator
+        alsaLib
+        dbus
+        expat
+        libpulseaudio
+        libuuid
+        libX11
+        libxcb
+        libXcomposite
+        libXcursor
+        libXdamage
+        libXfixes
+        libGL
+        nspr
+        nss
+        systemd
+      ];
+  };
+
+in runCommand drvName {
+  startScript = ''
+    #!${bash}/bin/bash
+    export PUB_CACHE=''${PUB_CACHE:-"$HOME/.pub-cache"}
+    export ANDROID_EMULATOR_USE_SYSTEM_LIBS=1
+    ${fhsEnv}/bin/${drvName}-fhs-env ${flutter}/bin/flutter --no-version-check "$@"
+  '';
+  preferLocalBuild = true;
+  allowSubstitutes = false;
+  passthru = { unwrapped = flutter; };
+  meta = with stdenv.lib; {
+    description =
+      "Flutter is Google's SDK for building mobile, web and desktop with Dart.";
+    longDescription = ''
+      Flutter is Google’s UI toolkit for building beautiful,
+      natively compiled applications for mobile, web, and desktop from a single codebase.
+    '';
+    homepage = "https://flutter.dev";
+    license = licenses.bsd3;
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ babariviere ];
+  };
+} ''
+  mkdir -p $out/bin
+
+  echo -n "$startScript" > $out/bin/${pname}
+  chmod +x $out/bin/${pname}
+''
diff --git a/nixpkgs/pkgs/development/compilers/flutter/patches/beta/disable-auto-update.patch b/nixpkgs/pkgs/development/compilers/flutter/patches/beta/disable-auto-update.patch
new file mode 100644
index 000000000000..42c09c805cb5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/patches/beta/disable-auto-update.patch
@@ -0,0 +1,31 @@
+diff --git a/bin/flutter b/bin/flutter
+index e0c18e235..2c3fb7ddd 100755
+--- a/bin/flutter
++++ b/bin/flutter
+@@ -185,8 +185,6 @@ fi
+ # FLUTTER_TOOL_ARGS="--enable-asserts $FLUTTER_TOOL_ARGS"
+ # FLUTTER_TOOL_ARGS="$FLUTTER_TOOL_ARGS --observe=65432"
+ 
+-(upgrade_flutter) 3< "$PROG_NAME"
+-
+ # FLUTTER_TOOL_ARGS isn't quoted below, because it is meant to be considered as
+ # separate space-separated args.
+ "$DART" --packages="$FLUTTER_TOOLS_DIR/.packages" $FLUTTER_TOOL_ARGS "$SNAPSHOT_PATH" "$@"
+diff --git a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
+index 99455ae64..f5b0cb59c 100644
+--- a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
++++ b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
+@@ -301,13 +301,6 @@ class FlutterCommandRunner extends CommandRunner<void> {
+         }
+ 
+         _checkFlutterCopy();
+-        try {
+-          await globals.flutterVersion.ensureVersionFile();
+-        } on FileSystemException catch (e) {
+-          globals.printError('Failed to write the version file to the artifact cache: "$e".');
+-          globals.printError('Please ensure you have permissions in the artifact cache directory.');
+-          throwToolExit('Failed to write the version file');
+-        }
+         final bool machineFlag = topLevelResults['machine'] as bool;
+         if (topLevelResults.command?.name != 'upgrade' && topLevelResults['version-check'] as bool && !machineFlag) {
+           await globals.flutterVersion.checkFlutterVersionFreshness();
diff --git a/nixpkgs/pkgs/development/compilers/flutter/patches/beta/move-cache.patch b/nixpkgs/pkgs/development/compilers/flutter/patches/beta/move-cache.patch
new file mode 100644
index 000000000000..4672d4c625d0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/patches/beta/move-cache.patch
@@ -0,0 +1,63 @@
+diff --git a/dev/devicelab/lib/framework/runner.dart b/dev/devicelab/lib/framework/runner.dart
+index 8e511eefd..fbc7d6ac3 100644
+--- a/dev/devicelab/lib/framework/runner.dart
++++ b/dev/devicelab/lib/framework/runner.dart
+@@ -126,7 +126,7 @@ Future<void> cleanupSystem() async {
+     print('\nTelling Gradle to shut down (JAVA_HOME=$javaHome)');
+     final String gradlewBinaryName = Platform.isWindows ? 'gradlew.bat' : 'gradlew';
+     final Directory tempDir = Directory.systemTemp.createTempSync('flutter_devicelab_shutdown_gradle.');
+-    recursiveCopy(Directory(path.join(flutterDirectory.path, 'bin', 'cache', 'artifacts', 'gradle_wrapper')), tempDir);
++    recursiveCopy(Directory(path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter', 'artifacts', 'gradle_wrapper')), tempDir);
+     copy(File(path.join(path.join(flutterDirectory.path, 'packages', 'flutter_tools'), 'templates', 'app', 'android.tmpl', 'gradle', 'wrapper', 'gradle-wrapper.properties')), Directory(path.join(tempDir.path, 'gradle', 'wrapper')));
+     if (!Platform.isWindows) {
+       await exec(
+diff --git a/packages/flutter_tools/lib/src/asset.dart b/packages/flutter_tools/lib/src/asset.dart
+index 79b06949f..9040ba0a8 100644
+--- a/packages/flutter_tools/lib/src/asset.dart
++++ b/packages/flutter_tools/lib/src/asset.dart
+@@ -6,6 +6,7 @@ import 'dart:async';
+ 
+ import 'package:yaml/yaml.dart';
+ 
++import 'base/common.dart';
+ import 'base/context.dart';
+ import 'base/file_system.dart';
+ import 'base/utils.dart';
+@@ -325,7 +326,7 @@ List<_Asset> _getMaterialAssets(String fontSet) {
+     for (final Map<dynamic, dynamic> font in family['fonts']) {
+       final Uri entryUri = globals.fs.path.toUri(font['asset'] as String);
+       result.add(_Asset(
+-        baseDir: globals.fs.path.join(Cache.flutterRoot, 'bin', 'cache', 'artifacts', 'material_fonts'),
++        baseDir: globals.fs.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter', 'artifacts', 'material_fonts'),
+         relativeUri: Uri(path: entryUri.pathSegments.last),
+         entryUri: entryUri,
+       ));
+diff --git a/packages/flutter_tools/lib/src/cache.dart b/packages/flutter_tools/lib/src/cache.dart
+index 715189938..5afb2a0db 100644
+--- a/packages/flutter_tools/lib/src/cache.dart
++++ b/packages/flutter_tools/lib/src/cache.dart
+@@ -189,8 +189,14 @@ class Cache {
+       return;
+     }
+     assert(_lock == null);
++
++    final Directory dir = globals.fs.directory(globals.fs.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter'));
++    if (!dir.existsSync()) {
++      dir.createSync(recursive: true);
++      globals.os.chmod(dir, '755');
++    }
+     final File lockFile =
+-        globals.fs.file(globals.fs.path.join(flutterRoot, 'bin', 'cache', 'lockfile'));
++        globals.fs.file(globals.fs.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter', 'lockfile'));
+     try {
+       _lock = lockFile.openSync(mode: FileMode.write);
+     } on FileSystemException catch (e) {
+@@ -290,7 +296,7 @@ class Cache {
+     if (_rootOverride != null) {
+       return _fileSystem.directory(_fileSystem.path.join(_rootOverride.path, 'bin', 'cache'));
+     } else {
+-      return _fileSystem.directory(_fileSystem.path.join(flutterRoot, 'bin', 'cache'));
++      return _fileSystem.directory(_fileSystem.path.join(globals.fsUtils.homeDirPath, '.cache', 'flutter'));
+     }
+   }
+ 
diff --git a/nixpkgs/pkgs/development/compilers/flutter/patches/stable/disable-auto-update.patch b/nixpkgs/pkgs/development/compilers/flutter/patches/stable/disable-auto-update.patch
new file mode 100644
index 000000000000..16fe504595f3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/patches/stable/disable-auto-update.patch
@@ -0,0 +1,31 @@
+diff --git a/bin/flutter b/bin/flutter
+index 3955f8f39..1e7573d30 100755
+--- a/bin/flutter
++++ b/bin/flutter
+@@ -185,8 +185,6 @@ fi
+ # FLUTTER_TOOL_ARGS="--enable-asserts $FLUTTER_TOOL_ARGS"
+ # FLUTTER_TOOL_ARGS="$FLUTTER_TOOL_ARGS --observe=65432"
+ 
+-(upgrade_flutter) 3< "$PROG_NAME"
+-
+ # FLUTTER_TOOL_ARGS isn't quoted below, because it is meant to be considered as
+ # separate space-separated args.
+ "$DART" --packages="$FLUTTER_TOOLS_DIR/.packages" $FLUTTER_TOOL_ARGS "$SNAPSHOT_PATH" "$@"
+diff --git a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
+index 5e45819d9..ab748b059 100644
+--- a/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
++++ b/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart
+@@ -377,13 +377,6 @@ class FlutterCommandRunner extends CommandRunner<void> {
+         }
+ 
+         _checkFlutterCopy();
+-        try {
+-          await FlutterVersion.instance.ensureVersionFile();
+-        } on FileSystemException catch (e) {
+-          printError('Failed to write the version file to the artifact cache: "$e".');
+-          printError('Please ensure you have permissions in the artifact cache directory.');
+-          throwToolExit('Failed to write the version file');
+-        }
+         if (topLevelResults.command?.name != 'upgrade' && topLevelResults['version-check'] as bool) {
+           await FlutterVersion.instance.checkFlutterVersionFreshness();
+         }
diff --git a/nixpkgs/pkgs/development/compilers/flutter/patches/stable/move-cache.patch b/nixpkgs/pkgs/development/compilers/flutter/patches/stable/move-cache.patch
new file mode 100644
index 000000000000..e5719a2867f9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flutter/patches/stable/move-cache.patch
@@ -0,0 +1,63 @@
+diff --git a/dev/devicelab/lib/framework/runner.dart b/dev/devicelab/lib/framework/runner.dart
+index 9fae74726..d88d6ecbb 100644
+--- a/dev/devicelab/lib/framework/runner.dart
++++ b/dev/devicelab/lib/framework/runner.dart
+@@ -126,7 +126,7 @@ Future<void> cleanupSystem() async {
+     print('\nTelling Gradle to shut down (JAVA_HOME=$javaHome)');
+     final String gradlewBinaryName = Platform.isWindows ? 'gradlew.bat' : 'gradlew';
+     final Directory tempDir = Directory.systemTemp.createTempSync('flutter_devicelab_shutdown_gradle.');
+-    recursiveCopy(Directory(path.join(flutterDirectory.path, 'bin', 'cache', 'artifacts', 'gradle_wrapper')), tempDir);
++    recursiveCopy(Directory(path.join(homeDirPath, '.cache', 'flutter', 'artifacts', 'gradle_wrapper')), tempDir);
+     copy(File(path.join(path.join(flutterDirectory.path, 'packages', 'flutter_tools'), 'templates', 'app', 'android.tmpl', 'gradle', 'wrapper', 'gradle-wrapper.properties')), Directory(path.join(tempDir.path, 'gradle', 'wrapper')));
+     if (!Platform.isWindows) {
+       await exec(
+diff --git a/packages/flutter_tools/lib/src/asset.dart b/packages/flutter_tools/lib/src/asset.dart
+index e6216c737..5ab497092 100644
+--- a/packages/flutter_tools/lib/src/asset.dart
++++ b/packages/flutter_tools/lib/src/asset.dart
+@@ -6,6 +6,7 @@ import 'dart:async';
+ 
+ import 'package:yaml/yaml.dart';
+ 
++import 'base/common.dart';
+ import 'base/context.dart';
+ import 'base/file_system.dart';
+ import 'base/platform.dart';
+@@ -326,7 +327,7 @@ List<_Asset> _getMaterialAssets(String fontSet) {
+     for (Map<dynamic, dynamic> font in family['fonts']) {
+       final Uri entryUri = fs.path.toUri(font['asset'] as String);
+       result.add(_Asset(
+-        baseDir: fs.path.join(Cache.flutterRoot, 'bin', 'cache', 'artifacts', 'material_fonts'),
++        baseDir: fs.path.join(homeDirPath, '.cache', 'flutter', 'artifacts', 'material_fonts'),
+         relativeUri: Uri(path: entryUri.pathSegments.last),
+         entryUri: entryUri,
+       ));
+diff --git a/packages/flutter_tools/lib/src/cache.dart b/packages/flutter_tools/lib/src/cache.dart
+index 5e1950b56..45585f9c0 100644
+--- a/packages/flutter_tools/lib/src/cache.dart
++++ b/packages/flutter_tools/lib/src/cache.dart
+@@ -164,8 +164,14 @@ class Cache {
+       return;
+     }
+     assert(_lock == null);
++
++    final Directory dir = fs.directory(fs.path.join(homeDirPath, '.cache', 'flutter'));
++    if (!dir.existsSync()) {
++      dir.createSync(recursive: true);
++      os.chmod(dir, '755');
++    }
+     final File lockFile =
+-        fs.file(fs.path.join(flutterRoot, 'bin', 'cache', 'lockfile'));
++        fs.file(fs.path.join(homeDirPath, '.cache', 'flutter', 'lockfile'));
+     try {
+       _lock = lockFile.openSync(mode: FileMode.write);
+     } on FileSystemException catch (e) {
+@@ -239,7 +245,7 @@ class Cache {
+     if (_rootOverride != null) {
+       return fs.directory(fs.path.join(_rootOverride.path, 'bin', 'cache'));
+     } else {
+-      return fs.directory(fs.path.join(flutterRoot, 'bin', 'cache'));
++      return fs.directory(fs.path.join(homeDirPath, '.cache', 'flutter'));
+     }
+   }
+ 
diff --git a/nixpkgs/pkgs/development/compilers/flux/default.nix b/nixpkgs/pkgs/development/compilers/flux/default.nix
new file mode 100644
index 000000000000..c599c9f8baf5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/flux/default.nix
@@ -0,0 +1,21 @@
+{ stdenv, lib, fetchFromGitHub, autoreconfHook, pkgconfig }:
+
+stdenv.mkDerivation rec {
+  pname = "flux";
+  version = "2013-09-20";
+
+  src = fetchFromGitHub {
+    owner = "deniskropp";
+    repo = pname;
+    rev = "e45758aa9384b9740ff021ea952399fd113eb0e9";
+    sha256 = "11f3ypg0sdq5kj69zgz6kih1yrzgm48r16spyvzwvlswng147410";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkgconfig ];
+
+  meta = with lib; {
+    description = "An interface description language used by DirectFB";
+    homepage = "https://github.com/deniskropp/flux";
+    license = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/fpc/binary-builder.sh b/nixpkgs/pkgs/development/compilers/fpc/binary-builder.sh
new file mode 100755
index 000000000000..4308c1ed211a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fpc/binary-builder.sh
@@ -0,0 +1,14 @@
+source $stdenv/setup
+
+tar xf $src
+cd */
+tarballdir=$(pwd)
+for i in *.tar; do tar xvf $i; done
+echo "Deploying binaries.."
+mkdir $out
+cd $out
+for i in $tarballdir/*.gz; do tar xvf $i; done
+echo 'Creating ppc* symlink..'
+for i in $out/lib/fpc/*/ppc*; do
+  ln -fs $i $out/bin/$(basename $i)
+done
diff --git a/nixpkgs/pkgs/development/compilers/fpc/binary.nix b/nixpkgs/pkgs/development/compilers/fpc/binary.nix
new file mode 100644
index 000000000000..f160150d8b53
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fpc/binary.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation {
+  name = "fpc-3.0.0-binary";
+
+  src =
+    if stdenv.hostPlatform.system == "i686-linux" then
+      fetchurl {
+        url = "mirror://sourceforge/project/freepascal/Linux/3.0.0/fpc-3.0.0.i386-linux.tar";
+        sha256 = "0h3f1dgs1zsx7vvk9kg67anjvgw5sslfbmjblif7ishbcp3k3g5k";
+      }
+    else if stdenv.hostPlatform.system == "x86_64-linux" then
+      fetchurl {
+        url = "mirror://sourceforge/project/freepascal/Linux/3.0.0/fpc-3.0.0.x86_64-linux.tar";
+        sha256 = "1m2xx3nda45cb3zidbjgdr8kddd19zk0khvp7xxdlclszkqscln9";
+      }
+    else throw "Not supported on ${stdenv.hostPlatform.system}.";
+
+  builder = ./binary-builder.sh;
+
+  meta = {
+    description = "Free Pascal Compiler from a binary distribution";
+  };
+} 
diff --git a/nixpkgs/pkgs/development/compilers/fpc/default.nix b/nixpkgs/pkgs/development/compilers/fpc/default.nix
new file mode 100644
index 000000000000..42804677dc08
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fpc/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, fetchurl, gawk }:
+
+let startFPC = import ./binary.nix { inherit stdenv fetchurl; }; in
+
+stdenv.mkDerivation rec {
+  version = "3.0.4";
+  pname = "fpc";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/freepascal/fpcbuild-${version}.tar.gz";
+    sha256 = "0xjyhlhz846jbnp12y68c7nq4xmp4i65akfbrjyf3r62ybk18rgn";
+  };
+
+  buildInputs = [ startFPC gawk ];
+  glibc = stdenv.cc.libc.out;
+
+  preConfigure =
+    if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux" then ''
+      sed -e "s@'/lib/ld-linux[^']*'@'''@" -i fpcsrc/compiler/systems/t_linux.pas
+      sed -e "s@'/lib64/ld-linux[^']*'@'''@" -i fpcsrc/compiler/systems/t_linux.pas
+      sed -e "s@/lib64[^']*@${glibc}/lib@" -i fpcsrc/compiler/systems/t_linux.pas
+    '' else "";
+
+  makeFlags = [ "NOGDB=1" "FPC=${startFPC}/bin/fpc" ];
+
+  installFlags = [ "INSTALL_PREFIX=\${out}" ];
+
+  postInstall = ''
+    for i in $out/lib/fpc/*/ppc*; do
+      ln -fs $i $out/bin/$(basename $i)
+    done
+    mkdir -p $out/lib/fpc/etc/
+    $out/lib/fpc/*/samplecfg $out/lib/fpc/${version} $out/lib/fpc/etc/
+  '';
+
+  passthru = {
+    bootstrap = startFPC;
+  };
+
+  meta = with stdenv.lib; {
+    description = "Free Pascal Compiler from a source distribution";
+    homepage = "https://www.freepascal.org";
+    maintainers = [ maintainers.raskin ];
+    license = with licenses; [ gpl2 lgpl2 ];
+    platforms = platforms.linux;
+    inherit version;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/fpc/default.upstream b/nixpkgs/pkgs/development/compilers/fpc/default.upstream
new file mode 100644
index 000000000000..9f16c1b645cd
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fpc/default.upstream
@@ -0,0 +1,6 @@
+url https://sourceforge.net/projects/freepascal/files/Source/
+SF_version_dir
+version_link 'fpcbuild-[0-9.]+[.]tar[.]gz/download$'
+SF_redirect
+version '.*-([0-9.]+)[.]tar[.]gz' '\1'
+do_overwrite () { do_overwrite_just_version; }
diff --git a/nixpkgs/pkgs/development/compilers/fpc/lazarus.nix b/nixpkgs/pkgs/development/compilers/fpc/lazarus.nix
new file mode 100644
index 000000000000..31a0727da90b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fpc/lazarus.nix
@@ -0,0 +1,53 @@
+{ stdenv, fetchurl, makeWrapper
+, fpc, gtk2, glib, pango, atk, gdk-pixbuf
+, libXi, xorgproto, libX11, libXext
+, gdb, gnumake, binutils
+}:
+stdenv.mkDerivation rec {
+  pname = "lazarus";
+  version = "2.0.8";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/lazarus/Lazarus%20Zip%20_%20GZip/Lazarus%20${version}/lazarus-${version}.tar.gz";
+    sha256 = "1iciqydb0miqdrh89aj59gy7kfcwikkycqssq9djcqsw1ql3gc4h";
+  };
+
+  buildInputs = [
+    fpc gtk2 glib libXi xorgproto
+    libX11 libXext pango atk
+    stdenv.cc makeWrapper gdk-pixbuf
+  ];
+
+  makeFlags = [
+    "FPC=fpc"
+    "PP=fpc"
+    "REQUIRE_PACKAGES+=tachartlazaruspkg"
+    "bigide"
+  ];
+
+  preBuild = ''
+    export makeFlags="$makeFlags LAZARUS_INSTALL_DIR=$out/share/lazarus/ INSTALL_PREFIX=$out/"
+    export NIX_LDFLAGS="$NIX_LDFLAGS -L${stdenv.cc.cc.lib}/lib -lXi -lX11 -lglib-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -lc -lXext -lpango-1.0 -latk-1.0 -lgdk_pixbuf-2.0 -lcairo -lgcc_s"
+    export LCL_PLATFORM=gtk2
+    mkdir -p $out/share "$out/lazarus"
+    tar xf ${fpc.src} --strip-components=1 -C $out/share -m
+    sed -e 's@/usr/fpcsrc@'"$out/share/fpcsrc@" -i ide/include/unix/lazbaseconf.inc
+  '';
+
+  postInstall = ''
+    wrapProgram $out/bin/startlazarus --prefix NIX_LDFLAGS ' ' \
+      "$(echo "$NIX_LDFLAGS" | sed -re 's/-rpath [^ ]+//g')" \
+      --prefix NIX_LDFLAGS_${binutils.suffixSalt} ' ' \
+      "$(echo "$NIX_LDFLAGS" | sed -re 's/-rpath [^ ]+//g')" \
+      --prefix LCL_PLATFORM ' ' "$LCL_PLATFORM" \
+      --prefix PATH ':' "${fpc}/bin:${gdb}/bin:${gnumake}/bin:${binutils}/bin"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Lazarus graphical IDE for FreePascal language";
+    homepage = "http://www.lazarus.freepascal.org";
+    license = licenses.gpl2Plus ;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.raskin ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/fsharp/default.nix b/nixpkgs/pkgs/development/compilers/fsharp/default.nix
new file mode 100644
index 000000000000..0c60403a6bee
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fsharp/default.nix
@@ -0,0 +1,48 @@
+# Temporarily avoid dependency on dotnetbuildhelpers to avoid rebuilding many times while working on it
+
+{ stdenv, fetchurl, mono, pkgconfig, dotnetbuildhelpers, autoconf, automake, which }:
+
+stdenv.mkDerivation rec {
+  pname = "fsharp";
+  version = "4.0.1.1";
+
+  src = fetchurl {
+    url = "https://github.com/fsharp/fsharp/archive/${version}.tar.gz";
+    sha256 = "0mvmvwwpl4zq0yvgzdizww8l9azvlrc82xm32nz1fi1nw8x5qfqk";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ mono dotnetbuildhelpers autoconf automake which ];
+
+  configurePhase = ''
+    sed -i '988d' src/FSharpSource.targets
+    substituteInPlace ./autogen.sh --replace "/usr/bin/env sh" "${stdenv.shell}"
+    ./autogen.sh --prefix $out
+  '';
+
+  # Make sure the executables use the right mono binary,
+  # and set up some symlinks for backwards compatibility.
+  postInstall = ''
+    substituteInPlace $out/bin/fsharpc --replace " mono " " ${mono}/bin/mono "
+    substituteInPlace $out/bin/fsharpi --replace " mono " " ${mono}/bin/mono "
+    substituteInPlace $out/bin/fsharpiAnyCpu --replace " mono " " ${mono}/bin/mono "
+    ln -s $out/bin/fsharpc $out/bin/fsc
+    ln -s $out/bin/fsharpi $out/bin/fsi
+    for dll in "$out/lib/mono/4.5"/FSharp*.dll
+    do
+      create-pkg-config-for-dll.sh "$out/lib/pkgconfig" "$dll"
+    done
+  '';
+
+  # To fix this error when running:
+  # The file "/nix/store/path/whatever.exe" is an not a valid CIL image
+  dontStrip = true;
+
+  meta = {
+    description = "A functional CLI language";
+    homepage = "https://fsharp.org/";
+    license = stdenv.lib.licenses.asl20;
+    maintainers = with stdenv.lib.maintainers; [ thoughtpolice raskin ];
+    platforms = with stdenv.lib.platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/fsharp41/default.nix b/nixpkgs/pkgs/development/compilers/fsharp41/default.nix
new file mode 100644
index 000000000000..8a4fa303937c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fsharp41/default.nix
@@ -0,0 +1,125 @@
+# Temporaririly avoid dependency on dotnetbuildhelpers to avoid rebuilding many times while working on it
+
+{ stdenv, fetchurl, pkgconfig, autoconf, automake, which, mono, msbuild, dotnetbuildhelpers, dotnetPackages }:
+
+stdenv.mkDerivation rec {
+  pname = "fsharp";
+  version = "4.1.34";
+
+  src = fetchurl {
+    url = "https://github.com/fsharp/fsharp/archive/${version}.tar.gz";
+    sha256 = "0cv6p5pin962vhbpsji40nkckkag5c96kq5qihvg60pc1z821p0i";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [
+    autoconf
+    automake
+    which
+    mono
+    msbuild
+    dotnetbuildhelpers
+    dotnetPackages.FsCheck262
+    dotnetPackages.FSharpCompilerTools
+    dotnetPackages.FSharpCore302
+    dotnetPackages.FSharpCore3125
+    dotnetPackages.FSharpCore4001
+    dotnetPackages.FSharpCore4117
+    dotnetPackages.FSharpData225
+    dotnetPackages.FsLexYacc706
+    dotnetPackages.MicrosoftDiaSymReader
+    dotnetPackages.MicrosoftDiaSymReaderPortablePdb
+    dotnetPackages.NUnit350
+    dotnetPackages.SystemCollectionsImmutable131
+    dotnetPackages.SystemReflectionMetadata
+    dotnetPackages.SystemValueTuple
+  ];
+
+  # https://github.com/mono/mono/tree/fe0f311a848068ab2d17a9b9dd15326e5712d520/packaging/MacSDK/patches
+  # https://github.com/mono/mono/issues/7805
+  patches = [
+    ./fsharp-IsPathRooted-type-inference.patch
+    ./fsharp-string-switchName.patch
+    ./fsharp-path-overloads.patch
+  ];
+
+  configurePhase = ''
+    substituteInPlace ./autogen.sh --replace "/usr/bin/env sh" "${stdenv.shell}"
+    ./autogen.sh --prefix $out
+  '';
+
+  preBuild = ''
+    substituteInPlace Makefile --replace "MONO_ENV_OPTIONS=\$(monoopts) mono .nuget/NuGet.exe restore packages.config -PackagesDirectory packages -ConfigFile .nuget/NuGet.Config" "true"
+    substituteInPlace src/fsharp/Fsc-proto/Fsc-proto.fsproj --replace "<FSharpCoreOptSigFiles Include=\"\$(FSharpCoreLkgPath)\\FSharp.Core.dll\" />" ""
+    substituteInPlace src/fsharp/Fsc-proto/Fsc-proto.fsproj --replace "<FSharpCoreOptSigFiles Include=\"\$(FSharpCoreLkgPath)\\FSharp.Core.optdata\" />" ""
+    substituteInPlace src/fsharp/Fsc-proto/Fsc-proto.fsproj --replace "<FSharpCoreOptSigFiles Include=\"\$(FSharpCoreLkgPath)\\FSharp.Core.sigdata\" />" ""
+    substituteInPlace src/fsharp/Fsc-proto/Fsc-proto.fsproj --replace "<FSharpCoreOptSigFiles Include=\"\$(FSharpCoreLkgPath)\\FSharp.Core.xml\" />" ""
+
+    rm -rf packages
+    mkdir packages
+
+    ln -s ${dotnetPackages.FsCheck262}/lib/dotnet/FsCheck packages/FsCheck.2.6.2
+    ln -s ${dotnetPackages.FSharpCompilerTools}/lib/dotnet/FSharp.Compiler.Tools packages/FSharp.Compiler.Tools.4.1.27
+    ln -s ${dotnetPackages.FSharpCore302}/lib/dotnet/FSharp.Core/ packages/FSharp.Core.3.0.2
+    ln -s ${dotnetPackages.FSharpCore3125}/lib/dotnet/FSharp.Core/ packages/FSharp.Core.3.1.2.5
+    ln -s ${dotnetPackages.FSharpCore4001}/lib/dotnet/FSharp.Core/ packages/FSharp.Core.4.0.0.1
+    ln -s ${dotnetPackages.FSharpCore4117}/lib/dotnet/FSharp.Core/ packages/FSharp.Core.4.1.17
+    ln -s ${dotnetPackages.FSharpData225}/lib/dotnet/FSharp.Data/ packages/FSharp.Data.2.2.5
+    ln -s ${dotnetPackages.FsLexYacc706}/lib/dotnet/FsLexYacc/ packages/FsLexYacc.7.0.6
+    ln -s ${dotnetPackages.MicrosoftDiaSymReader}/lib/dotnet/Microsoft.DiaSymReader/ packages/Microsoft.DiaSymReader.1.1.0
+    ln -s ${dotnetPackages.MicrosoftDiaSymReaderPortablePdb}/lib/dotnet/Microsoft.DiaSymReader.PortablePdb/ packages/Microsoft.DiaSymReader.PortablePdb.1.2.0
+    ln -s ${dotnetPackages.NUnit350}/lib/dotnet/NUnit/ packages/NUnit.3.5.0
+    ln -s ${dotnetPackages.SystemCollectionsImmutable131}/lib/dotnet/System.Collections.Immutable/ packages/System.Collections.Immutable.1.3.1
+    ln -s ${dotnetPackages.SystemReflectionMetadata}/lib/dotnet/System.Reflection.Metadata/ packages/System.Reflection.Metadata.1.4.2
+    ln -s ${dotnetPackages.SystemValueTuple}/lib/dotnet/System.ValueTuple/ packages/System.ValueTuple.4.3.1
+  '';
+
+  # Signing /home/jdanek/nix/nixpkgs/build/fss/fsharp-4.1.34/again/fsharp-4.1.34/Release/fsharp30/net40/bin/FSharp.Core.dll with Mono key
+  # ERROR: Unknown error during processing: System.UnauthorizedAccessException: Access to the path
+  #   "Release/fsharp30/net40/bin/FSharp.Core.dll" is denied.
+  preInstall = ''
+    find Release/ -name FSharp.Core.dll -exec chmod u+w {} \;
+  '';
+
+  # Set up some symlinks for backwards compatibility.
+  postInstall = ''
+    ln -s $out/bin/fsharpc $out/bin/fsc
+    ln -s $out/bin/fsharpi $out/bin/fsi
+    for dll in "$out/lib/mono/fsharp"/FSharp*.dll
+    do
+      create-pkg-config-for-dll.sh "$out/lib/pkgconfig" "$dll"
+    done
+  '';
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    echo 'printf "int = %i" (6 * 7);;' > script.fsx
+    $out/bin/fsi --exec script.fsx | grep "int = 42"
+    $out/bin/fsharpi --exec script.fsx | grep "int = 42"
+    $out/bin/fsharpiAnyCpu --exec script.fsx | grep "int = 42"
+
+    cat > answer.fs <<EOF
+open System
+
+[<EntryPoint>]
+let main argv =
+    printfn "int = %i" (6 * 7)
+    0
+EOF
+
+    $out/bin/fsc answer.fs
+    ${mono}/bin/mono answer.exe | grep "int = 42"
+  '';
+
+  # To fix this error when running:
+  # The file "/nix/store/path/whatever.exe" is an not a valid CIL image
+  dontStrip = true;
+
+  meta = {
+    description = "A functional CLI language";
+    homepage = "https://fsharp.org/";
+    license = stdenv.lib.licenses.asl20;
+    maintainers = with stdenv.lib.maintainers; [ thoughtpolice raskin ];
+    platforms = with stdenv.lib.platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/fsharp41/fsharp-IsPathRooted-type-inference.patch b/nixpkgs/pkgs/development/compilers/fsharp41/fsharp-IsPathRooted-type-inference.patch
new file mode 100644
index 000000000000..06dd3e82adc9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fsharp41/fsharp-IsPathRooted-type-inference.patch
@@ -0,0 +1,21 @@
+commit c37fce5b3019c7a150203fc3a484885591b194de
+Author: Alexis Christoforides <alexis@thenull.net>
+Date:   Sun Dec 2 00:10:24 2018 -0500
+
+    Help Path.IsPathRooted method overload selection.
+
+    .NET Core, and Mono after merging https://github.com/mono/mono/pull/11342, introduce ambiguity with a new overload.
+
+diff --git a/src/scripts/scriptlib.fsx b/src/scripts/scriptlib.fsx
+index cc797e305..699c7bb93 100644
+--- a/src/scripts/scriptlib.fsx
++++ b/src/scripts/scriptlib.fsx
+@@ -92,7 +92,7 @@ module Scripting =
+
+     module Process =
+
+-        let processExePath baseDir exe =
++        let processExePath baseDir (exe:string) =
+             if Path.IsPathRooted(exe) then exe
+             else
+                 match Path.GetDirectoryName(exe) with
diff --git a/nixpkgs/pkgs/development/compilers/fsharp41/fsharp-path-overloads.patch b/nixpkgs/pkgs/development/compilers/fsharp41/fsharp-path-overloads.patch
new file mode 100644
index 000000000000..f791317d0802
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fsharp41/fsharp-path-overloads.patch
@@ -0,0 +1,22 @@
+diff --git a/src/scripts/scriptlib.fsx b/src/scripts/scriptlib.fsx
+index cc797e305..ae8a6d3cc 100644
+--- a/src/scripts/scriptlib.fsx
++++ b/src/scripts/scriptlib.fsx
+@@ -59,12 +59,12 @@ module Scripting =
+
+     let (++) a b = Path.Combine(a,b)
+
+-    let getBasename a = Path.GetFileNameWithoutExtension a
+-    let getFullPath a = Path.GetFullPath a
+-    let getFilename a = Path.GetFileName a
+-    let getDirectoryName a = Path.GetDirectoryName a
++    let getBasename (path: string) = Path.GetFileNameWithoutExtension path
++    let getFullPath (path: string) = Path.GetFullPath path
++    let getFilename (path: string) = Path.GetFileName path
++    let getDirectoryName (path: string) = Path.GetDirectoryName path
+
+-    let copyFile source dir =
++    let copyFile (source: string) dir =
+         let dest = 
+             if not (Directory.Exists dir) then Directory.CreateDirectory dir |>ignore
+             let result = Path.Combine(dir, Path.GetFileName source)
diff --git a/nixpkgs/pkgs/development/compilers/fsharp41/fsharp-string-switchName.patch b/nixpkgs/pkgs/development/compilers/fsharp41/fsharp-string-switchName.patch
new file mode 100644
index 000000000000..4b36eaabcafc
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fsharp41/fsharp-string-switchName.patch
@@ -0,0 +1,13 @@
+diff --git a/src/scripts/scriptlib.fsx b/src/scripts/scriptlib.fsx
+index cc797e305..5a7be7d2b 100644
+--- a/src/scripts/scriptlib.fsx
++++ b/src/scripts/scriptlib.fsx
+@@ -36,7 +36,7 @@ module Scripting =
+ #if INTERACTIVE
+     let argv = Microsoft.FSharp.Compiler.Interactive.Settings.fsi.CommandLineArgs |> Seq.skip 1 |> Seq.toArray
+
+-    let getCmdLineArgOptional switchName = 
++    let getCmdLineArgOptional (switchName: string) =
+         argv |> Array.filter(fun t -> t.StartsWith(switchName)) |> Array.map(fun t -> t.Remove(0, switchName.Length).Trim()) |> Array.tryHead 
+
+     let getCmdLineArg switchName defaultValue = 
diff --git a/nixpkgs/pkgs/development/compilers/fstar/default.nix b/nixpkgs/pkgs/development/compilers/fstar/default.nix
new file mode 100644
index 000000000000..548abeff78d0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/fstar/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, fetchFromGitHub, z3, ocamlPackages, makeWrapper, installShellFiles }:
+
+stdenv.mkDerivation rec {
+  pname = "fstar";
+  version = "0.9.6.0";
+
+  src = fetchFromGitHub {
+    owner = "FStarLang";
+    repo = "FStar";
+    rev = "v${version}";
+    sha256 = "0wix7l229afkn6c6sk4nwkfq0nznsiqdkds4ixi2yyf72immwmmb";
+  };
+
+  nativeBuildInputs = [ makeWrapper installShellFiles ];
+
+  buildInputs = with ocamlPackages; [
+    z3 ocaml findlib batteries menhir stdint
+    zarith camlp4 yojson pprint
+    ulex ocaml-migrate-parsetree process ppx_deriving ppx_deriving_yojson ocamlbuild
+  ];
+
+  makeFlags = [ "PREFIX=$(out)" ];
+
+  preBuild = ''
+    patchShebangs src/tools
+    patchShebangs bin
+  '';
+  buildFlags = [ "-C" "src/ocaml-output" ];
+
+  preInstall = ''
+    mkdir -p $out/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib/fstarlib
+  '';
+  installFlags = [ "-C" "src/ocaml-output" ];
+  postInstall = ''
+    wrapProgram $out/bin/fstar.exe --prefix PATH ":" "${z3}/bin"
+    installShellCompletion --bash .completion/bash/fstar.exe.bash
+    installShellCompletion --fish .completion/fish/fstar.exe.fish
+    installShellCompletion --zsh --name _fstar.exe .completion/zsh/__fstar.exe
+  '';
+
+  meta = with stdenv.lib; {
+    description = "ML-like functional programming language aimed at program verification";
+    homepage = "https://www.fstar-lang.org";
+    license = licenses.asl20;
+    platforms = with platforms; darwin ++ linux;
+    maintainers = with maintainers; [ gebner ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gambit/bootstrap.nix b/nixpkgs/pkgs/development/compilers/gambit/bootstrap.nix
new file mode 100644
index 000000000000..ec963ab3b8d4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gambit/bootstrap.nix
@@ -0,0 +1,44 @@
+# This derivation is a reduced-functionality variant of Gambit stable,
+# used to compile the full version of Gambit stable *and* unstable.
+
+{ gccStdenv, lib, fetchurl, autoconf, gcc, coreutils, gambit-support, ... }:
+# As explained in build.nix, GCC compiles Gambit 10x faster than Clang, for code 3x better
+
+gccStdenv.mkDerivation {
+  pname = "gambit-bootstrap";
+  version = "4.9.3";
+
+  src = fetchurl {
+    url = "http://www.iro.umontreal.ca/~gambit/download/gambit/v4.9/source/gambit-v4_9_3.tgz";
+    sha256 = "1p6172vhcrlpjgia6hsks1w4fl8rdyjf9xjh14wxfkv7dnx8a5hk";
+  };
+
+  buildInputs = [ autoconf ];
+
+  configurePhase = ''
+    export CC=${gcc}/bin/gcc CXX=${gcc}/bin/g++ \
+           CPP=${gcc}/bin/cpp CXXCPP=${gcc}/bin/cpp LD=${gcc}/bin/ld \
+           XMKMF=${coreutils}/bin/false
+    unset CFLAGS LDFLAGS LIBS CPPFLAGS CXXFLAGS
+    ./configure --prefix=$out/gambit
+  '';
+
+  buildPhase = ''
+    # Copy the (configured) sources now, not later, so we don't have to filter out
+    # all the intermediate build products.
+    mkdir -p $out/gambit ; cp -rp . $out/gambit/
+
+    # build the gsc-boot* compiler
+    make -j$NIX_BUILD_CORES bootstrap
+  '';
+
+  installPhase = ''
+    cp -fa ./ $out/gambit/
+  '';
+
+  forceShare = [ "info" ];
+
+  meta = gambit-support.meta // {
+    description = "Optimizing Scheme to C compiler, bootstrap step";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gambit/build.nix b/nixpkgs/pkgs/development/compilers/gambit/build.nix
new file mode 100644
index 000000000000..c6a48bd744e7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gambit/build.nix
@@ -0,0 +1,108 @@
+{ gccStdenv, lib, git, openssl, autoconf, pkgs, makeStaticLibraries, gcc, coreutils, gnused, gnugrep,
+  src, version, git-version,
+  gambit-support, optimizationSetting ? "-O1", gambit-params ? pkgs.gambit-support.stable-params }:
+
+# Note that according to a benchmark run by Marc Feeley on May 2018,
+# clang is 10x (with default settings) to 15% (with -O2) slower than GCC at compiling
+# Gambit output, producing code that is 3x slower. IIRC the benchmarks from Gambit@30,
+# the numbers were still heavily in favor of GCC in October 2019.
+# Thus we use GCC over clang, even on macOS.
+#
+# Also note that I (fare) just ran benchmarks from https://github.com/ecraven/r7rs-benchmarks
+# with Gambit 4.9.3 with -O1 vs -O2 vs -Os on Feb 2020. Which wins depends on the benchmark.
+# The fight is unclear between -O1 and -O2, where -O1 wins more often, by up to 17%,
+# but sometimes -O2 wins, once by up to 43%, so that overall -O2 is 5% faster.
+# However, -Os seems more consistent in winning slightly against both -O1 and -O2,
+# and is overall 15% faster than -O2. As for compile times, -O1 is fastest,
+# -Os is about 29%-33% slower than -O1, while -O2 is about 40%-50% slower than -O1.
+#
+# Overall, -Os seems like the best choice, but I care more about compile-time,
+# so I stick with -O1 (in the defaults above), which is also the default for Gambit.
+
+gccStdenv.mkDerivation rec {
+
+  pname = "gambit";
+  inherit src version git-version;
+  bootstrap = gambit-support.gambit-bootstrap;
+
+  # TODO: if/when we can get all the library packages we depend on to have static versions,
+  # we could use something like (makeStaticLibraries openssl) to enable creation
+  # of statically linked binaries by gsc.
+  buildInputs = [ git autoconf bootstrap openssl ];
+
+  # TODO: patch gambit's source so it has the full path to sed, grep, fgrep? Is there more?
+  # Or wrap relevant programs to add a suitable PATH ?
+  #runtimeDeps = [ gnused gnugrep ];
+
+  configureFlags = [
+    "--enable-single-host"
+    "--enable-c-opt=${optimizationSetting}"
+    "--enable-gcc-opts"
+    "--enable-shared"
+    "--enable-absolute-shared-libs" # Yes, NixOS will want an absolute path, and fix it.
+    "--enable-openssl"
+    "--enable-default-runtime-options=${gambit-params.defaultRuntimeOptions}"
+    # "--enable-debug" # Nope: enables plenty of good stuff, but also the costly console.log
+    # "--enable-multiple-versions" # Nope, NixOS already does version multiplexing
+    # "--enable-guide"
+    # "--enable-track-scheme"
+    # "--enable-high-res-timing"
+    # "--enable-max-processors=4"
+    # "--enable-multiple-vms"
+    # "--enable-dynamic-tls"
+    # "--enable-multiple-threaded-vms"  # when SMP branch is merged in
+    # "--enable-thread-system=posix"    # default when --enable-multiple-vms is on.
+    # "--enable-profile"
+    # "--enable-coverage"
+    # "--enable-inline-jumps"
+    # "--enable-char-size=1" # default is 4
+  ] ++
+    # due not enable poll on darwin due to https://github.com/gambit/gambit/issues/498
+    lib.optional (!gccStdenv.isDarwin) "--enable-poll";
+
+  configurePhase = ''
+    export CC=${gcc}/bin/gcc \
+           CXX=${gcc}/bin/g++ \
+           CPP=${gcc}/bin/cpp \
+           CXXCPP=${gcc}/bin/cpp \
+           LD=${gcc}/bin/ld \
+           XMKMF=${coreutils}/bin/false
+    unset CFLAGS LDFLAGS LIBS CPPFLAGS CXXFLAGS
+
+    ${gambit-params.fix-stamp git-version}
+
+    ./configure --prefix=$out/gambit ${builtins.concatStringsSep " " configureFlags}
+
+    # OS-specific paths are hardcoded in ./configure
+    substituteInPlace config.status \
+      --replace /usr/local/opt/openssl/lib "${openssl.out}/lib" \
+      --replace /usr/local/opt/openssl@1.1/lib "${openssl.out}/lib"
+    ./config.status
+  '';
+
+  buildPhase = ''
+    # Make bootstrap compiler, from release bootstrap
+    mkdir -p boot &&
+    cp -rp ${bootstrap}/gambit/. boot/. &&
+    chmod -R u+w boot &&
+    cd boot &&
+    cp ../gsc/makefile.in ../gsc/*.scm gsc/ && # */
+    ./configure &&
+    for i in lib gsi gsc ; do (cd $i ; make -j$NIX_BUILD_CORES) ; done &&
+    cd .. &&
+    cp boot/gsc/gsc gsc-boot &&
+
+    # Now use the bootstrap compiler to build the real thing!
+    make -j$NIX_BUILD_CORES from-scratch
+  '';
+
+  postInstall = ''
+    mkdir $out/bin
+    cd $out/bin
+    ln -s ../gambit/bin/* .
+  '';
+
+  doCheck = true;
+
+  meta = gambit-support.meta;
+}
diff --git a/nixpkgs/pkgs/development/compilers/gambit/default.nix b/nixpkgs/pkgs/development/compilers/gambit/default.nix
new file mode 100644
index 000000000000..8f77daa4173b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gambit/default.nix
@@ -0,0 +1,10 @@
+{ callPackage, fetchurl }:
+
+callPackage ./build.nix rec {
+  version = "4.9.3";
+  git-version = version;
+  src = fetchurl {
+    url = "http://www.iro.umontreal.ca/~gambit/download/gambit/v4.9/source/gambit-v4_9_3.tgz";
+    sha256 = "1p6172vhcrlpjgia6hsks1w4fl8rdyjf9xjh14wxfkv7dnx8a5hk";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gambit/gambit-support.nix b/nixpkgs/pkgs/development/compilers/gambit/gambit-support.nix
new file mode 100644
index 000000000000..0e78831f2e4e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gambit/gambit-support.nix
@@ -0,0 +1,33 @@
+{ pkgs, lib }:
+
+rec {
+  stable-params = {
+    defaultRuntimeOptions = "f8,-8,t8";
+    buildRuntimeOptions = "f8,-8,t8";
+    fix-stamp = git-version : "";
+  };
+
+  unstable-params = {
+    defaultRuntimeOptions = "iL,fL,-L,tL";
+    buildRuntimeOptions = "i8,f8,-8,t8";
+    fix-stamp = git-version : ''
+      substituteInPlace configure \
+        --replace "$(grep '^PACKAGE_VERSION=.*$' configure)" 'PACKAGE_VERSION="v${git-version}"' \
+        --replace "$(grep '^PACKAGE_STRING=.*$' configure)" 'PACKAGE_STRING="Gambit v${git-version}"' ;
+    '';
+  };
+
+  export-gambopt = params : "export GAMBOPT=${params.buildRuntimeOptions} ;";
+
+  gambit-bootstrap = import ./bootstrap.nix ( pkgs );
+
+  meta = {
+    description = "Optimizing Scheme to C compiler";
+    homepage    = "http://gambitscheme.org";
+    license     = lib.licenses.lgpl21; # dual, also asl20
+    # NB regarding platforms: continuously tested on Linux,
+    # tested on macOS once in a while, *should* work everywhere.
+    platforms   = lib.platforms.unix;
+    maintainers = with lib.maintainers; [ thoughtpolice raskin fare ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gambit/unstable.nix b/nixpkgs/pkgs/development/compilers/gambit/unstable.nix
new file mode 100644
index 000000000000..3ac4f5363195
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gambit/unstable.nix
@@ -0,0 +1,13 @@
+{ callPackage, fetchFromGitHub, gambit-support }:
+
+callPackage ./build.nix {
+  version = "unstable-2020-05-15";
+  git-version = "4.9.3-1109-g3c4d40de";
+  src = fetchFromGitHub {
+    owner = "feeley";
+    repo = "gambit";
+    rev = "3c4d40de908ae03ca0e3d854edc2234ef401b36c";
+    sha256 = "1c9a6rys2kiiqb79gvw29nv3dwwk6hmi1q4jk1whcx7mds7q5dvr";
+  };
+  gambit-params = gambit-support.unstable-params;
+}
diff --git a/nixpkgs/pkgs/development/compilers/gavrasm/default.nix b/nixpkgs/pkgs/development/compilers/gavrasm/default.nix
new file mode 100644
index 000000000000..58e8b45b61af
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gavrasm/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchzip, fpc , lang ? "en" } :
+assert stdenv.lib.assertOneOf "lang" lang ["cn" "de" "en" "fr" "tr"];
+stdenv.mkDerivation rec {
+  pname = "gavrasm";
+  version = "4.5";
+
+  src = fetchzip {
+    url ="http://www.avr-asm-tutorial.net/gavrasm/v45/gavrasm_sources_lin_45.zip";
+    sha256 = "1f5g5ran74pznwj4g7vfqh2qhymaj3p26f2lvzbmlwq447iid52c";
+    stripRoot=false;
+  };
+
+  nativeBuildInputs = [ fpc ];
+
+  configurePhase = ''
+    cp gavrlang_${lang}.pas gavrlang.pas
+  '';
+
+  buildPhase = ''
+    fpc gavrasm.pas
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp gavrasm $out/bin
+    mkdir -p $out/doc
+    cp instr.asm $out/doc
+    cp ReadMe.Txt $out/doc
+    cp LiesMich.Txt $out/doc
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "http://www.avr-asm-tutorial.net/gavrasm";
+    description = "AVR Assembler for ATMEL AVR-Processors";
+    license = licenses.unfree;
+    maintainers = with maintainers; [ mafo ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/6/default.nix b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/6/default.nix
new file mode 100644
index 000000000000..f635fce972f5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/6/default.nix
@@ -0,0 +1,51 @@
+{ stdenv
+, fetchurl
+, ncurses5
+, python27
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gcc-arm-embedded";
+  version = "6-2017-q2-update";
+  subdir = "6-2017q2";
+
+  suffix = {
+    x86_64-darwin = "mac";
+    x86_64-linux  = "linux";
+  }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+
+  src = fetchurl {
+    url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-${suffix}.tar.bz2";
+    sha256 = {
+      x86_64-darwin = "0019ylpq4inq7p5gydpmc9m8ni72fz2csrjlqmgx1698998q0c3x";
+      x86_64-linux  = "1hvwi02mx34al525sngnl0cm7dkmzxfkb1brq9kvbv28wcplp3p6";
+    }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+  };
+
+  phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
+
+  installPhase = ''
+    mkdir -p $out
+    cp -r * $out
+    ln -s $out/share/doc/gcc-arm-none-eabi/man $out/man
+  '';
+
+  dontPatchELF = true;
+  dontStrip = true;
+
+  preFixup = ''
+    find $out -type f | while read f; do
+      patchelf $f > /dev/null 2>&1 || continue
+      patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
+      patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python27 ]} "$f" || true
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors";
+    homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm";
+    license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
+    maintainers = with maintainers; [ prusnak ];
+    platforms = [ "x86_64-linux" "x86_64-darwin" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/7/default.nix b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/7/default.nix
new file mode 100644
index 000000000000..4944038fde41
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/7/default.nix
@@ -0,0 +1,51 @@
+{ stdenv
+, fetchurl
+, ncurses5
+, python27
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gcc-arm-embedded";
+  version = "7-2018-q2-update";
+  subdir = "7-2018q2";
+
+  suffix = {
+    x86_64-darwin = "mac";
+    x86_64-linux  = "linux";
+  }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+
+  src = fetchurl {
+    url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-${suffix}.tar.bz2";
+    sha256 = {
+      x86_64-darwin = "0nc7m0mpa39qyhfyydxkkyqm7spfc27xf6ygi2vd2aym4r9azi61";
+      x86_64-linux  = "0sgysp3hfpgrkcbfiwkp0a7ymqs02khfbrjabm52b5z61sgi05xv";
+    }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+  };
+
+  phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
+
+  installPhase = ''
+    mkdir -p $out
+    cp -r * $out
+    ln -s $out/share/doc/gcc-arm-none-eabi/man $out/man
+  '';
+
+  dontPatchELF = true;
+  dontStrip = true;
+
+  preFixup = ''
+    find $out -type f | while read f; do
+      patchelf $f > /dev/null 2>&1 || continue
+      patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
+      patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python27 ]} "$f" || true
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors";
+    homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm";
+    license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
+    maintainers = with maintainers; [ prusnak ];
+    platforms = [ "x86_64-linux" "x86_64-darwin" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/8/default.nix b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/8/default.nix
new file mode 100644
index 000000000000..510889dad621
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/8/default.nix
@@ -0,0 +1,51 @@
+{ stdenv
+, fetchurl
+, ncurses5
+, python27
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gcc-arm-embedded";
+  version = "8-2019-q3-update";
+  subdir = "8-2019q3/RC1.1";
+
+  suffix = {
+    x86_64-darwin = "mac";
+    x86_64-linux  = "linux";
+  }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+
+  src = fetchurl {
+    url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-${suffix}.tar.bz2";
+    sha256 = {
+      x86_64-darwin = "fc235ce853bf3bceba46eff4b95764c5935ca07fc4998762ef5e5b7d05f37085";
+      x86_64-linux  = "b50b02b0a16e5aad8620e9d7c31110ef285c1dde28980b1a9448b764d77d8f92";
+    }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+  };
+
+  phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
+
+  installPhase = ''
+    mkdir -p $out
+    cp -r * $out
+    ln -s $out/share/doc/gcc-arm-none-eabi/man $out/man
+  '';
+
+  dontPatchELF = true;
+  dontStrip = true;
+
+  preFixup = ''
+    find $out -type f | while read f; do
+      patchelf $f > /dev/null 2>&1 || continue
+      patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
+      patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python27 ]} "$f" || true
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors";
+    homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm";
+    license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
+    maintainers = with maintainers; [ prusnak ];
+    platforms = [ "x86_64-linux" "x86_64-darwin" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/9/default.nix b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/9/default.nix
new file mode 100644
index 000000000000..8ded47d6e370
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc-arm-embedded/9/default.nix
@@ -0,0 +1,53 @@
+{ stdenv
+, fetchurl
+, ncurses5
+, python27
+}:
+
+stdenv.mkDerivation rec {
+  pname = "gcc-arm-embedded";
+  version = "9-2019-q4-major";
+  subdir = "9-2019q4/RC2.1";
+
+  suffix = {
+    aarch64-linux = "aarch64-linux";
+    x86_64-darwin = "mac";
+    x86_64-linux  = "x86_64-linux";
+  }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+
+  src = fetchurl {
+    url = "https://developer.arm.com/-/media/Files/downloads/gnu-rm/${subdir}/gcc-arm-none-eabi-${version}-${suffix}.tar.bz2";
+    sha256 = {
+      aarch64-linux = "1f5b9309006737950b2218250e6bb392e2d68d4f1a764fe66be96e2a78888d83";
+      x86_64-darwin = "1249f860d4155d9c3ba8f30c19e7a88c5047923cea17e0d08e633f12408f01f0";
+      x86_64-linux  = "bcd840f839d5bf49279638e9f67890b2ef3a7c9c7a9b25271e83ec4ff41d177a";
+    }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
+  };
+
+  phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
+
+  installPhase = ''
+    mkdir -p $out
+    cp -r * $out
+    ln -s $out/share/doc/gcc-arm-none-eabi/man $out/man
+  '';
+
+  dontPatchELF = true;
+  dontStrip = true;
+
+  preFixup = ''
+    find $out -type f | while read f; do
+      patchelf $f > /dev/null 2>&1 || continue
+      patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$f" || true
+      patchelf --set-rpath ${stdenv.lib.makeLibraryPath [ "$out" stdenv.cc.cc ncurses5 python27 ]} "$f" || true
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Pre-built GNU toolchain from ARM Cortex-M & Cortex-R processors";
+    homepage = "https://developer.arm.com/open-source/gnu-toolchain/gnu-rm";
+    license = with licenses; [ bsd2 gpl2 gpl3 lgpl21 lgpl3 mit ];
+    maintainers = with maintainers; [ prusnak ];
+    platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gcc/10/default.nix b/nixpkgs/pkgs/development/compilers/gcc/10/default.nix
new file mode 100644
index 000000000000..ae723a145313
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/10/default.nix
@@ -0,0 +1,287 @@
+{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
+, langC ? true, langCC ? true, langFortran ? false
+, langAda ? false
+, langObjC ? stdenv.targetPlatform.isDarwin
+, langObjCpp ? stdenv.targetPlatform.isDarwin
+, langGo ? false
+, profiledCompiler ? false
+, langJit ? false
+, staticCompiler ? false
+, enableShared ? true
+, enableLTO ? true
+, texinfo ? null
+, perl ? null # optional, for texi2pod (then pod2man)
+, gmp, mpfr, libmpc, gettext, which
+, libelf                      # optional, for link-time optimizations (LTO)
+, isl ? null # optional, for the Graphite optimization framework.
+, zlib ? null
+, gnatboot ? null
+, enableMultilib ? false
+, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
+, name ? "gcc"
+, libcCross ? null
+, threadsCross ? null # for MinGW
+, crossStageStatic ? false
+, # Strip kills static libs of other archs (hence no cross)
+  stripped ? stdenv.hostPlatform == stdenv.buildPlatform
+          && stdenv.targetPlatform == stdenv.hostPlatform
+, gnused ? null
+, cloog # unused; just for compat with gcc4, as we override the parameter on some places
+, buildPackages
+}:
+
+# LTO needs libelf and zlib.
+assert libelf != null -> zlib != null;
+
+# Make sure we get GNU sed.
+assert stdenv.hostPlatform.isDarwin -> gnused != null;
+
+# The go frontend is written in c++
+assert langGo -> langCC;
+assert langAda -> gnatboot != null;
+
+# threadsCross is just for MinGW
+assert threadsCross != null -> stdenv.targetPlatform.isWindows;
+
+with stdenv.lib;
+with builtins;
+
+let majorVersion = "10";
+    version = "${majorVersion}.1.0";
+
+    inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
+    patches =
+         optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
+      ++ optional noSysDirs ../no-sys-dirs.patch
+      /* ++ optional (hostPlatform != buildPlatform) (fetchpatch { # XXX: Refine when this should be applied
+        url = "https://git.busybox.net/buildroot/plain/package/gcc/${version}/0900-remove-selftests.patch?id=11271540bfe6adafbc133caf6b5b902a816f5f02";
+        sha256 = ""; # TODO: uncomment and check hash when available.
+      }) */
+      ++ optional langAda ../gnat-cflags.patch
+      ++ optional langFortran ../gfortran-driving.patch
+      ++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch
+      ++ optional (!crossStageStatic && targetPlatform.isMinGW) (fetchpatch {
+        url = "https://raw.githubusercontent.com/lhmouse/MINGW-packages/${import ../common/mfcgthreads-patches-repo.nix}/mingw-w64-gcc-git/9000-gcc-${majorVersion}-branch-Added-mcf-thread-model-support-from-mcfgthread.patch";
+        sha256 = "1in5kvcknlpi9z1vvjw6jfmwy8k12zvbqlqfnq84qpm99r0rh00a";
+      });
+
+    /* Cross-gcc settings (build == host != target) */
+    crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
+    stageNameAddon = if crossStageStatic then "stage-static" else "stage-final";
+    crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-";
+
+in
+
+stdenv.mkDerivation ({
+  pname = "${crossNameAddon}${name}${if stripped then "" else "-debug"}";
+  inherit version;
+
+  builder = ../builder.sh;
+
+  src = fetchurl {
+    url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz";
+    sha256 = "b6898a23844b656f1b68691c5c012036c2e694ac4b53a8918d4712ad876e7ea2";
+  };
+
+  inherit patches;
+
+  outputs = [ "out" "man" "info" ] ++ stdenv.lib.optional (!langJit) "lib";
+  setOutputFlags = false;
+  NIX_NO_SELF_RPATH = true;
+
+  libc_dev = stdenv.cc.libc_dev;
+
+  hardeningDisable = [ "format" "pie" ];
+
+  # This should kill all the stdinc frameworks that gcc and friends like to
+  # insert into default search paths.
+  prePatch = stdenv.lib.optionalString hostPlatform.isDarwin ''
+    substituteInPlace gcc/config/darwin-c.c \
+      --replace 'if (stdinc)' 'if (0)'
+
+    substituteInPlace libgcc/config/t-slibgcc-darwin \
+      --replace "-install_name @shlib_slibdir@/\$(SHLIB_INSTALL_NAME)" "-install_name ''${!outputLib}/lib/\$(SHLIB_INSTALL_NAME)"
+
+    substituteInPlace libgfortran/configure \
+      --replace "-install_name \\\$rpath/\\\$soname" "-install_name ''${!outputLib}/lib/\\\$soname"
+  '';
+
+  postPatch = ''
+    configureScripts=$(find . -name configure)
+    for configureScript in $configureScripts; do
+      patchShebangs $configureScript
+    done
+  '' + (
+    if targetPlatform != hostPlatform || stdenv.cc.libc != null then
+      # On NixOS, use the right path to the dynamic linker instead of
+      # `/lib/ld*.so'.
+      let
+        libc = if libcCross != null then libcCross else stdenv.cc.libc;
+      in
+        (
+        '' echo "fixing the \`GLIBC_DYNAMIC_LINKER', \`UCLIBC_DYNAMIC_LINKER', and \`MUSL_DYNAMIC_LINKER' macros..."
+           for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
+           do
+             grep -q _DYNAMIC_LINKER "$header" || continue
+             echo "  fixing \`$header'..."
+             sed -i "$header" \
+                 -e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g' \
+                 -e 's|define[[:blank:]]*MUSL_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define MUSL_DYNAMIC_LINKER\1 "${libc.out}\2"|g'
+           done
+        ''
+        + stdenv.lib.optionalString (targetPlatform.libc == "musl")
+        ''
+            sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR'
+        ''
+        )
+    else "")
+      + stdenv.lib.optionalString targetPlatform.isAvr ''
+	        makeFlagsArray+=(
+	           'LIMITS_H_TEST=false'
+	        )
+	      '';
+
+  inherit noSysDirs staticCompiler crossStageStatic
+    libcCross crossMingw;
+
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+  nativeBuildInputs = [ texinfo which gettext ]
+    ++ (optional (perl != null) perl);
+
+  # For building runtime libs
+  depsBuildTarget =
+    if hostPlatform == buildPlatform then [
+      targetPackages.stdenv.cc.bintools # newly-built gcc will be used
+    ] else assert targetPlatform == hostPlatform; [ # build != host == target
+      stdenv.cc
+    ];
+
+  buildInputs = [
+    gmp mpfr libmpc libelf
+    targetPackages.stdenv.cc.bintools # For linking code at run-time
+  ] ++ (optional (isl != null) isl)
+    ++ (optional (zlib != null) zlib)
+    # The builder relies on GNU sed (for instance, Darwin's `sed' fails with
+    # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
+    ++ (optional hostPlatform.isDarwin gnused)
+    ++ (optional langAda gnatboot)
+    ;
+
+  depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
+
+  NIX_LDFLAGS = stdenv.lib.optionalString  hostPlatform.isSunOS "-lm -ldl";
+
+  preConfigure = import ../common/pre-configure.nix {
+    inherit (stdenv) lib;
+    inherit version hostPlatform gnatboot langAda langGo;
+  };
+
+  dontDisableStatic = true;
+
+  # TODO(@Ericson2314): Always pass "--target" and always prefix.
+  configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
+
+  configureFlags = import ../common/configure-flags.nix {
+    inherit
+      stdenv
+      targetPackages
+      crossStageStatic libcCross
+      version
+
+      gmp mpfr libmpc libelf isl
+
+      enableLTO
+      enableMultilib
+      enablePlugin
+      enableShared
+
+      langC
+      langCC
+      langFortran
+      langAda
+      langGo
+      langObjC
+      langObjCpp
+      langJit
+      ;
+  };
+
+  targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
+
+  buildFlags = optional
+    (targetPlatform == hostPlatform && hostPlatform == buildPlatform)
+    (if profiledCompiler then "profiledbootstrap" else "bootstrap");
+
+  dontStrip = !stripped;
+
+  installTargets = optional stripped "install-strip";
+
+  # https://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
+  ${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
+
+  # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the
+  # library headers and binaries, regarless of the language being compiled.
+  #
+  # Likewise, the LTO code doesn't find zlib.
+  #
+  # Cross-compiling, we need gcc not to read ./specs in order to build the g++
+  # compiler (after the specs for the cross-gcc are created). Having
+  # LIBRARY_PATH= makes gcc read the specs from ., and the build breaks.
+
+  CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([]
+    ++ optional (zlib != null) zlib
+  ));
+
+  LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath (optional (zlib != null) zlib));
+
+  inherit
+    (import ../common/extra-target-flags.nix {
+      inherit stdenv crossStageStatic libcCross threadsCross;
+    })
+    EXTRA_FLAGS_FOR_TARGET
+    EXTRA_LDFLAGS_FOR_TARGET
+    ;
+
+  passthru = {
+    inherit langC langCC langObjC langObjCpp langAda langFortran langGo version;
+    isGNU = true;
+  };
+
+  enableParallelBuilding = true;
+  inherit enableMultilib;
+
+  inherit (stdenv) is64bit;
+
+  meta = {
+    homepage = "https://gcc.gnu.org/";
+    license = stdenv.lib.licenses.gpl3Plus;  # runtime support libraries are typically LGPLv3+
+    description = "GNU Compiler Collection, version ${version}"
+      + (if stripped then "" else " (with debugging info)");
+
+    longDescription = ''
+      The GNU Compiler Collection includes compiler front ends for C, C++,
+      Objective-C, Fortran, OpenMP for C/C++/Fortran, and Ada, as well as
+      libraries for these languages (libstdc++, libgomp,...).
+
+      GCC development is a part of the GNU Project, aiming to improve the
+      compiler used in the GNU system including the GNU/Linux variant.
+    '';
+
+    maintainers = with stdenv.lib.maintainers; [ synthetica ];
+
+    platforms =
+      stdenv.lib.platforms.linux ++
+      stdenv.lib.platforms.freebsd ++
+      stdenv.lib.platforms.illumos ++
+      stdenv.lib.platforms.darwin;
+  };
+}
+
+// optionalAttrs (targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt" && crossStageStatic) {
+  makeFlags = [ "all-gcc" "all-target-libgcc" ];
+  installTargets = "install-gcc install-target-libgcc";
+}
+
+// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
+)
diff --git a/nixpkgs/pkgs/development/compilers/gcc/4.8/default.nix b/nixpkgs/pkgs/development/compilers/gcc/4.8/default.nix
new file mode 100644
index 000000000000..6a2c506b1bf3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/4.8/default.nix
@@ -0,0 +1,314 @@
+{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
+, langC ? true, langCC ? true, langFortran ? false
+, langObjC ? stdenv.targetPlatform.isDarwin
+, langObjCpp ? stdenv.targetPlatform.isDarwin
+, langJava ? false
+, langGo ? false
+, profiledCompiler ? false
+, langJit ? false
+, staticCompiler ? false
+, enableShared ? true
+, enableLTO ? true
+, texinfo ? null
+, perl ? null # optional, for texi2pod (then pod2man); required for Java
+, gmp, mpfr, libmpc, gettext, which
+, libelf                      # optional, for link-time optimizations (LTO)
+, cloog ? null, isl ? null # optional, for the Graphite optimization framework.
+, zlib ? null, boehmgc ? null
+, zip ? null, unzip ? null, pkgconfig ? null
+, gtk2 ? null, libart_lgpl ? null
+, libX11 ? null, libXt ? null, libSM ? null, libICE ? null, libXtst ? null
+, libXrender ? null, xorgproto ? null
+, libXrandr ? null, libXi ? null
+, x11Support ? langJava
+, enableMultilib ? false
+, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
+, name ? "gcc"
+, libcCross ? null
+, threadsCross ? null # for MinGW
+, crossStageStatic ? false
+, # Strip kills static libs of other archs (hence no cross)
+  stripped ? stdenv.hostPlatform == stdenv.buildPlatform
+          && stdenv.targetPlatform == stdenv.hostPlatform
+, gnused ? null
+, buildPackages
+}:
+
+assert langJava     -> zip != null && unzip != null
+                       && zlib != null && boehmgc != null
+                       && perl != null;  # for `--enable-java-home'
+
+# We enable the isl cloog backend.
+assert cloog != null -> isl != null;
+
+# LTO needs libelf and zlib.
+assert libelf != null -> zlib != null;
+
+# Make sure we get GNU sed.
+assert stdenv.hostPlatform.isDarwin -> gnused != null;
+
+# The go frontend is written in c++
+assert langGo -> langCC;
+
+# threadsCross is just for MinGW
+assert threadsCross != null -> stdenv.targetPlatform.isWindows;
+
+with stdenv.lib;
+with builtins;
+
+let majorVersion = "4";
+    version = "${majorVersion}.8.5";
+
+    inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
+    patches = [ ../parallel-bconfig.patch ]
+      ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
+      ++ optional noSysDirs ../no-sys-dirs.patch
+      ++ optional langFortran ../gfortran-driving.patch
+      ++ optional hostPlatform.isDarwin ../gfortran-darwin-NXConstStr.patch
+      ++ [(fetchpatch {
+          name = "libc_name_p.diff"; # needed to build with gcc6
+          url = "https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=ec1cc0263f1";
+          sha256 = "01jd7pdarh54ki498g6sz64ijl9a1l5f9v8q2696aaxalvh2vwzl";
+          excludes = [ "gcc/cp/ChangeLog" ];
+        })]
+      ++ [ # glibc-2.26
+        ../struct-ucontext-4.8.patch
+        ../sigsegv-not-declared.patch
+        ../res_state-not-declared.patch
+      ];
+
+    javaEcj = fetchurl {
+      # The `$(top_srcdir)/ecj.jar' file is automatically picked up at
+      # `configure' time.
+
+      # XXX: Eventually we might want to take it from upstream.
+      url = "ftp://sourceware.org/pub/java/ecj-4.3.jar";
+      sha256 = "0jz7hvc0s6iydmhgh5h2m15yza7p2rlss2vkif30vm9y77m97qcx";
+    };
+
+    # Antlr (optional) allows the Java `gjdoc' tool to be built.  We want a
+    # binary distribution here to allow the whole chain to be bootstrapped.
+    javaAntlr = fetchurl {
+      url = "https://www.antlr.org/download/antlr-4.4-complete.jar";
+      sha256 = "02lda2imivsvsis8rnzmbrbp8rh1kb8vmq4i67pqhkwz7lf8y6dz";
+    };
+
+    xlibs = [
+      libX11 libXt libSM libICE libXtst libXrender libXrandr libXi
+      xorgproto
+    ];
+
+    javaAwtGtk = langJava && x11Support;
+
+    /* Cross-gcc settings (build == host != target) */
+    crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
+    stageNameAddon = if crossStageStatic then "stage-static" else "stage-final";
+    crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-";
+
+in
+
+# We need all these X libraries when building AWT with GTK.
+assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
+
+stdenv.mkDerivation ({
+  pname = "${crossNameAddon}${name}${if stripped then "" else "-debug"}";
+  inherit version;
+
+  builder = ../builder.sh;
+
+  src = fetchurl {
+    url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2";
+    sha256 = "08yggr18v373a1ihj0rg2vd6psnic42b518xcgp3r9k81xz1xyr2";
+  };
+
+  inherit patches;
+
+  hardeningDisable = [ "format" "pie" ];
+
+  outputs = [ "out" "lib" "man" "info" ];
+  setOutputFlags = false;
+  NIX_NO_SELF_RPATH = true;
+
+  libc_dev = stdenv.cc.libc_dev;
+
+  postPatch =
+    if targetPlatform != hostPlatform || stdenv.cc.libc != null then
+      # On NixOS, use the right path to the dynamic linker instead of
+      # `/lib/ld*.so'.
+      let
+        libc = if libcCross != null then libcCross else stdenv.cc.libc;
+      in
+        '' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
+           for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
+           do
+             grep -q LIBC_DYNAMIC_LINKER "$header" || continue
+             echo "  fixing \`$header'..."
+             sed -i "$header" \
+                 -e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g'
+           done
+        ''
+    else null;
+
+  inherit noSysDirs staticCompiler langJava crossStageStatic
+    libcCross crossMingw;
+
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+  nativeBuildInputs = [ texinfo which gettext ]
+    ++ (optional (perl != null) perl)
+    ++ (optional javaAwtGtk pkgconfig);
+
+  # For building runtime libs
+  depsBuildTarget =
+    if hostPlatform == buildPlatform then [
+      targetPackages.stdenv.cc.bintools # newly-built gcc will be used
+    ] else assert targetPlatform == hostPlatform; [ # build != host == target
+      stdenv.cc
+    ];
+
+  buildInputs = [
+    gmp mpfr libmpc libelf
+    targetPackages.stdenv.cc.bintools # For linking code at run-time
+  ] ++ (optional (cloog != null) cloog)
+    ++ (optional (isl != null) isl)
+    ++ (optional (zlib != null) zlib)
+    ++ (optionals langJava [ boehmgc zip unzip ])
+    ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
+    # The builder relies on GNU sed (for instance, Darwin's `sed' fails with
+    # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
+    ++ (optional hostPlatform.isDarwin gnused)
+    ;
+
+  depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
+
+  preConfigure = import ../common/pre-configure.nix {
+    inherit (stdenv) lib;
+    inherit version hostPlatform langJava langGo;
+  };
+
+  dontDisableStatic = true;
+
+  # TODO(@Ericson2314): Always pass "--target" and always prefix.
+  configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
+
+  configureFlags = import ../common/configure-flags.nix {
+    inherit
+      stdenv
+      targetPackages
+      crossStageStatic libcCross
+      version
+
+      gmp mpfr libmpc libelf isl
+      cloog
+
+      enableLTO
+      enableMultilib
+      enablePlugin
+      enableShared
+
+      langC
+      langCC
+      langFortran
+      langJava javaAwtGtk javaAntlr javaEcj
+      langGo
+      langObjC
+      langObjCpp
+      langJit
+      ;
+  };
+
+  targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
+
+  buildFlags = optional
+    (targetPlatform == hostPlatform && hostPlatform == buildPlatform)
+    (if profiledCompiler then "profiledbootstrap" else "bootstrap");
+
+  dontStrip = !stripped;
+
+  doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv
+
+  installTargets = optional stripped "install-strip";
+
+  # https://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
+  ${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
+
+  # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the
+  # library headers and binaries, regarless of the language being compiled.
+  #
+  # Note: When building the Java AWT GTK peer, the build system doesn't honor
+  # `--with-gmp' et al., e.g., when building
+  # `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just add
+  # them to $CPATH and $LIBRARY_PATH in this case.
+  #
+  # Likewise, the LTO code doesn't find zlib.
+  #
+  # Cross-compiling, we need gcc not to read ./specs in order to build the g++
+  # compiler (after the specs for the cross-gcc are created). Having
+  # LIBRARY_PATH= makes gcc read the specs from ., and the build breaks.
+
+  CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([]
+    ++ optional (zlib != null) zlib
+    ++ optional langJava boehmgc
+    ++ optionals javaAwtGtk xlibs
+    ++ optionals javaAwtGtk [ gmp mpfr ]
+  ));
+
+  LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([]
+    ++ optional (zlib != null) zlib
+    ++ optional langJava boehmgc
+    ++ optionals javaAwtGtk xlibs
+    ++ optionals javaAwtGtk [ gmp mpfr ]
+  ));
+
+  inherit
+    (import ../common/extra-target-flags.nix {
+      inherit stdenv crossStageStatic libcCross threadsCross;
+    })
+    EXTRA_FLAGS_FOR_TARGET
+    EXTRA_LDFLAGS_FOR_TARGET
+    ;
+
+  passthru = {
+    inherit langC langCC langObjC langObjCpp langFortran langGo version;
+    isGNU = true;
+    hardeningUnsupportedFlags = [ "stackprotector" ];
+  };
+
+  enableParallelBuilding = true;
+  inherit enableMultilib;
+
+  inherit (stdenv) is64bit;
+
+  meta = {
+    homepage = "https://gcc.gnu.org/";
+    license = stdenv.lib.licenses.gpl3Plus;  # runtime support libraries are typically LGPLv3+
+    description = "GNU Compiler Collection, version ${version}"
+      + (if stripped then "" else " (with debugging info)");
+
+    longDescription = ''
+      The GNU Compiler Collection includes compiler front ends for C, C++,
+      Objective-C, Fortran, OpenMP for C/C++/Fortran, Java, and Ada, as well
+      as libraries for these languages (libstdc++, libgcj, libgomp,...).
+
+      GCC development is a part of the GNU Project, aiming to improve the
+      compiler used in the GNU system including the GNU/Linux variant.
+    '';
+
+    maintainers = with stdenv.lib.maintainers; [ peti veprbl ];
+
+    platforms =
+      stdenv.lib.platforms.linux ++
+      stdenv.lib.platforms.freebsd ++
+      stdenv.lib.platforms.illumos ++
+      stdenv.lib.platforms.darwin;
+    badPlatforms = [ "x86_64-darwin" ];
+  };
+}
+
+// optionalAttrs (targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt" && crossStageStatic) {
+  makeFlags = [ "all-gcc" "all-target-libgcc" ];
+  installTargets = "install-gcc install-target-libgcc";
+}
+
+// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
+)
diff --git a/nixpkgs/pkgs/development/compilers/gcc/4.9/default.nix b/nixpkgs/pkgs/development/compilers/gcc/4.9/default.nix
new file mode 100644
index 000000000000..0a35ed023c6f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/4.9/default.nix
@@ -0,0 +1,331 @@
+{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
+, langC ? true, langCC ? true, langFortran ? false
+, langObjC ? stdenv.targetPlatform.isDarwin
+, langObjCpp ? stdenv.targetPlatform.isDarwin
+, langJava ? false
+, langGo ? false
+, profiledCompiler ? false
+, langJit ? false
+, staticCompiler ? false
+, enableShared ? true
+, enableLTO ? true
+, texinfo ? null
+, perl ? null # optional, for texi2pod (then pod2man); required for Java
+, gmp, mpfr, libmpc, gettext, which
+, libelf                      # optional, for link-time optimizations (LTO)
+, cloog ? null, isl ? null # optional, for the Graphite optimization framework.
+, zlib ? null, boehmgc ? null
+, zip ? null, unzip ? null, pkgconfig ? null
+, gtk2 ? null, libart_lgpl ? null
+, libX11 ? null, libXt ? null, libSM ? null, libICE ? null, libXtst ? null
+, libXrender ? null, xorgproto ? null
+, libXrandr ? null, libXi ? null
+, x11Support ? langJava
+, enableMultilib ? false
+, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
+, name ? "gcc"
+, libcCross ? null
+, threadsCross ? null # for MinGW
+, crossStageStatic ? false
+, # Strip kills static libs of other archs (hence no cross)
+  stripped ? stdenv.hostPlatform == stdenv.buildPlatform
+          && stdenv.targetPlatform == stdenv.hostPlatform
+, gnused ? null
+, buildPackages
+}:
+
+assert langJava     -> zip != null && unzip != null
+                       && zlib != null && boehmgc != null
+                       && perl != null;  # for `--enable-java-home'
+
+# We enable the isl cloog backend.
+assert cloog != null -> isl != null;
+
+# LTO needs libelf and zlib.
+assert libelf != null -> zlib != null;
+
+# Make sure we get GNU sed.
+assert stdenv.hostPlatform.isDarwin -> gnused != null;
+
+# The go frontend is written in c++
+assert langGo -> langCC;
+
+# threadsCross is just for MinGW
+assert threadsCross != null -> stdenv.targetPlatform.isWindows;
+
+with stdenv.lib;
+with builtins;
+
+let majorVersion = "4";
+    version = "${majorVersion}.9.4";
+
+    inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
+    patches =
+      [ ../use-source-date-epoch.patch ../parallel-bconfig.patch ./parallel-strsignal.patch
+        (fetchpatch {
+          name = "avoid-ustat-glibc-2.28.patch";
+          url = "https://gitweb.gentoo.org/proj/gcc-patches.git/plain/4.9.4/gentoo/100_all_avoid-ustat-glibc-2.28.patch?id=55fcb515620a8f7d3bb77eba938aa0fcf0d67c96";
+          sha256 = "0b32sb4psv5lq0ij9fwhi1b4pjbwdjnv24nqprsk14dsc6xmi1g0";
+        })
+      ]
+      ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
+      ++ optional noSysDirs ../no-sys-dirs.patch
+      ++ optional langFortran ../gfortran-driving.patch
+      ++ [ ../struct-ucontext.patch ../struct-sigaltstack-4.9.patch ] # glibc-2.26
+      # Retpoline patches pulled from the branch hjl/indirect/gcc-4_9-branch (by H.J. Lu, the author of GCC upstream retpoline commits)
+      ++ builtins.map ({commit, sha256}: fetchpatch {url = "https://github.com/hjl-tools/gcc/commit/${commit}.patch"; inherit sha256;})
+         [{ commit = "e623d21608e96ecd6b65f0d06312117d20488a38"; sha256 = "1ix8i4d2r3ygbv7npmsdj790rhxqrnfwcqzv48b090r9c3ij8ay3"; }
+          { commit = "2015a09e332309f12de1dadfe179afa6a29368b8"; sha256 = "0xcfs0cbb63llj2gbcdrvxim79ax4k4aswn0a3yjavxsj71s1n91"; }
+          { commit = "6b11591f4494f705e8746e7d58b7f423191f4e92"; sha256 = "0aydyhsm2ig0khgbp27am7vq7liyqrq6kfhfi2ki0ij0ab1hfbga"; }
+          { commit = "203c7d9c3e9cb0f88816b481ef8e7e87b3ecc373"; sha256 = "0wqn16y7wy5kg8ngfcni5qdwfphl01axczibbk49bxclwnzvldqa"; }
+          { commit = "f039c6f284b2c9ce97c8353d6034978795c4872e"; sha256 = "13fkgdb17lpyxfksz1zanxhgpsm0jrss9w61nbl7an4im22hz7ci"; }
+          { commit = "ed42606bdab1c5d9e5ad828cd6fe1a0557f193b7"; sha256 = "0gdnn8v3p03imj3qga2mzdhpgbmjcklkxdl97jvz5xia2ikzknxm"; }
+          { commit = "5278e062ef292fd2fbf987d25389785f4c5c0f99"; sha256 = "0j81x758wf8v7j4rx5wc1cy7yhkvhlhv3wmnarwakxiwsspq0vrs"; }
+          { commit = "76f1ffbbb6cd9f6ecde6c82cd16e20a27242e890"; sha256 = "1py56y6gp7fjf4f8bbsfwh5bs1gnmlqda1ycsmnwlzfm0cshdp0c"; }
+          { commit = "4ca48b2b688b135c0390f54ea9077ef10aedd52c"; sha256 = "15r019pzr3k0lpgyvdc92c8fayw8b5lrzncna4bqmamcsdz7vsaw"; }
+          { commit = "98c7bf9ddc80db965d69d61521b1c7a1cec32d9a"; sha256 = "1d7pfdv1q23nf0wadw7jbp6d6r7pnzjpbyxgbdfv7j1vr9l1bp60"; }
+          { commit = "3dc76b53ad896494ca62550a7a752fecbca3f7a2"; sha256 = "0jvdzfpvfdmklfcjwqblwq1i22iqis7ljpvm7adra5d7zf2xk7xz"; }
+          { commit = "1e961ed49b18e176c7457f53df2433421387c23b"; sha256 = "04dnqqs4qsvz4g8cq6db5id41kzys7hzhcaycwmc9rpqygs2ajwz"; }
+          { commit = "e137c72d099f9b3b47f4cc718aa11eab14df1a9c"; sha256 = "1ms0dmz74yf6kwgjfs4d2fhj8y6mcp2n184r3jk44wx2xc24vgb2"; }];
+
+    javaEcj = fetchurl {
+      # The `$(top_srcdir)/ecj.jar' file is automatically picked up at
+      # `configure' time.
+
+      # XXX: Eventually we might want to take it from upstream.
+      url = "ftp://sourceware.org/pub/java/ecj-4.3.jar";
+      sha256 = "0jz7hvc0s6iydmhgh5h2m15yza7p2rlss2vkif30vm9y77m97qcx";
+    };
+
+    # Antlr (optional) allows the Java `gjdoc' tool to be built.  We want a
+    # binary distribution here to allow the whole chain to be bootstrapped.
+    javaAntlr = fetchurl {
+      url = "https://www.antlr.org/download/antlr-4.4-complete.jar";
+      sha256 = "02lda2imivsvsis8rnzmbrbp8rh1kb8vmq4i67pqhkwz7lf8y6dz";
+    };
+
+    xlibs = [
+      libX11 libXt libSM libICE libXtst libXrender libXrandr libXi
+      xorgproto
+    ];
+
+    javaAwtGtk = langJava && x11Support;
+
+    /* Cross-gcc settings (build == host != target) */
+    crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
+    stageNameAddon = if crossStageStatic then "stage-static" else "stage-final";
+    crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-";
+
+in
+
+# We need all these X libraries when building AWT with GTK.
+assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
+
+stdenv.mkDerivation ({
+  pname = "${crossNameAddon}${name}${if stripped then "" else "-debug"}";
+  inherit version;
+
+  builder = ../builder.sh;
+
+  src = fetchurl {
+    url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2";
+    sha256 = "14l06m7nvcvb0igkbip58x59w3nq6315k6jcz3wr9ch1rn9d44bc";
+  };
+
+  inherit patches;
+
+  hardeningDisable = [ "format" "pie" ];
+
+  outputs = if langJava || langGo then ["out" "man" "info"]
+    else [ "out" "lib" "man" "info" ];
+  setOutputFlags = false;
+  NIX_NO_SELF_RPATH = true;
+
+  libc_dev = stdenv.cc.libc_dev;
+
+  postPatch =
+    if targetPlatform != hostPlatform || stdenv.cc.libc != null then
+      # On NixOS, use the right path to the dynamic linker instead of
+      # `/lib/ld*.so'.
+      let
+        libc = if libcCross != null then libcCross else stdenv.cc.libc;
+      in
+        '' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
+           for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
+           do
+             grep -q LIBC_DYNAMIC_LINKER "$header" || continue
+             echo "  fixing \`$header'..."
+             sed -i "$header" \
+                 -e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g'
+           done
+        ''
+    else null;
+
+  inherit noSysDirs staticCompiler langJava crossStageStatic
+    libcCross crossMingw;
+
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+  nativeBuildInputs = [ texinfo which gettext ]
+    ++ (optional (perl != null) perl)
+    ++ (optional javaAwtGtk pkgconfig);
+
+  # For building runtime libs
+  depsBuildTarget =
+    if hostPlatform == buildPlatform then [
+      targetPackages.stdenv.cc.bintools # newly-built gcc will be used
+    ] else assert targetPlatform == hostPlatform; [ # build != host == target
+      stdenv.cc
+    ];
+
+  buildInputs = [
+    gmp mpfr libmpc libelf
+    targetPackages.stdenv.cc.bintools # For linking code at run-time
+  ] ++ (optional (cloog != null) cloog)
+    ++ (optional (isl != null) isl)
+    ++ (optional (zlib != null) zlib)
+    ++ (optionals langJava [ boehmgc zip unzip ])
+    ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
+    # The builder relies on GNU sed (for instance, Darwin's `sed' fails with
+    # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
+    ++ (optional hostPlatform.isDarwin gnused)
+    ;
+
+  depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
+
+  preConfigure = import ../common/pre-configure.nix {
+    inherit (stdenv) lib;
+    inherit version hostPlatform langJava langGo;
+  };
+
+  dontDisableStatic = true;
+
+  # TODO(@Ericson2314): Always pass "--target" and always prefix.
+  configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
+
+  configureFlags = import ../common/configure-flags.nix {
+    inherit
+      stdenv
+      targetPackages
+      crossStageStatic libcCross
+      version
+
+      gmp mpfr libmpc libelf isl
+      cloog
+
+      enableLTO
+      enableMultilib
+      enablePlugin
+      enableShared
+
+      langC
+      langCC
+      langFortran
+      langJava javaAwtGtk javaAntlr javaEcj
+      langGo
+      langObjC
+      langObjCpp
+      langJit
+      ;
+  };
+
+  targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
+
+  buildFlags = optional
+    (targetPlatform == hostPlatform && hostPlatform == buildPlatform)
+    (if profiledCompiler then "profiledbootstrap" else "bootstrap");
+
+  dontStrip = !stripped;
+
+  doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv
+
+  installTargets = optional stripped "install-strip";
+
+  # https://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
+  ${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
+
+  # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the
+  # library headers and binaries, regarless of the language being compiled.
+  #
+  # Note: When building the Java AWT GTK peer, the build system doesn't honor
+  # `--with-gmp' et al., e.g., when building
+  # `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just add
+  # them to $CPATH and $LIBRARY_PATH in this case.
+  #
+  # Likewise, the LTO code doesn't find zlib.
+  #
+  # Cross-compiling, we need gcc not to read ./specs in order to build the g++
+  # compiler (after the specs for the cross-gcc are created). Having
+  # LIBRARY_PATH= makes gcc read the specs from ., and the build breaks.
+
+  CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([]
+    ++ optional (zlib != null) zlib
+    ++ optional langJava boehmgc
+    ++ optionals javaAwtGtk xlibs
+    ++ optionals javaAwtGtk [ gmp mpfr ]
+  ));
+
+  LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([]
+    ++ optional (zlib != null) zlib
+    ++ optional langJava boehmgc
+    ++ optionals javaAwtGtk xlibs
+    ++ optionals javaAwtGtk [ gmp mpfr ]
+  ));
+
+  inherit
+    (import ../common/extra-target-flags.nix {
+      inherit stdenv crossStageStatic libcCross threadsCross;
+    })
+    EXTRA_FLAGS_FOR_TARGET
+    EXTRA_LDFLAGS_FOR_TARGET
+    ;
+
+  passthru = {
+    inherit langC langCC langObjC langObjCpp langFortran langGo version;
+    isGNU = true;
+  };
+
+  enableParallelBuilding = true;
+  inherit enableMultilib;
+
+  inherit (stdenv) is64bit;
+
+  meta = {
+    homepage = "https://gcc.gnu.org/";
+    license = stdenv.lib.licenses.gpl3Plus;  # runtime support libraries are typically LGPLv3+
+    description = "GNU Compiler Collection, version ${version}"
+      + (if stripped then "" else " (with debugging info)");
+
+    longDescription = ''
+      The GNU Compiler Collection includes compiler front ends for C, C++,
+      Objective-C, Fortran, OpenMP for C/C++/Fortran, Java, and Ada, as well
+      as libraries for these languages (libstdc++, libgcj, libgomp,...).
+
+      GCC development is a part of the GNU Project, aiming to improve the
+      compiler used in the GNU system including the GNU/Linux variant.
+    '';
+
+    maintainers = with stdenv.lib.maintainers; [ peti veprbl ];
+
+    platforms =
+      stdenv.lib.platforms.linux ++
+      stdenv.lib.platforms.freebsd ++
+      stdenv.lib.platforms.illumos ++
+      stdenv.lib.platforms.darwin;
+    badPlatforms = [ "x86_64-darwin" ];
+  };
+}
+
+// optionalAttrs (targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt" && crossStageStatic) {
+  makeFlags = [ "all-gcc" "all-target-libgcc" ];
+  installTargets = "install-gcc install-target-libgcc";
+}
+
+// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
+
+// optionalAttrs (langJava) {
+     postFixup = ''
+       target="$(echo "$out/libexec/gcc"/*/*/ecj*)"
+       patchelf --set-rpath "$(patchelf --print-rpath "$target"):$out/lib" "$target"
+     '';}
+)
diff --git a/nixpkgs/pkgs/development/compilers/gcc/4.9/parallel-strsignal.patch b/nixpkgs/pkgs/development/compilers/gcc/4.9/parallel-strsignal.patch
new file mode 100644
index 000000000000..4c98ca273a54
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/4.9/parallel-strsignal.patch
@@ -0,0 +1,61 @@
+gcc/Makefile.in: fix parallel building failure
+
+The gcc-ar.o, gcc-nm.o, gcc-ranlib.o and errors.o included
+config.h which was a generated file. But no explicity rule
+to clarify the dependency. There was potential building
+failure while parallel make.
+
+For gcc-ar.o, gcc-nm.o and gcc-ranlib.o, they were compiled from one C
+source file gcc-ar.c, we add them to ALL_HOST_BACKEND_OBJS, so the
+'$(ALL_HOST_OBJS) : | $(generated_files)' rule could work for these
+objects.
+
+For errors.o, it is part of gengtype, and the gengtype generator program
+is special: Two versions are built. One is for the build machine, and one
+is for the host. We refered what gengtype-parse.o did (which also is part
+of gengtype).
+
+[GCC #61899]
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61899
+
+Upstream-Status: Send to gcc-patches@gcc.gnu.org mailing list
+
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ gcc/Makefile.in | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index 6475cba..56e50bb 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -1481,13 +1481,16 @@ OBJS-libcommon-target = $(common_out_object_file) prefix.o params.o \
+ 	opts.o opts-common.o options.o vec.o hooks.o common/common-targhooks.o \
+ 	hash-table.o file-find.o
+ 
++# Objects compiled from one C source file gcc-ar.c
++OBJS-gcc-ar = gcc-ar.o gcc-nm.o gcc-ranlib.o
++
+ # This lists all host objects for the front ends.
+ ALL_HOST_FRONTEND_OBJS = $(foreach v,$(CONFIG_LANGUAGES),$($(v)_OBJS))
+ 
+ ALL_HOST_BACKEND_OBJS = $(GCC_OBJS) $(OBJS) $(OBJS-libcommon) \
+   $(OBJS-libcommon-target) @TREEBROWSER@ main.o c-family/cppspec.o \
+   $(COLLECT2_OBJS) $(EXTRA_GCC_OBJS) $(GCOV_OBJS) $(GCOV_DUMP_OBJS) \
+-  lto-wrapper.o
++  lto-wrapper.o $(OBJS-gcc-ar)
+ 
+ # This lists all host object files, whether they are included in this
+ # compilation or not.
+@@ -2437,6 +2440,8 @@ gengtype-parse.o: $(CONFIG_H)
+ CFLAGS-build/gengtype-parse.o += -DGENERATOR_FILE
+ build/gengtype-parse.o: $(BCONFIG_H)
+ 
++errors.o : $(CONFIG_H)
++
+ gengtype-state.o build/gengtype-state.o: gengtype-state.c $(SYSTEM_H) \
+   gengtype.h errors.h double-int.h version.h $(HASHTAB_H) $(OBSTACK_H) \
+   $(XREGEX_H)
+-- 
+1.8.1.2
+
diff --git a/nixpkgs/pkgs/development/compilers/gcc/6/default.nix b/nixpkgs/pkgs/development/compilers/gcc/6/default.nix
new file mode 100644
index 000000000000..f3b15eac55d2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/6/default.nix
@@ -0,0 +1,346 @@
+{ stdenv, targetPackages, fetchurl, fetchpatch, fetchFromGitHub, noSysDirs
+, langC ? true, langCC ? true, langFortran ? false
+, langAda ? false
+, langObjC ? stdenv.targetPlatform.isDarwin
+, langObjCpp ? stdenv.targetPlatform.isDarwin
+, langJava ? false
+, langGo ? false
+, profiledCompiler ? false
+, langJit ? false
+, staticCompiler ? false
+, enableShared ? true
+, enableLTO ? true
+, texinfo ? null
+, flex
+, perl ? null # optional, for texi2pod (then pod2man); required for Java
+, gmp, mpfr, libmpc, gettext, which
+, libelf                      # optional, for link-time optimizations (LTO)
+, isl ? null # optional, for the Graphite optimization framework.
+, zlib ? null, boehmgc ? null
+, gnatboot ? null
+, zip ? null, unzip ? null, pkgconfig ? null
+, gtk2 ? null, libart_lgpl ? null
+, libX11 ? null, libXt ? null, libSM ? null, libICE ? null, libXtst ? null
+, libXrender ? null, xorgproto ? null
+, libXrandr ? null, libXi ? null
+, x11Support ? langJava
+, enableMultilib ? false
+, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
+, name ? "gcc"
+, libcCross ? null
+, threadsCross ? null # for MinGW
+, crossStageStatic ? false
+, # Strip kills static libs of other archs (hence no cross)
+  stripped ? stdenv.hostPlatform == stdenv.buildPlatform
+          && stdenv.targetPlatform == stdenv.hostPlatform
+, gnused ? null
+, cloog # unused; just for compat with gcc4, as we override the parameter on some places
+, buildPackages
+}:
+
+assert langJava     -> zip != null && unzip != null
+                       && zlib != null && boehmgc != null
+                       && perl != null;  # for `--enable-java-home'
+
+# LTO needs libelf and zlib.
+assert libelf != null -> zlib != null;
+
+# Make sure we get GNU sed.
+assert stdenv.hostPlatform.isDarwin -> gnused != null;
+
+# The go frontend is written in c++
+assert langGo -> langCC;
+
+assert langAda -> gnatboot != null;
+
+# threadsCross is just for MinGW
+assert threadsCross != null -> stdenv.targetPlatform.isWindows;
+
+with stdenv.lib;
+with builtins;
+
+let majorVersion = "6";
+    version = "${majorVersion}.5.0";
+
+    inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
+    patches =
+      [ ../use-source-date-epoch.patch ]
+      ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
+      ++ optional noSysDirs ../no-sys-dirs.patch
+      ++ optional langAda ../gnat-cflags.patch
+      ++ optional langFortran ../gfortran-driving.patch
+      ++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch
+      ++ optional (!crossStageStatic && targetPlatform.isMinGW) (fetchpatch {
+        url = "https://raw.githubusercontent.com/lhmouse/MINGW-packages/${import ../common/mfcgthreads-patches-repo.nix}/mingw-w64-gcc-git/9000-gcc-${majorVersion}-branch-Added-mcf-thread-model-support-from-mcfgthread.patch";
+        sha256 = "1c449jgm1vx9g4kv82bxmvlgrwb8f6kwkl0gqmjlmhf7f4hjy2nr";
+      });
+
+    javaEcj = fetchurl {
+      # The `$(top_srcdir)/ecj.jar' file is automatically picked up at
+      # `configure' time.
+
+      # XXX: Eventually we might want to take it from upstream.
+      url = "ftp://sourceware.org/pub/java/ecj-4.3.jar";
+      sha256 = "0jz7hvc0s6iydmhgh5h2m15yza7p2rlss2vkif30vm9y77m97qcx";
+    };
+
+    # Antlr (optional) allows the Java `gjdoc' tool to be built.  We want a
+    # binary distribution here to allow the whole chain to be bootstrapped.
+    javaAntlr = fetchurl {
+      url = "https://www.antlr.org/download/antlr-4.4-complete.jar";
+      sha256 = "02lda2imivsvsis8rnzmbrbp8rh1kb8vmq4i67pqhkwz7lf8y6dz";
+    };
+
+    xlibs = [
+      libX11 libXt libSM libICE libXtst libXrender libXrandr libXi
+      xorgproto
+    ];
+
+    javaAwtGtk = langJava && x11Support;
+
+    /* Cross-gcc settings (build == host != target) */
+    crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
+    stageNameAddon = if crossStageStatic then "stage-static" else "stage-final";
+    crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-";
+
+in
+
+# We need all these X libraries when building AWT with GTK.
+assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
+
+stdenv.mkDerivation ({
+  pname = "${crossNameAddon}${name}${if stripped then "" else "-debug"}";
+  inherit version;
+
+  builder = ../builder.sh;
+
+  src = if stdenv.targetPlatform.isVc4 then fetchFromGitHub {
+    owner = "itszor";
+    repo = "gcc-vc4";
+    rev = "e90ff43f9671c760cf0d1dd62f569a0fb9bf8918";
+    sha256 = "0gxf66hwqk26h8f853sybphqa5ca0cva2kmrw5jsiv6139g0qnp8";
+  } else fetchurl {
+    url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.xz";
+    sha256 = "0i89fksfp6wr1xg9l8296aslcymv2idn60ip31wr9s4pwin7kwby";
+  };
+
+  inherit patches;
+
+  outputs = if langJava || langGo || langJit then ["out" "man" "info"]
+    else [ "out" "lib" "man" "info" ];
+  setOutputFlags = false;
+  NIX_NO_SELF_RPATH = true;
+
+  libc_dev = stdenv.cc.libc_dev;
+
+  hardeningDisable = [ "format" "pie" ];
+
+  prePatch =
+    # This should kill all the stdinc frameworks that gcc and friends like to
+    # insert into default search paths.
+    stdenv.lib.optionalString hostPlatform.isDarwin ''
+      substituteInPlace gcc/config/darwin-c.c \
+        --replace 'if (stdinc)' 'if (0)'
+
+      substituteInPlace libgcc/config/t-slibgcc-darwin \
+        --replace "-install_name @shlib_slibdir@/\$(SHLIB_INSTALL_NAME)" "-install_name ''${!outputLib}/lib/\$(SHLIB_INSTALL_NAME)"
+
+      substituteInPlace libgfortran/configure \
+        --replace "-install_name \\\$rpath/\\\$soname" "-install_name ''${!outputLib}/lib/\\\$soname"
+    '';
+
+  postPatch =
+    if targetPlatform != hostPlatform || stdenv.cc.libc != null then
+      # On NixOS, use the right path to the dynamic linker instead of
+      # `/lib/ld*.so'.
+      let
+        libc = if libcCross != null then libcCross else stdenv.cc.libc;
+      in
+        (
+        '' echo "fixing the \`GLIBC_DYNAMIC_LINKER', \`UCLIBC_DYNAMIC_LINKER', and \`MUSL_DYNAMIC_LINKER' macros..."
+           for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
+           do
+             grep -q _DYNAMIC_LINKER "$header" || continue
+             echo "  fixing \`$header'..."
+             sed -i "$header" \
+                 -e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g' \
+                 -e 's|define[[:blank:]]*MUSL_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define MUSL_DYNAMIC_LINKER\1 "${libc.out}\2"|g'
+           done
+        ''
+        + stdenv.lib.optionalString (targetPlatform.libc == "musl")
+        ''
+            sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR'
+        ''
+        )
+    else null;
+
+  inherit noSysDirs staticCompiler langJava crossStageStatic
+    libcCross crossMingw;
+
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+  nativeBuildInputs = [ texinfo which gettext ]
+    ++ (optional (perl != null) perl)
+    ++ (optional javaAwtGtk pkgconfig)
+    ++ (optional (stdenv.targetPlatform.isVc4) flex);
+
+  # For building runtime libs
+  depsBuildTarget =
+    if hostPlatform == buildPlatform then [
+      targetPackages.stdenv.cc.bintools # newly-built gcc will be used
+    ] else assert targetPlatform == hostPlatform; [ # build != host == target
+      stdenv.cc
+    ];
+
+  buildInputs = [
+    gmp mpfr libmpc libelf
+    targetPackages.stdenv.cc.bintools # For linking code at run-time
+  ] ++ (optional (isl != null) isl)
+    ++ (optional (zlib != null) zlib)
+    ++ (optionals langJava [ boehmgc zip unzip ])
+    ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
+    # The builder relies on GNU sed (for instance, Darwin's `sed' fails with
+    # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
+    ++ (optional hostPlatform.isDarwin gnused)
+    ++ (optional langAda gnatboot)
+    ;
+
+  depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
+
+  NIX_LDFLAGS = stdenv.lib.optionalString  hostPlatform.isSunOS "-lm -ldl";
+
+  preConfigure = import ../common/pre-configure.nix {
+    inherit (stdenv) lib;
+    inherit version hostPlatform gnatboot langJava langAda langGo;
+  };
+
+  dontDisableStatic = true;
+
+  # TODO(@Ericson2314): Always pass "--target" and always prefix.
+  configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
+
+  configureFlags = import ../common/configure-flags.nix {
+    inherit
+      stdenv
+      targetPackages
+      crossStageStatic libcCross
+      version
+
+      gmp mpfr libmpc libelf isl
+
+      enableLTO
+      enableMultilib
+      enablePlugin
+      enableShared
+
+      langC
+      langCC
+      langFortran
+      langJava javaAwtGtk javaAntlr javaEcj
+      langAda
+      langGo
+      langObjC
+      langObjCpp
+      langJit
+      ;
+  };
+
+  targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
+
+  buildFlags = optional
+    (targetPlatform == hostPlatform && hostPlatform == buildPlatform)
+    (if profiledCompiler then "profiledbootstrap" else "bootstrap");
+
+  dontStrip = !stripped;
+
+  doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv
+
+  installTargets = optional stripped "install-strip";
+
+  # https://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
+  ${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
+
+  # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the
+  # library headers and binaries, regarless of the language being compiled.
+  #
+  # Note: When building the Java AWT GTK peer, the build system doesn't honor
+  # `--with-gmp' et al., e.g., when building
+  # `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just add
+  # them to $CPATH and $LIBRARY_PATH in this case.
+  #
+  # Likewise, the LTO code doesn't find zlib.
+  #
+  # Cross-compiling, we need gcc not to read ./specs in order to build the g++
+  # compiler (after the specs for the cross-gcc are created). Having
+  # LIBRARY_PATH= makes gcc read the specs from ., and the build breaks.
+
+  CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([]
+    ++ optional (zlib != null) zlib
+    ++ optional langJava boehmgc
+    ++ optionals javaAwtGtk xlibs
+    ++ optionals javaAwtGtk [ gmp mpfr ]
+  ));
+
+  LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ([]
+    ++ optional (zlib != null) zlib
+    ++ optional langJava boehmgc
+    ++ optionals javaAwtGtk xlibs
+    ++ optionals javaAwtGtk [ gmp mpfr ]
+  ));
+
+  inherit
+    (import ../common/extra-target-flags.nix {
+      inherit stdenv crossStageStatic libcCross threadsCross;
+    })
+    EXTRA_FLAGS_FOR_TARGET
+    EXTRA_LDFLAGS_FOR_TARGET
+    ;
+
+  passthru = {
+    inherit langC langCC langObjC langObjCpp langFortran langAda langGo version;
+    isGNU = true;
+  };
+
+  enableParallelBuilding = true;
+  inherit enableMultilib;
+
+  inherit (stdenv) is64bit;
+
+  meta = {
+    homepage = "https://gcc.gnu.org/";
+    license = stdenv.lib.licenses.gpl3Plus;  # runtime support libraries are typically LGPLv3+
+    description = "GNU Compiler Collection, version ${version}"
+      + (if stripped then "" else " (with debugging info)");
+
+    longDescription = ''
+      The GNU Compiler Collection includes compiler front ends for C, C++,
+      Objective-C, Fortran, OpenMP for C/C++/Fortran, Java, and Ada, as well
+      as libraries for these languages (libstdc++, libgcj, libgomp,...).
+
+      GCC development is a part of the GNU Project, aiming to improve the
+      compiler used in the GNU system including the GNU/Linux variant.
+    '';
+
+    maintainers = with stdenv.lib.maintainers; [ peti ];
+
+    platforms =
+      stdenv.lib.platforms.linux ++
+      stdenv.lib.platforms.freebsd ++
+      stdenv.lib.platforms.illumos ++
+      stdenv.lib.platforms.darwin;
+  };
+}
+
+// optionalAttrs (targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt" && crossStageStatic) {
+  makeFlags = [ "all-gcc" "all-target-libgcc" ];
+  installTargets = "install-gcc install-target-libgcc";
+}
+
+// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
+
+// optionalAttrs (langJava && !stdenv.hostPlatform.isDarwin) {
+     postFixup = ''
+       target="$(echo "$out/libexec/gcc"/*/*/ecj*)"
+       patchelf --set-rpath "$(patchelf --print-rpath "$target"):$out/lib" "$target"
+     '';}
+)
diff --git a/nixpkgs/pkgs/development/compilers/gcc/6/fix-objdump-check.patch b/nixpkgs/pkgs/development/compilers/gcc/6/fix-objdump-check.patch
new file mode 100644
index 000000000000..f9adbe9eb1ca
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/6/fix-objdump-check.patch
@@ -0,0 +1,43 @@
+commit 4c38abe0967bad78dd6baa61c86923e4d4b346d3
+Author: Ben Gamari <ben@smart-cactus.org>
+Date:   Sun Nov 5 13:14:19 2017 -0500
+
+    Fix it
+
+diff --git a/config/gcc-plugin.m4 b/config/gcc-plugin.m4
+index dd06a58..f4435b8 100644
+--- a/config/gcc-plugin.m4
++++ b/config/gcc-plugin.m4
+@@ -13,6 +13,32 @@ dnl the same distribution terms as the rest of that program.
+ # Sets the shell variables enable_plugin and pluginlibs.
+ AC_DEFUN([GCC_ENABLE_PLUGINS],
+   [# Check for plugin support
++
++   # Figure out what objdump we will be using.
++   AS_VAR_SET_IF(gcc_cv_objdump,, [
++   if test -f $gcc_cv_binutils_srcdir/configure.ac \
++        && test -f ../binutils/Makefile \
++        && test x$build = x$host; then
++   	# Single tree build which includes binutils.
++   	gcc_cv_objdump=../binutils/objdump$build_exeext
++   elif test -x objdump$build_exeext; then
++   	gcc_cv_objdump=./objdump$build_exeext
++   elif ( set dummy $OBJDUMP_FOR_TARGET; test -x $[2] ); then
++           gcc_cv_objdump="$OBJDUMP_FOR_TARGET"
++   else
++           AC_PATH_PROG(gcc_cv_objdump, $OBJDUMP_FOR_TARGET)
++   fi])
++   
++   AC_MSG_CHECKING(what objdump to use)
++   if test "$gcc_cv_objdump" = ../binutils/objdump$build_exeext; then
++   	# Single tree build which includes binutils.
++   	AC_MSG_RESULT(newly built objdump)
++   elif test x$gcc_cv_objdump = x; then
++   	AC_MSG_RESULT(not found)
++   else
++   	AC_MSG_RESULT($gcc_cv_objdump)
++   fi
++
+    AC_ARG_ENABLE(plugin,
+    [AS_HELP_STRING([--enable-plugin], [enable plugin support])],
+    enable_plugin=$enableval,
diff --git a/nixpkgs/pkgs/development/compilers/gcc/7/default.nix b/nixpkgs/pkgs/development/compilers/gcc/7/default.nix
new file mode 100644
index 000000000000..89933c22edd4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/7/default.nix
@@ -0,0 +1,295 @@
+{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
+, langC ? true, langCC ? true, langFortran ? false
+, langObjC ? stdenv.targetPlatform.isDarwin
+, langObjCpp ? stdenv.targetPlatform.isDarwin
+, langGo ? false
+, profiledCompiler ? false
+, langJit ? false
+, staticCompiler ? false
+, enableShared ? true
+, enableLTO ? true
+, texinfo ? null
+, perl ? null # optional, for texi2pod (then pod2man)
+, gmp, mpfr, libmpc, gettext, which
+, libelf                      # optional, for link-time optimizations (LTO)
+, isl ? null # optional, for the Graphite optimization framework.
+, zlib ? null
+, enableMultilib ? false
+, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
+, name ? "gcc"
+, libcCross ? null
+, threadsCross ? null # for MinGW
+, crossStageStatic ? false
+, # Strip kills static libs of other archs (hence no cross)
+  stripped ? stdenv.hostPlatform == stdenv.buildPlatform
+          && stdenv.targetPlatform == stdenv.hostPlatform
+, gnused ? null
+, cloog # unused; just for compat with gcc4, as we override the parameter on some places
+, buildPackages
+}:
+
+# LTO needs libelf and zlib.
+assert libelf != null -> zlib != null;
+
+# Make sure we get GNU sed.
+assert stdenv.hostPlatform.isDarwin -> gnused != null;
+
+# The go frontend is written in c++
+assert langGo -> langCC;
+
+# threadsCross is just for MinGW
+assert threadsCross != null -> stdenv.targetPlatform.isWindows;
+
+with stdenv.lib;
+with builtins;
+
+let majorVersion = "7";
+    version = "${majorVersion}.5.0";
+
+    inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
+    patches =
+      [ # https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00633.html
+        ./riscv-pthread-reentrant.patch
+        # https://gcc.gnu.org/ml/gcc-patches/2018-03/msg00297.html
+        ./riscv-no-relax.patch
+      ]
+      ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
+      ++ optionals targetPlatform.isNetBSD [
+        ../libstdc++-netbsd-ctypes.patch
+      ]
+      ++ optional noSysDirs ../no-sys-dirs.patch
+      ++ optional (hostPlatform != buildPlatform) (fetchpatch { # XXX: Refine when this should be applied
+        url = "https://git.busybox.net/buildroot/plain/package/gcc/7.1.0/0900-remove-selftests.patch?id=11271540bfe6adafbc133caf6b5b902a816f5f02";
+        sha256 = "0mrvxsdwip2p3l17dscpc1x8vhdsciqw1z5q9i6p5g9yg1cqnmgs";
+      })
+      ++ optional langFortran ../gfortran-driving.patch
+      ++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch
+      ++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch
+      ++ optional (!crossStageStatic && targetPlatform.isMinGW) (fetchpatch {
+        url = "https://raw.githubusercontent.com/lhmouse/MINGW-packages/${import ../common/mfcgthreads-patches-repo.nix}/mingw-w64-gcc-git/9000-gcc-${majorVersion}-branch-Added-mcf-thread-model-support-from-mcfgthread.patch";
+        sha256 = "1nyjnshpq5gbcbbpfv27hy4ajvycmgkpiabkjlxnnrnq1d99k1ay";
+      });
+
+    /* Cross-gcc settings (build == host != target) */
+    crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
+    stageNameAddon = if crossStageStatic then "stage-static" else "stage-final";
+    crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-";
+
+in
+
+stdenv.mkDerivation ({
+  pname = "${crossNameAddon}${name}${if stripped then "" else "-debug"}";
+  inherit version;
+
+  builder = ../builder.sh;
+
+  src = fetchurl {
+    url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz";
+    sha256 = "0qg6kqc5l72hpnj4vr6l0p69qav0rh4anlkk3y55540zy3klc6dq";
+  };
+
+  inherit patches;
+
+  outputs = [ "out" "man" "info" ] ++ stdenv.lib.optional (!langJit) "lib";
+  setOutputFlags = false;
+  NIX_NO_SELF_RPATH = true;
+
+  libc_dev = stdenv.cc.libc_dev;
+
+  hardeningDisable = [ "format" "pie" ];
+
+  # This should kill all the stdinc frameworks that gcc and friends like to
+  # insert into default search paths.
+  prePatch = stdenv.lib.optionalString hostPlatform.isDarwin ''
+    substituteInPlace gcc/config/darwin-c.c \
+      --replace 'if (stdinc)' 'if (0)'
+
+    substituteInPlace libgcc/config/t-slibgcc-darwin \
+      --replace "-install_name @shlib_slibdir@/\$(SHLIB_INSTALL_NAME)" "-install_name ''${!outputLib}/lib/\$(SHLIB_INSTALL_NAME)"
+
+    substituteInPlace libgfortran/configure \
+      --replace "-install_name \\\$rpath/\\\$soname" "-install_name ''${!outputLib}/lib/\\\$soname"
+  '';
+
+  postPatch = ''
+    configureScripts=$(find . -name configure)
+    for configureScript in $configureScripts; do
+      patchShebangs $configureScript
+    done
+  '' + (
+    if targetPlatform != hostPlatform || stdenv.cc.libc != null then
+      # On NixOS, use the right path to the dynamic linker instead of
+      # `/lib/ld*.so'.
+      let
+        libc = if libcCross != null then libcCross else stdenv.cc.libc;
+      in
+        (
+        '' echo "fixing the \`GLIBC_DYNAMIC_LINKER', \`UCLIBC_DYNAMIC_LINKER', and \`MUSL_DYNAMIC_LINKER' macros..."
+           for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
+           do
+             grep -q _DYNAMIC_LINKER "$header" || continue
+             echo "  fixing \`$header'..."
+             sed -i "$header" \
+                 -e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g' \
+                 -e 's|define[[:blank:]]*MUSL_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define MUSL_DYNAMIC_LINKER\1 "${libc.out}\2"|g'
+           done
+        ''
+        + stdenv.lib.optionalString (targetPlatform.libc == "musl")
+        ''
+            sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR'
+        ''
+        )
+    else "")
+      + stdenv.lib.optionalString targetPlatform.isAvr ''
+        makeFlagsArray+=(
+           'LIMITS_H_TEST=false'
+        )
+      '';
+
+  inherit noSysDirs staticCompiler crossStageStatic
+    libcCross crossMingw;
+
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+  nativeBuildInputs = [ texinfo which gettext ]
+    ++ (optional (perl != null) perl);
+
+  # For building runtime libs
+  depsBuildTarget =
+    if hostPlatform == buildPlatform then [
+      targetPackages.stdenv.cc.bintools # newly-built gcc will be used
+    ] else assert targetPlatform == hostPlatform; [ # build != host == target
+      stdenv.cc
+    ];
+
+  buildInputs = [
+    gmp mpfr libmpc libelf
+    targetPackages.stdenv.cc.bintools # For linking code at run-time
+  ] ++ (optional (isl != null) isl)
+    ++ (optional (zlib != null) zlib)
+    # The builder relies on GNU sed (for instance, Darwin's `sed' fails with
+    # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
+    ++ (optional hostPlatform.isDarwin gnused)
+    ;
+
+  depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
+
+  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (stdenv.cc.isClang && langFortran) "-Wno-unused-command-line-argument";
+  NIX_LDFLAGS = stdenv.lib.optionalString  hostPlatform.isSunOS "-lm -ldl";
+
+  preConfigure = import ../common/pre-configure.nix {
+    inherit (stdenv) lib;
+    inherit version hostPlatform langGo;
+  };
+
+  dontDisableStatic = true;
+
+  # TODO(@Ericson2314): Always pass "--target" and always prefix.
+  configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
+
+  configureFlags = import ../common/configure-flags.nix {
+    inherit
+      stdenv
+      targetPackages
+      crossStageStatic libcCross
+      version
+
+      gmp mpfr libmpc libelf isl
+
+      enableLTO
+      enableMultilib
+      enablePlugin
+      enableShared
+
+      langC
+      langCC
+      langFortran
+      langGo
+      langObjC
+      langObjCpp
+      langJit
+      ;
+  } ++ optional (targetPlatform.isAarch64) "--enable-fix-cortex-a53-843419"
+    ++ optional targetPlatform.isNetBSD "--disable-libcilkrts"
+  ;
+
+  targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
+
+  buildFlags = optional
+    (targetPlatform == hostPlatform && hostPlatform == buildPlatform)
+    (if profiledCompiler then "profiledbootstrap" else "bootstrap");
+
+  dontStrip = !stripped;
+
+  doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv
+
+  installTargets = optional stripped "install-strip";
+
+  # https://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
+  ${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
+
+  # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the
+  # library headers and binaries, regarless of the language being compiled.
+  #
+  # Likewise, the LTO code doesn't find zlib.
+  #
+  # Cross-compiling, we need gcc not to read ./specs in order to build the g++
+  # compiler (after the specs for the cross-gcc are created). Having
+  # LIBRARY_PATH= makes gcc read the specs from ., and the build breaks.
+
+  CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([]
+    ++ optional (zlib != null) zlib
+  ));
+
+  LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath (optional (zlib != null) zlib));
+
+  inherit
+    (import ../common/extra-target-flags.nix {
+      inherit stdenv crossStageStatic libcCross threadsCross;
+    })
+    EXTRA_FLAGS_FOR_TARGET
+    EXTRA_LDFLAGS_FOR_TARGET
+    ;
+
+  passthru = {
+    inherit langC langCC langObjC langObjCpp langFortran langGo version;
+    isGNU = true;
+  };
+
+  enableParallelBuilding = true;
+  inherit enableMultilib;
+
+  inherit (stdenv) is64bit;
+
+  meta = {
+    homepage = "https://gcc.gnu.org/";
+    license = stdenv.lib.licenses.gpl3Plus;  # runtime support libraries are typically LGPLv3+
+    description = "GNU Compiler Collection, version ${version}"
+      + (if stripped then "" else " (with debugging info)");
+
+    longDescription = ''
+      The GNU Compiler Collection includes compiler front ends for C, C++,
+      Objective-C, Fortran, OpenMP for C/C++/Fortran, and Ada, as well as
+      libraries for these languages (libstdc++, libgomp,...).
+
+      GCC development is a part of the GNU Project, aiming to improve the
+      compiler used in the GNU system including the GNU/Linux variant.
+    '';
+
+    maintainers = with stdenv.lib.maintainers; [ ];
+
+    platforms =
+      stdenv.lib.platforms.linux ++
+      stdenv.lib.platforms.freebsd ++
+      stdenv.lib.platforms.illumos ++
+      stdenv.lib.platforms.darwin;
+  };
+}
+
+// optionalAttrs (targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt" && crossStageStatic) {
+  makeFlags = [ "all-gcc" "all-target-libgcc" ];
+  installTargets = "install-gcc install-target-libgcc";
+}
+
+// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
+)
diff --git a/nixpkgs/pkgs/development/compilers/gcc/7/riscv-no-relax.patch b/nixpkgs/pkgs/development/compilers/gcc/7/riscv-no-relax.patch
new file mode 100644
index 000000000000..93d9cd1d60f5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/7/riscv-no-relax.patch
@@ -0,0 +1,109 @@
+commit e7c570f37384d824cb9725f237920e9691e57269
+gpg: Signature made Tue 06 Mar 2018 04:52:46 PM PST
+gpg:                using RSA key 00CE76D1834960DFCE886DF8EF4CA1502CCBAB41
+gpg:                issuer "palmer@dabbelt.com"
+gpg: Good signature from "Palmer Dabbelt <palmer@dabbelt.com>" [ultimate]
+gpg:                 aka "Palmer Dabbelt <palmer@sifive.com>" [ultimate]
+Author: Palmer Dabbelt <palmer@sifive.com>
+Date:   Thu Mar 1 12:01:06 2018 -0800
+
+    RISC-V: Add and document the "-mno-relax" option
+
+    RISC-V relies on aggressive linker relaxation to get good code size.  As
+    a result no text symbol addresses can be known until link time, which
+    means that alignment must be handled during the link.  This alignment
+    pass is essentially just another linker relaxation, so this has the
+    unfortunate side effect that linker relaxation is required for
+    correctness on many RISC-V targets.
+
+    The RISC-V assembler has supported an ".option norelax" for a long time
+    because there are situations in which linker relaxation is a bad idea --
+    the canonical example is when trying to materialize the initial value of
+    the global pointer into a register, which would otherwise be relaxed to
+    a NOP.  We've been relying on users who want to disable relaxation for
+    an entire link to pass "-Wl,--no-relax", but that still relies on the
+    linker relaxing R_RISCV_ALIGN to handle alignment despite it not being
+    strictly necessary.
+
+    This patch adds a GCC option, "-mno-relax", that disable linker
+    relaxation by adding ".option norelax" to the top of every generated
+    assembly file.  The assembler is smart enough to handle alignment at
+    assemble time for files that have never emitted a relaxable relocation,
+    so this is sufficient to really disable all relaxations in the linker,
+    which results in significantly faster link times for large objects.
+
+    This also has the side effect of allowing toolchains that don't support
+    linker relaxation (LLVM and the Linux module loader) to function
+    correctly.  Toolchains that don't support linker relaxation should
+    default to "-mno-relax" and error when presented with any R_RISCV_ALIGN
+    relocation as those need to be handled for correctness.
+
+    gcc/ChangeLog
+
+    2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
+
+            * config/riscv/riscv.opt (mrelax): New option.
+            * config/riscv/riscv.c (riscv_file_start): Emit ".option
+            "norelax" when riscv_mrelax is disabled.
+            * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
+
+diff --git a/gcc/config/riscv/riscv.c b/gcc/config/riscv/riscv.c
+index c38f6c394d54..3e81874de232 100644
+--- a/gcc/config/riscv/riscv.c
++++ b/gcc/config/riscv/riscv.c
+@@ -3979,6 +3979,11 @@ riscv_file_start (void)
+
+   /* Instruct GAS to generate position-[in]dependent code.  */
+   fprintf (asm_out_file, "\t.option %spic\n", (flag_pic ? "" : "no"));
++
++  /* If the user specifies "-mno-relax" on the command line then disable linker
++     relaxation in the assembler.  */
++  if (! riscv_mrelax)
++    fprintf (asm_out_file, "\t.option norelax\n");
+ }
+
+ /* Implement TARGET_ASM_OUTPUT_MI_THUNK.  Generate rtl rather than asm text
+diff --git a/gcc/config/riscv/riscv.opt b/gcc/config/riscv/riscv.opt
+index 581a26bb5c1e..b37ac75d9bb4 100644
+--- a/gcc/config/riscv/riscv.opt
++++ b/gcc/config/riscv/riscv.opt
+@@ -106,6 +106,11 @@ mexplicit-relocs
+ Target Report Mask(EXPLICIT_RELOCS)
+ Use %reloc() operators, rather than assembly macros, to load addresses.
+
++mrelax
++Target Bool Var(riscv_mrelax) Init(1)
++Take advantage of linker relaxations to reduce the number of instructions
++required to materialize symbol addresses.
++
+ Mask(64BIT)
+
+ Mask(MUL)
+diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
+index 8d366c626bae..deb48af2ecad 100644
+--- a/gcc/doc/invoke.texi
++++ b/gcc/doc/invoke.texi
+@@ -1042,7 +1042,8 @@ See RS/6000 and PowerPC Options.
+ -msave-restore  -mno-save-restore @gol
+ -mstrict-align -mno-strict-align @gol
+ -mcmodel=medlow -mcmodel=medany @gol
+--mexplicit-relocs  -mno-explicit-relocs @gol}
++-mexplicit-relocs  -mno-explicit-relocs @gol
++-mrelax -mno-relax @gol}
+
+ @emph{RL78 Options}
+ @gccoptlist{-msim  -mmul=none  -mmul=g13  -mmul=g14  -mallregs @gol
+@@ -23102,6 +23103,12 @@ Use or do not use assembler relocation operators when dealing with symbolic
+ addresses.  The alternative is to use assembler macros instead, which may
+ limit optimization.
+
++@item -mrelax
++@itemx -mno-relax
++Take advantage of linker relaxations to reduce the number of instructions
++required to materialize symbol addresses. The default is to take advantage of
++linker relaxations.
++
+ @end table
+
+ @node RL78 Options
+
diff --git a/nixpkgs/pkgs/development/compilers/gcc/7/riscv-pthread-reentrant.patch b/nixpkgs/pkgs/development/compilers/gcc/7/riscv-pthread-reentrant.patch
new file mode 100644
index 000000000000..c7527ffb2b16
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/7/riscv-pthread-reentrant.patch
@@ -0,0 +1,13 @@
+Index: gcc/config/riscv/linux.h
+===================================================================
+--- a/gcc/config/riscv/linux.h	(revision 257620)
++++ b/gcc/config/riscv/linux.h	(revision 257621)
+@@ -47,6 +47,8 @@
+ 
+ #define ICACHE_FLUSH_FUNC "__riscv_flush_icache"
+ 
++#define CPP_SPEC "%{pthread:-D_REENTRANT}"
++
+ #define LINK_SPEC "\
+ -melf" XLEN_SPEC "lriscv \
+ %{shared} \
diff --git a/nixpkgs/pkgs/development/compilers/gcc/8/default.nix b/nixpkgs/pkgs/development/compilers/gcc/8/default.nix
new file mode 100644
index 000000000000..5a6e20c0f412
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/8/default.nix
@@ -0,0 +1,282 @@
+{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
+, langC ? true, langCC ? true, langFortran ? false
+, langObjC ? stdenv.targetPlatform.isDarwin
+, langObjCpp ? stdenv.targetPlatform.isDarwin
+, langGo ? false
+, profiledCompiler ? false
+, langJit ? false
+, staticCompiler ? false
+, enableShared ? true
+, enableLTO ? true
+, texinfo ? null
+, perl ? null # optional, for texi2pod (then pod2man)
+, gmp, mpfr, libmpc, gettext, which
+, libelf                      # optional, for link-time optimizations (LTO)
+, isl ? null # optional, for the Graphite optimization framework.
+, zlib ? null
+, enableMultilib ? false
+, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
+, name ? "gcc"
+, libcCross ? null
+, threadsCross ? null # for MinGW
+, crossStageStatic ? false
+, # Strip kills static libs of other archs (hence no cross)
+  stripped ? stdenv.hostPlatform == stdenv.buildPlatform
+          && stdenv.targetPlatform == stdenv.hostPlatform
+, gnused ? null
+, cloog # unused; just for compat with gcc4, as we override the parameter on some places
+, buildPackages
+}:
+
+# LTO needs libelf and zlib.
+assert libelf != null -> zlib != null;
+
+# Make sure we get GNU sed.
+assert stdenv.hostPlatform.isDarwin -> gnused != null;
+
+# The go frontend is written in c++
+assert langGo -> langCC;
+
+# threadsCross is just for MinGW
+assert threadsCross != null -> stdenv.targetPlatform.isWindows;
+
+with stdenv.lib;
+with builtins;
+
+let majorVersion = "8";
+    version = "${majorVersion}.4.0";
+
+    inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
+    patches =
+         optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
+      ++ optional noSysDirs ../no-sys-dirs.patch
+      /* ++ optional (hostPlatform != buildPlatform) (fetchpatch { # XXX: Refine when this should be applied
+        url = "https://git.busybox.net/buildroot/plain/package/gcc/${version}/0900-remove-selftests.patch?id=11271540bfe6adafbc133caf6b5b902a816f5f02";
+        sha256 = ""; # TODO: uncomment and check hash when available.
+      }) */
+      ++ optional langFortran ../gfortran-driving.patch
+      ++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch
+      ++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch
+      ++ optional (!crossStageStatic && targetPlatform.isMinGW) (fetchpatch {
+        url = "https://raw.githubusercontent.com/lhmouse/MINGW-packages/${import ../common/mfcgthreads-patches-repo.nix}/mingw-w64-gcc-git/9000-gcc-${majorVersion}-branch-Added-mcf-thread-model-support-from-mcfgthread.patch";
+        sha256 = "1in5kvcknlpi9z1vvjw6jfmwy8k12zvbqlqfnq84qpm99r0rh00a";
+      });
+
+    /* Cross-gcc settings (build == host != target) */
+    crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
+    stageNameAddon = if crossStageStatic then "stage-static" else "stage-final";
+    crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-";
+
+in
+
+stdenv.mkDerivation ({
+  pname = "${crossNameAddon}${name}${if stripped then "" else "-debug"}";
+  inherit version;
+
+  builder = ../builder.sh;
+
+  src = fetchurl {
+    url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz";
+    sha256 = "1m1d3gfix56w4aq8myazzfffkl8bqcrx4jhhapnjf7qfs596w2p3";
+  };
+
+  inherit patches;
+
+  outputs = [ "out" "man" "info" ] ++ stdenv.lib.optional (!langJit) "lib";
+  setOutputFlags = false;
+  NIX_NO_SELF_RPATH = true;
+
+  libc_dev = stdenv.cc.libc_dev;
+
+  hardeningDisable = [ "format" "pie" ];
+
+  # This should kill all the stdinc frameworks that gcc and friends like to
+  # insert into default search paths.
+  prePatch = stdenv.lib.optionalString hostPlatform.isDarwin ''
+    substituteInPlace gcc/config/darwin-c.c \
+      --replace 'if (stdinc)' 'if (0)'
+
+    substituteInPlace libgcc/config/t-slibgcc-darwin \
+      --replace "-install_name @shlib_slibdir@/\$(SHLIB_INSTALL_NAME)" "-install_name ''${!outputLib}/lib/\$(SHLIB_INSTALL_NAME)"
+
+    substituteInPlace libgfortran/configure \
+      --replace "-install_name \\\$rpath/\\\$soname" "-install_name ''${!outputLib}/lib/\\\$soname"
+  '';
+
+  postPatch = ''
+    configureScripts=$(find . -name configure)
+    for configureScript in $configureScripts; do
+      patchShebangs $configureScript
+    done
+  '' + (
+    if targetPlatform != hostPlatform || stdenv.cc.libc != null then
+      # On NixOS, use the right path to the dynamic linker instead of
+      # `/lib/ld*.so'.
+      let
+        libc = if libcCross != null then libcCross else stdenv.cc.libc;
+      in
+        (
+        '' echo "fixing the \`GLIBC_DYNAMIC_LINKER', \`UCLIBC_DYNAMIC_LINKER', and \`MUSL_DYNAMIC_LINKER' macros..."
+           for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
+           do
+             grep -q _DYNAMIC_LINKER "$header" || continue
+             echo "  fixing \`$header'..."
+             sed -i "$header" \
+                 -e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g' \
+                 -e 's|define[[:blank:]]*MUSL_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define MUSL_DYNAMIC_LINKER\1 "${libc.out}\2"|g'
+           done
+        ''
+        + stdenv.lib.optionalString (targetPlatform.libc == "musl")
+        ''
+            sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR'
+        ''
+        )
+    else "")
+      + stdenv.lib.optionalString targetPlatform.isAvr ''
+	        makeFlagsArray+=(
+	           'LIMITS_H_TEST=false'
+	        )
+	      '';
+
+  inherit noSysDirs staticCompiler crossStageStatic
+    libcCross crossMingw;
+
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+  nativeBuildInputs = [ texinfo which gettext ]
+    ++ (optional (perl != null) perl);
+
+  # For building runtime libs
+  depsBuildTarget =
+    if hostPlatform == buildPlatform then [
+      targetPackages.stdenv.cc.bintools # newly-built gcc will be used
+    ] else assert targetPlatform == hostPlatform; [ # build != host == target
+      stdenv.cc
+    ];
+
+  buildInputs = [
+    gmp mpfr libmpc libelf
+    targetPackages.stdenv.cc.bintools # For linking code at run-time
+  ] ++ (optional (isl != null) isl)
+    ++ (optional (zlib != null) zlib)
+    # The builder relies on GNU sed (for instance, Darwin's `sed' fails with
+    # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
+    ++ (optional hostPlatform.isDarwin gnused)
+    ;
+
+  depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
+
+  NIX_LDFLAGS = stdenv.lib.optionalString  hostPlatform.isSunOS "-lm -ldl";
+
+  preConfigure = import ../common/pre-configure.nix {
+    inherit (stdenv) lib;
+    inherit version hostPlatform langGo;
+  };
+
+  dontDisableStatic = true;
+
+  # TODO(@Ericson2314): Always pass "--target" and always prefix.
+  configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
+
+  configureFlags = import ../common/configure-flags.nix {
+    inherit
+      stdenv
+      targetPackages
+      crossStageStatic libcCross
+      version
+
+      gmp mpfr libmpc libelf isl
+
+      enableLTO
+      enableMultilib
+      enablePlugin
+      enableShared
+
+      langC
+      langCC
+      langFortran
+      langGo
+      langObjC
+      langObjCpp
+      langJit
+      ;
+  };
+
+  targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
+
+  buildFlags = optional
+    (targetPlatform == hostPlatform && hostPlatform == buildPlatform)
+    (if profiledCompiler then "profiledbootstrap" else "bootstrap");
+
+  dontStrip = !stripped;
+
+  installTargets = optional stripped "install-strip";
+
+  # https://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
+  ${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
+
+  # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the
+  # library headers and binaries, regarless of the language being compiled.
+  #
+  # Likewise, the LTO code doesn't find zlib.
+  #
+  # Cross-compiling, we need gcc not to read ./specs in order to build the g++
+  # compiler (after the specs for the cross-gcc are created). Having
+  # LIBRARY_PATH= makes gcc read the specs from ., and the build breaks.
+
+  CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([]
+    ++ optional (zlib != null) zlib
+  ));
+
+  LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath (optional (zlib != null) zlib));
+
+  inherit
+    (import ../common/extra-target-flags.nix {
+      inherit stdenv crossStageStatic libcCross threadsCross;
+    })
+    EXTRA_FLAGS_FOR_TARGET
+    EXTRA_LDFLAGS_FOR_TARGET
+    ;
+
+  passthru = {
+    inherit langC langCC langObjC langObjCpp langFortran langGo version;
+    isGNU = true;
+  };
+
+  enableParallelBuilding = true;
+  inherit enableMultilib;
+
+  inherit (stdenv) is64bit;
+
+  meta = {
+    homepage = "https://gcc.gnu.org/";
+    license = stdenv.lib.licenses.gpl3Plus;  # runtime support libraries are typically LGPLv3+
+    description = "GNU Compiler Collection, version ${version}"
+      + (if stripped then "" else " (with debugging info)");
+
+    longDescription = ''
+      The GNU Compiler Collection includes compiler front ends for C, C++,
+      Objective-C, Fortran, OpenMP for C/C++/Fortran, and Ada, as well as
+      libraries for these languages (libstdc++, libgomp,...).
+
+      GCC development is a part of the GNU Project, aiming to improve the
+      compiler used in the GNU system including the GNU/Linux variant.
+    '';
+
+    maintainers = with stdenv.lib.maintainers; [ synthetica ];
+
+    platforms =
+      stdenv.lib.platforms.linux ++
+      stdenv.lib.platforms.freebsd ++
+      stdenv.lib.platforms.illumos ++
+      stdenv.lib.platforms.darwin;
+  };
+}
+
+// optionalAttrs (targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt" && crossStageStatic) {
+  makeFlags = [ "all-gcc" "all-target-libgcc" ];
+  installTargets = "install-gcc install-target-libgcc";
+}
+
+// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
+)
diff --git a/nixpkgs/pkgs/development/compilers/gcc/9/default.nix b/nixpkgs/pkgs/development/compilers/gcc/9/default.nix
new file mode 100644
index 000000000000..978ad75a3d26
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/9/default.nix
@@ -0,0 +1,290 @@
+{ stdenv, targetPackages, fetchurl, fetchpatch, noSysDirs
+, langC ? true, langCC ? true, langFortran ? false
+, langAda ? false
+, langObjC ? stdenv.targetPlatform.isDarwin
+, langObjCpp ? stdenv.targetPlatform.isDarwin
+, langD ? false
+, langGo ? false
+, profiledCompiler ? false
+, langJit ? false
+, staticCompiler ? false
+, enableShared ? true
+, enableLTO ? true
+, texinfo ? null
+, perl ? null # optional, for texi2pod (then pod2man)
+, gmp, mpfr, libmpc, gettext, which
+, libelf                      # optional, for link-time optimizations (LTO)
+, isl ? null # optional, for the Graphite optimization framework.
+, zlib ? null
+, gnatboot ? null
+, enableMultilib ? false
+, enablePlugin ? stdenv.hostPlatform == stdenv.buildPlatform # Whether to support user-supplied plug-ins
+, name ? "gcc"
+, libcCross ? null
+, threadsCross ? null # for MinGW
+, crossStageStatic ? false
+, # Strip kills static libs of other archs (hence no cross)
+  stripped ? stdenv.hostPlatform == stdenv.buildPlatform
+          && stdenv.targetPlatform == stdenv.hostPlatform
+, gnused ? null
+, cloog # unused; just for compat with gcc4, as we override the parameter on some places
+, buildPackages
+}:
+
+# LTO needs libelf and zlib.
+assert libelf != null -> zlib != null;
+
+# Make sure we get GNU sed.
+assert stdenv.hostPlatform.isDarwin -> gnused != null;
+
+# The go frontend is written in c++
+assert langGo -> langCC;
+assert langAda -> gnatboot != null;
+
+# threadsCross is just for MinGW
+assert threadsCross != null -> stdenv.targetPlatform.isWindows;
+
+with stdenv.lib;
+with builtins;
+
+let majorVersion = "9";
+    version = "${majorVersion}.3.0";
+
+    inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
+    patches =
+         optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
+      ++ optional noSysDirs ../no-sys-dirs.patch
+      /* ++ optional (hostPlatform != buildPlatform) (fetchpatch { # XXX: Refine when this should be applied
+        url = "https://git.busybox.net/buildroot/plain/package/gcc/${version}/0900-remove-selftests.patch?id=11271540bfe6adafbc133caf6b5b902a816f5f02";
+        sha256 = ""; # TODO: uncomment and check hash when available.
+      }) */
+      ++ optional langAda ../gnat-cflags.patch
+      ++ optional langD ../libphobos.patch
+      ++ optional langFortran ../gfortran-driving.patch
+      ++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch
+      ++ optional (!crossStageStatic && targetPlatform.isMinGW) (fetchpatch {
+        url = "https://raw.githubusercontent.com/lhmouse/MINGW-packages/${import ../common/mfcgthreads-patches-repo.nix}/mingw-w64-gcc-git/9000-gcc-${majorVersion}-branch-Added-mcf-thread-model-support-from-mcfgthread.patch";
+        sha256 = "1in5kvcknlpi9z1vvjw6jfmwy8k12zvbqlqfnq84qpm99r0rh00a";
+      });
+
+    /* Cross-gcc settings (build == host != target) */
+    crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
+    stageNameAddon = if crossStageStatic then "stage-static" else "stage-final";
+    crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}-${stageNameAddon}-";
+
+in
+
+stdenv.mkDerivation ({
+  pname = "${crossNameAddon}${name}${if stripped then "" else "-debug"}";
+  inherit version;
+
+  builder = ../builder.sh;
+
+  src = fetchurl {
+    url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz";
+    sha256 = "1la2yy27ziasyf0jvzk58y1i5b5bq2h176qil550bxhifs39gqbi";
+  };
+
+  inherit patches;
+
+  outputs = [ "out" "man" "info" ] ++ stdenv.lib.optional (!langJit) "lib";
+  setOutputFlags = false;
+  NIX_NO_SELF_RPATH = true;
+
+  libc_dev = stdenv.cc.libc_dev;
+
+  hardeningDisable = [ "format" "pie" ];
+
+  # This should kill all the stdinc frameworks that gcc and friends like to
+  # insert into default search paths.
+  prePatch = stdenv.lib.optionalString hostPlatform.isDarwin ''
+    substituteInPlace gcc/config/darwin-c.c \
+      --replace 'if (stdinc)' 'if (0)'
+
+    substituteInPlace libgcc/config/t-slibgcc-darwin \
+      --replace "-install_name @shlib_slibdir@/\$(SHLIB_INSTALL_NAME)" "-install_name ''${!outputLib}/lib/\$(SHLIB_INSTALL_NAME)"
+
+    substituteInPlace libgfortran/configure \
+      --replace "-install_name \\\$rpath/\\\$soname" "-install_name ''${!outputLib}/lib/\\\$soname"
+  '';
+
+  postPatch = ''
+    configureScripts=$(find . -name configure)
+    for configureScript in $configureScripts; do
+      patchShebangs $configureScript
+    done
+  '' + (
+    if targetPlatform != hostPlatform || stdenv.cc.libc != null then
+      # On NixOS, use the right path to the dynamic linker instead of
+      # `/lib/ld*.so'.
+      let
+        libc = if libcCross != null then libcCross else stdenv.cc.libc;
+      in
+        (
+        '' echo "fixing the \`GLIBC_DYNAMIC_LINKER', \`UCLIBC_DYNAMIC_LINKER', and \`MUSL_DYNAMIC_LINKER' macros..."
+           for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
+           do
+             grep -q _DYNAMIC_LINKER "$header" || continue
+             echo "  fixing \`$header'..."
+             sed -i "$header" \
+                 -e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g' \
+                 -e 's|define[[:blank:]]*MUSL_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define MUSL_DYNAMIC_LINKER\1 "${libc.out}\2"|g'
+           done
+        ''
+        + stdenv.lib.optionalString (targetPlatform.libc == "musl")
+        ''
+            sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR'
+        ''
+        )
+    else "")
+      + stdenv.lib.optionalString targetPlatform.isAvr ''
+          makeFlagsArray+=(
+             'LIMITS_H_TEST=false'
+          )
+        '';
+
+  inherit noSysDirs staticCompiler crossStageStatic
+    libcCross crossMingw;
+
+  depsBuildBuild = [ buildPackages.stdenv.cc ];
+  nativeBuildInputs = [ texinfo which gettext ]
+    ++ (optional (perl != null) perl);
+
+  # For building runtime libs
+  depsBuildTarget =
+    if hostPlatform == buildPlatform then [
+      targetPackages.stdenv.cc.bintools # newly-built gcc will be used
+    ] else assert targetPlatform == hostPlatform; [ # build != host == target
+      stdenv.cc
+    ];
+
+  buildInputs = [
+    gmp mpfr libmpc libelf
+    targetPackages.stdenv.cc.bintools # For linking code at run-time
+  ] ++ (optional (isl != null) isl)
+    ++ (optional (zlib != null) zlib)
+    # The builder relies on GNU sed (for instance, Darwin's `sed' fails with
+    # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it.
+    ++ (optional hostPlatform.isDarwin gnused)
+    ++ (optional langAda gnatboot)
+    ;
+
+  depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
+
+  NIX_LDFLAGS = stdenv.lib.optionalString  hostPlatform.isSunOS "-lm -ldl";
+
+  preConfigure = import ../common/pre-configure.nix {
+    inherit (stdenv) lib;
+    inherit version hostPlatform gnatboot langAda langGo;
+  };
+
+  dontDisableStatic = true;
+
+  # TODO(@Ericson2314): Always pass "--target" and always prefix.
+  configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
+
+  configureFlags = import ../common/configure-flags.nix {
+    inherit
+      stdenv
+      targetPackages
+      crossStageStatic libcCross
+      version
+
+      gmp mpfr libmpc libelf isl
+
+      enableLTO
+      enableMultilib
+      enablePlugin
+      enableShared
+
+      langC
+      langD
+      langCC
+      langFortran
+      langAda
+      langGo
+      langObjC
+      langObjCpp
+      langJit
+      ;
+  };
+
+  targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;
+
+  buildFlags = optional
+    (targetPlatform == hostPlatform && hostPlatform == buildPlatform)
+    (if profiledCompiler then "profiledbootstrap" else "bootstrap");
+
+  dontStrip = !stripped;
+
+  installTargets = optional stripped "install-strip";
+
+  # https://gcc.gnu.org/install/specific.html#x86-64-x-solaris210
+  ${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64";
+
+  # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the
+  # library headers and binaries, regarless of the language being compiled.
+  #
+  # Likewise, the LTO code doesn't find zlib.
+  #
+  # Cross-compiling, we need gcc not to read ./specs in order to build the g++
+  # compiler (after the specs for the cross-gcc are created). Having
+  # LIBRARY_PATH= makes gcc read the specs from ., and the build breaks.
+
+  CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([]
+    ++ optional (zlib != null) zlib
+  ));
+
+  LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath (optional (zlib != null) zlib));
+
+  inherit
+    (import ../common/extra-target-flags.nix {
+      inherit stdenv crossStageStatic langD libcCross threadsCross;
+    })
+    EXTRA_FLAGS_FOR_TARGET
+    EXTRA_LDFLAGS_FOR_TARGET
+    ;
+
+  passthru = {
+    inherit langC langCC langObjC langObjCpp langAda langFortran langGo langD version;
+    isGNU = true;
+  };
+
+  enableParallelBuilding = true;
+  inherit enableMultilib;
+
+  inherit (stdenv) is64bit;
+
+  meta = {
+    homepage = "https://gcc.gnu.org/";
+    license = stdenv.lib.licenses.gpl3Plus;  # runtime support libraries are typically LGPLv3+
+    description = "GNU Compiler Collection, version ${version}"
+      + (if stripped then "" else " (with debugging info)");
+
+    longDescription = ''
+      The GNU Compiler Collection includes compiler front ends for C, C++,
+      Objective-C, Fortran, OpenMP for C/C++/Fortran, and Ada, as well as
+      libraries for these languages (libstdc++, libgomp,...).
+
+      GCC development is a part of the GNU Project, aiming to improve the
+      compiler used in the GNU system including the GNU/Linux variant.
+    '';
+
+    maintainers = with stdenv.lib.maintainers; [ synthetica ];
+
+    platforms =
+      stdenv.lib.platforms.linux ++
+      stdenv.lib.platforms.freebsd ++
+      stdenv.lib.platforms.illumos ++
+      stdenv.lib.platforms.darwin;
+  };
+}
+
+// optionalAttrs (targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt" && crossStageStatic) {
+  makeFlags = [ "all-gcc" "all-target-libgcc" ];
+  installTargets = "install-gcc install-target-libgcc";
+}
+
+// optionalAttrs (enableMultilib) { dontMoveLib64 = true; }
+)
diff --git a/nixpkgs/pkgs/development/compilers/gcc/builder.sh b/nixpkgs/pkgs/development/compilers/gcc/builder.sh
new file mode 100644
index 000000000000..4b14cdb94cdd
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/builder.sh
@@ -0,0 +1,283 @@
+source $stdenv/setup
+
+
+oldOpts="$(shopt -po nounset)" || true
+set -euo pipefail
+
+
+export NIX_FIXINC_DUMMY="$NIX_BUILD_TOP/dummy"
+mkdir "$NIX_FIXINC_DUMMY"
+
+
+if test "$staticCompiler" = "1"; then
+    EXTRA_LDFLAGS="-static"
+else
+    EXTRA_LDFLAGS="-Wl,-rpath,${!outputLib}/lib"
+fi
+
+
+# GCC interprets empty paths as ".", which we don't want.
+if test -z "${CPATH-}"; then unset CPATH; fi
+if test -z "${LIBRARY_PATH-}"; then unset LIBRARY_PATH; fi
+echo "\$CPATH is \`${CPATH-}'"
+echo "\$LIBRARY_PATH is \`${LIBRARY_PATH-}'"
+
+if test "$noSysDirs" = "1"; then
+
+    declare \
+        EXTRA_FLAGS_FOR_BUILD EXTRA_FLAGS EXTRA_FLAGS_FOR_TARGET \
+        EXTRA_LDFLAGS_FOR_BUILD EXTRA_LDFLAGS_FOR_TARGET
+
+    # Extract flags from Bintools Wrappers
+    for post in '_FOR_BUILD' ''; do
+        curBintools="NIX_BINTOOLS${post}"
+
+        declare -a extraLDFlags=()
+        if [[ -e "${!curBintools}/nix-support/orig-libc" ]]; then
+            # Figure out what extra flags when linking to pass to the gcc
+            # compilers being generated to make sure that they use our libc.
+            extraLDFlags=($(< "${!curBintools}/nix-support/libc-ldflags") $(< "${!curBintools}/nix-support/libc-ldflags-before" || true))
+
+            # The path to the Libc binaries such as `crti.o'.
+            libc_libdir="$(< "${!curBintools}/nix-support/orig-libc")/lib"
+        else
+            # Hack: support impure environments.
+            extraLDFlags=("-L/usr/lib64" "-L/usr/lib")
+            libc_libdir="/usr/lib"
+        fi
+        extraLDFlags=("-L$libc_libdir" "-rpath" "$libc_libdir"
+                      "${extraLDFlags[@]}")
+        for i in "${extraLDFlags[@]}"; do
+            declare EXTRA_LDFLAGS${post}+=" -Wl,$i"
+        done
+    done
+
+    # Extract flags from CC Wrappers
+    for post in '_FOR_BUILD' ''; do
+        curCC="NIX_CC${post}"
+        curFIXINC="NIX_FIXINC_DUMMY${post}"
+
+        declare -a extraFlags=()
+        if [[ -e "${!curCC}/nix-support/orig-libc" ]]; then
+            # Figure out what extra compiling flags to pass to the gcc compilers
+            # being generated to make sure that they use our libc.
+            extraFlags=($(< "${!curCC}/nix-support/libc-cflags"))
+
+            # The path to the Libc headers
+            libc_devdir="$(< "${!curCC}/nix-support/orig-libc-dev")"
+
+            # Use *real* header files, otherwise a limits.h is generated that
+            # does not include Libc's limits.h (notably missing SSIZE_MAX,
+            # which breaks the build).
+            declare NIX_FIXINC_DUMMY${post}="$libc_devdir/include"
+        else
+            # Hack: support impure environments.
+            extraFlags=("-isystem" "/usr/include")
+            declare NIX_FIXINC_DUMMY${post}=/usr/include
+        fi
+
+        extraFlags=("-I${!curFIXINC}" "${extraFlags[@]}")
+
+        # BOOT_CFLAGS defaults to `-g -O2'; since we override it below, make
+        # sure to explictly add them so that files compiled with the bootstrap
+        # compiler are optimized and (optionally) contain debugging information
+        # (info "(gccinstall) Building").
+        if test -n "${dontStrip-}"; then
+            extraFlags=("-O2" "-g" "${extraFlags[@]}")
+        else
+            # Don't pass `-g' at all; this saves space while building.
+            extraFlags=("-O2" "${extraFlags[@]}")
+        fi
+
+        declare EXTRA_FLAGS${post}="${extraFlags[*]}"
+    done
+
+    if test -z "${targetConfig-}"; then
+        # host = target, so the flags are the same
+        EXTRA_FLAGS_FOR_TARGET="$EXTRA_FLAGS"
+        EXTRA_LDFLAGS_FOR_TARGET="$EXTRA_LDFLAGS"
+    fi
+
+    # CFLAGS_FOR_TARGET are needed for the libstdc++ configure script to find
+    # the startfiles.
+    # FLAGS_FOR_TARGET are needed for the target libraries to receive the -Bxxx
+    # for the startfiles.
+    makeFlagsArray+=(
+        "BUILD_SYSTEM_HEADER_DIR=$NIX_FIXINC_DUMMY_FOR_BUILD"
+        "SYSTEM_HEADER_DIR=$NIX_FIXINC_DUMMY_FOR_BUILD"
+        "NATIVE_SYSTEM_HEADER_DIR=$NIX_FIXINC_DUMMY"
+
+        "LDFLAGS_FOR_BUILD=$EXTRA_LDFLAGS_FOR_BUILD"
+        #"LDFLAGS=$EXTRA_LDFLAGS"
+        "LDFLAGS_FOR_TARGET=$EXTRA_LDFLAGS_FOR_TARGET"
+
+        "CFLAGS_FOR_BUILD=$EXTRA_FLAGS_FOR_BUILD $EXTRA_LDFLAGS_FOR_BUILD"
+        "CXXFLAGS_FOR_BUILD=$EXTRA_FLAGS_FOR_BUILD $EXTRA_LDFLAGS_FOR_BUILD"
+        "FLAGS_FOR_BUILD=$EXTRA_FLAGS_FOR_BUILD $EXTRA_LDFLAGS_FOR_BUILD"
+
+        # It seems there is a bug in GCC 5
+        #"CFLAGS=$EXTRA_FLAGS $EXTRA_LDFLAGS"
+        #"CXXFLAGS=$EXTRA_FLAGS $EXTRA_LDFLAGS"
+
+        "CFLAGS_FOR_TARGET=$EXTRA_FLAGS_FOR_TARGET $EXTRA_LDFLAGS_FOR_TARGET"
+        "CXXFLAGS_FOR_TARGET=$EXTRA_FLAGS_FOR_TARGET $EXTRA_LDFLAGS_FOR_TARGET"
+        "FLAGS_FOR_TARGET=$EXTRA_FLAGS_FOR_TARGET $EXTRA_LDFLAGS_FOR_TARGET"
+    )
+
+    if test -z "${targetConfig-}"; then
+        makeFlagsArray+=(
+            "BOOT_CFLAGS=$EXTRA_FLAGS $EXTRA_LDFLAGS"
+            "BOOT_LDFLAGS=$EXTRA_FLAGS_FOR_TARGET $EXTRA_LDFLAGS_FOR_TARGET"
+        )
+    fi
+
+    if test "$crossStageStatic" == 1; then
+        # We don't want the gcc build to assume there will be a libc providing
+        # limits.h in this stage
+        makeFlagsArray+=(
+            'LIMITS_H_TEST=false'
+        )
+    else
+        makeFlagsArray+=(
+            'LIMITS_H_TEST=true'
+        )
+    fi
+fi
+
+if test -n "${targetConfig-}"; then
+    # The host strip will destroy some important details of the objects
+    dontStrip=1
+fi
+
+eval "$oldOpts"
+
+providedPreConfigure="$preConfigure";
+preConfigure() {
+    if test -n "$newlibSrc"; then
+        tar xvf "$newlibSrc" -C ..
+        ln -s ../newlib-*/newlib newlib
+        # Patch to get armvt5el working:
+        sed -i -e 's/ arm)/ arm*)/' newlib/configure.host
+    fi
+
+    # Bug - they packaged zlib
+    if test -d "zlib"; then
+        # This breaks the build without-headers, which should build only
+        # the target libgcc as target libraries.
+        # See 'configure:5370'
+        rm -Rf zlib
+    fi
+
+    if test -f "$NIX_CC/nix-support/orig-libc"; then
+        # Patch the configure script so it finds glibc headers.  It's
+        # important for example in order not to get libssp built,
+        # because its functionality is in glibc already.
+        sed -i \
+            -e "s,glibc_header_dir=/usr/include,glibc_header_dir=$libc_dev/include", \
+            gcc/configure
+    fi
+
+    if test -n "$crossMingw" -a -n "$crossStageStatic"; then
+        mkdir -p ../mingw
+        # --with-build-sysroot expects that:
+        cp -R $libcCross/include ../mingw
+        configureFlags="$configureFlags --with-build-sysroot=`pwd`/.."
+    fi
+
+    # Eval the preConfigure script from nix expression.
+    eval "$providedPreConfigure"
+
+    # Perform the build in a different directory.
+    mkdir ../build
+    cd ../build
+    configureScript=../$sourceRoot/configure
+}
+
+
+postConfigure() {
+    # Don't store the configure flags in the resulting executables.
+    sed -e '/TOPLEVEL_CONFIGURE_ARGUMENTS=/d' -i Makefile
+}
+
+
+preInstall() {
+    mkdir -p "$out/${targetConfig}/lib"
+    mkdir -p "${!outputLib}/${targetConfig}/lib"
+    # Make β€˜lib64’ symlinks to β€˜lib’.
+    if [ -n "$is64bit" -a -z "$enableMultilib" ]; then
+        ln -s lib "$out/${targetConfig}/lib64"
+        ln -s lib "${!outputLib}/${targetConfig}/lib64"
+    fi
+}
+
+
+postInstall() {
+    # Move runtime libraries to lib output.
+    moveToOutput "${targetConfig+$targetConfig/}lib/lib*.so*" "${!outputLib}"
+    moveToOutput "${targetConfig+$targetConfig/}lib/lib*.la"  "${!outputLib}"
+    moveToOutput "${targetConfig+$targetConfig/}lib/lib*.dylib" "${!outputLib}"
+    moveToOutput "${targetConfig+$targetConfig/}lib/lib*.dll.a" "${!outputLib}"
+    moveToOutput "share/gcc-*/python" "${!outputLib}"
+
+    for i in "${!outputLib}/${targetConfig}"/lib/*.{la,py}; do
+        substituteInPlace "$i" --replace "$out" "${!outputLib}"
+    done
+
+    if [ -n "$enableMultilib" ]; then
+        moveToOutput "${targetConfig+$targetConfig/}lib64/lib*.so*" "${!outputLib}"
+        moveToOutput "${targetConfig+$targetConfig/}lib64/lib*.la"  "${!outputLib}"
+        moveToOutput "${targetConfig+$targetConfig/}lib64/lib*.dylib" "${!outputLib}"
+
+        for i in "${!outputLib}/${targetConfig}"/lib64/*.{la,py}; do
+            substituteInPlace "$i" --replace "$out" "${!outputLib}"
+        done
+    fi
+
+    # Remove `fixincl' to prevent a retained dependency on the
+    # previous gcc.
+    rm -rf $out/libexec/gcc/*/*/install-tools
+    rm -rf $out/lib/gcc/*/*/install-tools
+
+    # More dependencies with the previous gcc or some libs (gccbug stores the build command line)
+    rm -rf $out/bin/gccbug
+
+    if type "patchelf"; then
+        # Take out the bootstrap-tools from the rpath, as it's not needed at all having $out
+        for i in $(find "$out"/libexec/gcc/*/*/* -type f -a \! -name '*.la'); do
+            PREV_RPATH=`patchelf --print-rpath "$i"`
+            NEW_RPATH=`echo "$PREV_RPATH" | sed 's,:[^:]*bootstrap-tools/lib,,g'`
+            patchelf --set-rpath "$NEW_RPATH" "$i" && echo OK
+        done
+    fi
+
+    if type "install_name_tool"; then
+        for i in "${!outputLib}"/lib/*.*.dylib; do
+            install_name_tool -id "$i" "$i" || true
+            for old_path in $(otool -L "$i" | grep "$out" | awk '{print $1}'); do
+              new_path=`echo "$old_path" | sed "s,$out,${!outputLib},"`
+              install_name_tool -change "$old_path" "$new_path" "$i" || true
+            done
+        done
+    fi
+
+    # Get rid of some "fixed" header files
+    rm -rfv $out/lib/gcc/*/*/include-fixed/{root,linux}
+
+    # Replace hard links for i686-pc-linux-gnu-gcc etc. with symlinks.
+    for i in $out/bin/*-gcc*; do
+        if cmp -s $out/bin/gcc $i; then
+            ln -sfn gcc $i
+        fi
+    done
+
+    for i in $out/bin/c++ $out/bin/*-c++* $out/bin/*-g++*; do
+        if cmp -s $out/bin/g++ $i; then
+            ln -sfn g++ $i
+        fi
+    done
+
+    # Two identical man pages are shipped (moving and compressing is done later)
+    ln -sf gcc.1 "$out"/share/man/man1/g++.1
+}
+
+genericBuild
diff --git a/nixpkgs/pkgs/development/compilers/gcc/common/configure-flags.nix b/nixpkgs/pkgs/development/compilers/gcc/common/configure-flags.nix
new file mode 100644
index 000000000000..7e0d691412b3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/common/configure-flags.nix
@@ -0,0 +1,199 @@
+{ stdenv
+, targetPackages
+
+, crossStageStatic, libcCross
+, version
+
+, gmp, mpfr, libmpc, libelf, isl
+, cloog ? null
+
+, enableLTO
+, enableMultilib
+, enablePlugin
+, enableShared
+
+, langC
+, langCC
+, langD ? false
+, langFortran
+, langJava ? false, javaAwtGtk ? false, javaAntlr ? null, javaEcj ? null
+, langAda ? false
+, langGo
+, langObjC
+, langObjCpp
+, langJit
+}:
+
+assert cloog != null -> stdenv.lib.versionOlder version "5";
+assert langJava -> stdenv.lib.versionOlder version "7";
+
+# Note [Windows Exception Handling]
+# sjlj (short jump long jump) exception handling makes no sense on x86_64,
+# it's forcably slowing programs down as it produces a constant overhead.
+# On x86_64 we have SEH (Structured Exception Handling) and we should use
+# that. On i686, we do not have SEH, and have to use sjlj with dwarf2.
+# Hence it's now conditional on x86_32 (i686 is 32bit).
+#
+# ref: https://stackoverflow.com/questions/15670169/what-is-difference-between-sjlj-vs-dwarf-vs-seh
+
+
+let
+  inherit (stdenv)
+    buildPlatform hostPlatform targetPlatform
+    lib;
+
+  crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
+  crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem";
+
+  crossConfigureFlags =
+    # Ensure that -print-prog-name is able to find the correct programs.
+    [
+      "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as"
+      "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld"
+    ]
+    ++ (if crossStageStatic then [
+      "--disable-libssp"
+      "--disable-nls"
+      "--without-headers"
+      "--disable-threads"
+      "--disable-libgomp"
+      "--disable-libquadmath"
+      "--disable-shared"
+      "--disable-libatomic" # requires libc
+      "--disable-decimal-float" # requires libc
+      "--disable-libmpx" # requires libc
+    ] ++ lib.optionals crossMingw [
+      "--with-headers=${lib.getDev libcCross}/include"
+      "--with-gcc"
+      "--with-gnu-as"
+      "--with-gnu-ld"
+      "--disable-debug"
+      "--disable-win32-registry"
+      "--enable-hash-synchronization"
+      "--enable-libssp"
+      "--disable-nls"
+      # To keep ABI compatibility with upstream mingw-w64
+      "--enable-fully-dynamic-string"      
+    ] ++ lib.optionals (crossMingw && targetPlatform.isx86_32) [
+      # See Note [Windows Exception Handling]
+      "--enable-sjlj-exceptions"
+      "--with-dwarf2"
+    ] else [
+      (if crossDarwin then "--with-sysroot=${lib.getLib libcCross}/share/sysroot"
+       else                "--with-headers=${lib.getDev libcCross}${libcCross.incdir or "/include"}")
+      "--enable-__cxa_atexit"
+      "--enable-long-long"
+      "--enable-threads=${if targetPlatform.isUnix then "posix"
+                          else if targetPlatform.isWindows then "mcf"
+                          else "single"}"
+      "--enable-nls"
+      "--disable-decimal-float" # No final libdecnumber (it may work only in 386)
+    ] ++ lib.optionals (targetPlatform.libc == "uclibc" || targetPlatform.libc == "musl") [
+      # libsanitizer requires netrom/netrom.h which is not
+      # available in uclibc.
+      "--disable-libsanitizer"
+      # In uclibc cases, libgomp needs an additional '-ldl'
+      # and as I don't know how to pass it, I disable libgomp.
+      "--disable-libgomp"
+    ] ++ lib.optionals (targetPlatform.libc == "musl") [
+      # musl at least, disable: https://git.buildroot.net/buildroot/commit/?id=873d4019f7fb00f6a80592224236b3ba7d657865
+      "--disable-libmpx"
+    ] ++ lib.optional (targetPlatform.libc == "newlib") "--with-newlib"
+      ++ lib.optional (targetPlatform.libc == "avrlibc") "--with-avrlibc"
+    );
+
+  configureFlags =
+    # Basic dependencies
+    [
+      "--with-gmp-include=${gmp.dev}/include"
+      "--with-gmp-lib=${gmp.out}/lib"
+      "--with-mpfr-include=${mpfr.dev}/include"
+      "--with-mpfr-lib=${mpfr.out}/lib"
+      "--with-mpc=${libmpc}"
+    ]
+    ++ lib.optional (libelf != null) "--with-libelf=${libelf}"
+    ++ lib.optional (!(crossMingw && crossStageStatic))
+      "--with-native-system-header-dir=${lib.getDev stdenv.cc.libc}/include"
+
+    # Basic configuration
+    ++ [
+      (lib.enableFeature enableLTO "lto")
+      "--disable-libstdcxx-pch"
+      "--without-included-gettext"
+      "--with-system-zlib"
+      "--enable-static"
+      "--enable-languages=${
+        lib.concatStrings (lib.intersperse ","
+          (  lib.optional langC        "c"
+          ++ lib.optional langCC       "c++"
+          ++ lib.optional langD        "d"
+          ++ lib.optional langFortran  "fortran"
+          ++ lib.optional langJava     "java"
+          ++ lib.optional langAda      "ada"
+          ++ lib.optional langGo       "go"
+          ++ lib.optional langObjC     "objc"
+          ++ lib.optional langObjCpp   "obj-c++"
+          ++ lib.optionals crossDarwin [ "objc" "obj-c++" ]
+          ++ lib.optional langJit      "jit"
+          )
+        )
+      }"
+    ]
+
+    ++ (if (enableMultilib || targetPlatform.isAvr)
+      then ["--enable-multilib" "--disable-libquadmath"]
+      else ["--disable-multilib"])
+    ++ lib.optional (!enableShared) "--disable-shared"
+    ++ [
+      (lib.enableFeature enablePlugin "plugin")
+    ]
+
+    # Optional features
+    ++ lib.optional (isl != null) "--with-isl=${isl}"
+    ++ lib.optionals (cloog != null) [
+      "--with-cloog=${cloog}"
+      "--disable-cloog-version-check"
+      "--enable-cloog-backend=isl"
+    ]
+
+    # Ada options
+    ++ lib.optional langAda "--enable-libada"
+
+    # Java options
+    ++ lib.optionals langJava [
+      "--with-ecj-jar=${javaEcj}"
+
+      # Follow Sun's layout for the convenience of IcedTea/OpenJDK.  See
+      # <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
+      "--enable-java-home"
+      "--with-java-home=\${prefix}/lib/jvm/jre"
+    ]
+    ++ lib.optional javaAwtGtk "--enable-java-awt=gtk"
+    ++ lib.optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}"
+
+    ++ (import ../common/platform-flags.nix { inherit (stdenv) lib targetPlatform; })
+    ++ lib.optionals (targetPlatform != hostPlatform) crossConfigureFlags
+    ++ lib.optional (targetPlatform != hostPlatform) "--disable-bootstrap"
+
+    # Platform-specific flags
+    ++ lib.optional (targetPlatform == hostPlatform && targetPlatform.isx86_32) "--with-arch=${stdenv.hostPlatform.parsed.cpu.name}"
+    ++ lib.optionals hostPlatform.isSunOS [
+      "--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit"
+      # On Illumos/Solaris GNU as is preferred
+      "--with-gnu-as" "--without-gnu-ld"
+    ]
+    ++ lib.optionals (targetPlatform == hostPlatform && targetPlatform.libc == "musl") [
+      "--disable-libsanitizer"
+      "--disable-symvers"
+      "libat_cv_have_ifunc=no"
+      "--disable-gnu-indirect-function"
+    ] 
+    ++ lib.optionals langJit [
+      "--enable-host-shared"
+    ] 
+    ++ lib.optionals (langD) [
+      "--with-target-system-zlib=yes"
+    ]
+  ;
+
+in configureFlags
diff --git a/nixpkgs/pkgs/development/compilers/gcc/common/extra-target-flags.nix b/nixpkgs/pkgs/development/compilers/gcc/common/extra-target-flags.nix
new file mode 100644
index 000000000000..0a5a7a1bc1cb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/common/extra-target-flags.nix
@@ -0,0 +1,33 @@
+{ stdenv, crossStageStatic, langD ? false, libcCross, threadsCross }:
+
+let
+  inherit (stdenv) lib hostPlatform targetPlatform;
+in
+
+{
+  # For non-cross builds these flags are currently assigned in builder.sh.
+  # It would be good to consolidate the generation of makeFlags
+  # ({C,CXX,LD}FLAGS_FOR_{BUILD,TARGET}, etc...) at some point.
+  EXTRA_FLAGS_FOR_TARGET = let
+      mkFlags = dep: langD: lib.optionals (targetPlatform != hostPlatform && dep != null && !langD) ([
+        "-O2 -idirafter ${lib.getDev dep}${dep.incdir or "/include"}"
+      ] ++ stdenv.lib.optionals (! crossStageStatic) [
+        "-B${lib.getLib dep}${dep.libdir or "/lib"}"
+      ]);
+    in mkFlags libcCross langD
+    ++ lib.optionals (!crossStageStatic) (mkFlags threadsCross langD)
+    ;
+
+  EXTRA_LDFLAGS_FOR_TARGET = let
+      mkFlags = dep: lib.optionals (targetPlatform != hostPlatform && dep != null) ([
+        "-Wl,-L${lib.getLib dep}${dep.libdir or "/lib"}"
+      ] ++ (if crossStageStatic then [
+          "-B${lib.getLib dep}${dep.libdir or "/lib"}"
+        ] else [
+          "-Wl,-rpath,${lib.getLib dep}${dep.libdir or "/lib"}"
+          "-Wl,-rpath-link,${lib.getLib dep}${dep.libdir or "/lib"}"
+      ]));
+    in mkFlags libcCross
+    ++ lib.optionals (!crossStageStatic) (mkFlags threadsCross)
+    ;
+}
diff --git a/nixpkgs/pkgs/development/compilers/gcc/common/mfcgthreads-patches-repo.nix b/nixpkgs/pkgs/development/compilers/gcc/common/mfcgthreads-patches-repo.nix
new file mode 100644
index 000000000000..f8822c6dba0e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/common/mfcgthreads-patches-repo.nix
@@ -0,0 +1 @@
+"740f233da00c4fb5bcc225b2e29768824bcecc58"
diff --git a/nixpkgs/pkgs/development/compilers/gcc/common/platform-flags.nix b/nixpkgs/pkgs/development/compilers/gcc/common/platform-flags.nix
new file mode 100644
index 000000000000..f3cdce411939
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/common/platform-flags.nix
@@ -0,0 +1,16 @@
+{ lib, targetPlatform }:
+
+let
+  p =  targetPlatform.platform.gcc or {}
+    // targetPlatform.parsed.abi;
+in lib.concatLists [
+  (lib.optional (!targetPlatform.isx86_64 && p ? arch) "--with-arch=${p.arch}") # --with-arch= is unknown flag on x86_64
+  (lib.optional (p ? cpu) "--with-cpu=${p.cpu}")
+  (lib.optional (p ? abi) "--with-abi=${p.abi}")
+  (lib.optional (p ? fpu) "--with-fpu=${p.fpu}")
+  (lib.optional (p ? float) "--with-float=${p.float}")
+  (lib.optional (p ? mode) "--with-mode=${p.mode}")
+  (lib.optional
+    (let tp = targetPlatform; in tp.isPower && tp.libc == "glibc" && tp.is64bit && tp.isLittleEndian)
+    "--with-long-double-128")
+]
diff --git a/nixpkgs/pkgs/development/compilers/gcc/common/pre-configure.nix b/nixpkgs/pkgs/development/compilers/gcc/common/pre-configure.nix
new file mode 100644
index 000000000000..85b854e19b9a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/common/pre-configure.nix
@@ -0,0 +1,19 @@
+{ lib, version, hostPlatform
+, gnatboot ? null
+, langAda ? false
+, langJava ? false
+, langGo }:
+
+assert langJava -> lib.versionOlder version "7";
+assert langAda -> gnatboot != null;
+
+lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) ''
+  export NIX_LDFLAGS=`echo $NIX_LDFLAGS | sed -e s~$prefix/lib~$prefix/lib/amd64~g`
+  export LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET"
+  export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET"
+  export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET"
+'' + lib.optionalString (lib.versionOlder version "7" && (langJava || langGo)) ''
+  export lib=$out;
+'' + lib.optionalString langAda ''
+  export PATH=${gnatboot}/bin:$PATH
+''
diff --git a/nixpkgs/pkgs/development/compilers/gcc/gfortran-darwin-NXConstStr.patch b/nixpkgs/pkgs/development/compilers/gcc/gfortran-darwin-NXConstStr.patch
new file mode 100644
index 000000000000..a7e158ca364b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/gfortran-darwin-NXConstStr.patch
@@ -0,0 +1,27 @@
+From 82f81877458ea372176eabb5de36329431dce99b Mon Sep 17 00:00:00 2001
+From: Iain Sandoe <iain@codesourcery.com>
+Date: Sat, 21 Dec 2013 00:30:18 +0000
+Subject: [PATCH] don't try to mark local symbols as no-dead-strip
+
+---
+ gcc/config/darwin.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
+index 40804b8..0080299 100644
+--- a/gcc/config/darwin.c
++++ b/gcc/config/darwin.c
+@@ -1259,6 +1259,11 @@ darwin_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED)
+ void
+ darwin_mark_decl_preserved (const char *name)
+ {
++  /* Actually we shouldn't mark any local symbol this way, but for now
++     this only happens with ObjC meta-data.  */
++  if (darwin_label_is_anonymous_local_objc_name (name))
++    return;
++
+   fprintf (asm_out_file, "\t.no_dead_strip ");
+   assemble_name (asm_out_file, name);
+   fputc ('\n', asm_out_file);
+-- 
+2.2.1
diff --git a/nixpkgs/pkgs/development/compilers/gcc/gfortran-driving.patch b/nixpkgs/pkgs/development/compilers/gcc/gfortran-driving.patch
new file mode 100644
index 000000000000..70708886b405
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/gfortran-driving.patch
@@ -0,0 +1,20 @@
+This patch fixes interaction with Libtool.
+See <http://thread.gmane.org/gmane.comp.gcc.patches/258777>, for details.
+
+--- a/gcc/fortran/gfortranspec.c
++++ b/gcc/fortran/gfortranspec.c
+@@ -461,8 +461,15 @@ For more information about these matters, see the file named COPYING\n\n"));
+     {
+       fprintf (stderr, _("Driving:"));
+       for (i = 0; i < g77_newargc; i++)
++	{
++	  if (g77_new_decoded_options[i].opt_index == OPT_l)
++	    /* Make sure no white space is inserted after `-l'.  */
++	    fprintf (stderr, " -l%s",
++		     g77_new_decoded_options[i].canonical_option[1]);
++	  else
+ 	fprintf (stderr, " %s",
+ 		 g77_new_decoded_options[i].orig_option_with_args_text);
++	}
+       fprintf (stderr, "\n");
+     }
diff --git a/nixpkgs/pkgs/development/compilers/gcc/gnat-cflags.patch b/nixpkgs/pkgs/development/compilers/gcc/gnat-cflags.patch
new file mode 100644
index 000000000000..a16266bbf39c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/gnat-cflags.patch
@@ -0,0 +1,35 @@
+diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in
+index 4e74252bd74..0d848b5b4e3 100644
+--- a/gcc/ada/gcc-interface/Makefile.in
++++ b/gcc/ada/gcc-interface/Makefile.in
+@@ -111,7 +111,7 @@ NO_OMIT_ADAFLAGS = -fno-omit-frame-pointer
+ NO_SIBLING_ADAFLAGS = -fno-optimize-sibling-calls
+ NO_REORDER_ADAFLAGS = -fno-toplevel-reorder
+ GNATLIBFLAGS = -W -Wall -gnatpg -nostdinc
+-GNATLIBCFLAGS = -g -O2
++GNATLIBCFLAGS = -g -O2 $(CFLAGS_FOR_TARGET)
+ # Pretend that _Unwind_GetIPInfo is available for the target by default.  This
+ # should be autodetected during the configuration of libada and passed down to
+ # here, but we need something for --disable-libada and hope for the best.
+@@ -198,7 +198,7 @@ RTSDIR = rts$(subst /,_,$(MULTISUBDIR))
+ # Link flags used to build gnat tools.  By default we prefer to statically
+ # link with libgcc to avoid a dependency on shared libgcc (which is tricky
+ # to deal with as it may conflict with the libgcc provided by the system).
+-GCC_LINK_FLAGS=-static-libstdc++ -static-libgcc
++GCC_LINK_FLAGS=-static-libstdc++ -static-libgcc $(CFLAGS_FOR_TARGET)
+
+ # End of variables for you to override.
+
+diff --git a/libada/Makefile.in b/libada/Makefile.in
+index 522b9207326..ca866c74471 100644
+--- a/libada/Makefile.in
++++ b/libada/Makefile.in
+@@ -59,7 +59,7 @@ LDFLAGS=
+ CFLAGS=-g
+ PICFLAG = @PICFLAG@
+ GNATLIBFLAGS= -W -Wall -gnatpg -nostdinc
+-GNATLIBCFLAGS= -g -O2
++GNATLIBCFLAGS= -g -O2 $(CFLAGS)
+ GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) $(CFLAGS_FOR_TARGET) \
+        -fexceptions -DIN_RTS @have_getipinfo@ @have_capability@
+
diff --git a/nixpkgs/pkgs/development/compilers/gcc/libgomp-dont-force-initial-exec.patch b/nixpkgs/pkgs/development/compilers/gcc/libgomp-dont-force-initial-exec.patch
new file mode 100644
index 000000000000..afd1f7456d32
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/libgomp-dont-force-initial-exec.patch
@@ -0,0 +1,40 @@
+From 01c433f4788441c0963005b9d3fad5b2865e6651 Mon Sep 17 00:00:00 2001
+From: Will Dietz <w@wdtz.org>
+Date: Mon, 24 Sep 2018 19:57:50 -0500
+Subject: [PATCH] libgomp/configure.tgt: don't force initial-exec tls-model
+
+---
+ libgomp/configure.tgt | 17 -----------------
+ 1 file changed, 17 deletions(-)
+
+diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt
+index 74d95a570c7..b608c55f0c1 100644
+--- a/libgomp/configure.tgt
++++ b/libgomp/configure.tgt
+@@ -10,23 +10,6 @@
+ #  XCFLAGS		Add extra compile flags to use.
+ #  XLDFLAGS		Add extra link flags to use.
+ 
+-# Optimize TLS usage by avoiding the overhead of dynamic allocation.
+-if test $gcc_cv_have_tls = yes ; then
+-  case "${target}" in
+-
+-    *-*-k*bsd*-gnu*)
+-	;;
+-
+-    *-*-linux* | *-*-gnu*)
+-	XCFLAGS="${XCFLAGS} -ftls-model=initial-exec"
+-	;;
+-
+-    *-*-rtems*)
+-	XCFLAGS="${XCFLAGS} -ftls-model=local-exec"
+-	;;
+-  esac
+-fi
+-
+ # Since we require POSIX threads, assume a POSIX system by default.
+ config_path="posix"
+ 
+-- 
+2.19.0
+
diff --git a/nixpkgs/pkgs/development/compilers/gcc/libphobos.patch b/nixpkgs/pkgs/development/compilers/gcc/libphobos.patch
new file mode 100644
index 000000000000..a16ea5416ffb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/libphobos.patch
@@ -0,0 +1,119 @@
+diff --git a/Makefile.in b/Makefile.in
+index a375471..83c5ecb 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -804,7 +804,7 @@ BASE_FLAGS_TO_PASS = \
+ 	"STAGE1_LANGUAGES=$(STAGE1_LANGUAGES)" \
+ 	"GNATBIND=$(GNATBIND)" \
+ 	"GNATMAKE=$(GNATMAKE)" \
+-	"GDC=$(GDC)" \
++	"`echo 'GDC=$(GDC)' | sed -e 's/-idirafter [^ ]*//g'`" \
+ 	"GDCFLAGS=$(GDCFLAGS)" \
+ 	"AR_FOR_TARGET=$(AR_FOR_TARGET)" \
+ 	"AS_FOR_TARGET=$(AS_FOR_TARGET)" \
+@@ -817,7 +817,7 @@ BASE_FLAGS_TO_PASS = \
+ 	"GFORTRAN_FOR_TARGET=$(GFORTRAN_FOR_TARGET)" \
+ 	"GOC_FOR_TARGET=$(GOC_FOR_TARGET)" \
+ 	"GOCFLAGS_FOR_TARGET=$(GOCFLAGS_FOR_TARGET)" \
+-	"GDC_FOR_TARGET=$(GDC_FOR_TARGET)" \
++	"`echo 'GDC_FOR_TARGET=$(GDC_FOR_TARGET)' | sed -e 's/-idirafter [^ ]*//g'`" \
+ 	"GDCFLAGS_FOR_TARGET=$(GDCFLAGS_FOR_TARGET)" \
+ 	"LD_FOR_TARGET=$(LD_FOR_TARGET)" \
+ 	"LIPO_FOR_TARGET=$(LIPO_FOR_TARGET)" \
+@@ -890,7 +890,7 @@ EXTRA_HOST_FLAGS = \
+ 	'DLLTOOL=$(DLLTOOL)' \
+ 	'GFORTRAN=$(GFORTRAN)' \
+ 	'GOC=$(GOC)' \
+-	'GDC=$(GDC)' \
++	"`echo 'GDC=$(GDC)' | sed -e 's/-idirafter [^ ]*//g'`" \
+ 	'LD=$(LD)' \
+ 	'LIPO=$(LIPO)' \
+ 	'NM=$(NM)' \
+@@ -966,8 +966,11 @@ EXTRA_TARGET_FLAGS = \
+ 	'STAGE1_LDFLAGS=$$(POSTSTAGE1_LDFLAGS)' \
+ 	'STAGE1_LIBS=$$(POSTSTAGE1_LIBS)' \
+ 	"TFLAGS=$$TFLAGS"
++EXTRA_TARGET_FLAGS_D = \
++	"`echo $(EXTRA_TARGET_FLAGS) | sed -e 's/-idirafter [^ ]*//g'`"
+ 
+ TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
++TARGET_FLAGS_TO_PASS_D = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS_D)
+ 
+ # Flags to pass down to gcc.  gcc builds a library, libgcc.a, so it
+ # unfortunately needs the native compiler and the target ar and
+@@ -47285,7 +47288,7 @@ check-target-libphobos:
+ 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ 	$(NORMAL_TARGET_EXPORTS) \
+ 	(cd $(TARGET_SUBDIR)/libphobos && \
+-	  $(MAKE) $(TARGET_FLAGS_TO_PASS)   check)
++	  $(MAKE) $(TARGET_FLAGS_TO_PASS_D)   check)
+ 
+ @endif target-libphobos
+ 
+@@ -47300,7 +47303,7 @@ install-target-libphobos: installdirs
+ 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ 	$(NORMAL_TARGET_EXPORTS) \
+ 	(cd $(TARGET_SUBDIR)/libphobos && \
+-	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install)
++	  $(MAKE) $(TARGET_FLAGS_TO_PASS_D)  install)
+ 
+ @endif target-libphobos
+ 
+@@ -47315,7 +47318,7 @@ install-strip-target-libphobos: installdirs
+ 	s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
+ 	$(NORMAL_TARGET_EXPORTS) \
+ 	(cd $(TARGET_SUBDIR)/libphobos && \
+-	  $(MAKE) $(TARGET_FLAGS_TO_PASS)  install-strip)
++	  $(MAKE) $(TARGET_FLAGS_TO_PASS_D)  install-strip)
+ 
+ @endif target-libphobos
+ 
+diff --git a/Makefile.tpl b/Makefile.tpl
+index 41cae58..b3d32e7 100644
+--- a/Makefile.tpl
++++ b/Makefile.tpl
+@@ -721,8 +721,11 @@ EXTRA_TARGET_FLAGS = \
+ 	'STAGE1_LDFLAGS=$$(POSTSTAGE1_LDFLAGS)' \
+ 	'STAGE1_LIBS=$$(POSTSTAGE1_LIBS)' \
+ 	"TFLAGS=$$TFLAGS"
++EXTRA_TARGET_FLAGS_D = \
++	"`echo $(EXTRA_TARGET_FLAGS) | sed -e 's/-idirafter [^ ]*//g'`"
+ 
+ TARGET_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS)
++TARGET_FLAGS_TO_PASS_D = $(BASE_FLAGS_TO_PASS) $(EXTRA_TARGET_FLAGS_D)
+ 
+ # Flags to pass down to gcc.  gcc builds a library, libgcc.a, so it
+ # unfortunately needs the native compiler and the target ar and
+diff --git a/libphobos/Makefile.in b/libphobos/Makefile.in
+index e894417..2d18dcb 100644
+--- a/libphobos/Makefile.in
++++ b/libphobos/Makefile.in
+@@ -365,6 +365,7 @@ AM_MAKEFLAGS = \
+ 	"LIBCFLAGS=$(LIBCFLAGS)" \
+ 	"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
+ 	"MAKE=$(MAKE)" \
++	"`echo 'MAKEFLAGS=$(MAKEFLAGS)' | sed -e 's/-j[0-9]+/-j1/'`" \
+ 	"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
+ 	"PICFLAG=$(PICFLAG)" \
+ 	"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
+@@ -694,6 +695,8 @@ uninstall-am:
+ 
+ .PRECIOUS: Makefile
+ 
++.NOTPARALLEL:
++
+ # GNU Make needs to see an explicit $(MAKE) variable in the command it
+ # runs to enable its job server during parallel builds.  Hence the
+ # comments below.
+diff --git a/libphobos/configure b/libphobos/configure
+index b3cb5f3..25adf2b 100755
+--- a/libphobos/configure
++++ b/libphobos/configure
+@@ -5122,6 +5122,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ 
++GDC=`$as_echo "$GDC" | sed -e 's/-idirafter [^ ]*//g'`
+ 
+ ac_ext=d
+ ac_compile='$GDC -c $GDCFLAGS conftest.$ac_ext >&5'
diff --git a/nixpkgs/pkgs/development/compilers/gcc/libstdc++-hook.sh b/nixpkgs/pkgs/development/compilers/gcc/libstdc++-hook.sh
new file mode 100644
index 000000000000..f5b4123b64d9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/libstdc++-hook.sh
@@ -0,0 +1,4 @@
+# See pkgs/build-support/setup-hooks/role.bash
+getHostRole
+
+export NIX_CXXSTDLIB_COMPILE${role_post}+=" -isystem $(echo -n @gcc@/include/c++/*) -isystem $(echo -n @gcc@/include/c++/*)/@targetConfig@"
diff --git a/nixpkgs/pkgs/development/compilers/gcc/libstdc++-netbsd-ctypes.patch b/nixpkgs/pkgs/development/compilers/gcc/libstdc++-netbsd-ctypes.patch
new file mode 100644
index 000000000000..28fff80b786d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/libstdc++-netbsd-ctypes.patch
@@ -0,0 +1,141 @@
+diff --git a/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h b/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h
+index ff3ec893974..21eccf9fde1 100644
+--- a/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h
++++ b/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h
+@@ -38,40 +38,46 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+   /// @brief  Base class for ctype.
+   struct ctype_base
+   {
+-    // Non-standard typedefs.
+-    typedef const unsigned char*	__to_type;
+ 
+     // NB: Offsets into ctype<char>::_M_table force a particular size
+     // on the mask type. Because of this, we don't use an enum.
+-    typedef unsigned char      	mask;
+ 
+ #ifndef _CTYPE_U
+-    static const mask upper    	= _U;
+-    static const mask lower 	= _L;
+-    static const mask alpha 	= _U | _L;
+-    static const mask digit 	= _N;
+-    static const mask xdigit 	= _N | _X;
+-    static const mask space 	= _S;
+-    static const mask print 	= _P | _U | _L | _N | _B;
+-    static const mask graph 	= _P | _U | _L | _N;
+-    static const mask cntrl 	= _C;
+-    static const mask punct 	= _P;
+-    static const mask alnum 	= _U | _L | _N;
++    // Non-standard typedefs.
++    typedef const unsigned char*	__to_type;
++
++    typedef unsigned char	mask;
++
++    static const mask upper	= _U;
++    static const mask lower	= _L;
++    static const mask alpha	= _U | _L;
++    static const mask digit	= _N;
++    static const mask xdigit	= _N | _X;
++    static const mask space	= _S;
++    static const mask print	= _P | _U | _L | _N | _B;
++    static const mask graph	= _P | _U | _L | _N;
++    static const mask cntrl	= _C;
++    static const mask punct	= _P;
++    static const mask alnum	= _U | _L | _N;
+ #else
+-    static const mask upper    	= _CTYPE_U;
+-    static const mask lower 	= _CTYPE_L;
+-    static const mask alpha 	= _CTYPE_U | _CTYPE_L;
+-    static const mask digit 	= _CTYPE_N;
+-    static const mask xdigit 	= _CTYPE_N | _CTYPE_X;
+-    static const mask space 	= _CTYPE_S;
+-    static const mask print 	= _CTYPE_P | _CTYPE_U | _CTYPE_L | _CTYPE_N | _CTYPE_B;
+-    static const mask graph 	= _CTYPE_P | _CTYPE_U | _CTYPE_L | _CTYPE_N;
+-    static const mask cntrl 	= _CTYPE_C;
+-    static const mask punct 	= _CTYPE_P;
+-    static const mask alnum 	= _CTYPE_U | _CTYPE_L | _CTYPE_N;
++    typedef const unsigned short*	__to_type;
++
++    typedef unsigned short	mask;
++
++    static const mask upper	= _CTYPE_U;
++    static const mask lower	= _CTYPE_L;
++    static const mask alpha	= _CTYPE_A;
++    static const mask digit	= _CTYPE_D;
++    static const mask xdigit	= _CTYPE_X;
++    static const mask space	= _CTYPE_S;
++    static const mask print	= _CTYPE_R;
++    static const mask graph	= _CTYPE_G;
++    static const mask cntrl	= _CTYPE_C;
++    static const mask punct	= _CTYPE_P;
++    static const mask alnum	= _CTYPE_A | _CTYPE_D;
+ #endif
+ #if __cplusplus >= 201103L
+-    static const mask blank 	= space;
++    static const mask blank	= space;
+ #endif
+   };
+ 
+diff --git a/libstdc++-v3/config/os/bsd/netbsd/ctype_configure_char.cc b/libstdc++-v3/config/os/bsd/netbsd/ctype_configure_char.cc
+index ed3b7cd0d6a..33358e8f5d8 100644
+--- a/libstdc++-v3/config/os/bsd/netbsd/ctype_configure_char.cc
++++ b/libstdc++-v3/config/os/bsd/netbsd/ctype_configure_char.cc
+@@ -38,11 +38,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+ 
+ // Information as gleaned from /usr/include/ctype.h
+ 
+-  extern "C" const u_int8_t _C_ctype_[];
+-
+   const ctype_base::mask*
+   ctype<char>::classic_table() throw()
+-  { return _C_ctype_ + 1; }
++  { return _C_ctype_tab_ + 1; }
+ 
+   ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
+ 		     size_t __refs)
+@@ -69,14 +67,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+ 
+   char
+   ctype<char>::do_toupper(char __c) const
+-  { return ::toupper((int) __c); }
++  { return ::toupper((int)(unsigned char) __c); }
+ 
+   const char*
+   ctype<char>::do_toupper(char* __low, const char* __high) const
+   {
+     while (__low < __high)
+       {
+-	*__low = ::toupper((int) *__low);
++	*__low = ::toupper((int)(unsigned char) *__low);
+ 	++__low;
+       }
+     return __high;
+@@ -84,14 +82,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+ 
+   char
+   ctype<char>::do_tolower(char __c) const
+-  { return ::tolower((int) __c); }
++  { return ::tolower((int)(unsigned char) __c); }
+ 
+   const char*
+   ctype<char>::do_tolower(char* __low, const char* __high) const
+   {
+     while (__low < __high)
+       {
+-	*__low = ::tolower((int) *__low);
++	*__low = ::tolower((int)(unsigned char) *__low);
+ 	++__low;
+       }
+     return __high;
+diff --git a/libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h b/libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h
+index ace1120fba2..3234ce17c70 100644
+--- a/libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h
++++ b/libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h
+@@ -48,7 +48,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
+   is(const char* __low, const char* __high, mask* __vec) const
+   {
+     while (__low < __high)
+-      *__vec++ = _M_table[*__low++];
++      *__vec++ = _M_table[(unsigned char)*__low++];
+     return __high;
+   }
+ 
diff --git a/nixpkgs/pkgs/development/compilers/gcc/libstdc++-target.patch b/nixpkgs/pkgs/development/compilers/gcc/libstdc++-target.patch
new file mode 100644
index 000000000000..fb622b395806
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/libstdc++-target.patch
@@ -0,0 +1,32 @@
+Patch to make the target libraries 'configure' scripts find the proper CPP.
+I noticed that building the mingw32 cross compiler.
+Looking at the build script for mingw in archlinux, I think that only nixos
+needs this patch. I don't know why.
+diff --git a/Makefile.in b/Makefile.in
+index 93f66b6..d691917 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -266,6 +266,7 @@ BASE_TARGET_EXPORTS = \
+ 	AR="$(AR_FOR_TARGET)"; export AR; \
+ 	AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
+ 	CC="$(CC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CC; \
++	CPP="$(CC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS -E"; export CC; \
+ 	CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
+ 	CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ 	CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
+@@ -291,11 +292,13 @@ BASE_TARGET_EXPORTS = \
+ RAW_CXX_TARGET_EXPORTS = \
+ 	$(BASE_TARGET_EXPORTS) \
+ 	CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
+-	CXX="$(RAW_CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX;
++	CXX="$(RAW_CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX; \
++	CXXCPP="$(RAW_CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS -E"; export CXX;
+ 
+ NORMAL_TARGET_EXPORTS = \
+ 	$(BASE_TARGET_EXPORTS) \
+-	CXX="$(CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX;
++	CXX="$(CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export CXX; \
++	CXXCPP="$(CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS -E"; export CXX;
+ 
+ # Where to find GMP
+ HOST_GMPLIBS = @gmplibs@
diff --git a/nixpkgs/pkgs/development/compilers/gcc/no-sys-dirs.patch b/nixpkgs/pkgs/development/compilers/gcc/no-sys-dirs.patch
new file mode 100644
index 000000000000..36df51904acf
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/no-sys-dirs.patch
@@ -0,0 +1,28 @@
+diff -ru -x '*~' gcc-4.8.3-orig/gcc/cppdefault.c gcc-4.8.3/gcc/cppdefault.c
+--- gcc-4.8.3-orig/gcc/cppdefault.c	2013-01-10 21:38:27.000000000 +0100
++++ gcc-4.8.3/gcc/cppdefault.c	2014-08-18 16:20:32.893944536 +0200
+@@ -35,6 +35,8 @@
+ # undef CROSS_INCLUDE_DIR
+ #endif
+ 
++#undef LOCAL_INCLUDE_DIR
++
+ const struct default_include cpp_include_defaults[]
+ #ifdef INCLUDE_DEFAULTS
+ = INCLUDE_DEFAULTS;
+diff -ru -x '*~' gcc-4.8.3-orig/gcc/gcc.c gcc-4.8.3/gcc/gcc.c
+--- gcc-4.8.3-orig/gcc/gcc.c	2014-03-23 12:30:57.000000000 +0100
++++ gcc-4.8.3/gcc/gcc.c	2014-08-18 13:19:32.689201690 +0200
+@@ -1162,10 +1162,10 @@
+ /* Default prefixes to attach to command names.  */
+ 
+ #ifndef STANDARD_STARTFILE_PREFIX_1
+-#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
++#define STANDARD_STARTFILE_PREFIX_1 ""
+ #endif
+ #ifndef STANDARD_STARTFILE_PREFIX_2
+-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
++#define STANDARD_STARTFILE_PREFIX_2 ""
+ #endif
+ 
+ #ifdef CROSS_DIRECTORY_STRUCTURE  /* Don't use these prefixes for a cross compiler.  */
diff --git a/nixpkgs/pkgs/development/compilers/gcc/parallel-bconfig.patch b/nixpkgs/pkgs/development/compilers/gcc/parallel-bconfig.patch
new file mode 100644
index 000000000000..bc56ac698f5a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/parallel-bconfig.patch
@@ -0,0 +1,32 @@
+Hacky work-around for highly parallel builds.
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57125
+
+diff --git a/gcc/Makefile.in b/gcc/Makefile.in
+index aad927c..182f666 100644
+--- a/gcc/Makefile.in
++++ b/gcc/Makefile.in
+@@ -3908,21 +3908,21 @@ build/gengtype-lex.o: $(BCONFIG_H)
+ 
+ gengtype-parse.o build/gengtype-parse.o : gengtype-parse.c gengtype.h \
+   $(SYSTEM_H)
+-gengtype-parse.o: $(CONFIG_H)
++gengtype-parse.o: $(CONFIG_H) $(BCONFIG_H)
+ CFLAGS-gengtype-parse.o += -DGENERATOR_FILE
+ build/gengtype-parse.o: $(BCONFIG_H)
+ 
+ gengtype-state.o build/gengtype-state.o: gengtype-state.c $(SYSTEM_H) \
+   gengtype.h errors.h double-int.h version.h $(HASHTAB_H) $(OBSTACK_H) \
+   $(XREGEX_H)
+-gengtype-state.o: $(CONFIG_H)
++gengtype-state.o: $(CONFIG_H) $(BCONFIG_H)
+ CFLAGS-gengtype-state.o += -DGENERATOR_FILE
+ build/gengtype-state.o: $(BCONFIG_H)
+ 
+ gengtype.o build/gengtype.o : gengtype.c $(SYSTEM_H) gengtype.h 	\
+   rtl.def insn-notes.def errors.h double-int.h version.h $(HASHTAB_H) \
+   $(OBSTACK_H) $(XREGEX_H)
+-gengtype.o: $(CONFIG_H)
++gengtype.o: $(CONFIG_H) $(BCONFIG_H)
+ CFLAGS-gengtype.o += -DGENERATOR_FILE
+ build/gengtype.o: $(BCONFIG_H)
+ 
diff --git a/nixpkgs/pkgs/development/compilers/gcc/ppc-musl.patch b/nixpkgs/pkgs/development/compilers/gcc/ppc-musl.patch
new file mode 100644
index 000000000000..bc90888a3797
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/ppc-musl.patch
@@ -0,0 +1,18 @@
+diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
+index cbee89140dd..e1f26b0a096 100644
+--- a/gcc/config/rs6000/sysv4.h
++++ b/gcc/config/rs6000/sysv4.h
+@@ -996,13 +996,7 @@ ncrtn.o%s"
+     { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1,	\
+       GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 },
+ 
+-#ifdef LOCAL_INCLUDE_DIR
+-#define INCLUDE_DEFAULTS_MUSL_LOCAL			\
+-    { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 },		\
+-    { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 },
+-#else
+ #define INCLUDE_DEFAULTS_MUSL_LOCAL
+-#endif
+ 
+ #ifdef PREFIX_INCLUDE_DIR
+ #define INCLUDE_DEFAULTS_MUSL_PREFIX			\
diff --git a/nixpkgs/pkgs/development/compilers/gcc/res_state-not-declared.patch b/nixpkgs/pkgs/development/compilers/gcc/res_state-not-declared.patch
new file mode 100644
index 000000000000..e970487786d0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/res_state-not-declared.patch
@@ -0,0 +1,13 @@
+diff --git a/libsanitizer/tsan/tsan_platform_linux.cc b/libsanitizer/tsan/tsan_platform_linux.cc
+index fe69430..49f5270 100644
+--- a/libsanitizer/tsan/tsan_platform_linux.cc
++++ b/libsanitizer/tsan/tsan_platform_linux.cc
+@@ -351,7 +351,7 @@ bool IsGlobalVar(uptr addr) {
+ // closes within glibc. The code is a pure hack.
+ int ExtractResolvFDs(void *state, int *fds, int nfd) {
+   int cnt = 0;
+-  __res_state *statp = (__res_state*)state;
++  struct __res_state *statp = (struct __res_state*)state;
+   for (int i = 0; i < MAXNS && cnt < nfd; i++) {
+     if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
+       fds[cnt++] = statp->_u._ext.nssocks[i];
diff --git a/nixpkgs/pkgs/development/compilers/gcc/sigsegv-not-declared.patch b/nixpkgs/pkgs/development/compilers/gcc/sigsegv-not-declared.patch
new file mode 100644
index 000000000000..f9cfaec82026
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/sigsegv-not-declared.patch
@@ -0,0 +1,13 @@
+error: 'SIGSEGV' was not declared in this scope
+diff --git a/libsanitizer/asan/asan_linux.cc b/libsanitizer/asan/asan_linux.cc
+index 0692eb1..472f734 100644
+--- a/libsanitizer/asan/asan_linux.cc
++++ b/libsanitizer/asan/asan_linux.cc
+@@ -26,6 +26,7 @@
+ #include <sys/types.h>
+ #include <fcntl.h>
+ #include <pthread.h>
++#include <signal.h>
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <unwind.h>
diff --git a/nixpkgs/pkgs/development/compilers/gcc/struct-sigaltstack-4.9.patch b/nixpkgs/pkgs/development/compilers/gcc/struct-sigaltstack-4.9.patch
new file mode 100644
index 000000000000..fc126b4813d6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/struct-sigaltstack-4.9.patch
@@ -0,0 +1,78 @@
+hand-resolved trivial conflicts for 4.9 from the upstream patch
+72edc2c02f8b4768ad660f46a1c7e2400c0a8e06
+diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.cc b/libsanitizer/sanitizer_common/sanitizer_linux.cc
+index 69c9c10..8e53673 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_linux.cc
++++ b/libsanitizer/sanitizer_common/sanitizer_linux.cc
+@@ -599,8 +599,7 @@ uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5) {
+   return internal_syscall(__NR_prctl, option, arg2, arg3, arg4, arg5);
+ }
+ 
+-uptr internal_sigaltstack(const struct sigaltstack *ss,
+-                         struct sigaltstack *oss) {
++uptr internal_sigaltstack(const void *ss, void *oss) {
+   return internal_syscall(__NR_sigaltstack, (uptr)ss, (uptr)oss);
+ }
+ 
+diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.h b/libsanitizer/sanitizer_common/sanitizer_linux.h
+index 6422df1..8e111d1 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_linux.h
++++ b/libsanitizer/sanitizer_common/sanitizer_linux.h
+@@ -18,7 +18,6 @@
+ #include "sanitizer_platform_limits_posix.h"
+ 
+ struct link_map;  // Opaque type returned by dlopen().
+-struct sigaltstack;
+ 
+ namespace __sanitizer {
+ // Dirent structure for getdents(). Note that this structure is different from
+@@ -28,8 +27,7 @@ struct linux_dirent;
+ // Syscall wrappers.
+ uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
+ uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5);
+-uptr internal_sigaltstack(const struct sigaltstack* ss,
+-                          struct sigaltstack* oss);
++uptr internal_sigaltstack(const void* ss, void* oss);
+ uptr internal_sigaction(int signum, const __sanitizer_kernel_sigaction_t *act,
+     __sanitizer_kernel_sigaction_t *oldact);
+ uptr internal_sigprocmask(int how, __sanitizer_kernel_sigset_t *set,
+diff --git a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
+index 891386dc..234e8c6 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
++++ b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
+@@ -273,7 +273,7 @@ static int TracerThread(void* argument) {
+ 
+   // Alternate stack for signal handling.
+   InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize);
+-  struct sigaltstack handler_stack;
++  stack_t handler_stack;
+   internal_memset(&handler_stack, 0, sizeof(handler_stack));
+   handler_stack.ss_sp = handler_stack_memory.data();
+   handler_stack.ss_size = kHandlerStackSize;
+diff --git a/libsanitizer/tsan/tsan_platform_linux.cc b/libsanitizer/tsan/tsan_platform_linux.cc
+index 2ed5718..6f972ab 100644
+--- a/libsanitizer/tsan/tsan_platform_linux.cc
++++ b/libsanitizer/tsan/tsan_platform_linux.cc
+@@ -287,7 +287,7 @@ void InitializePlatform() {
+ int ExtractResolvFDs(void *state, int *fds, int nfd) {
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+   int cnt = 0;
+-  __res_state *statp = (__res_state*)state;
++  struct __res_state *statp = (struct __res_state*)state;
+   for (int i = 0; i < MAXNS && cnt < nfd; i++) {
+     if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
+       fds[cnt++] = statp->_u._ext.nssocks[i];
+
+error: 'SIGSEGV' was not declared in this scope
+diff --git a/libsanitizer/asan/asan_linux.cc b/libsanitizer/asan/asan_linux.cc
+index 0692eb1..472f734 100644
+--- a/libsanitizer/asan/asan_linux.cc
++++ b/libsanitizer/asan/asan_linux.cc
+@@ -26,6 +26,7 @@
+ #include <sys/types.h>
+ #include <fcntl.h>
+ #include <pthread.h>
++#include <signal.h>
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <unwind.h>
diff --git a/nixpkgs/pkgs/development/compilers/gcc/struct-sigaltstack.patch b/nixpkgs/pkgs/development/compilers/gcc/struct-sigaltstack.patch
new file mode 100644
index 000000000000..6e1ddb252c24
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/struct-sigaltstack.patch
@@ -0,0 +1,87 @@
+From 72edc2c02f8b4768ad660f46a1c7e2400c0a8e06 Mon Sep 17 00:00:00 2001
+From: jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Mon, 17 Jul 2017 19:41:08 +0000
+Subject: [PATCH] 	Backported from mainline 	2017-07-14  Jakub
+ Jelinek  <jakub@redhat.com>
+
+	PR sanitizer/81066
+	* sanitizer_common/sanitizer_linux.h: Cherry-pick upstream r307969.
+	* sanitizer_common/sanitizer_linux.cc: Likewise.
+	* sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc: Likewise.
+	* tsan/tsan_platform_linux.cc: Likewise.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@250287 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ libsanitizer/ChangeLog  (REMOVED)                             | 11 +++++++++++
+ libsanitizer/sanitizer_common/sanitizer_linux.cc              |  3 +--
+ libsanitizer/sanitizer_common/sanitizer_linux.h               |  4 +---
+ .../sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc  |  2 +-
+ libsanitizer/tsan/tsan_platform_linux.cc                      |  2 +-
+ 5 files changed, 15 insertions(+), 7 deletions(-)
+
+diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.cc b/libsanitizer/sanitizer_common/sanitizer_linux.cc
+index 806fcd5..5b6f186 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_linux.cc
++++ b/libsanitizer/sanitizer_common/sanitizer_linux.cc
+@@ -605,8 +605,7 @@ uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5) {
+ }
+ #endif
+ 
+-uptr internal_sigaltstack(const struct sigaltstack *ss,
+-                         struct sigaltstack *oss) {
++uptr internal_sigaltstack(const void *ss, void *oss) {
+   return internal_syscall(SYSCALL(sigaltstack), (uptr)ss, (uptr)oss);
+ }
+ 
+diff --git a/libsanitizer/sanitizer_common/sanitizer_linux.h b/libsanitizer/sanitizer_common/sanitizer_linux.h
+index 895bfc1..a42df57 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_linux.h
++++ b/libsanitizer/sanitizer_common/sanitizer_linux.h
+@@ -19,7 +19,6 @@
+ #include "sanitizer_platform_limits_posix.h"
+ 
+ struct link_map;  // Opaque type returned by dlopen().
+-struct sigaltstack;
+ 
+ namespace __sanitizer {
+ // Dirent structure for getdents(). Note that this structure is different from
+@@ -28,8 +27,7 @@ struct linux_dirent;
+ 
+ // Syscall wrappers.
+ uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
+-uptr internal_sigaltstack(const struct sigaltstack* ss,
+-                          struct sigaltstack* oss);
++uptr internal_sigaltstack(const void* ss, void* oss);
+ uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set,
+     __sanitizer_sigset_t *oldset);
+ 
+diff --git a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
+index 891386dc..234e8c6 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
++++ b/libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
+@@ -273,7 +273,7 @@ static int TracerThread(void* argument) {
+ 
+   // Alternate stack for signal handling.
+   InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize);
+-  struct sigaltstack handler_stack;
++  stack_t handler_stack;
+   internal_memset(&handler_stack, 0, sizeof(handler_stack));
+   handler_stack.ss_sp = handler_stack_memory.data();
+   handler_stack.ss_size = kHandlerStackSize;
+diff --git a/libsanitizer/tsan/tsan_platform_linux.cc b/libsanitizer/tsan/tsan_platform_linux.cc
+index 2ed5718..6f972ab 100644
+--- a/libsanitizer/tsan/tsan_platform_linux.cc
++++ b/libsanitizer/tsan/tsan_platform_linux.cc
+@@ -287,7 +287,7 @@ void InitializePlatform() {
+ int ExtractResolvFDs(void *state, int *fds, int nfd) {
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+   int cnt = 0;
+-  __res_state *statp = (__res_state*)state;
++  struct __res_state *statp = (struct __res_state*)state;
+   for (int i = 0; i < MAXNS && cnt < nfd; i++) {
+     if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
+       fds[cnt++] = statp->_u._ext.nssocks[i];
+-- 
+2.9.3
+
diff --git a/nixpkgs/pkgs/development/compilers/gcc/struct-ucontext-4.5.patch b/nixpkgs/pkgs/development/compilers/gcc/struct-ucontext-4.5.patch
new file mode 100644
index 000000000000..a84e9ffe2681
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/struct-ucontext-4.5.patch
@@ -0,0 +1,107 @@
+Trivally backported the upstream commit
+b685411208e0aaa79190d54faf945763514706b8
+(different directory, some files not present, etc.)
+We only really use x86* from those, probably, so I didn't bother much.
+diff --git a/gcc/config/alpha/linux-unwind.h b/gcc/config/alpha/linux-unwind.h
+index bdbba4a..e84812e 100644
+--- a/gcc/config/alpha/linux-unwind.h
++++ b/gcc/config/alpha/linux-unwind.h
+@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
+     {
+       struct rt_sigframe {
+ 	siginfo_t info;
+-	struct ucontext uc;
++	ucontext_t uc;
+       } *rt_ = context->cfa;
+       sc = &rt_->uc.uc_mcontext;
+     }
+diff --git a/gcc/config/bfin/linux-unwind.h b/gcc/config/bfin/linux-unwind.h
+index 77b7c23..8bf5e82 100644
+--- a/gcc/config/bfin/linux-unwind.h
++++ b/gcc/config/bfin/linux-unwind.h
+@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
+ 	void *puc;
+ 	char retcode[8];
+ 	siginfo_t info;
+-	struct ucontext uc;
++	ucontext_t uc;
+       } *rt_ = context->cfa;
+ 
+       /* The void * cast is necessary to avoid an aliasing warning.
+diff --git a/gcc/config/i386/linux-unwind.h b/gcc/config/i386/linux-unwind.h
+index 540a0a2..29efbe3 100644
+--- a/gcc/config/i386/linux-unwind.h
++++ b/gcc/config/i386/linux-unwind.h
+@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
+   if (*(unsigned char *)(pc+0) == 0x48
+       && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
+     {
+-      struct ucontext *uc_ = context->cfa;
++      ucontext_t *uc_ = context->cfa;
+       /* The void * cast is necessary to avoid an aliasing warning.
+          The aliasing warning is correct, but should not be a problem
+          because it does not alias anything.  */
+@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
+ 	siginfo_t *pinfo;
+ 	void *puc;
+ 	siginfo_t info;
+-	struct ucontext uc;
++	ucontext_t uc;
+       } *rt_ = context->cfa;
+       /* The void * cast is necessary to avoid an aliasing warning.
+          The aliasing warning is correct, but should not be a problem
+diff --git a/gcc/config/m68k/linux-unwind.h b/gcc/config/m68k/linux-unwind.h
+index 75b7cf7..f964e24 100644
+--- a/gcc/config/m68k/linux-unwind.h
++++ b/gcc/config/m68k/linux-unwind.h
+@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+ /* <sys/ucontext.h> is unfortunately broken right now.  */
+ struct uw_ucontext {
+ 	unsigned long	  uc_flags;
+-	struct ucontext  *uc_link;
++	ucontext_t	 *uc_link;
+ 	stack_t		  uc_stack;
+ 	mcontext_t	  uc_mcontext;
+ 	unsigned long	  uc_filler[80];
+diff --git a/gcc/config/pa/linux-unwind.h b/gcc/config/pa/linux-unwind.h
+index 9a2657f..e47493d 100644
+--- a/gcc/config/pa/linux-unwind.h
++++ b/gcc/config/pa/linux-unwind.h
+@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
+   struct sigcontext *sc;
+   struct rt_sigframe {
+     siginfo_t info;
+-    struct ucontext uc;
++    ucontext_t uc;
+   } *frame;
+ 
+   /* rt_sigreturn trampoline:
+diff --git a/gcc/config/sh/linux-unwind.h b/gcc/config/sh/linux-unwind.h
+index e389cac..0bf43ba 100644
+--- a/gcc/config/sh/linux-unwind.h
++++ b/gcc/config/sh/linux-unwind.h
+@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
+     {
+       struct rt_sigframe {
+ 	siginfo_t info;
+-	struct ucontext uc;
++	ucontext_t uc;
+       } *rt_ = context->cfa;
+       /* The void * cast is necessary to avoid an aliasing warning.
+          The aliasing warning is correct, but should not be a problem
+diff --git a/gcc/config/xtensa/linux-unwind.h b/gcc/config/xtensa/linux-unwind.h
+index 9872492..586a9d4 100644
+--- a/gcc/config/xtensa/linux-unwind.h
++++ b/gcc/config/xtensa/linux-unwind.h
+@@ -67,7 +67,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
+ 
+   struct rt_sigframe {
+     siginfo_t info;
+-    struct ucontext uc;
++    ucontext_t uc;
+   } *rt_;
+ 
+   /* movi a2, __NR_rt_sigreturn; syscall */
+-- 
+2.9.3
+
diff --git a/nixpkgs/pkgs/development/compilers/gcc/struct-ucontext-4.8.patch b/nixpkgs/pkgs/development/compilers/gcc/struct-ucontext-4.8.patch
new file mode 100644
index 000000000000..630ef6586e45
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/struct-ucontext-4.8.patch
@@ -0,0 +1,177 @@
+From b685411208e0aaa79190d54faf945763514706b8 Mon Sep 17 00:00:00 2001
+From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 4 Jul 2017 10:23:57 +0000
+Subject: [PATCH] Use ucontext_t not struct ucontext in linux-unwind.h files.
+
+Current glibc no longer gives the ucontext_t type the tag struct
+ucontext, to conform with POSIX namespace rules.  This requires
+various linux-unwind.h files in libgcc, that were previously using
+struct ucontext, to be fixed to use ucontext_t instead.  This is
+similar to the removal of the struct siginfo tag from siginfo_t some
+years ago.
+
+This patch changes those files to use ucontext_t instead.  As the
+standard name that should be unconditionally safe, so this is not
+restricted to architectures supported by glibc, or conditioned on the
+glibc version.
+
+Tested compilation together with current glibc with glibc's
+build-many-glibcs.py.
+
+	* config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),
+	config/alpha/linux-unwind.h (alpha_fallback_frame_state),
+	config/bfin/linux-unwind.h (bfin_fallback_frame_state),
+	config/i386/linux-unwind.h (x86_64_fallback_frame_state,
+	x86_fallback_frame_state), config/m68k/linux-unwind.h (struct
+	uw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),
+	config/pa/linux-unwind.h (pa32_fallback_frame_state),
+	config/sh/linux-unwind.h (sh_fallback_frame_state),
+	config/tilepro/linux-unwind.h (tile_fallback_frame_state),
+	config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use
+	ucontext_t instead of struct ucontext.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@249957 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ libgcc/ChangeLog     (REMOVED)       | 14 ++++++++++++++
+ libgcc/config/aarch64/linux-unwind.h |  2 +-
+ libgcc/config/alpha/linux-unwind.h   |  2 +-
+ libgcc/config/bfin/linux-unwind.h    |  2 +-
+ libgcc/config/i386/linux-unwind.h    |  4 ++--
+ libgcc/config/m68k/linux-unwind.h    |  2 +-
+ libgcc/config/nios2/linux-unwind.h   |  2 +-
+ libgcc/config/pa/linux-unwind.h      |  2 +-
+ libgcc/config/sh/linux-unwind.h      |  2 +-
+ libgcc/config/tilepro/linux-unwind.h |  2 +-
+ libgcc/config/xtensa/linux-unwind.h  |  2 +-
+ 11 files changed, 25 insertions(+), 11 deletions(-)
+
+diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/config/aarch64/linux-unwind.h
+index 4512efb..06de45a 100644
+--- a/libgcc/config/aarch64/linux-unwind.h
++++ b/libgcc/config/aarch64/linux-unwind.h
+@@ -52,7 +52,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context,
+   struct rt_sigframe
+   {
+     siginfo_t info;
+-    struct ucontext uc;
++    ucontext_t uc;
+   };
+ 
+   struct rt_sigframe *rt_;
+diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h
+index bdbba4a..e84812e 100644
+--- a/libgcc/config/alpha/linux-unwind.h
++++ b/libgcc/config/alpha/linux-unwind.h
+@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
+     {
+       struct rt_sigframe {
+ 	siginfo_t info;
+-	struct ucontext uc;
++	ucontext_t uc;
+       } *rt_ = context->cfa;
+       sc = &rt_->uc.uc_mcontext;
+     }
+diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h
+index 77b7c23..8bf5e82 100644
+--- a/libgcc/config/bfin/linux-unwind.h
++++ b/libgcc/config/bfin/linux-unwind.h
+@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
+ 	void *puc;
+ 	char retcode[8];
+ 	siginfo_t info;
+-	struct ucontext uc;
++	ucontext_t uc;
+       } *rt_ = context->cfa;
+ 
+       /* The void * cast is necessary to avoid an aliasing warning.
+diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h
+index 540a0a2..29efbe3 100644
+--- a/libgcc/config/i386/linux-unwind.h
++++ b/libgcc/config/i386/linux-unwind.h
+@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
+   if (*(unsigned char *)(pc+0) == 0x48
+       && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
+     {
+-      struct ucontext *uc_ = context->cfa;
++      ucontext_t *uc_ = context->cfa;
+       /* The void * cast is necessary to avoid an aliasing warning.
+          The aliasing warning is correct, but should not be a problem
+          because it does not alias anything.  */
+@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
+ 	siginfo_t *pinfo;
+ 	void *puc;
+ 	siginfo_t info;
+-	struct ucontext uc;
++	ucontext_t uc;
+       } *rt_ = context->cfa;
+       /* The void * cast is necessary to avoid an aliasing warning.
+          The aliasing warning is correct, but should not be a problem
+diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h
+index 75b7cf7..f964e24 100644
+--- a/libgcc/config/m68k/linux-unwind.h
++++ b/libgcc/config/m68k/linux-unwind.h
+@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+ /* <sys/ucontext.h> is unfortunately broken right now.  */
+ struct uw_ucontext {
+ 	unsigned long	  uc_flags;
+-	struct ucontext  *uc_link;
++	ucontext_t	 *uc_link;
+ 	stack_t		  uc_stack;
+ 	mcontext_t	  uc_mcontext;
+ 	unsigned long	  uc_filler[80];
+diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h
+index 9a2657f..e47493d 100644
+--- a/libgcc/config/pa/linux-unwind.h
++++ b/libgcc/config/pa/linux-unwind.h
+@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
+   struct sigcontext *sc;
+   struct rt_sigframe {
+     siginfo_t info;
+-    struct ucontext uc;
++    ucontext_t uc;
+   } *frame;
+ 
+   /* rt_sigreturn trampoline:
+diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h
+index e389cac..0bf43ba 100644
+--- a/libgcc/config/sh/linux-unwind.h
++++ b/libgcc/config/sh/linux-unwind.h
+@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
+     {
+       struct rt_sigframe {
+ 	siginfo_t info;
+-	struct ucontext uc;
++	ucontext_t uc;
+       } *rt_ = context->cfa;
+       /* The void * cast is necessary to avoid an aliasing warning.
+          The aliasing warning is correct, but should not be a problem
+diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h
+index 796e976..75f8890 100644
+--- a/libgcc/config/tilepro/linux-unwind.h
++++ b/libgcc/config/tilepro/linux-unwind.h
+@@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context,
+   struct rt_sigframe {
+     unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
+     siginfo_t info;
+-    struct ucontext uc;
++    ucontext_t uc;
+   } *rt_;
+ 
+   /* Return if this is not a signal handler.  */
+diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h
+index 9872492..586a9d4 100644
+--- a/libgcc/config/xtensa/linux-unwind.h
++++ b/libgcc/config/xtensa/linux-unwind.h
+@@ -67,7 +67,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
+ 
+   struct rt_sigframe {
+     siginfo_t info;
+-    struct ucontext uc;
++    ucontext_t uc;
+   } *rt_;
+ 
+   /* movi a2, __NR_rt_sigreturn; syscall */
+-- 
+2.9.3
+
diff --git a/nixpkgs/pkgs/development/compilers/gcc/struct-ucontext-libjava.patch b/nixpkgs/pkgs/development/compilers/gcc/struct-ucontext-libjava.patch
new file mode 100644
index 000000000000..3892a56954e0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/struct-ucontext-libjava.patch
@@ -0,0 +1,33 @@
+--- a/libjava/include/x86_64-signal.h
++++ a/libjava/include/x86_64-signal.h
+@@ -28,7 +28,7 @@
+ #define HANDLE_DIVIDE_OVERFLOW						\
+ do									\
+ {									\
+-  struct ucontext *_uc = (struct ucontext *)_p;				\
++  ucontext_t *_uc = (ucontext_t *)_p;					\
+   gregset_t &_gregs = _uc->uc_mcontext.gregs;				\
+   unsigned char *_rip = (unsigned char *)_gregs[REG_RIP];		\
+ 									\
+--- a/libjava/include/i386-signal.h
++++ a/libjava/include/i386-signal.h
+@@ -29,7 +29,7 @@
+ #define HANDLE_DIVIDE_OVERFLOW						\
+ do									\
+ {									\
+-  struct ucontext *_uc = (struct ucontext *)_p;				\
++  ucontext_t *_uc = (ucontext_t *)_p;					\
+   gregset_t &_gregs = _uc->uc_mcontext.gregs;				\
+   unsigned char *_eip = (unsigned char *)_gregs[REG_EIP];		\
+ 									\
+--- a/libjava/include/s390-signal.h
++++ a/libjava/include/s390-signal.h
+@@ -51,7 +51,7 @@
+   struct                                                                \
+   {                                                                     \
+     unsigned long int uc_flags;                                         \
+-    struct ucontext *uc_link;                                           \
++    ucontext_t *uc_link;                                                \
+     stack_t uc_stack;                                                   \
+     mcontext_t uc_mcontext;                                             \
+     unsigned long sigmask[2];                                           \
diff --git a/nixpkgs/pkgs/development/compilers/gcc/struct-ucontext.patch b/nixpkgs/pkgs/development/compilers/gcc/struct-ucontext.patch
new file mode 100644
index 000000000000..c7fb6d1f71cf
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/struct-ucontext.patch
@@ -0,0 +1,190 @@
+From b685411208e0aaa79190d54faf945763514706b8 Mon Sep 17 00:00:00 2001
+From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
+Date: Tue, 4 Jul 2017 10:23:57 +0000
+Subject: [PATCH] Use ucontext_t not struct ucontext in linux-unwind.h files.
+
+Current glibc no longer gives the ucontext_t type the tag struct
+ucontext, to conform with POSIX namespace rules.  This requires
+various linux-unwind.h files in libgcc, that were previously using
+struct ucontext, to be fixed to use ucontext_t instead.  This is
+similar to the removal of the struct siginfo tag from siginfo_t some
+years ago.
+
+This patch changes those files to use ucontext_t instead.  As the
+standard name that should be unconditionally safe, so this is not
+restricted to architectures supported by glibc, or conditioned on the
+glibc version.
+
+Tested compilation together with current glibc with glibc's
+build-many-glibcs.py.
+
+	* config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),
+	config/alpha/linux-unwind.h (alpha_fallback_frame_state),
+	config/bfin/linux-unwind.h (bfin_fallback_frame_state),
+	config/i386/linux-unwind.h (x86_64_fallback_frame_state,
+	x86_fallback_frame_state), config/m68k/linux-unwind.h (struct
+	uw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),
+	config/pa/linux-unwind.h (pa32_fallback_frame_state),
+	config/sh/linux-unwind.h (sh_fallback_frame_state),
+	config/tilepro/linux-unwind.h (tile_fallback_frame_state),
+	config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use
+	ucontext_t instead of struct ucontext.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@249957 138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ libgcc/ChangeLog     (REMOVED)       | 14 ++++++++++++++
+ libgcc/config/aarch64/linux-unwind.h |  2 +-
+ libgcc/config/alpha/linux-unwind.h   |  2 +-
+ libgcc/config/bfin/linux-unwind.h    |  2 +-
+ libgcc/config/i386/linux-unwind.h    |  4 ++--
+ libgcc/config/m68k/linux-unwind.h    |  2 +-
+ libgcc/config/nios2/linux-unwind.h   |  2 +-
+ libgcc/config/pa/linux-unwind.h      |  2 +-
+ libgcc/config/sh/linux-unwind.h      |  2 +-
+ libgcc/config/tilepro/linux-unwind.h |  2 +-
+ libgcc/config/xtensa/linux-unwind.h  |  2 +-
+ 11 files changed, 25 insertions(+), 11 deletions(-)
+
+diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/config/aarch64/linux-unwind.h
+index 4512efb..06de45a 100644
+--- a/libgcc/config/aarch64/linux-unwind.h
++++ b/libgcc/config/aarch64/linux-unwind.h
+@@ -52,7 +52,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context,
+   struct rt_sigframe
+   {
+     siginfo_t info;
+-    struct ucontext uc;
++    ucontext_t uc;
+   };
+ 
+   struct rt_sigframe *rt_;
+diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h
+index bdbba4a..e84812e 100644
+--- a/libgcc/config/alpha/linux-unwind.h
++++ b/libgcc/config/alpha/linux-unwind.h
+@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
+     {
+       struct rt_sigframe {
+ 	siginfo_t info;
+-	struct ucontext uc;
++	ucontext_t uc;
+       } *rt_ = context->cfa;
+       sc = &rt_->uc.uc_mcontext;
+     }
+diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h
+index 77b7c23..8bf5e82 100644
+--- a/libgcc/config/bfin/linux-unwind.h
++++ b/libgcc/config/bfin/linux-unwind.h
+@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
+ 	void *puc;
+ 	char retcode[8];
+ 	siginfo_t info;
+-	struct ucontext uc;
++	ucontext_t uc;
+       } *rt_ = context->cfa;
+ 
+       /* The void * cast is necessary to avoid an aliasing warning.
+diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h
+index 540a0a2..29efbe3 100644
+--- a/libgcc/config/i386/linux-unwind.h
++++ b/libgcc/config/i386/linux-unwind.h
+@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
+   if (*(unsigned char *)(pc+0) == 0x48
+       && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
+     {
+-      struct ucontext *uc_ = context->cfa;
++      ucontext_t *uc_ = context->cfa;
+       /* The void * cast is necessary to avoid an aliasing warning.
+          The aliasing warning is correct, but should not be a problem
+          because it does not alias anything.  */
+@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
+ 	siginfo_t *pinfo;
+ 	void *puc;
+ 	siginfo_t info;
+-	struct ucontext uc;
++	ucontext_t uc;
+       } *rt_ = context->cfa;
+       /* The void * cast is necessary to avoid an aliasing warning.
+          The aliasing warning is correct, but should not be a problem
+diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h
+index 75b7cf7..f964e24 100644
+--- a/libgcc/config/m68k/linux-unwind.h
++++ b/libgcc/config/m68k/linux-unwind.h
+@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
+ /* <sys/ucontext.h> is unfortunately broken right now.  */
+ struct uw_ucontext {
+ 	unsigned long	  uc_flags;
+-	struct ucontext  *uc_link;
++	ucontext_t	 *uc_link;
+ 	stack_t		  uc_stack;
+ 	mcontext_t	  uc_mcontext;
+ 	unsigned long	  uc_filler[80];
+diff --git a/libgcc/config/nios2/linux-unwind.h b/libgcc/config/nios2/linux-unwind.h
+index 2304142..30f25ea 100644
+--- a/libgcc/config/nios2/linux-unwind.h
++++ b/libgcc/config/nios2/linux-unwind.h
+@@ -38,7 +38,7 @@ struct nios2_mcontext {
+ 
+ struct nios2_ucontext {
+   unsigned long uc_flags;
+-  struct ucontext *uc_link;
++  ucontext_t *uc_link;
+   stack_t uc_stack;
+   struct nios2_mcontext uc_mcontext;
+   sigset_t uc_sigmask;	/* mask last for extensibility */
+diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h
+index 9a2657f..e47493d 100644
+--- a/libgcc/config/pa/linux-unwind.h
++++ b/libgcc/config/pa/linux-unwind.h
+@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
+   struct sigcontext *sc;
+   struct rt_sigframe {
+     siginfo_t info;
+-    struct ucontext uc;
++    ucontext_t uc;
+   } *frame;
+ 
+   /* rt_sigreturn trampoline:
+diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h
+index e389cac..0bf43ba 100644
+--- a/libgcc/config/sh/linux-unwind.h
++++ b/libgcc/config/sh/linux-unwind.h
+@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
+     {
+       struct rt_sigframe {
+ 	siginfo_t info;
+-	struct ucontext uc;
++	ucontext_t uc;
+       } *rt_ = context->cfa;
+       /* The void * cast is necessary to avoid an aliasing warning.
+          The aliasing warning is correct, but should not be a problem
+diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h
+index 796e976..75f8890 100644
+--- a/libgcc/config/tilepro/linux-unwind.h
++++ b/libgcc/config/tilepro/linux-unwind.h
+@@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context,
+   struct rt_sigframe {
+     unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
+     siginfo_t info;
+-    struct ucontext uc;
++    ucontext_t uc;
+   } *rt_;
+ 
+   /* Return if this is not a signal handler.  */
+diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h
+index 9872492..586a9d4 100644
+--- a/libgcc/config/xtensa/linux-unwind.h
++++ b/libgcc/config/xtensa/linux-unwind.h
+@@ -67,7 +67,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
+ 
+   struct rt_sigframe {
+     siginfo_t info;
+-    struct ucontext uc;
++    ucontext_t uc;
+   } *rt_;
+ 
+   /* movi a2, __NR_rt_sigreturn; syscall */
+-- 
+2.9.3
+
diff --git a/nixpkgs/pkgs/development/compilers/gcc/use-source-date-epoch.patch b/nixpkgs/pkgs/development/compilers/gcc/use-source-date-epoch.patch
new file mode 100644
index 000000000000..65a5ab028c1c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcc/use-source-date-epoch.patch
@@ -0,0 +1,52 @@
+https://gcc.gnu.org/ml/gcc-patches/2015-06/msg02210.html
+
+diff --git a/libcpp/macro.c b/libcpp/macro.c
+index 1e0a0b5..a52e3cb 100644
+--- a/libcpp/macro.c
++++ b/libcpp/macro.c
+@@ -349,14 +349,38 @@ _cpp_builtin_macro_text (cpp_reader *pfile, cpp_hashnode *node)
+ 	     slow on some systems.  */
+ 	  time_t tt;
+ 	  struct tm *tb = NULL;
++	  char *source_date_epoch;
+ 
+-	  /* (time_t) -1 is a legitimate value for "number of seconds
+-	     since the Epoch", so we have to do a little dance to
+-	     distinguish that from a genuine error.  */
+-	  errno = 0;
+-	  tt = time(NULL);
+-	  if (tt != (time_t)-1 || errno == 0)
+-	    tb = localtime (&tt);
++	  /* Allow the date and time to be set externally by an exported
++	     environment variable to enable reproducible builds. */
++	  source_date_epoch = getenv ("SOURCE_DATE_EPOCH");
++	  if (source_date_epoch)
++	    {
++	      errno = 0;
++	      tt = (time_t) strtol (source_date_epoch, NULL, 10);
++	      if (errno == 0)
++	        {
++		  tb = gmtime (&tt);
++		  if (tb == NULL)
++		    cpp_error (pfile, CPP_DL_ERROR,
++			       "SOURCE_DATE_EPOCH=\"%s\" is not a valid date",
++			       source_date_epoch);
++	        }
++	      else
++		cpp_error (pfile, CPP_DL_ERROR,
++			   "SOURCE_DATE_EPOCH=\"%s\" is not a valid number",
++			   source_date_epoch);
++	    }
++	  else
++	    {
++	    /* (time_t) -1 is a legitimate value for "number of seconds
++	       since the Epoch", so we have to do a little dance to
++	       distinguish that from a genuine error.  */
++	    errno = 0;
++	    tt = time(NULL);
++	    if (tt != (time_t)-1 || errno == 0)
++	      tb = localtime (&tt);
++	  }
+ 
+ 	  if (tb)
+ 	    {
diff --git a/nixpkgs/pkgs/development/compilers/gcl/2.6.13-pre.nix b/nixpkgs/pkgs/development/compilers/gcl/2.6.13-pre.nix
new file mode 100644
index 000000000000..f4f63bc9b19f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcl/2.6.13-pre.nix
@@ -0,0 +1,51 @@
+{ stdenv, fetchgit, mpfr, m4, binutils, emacs, zlib, which
+, texinfo, libX11, xorgproto, libXi, gmp, readline, strace
+, libXext, libXt, libXaw, libXmu } :
+
+assert stdenv ? cc ;
+assert stdenv.cc.isGNU ;
+assert stdenv.cc ? libc ;
+assert stdenv.cc.libc != null ;
+
+stdenv.mkDerivation {
+  pname = "gcl";
+  version = "2.6.13pre50";
+
+  src = fetchgit {
+    sha256 = "0vpxb6z5g9fjavrgx8gz8fsjvskfz64f63qibh5s00fvvndlwi88";
+    url = "https://git.savannah.gnu.org/r/gcl.git";
+    rev = "refs/tags/Version_2_6_13pre50";
+  };
+
+  postPatch = ''
+    sed -e 's/<= obj-date/<= (if (= 0 obj-date) 1 obj-date)/' -i lsp/make.lisp
+  ''
+  # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=902475
+  + ''
+    substituteInPlace h/elf64_i386_reloc.h \
+      --replace 'case R_X86_64_PC32:' 'case R_X86_64_PC32: case R_X86_64_PLT32:'
+  '';
+
+  sourceRoot = "gcl/gcl";
+
+  patches = [];
+
+  buildInputs = [
+    mpfr m4 binutils emacs gmp
+    libX11 xorgproto libXi
+    libXext libXt libXaw libXmu
+    zlib which texinfo readline strace
+  ];
+
+  configureFlags = [
+    "--enable-ansi"
+  ];
+
+  hardeningDisable = [ "pic" "bindnow" ];
+
+  meta = {
+    description = "GNU Common Lisp compiler working via GCC";
+    maintainers = [ stdenv.lib.maintainers.raskin ];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gcl/default.nix b/nixpkgs/pkgs/development/compilers/gcl/default.nix
new file mode 100644
index 000000000000..a8a1bf9fc1bd
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gcl/default.nix
@@ -0,0 +1,51 @@
+{ stdenv, fetchurl, mpfr, m4, binutils, emacs, zlib, which
+, texinfo, libX11, xorgproto, libXi, gmp
+, libXext, libXt, libXaw, libXmu } :
+
+assert stdenv ? cc ;
+assert stdenv.cc.isGNU ;
+assert stdenv.cc ? libc ;
+assert stdenv.cc.libc != null ;
+
+stdenv.mkDerivation rec {
+  pname = "gcl";
+  version = "2.6.12";
+
+  src = fetchurl {
+    sha256 = "1s4hs2qbjqmn9h88l4xvsifq5c3dlc5s74lyb61rdi5grhdlkf4f";
+    url = "http://gnu.spinellicreations.com/gcl/${pname}-${version}.tar.gz";
+  };
+
+  patches = [(fetchurl {
+    url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-lisp/gcl/files/gcl-2.6.12-gcc5.patch";
+    sha256 = "00jbsn0qp8ki2w7dx8caha7g2hr9076xa6bg48j3qqqncff93zdh";
+  })];
+
+  # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=902475
+  postPatch = ''
+    substituteInPlace h/elf64_i386_reloc.h \
+      --replace 'case R_X86_64_PC32:' 'case R_X86_64_PC32: case R_X86_64_PLT32:'
+  '';
+
+  buildInputs = [
+    mpfr m4 binutils emacs gmp
+    libX11 xorgproto libXi
+    libXext libXt libXaw libXmu
+    zlib which texinfo
+  ];
+
+  configureFlags = [
+    "--enable-ansi"
+  ];
+
+  hardeningDisable = [ "pic" "bindnow" ];
+
+  NIX_CFLAGS_COMPILE = "-fgnu89-inline";
+
+  meta = with stdenv.lib; {
+    description = "GNU Common Lisp compiler working via GCC";
+    maintainers = [ maintainers.raskin ];
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gerbil/build.nix b/nixpkgs/pkgs/development/compilers/gerbil/build.nix
new file mode 100644
index 000000000000..8297dafff8e2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gerbil/build.nix
@@ -0,0 +1,101 @@
+{ pkgs, gccStdenv, lib, coreutils, bash, # makeStaticLibraries,
+  openssl, zlib, sqlite, libxml2, libyaml, libmysqlclient, lmdb, leveldb, postgresql,
+  version, git-version,
+  gambit-support,
+  gambit ? pkgs.gambit, gambit-params ? pkgs.gambit-support.stable-params, src }:
+
+# We use Gambit, that works 10x better with GCC than Clang. See ../gambit/build.nix
+let stdenv = gccStdenv; in
+
+stdenv.mkDerivation rec {
+  pname = "gerbil";
+  inherit version;
+  inherit src;
+
+  buildInputs_libraries = [ openssl zlib sqlite libxml2 libyaml libmysqlclient lmdb leveldb postgresql ];
+
+  # TODO: either fix all of Gerbil's dependencies to provide static libraries,
+  # or give up and delete all tentative support for static libraries.
+  #buildInputs_staticLibraries = map makeStaticLibraries buildInputs_libraries;
+
+  buildInputs = [ gambit ]
+    ++ buildInputs_libraries; # ++ buildInputs_staticLibraries;
+
+  NIX_CFLAGS_COMPILE = "-I${libmysqlclient}/include/mysql -L${libmysqlclient}/lib/mysql";
+
+  postPatch = ''
+    echo '(define (gerbil-version-string) "v${git-version}")' > src/gerbil/runtime/gx-version.scm ;
+    patchShebangs . ;
+    grep -Fl '#!/usr/bin/env' `find . -type f -executable` | while read f ; do
+      substituteInPlace "$f" --replace '#!/usr/bin/env' '#!${coreutils}/bin/env' ;
+    done ;
+'';
+
+## TODO: make static compilation work.
+## For that, get all the packages below to somehow expose static libraries,
+## so we can offer users the option to statically link them into Gambit and/or Gerbil.
+## Then add the following to the postPatch script above:
+#     cat > etc/gerbil_static_libraries.sh <<EOF
+# OPENSSL_LIBCRYPTO=${makeStaticLibraries openssl}/lib/libcrypto.a # MISSING!
+# OPENSSL_LIBSSL=${makeStaticLibraries openssl}/lib/libssl.a # MISSING!
+# ZLIB=${makeStaticLibraries zlib}/lib/libz.a
+# SQLITE=${makeStaticLibraries sqlite}/lib/sqlite.a # MISSING!
+# LIBXML2=${makeStaticLibraries libxml2}/lib/libxml2.a # MISSING!
+# YAML=${makeStaticLibraries libyaml}/lib/libyaml.a # MISSING!
+# MYSQL=${makeStaticLibraries libmysqlclient}/lib/mariadb/libmariadb.a
+# LMDB=${makeStaticLibraries lmdb}/lib/mysql/libmysqlclient_r.a # MISSING!
+# LEVELDB=${makeStaticLibraries leveldb}/lib/libleveldb.a
+# EOF
+
+  configurePhase = ''
+    (cd src && ./configure \
+      --prefix=$out/gerbil \
+      --with-gambit=${gambit}/gambit \
+      --enable-libxml \
+      --enable-libyaml \
+      --enable-zlib \
+      --enable-sqlite \
+      --enable-mysql \
+      --enable-lmdb \
+      --enable-leveldb)
+  '';
+
+  buildPhase = ''
+    runHook preBuild
+
+    # gxprof testing uses $HOME/.cache/gerbil/gxc
+    export HOME=$PWD
+    export GERBIL_BUILD_CORES=$NIX_BUILD_CORES
+    export GERBIL_GXC=$PWD/bin/gxc
+    export GERBIL_BASE=$PWD
+    export GERBIL_HOME=$PWD
+    export GERBIL_PATH=$PWD/lib
+    export PATH=$PWD/bin:$PATH
+    ${gambit-support.export-gambopt gambit-params}
+
+    # Build, replacing make by build.sh
+    ( cd src && sh build.sh )
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/gerbil $out/bin
+    (cd src; ./install)
+    (cd $out/bin ; ln -s ../gerbil/bin/* .)
+    runHook postInstall
+  '';
+
+  dontStrip = true;
+
+  meta = {
+    description = "Gerbil Scheme";
+    homepage    = "https://github.com/vyzo/gerbil";
+    license     = lib.licenses.lgpl21; # also asl20, like Gambit
+    # NB regarding platforms: regularly tested on Linux, only occasionally on macOS.
+    # Please report success and/or failure to fare.
+    platforms   = lib.platforms.unix;
+    maintainers = with lib.maintainers; [ fare ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gerbil/default.nix b/nixpkgs/pkgs/development/compilers/gerbil/default.nix
new file mode 100644
index 000000000000..3367ae581b2e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gerbil/default.nix
@@ -0,0 +1,12 @@
+{ callPackage, fetchFromGitHub }:
+
+callPackage ./build.nix rec {
+  version = "0.16";
+  git-version = version;
+  src = fetchFromGitHub {
+    owner = "vyzo";
+    repo = "gerbil";
+    rev = "v${version}";
+    sha256 = "0vng0kxpnwsg8jbjdpyn4sdww36jz7zfpfbzayg9sdpz6bjxjy0f";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gerbil/gerbil-support.nix b/nixpkgs/pkgs/development/compilers/gerbil/gerbil-support.nix
new file mode 100644
index 000000000000..4e94b6e65de1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gerbil/gerbil-support.nix
@@ -0,0 +1,64 @@
+{ pkgs, gccStdenv, callPackage, fetchFromGitHub }:
+# See ../gambit/build.nix regarding gccStdenv
+
+rec {
+  # Gerbil libraries
+  gerbilPackages-unstable = {
+    gerbil-utils = callPackage ./gerbil-utils.nix { };
+  };
+
+  # Use this function in any package that uses Gerbil libraries, to define the GERBIL_LOADPATH.
+  gerbilLoadPath =
+    gerbilInputs : builtins.concatStringsSep ":" (map (x : x + "/gerbil/lib") gerbilInputs);
+
+  # Use this function to create a Gerbil library. See gerbil-utils as an example.
+  gerbilPackage = {
+    pname, version, src, meta, package,
+    git-version ? "", version-path ? "config/version.ss",
+    gerbil ? pkgs.gerbil-unstable,
+    gambit-params ? pkgs.gambit-support.stable-params,
+    gerbilInputs ? [],
+    buildInputs ? [],
+    softwareName ? "" } :
+    let buildInputs_ = buildInputs; in
+    gccStdenv.mkDerivation rec {
+      inherit src meta pname version;
+      buildInputs = [ gerbil ] ++ gerbilInputs ++ buildInputs_;
+      postPatch = ''
+        set -e ;
+        if [ -n "${version-path}" ] ; then
+          echo '(import :clan/utils/version)\n(register-software "${softwareName}" "${git-version}")\n' > "${version-path}"
+        fi
+        patchShebangs . ;
+      '';
+
+      postConfigure = ''
+        export GERBIL_BUILD_CORES=$NIX_BUILD_CORES
+        export GERBIL_PATH=$PWD/.build
+        export GERBIL_LOADPATH=${gerbilLoadPath gerbilInputs}
+        ${pkgs.gambit-support.export-gambopt gambit-params}
+      '';
+
+      buildPhase = ''
+        runHook preBuild
+        ./build.ss
+        runHook postBuild
+      '';
+
+      installPhase = ''
+        runHook preInstall
+        mkdir -p $out/gerbil/lib
+        cp -fa .build/lib $out/gerbil/
+        bins=(.build/bin/*)
+        if [ 0 -lt ''${#bins} ] ; then
+          cp -fa .build/bin $out/gerbil/
+          mkdir $out/bin
+          cd $out/bin
+          ln -s ../gerbil/bin/* .
+        fi
+        runHook postInstall
+      '';
+
+      dontFixup = true;
+    };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gerbil/gerbil-utils.nix b/nixpkgs/pkgs/development/compilers/gerbil/gerbil-utils.nix
new file mode 100644
index 000000000000..075a63d7bf4c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gerbil/gerbil-utils.nix
@@ -0,0 +1,24 @@
+{ lib, fetchFromGitHub, gerbil-unstable, gerbil-support, gambit-support }:
+
+gerbil-support.gerbilPackage {
+  pname = "gerbil-utils";
+  version = "unstable-2020-05-17";
+  git-version = "33ef720";
+  package = "clan";
+  gerbil = gerbil-unstable;
+  gambit-params = gambit-support.unstable-params;
+  version-path = "";
+  src = fetchFromGitHub {
+    owner = "fare";
+    repo = "gerbil-utils";
+    rev = "33ef720799ba98dc9eec773c662f070af4bac016";
+    sha256 = "0dsb97magbxzjqqfzwq4qwf7i80llv0s1dsy9nkzkvkq8drxlmqf";
+  };
+  meta = {
+    description = "Gerbil Clan: Community curated Collection of Common Utilities";
+    homepage    = "https://github.com/fare/gerbil-utils";
+    license     = lib.licenses.lgpl21;
+    platforms   = lib.platforms.unix;
+    maintainers = with lib.maintainers; [ fare ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gerbil/unstable.nix b/nixpkgs/pkgs/development/compilers/gerbil/unstable.nix
new file mode 100644
index 000000000000..9de6dc42907a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gerbil/unstable.nix
@@ -0,0 +1,15 @@
+{ callPackage, fetchFromGitHub, gambit-unstable, gambit-support }:
+
+callPackage ./build.nix rec {
+  version = "unstable-2020-05-17";
+  git-version = "0.16-1-g36a31050";
+  src = fetchFromGitHub {
+    owner = "vyzo";
+    repo = "gerbil";
+    rev = "36a31050f6c80e7e1a49dfae96a57b2ad0260698";
+    sha256 = "0k3fypam9qx110sjxgzxa1mdf5b631w16s9p5v37cb8ll26vqfiv";
+  };
+  inherit gambit-support;
+  gambit = gambit-unstable;
+  gambit-params = gambit-support.unstable-params;
+}
diff --git a/nixpkgs/pkgs/development/compilers/gforth/default.nix b/nixpkgs/pkgs/development/compilers/gforth/default.nix
new file mode 100644
index 000000000000..d2a2a7a85e3c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gforth/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl, m4 }:
+
+let
+  version = "0.7.3";
+in
+stdenv.mkDerivation {
+  pname = "gforth";
+  inherit version;
+  src = fetchurl {
+    url = "https://ftp.gnu.org/gnu/gforth/gforth-${version}.tar.gz";
+    sha256 = "1c1bahc9ypmca8rv2dijiqbangm1d9av286904yw48ph7ciz4qig";
+  };
+
+  buildInputs = [ m4 ];
+
+  configureFlags = stdenv.lib.optional stdenv.isDarwin [ "--build=x86_64-apple-darwin" ];
+
+  postInstall = ''
+    mkdir -p $out/share/emacs/site-lisp
+    cp gforth.el $out/share/emacs/site-lisp/
+  '';
+
+  meta = {
+    description = "The Forth implementation of the GNU project";
+    homepage = "https://www.gnu.org/software/gforth/";
+    license = stdenv.lib.licenses.gpl3;
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghc/8.10.1.nix b/nixpkgs/pkgs/development/compilers/ghc/8.10.1.nix
new file mode 100644
index 000000000000..c70efe1fdef3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/8.10.1.nix
@@ -0,0 +1,242 @@
+{ stdenv, pkgsBuildTarget, targetPackages
+
+# build-tools
+, bootPkgs
+, autoconf, automake, coreutils, fetchurl, perl, python3, m4, sphinx
+, bash
+
+, libiconv ? null, ncurses
+
+, # GHC can be built with system libffi or a bundled one.
+  libffi ? null
+
+, useLLVM ? !stdenv.targetPlatform.isx86
+, # LLVM is conceptually a run-time-only depedendency, but for
+  # non-x86, we need LLVM to bootstrap later stages, so it becomes a
+  # build-time dependency too.
+  buildLlvmPackages, llvmPackages
+
+, # If enabled, GHC will be built with the GPL-free but slower integer-simple
+  # library instead of the faster but GPLed integer-gmp library.
+  enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
+
+, # If enabled, use -fPIC when compiling static libs.
+  enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
+
+, # Whether to build dynamic libs for the standard library (on the target
+  # platform). Static libs are always built.
+  enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt
+
+, # Whether to build terminfo.
+  enableTerminfo ? !stdenv.targetPlatform.isWindows
+
+, # What flavour to build. An empty string indicates no
+  # specific flavour and falls back to ghc default values.
+  ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
+    (if useLLVM then "perf-cross" else "perf-cross-ncg")
+
+, # Whether to disable the large address space allocator
+  # necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
+  disableLargeAddressSpace ? stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64
+}:
+
+assert !enableIntegerSimple -> gmp != null;
+
+let
+  inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
+  inherit (bootPkgs) ghc;
+
+  # TODO(@Ericson2314) Make unconditional
+  targetPrefix = stdenv.lib.optionalString
+    (targetPlatform != hostPlatform)
+    "${targetPlatform.config}-";
+
+  buildMK = ''
+    BuildFlavour = ${ghcFlavour}
+    ifneq \"\$(BuildFlavour)\" \"\"
+    include mk/flavours/\$(BuildFlavour).mk
+    endif
+    DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
+    INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
+  '' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
+    Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
+    CrossCompilePrefix = ${targetPrefix}
+    HADDOCK_DOCS = NO
+    BUILD_SPHINX_HTML = NO
+    BUILD_SPHINX_PDF = NO
+  '' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
+    GhcLibHcOpts += -fPIC
+    GhcRtsHcOpts += -fPIC
+  '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
+    EXTRA_CC_OPTS += -std=gnu99
+  '';
+
+  # Splicer will pull out correct variations
+  libDeps = platform: stdenv.lib.optional enableTerminfo ncurses
+    ++ [libffi]
+    ++ stdenv.lib.optional (!enableIntegerSimple) gmp
+    ++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
+
+  toolsForTarget = [
+    pkgsBuildTarget.targetPackages.stdenv.cc
+  ] ++ stdenv.lib.optional useLLVM buildLlvmPackages.llvm;
+
+  targetCC = builtins.head toolsForTarget;
+
+  # ld.gold is disabled for musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856
+  # see #84670 and #49071 for more background.
+  useLdGold = targetPlatform.isLinux && !(targetPlatform.useLLVM or false) && !targetPlatform.isMusl;
+
+in
+stdenv.mkDerivation (rec {
+  version = "8.10.1";
+  name = "${targetPrefix}ghc-${version}";
+
+  src = fetchurl {
+    url = "https://downloads.haskell.org/ghc/8.10.1/ghc-${version}-src.tar.xz";
+    sha256 = "1xgdl6ig5jzli3bg054vfryfkg0y6wggf68g66c32sr67bw0ffsf";
+  };
+
+  enableParallelBuilding = true;
+
+  outputs = [ "out" "doc" ];
+
+  postPatch = "patchShebangs .";
+
+  # GHC is a bit confused on its cross terminology.
+  preConfigure = ''
+    for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do
+      export "''${env#TARGET_}=''${!env}"
+    done
+    # GHC is a bit confused on its cross terminology, as these would normally be
+    # the *host* tools.
+    export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
+    export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
+    # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
+    export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString useLdGold ".gold"}"
+    export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
+    export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
+    export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
+    export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib"
+    export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
+    export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
+
+    echo -n "${buildMK}" > mk/build.mk
+    sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
+  '' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
+    export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    export NIX_LDFLAGS+=" -no_dtrace_dof"
+  '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
+    sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets
+  '' + stdenv.lib.optionalString targetPlatform.isMusl ''
+      echo "patching llvm-targets for musl targets..."
+      echo "Cloning these existing '*-linux-gnu*' targets:"
+      grep linux-gnu llvm-targets | sed 's/^/  /'
+      echo "(go go gadget sed)"
+      sed -i 's,\(^.*linux-\)gnu\(.*\)$,\0\n\1musl\2,' llvm-targets
+      echo "llvm-targets now contains these '*-linux-musl*' targets:"
+      grep linux-musl llvm-targets | sed 's/^/  /'
+
+      echo "And now patching to preserve '-musleabi' as done with '-gnueabi'"
+      # (aclocal.m4 is actual source, but patch configure as well since we don't re-gen)
+      for x in configure aclocal.m4; do
+        substituteInPlace $x \
+          --replace '*-android*|*-gnueabi*)' \
+                    '*-android*|*-gnueabi*|*-musleabi*)'
+      done
+  '';
+
+  # TODO(@Ericson2314): Always pass "--target" and always prefix.
+  configurePlatforms = [ "build" "host" ]
+    ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
+
+  # `--with` flags for libraries needed for RTS linker
+  configureFlags = [
+    "--datadir=$doc/share/doc/ghc"
+    "--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
+  ] ++ stdenv.lib.optionals (libffi != null) [
+    "--with-system-libffi"
+    "--with-ffi-includes=${targetPackages.libffi.dev}/include"
+    "--with-ffi-libraries=${targetPackages.libffi.out}/lib"
+  ] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
+    "--with-gmp-includes=${targetPackages.gmp.dev}/include"
+    "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
+  ] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
+    "--with-iconv-includes=${libiconv}/include"
+    "--with-iconv-libraries=${libiconv}/lib"
+  ] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
+    "--enable-bootstrap-with-devel-snapshot"
+  ] ++ stdenv.lib.optionals useLdGold [
+    "CFLAGS=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
+  ] ++ stdenv.lib.optionals (disableLargeAddressSpace) [
+    "--disable-large-address-space"
+  ];
+
+  # Make sure we never relax`$PATH` and hooks support for compatibility.
+  strictDeps = true;
+
+  # Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself.
+	dontAddExtraLibs = true;
+
+  nativeBuildInputs = [
+    perl autoconf automake m4 python3 sphinx
+    ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
+  ];
+
+  # For building runtime libs
+  depsBuildTarget = toolsForTarget;
+
+  buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
+
+  propagatedBuildInputs = [ targetPackages.stdenv.cc ]
+    ++ stdenv.lib.optional useLLVM llvmPackages.llvm;
+
+  depsTargetTarget = map stdenv.lib.getDev (libDeps targetPlatform);
+  depsTargetTargetPropagated = map (stdenv.lib.getOutput "out") (libDeps targetPlatform);
+
+  # required, because otherwise all symbols from HSffi.o are stripped, and
+  # that in turn causes GHCi to abort
+  stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
+
+  checkTarget = "test";
+
+  hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
+
+  postInstall = ''
+    # Install the bash completion file.
+    install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
+
+    # Patch scripts to include "readelf" and "cat" in $PATH.
+    for i in "$out/bin/"*; do
+      test ! -h $i || continue
+      egrep --quiet '^#!' <(head -n 1 $i) || continue
+      sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
+    done
+  '';
+
+  passthru = {
+    inherit bootPkgs targetPrefix;
+
+    inherit llvmPackages;
+    inherit enableShared;
+
+    # Our Cabal compiler name
+    haskellCompilerName = "ghc-${version}";
+  };
+
+  meta = {
+    homepage = "http://haskell.org/ghc";
+    description = "The Glasgow Haskell Compiler";
+    maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
+    inherit (ghc.meta) license platforms;
+  };
+
+} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
+  dontStrip = true;
+  dontPatchELF = true;
+  noAuditTmpdir = true;
+})
diff --git a/nixpkgs/pkgs/development/compilers/ghc/8.2.2-binary.nix b/nixpkgs/pkgs/development/compilers/ghc/8.2.2-binary.nix
new file mode 100644
index 000000000000..9f546bcb541c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/8.2.2-binary.nix
@@ -0,0 +1,191 @@
+{ stdenv, substituteAll
+, fetchurl, perl, gcc, llvm
+, ncurses5, gmp, glibc, libiconv
+, llvmPackages
+}:
+
+# Prebuilt only does native
+assert stdenv.targetPlatform == stdenv.hostPlatform;
+
+let
+  useLLVM = !stdenv.targetPlatform.isx86;
+
+  libPath = stdenv.lib.makeLibraryPath ([
+    ncurses5 gmp
+  ] ++ stdenv.lib.optional (stdenv.hostPlatform.isDarwin) libiconv);
+
+  libEnvVar = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin "DY"
+    + "LD_LIBRARY_PATH";
+
+  glibcDynLinker = assert stdenv.isLinux;
+    if stdenv.hostPlatform.libc == "glibc" then
+       # Could be stdenv.cc.bintools.dynamicLinker, keeping as-is to avoid rebuild.
+       ''"$(cat $NIX_CC/nix-support/dynamic-linker)"''
+    else
+      "${stdenv.lib.getLib glibc}/lib/ld-linux*";
+
+in
+
+stdenv.mkDerivation rec {
+  version = "8.2.2";
+
+  name = "ghc-${version}-binary";
+
+  src = fetchurl ({
+    i686-linux = {
+      url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-deb8-linux.tar.xz";
+      sha256 = "08w2ik55dp3n95qikmrflc91lsiq01xp53ki3jlhnbj8fqnxfrwy";
+    };
+    x86_64-linux = {
+      url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-deb8-linux.tar.xz";
+      sha256 = "0ahv26304pqi3dm7i78si4pxwvg5f5dc2jwsfgvcrhcx5g30bqj8";
+    };
+    armv7l-linux = {
+      url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-armv7-deb8-linux.tar.xz";
+      sha256 = "1jmv8qmnh5bn324fivbwdcaj55kvw7cb2zq9pafmlmv3qwwx7s46";
+    };
+    aarch64-linux = {
+      url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-aarch64-deb8-linux.tar.xz";
+      sha256 = "1k2amylcp1ad67c75h1pqf7czf9m0zj1i7hdc45ghjklnfq9hrk7";
+    };
+    x86_64-darwin = {
+      url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-apple-darwin.tar.xz";
+      sha256 = "09swx71gh5habzbx55shz2xykgr96xkcy09nzinnm4z0yxicy3zr";
+    };
+  }.${stdenv.hostPlatform.system}
+    or (throw "cannot bootstrap GHC on this platform"));
+
+  nativeBuildInputs = [ perl ];
+  propagatedBuildInputs = stdenv.lib.optionals useLLVM [ llvmPackages.llvm ];
+
+  # Cannot patchelf beforehand due to relative RPATHs that anticipate
+  # the final install location/
+  ${libEnvVar} = libPath;
+
+  postUnpack =
+    # GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib
+    # during linking
+    stdenv.lib.optionalString stdenv.isDarwin ''
+      export NIX_LDFLAGS+=" -no_dtrace_dof"
+      # not enough room in the object files for the full path to libiconv :(
+      for exe in $(find . -type f -executable); do
+        isScript $exe && continue
+        ln -fs ${libiconv}/lib/libiconv.dylib $(dirname $exe)/libiconv.dylib
+        install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib -change /usr/local/lib/gcc/6/libgcc_s.1.dylib ${gcc.cc.lib}/lib/libgcc_s.1.dylib $exe
+      done
+    '' +
+
+    # Some scripts used during the build need to have their shebangs patched
+    ''
+      patchShebangs ghc-${version}/utils/
+      patchShebangs ghc-${version}/configure
+    '' +
+
+    # Strip is harmful, see also below. It's important that this happens
+    # first. The GHC Cabal build system makes use of strip by default and
+    # has hardcoded paths to /usr/bin/strip in many places. We replace
+    # those below, making them point to our dummy script.
+    ''
+      mkdir "$TMP/bin"
+      for i in strip; do
+        echo '#! ${stdenv.shell}' > "$TMP/bin/$i"
+        chmod +x "$TMP/bin/$i"
+      done
+      PATH="$TMP/bin:$PATH"
+    '' +
+    # We have to patch the GMP paths for the integer-gmp package.
+    ''
+      find . -name integer-gmp.buildinfo \
+          -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${gmp.out}/lib@" {} \;
+    '' + stdenv.lib.optionalString stdenv.isDarwin ''
+      find . -name base.buildinfo \
+          -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${libiconv}/lib@" {} \;
+    '' +
+    # Rename needed libraries and binaries, fix interpreter
+    stdenv.lib.optionalString stdenv.isLinux ''
+      find . -type f -perm -0100 -exec patchelf \
+          --replace-needed libncurses${stdenv.lib.optionalString stdenv.is64bit "w"}.so.5 libncurses.so \
+          --replace-needed libtinfo.so libtinfo.so.5 \
+          --interpreter ${glibcDynLinker} {} \;
+
+      sed -i "s|/usr/bin/perl|perl\x00        |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
+      sed -i "s|/usr/bin/gcc|gcc\x00        |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
+    '' +
+    # We're kludging a glibc bindist into working with non-glibc...
+    # Here we patch up the use of `__strdup` (part of glibc binary ABI)
+    # to instead use `strdup` since musl doesn't provide __strdup
+    # (`__strdup` is defined to be an alias of `strdup` anyway[1]).
+    # [1] http://refspecs.linuxbase.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic/baselib---strdup-1.html
+    # Use objcopy magic to make the change:
+    stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
+      find ./ghc-${version}/rts -name "libHSrts*.a" -exec ''${OBJCOPY:-objcopy} --redefine-sym __strdup=strdup {} \;
+    '';
+
+  configurePlatforms = [ ];
+  configureFlags =
+  let
+    gcc-clang-wrapper = substituteAll {
+      inherit (stdenv) shell;
+      isExecutable = true;
+      src = ./gcc-clang-wrapper.sh;
+    };
+  in
+  [ "--with-gmp-libraries=${stdenv.lib.getLib gmp}/lib"
+    "--with-gmp-includes=${stdenv.lib.getDev gmp}/include"
+  ] ++ stdenv.lib.optional stdenv.isDarwin            "--with-gcc=${gcc-clang-wrapper}"
+    ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "--disable-ld-override";
+
+  # Stripping combined with patchelf breaks the executables (they die
+  # with a segfault or the kernel even refuses the execve). (NIXPKGS-85)
+  dontStrip = true;
+
+  # No building is necessary, but calling make without flags ironically
+  # calls install-strip ...
+  dontBuild = true;
+
+  # On Linux, use patchelf to modify the executables so that they can
+  # find editline/gmp.
+  preFixup = stdenv.lib.optionalString stdenv.isLinux ''
+    for p in $(find "$out" -type f -executable); do
+      if isELF "$p"; then
+        echo "Patchelfing $p"
+        patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p
+      fi
+    done
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    # not enough room in the object files for the full path to libiconv :(
+    for exe in $(find "$out" -type f -executable); do
+      isScript $exe && continue
+      ln -fs ${libiconv}/lib/libiconv.dylib $(dirname $exe)/libiconv.dylib
+      install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib -change /usr/local/lib/gcc/6/libgcc_s.1.dylib ${gcc.cc.lib}/lib/libgcc_s.1.dylib $exe
+    done
+
+    for file in $(find "$out" -name setup-config); do
+      substituteInPlace $file --replace /usr/bin/ranlib "$(type -P ranlib)"
+    done
+  '';
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    unset ${libEnvVar}
+    # Sanity check, can ghc create executables?
+    cd $TMP
+    mkdir test-ghc; cd test-ghc
+    cat > main.hs << EOF
+      {-# LANGUAGE TemplateHaskell #-}
+      module Main where
+      main = putStrLn \$([|"yes"|])
+    EOF
+    $out/bin/ghc --make main.hs || exit 1
+    echo compilation ok
+    [ $(./main) == "yes" ]
+  '';
+
+  passthru = {
+    targetPrefix = "";
+    enableShared = true;
+  };
+
+  meta.license = stdenv.lib.licenses.bsd3;
+  meta.platforms = ["x86_64-linux" "i686-linux" "x86_64-darwin" "armv7l-linux" "aarch64-linux"];
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghc/8.4.4.nix b/nixpkgs/pkgs/development/compilers/ghc/8.4.4.nix
new file mode 100644
index 000000000000..a4174c47046e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/8.4.4.nix
@@ -0,0 +1,256 @@
+{ stdenv, pkgsBuildTarget, targetPackages
+
+# build-tools
+, bootPkgs
+, autoconf, automake, coreutils, fetchurl, fetchpatch, perl, python3, m4, sphinx
+, bash
+
+, libiconv ? null, ncurses
+
+, useLLVM ? !stdenv.targetPlatform.isx86 || (stdenv.targetPlatform.isMusl && stdenv.hostPlatform != stdenv.targetPlatform) || stdenv.targetPlatform.isiOS
+, # LLVM is conceptually a run-time-only depedendency, but for
+  # non-x86, we need LLVM to bootstrap later stages, so it becomes a
+  # build-time dependency too.
+  buildLlvmPackages, llvmPackages
+
+, # If enabled, GHC will be built with the GPL-free but slower integer-simple
+  # library instead of the faster but GPLed integer-gmp library.
+  enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
+
+, # If enabled, use -fPIC when compiling static libs.
+  enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
+
+, # Whether to build dynamic libs for the standard library (on the target
+  # platform). Static libs are always built.
+  enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt
+
+, # Whether to build terminfo.
+  enableTerminfo ? !stdenv.targetPlatform.isWindows
+
+, # What flavour to build. An empty string indicates no
+  # specific flavour and falls back to ghc default values.
+  ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform) "perf-cross"
+, # Whether to backport https://phabricator.haskell.org/D4388 for
+  # deterministic profiling symbol names, at the cost of a slightly
+  # non-standard GHC API
+  deterministicProfiling ? false
+}:
+
+assert !enableIntegerSimple -> gmp != null;
+
+let
+  inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
+  inherit (bootPkgs) ghc;
+
+  # TODO(@Ericson2314) Make unconditional
+  targetPrefix = stdenv.lib.optionalString
+    (targetPlatform != hostPlatform)
+    "${targetPlatform.config}-";
+
+  buildMK = ''
+    BuildFlavour = ${ghcFlavour}
+    ifneq \"\$(BuildFlavour)\" \"\"
+    include mk/flavours/\$(BuildFlavour).mk
+    endif
+    DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
+    INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
+  '' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
+    Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
+    CrossCompilePrefix = ${targetPrefix}
+    HADDOCK_DOCS = NO
+    BUILD_SPHINX_HTML = NO
+    BUILD_SPHINX_PDF = NO
+  '' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
+    GhcLibHcOpts += -fPIC
+    GhcRtsHcOpts += -fPIC
+  '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
+    EXTRA_CC_OPTS += -std=gnu99
+  '';
+
+  # Splicer will pull out correct variations
+  libDeps = platform: stdenv.lib.optional enableTerminfo ncurses
+    ++ stdenv.lib.optional (!enableIntegerSimple) gmp
+    ++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
+
+  toolsForTarget = [
+    pkgsBuildTarget.targetPackages.stdenv.cc
+  ] ++ stdenv.lib.optional useLLVM buildLlvmPackages.llvm;
+
+  targetCC = builtins.head toolsForTarget;
+
+  # ld.gold is disabled for musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856
+  # see #84670 and #49071 for more background.
+  useLdGold = targetPlatform.isLinux && !(targetPlatform.useLLVM or false) && !targetPlatform.isMusl;
+
+in
+stdenv.mkDerivation (rec {
+  version = "8.4.4";
+  name = "${targetPrefix}ghc-${version}";
+
+  src = fetchurl {
+    url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
+    sha256 = "1ch4j2asg7pr52ai1hwzykxyj553wndg7wq93i47ql4fllspf48i";
+  };
+
+  enableParallelBuilding = true;
+
+  outputs = [ "out" "doc" ];
+
+  patches = [(fetchpatch {
+    url = "https://github.com/haskell/hsc2hs/commit/738f3666c878ee9e79c3d5e819ef8b3460288edf.diff";
+    sha256 = "0plzsbfaq6vb1023lsarrjglwgr9chld4q3m99rcfzx0yx5mibp3";
+    extraPrefix = "utils/hsc2hs/";
+    stripLen = 1;
+  }) (fetchpatch rec { # https://phabricator.haskell.org/D5123
+    url = "http://tarballs.nixos.org/sha256/${sha256}";
+    name = "D5123.diff";
+    sha256 = "0nhqwdamf2y4gbwqxcgjxs0kqx23w9gv5kj0zv6450dq19rji82n";
+  })] ++ stdenv.lib.optional deterministicProfiling
+    (fetchpatch rec {
+      url = "http://tarballs.nixos.org/sha256/${sha256}";
+      name = "D4388.diff";
+      sha256 = "0w6sdcvnqjlnlzpvnzw20b80v150ijjyjvs9548ildc1928j0w7s";
+    })
+    ++ stdenv.lib.optional stdenv.isDarwin ./backport-dylib-command-size-limit.patch
+    ++ stdenv.lib.optional (targetPlatform.isAarch32 || targetPlatform.isAarch64) (fetchpatch {
+      url = "https://github.com/ghc/ghc/commit/d8495549ba9d194815c2d0eaee6797fc7c00756a.diff";
+      sha256 = "1yjcma507c609bcim4rnxq0gaj2dg4d001jklmbpbqpzqzxkn5sz";
+    });
+
+  postPatch = "patchShebangs .";
+
+  # GHC is a bit confused on its cross terminology.
+  preConfigure = ''
+    for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do
+      export "''${env#TARGET_}=''${!env}"
+    done
+    # GHC is a bit confused on its cross terminology, as these would normally be
+    # the *host* tools.
+    export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
+    export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
+    # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
+    export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString useLdGold ".gold"}"
+    export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
+    export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
+    export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
+    export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib"
+    export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
+    export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
+
+    echo -n "${buildMK}" > mk/build.mk
+    sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
+  '' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
+    export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    export NIX_LDFLAGS+=" -no_dtrace_dof"
+  '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
+    sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets
+  '' + stdenv.lib.optionalString targetPlatform.isMusl ''
+      echo "patching llvm-targets for musl targets..."
+      echo "Cloning these existing '*-linux-gnu*' targets:"
+      grep linux-gnu llvm-targets | sed 's/^/  /'
+      echo "(go go gadget sed)"
+      sed -i 's,\(^.*linux-\)gnu\(.*\)$,\0\n\1musl\2,' llvm-targets
+      echo "llvm-targets now contains these '*-linux-musl*' targets:"
+      grep linux-musl llvm-targets | sed 's/^/  /'
+
+      echo "And now patching to preserve '-musleabi' as done with '-gnueabi'"
+      # (aclocal.m4 is actual source, but patch configure as well since we don't re-gen)
+      for x in configure aclocal.m4; do
+        substituteInPlace $x \
+          --replace '*-android*|*-gnueabi*)' \
+                    '*-android*|*-gnueabi*|*-musleabi*)'
+      done
+  '';
+
+  # TODO(@Ericson2314): Always pass "--target" and always prefix.
+  configurePlatforms = [ "build" "host" ]
+    ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
+  # `--with` flags for libraries needed for RTS linker
+  configureFlags = [
+    "--datadir=$doc/share/doc/ghc"
+    "--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
+  ] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
+    "--with-gmp-includes=${targetPackages.gmp.dev}/include" "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
+  ] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
+    "--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
+  ] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
+    "--enable-bootstrap-with-devel-snapshot"
+  ] ++ stdenv.lib.optionals useLdGold [
+    "CFLAGS=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
+  ] ++ stdenv.lib.optionals (targetPlatform.isDarwin && targetPlatform.isAarch64) [
+    # fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
+    "--disable-large-address-space"
+  ];
+
+  # Make sure we never relax`$PATH` and hooks support for compatibility.
+  strictDeps = true;
+
+  # Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself.
+  dontAddExtraLibs = true;
+
+  nativeBuildInputs = [
+    perl autoconf automake m4 python3 sphinx
+    ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
+  ];
+
+  # For building runtime libs
+  depsBuildTarget = toolsForTarget;
+
+  buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
+
+  propagatedBuildInputs = [ targetPackages.stdenv.cc ]
+    ++ stdenv.lib.optional useLLVM llvmPackages.llvm;
+
+  depsTargetTarget = map stdenv.lib.getDev (libDeps targetPlatform);
+  depsTargetTargetPropagated = map (stdenv.lib.getOutput "out") (libDeps targetPlatform);
+
+  # required, because otherwise all symbols from HSffi.o are stripped, and
+  # that in turn causes GHCi to abort
+  stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
+
+  # See #63511 - the only unstripped file is the debug rts which isn't meant to
+  # be stripped.
+  dontStrip = true;
+
+  checkTarget = "test";
+
+  hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
+
+  postInstall = ''
+    # Install the bash completion file.
+    install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
+
+    # Patch scripts to include "readelf" and "cat" in $PATH.
+    for i in "$out/bin/"*; do
+      test ! -h $i || continue
+      egrep --quiet '^#!' <(head -n 1 $i) || continue
+      sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
+    done
+  '';
+
+  passthru = {
+    inherit bootPkgs targetPrefix;
+
+    inherit llvmPackages;
+    inherit enableShared;
+
+    # Our Cabal compiler name
+    haskellCompilerName = "ghc-8.4.4";
+  };
+
+  meta = {
+    homepage = "http://haskell.org/ghc";
+    description = "The Glasgow Haskell Compiler";
+    maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
+    inherit (ghc.meta) license platforms;
+  };
+
+} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
+  dontStrip = true;
+  dontPatchELF = true;
+  noAuditTmpdir = true;
+})
diff --git a/nixpkgs/pkgs/development/compilers/ghc/8.6.5-binary.nix b/nixpkgs/pkgs/development/compilers/ghc/8.6.5-binary.nix
new file mode 100644
index 000000000000..97793d912895
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/8.6.5-binary.nix
@@ -0,0 +1,181 @@
+{ stdenv
+, fetchurl, perl, gcc
+, ncurses5, gmp, glibc, libiconv
+, llvmPackages
+}:
+
+# Prebuilt only does native
+assert stdenv.targetPlatform == stdenv.hostPlatform;
+
+let
+  useLLVM = !stdenv.targetPlatform.isx86;
+
+  libPath = stdenv.lib.makeLibraryPath ([
+    ncurses5 gmp
+  ] ++ stdenv.lib.optional (stdenv.hostPlatform.isDarwin) libiconv);
+
+  libEnvVar = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin "DY"
+    + "LD_LIBRARY_PATH";
+
+  glibcDynLinker = assert stdenv.isLinux;
+    if stdenv.hostPlatform.libc == "glibc" then
+       # Could be stdenv.cc.bintools.dynamicLinker, keeping as-is to avoid rebuild.
+       ''"$(cat $NIX_CC/nix-support/dynamic-linker)"''
+    else
+      "${stdenv.lib.getLib glibc}/lib/ld-linux*";
+
+in
+
+stdenv.mkDerivation rec {
+  version = "8.6.5";
+
+  name = "ghc-${version}-binary";
+
+  # https://downloads.haskell.org/~ghc/8.6.5/
+  src = fetchurl ({
+    i686-linux = {
+      url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-i386-deb9-linux.tar.xz";
+      sha256 = "1p2h29qghql19ajk755xa0yxkn85slbds8m9n5196ris743vkp8w";
+    };
+    x86_64-linux = {
+      url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-deb9-linux.tar.xz";
+      sha256 = "1pqlx6rdjs2110g0y1i9f8x18lmdizibjqd15f5xahcz39hgaxdw";
+    };
+    aarch64-linux = {
+      url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-aarch64-ubuntu18.04-linux.tar.xz";
+      sha256 = "11n7l2a36i5vxzzp85la2555q4m34l747g0pnmd81cp46y85hlhq";
+    };
+    x86_64-darwin = {
+      url = "http://haskell.org/ghc/dist/${version}/ghc-${version}-x86_64-apple-darwin.tar.xz";
+      sha256 = "0s9188vhhgf23q3rjarwhbr524z6h2qga5xaaa2pma03sfqvvhfz";
+    };
+  }.${stdenv.hostPlatform.system}
+    or (throw "cannot bootstrap GHC on this platform"));
+
+  nativeBuildInputs = [ perl ];
+  propagatedBuildInputs = stdenv.lib.optionals useLLVM [ llvmPackages.llvm ];
+
+  # Cannot patchelf beforehand due to relative RPATHs that anticipate
+  # the final install location/
+  ${libEnvVar} = libPath;
+
+  postUnpack =
+    # GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib
+    # during linking
+    stdenv.lib.optionalString stdenv.isDarwin ''
+      export NIX_LDFLAGS+=" -no_dtrace_dof"
+      # not enough room in the object files for the full path to libiconv :(
+      for exe in $(find . -type f -executable); do
+        isScript $exe && continue
+        ln -fs ${libiconv}/lib/libiconv.dylib $(dirname $exe)/libiconv.dylib
+        install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib -change /usr/local/lib/gcc/6/libgcc_s.1.dylib ${gcc.cc.lib}/lib/libgcc_s.1.dylib $exe
+      done
+    '' +
+
+    # Some scripts used during the build need to have their shebangs patched
+    ''
+      patchShebangs ghc-${version}/utils/
+      patchShebangs ghc-${version}/configure
+    '' +
+
+    # Strip is harmful, see also below. It's important that this happens
+    # first. The GHC Cabal build system makes use of strip by default and
+    # has hardcoded paths to /usr/bin/strip in many places. We replace
+    # those below, making them point to our dummy script.
+    ''
+      mkdir "$TMP/bin"
+      for i in strip; do
+        echo '#! ${stdenv.shell}' > "$TMP/bin/$i"
+        chmod +x "$TMP/bin/$i"
+      done
+      PATH="$TMP/bin:$PATH"
+    '' +
+    # We have to patch the GMP paths for the integer-gmp package.
+    ''
+      find . -name integer-gmp.buildinfo \
+          -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${gmp.out}/lib@" {} \;
+    '' + stdenv.lib.optionalString stdenv.isDarwin ''
+      find . -name base.buildinfo \
+          -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${libiconv}/lib@" {} \;
+    '' +
+    # Rename needed libraries and binaries, fix interpreter
+    stdenv.lib.optionalString stdenv.isLinux ''
+      find . -type f -perm -0100 -exec patchelf \
+          --replace-needed libncurses${stdenv.lib.optionalString stdenv.is64bit "w"}.so.5 libncurses.so \
+          --replace-needed libtinfo.so libtinfo.so.5 \
+          --interpreter ${glibcDynLinker} {} \;
+
+      sed -i "s|/usr/bin/perl|perl\x00        |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
+      sed -i "s|/usr/bin/gcc|gcc\x00        |" ghc-${version}/ghc/stage2/build/tmp/ghc-stage2
+    '' +
+    # We're kludging a glibc bindist into working with non-glibc...
+    # Here we patch up the use of `__strdup` (part of glibc binary ABI)
+    # to instead use `strdup` since musl doesn't provide __strdup
+    # (`__strdup` is defined to be an alias of `strdup` anyway[1]).
+    # [1] http://refspecs.linuxbase.org/LSB_4.0.0/LSB-Core-generic/LSB-Core-generic/baselib---strdup-1.html
+    # Use objcopy magic to make the change:
+    stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
+      find ./ghc-${version}/rts -name "libHSrts*.a" -exec ''${OBJCOPY:-objcopy} --redefine-sym __strdup=strdup {} \;
+    '';
+
+  configurePlatforms = [ ];
+  configureFlags = [
+    "--with-gmp-libraries=${stdenv.lib.getLib gmp}/lib"
+    "--with-gmp-includes=${stdenv.lib.getDev gmp}/include"
+  ] ++ stdenv.lib.optional stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}"
+    ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "--disable-ld-override";
+
+  # Stripping combined with patchelf breaks the executables (they die
+  # with a segfault or the kernel even refuses the execve). (NIXPKGS-85)
+  dontStrip = true;
+
+  # No building is necessary, but calling make without flags ironically
+  # calls install-strip ...
+  dontBuild = true;
+
+  # On Linux, use patchelf to modify the executables so that they can
+  # find editline/gmp.
+  preFixup = stdenv.lib.optionalString stdenv.isLinux ''
+    for p in $(find "$out" -type f -executable); do
+      if isELF "$p"; then
+        echo "Patchelfing $p"
+        patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p
+      fi
+    done
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    # not enough room in the object files for the full path to libiconv :(
+    for exe in $(find "$out" -type f -executable); do
+      isScript $exe && continue
+      ln -fs ${libiconv}/lib/libiconv.dylib $(dirname $exe)/libiconv.dylib
+      install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib -change /usr/local/lib/gcc/6/libgcc_s.1.dylib ${gcc.cc.lib}/lib/libgcc_s.1.dylib $exe
+    done
+
+    for file in $(find "$out" -name setup-config); do
+      substituteInPlace $file --replace /usr/bin/ranlib "$(type -P ranlib)"
+    done
+  '';
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    unset ${libEnvVar}
+    # Sanity check, can ghc create executables?
+    cd $TMP
+    mkdir test-ghc; cd test-ghc
+    cat > main.hs << EOF
+      {-# LANGUAGE TemplateHaskell #-}
+      module Main where
+      main = putStrLn \$([|"yes"|])
+    EOF
+    $out/bin/ghc --make main.hs || exit 1
+    echo compilation ok
+    [ $(./main) == "yes" ]
+  '';
+
+  passthru = {
+    targetPrefix = "";
+    enableShared = true;
+  };
+
+  meta.license = stdenv.lib.licenses.bsd3;
+  meta.platforms = ["x86_64-linux" "aarch64-linux" "i686-linux" "x86_64-darwin"];
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghc/8.6.5.nix b/nixpkgs/pkgs/development/compilers/ghc/8.6.5.nix
new file mode 100644
index 000000000000..06266556cf33
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/8.6.5.nix
@@ -0,0 +1,259 @@
+{ stdenv, pkgsBuildTarget, targetPackages
+
+# build-tools
+, bootPkgs
+, autoconf, automake, coreutils, fetchurl, fetchpatch, perl, python3, m4, sphinx
+, bash
+
+, libiconv ? null, ncurses
+
+, # GHC can be built with system libffi or a bundled one.
+  libffi ? null
+
+, useLLVM ? !stdenv.targetPlatform.isx86 || stdenv.targetPlatform.isiOS
+, # LLVM is conceptually a run-time-only depedendency, but for
+  # non-x86, we need LLVM to bootstrap later stages, so it becomes a
+  # build-time dependency too.
+  buildLlvmPackages, llvmPackages
+
+, # If enabled, GHC will be built with the GPL-free but slower integer-simple
+  # library instead of the faster but GPLed integer-gmp library.
+  enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
+
+, # If enabled, use -fPIC when compiling static libs.
+  enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
+
+, # Whether to build dynamic libs for the standard library (on the target
+  # platform). Static libs are always built.
+  enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt
+
+, # Whether to build terminfo.
+  enableTerminfo ? !stdenv.targetPlatform.isWindows
+
+, # What flavour to build. An empty string indicates no
+  # specific flavour and falls back to ghc default values.
+  ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
+    (if useLLVM then "perf-cross" else "perf-cross-ncg")
+
+, # Whether to disable the large address space allocator
+  # necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
+  disableLargeAddressSpace ? stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64
+}:
+
+assert !enableIntegerSimple -> gmp != null;
+
+let
+  inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
+  inherit (bootPkgs) ghc;
+
+  # TODO(@Ericson2314) Make unconditional
+  targetPrefix = stdenv.lib.optionalString
+    (targetPlatform != hostPlatform)
+    "${targetPlatform.config}-";
+
+  buildMK = ''
+    BuildFlavour = ${ghcFlavour}
+    ifneq \"\$(BuildFlavour)\" \"\"
+    include mk/flavours/\$(BuildFlavour).mk
+    endif
+    DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
+    INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
+  '' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
+    Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
+    CrossCompilePrefix = ${targetPrefix}
+    HADDOCK_DOCS = NO
+    BUILD_SPHINX_HTML = NO
+    BUILD_SPHINX_PDF = NO
+  '' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
+    GhcLibHcOpts += -fPIC
+    GhcRtsHcOpts += -fPIC
+  '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
+    EXTRA_CC_OPTS += -std=gnu99
+  '';
+
+  # Splicer will pull out correct variations
+  libDeps = platform: stdenv.lib.optional enableTerminfo ncurses
+    ++ [libffi]
+    ++ stdenv.lib.optional (!enableIntegerSimple) gmp
+    ++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
+
+  toolsForTarget = [
+    pkgsBuildTarget.targetPackages.stdenv.cc
+  ] ++ stdenv.lib.optional useLLVM buildLlvmPackages.llvm;
+
+  targetCC = builtins.head toolsForTarget;
+
+  # ld.gold is disabled for musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856
+  # see #84670 and #49071 for more background.
+  useLdGold = targetPlatform.isLinux && !(targetPlatform.useLLVM or false) && !targetPlatform.isMusl;
+
+in
+stdenv.mkDerivation (rec {
+  version = "8.6.5";
+  name = "${targetPrefix}ghc-${version}";
+
+  src = fetchurl {
+    url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
+    sha256 = "0qg3zsmbk4rkwkc3jpas3zs74qaxmw4sp4v1mhsbj0a0dzls2jjd";
+  };
+
+  enableParallelBuilding = true;
+
+  outputs = [ "out" "doc" ];
+
+  patches = [
+    (fetchpatch rec { # https://phabricator.haskell.org/D5123
+     url = "http://tarballs.nixos.org/sha256/${sha256}";
+     name = "D5123.diff";
+     sha256 = "0nhqwdamf2y4gbwqxcgjxs0kqx23w9gv5kj0zv6450dq19rji82n";
+    })
+    (fetchpatch { # https://github.com/haskell/haddock/issues/900
+     url = "https://patch-diff.githubusercontent.com/raw/haskell/haddock/pull/983.diff";
+     name = "loadpluginsinmodules.diff";
+     sha256 = "0bvvv0zsfq2581zsir97zfkggc1kkircbbajc2fz3b169ycpbha1";
+     extraPrefix = "utils/haddock/";
+     stripLen = 1;
+   })
+  ];
+
+  postPatch = "patchShebangs .";
+
+  # GHC is a bit confused on its cross terminology.
+  preConfigure = ''
+    for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do
+      export "''${env#TARGET_}=''${!env}"
+    done
+    # GHC is a bit confused on its cross terminology, as these would normally be
+    # the *host* tools.
+    export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
+    export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
+    # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
+    export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString useLdGold ".gold"}"
+    export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
+    export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
+    export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
+    export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib"
+    export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
+    export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
+
+    echo -n "${buildMK}" > mk/build.mk
+    sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
+  '' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
+    export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    export NIX_LDFLAGS+=" -no_dtrace_dof"
+  '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
+    sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets
+  '' + stdenv.lib.optionalString targetPlatform.isMusl ''
+      echo "patching llvm-targets for musl targets..."
+      echo "Cloning these existing '*-linux-gnu*' targets:"
+      grep linux-gnu llvm-targets | sed 's/^/  /'
+      echo "(go go gadget sed)"
+      sed -i 's,\(^.*linux-\)gnu\(.*\)$,\0\n\1musl\2,' llvm-targets
+      echo "llvm-targets now contains these '*-linux-musl*' targets:"
+      grep linux-musl llvm-targets | sed 's/^/  /'
+
+      echo "And now patching to preserve '-musleabi' as done with '-gnueabi'"
+      # (aclocal.m4 is actual source, but patch configure as well since we don't re-gen)
+      for x in configure aclocal.m4; do
+        substituteInPlace $x \
+          --replace '*-android*|*-gnueabi*)' \
+                    '*-android*|*-gnueabi*|*-musleabi*)'
+      done
+  '';
+
+  # TODO(@Ericson2314): Always pass "--target" and always prefix.
+  configurePlatforms = [ "build" "host" ]
+    ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
+  # `--with` flags for libraries needed for RTS linker
+  configureFlags = [
+    "--datadir=$doc/share/doc/ghc"
+    "--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
+  ] ++ stdenv.lib.optionals (libffi != null) ["--with-system-libffi" "--with-ffi-includes=${targetPackages.libffi.dev}/include" "--with-ffi-libraries=${targetPackages.libffi.out}/lib"
+  ] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
+    "--with-gmp-includes=${targetPackages.gmp.dev}/include" "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
+  ] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
+    "--with-iconv-includes=${libiconv}/include" "--with-iconv-libraries=${libiconv}/lib"
+  ] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
+    "--enable-bootstrap-with-devel-snapshot"
+  ] ++ stdenv.lib.optionals useLdGold [
+    "CFLAGS=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
+  ] ++ stdenv.lib.optionals (disableLargeAddressSpace) [
+    "--disable-large-address-space"
+  ];
+
+  # Make sure we never relax`$PATH` and hooks support for compatibility.
+  strictDeps = true;
+
+  # Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself.
+  dontAddExtraLibs = true;
+
+  nativeBuildInputs = [
+    perl autoconf automake m4 python3 sphinx
+    ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
+  ];
+
+  # For building runtime libs
+  depsBuildTarget = toolsForTarget;
+
+  buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
+
+  propagatedBuildInputs = [ targetPackages.stdenv.cc ]
+    ++ stdenv.lib.optional useLLVM llvmPackages.llvm;
+
+  depsTargetTarget = map stdenv.lib.getDev (libDeps targetPlatform);
+  depsTargetTargetPropagated = map (stdenv.lib.getOutput "out") (libDeps targetPlatform);
+
+  # required, because otherwise all symbols from HSffi.o are stripped, and
+  # that in turn causes GHCi to abort
+  stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
+
+  # See #63511 - the only unstripped file is the debug rts which isn't meant to
+  # be stripped.
+  dontStrip = true;
+
+  checkTarget = "test";
+
+  hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
+
+  postInstall = ''
+    # Install the bash completion file.
+    install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
+
+    # Patch scripts to include "readelf" and "cat" in $PATH.
+    for i in "$out/bin/"*; do
+      test ! -h $i || continue
+      egrep --quiet '^#!' <(head -n 1 $i) || continue
+      sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
+    done
+  ''
+  # Temporary work-around for https://github.com/NixOS/nixpkgs/issues/66277
+  + stdenv.lib.optionalString hostPlatform.isAarch64 ''
+    rm -rf "$doc/share/doc/ghc/html/libraries"
+  '';
+
+  passthru = {
+    inherit bootPkgs targetPrefix;
+
+    inherit llvmPackages;
+    inherit enableShared;
+
+    # Our Cabal compiler name
+    haskellCompilerName = "ghc-${version}";
+  };
+
+  meta = {
+    homepage = "http://haskell.org/ghc";
+    description = "The Glasgow Haskell Compiler";
+    maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
+    inherit (ghc.meta) license platforms;
+  };
+
+} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
+  dontStrip = true;
+  dontPatchELF = true;
+  noAuditTmpdir = true;
+})
diff --git a/nixpkgs/pkgs/development/compilers/ghc/8.8.2.nix b/nixpkgs/pkgs/development/compilers/ghc/8.8.2.nix
new file mode 100644
index 000000000000..305226b34079
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/8.8.2.nix
@@ -0,0 +1,242 @@
+{ stdenv, pkgsBuildTarget, targetPackages
+
+# build-tools
+, bootPkgs
+, autoconf, automake, coreutils, fetchurl, perl, python3, m4, sphinx
+, bash
+
+, libiconv ? null, ncurses
+
+, # GHC can be built with system libffi or a bundled one.
+  libffi ? null
+
+, useLLVM ? !stdenv.targetPlatform.isx86
+, # LLVM is conceptually a run-time-only depedendency, but for
+  # non-x86, we need LLVM to bootstrap later stages, so it becomes a
+  # build-time dependency too.
+  buildLlvmPackages, llvmPackages
+
+, # If enabled, GHC will be built with the GPL-free but slower integer-simple
+  # library instead of the faster but GPLed integer-gmp library.
+  enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
+
+, # If enabled, use -fPIC when compiling static libs.
+  enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
+
+, # Whether to build dynamic libs for the standard library (on the target
+  # platform). Static libs are always built.
+  enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt
+
+, # Whether to build terminfo.
+  enableTerminfo ? !stdenv.targetPlatform.isWindows
+
+, # What flavour to build. An empty string indicates no
+  # specific flavour and falls back to ghc default values.
+  ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
+    (if useLLVM then "perf-cross" else "perf-cross-ncg")
+
+, # Whether to disable the large address space allocator
+  # necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
+  disableLargeAddressSpace ? stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64
+}:
+
+assert !enableIntegerSimple -> gmp != null;
+
+let
+  inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
+  inherit (bootPkgs) ghc;
+
+  # TODO(@Ericson2314) Make unconditional
+  targetPrefix = stdenv.lib.optionalString
+    (targetPlatform != hostPlatform)
+    "${targetPlatform.config}-";
+
+  buildMK = ''
+    BuildFlavour = ${ghcFlavour}
+    ifneq \"\$(BuildFlavour)\" \"\"
+    include mk/flavours/\$(BuildFlavour).mk
+    endif
+    DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
+    INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
+  '' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
+    Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
+    CrossCompilePrefix = ${targetPrefix}
+    HADDOCK_DOCS = NO
+    BUILD_SPHINX_HTML = NO
+    BUILD_SPHINX_PDF = NO
+  '' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
+    GhcLibHcOpts += -fPIC
+    GhcRtsHcOpts += -fPIC
+  '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
+    EXTRA_CC_OPTS += -std=gnu99
+  '';
+
+  # Splicer will pull out correct variations
+  libDeps = platform: stdenv.lib.optional enableTerminfo ncurses
+    ++ [libffi]
+    ++ stdenv.lib.optional (!enableIntegerSimple) gmp
+    ++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
+
+  toolsForTarget = [
+    pkgsBuildTarget.targetPackages.stdenv.cc
+  ] ++ stdenv.lib.optional useLLVM buildLlvmPackages.llvm;
+
+  targetCC = builtins.head toolsForTarget;
+
+  # ld.gold is disabled for musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856
+  # see #84670 and #49071 for more background.
+  useLdGold = targetPlatform.isLinux && !(targetPlatform.useLLVM or false) && !targetPlatform.isMusl;
+
+in
+stdenv.mkDerivation (rec {
+  version = "8.8.2";
+  name = "${targetPrefix}ghc-${version}";
+
+  src = fetchurl {
+    url = "https://downloads.haskell.org/ghc/8.8.2/ghc-${version}-src.tar.xz";
+    sha256 = "02qa6wgjpxgakg7hv4zfdlrx9k7zxa5i02wnr6y9fsv8j16sbkh1";
+  };
+
+  enableParallelBuilding = true;
+
+  outputs = [ "out" "doc" ];
+
+  postPatch = "patchShebangs .";
+
+  # GHC is a bit confused on its cross terminology.
+  preConfigure = ''
+    for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do
+      export "''${env#TARGET_}=''${!env}"
+    done
+    # GHC is a bit confused on its cross terminology, as these would normally be
+    # the *host* tools.
+    export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
+    export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
+    # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
+    export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString useLdGold ".gold"}"
+    export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
+    export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
+    export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
+    export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib"
+    export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
+    export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
+
+    echo -n "${buildMK}" > mk/build.mk
+    sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
+  '' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
+    export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    export NIX_LDFLAGS+=" -no_dtrace_dof"
+  '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
+    sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets
+  '' + stdenv.lib.optionalString targetPlatform.isMusl ''
+      echo "patching llvm-targets for musl targets..."
+      echo "Cloning these existing '*-linux-gnu*' targets:"
+      grep linux-gnu llvm-targets | sed 's/^/  /'
+      echo "(go go gadget sed)"
+      sed -i 's,\(^.*linux-\)gnu\(.*\)$,\0\n\1musl\2,' llvm-targets
+      echo "llvm-targets now contains these '*-linux-musl*' targets:"
+      grep linux-musl llvm-targets | sed 's/^/  /'
+
+      echo "And now patching to preserve '-musleabi' as done with '-gnueabi'"
+      # (aclocal.m4 is actual source, but patch configure as well since we don't re-gen)
+      for x in configure aclocal.m4; do
+        substituteInPlace $x \
+          --replace '*-android*|*-gnueabi*)' \
+                    '*-android*|*-gnueabi*|*-musleabi*)'
+      done
+  '';
+
+  # TODO(@Ericson2314): Always pass "--target" and always prefix.
+  configurePlatforms = [ "build" "host" ]
+    ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
+
+  # `--with` flags for libraries needed for RTS linker
+  configureFlags = [
+    "--datadir=$doc/share/doc/ghc"
+    "--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
+  ] ++ stdenv.lib.optionals (libffi != null) [
+    "--with-system-libffi"
+    "--with-ffi-includes=${targetPackages.libffi.dev}/include"
+    "--with-ffi-libraries=${targetPackages.libffi.out}/lib"
+  ] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
+    "--with-gmp-includes=${targetPackages.gmp.dev}/include"
+    "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
+  ] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
+    "--with-iconv-includes=${libiconv}/include"
+    "--with-iconv-libraries=${libiconv}/lib"
+  ] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
+    "--enable-bootstrap-with-devel-snapshot"
+  ] ++ stdenv.lib.optionals useLdGold [
+    "CFLAGS=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
+  ] ++ stdenv.lib.optionals (disableLargeAddressSpace) [
+    "--disable-large-address-space"
+  ];
+
+  # Make sure we never relax`$PATH` and hooks support for compatibility.
+  strictDeps = true;
+
+  # Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself.
+	dontAddExtraLibs = true;
+
+  nativeBuildInputs = [
+    perl autoconf automake m4 python3 sphinx
+    ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
+  ];
+
+  # For building runtime libs
+  depsBuildTarget = toolsForTarget;
+
+  buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
+
+  propagatedBuildInputs = [ targetPackages.stdenv.cc ]
+    ++ stdenv.lib.optional useLLVM llvmPackages.llvm;
+
+  depsTargetTarget = map stdenv.lib.getDev (libDeps targetPlatform);
+  depsTargetTargetPropagated = map (stdenv.lib.getOutput "out") (libDeps targetPlatform);
+
+  # required, because otherwise all symbols from HSffi.o are stripped, and
+  # that in turn causes GHCi to abort
+  stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
+
+  checkTarget = "test";
+
+  hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
+
+  postInstall = ''
+    # Install the bash completion file.
+    install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
+
+    # Patch scripts to include "readelf" and "cat" in $PATH.
+    for i in "$out/bin/"*; do
+      test ! -h $i || continue
+      egrep --quiet '^#!' <(head -n 1 $i) || continue
+      sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
+    done
+  '';
+
+  passthru = {
+    inherit bootPkgs targetPrefix;
+
+    inherit llvmPackages;
+    inherit enableShared;
+
+    # Our Cabal compiler name
+    haskellCompilerName = "ghc-${version}";
+  };
+
+  meta = {
+    homepage = "http://haskell.org/ghc";
+    description = "The Glasgow Haskell Compiler";
+    maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
+    inherit (ghc.meta) license platforms;
+  };
+
+} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
+  dontStrip = true;
+  dontPatchELF = true;
+  noAuditTmpdir = true;
+})
diff --git a/nixpkgs/pkgs/development/compilers/ghc/8.8.3.nix b/nixpkgs/pkgs/development/compilers/ghc/8.8.3.nix
new file mode 100644
index 000000000000..b199dc34fa37
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/8.8.3.nix
@@ -0,0 +1,242 @@
+{ stdenv, pkgsBuildTarget, targetPackages
+
+# build-tools
+, bootPkgs
+, autoconf, automake, coreutils, fetchurl, perl, python3, m4, sphinx
+, bash
+
+, libiconv ? null, ncurses
+
+, # GHC can be built with system libffi or a bundled one.
+  libffi ? null
+
+, useLLVM ? !stdenv.targetPlatform.isx86
+, # LLVM is conceptually a run-time-only depedendency, but for
+  # non-x86, we need LLVM to bootstrap later stages, so it becomes a
+  # build-time dependency too.
+  buildLlvmPackages, llvmPackages
+
+, # If enabled, GHC will be built with the GPL-free but slower integer-simple
+  # library instead of the faster but GPLed integer-gmp library.
+  enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms), gmp
+
+, # If enabled, use -fPIC when compiling static libs.
+  enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
+
+, # Whether to build dynamic libs for the standard library (on the target
+  # platform). Static libs are always built.
+  enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt
+
+, # Whether to build terminfo.
+  enableTerminfo ? !stdenv.targetPlatform.isWindows
+
+, # What flavour to build. An empty string indicates no
+  # specific flavour and falls back to ghc default values.
+  ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
+    (if useLLVM then "perf-cross" else "perf-cross-ncg")
+
+, # Whether to disable the large address space allocator
+  # necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
+  disableLargeAddressSpace ? stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64
+}:
+
+assert !enableIntegerSimple -> gmp != null;
+
+let
+  inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
+  inherit (bootPkgs) ghc;
+
+  # TODO(@Ericson2314) Make unconditional
+  targetPrefix = stdenv.lib.optionalString
+    (targetPlatform != hostPlatform)
+    "${targetPlatform.config}-";
+
+  buildMK = ''
+    BuildFlavour = ${ghcFlavour}
+    ifneq \"\$(BuildFlavour)\" \"\"
+    include mk/flavours/\$(BuildFlavour).mk
+    endif
+    DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
+    INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
+  '' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
+    Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
+    CrossCompilePrefix = ${targetPrefix}
+    HADDOCK_DOCS = NO
+    BUILD_SPHINX_HTML = NO
+    BUILD_SPHINX_PDF = NO
+  '' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
+    GhcLibHcOpts += -fPIC
+    GhcRtsHcOpts += -fPIC
+  '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
+    EXTRA_CC_OPTS += -std=gnu99
+  '';
+
+  # Splicer will pull out correct variations
+  libDeps = platform: stdenv.lib.optional enableTerminfo ncurses
+    ++ [libffi]
+    ++ stdenv.lib.optional (!enableIntegerSimple) gmp
+    ++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
+
+  toolsForTarget = [
+    pkgsBuildTarget.targetPackages.stdenv.cc
+  ] ++ stdenv.lib.optional useLLVM buildLlvmPackages.llvm;
+
+  targetCC = builtins.head toolsForTarget;
+
+  # ld.gold is disabled for musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856
+  # see #84670 and #49071 for more background.
+  useLdGold = targetPlatform.isLinux && !(targetPlatform.useLLVM or false) && !targetPlatform.isMusl;
+
+in
+stdenv.mkDerivation (rec {
+  version = "8.8.3";
+  name = "${targetPrefix}ghc-${version}";
+
+  src = fetchurl {
+    url = "https://downloads.haskell.org/ghc/${version}/ghc-${version}-src.tar.xz";
+    sha256 = "128g932i3wix6ic03v04nh5755vyjiidzri9iybwad72yfmc1p70";
+  };
+
+  enableParallelBuilding = true;
+
+  outputs = [ "out" "doc" ];
+
+  postPatch = "patchShebangs .";
+
+  # GHC is a bit confused on its cross terminology.
+  preConfigure = ''
+    for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do
+      export "''${env#TARGET_}=''${!env}"
+    done
+    # GHC is a bit confused on its cross terminology, as these would normally be
+    # the *host* tools.
+    export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
+    export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
+    # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
+    export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString useLdGold ".gold"}"
+    export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
+    export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
+    export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
+    export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib"
+    export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
+    export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
+
+    echo -n "${buildMK}" > mk/build.mk
+    sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
+  '' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
+    export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    export NIX_LDFLAGS+=" -no_dtrace_dof"
+  '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
+    sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets
+  '' + stdenv.lib.optionalString targetPlatform.isMusl ''
+      echo "patching llvm-targets for musl targets..."
+      echo "Cloning these existing '*-linux-gnu*' targets:"
+      grep linux-gnu llvm-targets | sed 's/^/  /'
+      echo "(go go gadget sed)"
+      sed -i 's,\(^.*linux-\)gnu\(.*\)$,\0\n\1musl\2,' llvm-targets
+      echo "llvm-targets now contains these '*-linux-musl*' targets:"
+      grep linux-musl llvm-targets | sed 's/^/  /'
+
+      echo "And now patching to preserve '-musleabi' as done with '-gnueabi'"
+      # (aclocal.m4 is actual source, but patch configure as well since we don't re-gen)
+      for x in configure aclocal.m4; do
+        substituteInPlace $x \
+          --replace '*-android*|*-gnueabi*)' \
+                    '*-android*|*-gnueabi*|*-musleabi*)'
+      done
+  '';
+
+  # TODO(@Ericson2314): Always pass "--target" and always prefix.
+  configurePlatforms = [ "build" "host" ]
+    ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
+
+  # `--with` flags for libraries needed for RTS linker
+  configureFlags = [
+    "--datadir=$doc/share/doc/ghc"
+    "--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
+  ] ++ stdenv.lib.optionals (libffi != null) [
+    "--with-system-libffi"
+    "--with-ffi-includes=${targetPackages.libffi.dev}/include"
+    "--with-ffi-libraries=${targetPackages.libffi.out}/lib"
+  ] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
+    "--with-gmp-includes=${targetPackages.gmp.dev}/include"
+    "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
+  ] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
+    "--with-iconv-includes=${libiconv}/include"
+    "--with-iconv-libraries=${libiconv}/lib"
+  ] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
+    "--enable-bootstrap-with-devel-snapshot"
+  ] ++ stdenv.lib.optionals useLdGold [
+    "CFLAGS=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
+  ] ++ stdenv.lib.optionals (disableLargeAddressSpace) [
+    "--disable-large-address-space"
+  ];
+
+  # Make sure we never relax`$PATH` and hooks support for compatibility.
+  strictDeps = true;
+
+  # Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself.
+	dontAddExtraLibs = true;
+
+  nativeBuildInputs = [
+    perl autoconf automake m4 python3 sphinx
+    ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
+  ];
+
+  # For building runtime libs
+  depsBuildTarget = toolsForTarget;
+
+  buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
+
+  propagatedBuildInputs = [ targetPackages.stdenv.cc ]
+    ++ stdenv.lib.optional useLLVM llvmPackages.llvm;
+
+  depsTargetTarget = map stdenv.lib.getDev (libDeps targetPlatform);
+  depsTargetTargetPropagated = map (stdenv.lib.getOutput "out") (libDeps targetPlatform);
+
+  # required, because otherwise all symbols from HSffi.o are stripped, and
+  # that in turn causes GHCi to abort
+  stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
+
+  checkTarget = "test";
+
+  hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
+
+  postInstall = ''
+    # Install the bash completion file.
+    install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
+
+    # Patch scripts to include "readelf" and "cat" in $PATH.
+    for i in "$out/bin/"*; do
+      test ! -h $i || continue
+      egrep --quiet '^#!' <(head -n 1 $i) || continue
+      sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
+    done
+  '';
+
+  passthru = {
+    inherit bootPkgs targetPrefix;
+
+    inherit llvmPackages;
+    inherit enableShared;
+
+    # Our Cabal compiler name
+    haskellCompilerName = "ghc-${version}";
+  };
+
+  meta = {
+    homepage = "http://haskell.org/ghc";
+    description = "The Glasgow Haskell Compiler";
+    maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
+    inherit (ghc.meta) license platforms;
+  };
+
+} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
+  dontStrip = true;
+  dontPatchELF = true;
+  noAuditTmpdir = true;
+})
diff --git a/nixpkgs/pkgs/development/compilers/ghc/backport-dylib-command-size-limit.patch b/nixpkgs/pkgs/development/compilers/ghc/backport-dylib-command-size-limit.patch
new file mode 100644
index 000000000000..d0d94717d9c4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/backport-dylib-command-size-limit.patch
@@ -0,0 +1,24 @@
+diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
+index acd0d61..3e83c15 100644
+--- a/compiler/main/DriverPipeline.hs
++++ b/compiler/main/DriverPipeline.hs
+@@ -1916,6 +1916,7 @@ linkBinary' staticLink dflags o_files dep_packages = do
+                       ++ pkg_framework_opts
+                       ++ debug_opts
+                       ++ thread_opts
++                      ++ (if (platformOS platform `elem` [OSDarwin]) then [ "-Wl,-dead_strip_dylibs" ] else [])
+                     ))
+ 
+ exeFileName :: Bool -> DynFlags -> FilePath
+diff --git a/compiler/main/SysTools.hs b/compiler/main/SysTools.hs
+index 1ab5b13..2ebbf51 100644
+--- a/compiler/main/SysTools.hs
++++ b/compiler/main/SysTools.hs
+@@ -1737,6 +1737,7 @@ linkDynLib dflags0 o_files dep_packages
+                  ++ map Option pkg_lib_path_opts
+                  ++ map Option pkg_link_opts
+                  ++ map Option pkg_framework_opts
++                 ++ [ Option "-Wl,-dead_strip_dylibs" ]
+               )
+         OSiOS -> throwGhcExceptionIO (ProgramError "dynamic libraries are not supported on iOS target")
+         _ -> do
diff --git a/nixpkgs/pkgs/development/compilers/ghc/gcc-clang-wrapper.sh b/nixpkgs/pkgs/development/compilers/ghc/gcc-clang-wrapper.sh
new file mode 100755
index 000000000000..45af982c2973
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/gcc-clang-wrapper.sh
@@ -0,0 +1,46 @@
+#!@shell@
+
+inPreprocessorMode () {
+    hasE=0
+    hasU=0
+    hasT=0
+    for arg in "$@"
+    do
+        if [ 'x-E' = "x$arg" ];             then hasE=1; fi
+        if [ 'x-undef' = "x$arg" ];         then hasU=1; fi
+        if [ 'x-traditional' = "x$arg" ];   then hasT=1; fi
+    done
+    [ "$hasE$hasU$hasT" = '111' ]
+}
+
+extraClangArgs="-Wno-invalid-pp-token -Wno-unicode -Wno-trigraphs"
+
+adjustPreprocessorLanguage () {
+    newArgs=''
+    while [ $# -gt 0 ]
+    do
+        newArgs="$newArgs $1"
+        if [ "$1" = '-x' ]
+        then
+            shift
+            if [ $# -gt 0 ]
+            then
+                if [ "$1" = 'c' ]
+                then
+                    newArgs="$newArgs assembler-with-cpp"
+                else
+                    newArgs="$newArgs $1"
+                fi
+            fi
+        fi
+        shift
+    done
+    echo $newArgs
+}
+
+if inPreprocessorMode "$@"
+then
+    exec clang $extraClangArgs `adjustPreprocessorLanguage "$@"`
+else
+    exec clang $extraClangArgs "${@/-nodefaultlibs/}"
+fi
diff --git a/nixpkgs/pkgs/development/compilers/ghc/head.nix b/nixpkgs/pkgs/development/compilers/ghc/head.nix
new file mode 100644
index 000000000000..a15ef7f7dbf8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghc/head.nix
@@ -0,0 +1,258 @@
+{ stdenv, pkgsBuildTarget, targetPackages
+
+# build-tools
+, bootPkgs
+, autoconf, autoreconfHook, automake, coreutils, fetchgit, perl, python3, m4, sphinx
+, bash
+
+, libiconv ? null, ncurses
+
+, # GHC can be built with system libffi or a bundled one.
+  libffi ? null
+
+, enableDwarf ? !stdenv.targetPlatform.isDarwin &&
+                !stdenv.targetPlatform.isWindows
+, elfutils # for DWARF support
+
+, useLLVM ? !stdenv.targetPlatform.isx86 || stdenv.targetPlatform.isiOS
+, # LLVM is conceptually a run-time-only depedendency, but for
+  # non-x86, we need LLVM to bootstrap later stages, so it becomes a
+  # build-time dependency too.
+  buildLlvmPackages, llvmPackages
+
+, # If enabled, GHC will be built with the GPL-free but slower integer-simple
+  # library instead of the faster but GPLed integer-gmp library.
+  enableIntegerSimple ? !(stdenv.lib.any (stdenv.lib.meta.platformMatch stdenv.hostPlatform) gmp.meta.platforms)
+, gmp
+
+, # If enabled, use -fPIC when compiling static libs.
+  enableRelocatedStaticLibs ? stdenv.targetPlatform != stdenv.hostPlatform
+
+, # Whether to build dynamic libs for the standard library (on the target
+  # platform). Static libs are always built.
+  enableShared ? !stdenv.targetPlatform.isWindows && !stdenv.targetPlatform.useiOSPrebuilt
+
+, # Whether to build terminfo.
+  enableTerminfo ? !stdenv.targetPlatform.isWindows
+
+, version ? "8.11.20200505"
+, # What flavour to build. An empty string indicates no
+  # specific flavour and falls back to ghc default values.
+  ghcFlavour ? stdenv.lib.optionalString (stdenv.targetPlatform != stdenv.hostPlatform)
+    (if useLLVM then "perf-cross" else "perf-cross-ncg")
+
+, # Whether to disable the large address space allocator
+  # necessary fix for iOS: https://www.reddit.com/r/haskell/comments/4ttdz1/building_an_osxi386_to_iosarm64_cross_compiler/d5qvd67/
+  disableLargeAddressSpace ? stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64
+}:
+
+assert !enableIntegerSimple -> gmp != null;
+
+let
+  inherit (stdenv) buildPlatform hostPlatform targetPlatform;
+
+  inherit (bootPkgs) ghc;
+
+  # TODO(@Ericson2314) Make unconditional
+  targetPrefix = stdenv.lib.optionalString
+    (targetPlatform != hostPlatform)
+    "${targetPlatform.config}-";
+
+  buildMK = ''
+    BuildFlavour = ${ghcFlavour}
+    ifneq \"\$(BuildFlavour)\" \"\"
+    include mk/flavours/\$(BuildFlavour).mk
+    endif
+    DYNAMIC_GHC_PROGRAMS = ${if enableShared then "YES" else "NO"}
+    INTEGER_LIBRARY = ${if enableIntegerSimple then "integer-simple" else "integer-gmp"}
+  '' + stdenv.lib.optionalString (targetPlatform != hostPlatform) ''
+    Stage1Only = ${if targetPlatform.system == hostPlatform.system then "NO" else "YES"}
+    CrossCompilePrefix = ${targetPrefix}
+    HADDOCK_DOCS = NO
+    BUILD_SPHINX_HTML = NO
+    BUILD_SPHINX_PDF = NO
+  '' + stdenv.lib.optionalString enableRelocatedStaticLibs ''
+    GhcLibHcOpts += -fPIC
+    GhcRtsHcOpts += -fPIC
+  '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
+    EXTRA_CC_OPTS += -std=gnu99
+  '';
+
+  # Splicer will pull out correct variations
+  libDeps = platform: stdenv.lib.optional enableTerminfo ncurses
+    ++ [libffi]
+    ++ stdenv.lib.optional (!enableIntegerSimple) gmp
+    ++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv
+    ++ stdenv.lib.optional enableDwarf elfutils;
+
+  toolsForTarget = [
+    pkgsBuildTarget.targetPackages.stdenv.cc
+  ] ++ stdenv.lib.optional useLLVM buildLlvmPackages.llvm;
+
+  targetCC = builtins.head toolsForTarget;
+
+  # ld.gold is disabled for musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856
+  # see #84670 and #49071 for more background.
+  useLdGold = targetPlatform.isLinux && !(targetPlatform.useLLVM or false) && !targetPlatform.isMusl;
+
+in
+stdenv.mkDerivation (rec {
+  inherit version;
+  inherit (src) rev;
+  name = "${targetPrefix}ghc-${version}";
+
+  src = fetchgit {
+    url = "https://gitlab.haskell.org/ghc/ghc.git/";
+    rev = "40c71c2cf38b4e134d81b7184a4d5e02949ae70c";
+    sha256 = "04h9rcyzm9w3an1z00hjs062dp7dl19b8pkyxjsypr7a2i9dmvkb";
+  };
+
+  enableParallelBuilding = true;
+
+  outputs = [ "out" "doc" ];
+
+  postPatch = "patchShebangs .";
+
+  # GHC is a bit confused on its cross terminology.
+  preConfigure = ''
+    for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do
+      export "''${env#TARGET_}=''${!env}"
+    done
+    # GHC is a bit confused on its cross terminology, as these would normally be
+    # the *host* tools.
+    export CC="${targetCC}/bin/${targetCC.targetPrefix}cc"
+    export CXX="${targetCC}/bin/${targetCC.targetPrefix}cxx"
+    # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177
+    # and more generally have a faster linker.
+    export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${stdenv.lib.optionalString useLdGold ".gold"}"
+    export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as"
+    export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar"
+    export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm"
+    export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib"
+    export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf"
+    export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip"
+
+    echo -n "${buildMK}" > mk/build.mk
+    echo ${version} > VERSION
+    echo ${src.rev} > GIT_COMMIT_ID
+    ./boot
+    sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure
+  '' + stdenv.lib.optionalString (!stdenv.isDarwin) ''
+    export NIX_LDFLAGS+=" -rpath $out/lib/ghc-${version}"
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    export NIX_LDFLAGS+=" -no_dtrace_dof"
+  '' + stdenv.lib.optionalString targetPlatform.useAndroidPrebuilt ''
+    sed -i -e '5i ,("armv7a-unknown-linux-androideabi", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "cortex-a8", ""))' llvm-targets
+  '' + stdenv.lib.optionalString targetPlatform.isMusl ''
+      echo "patching llvm-targets for musl targets..."
+      echo "Cloning these existing '*-linux-gnu*' targets:"
+      grep linux-gnu llvm-targets | sed 's/^/  /'
+      echo "(go go gadget sed)"
+      sed -i 's,\(^.*linux-\)gnu\(.*\)$,\0\n\1musl\2,' llvm-targets
+      echo "llvm-targets now contains these '*-linux-musl*' targets:"
+      grep linux-musl llvm-targets | sed 's/^/  /'
+
+      echo "And now patching to preserve '-musleabi' as done with '-gnueabi'"
+      # (aclocal.m4 is actual source, but patch configure as well since we don't re-gen)
+      for x in configure aclocal.m4; do
+        substituteInPlace $x \
+          --replace '*-android*|*-gnueabi*)' \
+                    '*-android*|*-gnueabi*|*-musleabi*)'
+      done
+  '';
+
+  # TODO(@Ericson2314): Always pass "--target" and always prefix.
+  configurePlatforms = [ "build" "host" ]
+    ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target";
+
+  # `--with` flags for libraries needed for RTS linker
+  configureFlags = [
+    "--datadir=$doc/share/doc/ghc"
+    "--with-curses-libraries=${ncurses.out}/lib"
+  ] ++ stdenv.lib.optionals (libffi != null) [
+    "--with-system-libffi"
+    "--with-ffi-includes=${targetPackages.libffi.dev}/include"
+    "--with-ffi-libraries=${targetPackages.libffi.out}/lib"
+  ] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && !enableIntegerSimple) [
+    "--with-gmp-includes=${targetPackages.gmp.dev}/include"
+    "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
+  ] ++ stdenv.lib.optionals (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [
+    "--with-iconv-includes=${libiconv}/include"
+    "--with-iconv-libraries=${libiconv}/lib"
+  ] ++ stdenv.lib.optionals (targetPlatform != hostPlatform) [
+    "--enable-bootstrap-with-devel-snapshot"
+  ] ++ stdenv.lib.optionals useLdGold [
+    "CFLAGS=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE1=-fuse-ld=gold"
+    "CONF_GCC_LINKER_OPTS_STAGE2=-fuse-ld=gold"
+  ] ++ stdenv.lib.optional disableLargeAddressSpace "--disable-large-address-space"
+    ++ stdenv.lib.optionals enableDwarf [
+    "--enable-dwarf-unwind"
+    "--with-libdw-includes=${stdenv.lib.getDev elfutils}/include"
+    "--with-libdw-libraries=${stdenv.lib.getLib elfutils}/lib"
+  ];
+
+  # Make sure we never relax`$PATH` and hooks support for compatibility.
+  strictDeps = true;
+
+  # Don’t add -liconv to LDFLAGS automatically so that GHC will add it itself.
+	dontAddExtraLibs = true;
+
+  nativeBuildInputs = [
+    perl autoconf autoreconfHook automake m4 python3 sphinx
+    ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
+  ];
+
+  # For building runtime libs
+  depsBuildTarget = toolsForTarget;
+
+  buildInputs = [ perl bash ] ++ (libDeps hostPlatform);
+
+  propagatedBuildInputs = [ targetPackages.stdenv.cc ]
+    ++ stdenv.lib.optional useLLVM llvmPackages.llvm;
+
+  depsTargetTarget = map stdenv.lib.getDev (libDeps targetPlatform);
+  depsTargetTargetPropagated = map (stdenv.lib.getOutput "out") (libDeps targetPlatform);
+
+  # required, because otherwise all symbols from HSffi.o are stripped, and
+  # that in turn causes GHCi to abort
+  stripDebugFlags = [ "-S" ] ++ stdenv.lib.optional (!targetPlatform.isDarwin) "--keep-file-symbols";
+
+  checkTarget = "test";
+
+  hardeningDisable = [ "format" ] ++ stdenv.lib.optional stdenv.targetPlatform.isMusl "pie";
+
+  postInstall = ''
+    # Install the bash completion file.
+    install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc
+
+    # Patch scripts to include "readelf" and "cat" in $PATH.
+    for i in "$out/bin/"*; do
+      test ! -h $i || continue
+      egrep --quiet '^#!' <(head -n 1 $i) || continue
+      sed -i -e '2i export PATH="$PATH:${stdenv.lib.makeBinPath [ targetPackages.stdenv.cc.bintools coreutils ]}"' $i
+    done
+  '';
+
+  passthru = {
+    inherit bootPkgs targetPrefix;
+
+    inherit llvmPackages;
+    inherit enableShared;
+
+    # Our Cabal compiler name
+    haskellCompilerName = "ghc-${version}";
+  };
+
+  meta = {
+    homepage = "http://haskell.org/ghc";
+    description = "The Glasgow Haskell Compiler";
+    maintainers = with stdenv.lib.maintainers; [ marcweber andres peti ];
+    inherit (ghc.meta) license platforms;
+  };
+
+} // stdenv.lib.optionalAttrs targetPlatform.useAndroidPrebuilt {
+  dontStrip = true;
+  dontPatchELF = true;
+  noAuditTmpdir = true;
+})
diff --git a/nixpkgs/pkgs/development/compilers/ghcjs-ng/8.6/dep-overrides.nix b/nixpkgs/pkgs/development/compilers/ghcjs-ng/8.6/dep-overrides.nix
new file mode 100644
index 000000000000..c54c782fafa6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghcjs-ng/8.6/dep-overrides.nix
@@ -0,0 +1,11 @@
+{ haskellLib }:
+
+let inherit (haskellLib) doJailbreak dontHaddock;
+in self: super: {
+  ghc-api-ghcjs = super.ghc-api-ghcjs.override
+  {
+    happy = self.happy_1_19_5;
+  };
+  haddock-library-ghcjs = doJailbreak super.haddock-library-ghcjs;
+  haddock-api-ghcjs = doJailbreak (dontHaddock super.haddock-api-ghcjs);
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghcjs-ng/8.6/git.json b/nixpkgs/pkgs/development/compilers/ghcjs-ng/8.6/git.json
new file mode 100644
index 000000000000..1114e1a12905
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghcjs-ng/8.6/git.json
@@ -0,0 +1,6 @@
+{
+  "url": "https://github.com/ghcjs/ghcjs",
+  "rev": "e87195eaa2bc7e320e18cf10386802bc90b7c874",
+  "sha256": "02mwkf7aagxqi142gcmq048244apslrr72p568akcab9s0fn2gvy",
+  "fetchSubmodules": true
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghcjs-ng/8.6/stage0.nix b/nixpkgs/pkgs/development/compilers/ghcjs-ng/8.6/stage0.nix
new file mode 100644
index 000000000000..b957a6aa9e10
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghcjs-ng/8.6/stage0.nix
@@ -0,0 +1,177 @@
+{ callPackage, configuredSrc }:
+
+{
+
+  ghcjs = callPackage
+    ({ mkDerivation, aeson, array, attoparsec, base, base16-bytestring
+    , base64-bytestring, binary, bytestring, Cabal, containers
+    , cryptohash, data-default, deepseq, directory, executable-path
+    , filepath, ghc-api-ghcjs, ghc-boot, ghc-paths, ghci-ghcjs
+    , ghcjs-th, haddock-api-ghcjs, hashable, haskell-src-exts
+    , haskell-src-meta, http-types, HUnit, lens, lifted-base, mtl
+    , network, optparse-applicative, parallel, parsec, process, random
+    , regex-posix, safe, shelly, split, stdenv, stringsearch, syb
+    , system-fileio, system-filepath, tar, template-haskell
+    , template-haskell-ghcjs, terminfo, test-framework
+    , test-framework-hunit, text, time, transformers
+    , transformers-compat, unix, unix-compat, unordered-containers
+    , vector, wai, wai-app-static, wai-extra, wai-websockets, warp
+    , webdriver, websockets, wl-pprint-text, yaml
+    }:
+    mkDerivation {
+      pname = "ghcjs";
+      version = "8.6.0.1";
+      src = configuredSrc + /.;
+      isLibrary = true;
+      isExecutable = true;
+      enableSeparateDataOutput = true;
+      setupHaskellDepends = [
+        base Cabal containers directory filepath process template-haskell
+        transformers
+      ];
+      libraryHaskellDepends = [
+        aeson array attoparsec base base16-bytestring base64-bytestring
+        binary bytestring Cabal containers cryptohash data-default deepseq
+        directory filepath ghc-api-ghcjs ghc-boot ghc-paths ghci-ghcjs
+        ghcjs-th hashable haskell-src-exts haskell-src-meta lens mtl
+        optparse-applicative parallel parsec process regex-posix safe split
+        stringsearch syb template-haskell template-haskell-ghcjs text time
+        transformers unordered-containers vector wl-pprint-text yaml
+      ];
+      executableHaskellDepends = [
+        aeson base binary bytestring Cabal containers directory
+        executable-path filepath ghc-api-ghcjs ghc-boot haddock-api-ghcjs
+        lens mtl optparse-applicative process shelly system-fileio
+        system-filepath tar terminfo text time transformers
+        transformers-compat unix unix-compat unordered-containers vector
+        yaml
+      ];
+      testHaskellDepends = [
+        aeson base bytestring data-default deepseq directory http-types
+        HUnit lens lifted-base network optparse-applicative process random
+        shelly system-fileio system-filepath test-framework
+        test-framework-hunit text time transformers unordered-containers
+        wai wai-app-static wai-extra wai-websockets warp webdriver
+        websockets yaml
+      ];
+      description = "Haskell to JavaScript compiler";
+      license = stdenv.lib.licenses.mit;
+    }) {};
+
+  ghc-api-ghcjs = callPackage
+    ({ mkDerivation, alex, array, base, binary, bytestring, containers
+    , deepseq, directory, filepath, ghc-boot, ghc-boot-th, ghc-heap
+    , ghci-ghcjs, happy, hpc, process, stdenv, template-haskell-ghcjs
+    , terminfo, time, transformers, unix
+    }:
+    mkDerivation {
+      pname = "ghc-api-ghcjs";
+      version = "8.6.5";
+      src = configuredSrc + /lib/ghc-api-ghcjs;
+      libraryHaskellDepends = [
+        array base binary bytestring containers deepseq directory filepath
+        ghc-boot ghc-boot-th ghc-heap ghci-ghcjs hpc process
+        template-haskell-ghcjs terminfo time transformers unix
+      ];
+      libraryToolDepends = [ alex happy ];
+      homepage = "http://www.haskell.org/ghc/";
+      description = "The GHC API (customized for GHCJS)";
+      license = stdenv.lib.licenses.bsd3;
+    }) {};
+
+  ghci-ghcjs = callPackage
+    ({ mkDerivation, array, base, binary, bytestring, containers
+    , deepseq, filepath, ghc-boot, ghc-boot-th, ghc-heap, stdenv
+    , template-haskell-ghcjs, transformers, unix
+    }:
+    mkDerivation {
+      pname = "ghci-ghcjs";
+      version = "8.6.1";
+      src = configuredSrc + /lib/ghci-ghcjs;
+      libraryHaskellDepends = [
+        array base binary bytestring containers deepseq filepath ghc-boot
+        ghc-boot-th ghc-heap template-haskell-ghcjs transformers unix
+      ];
+      description = "The library supporting GHC's interactive interpreter (customized for GHCJS)";
+      license = stdenv.lib.licenses.bsd3;
+    }) {};
+
+  ghcjs-th = callPackage
+    ({ mkDerivation, base, binary, bytestring, containers, ghc-prim
+    , ghci-ghcjs, stdenv, template-haskell-ghcjs
+    }:
+    mkDerivation {
+      pname = "ghcjs-th";
+      version = "0.1.0.0";
+      src = configuredSrc + /lib/ghcjs-th;
+      libraryHaskellDepends = [
+        base binary bytestring containers ghc-prim ghci-ghcjs
+        template-haskell-ghcjs
+      ];
+      homepage = "http://github.com/ghcjs";
+      license = stdenv.lib.licenses.mit;
+    }) {};
+
+  haddock-api-ghcjs = callPackage
+    ({ mkDerivation, array, base, bytestring, Cabal, containers, deepseq
+    , directory, filepath, ghc-api-ghcjs, ghc-boot, ghc-paths
+    , haddock-library-ghcjs, hspec, hspec-discover, QuickCheck, stdenv
+    , transformers, xhtml
+    }:
+    mkDerivation {
+      pname = "haddock-api-ghcjs";
+      version = "2.20.0";
+      src = configuredSrc + /lib/haddock-api-ghcjs;
+      enableSeparateDataOutput = true;
+      libraryHaskellDepends = [
+        array base bytestring Cabal containers deepseq directory filepath
+        ghc-api-ghcjs ghc-boot ghc-paths haddock-library-ghcjs transformers
+        xhtml
+      ];
+      testHaskellDepends = [
+        array base bytestring Cabal containers deepseq directory filepath
+        ghc-api-ghcjs ghc-boot ghc-paths haddock-library-ghcjs hspec
+        QuickCheck transformers xhtml
+      ];
+      testToolDepends = [ hspec-discover ];
+      homepage = "http://www.haskell.org/haddock/";
+      description = "A documentation-generation tool for Haskell libraries";
+      license = stdenv.lib.licenses.bsd3;
+    }) {};
+
+  haddock-library-ghcjs = callPackage
+    ({ mkDerivation, base, base-compat, bytestring, containers, deepseq
+    , directory, filepath, haddock-library, hspec, hspec-discover
+    , optparse-applicative, parsec, QuickCheck, stdenv, text
+    , transformers, tree-diff
+    }:
+    mkDerivation {
+      pname = "haddock-library-ghcjs";
+      version = "1.6.0";
+      src = configuredSrc + /lib/haddock-library-ghcjs;
+      libraryHaskellDepends = [
+        base bytestring containers parsec text transformers
+      ];
+      testHaskellDepends = [
+        base base-compat bytestring containers deepseq directory filepath
+        haddock-library hspec optparse-applicative parsec QuickCheck text
+        transformers tree-diff
+      ];
+      testToolDepends = [ hspec-discover ];
+      homepage = "http://www.haskell.org/haddock/";
+      description = "Library exposing some functionality of Haddock";
+      license = stdenv.lib.licenses.bsd3;
+    }) {};
+
+  template-haskell-ghcjs = callPackage
+    ({ mkDerivation, base, ghc-boot-th, pretty, stdenv }:
+    mkDerivation {
+      pname = "template-haskell-ghcjs";
+      version = "2.14.0.0";
+      src = configuredSrc + /lib/template-haskell-ghcjs;
+      libraryHaskellDepends = [ base ghc-boot-th pretty ];
+      description = "Support library for Template Haskell (customized for GHCJS)";
+      license = stdenv.lib.licenses.bsd3;
+    }) {};
+
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghcjs-ng/README.md b/nixpkgs/pkgs/development/compilers/ghcjs-ng/README.md
new file mode 100644
index 000000000000..99ad980c965e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghcjs-ng/README.md
@@ -0,0 +1,21 @@
+New build system for GHCJS 8.2
+---
+
+`ghcjs-8.2` reworked the build system, and now comes with its own
+small package set of dependencies. This involves autogenerating
+several sources and cabal files, based on a GHC
+checkout. `callCabal2nix` is off limits, since we don't like "import
+from derivation" in nixpkgs. So there is a derivation that builds the
+nix expression that should be checked in whenever GHCJS is updated.
+
+Updating
+---
+
+```
+$ nix-prefetch-git https://github.com/ghcjs/ghcjs --rev refs/heads/ghc-8.4 \
+  | jq '{ url, rev, fetchSubmodules, sha256 }' \
+  > 8.4/git.json
+$ cat $(nix-build ../../../.. -A haskell.compiler.ghcjs82.genStage0 --no-out-link) > 8.4/stage0.nix
+$ cabal2nix --compiler ghcjs git://github.com/ghcjs/ghcjs-base > ghcjs-base.nix
+```
+
diff --git a/nixpkgs/pkgs/development/compilers/ghcjs-ng/common-overrides.nix b/nixpkgs/pkgs/development/compilers/ghcjs-ng/common-overrides.nix
new file mode 100644
index 000000000000..00a071651eda
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghcjs-ng/common-overrides.nix
@@ -0,0 +1,8 @@
+{ haskellLib }:
+
+let inherit (haskellLib) addBuildTools appendConfigureFlag dontHaddock doJailbreak;
+in self: super: {
+  ghcjs = dontHaddock (appendConfigureFlag (doJailbreak super.ghcjs) "-fno-wrapper-install");
+  haddock-library-ghcjs = dontHaddock super.haddock-library-ghcjs;
+  system-fileio = doJailbreak super.system-fileio;
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghcjs-ng/configured-ghcjs-src.nix b/nixpkgs/pkgs/development/compilers/ghcjs-ng/configured-ghcjs-src.nix
new file mode 100644
index 000000000000..943866d5f24e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghcjs-ng/configured-ghcjs-src.nix
@@ -0,0 +1,51 @@
+{ perl
+, autoconf
+, automake
+, python3
+, gcc
+, cabal-install
+, runCommand
+, lib
+, stdenv
+
+, ghc
+, happy
+, alex
+
+, ghcjsSrc
+}:
+
+runCommand "configured-ghcjs-src" {
+  nativeBuildInputs = [
+    perl
+    autoconf
+    automake
+    python3
+    ghc
+    happy
+    alex
+    cabal-install
+  ] ++ lib.optionals stdenv.isDarwin [
+    gcc # https://github.com/ghcjs/ghcjs/issues/663
+  ];
+  inherit ghcjsSrc;
+} ''
+  export HOME=$(pwd)
+  mkdir $HOME/.cabal
+  touch $HOME/.cabal/config
+  cp -r "$ghcjsSrc" "$out"
+  chmod -R +w "$out"
+  cd "$out"
+
+  # TODO: Find a better way to avoid impure version numbers
+  sed -i 's/RELEASE=NO/RELEASE=YES/' ghc/configure.ac
+
+  # TODO: How to actually fix this?
+  # Seems to work fine and produce the right files.
+  touch ghc/includes/ghcautoconf.h
+  mkdir -p ghc/compiler/vectorise
+  mkdir -p ghc/utils/haddock/haddock-library/vendor
+
+  patchShebangs .
+  ./utils/makePackages.sh copy
+''
diff --git a/nixpkgs/pkgs/development/compilers/ghcjs-ng/default.nix b/nixpkgs/pkgs/development/compilers/ghcjs-ng/default.nix
new file mode 100644
index 000000000000..6d56c410aabd
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghcjs-ng/default.nix
@@ -0,0 +1,108 @@
+{ stdenv
+, pkgsHostHost
+, callPackage
+, fetchgit
+, ghcjsSrcJson ? null
+, ghcjsSrc ? fetchgit (builtins.fromJSON (builtins.readFile ghcjsSrcJson))
+, bootPkgs
+, stage0
+, haskellLib
+, cabal-install
+, nodejs
+, makeWrapper
+, xorg
+, gmp
+, pkgconfig
+, gcc
+, lib
+, ghcjsDepOverrides ? (_:_:{})
+, haskell
+}:
+
+let
+  passthru = {
+    configuredSrc = callPackage ./configured-ghcjs-src.nix {
+      inherit ghcjsSrc;
+      inherit (bootPkgs) ghc alex happy;
+    };
+    genStage0 = callPackage ./mk-stage0.nix { inherit (passthru) configuredSrc; };
+    bootPkgs = bootPkgs.extend (lib.foldr lib.composeExtensions (_:_:{}) [
+      (self: _: import stage0 {
+        inherit (passthru) configuredSrc;
+        inherit (self) callPackage;
+      })
+
+      (callPackage ./common-overrides.nix {
+        inherit haskellLib;
+      })
+      ghcjsDepOverrides
+    ]);
+
+    targetPrefix = "";
+    inherit bootGhcjs;
+    inherit (bootGhcjs) version;
+    ghcVersion = bootPkgs.ghc.version;
+    isGhcjs = true;
+
+    enableShared = true;
+
+    socket-io = pkgsHostHost.nodePackages."socket.io";
+
+    # Relics of the old GHCJS build system
+    stage1Packages = [];
+    mkStage2 = { callPackage }: {
+      # https://github.com/ghcjs/ghcjs-base/issues/110
+      # https://github.com/ghcjs/ghcjs-base/pull/111
+      ghcjs-base = haskell.lib.dontCheck (haskell.lib.doJailbreak (callPackage ./ghcjs-base.nix {}));
+    };
+
+    haskellCompilerName = "ghcjs-${bootGhcjs.version}";
+  };
+
+  bootGhcjs = haskellLib.justStaticExecutables passthru.bootPkgs.ghcjs;
+  libexec = "${bootGhcjs}/libexec/${builtins.replaceStrings ["darwin" "i686"] ["osx" "i386"] stdenv.buildPlatform.system}-${passthru.bootPkgs.ghc.name}/${bootGhcjs.name}";
+
+in stdenv.mkDerivation {
+    name = bootGhcjs.name;
+    src = passthru.configuredSrc;
+    nativeBuildInputs = [
+      bootGhcjs
+      passthru.bootPkgs.ghc
+      cabal-install
+      nodejs
+      makeWrapper
+      xorg.lndir
+      gmp
+      pkgconfig
+    ] ++ lib.optionals stdenv.isDarwin [
+      gcc # https://github.com/ghcjs/ghcjs/issues/663
+    ];
+    dontConfigure = true;
+    dontInstall = true;
+    buildPhase = ''
+      export HOME=$TMP
+      mkdir $HOME/.cabal
+      touch $HOME/.cabal/config
+      cd lib/boot
+
+      mkdir -p $out/bin
+      mkdir -p $out/lib/${bootGhcjs.name}
+      lndir ${libexec} $out/bin
+
+      wrapProgram $out/bin/ghcjs --add-flags "-B$out/lib/${bootGhcjs.name}"
+      wrapProgram $out/bin/haddock-ghcjs --add-flags "-B$out/lib/${bootGhcjs.name}"
+      wrapProgram $out/bin/ghcjs-pkg --add-flags "--global-package-db=$out/lib/${bootGhcjs.name}/package.conf.d"
+
+      env PATH=$out/bin:$PATH $out/bin/ghcjs-boot -j1 --with-ghcjs-bin $out/bin
+    '';
+
+    # We hard code -j1 as a temporary workaround for
+    # https://github.com/ghcjs/ghcjs/issues/654
+    # enableParallelBuilding = true;
+
+    inherit passthru;
+
+    meta.broken = true; # build does not succeed
+    meta.platforms = lib.platforms.none;  # passthru.bootPkgs.ghc.meta.platforms;
+    meta.maintainers = [lib.maintainers.elvishjerricco];
+  }
diff --git a/nixpkgs/pkgs/development/compilers/ghcjs-ng/ghcjs-base.nix b/nixpkgs/pkgs/development/compilers/ghcjs-ng/ghcjs-base.nix
new file mode 100644
index 000000000000..7c10ce6572f8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghcjs-ng/ghcjs-base.nix
@@ -0,0 +1,29 @@
+{ mkDerivation, aeson, array, attoparsec, base, binary, bytestring
+, containers, deepseq, directory, dlist, fetchgit, ghc-prim
+, ghcjs-prim, hashable, HUnit, integer-gmp, primitive, QuickCheck
+, quickcheck-unicode, random, scientific, stdenv, test-framework
+, test-framework-hunit, test-framework-quickcheck2, text, time
+, transformers, unordered-containers, vector
+}:
+mkDerivation {
+  pname = "ghcjs-base";
+  version = "0.2.0.0";
+  src = fetchgit {
+    url = "git://github.com/ghcjs/ghcjs-base";
+    sha256 = "0qr05m0djll3x38dhl85pl798arsndmwfhil8yklhb70lxrbvfrs";
+    rev = "01014ade3f8f5ae677df192d7c2a208bd795b96c";
+  };
+  libraryHaskellDepends = [
+    aeson attoparsec base binary bytestring containers deepseq dlist
+    ghc-prim ghcjs-prim hashable integer-gmp primitive scientific text
+    time transformers unordered-containers vector
+  ];
+  testHaskellDepends = [
+    array base bytestring deepseq directory ghc-prim ghcjs-prim HUnit
+    primitive QuickCheck quickcheck-unicode random test-framework
+    test-framework-hunit test-framework-quickcheck2 text
+  ];
+  homepage = "https://github.com/ghcjs/ghcjs-base";
+  description = "base library for GHCJS";
+  license = stdenv.lib.licenses.mit;
+}
diff --git a/nixpkgs/pkgs/development/compilers/ghcjs-ng/mk-stage0.nix b/nixpkgs/pkgs/development/compilers/ghcjs-ng/mk-stage0.nix
new file mode 100644
index 000000000000..f45ebb4511d6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghcjs-ng/mk-stage0.nix
@@ -0,0 +1,25 @@
+{ configuredSrc
+, runCommand
+, cabal2nix
+, yq
+}:
+
+runCommand "stage0.nix" {
+  buildInputs = [cabal2nix yq];
+} ''
+  (
+    printf '{ callPackage, configuredSrc }:\n\n{\n\n'
+    yq '.packages | .[]' ${configuredSrc}/stack.yaml -r | sed 's|^\.$|./.|' | sed 's|^\.||' | while read f; do
+      printf '  %s = callPackage\n' \
+        "$(find ${configuredSrc}/$f -name "*.cabal" -maxdepth 1 \
+          | xargs basename \
+          | sed 's/.cabal$//')"
+      printf '(%s) {};' \
+        "$(cabal2nix ${configuredSrc}/$f \
+          | sed 's|${configuredSrc}/|configuredSrc + |g')" \
+        | sed 's/^/    /'
+      printf '\n\n'
+    done
+    printf '}\n'
+  ) > $out
+''
diff --git a/nixpkgs/pkgs/development/compilers/ghdl/default.nix b/nixpkgs/pkgs/development/compilers/ghdl/default.nix
new file mode 100644
index 000000000000..6d1fae337340
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ghdl/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchFromGitHub, gnat, zlib, llvm, lib
+, backend ? "mcode" }:
+
+assert backend == "mcode" || backend == "llvm";
+
+stdenv.mkDerivation rec {
+  pname = "ghdl-${backend}";
+  version = "0.37";
+
+  src = fetchFromGitHub {
+    owner = "ghdl";
+    repo = "ghdl";
+    rev = "v${version}";
+    sha256 = "0b53yl4im33c1cd4mdyc4ks9cmrpixym17gzchfmplrl22w3l17y";
+  };
+
+  LIBRARY_PATH = "${stdenv.cc.libc}/lib";
+
+  buildInputs = [ gnat zlib ];
+
+  preConfigure = ''
+    # If llvm 7.0 works, 7.x releases should work too.
+    sed -i 's/check_version 7.0/check_version 7/g' configure
+  '';
+
+  configureFlags = lib.optional (backend == "llvm")
+    "--with-llvm-config=${llvm}/bin/llvm-config";
+
+  hardeningDisable = [ "format" ];
+
+  enableParallelBuilding = true;
+
+  meta = with lib; {
+    homepage = "https://github.com/ghdl/ghdl";
+    description = "VHDL 2008/93/87 simulator";
+    maintainers = with maintainers; [ lucus16 ];
+    platforms = platforms.linux;
+    license = licenses.gpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gleam/default.nix b/nixpkgs/pkgs/development/compilers/gleam/default.nix
new file mode 100644
index 000000000000..1fa8720a400a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gleam/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, rustPlatform, fetchFromGitHub, Security }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "gleam";
+  version = "0.8.0";
+
+  src = fetchFromGitHub {
+    owner = "gleam-lang";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "05n8a7b63i9946fvbxphfh8n6ib20qnbv44ghlzcjwca9qvlx7i7";
+  };
+
+  buildInputs = stdenv.lib.optionals stdenv.isDarwin [ Security ];
+
+  cargoSha256 = "1ga5dinkmibkg53bfr6vc0i4bbgyn2y3d5qjf5bd965c1v7ba1jl";
+
+  meta = with stdenv.lib; {
+    description = "A statically typed language for the Erlang VM";
+    homepage = "https://gleam.run/";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ filalex77 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/glslang/default.nix b/nixpkgs/pkgs/development/compilers/glslang/default.nix
new file mode 100644
index 000000000000..b9d6866cc432
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/glslang/default.nix
@@ -0,0 +1,51 @@
+{ stdenv, fetchFromGitHub
+, bison
+, cmake
+, jq
+, python3
+, spirv-headers
+, spirv-tools
+}:
+
+stdenv.mkDerivation rec {
+  pname = "glslang";
+  version = "8.13.3559";
+
+  src = fetchFromGitHub {
+    owner = "KhronosGroup";
+    repo = "glslang";
+    rev = version;
+    sha256 = "0waamlh2vqh1k40m169294xdlm0iqjkx2vis4qyxfki0r0cnsmnk";
+  };
+
+  # These get set at all-packages, keep onto them for child drvs
+  passthru = {
+    inherit spirv-tools spirv-headers;
+  };
+
+  nativeBuildInputs = [ cmake python3 bison jq ];
+  enableParallelBuilding = true;
+
+  postPatch = ''
+    cp --no-preserve=mode -r "${spirv-tools.src}" External/spirv-tools
+    ln -s "${spirv-headers.src}" External/spirv-tools/external/spirv-headers
+  '';
+
+  # Ensure spirv-headers and spirv-tools match exactly to what is expected
+  preConfigure = ''
+    HEADERS_COMMIT=$(jq -r < known_good.json '.commits|map(select(.name=="spirv-tools/external/spirv-headers"))[0].commit')
+    TOOLS_COMMIT=$(jq -r < known_good.json '.commits|map(select(.name=="spirv-tools"))[0].commit')
+    if [ "$HEADERS_COMMIT" != "${spirv-headers.src.rev}" ] || [ "$TOOLS_COMMIT" != "${spirv-tools.src.rev}" ]; then
+      echo "ERROR: spirv-tools commits do not match expected versions: expected tools at $TOOLS_COMMIT, headers at $HEADERS_COMMIT";
+      exit 1;
+    fi
+  '';
+
+  meta = with stdenv.lib; {
+    inherit (src.meta) homepage;
+    description = "Khronos reference front-end for GLSL and ESSL";
+    license = licenses.asl20;
+    platforms = platforms.linux;
+    maintainers = [ maintainers.ralith ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gnatboot/default.nix b/nixpkgs/pkgs/development/compilers/gnatboot/default.nix
new file mode 100644
index 000000000000..cb643d6123a6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gnatboot/default.nix
@@ -0,0 +1,51 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation {
+  pname = "gentoo-gnatboot";
+  version = "4.1";
+
+  src = if stdenv.system == "i686-linux" then
+    fetchurl {
+      url = mirror://gentoo/distfiles/gnatboot-4.1-i386.tar.bz2;
+      sha256 = "0665zk71598204bf521vw68i5y6ccqarq9fcxsqp7ccgycb4lysr";
+    }
+  else if stdenv.system == "x86_64-linux" then
+    fetchurl {
+      url = mirror://gentoo/distfiles/gnatboot-4.1-amd64.tar.bz2;
+      sha256 = "1li4d52lmbnfs6llcshlbqyik2q2q4bvpir0f7n38nagp0h6j0d4";
+    }
+  else
+    throw "Platform not supported";
+
+  dontStrip = 1;
+
+  installPhase = ''
+    mkdir -p $out
+    cp -R * $out
+
+    set +e
+    for a in $out/bin/* ; do
+      patchelf --interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+        --set-rpath $(cat $NIX_CC/nix-support/orig-libc)/lib:$(cat $NIX_CC/nix-support/orig-cc)/lib64:$(cat $NIX_CC/nix-support/orig-cc)/lib $a
+    done
+    set -e
+
+    mv $out/bin/gnatgcc_2wrap $out/bin/gnatgcc
+    ln -s $out/bin/gnatgcc $out/bin/gcc
+  '';
+
+  passthru = {
+    langC = true; # TRICK for gcc-wrapper to wrap it
+    langCC = false;
+    langFortran = false;
+    langAda = true;
+  };
+
+  meta = with stdenv.lib; {
+    homepage = "https://gentoo.org";
+    license = licenses.gpl3Plus;
+    maintainers = [ maintainers.lucus16 ];
+
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gnu-cobol/default.nix b/nixpkgs/pkgs/development/compilers/gnu-cobol/default.nix
new file mode 100644
index 000000000000..146af98093d0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gnu-cobol/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchurl, gcc, makeWrapper
+, db, gmp, ncurses }:
+
+let
+  version = "2.2";
+  lib = stdenv.lib;
+in
+stdenv.mkDerivation rec {
+  pname = "gnu-cobol";
+  inherit version;
+
+  src = fetchurl {
+    url = "https://sourceforge.com/projects/open-cobol/files/gnu-cobol/${version}/gnucobol-${version}.tar.gz";
+    sha256 = "1jrjmdx0swssjh388pp08awhiisbrs2i7gx4lcm4p1k5rpg3hn4j";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  buildInputs = [ db gmp ncurses ];
+
+  cflags  = stdenv.lib.concatMapStringsSep " " (p: "-L" + (lib.getLib p) + "/lib ") buildInputs;
+  ldflags = stdenv.lib.concatMapStringsSep " " (p: "-I" + (lib.getDev p) + "/include ") buildInputs;
+
+  cobolCCFlags = "-I$out/include ${ldflags} -L$out/lib ${cflags}";
+
+  postInstall = with stdenv.lib; ''
+    wrapProgram "$out/bin/cobc" \
+      --set COB_CC "${gcc}/bin/gcc" \
+      --prefix COB_LDFLAGS " " "${cobolCCFlags}" \
+      --prefix COB_CFLAGS " " "${cobolCCFlags}"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "An open-source COBOL compiler";
+    homepage = "https://sourceforge.net/projects/open-cobol/";
+    license = licenses.gpl3;
+    maintainers = with maintainers; [ ericsagnes ];
+    platforms = with platforms; linux ++ darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/gnu-smalltalk/default.nix b/nixpkgs/pkgs/development/compilers/gnu-smalltalk/default.nix
new file mode 100644
index 000000000000..f48cd6dfa1b1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gnu-smalltalk/default.nix
@@ -0,0 +1,60 @@
+{ config, stdenv, fetchurl, pkgconfig, libtool
+, zip, libffi, libsigsegv, readline, gmp
+, gnutls, gnome2, cairo, SDL, sqlite
+, emacsSupport ? config.emacsSupport or false, emacs ? null }:
+
+assert emacsSupport -> (emacs != null);
+
+let # The gnu-smalltalk project has a dependency to the libsigsegv library.
+    # The project ships with sources for this library, but deprecated this option.
+    # Using the vanilla libsigsegv library results in error: "cannot relocate [...]"
+    # Adding --enable-static=libsigsegv to the gnu-smalltalk configuration flags
+    # does not help, the error still occurs. The only solution is to build a
+    # shared version of libsigsegv.
+    libsigsegv-shared = stdenv.lib.overrideDerivation libsigsegv (oldAttrs: {
+      configureFlags = [ "--enable-shared" ];
+    });
+
+in stdenv.mkDerivation rec {
+
+  version = "3.2.5";
+  pname = "gnu-smalltalk";
+
+  src = fetchurl {
+    url = "mirror://gnu/smalltalk/smalltalk-${version}.tar.xz";
+    sha256 = "1k2ssrapfzhngc7bg1zrnd9n2vyxp9c9m70byvsma6wapbvib6l1";
+  };
+
+  # The dependencies and their justification are explained at
+  # http://smalltalk.gnu.org/download
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [
+    libtool zip libffi libsigsegv-shared readline gmp gnutls gnome2.gtk
+    cairo SDL sqlite
+  ]
+  ++ stdenv.lib.optional emacsSupport emacs;
+
+  configureFlags = stdenv.lib.optional (!emacsSupport) "--without-emacs";
+
+  hardeningDisable = [ "format" ];
+
+  installFlags = stdenv.lib.optional emacsSupport "lispdir=$(out)/share/emacs/site-lisp";
+
+  # For some reason the tests fail if executated with nix-build, but pass if
+  # executed within nix-shell --pure.
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "A free implementation of the Smalltalk-80 language";
+    longDescription = ''
+      GNU Smalltalk is a free implementation of the Smalltalk-80 language. It
+      runs on most POSIX compatible operating systems (including GNU/Linux, of
+      course), as well as under Windows. Smalltalk is a dynamic object-oriented
+      language, well-versed to scripting tasks.
+    '';
+    homepage = "http://smalltalk.gnu.org/";
+    license = with licenses; [ gpl2 lgpl2 ];
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ skeidel ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/go-jsonnet/default.nix b/nixpkgs/pkgs/development/compilers/go-jsonnet/default.nix
new file mode 100644
index 000000000000..d85cf1adfe78
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go-jsonnet/default.nix
@@ -0,0 +1,24 @@
+{ lib, buildGoModule, fetchFromGitHub }:
+
+buildGoModule rec {
+  pname = "go-jsonnet";
+  version = "0.16.0";
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "go-jsonnet";
+    rev = "v${version}";
+    sha256 = "17606gc75wnkm64am4hmlv7m3fy2hi8rnzadp6nrgpcd6rl26m83";
+  };
+
+  vendorSha256 = "0nsm4gsbbn8myz4yfi6m7qc3iizhdambsr18iks0clkdn3mi2jn1";
+
+  subPackages = [ "cmd/jsonnet" ];
+
+  meta = with lib; {
+    description = "An implementation of Jsonnet in pure Go";
+    homepage = "https://github.com/google/go-jsonnet";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ nshalman ];
+  };
+}
\ No newline at end of file
diff --git a/nixpkgs/pkgs/development/compilers/go/1.13.nix b/nixpkgs/pkgs/development/compilers/go/1.13.nix
new file mode 100644
index 000000000000..48e4d9bdc6c4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/1.13.nix
@@ -0,0 +1,242 @@
+{ stdenv, fetchurl, tzdata, iana-etc, runCommand
+, perl, which, pkgconfig, patch, procps, pcre, cacert, Security, Foundation
+, mailcap, runtimeShell
+, buildPackages, pkgsTargetTarget
+}:
+
+let
+
+  inherit (stdenv.lib) optionals optionalString;
+
+  goBootstrap = runCommand "go-bootstrap" {} ''
+    mkdir $out
+    cp -rf ${buildPackages.go_bootstrap}/* $out/
+    chmod -R u+w $out
+    find $out -name "*.c" -delete
+    cp -rf $out/bin/* $out/share/go/bin/
+  '';
+
+  goarch = platform: {
+    "i686" = "386";
+    "x86_64" = "amd64";
+    "aarch64" = "arm64";
+    "arm" = "arm";
+    "armv5tel" = "arm";
+    "armv6l" = "arm";
+    "armv7l" = "arm";
+  }.${platform.parsed.cpu.name} or (throw "Unsupported system");
+
+in
+
+stdenv.mkDerivation rec {
+  pname = "go";
+  version = "1.13.12";
+
+  src = fetchurl {
+    url = "https://dl.google.com/go/go${version}.src.tar.gz";
+    sha256 = "0d5s5rqyzp6ykj4x1dz8infcsmj3gy8djnf63ji971ypwi6jrfhp";
+  };
+
+  # perl is used for testing go vet
+  nativeBuildInputs = [ perl which pkgconfig patch procps ];
+  buildInputs = [ cacert pcre ]
+    ++ optionals stdenv.isLinux [ stdenv.cc.libc.out ]
+    ++ optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ];
+
+  depsTargetTargetPropagated = optionals stdenv.isDarwin [ Security Foundation ];
+
+  hardeningDisable = [ "all" ];
+
+  prePatch = ''
+    patchShebangs ./ # replace /bin/bash
+
+    # This source produces shell script at run time,
+    # and thus it is not corrected by patchShebangs.
+    substituteInPlace misc/cgo/testcarchive/carchive_test.go \
+      --replace '#!/usr/bin/env bash' '#!${runtimeShell}'
+
+    # Patch the mimetype database location which is missing on NixOS.
+    # but also allow static binaries built with NixOS to run outside nix
+    sed -i 's,\"/etc/mime.types,"${mailcap}/etc/mime.types\"\,\n\t&,' src/mime/type_unix.go
+
+    # Disabling the 'os/http/net' tests (they want files not available in
+    # chroot builds)
+    rm src/net/{listen,parse}_test.go
+    rm src/syscall/exec_linux_test.go
+
+    # !!! substituteInPlace does not seems to be effective.
+    # The os test wants to read files in an existing path. Just don't let it be /usr/bin.
+    sed -i 's,/usr/bin,'"`pwd`", src/os/os_test.go
+    sed -i 's,/bin/pwd,'"`type -P pwd`", src/os/os_test.go
+    # Disable the unix socket test
+    sed -i '/TestShutdownUnix/aif true \{ return\; \}' src/net/net_test.go
+    # Disable the hostname test
+    sed -i '/TestHostname/aif true \{ return\; \}' src/os/os_test.go
+    # ParseInLocation fails the test
+    sed -i '/TestParseInSydney/aif true \{ return\; \}' src/time/format_test.go
+    # Remove the api check as it never worked
+    sed -i '/src\/cmd\/api\/run.go/ireturn nil' src/cmd/dist/test.go
+    # Remove the coverage test as we have removed this utility
+    sed -i '/TestCoverageWithCgo/aif true \{ return\; \}' src/cmd/go/go_test.go
+    # Remove the timezone naming test
+    sed -i '/TestLoadFixed/aif true \{ return\; \}' src/time/time_test.go
+    # Remove disable setgid test
+    sed -i '/TestRespectSetgidDir/aif true \{ return\; \}' src/cmd/go/internal/work/build_test.go
+    # Remove cert tests that conflict with NixOS's cert resolution
+    sed -i '/TestEnvVars/aif true \{ return\; \}' src/crypto/x509/root_unix_test.go
+    # TestWritevError hangs sometimes
+    sed -i '/TestWritevError/aif true \{ return\; \}' src/net/writev_test.go
+    # TestVariousDeadlines fails sometimes
+    sed -i '/TestVariousDeadlines/aif true \{ return\; \}' src/net/timeout_test.go
+
+    sed -i 's,/etc/protocols,${iana-etc}/etc/protocols,' src/net/lookup_unix.go
+    sed -i 's,/etc/services,${iana-etc}/etc/services,' src/net/port_unix.go
+
+    # Disable cgo lookup tests not works, they depend on resolver
+    rm src/net/cgo_unix_test.go
+
+  '' + optionalString stdenv.isLinux ''
+    # prepend the nix path to the zoneinfo files but also leave the original value for static binaries
+    # that run outside a nix server
+    sed -i 's,\"/usr/share/zoneinfo/,"${tzdata}/share/zoneinfo/\"\,\n\t&,' src/time/zoneinfo_unix.go
+
+  '' + optionalString stdenv.isAarch32 ''
+    echo '#!${runtimeShell}' > misc/cgo/testplugin/test.bash
+  '' + optionalString stdenv.isDarwin ''
+    substituteInPlace src/race.bash --replace \
+      "sysctl machdep.cpu.extfeatures | grep -qv EM64T" true
+    sed -i 's,strings.Contains(.*sysctl.*,true {,' src/cmd/dist/util.go
+    sed -i 's,"/etc","'"$TMPDIR"'",' src/os/os_test.go
+    sed -i 's,/_go_os_test,'"$TMPDIR"'/_go_os_test,' src/os/path_test.go
+
+    sed -i '/TestChdirAndGetwd/aif true \{ return\; \}' src/os/os_test.go
+    sed -i '/TestCredentialNoSetGroups/aif true \{ return\; \}' src/os/exec/exec_posix_test.go
+    sed -i '/TestRead0/aif true \{ return\; \}' src/os/os_test.go
+    sed -i '/TestSystemRoots/aif true \{ return\; \}' src/crypto/x509/root_darwin_test.go
+
+    sed -i '/TestGoInstallRebuildsStalePackagesInOtherGOPATH/aif true \{ return\; \}' src/cmd/go/go_test.go
+    sed -i '/TestBuildDashIInstallsDependencies/aif true \{ return\; \}' src/cmd/go/go_test.go
+
+    sed -i '/TestDisasmExtld/aif true \{ return\; \}' src/cmd/objdump/objdump_test.go
+
+    sed -i 's/unrecognized/unknown/' src/cmd/link/internal/ld/lib.go
+
+    # TestCurrent fails because Current is not implemented on Darwin
+    sed -i 's/TestCurrent/testCurrent/g' src/os/user/user_test.go
+    sed -i 's/TestLookup/testLookup/g' src/os/user/user_test.go
+
+    touch $TMPDIR/group $TMPDIR/hosts $TMPDIR/passwd
+  '';
+
+  patches = [
+    ./remove-tools-1.11.patch
+    ./ssl-cert-file-1.13.patch
+    ./remove-test-pie-1.13.patch
+    ./creds-test.patch
+    ./go-1.9-skip-flaky-19608.patch
+    ./go-1.9-skip-flaky-20072.patch
+    ./skip-external-network-tests.patch
+    ./skip-nohup-tests.patch
+  ] ++ [
+    # breaks under load: https://github.com/golang/go/issues/25628
+    (if stdenv.isAarch32
+    then ./skip-test-extra-files-on-aarch32.patch
+    else ./skip-test-extra-files-on-386.patch)
+  ];
+
+  postPatch = ''
+    find . -name '*.orig' -exec rm {} ';'
+  '';
+
+  GOOS = stdenv.targetPlatform.parsed.kernel.name;
+  GOARCH = goarch stdenv.targetPlatform;
+  # GOHOSTOS/GOHOSTARCH must match the building system, not the host system.
+  # Go will nevertheless build a for host system that we will copy over in
+  # the install phase.
+  GOHOSTOS = stdenv.buildPlatform.parsed.kernel.name;
+  GOHOSTARCH = goarch stdenv.buildPlatform;
+
+  # {CC,CXX}_FOR_TARGET must be only set for cross compilation case as go expect those
+  # to be different from CC/CXX
+  CC_FOR_TARGET = if (stdenv.buildPlatform != stdenv.targetPlatform) then
+      "${pkgsTargetTarget.stdenv.cc}/bin/${pkgsTargetTarget.stdenv.cc.targetPrefix}cc"
+    else
+      null;
+  CXX_FOR_TARGET = if (stdenv.buildPlatform != stdenv.targetPlatform) then
+      "${pkgsTargetTarget.stdenv.cc}/bin/${pkgsTargetTarget.stdenv.cc.targetPrefix}c++"
+    else
+      null;
+
+  GOARM = toString (stdenv.lib.intersectLists [(stdenv.hostPlatform.parsed.cpu.version or "")] ["5" "6" "7"]);
+  GO386 = 387; # from Arch: don't assume sse2 on i686
+  CGO_ENABLED = 1;
+  # Hopefully avoids test timeouts on Hydra
+  GO_TEST_TIMEOUT_SCALE = 3;
+
+  # Indicate that we are running on build infrastructure
+  # Some tests assume things like home directories and users exists
+  GO_BUILDER_NAME = "nix";
+
+  GOROOT_BOOTSTRAP="${goBootstrap}/share/go";
+
+  postConfigure = ''
+    export GOCACHE=$TMPDIR/go-cache
+    # this is compiled into the binary
+    export GOROOT_FINAL=$out/share/go
+
+    export PATH=$(pwd)/bin:$PATH
+
+    # Independent from host/target, CC should produce code for the building system.
+    export CC=${buildPackages.stdenv.cc}/bin/cc
+    ulimit -a
+  '';
+
+  postBuild = ''
+    (cd src && ./make.bash)
+  '';
+
+  doCheck = stdenv.hostPlatform == stdenv.targetPlatform && !stdenv.isDarwin;
+
+  checkPhase = ''
+    runHook preCheck
+    (cd src && HOME=$TMPDIR GOCACHE=$TMPDIR/go-cache ./run.bash --no-rebuild)
+    runHook postCheck
+  '';
+
+  preInstall = ''
+    rm -r pkg/obj
+    # Contains the wrong perl shebang when cross compiling,
+    # since it is not used for anything we can deleted as well.
+    rm src/regexp/syntax/make_perl_groups.pl
+  '' + (if (stdenv.buildPlatform != stdenv.hostPlatform) then ''
+    mv bin/*_*/* bin
+    rmdir bin/*_*
+    ${optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) ''
+      rm -rf pkg/${GOHOSTOS}_${GOHOSTARCH} pkg/tool/${GOHOSTOS}_${GOHOSTARCH}
+    ''}
+  '' else if (stdenv.hostPlatform != stdenv.targetPlatform) then ''
+    rm -rf bin/*_*
+    ${optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) ''
+      rm -rf pkg/${GOOS}_${GOARCH} pkg/tool/${GOOS}_${GOARCH}
+    ''}
+  '' else "");
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $GOROOT_FINAL
+    cp -a bin pkg src lib misc api doc $GOROOT_FINAL
+    ln -s $GOROOT_FINAL/bin $out/bin
+    runHook postInstall
+  '';
+
+  disallowedReferences = [ goBootstrap ];
+
+  meta = with stdenv.lib; {
+    branch = "1.13";
+    homepage = "http://golang.org/";
+    description = "The Go Programming language";
+    license = licenses.bsd3;
+    maintainers = teams.golang.members;
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/go/1.14.nix b/nixpkgs/pkgs/development/compilers/go/1.14.nix
new file mode 100644
index 000000000000..560af19e2010
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/1.14.nix
@@ -0,0 +1,242 @@
+{ stdenv, fetchurl, tzdata, iana-etc, runCommand
+, perl, which, pkgconfig, patch, procps, pcre, cacert, Security, Foundation
+, mailcap, runtimeShell
+, buildPackages, pkgsTargetTarget
+}:
+
+let
+
+  inherit (stdenv.lib) optionals optionalString;
+
+  goBootstrap = runCommand "go-bootstrap" {} ''
+    mkdir $out
+    cp -rf ${buildPackages.go_bootstrap}/* $out/
+    chmod -R u+w $out
+    find $out -name "*.c" -delete
+    cp -rf $out/bin/* $out/share/go/bin/
+  '';
+
+  goarch = platform: {
+    "i686" = "386";
+    "x86_64" = "amd64";
+    "aarch64" = "arm64";
+    "arm" = "arm";
+    "armv5tel" = "arm";
+    "armv6l" = "arm";
+    "armv7l" = "arm";
+  }.${platform.parsed.cpu.name} or (throw "Unsupported system");
+
+in
+
+stdenv.mkDerivation rec {
+  pname = "go";
+  version = "1.14.3";
+
+  src = fetchurl {
+    url = "https://dl.google.com/go/go${version}.src.tar.gz";
+    sha256 = "0mmgf74snprdiajgh99jjliwjl5im71qcgm5qrxpnyfisiw3f0lk";
+  };
+
+  # perl is used for testing go vet
+  nativeBuildInputs = [ perl which pkgconfig patch procps ];
+  buildInputs = [ cacert pcre ]
+    ++ optionals stdenv.isLinux [ stdenv.cc.libc.out ]
+    ++ optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ];
+
+  depsTargetTargetPropagated = optionals stdenv.isDarwin [ Security Foundation ];
+
+  hardeningDisable = [ "all" ];
+
+  prePatch = ''
+    patchShebangs ./ # replace /bin/bash
+
+    # This source produces shell script at run time,
+    # and thus it is not corrected by patchShebangs.
+    substituteInPlace misc/cgo/testcarchive/carchive_test.go \
+      --replace '#!/usr/bin/env bash' '#!${runtimeShell}'
+
+    # Patch the mimetype database location which is missing on NixOS.
+    # but also allow static binaries built with NixOS to run outside nix
+    sed -i 's,\"/etc/mime.types,"${mailcap}/etc/mime.types\"\,\n\t&,' src/mime/type_unix.go
+
+    # Disabling the 'os/http/net' tests (they want files not available in
+    # chroot builds)
+    rm src/net/{listen,parse}_test.go
+    rm src/syscall/exec_linux_test.go
+
+    # !!! substituteInPlace does not seems to be effective.
+    # The os test wants to read files in an existing path. Just don't let it be /usr/bin.
+    sed -i 's,/usr/bin,'"`pwd`", src/os/os_test.go
+    sed -i 's,/bin/pwd,'"`type -P pwd`", src/os/os_test.go
+    # Disable the unix socket test
+    sed -i '/TestShutdownUnix/aif true \{ return\; \}' src/net/net_test.go
+    # Disable the hostname test
+    sed -i '/TestHostname/aif true \{ return\; \}' src/os/os_test.go
+    # ParseInLocation fails the test
+    sed -i '/TestParseInSydney/aif true \{ return\; \}' src/time/format_test.go
+    # Remove the api check as it never worked
+    sed -i '/src\/cmd\/api\/run.go/ireturn nil' src/cmd/dist/test.go
+    # Remove the coverage test as we have removed this utility
+    sed -i '/TestCoverageWithCgo/aif true \{ return\; \}' src/cmd/go/go_test.go
+    # Remove the timezone naming test
+    sed -i '/TestLoadFixed/aif true \{ return\; \}' src/time/time_test.go
+    # Remove disable setgid test
+    sed -i '/TestRespectSetgidDir/aif true \{ return\; \}' src/cmd/go/internal/work/build_test.go
+    # Remove cert tests that conflict with NixOS's cert resolution
+    sed -i '/TestEnvVars/aif true \{ return\; \}' src/crypto/x509/root_unix_test.go
+    # TestWritevError hangs sometimes
+    sed -i '/TestWritevError/aif true \{ return\; \}' src/net/writev_test.go
+    # TestVariousDeadlines fails sometimes
+    sed -i '/TestVariousDeadlines/aif true \{ return\; \}' src/net/timeout_test.go
+
+    sed -i 's,/etc/protocols,${iana-etc}/etc/protocols,' src/net/lookup_unix.go
+    sed -i 's,/etc/services,${iana-etc}/etc/services,' src/net/port_unix.go
+
+    # Disable cgo lookup tests not works, they depend on resolver
+    rm src/net/cgo_unix_test.go
+
+  '' + optionalString stdenv.isLinux ''
+    # prepend the nix path to the zoneinfo files but also leave the original value for static binaries
+    # that run outside a nix server
+    sed -i 's,\"/usr/share/zoneinfo/,"${tzdata}/share/zoneinfo/\"\,\n\t&,' src/time/zoneinfo_unix.go
+
+  '' + optionalString stdenv.isAarch32 ''
+    echo '#!${runtimeShell}' > misc/cgo/testplugin/test.bash
+  '' + optionalString stdenv.isDarwin ''
+    substituteInPlace src/race.bash --replace \
+      "sysctl machdep.cpu.extfeatures | grep -qv EM64T" true
+    sed -i 's,strings.Contains(.*sysctl.*,true {,' src/cmd/dist/util.go
+    sed -i 's,"/etc","'"$TMPDIR"'",' src/os/os_test.go
+    sed -i 's,/_go_os_test,'"$TMPDIR"'/_go_os_test,' src/os/path_test.go
+
+    sed -i '/TestChdirAndGetwd/aif true \{ return\; \}' src/os/os_test.go
+    sed -i '/TestCredentialNoSetGroups/aif true \{ return\; \}' src/os/exec/exec_posix_test.go
+    sed -i '/TestRead0/aif true \{ return\; \}' src/os/os_test.go
+    sed -i '/TestSystemRoots/aif true \{ return\; \}' src/crypto/x509/root_darwin_test.go
+
+    sed -i '/TestGoInstallRebuildsStalePackagesInOtherGOPATH/aif true \{ return\; \}' src/cmd/go/go_test.go
+    sed -i '/TestBuildDashIInstallsDependencies/aif true \{ return\; \}' src/cmd/go/go_test.go
+
+    sed -i '/TestDisasmExtld/aif true \{ return\; \}' src/cmd/objdump/objdump_test.go
+
+    sed -i 's/unrecognized/unknown/' src/cmd/link/internal/ld/lib.go
+
+    # TestCurrent fails because Current is not implemented on Darwin
+    sed -i 's/TestCurrent/testCurrent/g' src/os/user/user_test.go
+    sed -i 's/TestLookup/testLookup/g' src/os/user/user_test.go
+
+    touch $TMPDIR/group $TMPDIR/hosts $TMPDIR/passwd
+  '';
+
+  patches = [
+    ./remove-tools-1.11.patch
+    ./ssl-cert-file-1.13.patch
+    ./remove-test-pie-1.14.patch
+    ./creds-test.patch
+    ./go-1.9-skip-flaky-19608.patch
+    ./go-1.9-skip-flaky-20072.patch
+    ./skip-external-network-tests.patch
+    ./skip-nohup-tests.patch
+  ] ++ [
+    # breaks under load: https://github.com/golang/go/issues/25628
+    (if stdenv.isAarch32
+    then ./skip-test-extra-files-on-aarch32-1.14.patch
+    else ./skip-test-extra-files-on-386-1.14.patch)
+  ];
+
+  postPatch = ''
+    find . -name '*.orig' -exec rm {} ';'
+  '';
+
+  GOOS = stdenv.targetPlatform.parsed.kernel.name;
+  GOARCH = goarch stdenv.targetPlatform;
+  # GOHOSTOS/GOHOSTARCH must match the building system, not the host system.
+  # Go will nevertheless build a for host system that we will copy over in
+  # the install phase.
+  GOHOSTOS = stdenv.buildPlatform.parsed.kernel.name;
+  GOHOSTARCH = goarch stdenv.buildPlatform;
+
+  # {CC,CXX}_FOR_TARGET must be only set for cross compilation case as go expect those
+  # to be different from CC/CXX
+  CC_FOR_TARGET = if (stdenv.buildPlatform != stdenv.targetPlatform) then
+      "${pkgsTargetTarget.stdenv.cc}/bin/${pkgsTargetTarget.stdenv.cc.targetPrefix}cc"
+    else
+      null;
+  CXX_FOR_TARGET = if (stdenv.buildPlatform != stdenv.targetPlatform) then
+      "${pkgsTargetTarget.stdenv.cc}/bin/${pkgsTargetTarget.stdenv.cc.targetPrefix}c++"
+    else
+      null;
+
+  GOARM = toString (stdenv.lib.intersectLists [(stdenv.hostPlatform.parsed.cpu.version or "")] ["5" "6" "7"]);
+  GO386 = 387; # from Arch: don't assume sse2 on i686
+  CGO_ENABLED = 1;
+  # Hopefully avoids test timeouts on Hydra
+  GO_TEST_TIMEOUT_SCALE = 3;
+
+  # Indicate that we are running on build infrastructure
+  # Some tests assume things like home directories and users exists
+  GO_BUILDER_NAME = "nix";
+
+  GOROOT_BOOTSTRAP="${goBootstrap}/share/go";
+
+  postConfigure = ''
+    export GOCACHE=$TMPDIR/go-cache
+    # this is compiled into the binary
+    export GOROOT_FINAL=$out/share/go
+
+    export PATH=$(pwd)/bin:$PATH
+
+    # Independent from host/target, CC should produce code for the building system.
+    export CC=${buildPackages.stdenv.cc}/bin/cc
+    ulimit -a
+  '';
+
+  postBuild = ''
+    (cd src && ./make.bash)
+  '';
+
+  doCheck = stdenv.hostPlatform == stdenv.targetPlatform && !stdenv.isDarwin;
+
+  checkPhase = ''
+    runHook preCheck
+    (cd src && HOME=$TMPDIR GOCACHE=$TMPDIR/go-cache ./run.bash --no-rebuild)
+    runHook postCheck
+  '';
+
+  preInstall = ''
+    rm -r pkg/obj
+    # Contains the wrong perl shebang when cross compiling,
+    # since it is not used for anything we can deleted as well.
+    rm src/regexp/syntax/make_perl_groups.pl
+  '' + (if (stdenv.buildPlatform != stdenv.hostPlatform) then ''
+    mv bin/*_*/* bin
+    rmdir bin/*_*
+    ${optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) ''
+      rm -rf pkg/${GOHOSTOS}_${GOHOSTARCH} pkg/tool/${GOHOSTOS}_${GOHOSTARCH}
+    ''}
+  '' else if (stdenv.hostPlatform != stdenv.targetPlatform) then ''
+    rm -rf bin/*_*
+    ${optionalString (!(GOHOSTARCH == GOARCH && GOOS == GOHOSTOS)) ''
+      rm -rf pkg/${GOOS}_${GOARCH} pkg/tool/${GOOS}_${GOARCH}
+    ''}
+  '' else "");
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $GOROOT_FINAL
+    cp -a bin pkg src lib misc api doc $GOROOT_FINAL
+    ln -s $GOROOT_FINAL/bin $out/bin
+    runHook postInstall
+  '';
+
+  disallowedReferences = [ goBootstrap ];
+
+  meta = with stdenv.lib; {
+    branch = "1.14";
+    homepage = "http://golang.org/";
+    description = "The Go Programming language";
+    license = licenses.bsd3;
+    maintainers = teams.golang.members;
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/go/1.4.nix b/nixpkgs/pkgs/development/compilers/go/1.4.nix
new file mode 100644
index 000000000000..af125d60ed0a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/1.4.nix
@@ -0,0 +1,162 @@
+{ stdenv, lib, fetchurl, fetchpatch, tzdata, iana-etc, libcCross
+, pkgconfig
+, pcre
+, Security }:
+
+let
+  libc = if stdenv ? cross then libcCross else stdenv.cc.libc;
+in
+
+stdenv.mkDerivation rec {
+  pname = "go";
+  version = "1.4-bootstrap-20161024";
+  revision = "79d85a4965ea7c46db483314c3981751909d7883";
+
+  src = fetchurl {
+    url = "https://github.com/golang/go/archive/${revision}.tar.gz";
+    sha256 = "1ljbllwjysya323xxm9s792z8y9jdw19n8sj3mlc8picjclrx5xf";
+  };
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ pcre ];
+  depsTargetTargetPropagated = lib.optional stdenv.isDarwin Security;
+
+  hardeningDisable = [ "all" ];
+
+  # The tests try to do stuff with 127.0.0.1 and localhost
+  __darwinAllowLocalNetworking = true;
+
+  # I'm not sure what go wants from its 'src', but the go installation manual
+  # describes an installation keeping the src.
+  preUnpack = ''
+    mkdir -p $out/share
+    cd $out/share
+  '';
+
+  prePatch = ''
+    # Ensure that the source directory is named go
+    cd ..
+    if [ ! -d go ]; then
+      mv * go
+    fi
+
+    cd go
+    patchShebangs ./ # replace /bin/bash
+
+    # Disabling the 'os/http/net' tests (they want files not available in
+    # chroot builds)
+    rm src/net/{multicast_test.go,parse_test.go,port_test.go}
+    # !!! substituteInPlace does not seems to be effective.
+    # The os test wants to read files in an existing path. Just don't let it be /usr/bin.
+    sed -i 's,/usr/bin,'"`pwd`", src/os/os_test.go
+    sed -i 's,/bin/pwd,'"`type -P pwd`", src/os/os_test.go
+    # Disable the unix socket test
+    sed -i '/TestShutdownUnix/areturn' src/net/net_test.go
+    # Disable network timeout test
+    sed -i '/TestDialTimeout/areturn' src/net/dial_test.go
+    # Disable the hostname test
+    sed -i '/TestHostname/areturn' src/os/os_test.go
+    # ParseInLocation fails the test
+    sed -i '/TestParseInSydney/areturn' src/time/format_test.go
+
+    sed -i 's,/etc/protocols,${iana-etc}/etc/protocols,' src/net/lookup_unix.go
+  '' + lib.optionalString stdenv.isLinux ''
+    # prepend the nix path to the zoneinfo files but also leave the original value for static binaries
+    # that run outside a nix server
+    sed -i 's,\"/usr/share/zoneinfo/,"${tzdata}/share/zoneinfo/\"\,\n\t&,' src/time/zoneinfo_unix.go
+
+    # Find the loader dynamically
+    LOADER="$(find ${lib.getLib libc}/lib -name ld-linux\* | head -n 1)"
+
+    # Replace references to the loader
+    find src/cmd -name asm.c -exec sed -i "s,/lib/ld-linux.*\.so\.[0-9],$LOADER," {} \;
+  '' + lib.optionalString stdenv.isDarwin ''
+    sed -i 's,"/etc","'"$TMPDIR"'",' src/os/os_test.go
+    sed -i 's,/_go_os_test,'"$TMPDIR"'/_go_os_test,' src/os/path_test.go
+    sed -i '/TestCgoLookupIP/areturn' src/net/cgo_unix_test.go
+    sed -i '/TestChdirAndGetwd/areturn' src/os/os_test.go
+    sed -i '/TestDialDualStackLocalhost/areturn' src/net/dial_test.go
+    sed -i '/TestRead0/areturn' src/os/os_test.go
+    sed -i '/TestSystemRoots/areturn' src/crypto/x509/root_darwin_test.go
+
+    # fails when running inside tmux
+    sed -i '/TestNohup/areturn' src/os/signal/signal_test.go
+
+    # unix socket tests fail on darwin
+    sed -i '/TestConnAndListener/areturn' src/net/conn_test.go
+    sed -i '/TestPacketConn/areturn' src/net/conn_test.go
+    sed -i '/TestPacketConn/areturn' src/net/packetconn_test.go
+    sed -i '/TestConnAndPacketConn/areturn' src/net/packetconn_test.go
+    sed -i '/TestUnixListenerSpecificMethods/areturn' src/net/packetconn_test.go
+    sed -i '/TestUnixConnSpecificMethods/areturn' src/net/packetconn_test.go
+    sed -i '/TestUnixListenerSpecificMethods/areturn' src/net/protoconn_test.go
+    sed -i '/TestUnixConnSpecificMethods/areturn' src/net/protoconn_test.go
+    sed -i '/TestStreamConnServer/areturn' src/net/server_test.go
+    sed -i '/TestReadUnixgramWithUnnamedSocket/areturn' src/net/unix_test.go
+    sed -i '/TestReadUnixgramWithZeroBytesBuffer/areturn' src/net/unix_test.go
+    sed -i '/TestUnixgramWrite/areturn' src/net/unix_test.go
+    sed -i '/TestUnixConnLocalAndRemoteNames/areturn' src/net/unix_test.go
+    sed -i '/TestUnixgramConnLocalAndRemoteNames/areturn' src/net/unix_test.go
+    sed -i '/TestWithSimulated/areturn' src/log/syslog/syslog_test.go
+    sed -i '/TestFlap/areturn' src/log/syslog/syslog_test.go
+    sed -i '/TestNew/areturn' src/log/syslog/syslog_test.go
+    sed -i '/TestNewLogger/areturn' src/log/syslog/syslog_test.go
+    sed -i '/TestDial/areturn' src/log/syslog/syslog_test.go
+    sed -i '/TestWrite/areturn' src/log/syslog/syslog_test.go
+    sed -i '/TestConcurrentWrite/areturn' src/log/syslog/syslog_test.go
+    sed -i '/TestConcurrentReconnect/areturn' src/log/syslog/syslog_test.go
+
+    # remove IP resolving tests, on darwin they can find fe80::1%lo while expecting ::1
+    sed -i '/TestResolveIPAddr/areturn' src/net/ipraw_test.go
+    sed -i '/TestResolveTCPAddr/areturn' src/net/tcp_test.go
+    sed -i '/TestResolveUDPAddr/areturn' src/net/udp_test.go
+
+    sed -i '/TestCgoExternalThreadSIGPROF/areturn' src/runtime/crash_cgo_test.go
+
+    touch $TMPDIR/group $TMPDIR/hosts $TMPDIR/passwd
+  '';
+
+  patches = [
+    ./remove-tools-1.4.patch
+    ./creds-test-1.4.patch
+
+    # This test checks for the wrong thing with recent tzdata. It's been fixed in master but the patch
+    # actually works on old versions too.
+    (fetchpatch {
+      url    = "https://github.com/golang/go/commit/91563ced5897faf729a34be7081568efcfedda31.patch";
+      sha256 = "1ny5l3f8a9dpjjrnjnsplb66308a0x13sa0wwr4j6yrkc8j4qxqi";
+    })
+  ];
+
+  GOOS = if stdenv.isDarwin then "darwin" else "linux";
+  GOARCH = if stdenv.isDarwin then "amd64"
+           else if stdenv.hostPlatform.system == "i686-linux" then "386"
+           else if stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
+           else if stdenv.isAarch32 then "arm"
+           else throw "Unsupported system";
+  GOARM = stdenv.lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux") "5";
+  GO386 = 387; # from Arch: don't assume sse2 on i686
+  CGO_ENABLED = 0;
+
+  # The go build actually checks for CC=*/clang and does something different, so we don't
+  # just want the generic `cc` here.
+  CC = if stdenv.isDarwin then "clang" else "cc";
+
+  installPhase = ''
+    mkdir -p "$out/bin"
+    export GOROOT="$(pwd)/"
+    export GOBIN="$out/bin"
+    export PATH="$GOBIN:$PATH"
+    cd ./src
+    ./all.bash
+  '';
+
+  meta = with stdenv.lib; {
+    branch = "1.4";
+    homepage = "http://golang.org/";
+    description = "The Go Programming language";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ cstrahan ];
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/go/creds-test-1.4.patch b/nixpkgs/pkgs/development/compilers/go/creds-test-1.4.patch
new file mode 100644
index 000000000000..98cec532dcca
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/creds-test-1.4.patch
@@ -0,0 +1,17 @@
+diff --git a/go-go1.4.3/src/syscall/creds_test.go b/go-go1.4.3/src/syscall/creds_test.go
+index b1894c6..b2d6b4e 100644
+--- a/src/syscall/creds_test.go
++++ b/src/syscall/creds_test.go
+@@ -56,9 +56,10 @@ func TestSCMCredentials(t *testing.T) {
+ 		ucred.Gid = 0
+ 		oob := syscall.UnixCredentials(&ucred)
+ 		_, _, err := cli.(*net.UnixConn).WriteMsgUnix(nil, oob, nil)
+-		if err.(*net.OpError).Err != syscall.EPERM {
+-			t.Fatalf("WriteMsgUnix failed with %v, want EPERM", err)
++		if err.(*net.OpError).Err != syscall.EPERM && err.(*net.OpError).Err != syscall.EINVAL {
++			t.Fatalf("WriteMsgUnix failed with %v, want EPERM or EINVAL", err)
+ 		}
++
+ 	}
+
+ 	ucred.Pid = int32(os.Getpid())
diff --git a/nixpkgs/pkgs/development/compilers/go/creds-test.patch b/nixpkgs/pkgs/development/compilers/go/creds-test.patch
new file mode 100644
index 000000000000..6a18e6cc42e8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/creds-test.patch
@@ -0,0 +1,13 @@
+--- source.org/src/syscall/creds_test.go	1970-01-01 01:00:01.000000000 +0100
++++ source/src/syscall/creds_test.go	2018-02-22 10:43:47.223615358 +0000
+@@ -76,8 +76,8 @@
+ 			if sys, ok := err.(*os.SyscallError); ok {
+ 				err = sys.Err
+ 			}
+-			if err != syscall.EPERM {
+-				t.Fatalf("WriteMsgUnix failed with %v, want EPERM", err)
++			if err != syscall.EPERM && err != syscall.EINVAL {
++				t.Fatalf("WriteMsgUnix failed with %v, want EPERM or EINVAL", err)
+ 			}
+ 		}
+ 
diff --git a/nixpkgs/pkgs/development/compilers/go/go-1.9-skip-flaky-19608.patch b/nixpkgs/pkgs/development/compilers/go/go-1.9-skip-flaky-19608.patch
new file mode 100644
index 000000000000..a4d9f0674791
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/go-1.9-skip-flaky-19608.patch
@@ -0,0 +1,12 @@
+diff --git a/src/net/http/serve_test.go b/src/net/http/serve_test.go
+index 7137599..43cca2e 100644
+--- a/src/net/http/serve_test.go
++++ b/src/net/http/serve_test.go
+@@ -5361,6 +5361,7 @@ func testServerKeepAlivesEnabled(t *testing.T, h2 bool) {
+ // the server's doing its 1-byte background read between requests,
+ // waiting for the connection to maybe close.
+ func TestServerCancelsReadTimeoutWhenIdle(t *testing.T) {
++	testenv.SkipFlaky(t, 19608)
+ 	setParallel(t)
+ 	defer afterTest(t)
+ 	const timeout = 250 * time.Millisecond
diff --git a/nixpkgs/pkgs/development/compilers/go/go-1.9-skip-flaky-20072.patch b/nixpkgs/pkgs/development/compilers/go/go-1.9-skip-flaky-20072.patch
new file mode 100644
index 000000000000..13db40ababc3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/go-1.9-skip-flaky-20072.patch
@@ -0,0 +1,20 @@
+diff --git a/src/sync/waitgroup_test.go b/src/sync/waitgroup_test.go
+index e3e3096..f80d1e2 100644
+--- a/src/sync/waitgroup_test.go
++++ b/src/sync/waitgroup_test.go
+@@ -6,6 +6,7 @@ package sync_test
+ 
+ import (
+ 	"internal/race"
++	"internal/testenv"
+ 	"runtime"
+ 	. "sync"
+ 	"sync/atomic"
+@@ -73,6 +74,7 @@ func TestWaitGroupMisuse2(t *testing.T) {
+ 	if runtime.NumCPU() <= 4 {
+ 		t.Skip("NumCPU<=4, skipping: this test requires parallelism")
+ 	}
++	testenv.SkipFlaky(t, 20072)
+ 	defer func() {
+ 		err := recover()
+ 		if err != "sync: negative WaitGroup counter" &&
diff --git a/nixpkgs/pkgs/development/compilers/go/remove-test-pie-1.13.patch b/nixpkgs/pkgs/development/compilers/go/remove-test-pie-1.13.patch
new file mode 100644
index 000000000000..05f18b813f91
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/remove-test-pie-1.13.patch
@@ -0,0 +1,34 @@
+diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
+index f63c94697c..f02eff7064 100644
+--- a/src/cmd/dist/test.go
++++ b/src/cmd/dist/test.go
+@@ -574,29 +574,6 @@ func (t *tester) registerTests() {
+ 		})
+ 	}
+ 
+-	// Test internal linking of PIE binaries where it is supported.
+-	if goos == "linux" && (goarch == "amd64" || goarch == "arm64") {
+-		t.tests = append(t.tests, distTest{
+-			name:    "pie_internal",
+-			heading: "internal linking of -buildmode=pie",
+-			fn: func(dt *distTest) error {
+-				t.addCmd(dt, "src", t.goTest(), "reflect", "-buildmode=pie", "-ldflags=-linkmode=internal", t.timeout(60))
+-				return nil
+-			},
+-		})
+-		// Also test a cgo package.
+-		if t.cgoEnabled {
+-			t.tests = append(t.tests, distTest{
+-				name:    "pie_internal_cgo",
+-				heading: "internal linking of -buildmode=pie",
+-				fn: func(dt *distTest) error {
+-					t.addCmd(dt, "src", t.goTest(), "os/user", "-buildmode=pie", "-ldflags=-linkmode=internal", t.timeout(60))
+-					return nil
+-				},
+-			})
+-		}
+-	}
+-
+ 	// sync tests
+ 	if goos != "js" { // js doesn't support -cpu=10
+ 		t.tests = append(t.tests, distTest{
diff --git a/nixpkgs/pkgs/development/compilers/go/remove-test-pie-1.14.patch b/nixpkgs/pkgs/development/compilers/go/remove-test-pie-1.14.patch
new file mode 100644
index 000000000000..218fcd46d892
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/remove-test-pie-1.14.patch
@@ -0,0 +1,34 @@
+diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
+index 56bdfcac19..d7d67ab94d 100644
+--- a/src/cmd/dist/test.go
++++ b/src/cmd/dist/test.go
+@@ -580,29 +580,6 @@ func (t *tester) registerTests() {
+ 		})
+ 	}
+ 
+-	// Test internal linking of PIE binaries where it is supported.
+-	if goos == "linux" && (goarch == "amd64" || goarch == "arm64") {
+-		t.tests = append(t.tests, distTest{
+-			name:    "pie_internal",
+-			heading: "internal linking of -buildmode=pie",
+-			fn: func(dt *distTest) error {
+-				t.addCmd(dt, "src", t.goTest(), "reflect", "-buildmode=pie", "-ldflags=-linkmode=internal", t.timeout(60))
+-				return nil
+-			},
+-		})
+-		// Also test a cgo package.
+-		if t.cgoEnabled && t.internalLink() {
+-			t.tests = append(t.tests, distTest{
+-				name:    "pie_internal_cgo",
+-				heading: "internal linking of -buildmode=pie",
+-				fn: func(dt *distTest) error {
+-					t.addCmd(dt, "src", t.goTest(), "os/user", "-buildmode=pie", "-ldflags=-linkmode=internal", t.timeout(60))
+-					return nil
+-				},
+-			})
+-		}
+-	}
+-
+ 	// sync tests
+ 	if goos != "js" { // js doesn't support -cpu=10
+ 		t.tests = append(t.tests, distTest{
diff --git a/nixpkgs/pkgs/development/compilers/go/remove-tools-1.11.patch b/nixpkgs/pkgs/development/compilers/go/remove-tools-1.11.patch
new file mode 100644
index 000000000000..cff35999a832
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/remove-tools-1.11.patch
@@ -0,0 +1,35 @@
+diff --git a/src/go/build/build.go b/src/go/build/build.go
+index b68a712..b60bf19 100644
+--- a/src/go/build/build.go
++++ b/src/go/build/build.go
+@@ -1708,7 +1708,7 @@ func init() {
+ }
+ 
+ // ToolDir is the directory containing build tools.
+-var ToolDir = getToolDir()
++var ToolDir = runtime.GOTOOLDIR()
+ 
+ // IsLocalImport reports whether the import path is
+ // a local import path, like ".", "..", "./foo", or "../foo".
+diff --git a/src/runtime/extern.go b/src/runtime/extern.go
+index 7171b13..18a942c 100644
+--- a/src/runtime/extern.go
++++ b/src/runtime/extern.go
+@@ -229,6 +229,17 @@ func GOROOT() string {
+ 	return sys.DefaultGoroot
+ }
+ 
++// GOTOOLDIR returns the root of the Go tree.
++// It uses the GOTOOLDIR environment variable, if set,
++// or else the root used during the Go build.
++func GOTOOLDIR() string {
++	s := gogetenv("GOTOOLDIR")
++	if s != "" {
++		return s
++	}
++	return GOROOT() + "/pkg/tool/" + GOOS + "_" + GOARCH
++}
++
+ // Version returns the Go tree's version string.
+ // It is either the commit hash and date at the time of the build or,
+ // when possible, a release tag like "go1.3".
diff --git a/nixpkgs/pkgs/development/compilers/go/remove-tools-1.4.patch b/nixpkgs/pkgs/development/compilers/go/remove-tools-1.4.patch
new file mode 100644
index 000000000000..807ab8e089c1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/remove-tools-1.4.patch
@@ -0,0 +1,81 @@
+diff --git a/misc/makerelease/makerelease.go b/misc/makerelease/makerelease.go
+index 3b511b1..a46ebd8 100644
+--- a/misc/makerelease/makerelease.go
++++ b/misc/makerelease/makerelease.go
+@@ -65,9 +65,6 @@ const (
+ // These must be the command that cmd/go knows to install to $GOROOT/bin
+ // or $GOROOT/pkg/tool.
+ var toolPaths = []string{
+-	"golang.org/x/tools/cmd/cover",
+-	"golang.org/x/tools/cmd/godoc",
+-	"golang.org/x/tools/cmd/vet",
+ }
+ 
+ var preBuildCleanFiles = []string{
+diff --git a/src/cmd/dist/build.c b/src/cmd/dist/build.c
+index b6c61b4..2006bc2 100644
+--- a/src/cmd/dist/build.c
++++ b/src/cmd/dist/build.c
+@@ -210,7 +210,9 @@ init(void)
+ 	workdir = xworkdir();
+ 	xatexit(rmworkdir);
+ 
+-	bpathf(&b, "%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch);
++	xgetenv(&b, "GOTOOLDIR");
++	if (b.len == 0)
++		bpathf(&b, "%s/pkg/tool/%s_%s", goroot, gohostos, gohostarch);
+ 	tooldir = btake(&b);
+ 
+ 	bfree(&b);
+diff --git a/src/cmd/go/pkg.go b/src/cmd/go/pkg.go
+index b71feb7..8468ea8 100644
+--- a/src/cmd/go/pkg.go
++++ b/src/cmd/go/pkg.go
+@@ -401,9 +401,9 @@ var goTools = map[string]targetDir{
+ 	"cmd/pack":                             toTool,
+ 	"cmd/pprof":                            toTool,
+ 	"cmd/yacc":                             toTool,
+-	"golang.org/x/tools/cmd/cover":         toTool,
+-	"golang.org/x/tools/cmd/godoc":         toBin,
+-	"golang.org/x/tools/cmd/vet":           toTool,
++	"nixos.org/x/tools/cmd/cover":          toTool,
++	"nixos.org/x/tools/cmd/godoc":          toBin,
++	"nixos.org/x/tools/cmd/vet":            toTool,
+ 	"code.google.com/p/go.tools/cmd/cover": stalePath,
+ 	"code.google.com/p/go.tools/cmd/godoc": stalePath,
+ 	"code.google.com/p/go.tools/cmd/vet":   stalePath,
+diff --git a/src/go/build/build.go b/src/go/build/build.go
+index 311ecb0..f151d8f 100644
+--- a/src/go/build/build.go
++++ b/src/go/build/build.go
+@@ -1367,7 +1367,7 @@ func init() {
+ }
+ 
+ // ToolDir is the directory containing build tools.
+-var ToolDir = filepath.Join(runtime.GOROOT(), "pkg/tool/"+runtime.GOOS+"_"+runtime.GOARCH)
++var ToolDir = runtime.GOTOOLDIR()
+ 
+ // IsLocalImport reports whether the import path is
+ // a local import path, like ".", "..", "./foo", or "../foo".
+diff --git a/src/runtime/extern.go b/src/runtime/extern.go
+index 6cc5df8..9a9a964 100644
+--- a/src/runtime/extern.go
++++ b/src/runtime/extern.go
+@@ -152,6 +152,17 @@ func GOROOT() string {
+ 	return defaultGoroot
+ }
+ 
++// GOTOOLDIR returns the root of the Go tree.
++// It uses the GOTOOLDIR environment variable, if set,
++// or else the root used during the Go build.
++func GOTOOLDIR() string {
++	s := gogetenv("GOTOOLDIR")
++	if s != "" {
++		return s
++	}
++	return GOROOT() + "/pkg/tool/" + GOOS + "_" + GOARCH
++}
++
+ // Version returns the Go tree's version string.
+ // It is either the commit hash and date at the time of the build or,
+ // when possible, a release tag like "go1.3".
diff --git a/nixpkgs/pkgs/development/compilers/go/skip-external-network-tests.patch b/nixpkgs/pkgs/development/compilers/go/skip-external-network-tests.patch
new file mode 100644
index 000000000000..5791b213cb59
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/skip-external-network-tests.patch
@@ -0,0 +1,26 @@
+diff --git a/src/cmd/go/go_test.go b/src/cmd/go/go_test.go
+index 85cae90..94b4edd 100644
+--- a/src/cmd/go/go_test.go
++++ b/src/cmd/go/go_test.go
+@@ -4946,6 +4946,8 @@ func TestBuildmodePIE(t *testing.T) {
+ }
+ 
+ func TestExecBuildX(t *testing.T) {
++	t.Skipf("skipping, test requires networking")
++
+ 	tooSlow(t)
+ 	if !canCgo {
+ 		t.Skip("skipping because cgo not enabled")
+diff --git a/src/net/dial_test.go b/src/net/dial_test.go
+index 00a84d1..27f9ec9 100644
+--- a/src/net/dial_test.go
++++ b/src/net/dial_test.go
+@@ -968,6 +968,8 @@ func TestDialerControl(t *testing.T) {
+ // mustHaveExternalNetwork is like testenv.MustHaveExternalNetwork
+ // except that it won't skip testing on non-iOS builders.
+ func mustHaveExternalNetwork(t *testing.T) {
++	t.Skipf("Nix sandbox does not have networking")
++
+ 	t.Helper()
+ 	ios := runtime.GOOS == "darwin" && (runtime.GOARCH == "arm" || runtime.GOARCH == "arm64")
+ 	if testenv.Builder() == "" || ios {
diff --git a/nixpkgs/pkgs/development/compilers/go/skip-nohup-tests.patch b/nixpkgs/pkgs/development/compilers/go/skip-nohup-tests.patch
new file mode 100644
index 000000000000..1da07407d049
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/skip-nohup-tests.patch
@@ -0,0 +1,22 @@
+diff --git a/src/os/signal/signal_test.go b/src/os/signal/signal_test.go
+index 3d79c7a..6e0f7b4 100644
+--- a/src/os/signal/signal_test.go
++++ b/src/os/signal/signal_test.go
+@@ -217,6 +217,8 @@ var checkSighupIgnored = flag.Bool("check_sighup_ignored", false, "if true, Test
+ 
+ // Test that Ignored(SIGHUP) correctly detects whether it is being run under nohup.
+ func TestDetectNohup(t *testing.T) {
++	t.Skip("Fails in nix build environment")
++
+ 	if *checkSighupIgnored {
+ 		if !Ignored(syscall.SIGHUP) {
+ 			t.Fatal("SIGHUP is not ignored.")
+@@ -306,6 +308,8 @@ func TestStop(t *testing.T) {
+ // Test that when run under nohup, an uncaught SIGHUP does not kill the program,
+ // but a
+ func TestNohup(t *testing.T) {
++	t.Skip("Fails in nix build environment")
++
+ 	// Ugly: ask for SIGHUP so that child will not have no-hup set
+ 	// even if test is running under nohup environment.
+ 	// We have no intention of reading from c.
diff --git a/nixpkgs/pkgs/development/compilers/go/skip-test-extra-files-on-386-1.14.patch b/nixpkgs/pkgs/development/compilers/go/skip-test-extra-files-on-386-1.14.patch
new file mode 100644
index 000000000000..ab681826499a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/skip-test-extra-files-on-386-1.14.patch
@@ -0,0 +1,15 @@
+diff --git a/src/os/exec/exec_test.go b/src/os/exec/exec_test.go
+index dce66c5c2e..2532224376 100644
+--- a/src/os/exec/exec_test.go
++++ b/src/os/exec/exec_test.go
+@@ -627,6 +627,10 @@ func TestExtraFiles(t *testing.T) {
+ 		t.Skipf("skipping test on %q", runtime.GOOS)
+ 	}
+ 
++	if runtime.GOOS == "linux" && runtime.GOARCH  == "386" {
++		t.Skipf("skipping test on %q %q", runtime.GOARCH, runtime.GOOS)
++	}
++
+ 	// Force network usage, to verify the epoll (or whatever) fd
+ 	// doesn't leak to the child,
+ 	ln, err := net.Listen("tcp", "127.0.0.1:0")
diff --git a/nixpkgs/pkgs/development/compilers/go/skip-test-extra-files-on-386.patch b/nixpkgs/pkgs/development/compilers/go/skip-test-extra-files-on-386.patch
new file mode 100644
index 000000000000..afe5aea3d916
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/skip-test-extra-files-on-386.patch
@@ -0,0 +1,15 @@
+diff --git a/src/os/exec/exec_test.go b/src/os/exec/exec_test.go
+index 558345ff63..22129bf022 100644
+--- a/src/os/exec/exec_test.go
++++ b/src/os/exec/exec_test.go
+@@ -593,6 +593,10 @@ func TestExtraFiles(t *testing.T) {
+ 		t.Skipf("skipping test on %q", runtime.GOOS)
+ 	}
+ 
++	if runtime.GOOS == "linux" && runtime.GOARCH  == "386" {
++		t.Skipf("skipping test on %q %q", runtime.GOARCH, runtime.GOOS)
++	}
++
+ 	// Ensure that file descriptors have not already been leaked into
+ 	// our environment.
+ 	if !testedAlreadyLeaked {
diff --git a/nixpkgs/pkgs/development/compilers/go/skip-test-extra-files-on-aarch32-1.14.patch b/nixpkgs/pkgs/development/compilers/go/skip-test-extra-files-on-aarch32-1.14.patch
new file mode 100644
index 000000000000..5251882fce83
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/skip-test-extra-files-on-aarch32-1.14.patch
@@ -0,0 +1,15 @@
+diff --git a/src/os/exec/exec_test.go b/src/os/exec/exec_test.go
+index dce66c5c2e..2532224376 100644
+--- a/src/os/exec/exec_test.go
++++ b/src/os/exec/exec_test.go
+@@ -627,6 +627,10 @@ func TestExtraFiles(t *testing.T) {
+ 		t.Skipf("skipping test on %q", runtime.GOOS)
+ 	}
+ 
++	if runtime.GOOS == "linux" && runtime.GOARCH  == "arm" {
++		t.Skipf("skipping test on %q %q", runtime.GOARCH, runtime.GOOS)
++	}
++
+ 	// Force network usage, to verify the epoll (or whatever) fd
+ 	// doesn't leak to the child,
+ 	ln, err := net.Listen("tcp", "127.0.0.1:0")
diff --git a/nixpkgs/pkgs/development/compilers/go/skip-test-extra-files-on-aarch32.patch b/nixpkgs/pkgs/development/compilers/go/skip-test-extra-files-on-aarch32.patch
new file mode 100644
index 000000000000..f3566b3ddaa2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/skip-test-extra-files-on-aarch32.patch
@@ -0,0 +1,15 @@
+diff --git a/src/os/exec/exec_test.go b/src/os/exec/exec_test.go
+index 558345ff63..22129bf022 100644
+--- a/src/os/exec/exec_test.go
++++ b/src/os/exec/exec_test.go
+@@ -593,6 +593,10 @@ func TestExtraFiles(t *testing.T) {
+ 		t.Skipf("skipping test on %q", runtime.GOOS)
+ 	}
+ 
++	if runtime.GOOS == "linux" && runtime.GOARCH  == "arm" {
++		t.Skipf("skipping test on %q %q", runtime.GOARCH, runtime.GOOS)
++	}
++
+ 	// Ensure that file descriptors have not already been leaked into
+ 	// our environment.
+ 	if !testedAlreadyLeaked {
diff --git a/nixpkgs/pkgs/development/compilers/go/ssl-cert-file-1.13.patch b/nixpkgs/pkgs/development/compilers/go/ssl-cert-file-1.13.patch
new file mode 100644
index 000000000000..02a50d9c72f3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/go/ssl-cert-file-1.13.patch
@@ -0,0 +1,64 @@
+diff --git a/src/crypto/x509/root_cgo_darwin.go b/src/crypto/x509/root_cgo_darwin.go
+index 255a8d3525..a467255a54 100644
+--- a/src/crypto/x509/root_cgo_darwin.go
++++ b/src/crypto/x509/root_cgo_darwin.go
+@@ -280,6 +280,8 @@ int CopyPEMRoots(CFDataRef *pemRoots, CFDataRef *untrustedPemRoots, bool debugDa
+ import "C"
+ import (
+ 	"errors"
++	"io/ioutil"
++	"os"
+ 	"unsafe"
+ )
+ 
+@@ -295,6 +297,13 @@ func loadSystemRoots() (*CertPool, error) {
+ 	buf := C.GoBytes(unsafe.Pointer(C.CFDataGetBytePtr(data)), C.int(C.CFDataGetLength(data)))
+ 	roots := NewCertPool()
+ 	roots.AppendCertsFromPEM(buf)
++	if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" {
++		data, err := ioutil.ReadFile(file)
++		if err == nil {
++			roots.AppendCertsFromPEM(data)
++			return roots, nil
++		}
++	}
+ 
+ 	if C.CFDataGetLength(untrustedData) == 0 {
+ 		return roots, nil
+diff --git a/src/crypto/x509/root_darwin.go b/src/crypto/x509/root_darwin.go
+index 2f6a8b8d60..b81889fe69 100644
+--- a/src/crypto/x509/root_darwin.go
++++ b/src/crypto/x509/root_darwin.go
+@@ -92,6 +92,14 @@ func execSecurityRoots() (*CertPool, error) {
+ 		verifyCh    = make(chan rootCandidate)
+ 	)
+ 
++	if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" {
++		data, err := ioutil.ReadFile(file)
++		if err == nil {
++			roots.AppendCertsFromPEM(data)
++			return roots, nil
++		}
++	}
++
+ 	// Using 4 goroutines to pipe into verify-cert seems to be
+ 	// about the best we can do. The verify-cert binary seems to
+ 	// just RPC to another server with coarse locking anyway, so
+diff --git a/src/crypto/x509/root_unix.go b/src/crypto/x509/root_unix.go
+index 48de50b4ea..750e12c6b4 100644
+--- a/src/crypto/x509/root_unix.go
++++ b/src/crypto/x509/root_unix.go
+@@ -38,6 +38,13 @@ func (c *Certificate) systemVerify(opts *VerifyOptions) (chains [][]*Certificate
+ 
+ func loadSystemRoots() (*CertPool, error) {
+ 	roots := NewCertPool()
++	if file := os.Getenv("NIX_SSL_CERT_FILE"); file != "" {
++		data, err := ioutil.ReadFile(file)
++		if err == nil {
++			roots.AppendCertsFromPEM(data)
++			return roots, nil
++		}
++	}
+ 
+ 	files := certFiles
+ 	if f := os.Getenv(certFileEnv); f != "" {
diff --git a/nixpkgs/pkgs/development/compilers/gprolog/default.nix b/nixpkgs/pkgs/development/compilers/gprolog/default.nix
new file mode 100644
index 000000000000..0a1cc5128734
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gprolog/default.nix
@@ -0,0 +1,68 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "gprolog-1.4.5";
+
+  src = fetchurl {
+    urls = [
+      "mirror://gnu/gprolog/${name}.tar.gz"
+      "http://www.gprolog.org/${name}.tar.gz"
+    ];
+    sha256 = "0z4cc42n3k6i35b8mr816iwsvrpxshw6d7dgz6s2h1hy0l7g1p5z";
+  };
+
+  hardeningDisable = stdenv.lib.optional stdenv.isi686 "pic";
+
+  patchPhase = ''
+    sed -i -e "s|/tmp/make.log|$TMPDIR/make.log|g" src/Pl2Wam/check_boot
+  '';
+
+  preConfigure = ''
+    cd src
+    configureFlagsArray=(
+      "--with-install-dir=$out"
+      "--without-links-dir"
+      "--with-examples-dir=$out/share/${name}/examples"
+      "--with-doc-dir=$out/share/${name}/doc"
+    )
+  '';
+
+  postInstall = ''
+    mv -v $out/[A-Z]* $out/gprolog.ico $out/share/${name}/
+  '';
+
+  doCheck = true;
+
+  meta = {
+    homepage = "https://www.gnu.org/software/gprolog/";
+    description = "GNU Prolog, a free Prolog compiler with constraint solving over finite domains";
+    license = stdenv.lib.licenses.lgpl3Plus;
+
+    longDescription = ''
+      GNU Prolog is a free Prolog compiler with constraint solving
+      over finite domains developed by Daniel Diaz.
+
+      GNU Prolog accepts Prolog+constraint programs and produces
+      native binaries (like gcc does from a C source).  The obtained
+      executable is then stand-alone.  The size of this executable can
+      be quite small since GNU Prolog can avoid to link the code of
+      most unused built-in predicates.  The performances of GNU Prolog
+      are very encouraging (comparable to commercial systems).
+
+      Beside the native-code compilation, GNU Prolog offers a
+      classical interactive interpreter (top-level) with a debugger.
+
+      The Prolog part conforms to the ISO standard for Prolog with
+      many extensions very useful in practice (global variables, OS
+      interface, sockets,...).
+
+      GNU Prolog also includes an efficient constraint solver over
+      Finite Domains (FD).  This opens contraint logic programming to
+      the user combining the power of constraint programming to the
+      declarativity of logic programming.
+    '';
+
+    maintainers = [ stdenv.lib.maintainers.peti ];
+    platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/001_mx.py.patch b/nixpkgs/pkgs/development/compilers/graalvm/001_mx.py.patch
new file mode 100644
index 000000000000..0477c6c556f1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/graalvm/001_mx.py.patch
@@ -0,0 +1,291 @@
+diff --git a/mx.py b/mx.py
+index a0b9315..b7d67a0 100755
+--- a/mx.py
++++ b/mx.py
+@@ -238,21 +238,7 @@ def _check_file_with_sha1(path, sha1, sha1path, mustExist=True, newFile=False, l
+             f.write(value or sha1OfFile(path))
+ 
+     if exists(path):
+-        if sha1Check and sha1:
+-            if not _sha1CachedValid() or (newFile and sha1 != _sha1Cached()):
+-                logv('Create/update SHA1 cache file ' + sha1path)
+-                _writeSha1Cached()
+-
+-            if sha1 != _sha1Cached():
+-                computedSha1 = sha1OfFile(path)
+-                if sha1 == computedSha1:
+-                    warn('Fixing corrupt SHA1 cache file ' + sha1path)
+-                    _writeSha1Cached(computedSha1)
+-                    return True
+-                if logErrors:
+-                    size = os.path.getsize(path)
+-                    log_error('SHA1 of {} [size: {}] ({}) does not match expected value ({})'.format(TimeStampFile(path), size, computedSha1, sha1))
+-                return False
++        return True
+     elif mustExist:
+         if logErrors:
+             log_error("'{}' does not exist".format(path))
+@@ -1057,46 +1043,8 @@ class SuiteImport:
+         version = import_dict.get("version")
+         suite_dir = None
+         version_from = import_dict.get("versionFrom")
+-        if version_from and version:
+-            abort("In import for '{}': 'version' and 'versionFrom' can not be both set".format(name), context=context)
+-        if version is None and version_from is None:
+-            if not (in_subdir and (importer.vc_dir != importer.dir or isinstance(importer, BinarySuite))):
+-                abort("In import for '{}': No version given and not a 'subdir' suite of the same repository".format(name), context=context)
+-            if importer.isSourceSuite():
+-                suite_dir = join(importer.vc_dir, name)
+-            version = importer.version()
+-        if urls is None:
+-            if not in_subdir:
+-                if import_dict.get("subdir") is None and importer.vc_dir != importer.dir:
+-                    warn("In import for '{}': No urls given but 'subdir' is not set, assuming 'subdir=True'".format(name), context)
+-                    in_subdir = True
+-                else:
+-                    abort("In import for '{}': No urls given and not a 'subdir' suite".format(name), context=context)
+-            return SuiteImport(name, version, None, None, dynamicImport=dynamicImport, in_subdir=in_subdir, version_from=version_from, suite_dir=suite_dir)
+-        # urls a list of alternatives defined as dicts
+-        if not isinstance(urls, list):
+-            abort('suite import urls must be a list', context=context)
+-        urlinfos = []
+-        mainKind = None
+-        for urlinfo in urls:
+-            if isinstance(urlinfo, dict) and urlinfo.get('url') and urlinfo.get('kind'):
+-                kind = urlinfo.get('kind')
+-                if not VC.is_valid_kind(kind):
+-                    abort('suite import kind ' + kind + ' illegal', context=context)
+-            else:
+-                abort('suite import url must be a dict with {"url", kind", attributes', context=context)
+-            vc = vc_system(kind)
+-            if kind != 'binary':
+-                assert not mainKind or mainKind == kind, "Only expecting one non-binary kind"
+-                mainKind = kind
+-            url = mx_urlrewrites.rewriteurl(urlinfo.get('url'))
+-            urlinfos.append(SuiteImportURLInfo(url, kind, vc))
+-        vc_kind = None
+-        if mainKind:
+-            vc_kind = mainKind
+-        elif urlinfos:
+-            vc_kind = 'binary'
+-        return SuiteImport(name, version, urlinfos, vc_kind, dynamicImport=dynamicImport, in_subdir=in_subdir, version_from=version_from, suite_dir=suite_dir)
++        suite_dir = join(get_env('MX_GIT_CACHE_DIR'), name)
++        return SuiteImport(name, version, [], None, True, in_subdir=in_subdir, version_from=version_from, suite_dir=suite_dir)
+ 
+     @staticmethod
+     def get_source_urls(source, kind=None):
+@@ -1467,8 +1415,6 @@ class Suite(object):
+     :type dists: list[Distribution]
+     """
+     def __init__(self, mxDir, primary, internal, importing_suite, load, vc, vc_dir, dynamicallyImported=False):
+-        if primary is True and vc_dir is None:
+-            abort("The primary suite must be in a vcs repository")
+         self.imported_by = [] if primary else [importing_suite]
+         self.mxDir = mxDir
+         self.dir = dirname(mxDir)
+@@ -1496,7 +1442,7 @@ class Suite(object):
+         self._outputRoot = None
+         self._preloaded_suite_dict = None
+         self.vc = vc
+-        self.vc_dir = vc_dir
++        self.vc_dir = get_env('MX_GIT_CACHE_DIR')
+         self._preload_suite_dict()
+         self._init_imports()
+         if load:
+@@ -2405,7 +2351,9 @@ class Repository(SuiteConstituent):
+ class SourceSuite(Suite):
+     """A source suite"""
+     def __init__(self, mxDir, primary=False, load=True, internal=False, importing_suite=None, dynamicallyImported=False):
+-        vc, vc_dir = VC.get_vc_root(dirname(mxDir), abortOnError=False)
++        vc, vc_dir_test = VC.get_vc_root(dirname(mxDir), abortOnError=False)
++        vc_dir = get_env('MX_GIT_CACHE_DIR')
++        warn("LOOKING FOR: " + mxDir)
+         Suite.__init__(self, mxDir, primary, internal, importing_suite, load, vc, vc_dir, dynamicallyImported=dynamicallyImported)
+         logvv("SourceSuite.__init__({}), got vc={}, vc_dir={}".format(mxDir, self.vc, self.vc_dir))
+         self.projects = []
+@@ -2454,17 +2402,7 @@ class SourceSuite(Suite):
+         """
+         Gets the release tag from VC or create a time based once if VC is unavailable
+         """
+-        if snapshotSuffix not in self._releaseVersion:
+-            _version = self._get_early_suite_dict_property('version')
+-            if _version and self.getMxCompatibility().addVersionSuffixToExplicitVersion():
+-                if not self.is_release():
+-                    _version = _version + '-' + snapshotSuffix
+-            if not _version:
+-                _version = self.vc.release_version_from_tags(self.vc_dir, self.name, snapshotSuffix=snapshotSuffix)
+-            if not _version:
+-                _version = 'unknown-{0}-{1}'.format(platform.node(), time.strftime('%Y-%m-%d_%H-%M-%S_%Z'))
+-            self._releaseVersion[snapshotSuffix] = _version
+-        return self._releaseVersion[snapshotSuffix]
++        return get_env('version')
+ 
+     def scm_metadata(self, abortOnError=False):
+         scm = self.scm
+@@ -2993,12 +2931,35 @@ def _find_suite_import(importing_suite, suite_import, fatalIfMissing=True, load=
+         Attempts to locate an existing suite in the local context
+         Returns the path to the mx.name dir if found else None
+         """
+-        if mode == 'binary':
+-            # binary suites are always stored relative to the importing suite in mx-private directory
+-            return importing_suite._find_binary_suite_dir(suite_import.name)
++        warn("FAKE CLONE: " + str(suite_import))
++        if (suite_import.name == "truffle"):
++            return join(get_env('TMP'), "source", "truffle", "mx.truffle")
++        if (suite_import.name == "graal-nodejs"):
++            return join(get_env('MX_GIT_CACHE_DIR'), "graaljs", "graal-nodejs", "mx.graal-nodejs")
++        if (suite_import.name == "truffleruby"):
++            return join(get_env('MX_GIT_CACHE_DIR'), "truffleruby", "mx.truffleruby")
++        if (suite_import.name == "graalpython"):
++            return join(get_env('MX_GIT_CACHE_DIR'), "graalpython", "mx.graalpython")
++        if (suite_import.name == "vm"):
++            return join(get_env('TMP'), "source", "vm", "mx.vm")
++        if (suite_import.name == "fastr"):
++            return join(get_env('MX_GIT_CACHE_DIR'), "fastr", "mx.fastr")
++        if (suite_import.name == "sdk"):
++            return join(get_env('TMP'), "source", "sdk", "mx.sdk")
++        if (suite_import.name == "graal-js"):
++            return join(get_env('MX_GIT_CACHE_DIR'), "graaljs", "graal-js", "mx.graal-js")
++        if (suite_import.name == "regex"):
++            return join(get_env('TMP'), "source", "regex", "mx.regex")
++        if (suite_import.name == "substratevm"):
++            return join(get_env('TMP'), "source", "substratevm", "mx.substratevm")
++        if (suite_import.name == "tools"):
++            return join(get_env('TMP'), "source", "tools", "mx.tools")
++        if (suite_import.name == "sulong"):
++            return join(get_env('TMP'), "source", "sulong", "mx.sulong")
++        if (suite_import.name == "compiler"):
++            return join(get_env('TMP'), "source", "compiler", "mx.compiler")
+         else:
+-            # use the SuiteModel to locate a local source copy of the suite
+-            return _suitemodel.find_suite_dir(suite_import)
++            return join(get_env('MX_GIT_CACHE_DIR'), suite_import.name)
+ 
+     def _get_import_dir(url, mode):
+         """Return directory where the suite will be cloned to"""
+@@ -3816,7 +3777,7 @@ def getmtime(name):
+     """
+     Wrapper for builtin open function that handles long path names on Windows.
+     """
+-    return os.path.getmtime(_safe_path(name))
++    return 315532800
+ 
+ 
+ def stat(name):
+@@ -4062,57 +4023,8 @@ def _attempt_download(url, path, jarEntryName=None):
+     return False
+ 
+ def download(path, urls, verbose=False, abortOnError=True, verifyOnly=False):
+-    """
+-    Attempts to downloads content for each URL in a list, stopping after the first successful download.
+-    If the content cannot be retrieved from any URL, the program is aborted, unless abortOnError=False.
+-    The downloaded content is written to the file indicated by `path`.
+-    """
+-    if not verifyOnly:
+-        ensure_dirname_exists(path)
+-        assert not path.endswith(os.sep)
+-
+-    # https://docs.oracle.com/javase/7/docs/api/java/net/JarURLConnection.html
+-    jarURLPattern = re.compile('jar:(.*)!/(.*)')
+-    verify_errors = {}
+-    for url in urls:
+-        if not verifyOnly or verbose:
+-            log('Downloading ' + url + ' to ' + path)
+-        m = jarURLPattern.match(url)
+-        jarEntryName = None
+-        if m:
+-            url = m.group(1)
+-            jarEntryName = m.group(2)
+-
+-        if not _opts.trust_http and (url.lower().startswith('http://') or url.lower().startswith('ftp://')):
+-            warn('Downloading from non-https URL {}. Use --trust-http mx option to suppress this warning.'.format(url))
+-
+-        if verifyOnly:
+-            try:
+-                conn = _urlopen(url, timeout=10)
+-                conn.close()
+-            except (IOError, socket.timeout) as e:
+-                _suggest_tlsv1_error(e)
+-                verify_errors[url] = e
+-        else:
+-            for i in range(4):
+-                if i != 0:
+-                    time.sleep(1)
+-                    warn('Retry {} to download from {}'.format(i, url))
+-                if _attempt_download(url, path, jarEntryName):
+-                    return True # Download was successful
+-
+-    if verifyOnly and len(verify_errors) < len(urls): # verify-mode at least one success -> success
+-        return True
+-    else: # Either verification error or no download was successful
+-        msg = 'Could not download to ' + path + ' from any of the following URLs: ' + ', '.join(urls)
+-        if verifyOnly: # verify-mode -> print error details
+-            for url, e in verify_errors.items():
+-                msg += '\n  ' + url + ': ' + str(e)
+-        if abortOnError:
+-            abort(msg)
+-        else:
+-            warn(msg)
+-            return False
++    print("FAKE download(path={} urls={} verbose={} abortOnError={} verifyOnly={})".format(path, urls, verbose, abortOnError, verifyOnly))
++    return True
+ 
+ def update_file(path, content, showDiff=False):
+     """
+@@ -7887,30 +7799,6 @@ class PackedResourceLibrary(ResourceLibrary):
+ 
+     def get_path(self, resolve):
+         extract_path = _make_absolute(self.extract_path, self.suite.dir)
+-        download_path = super(PackedResourceLibrary, self).get_path(resolve)
+-        if resolve and self._check_extract_needed(extract_path, download_path):
+-            extract_path_tmp = tempfile.mkdtemp(suffix=basename(extract_path), dir=dirname(extract_path))
+-            try:
+-                # extract archive
+-                Extractor.create(download_path).extract(extract_path_tmp)
+-                # ensure modification time is up to date
+-                os.utime(extract_path_tmp, None)
+-                logv("Moving temporary directory {} to {}".format(extract_path_tmp, extract_path))
+-                try:
+-                    # attempt atomic overwrite
+-                    os.rename(extract_path_tmp, extract_path)
+-                except OSError:
+-                    # clean destination & re-try for cases where atomic overwrite doesn't work
+-                    rmtree(extract_path, ignore_errors=True)
+-                    os.rename(extract_path_tmp, extract_path)
+-            except OSError as ose:
+-                # Rename failed. Race with other process?
+-                if self._check_extract_needed(extract_path, download_path):
+-                    # ok something really went wrong
+-                    abort("Extracting {} failed!".format(download_path), context=ose)
+-            finally:
+-                rmtree(extract_path_tmp, ignore_errors=True)
+-
+         return extract_path
+ 
+     def _check_download_needed(self):
+@@ -8430,7 +8318,7 @@ class VC(_with_metaclass(ABCMeta, object)):
+         :param str branch: a branch name
+         :param bool abortOnError: if True abort on error
+         """
+-        abort(self.kind + " update_to_branch is not implemented")
++        self.run(['hg', vcdir] + cmd)
+ 
+     def is_release_from_tags(self, vcdir, prefix):
+         """
+@@ -8831,7 +8719,7 @@ class HgConfig(VC):
+                 return None
+ 
+     def parent_info(self, vcdir, abortOnError=True):
+-        out = self.hg_command(vcdir, ["log", "-r", ".", "--template", "{author}|||{date|hgdate}"], abortOnError=abortOnError)
++        out = _check_output_str(["hg", '-R', vcdir, "log", "-r", ".", "--template", "{author}|||{date|hgdate}"])
+         author, date = out.split("|||")
+         ts, _ = date.split(" ")
+         return self._sanitize_parent_info({
+@@ -14069,6 +13957,7 @@ class Archiver(SafeFileCreation):
+ 
+     def _add_zip(self, filename, archive_name, provenance):
+         self._add_provenance(archive_name, provenance)
++        os.utime(filename, (315532800, 315532800))
+         self.zf.write(filename, archive_name)
+ 
+     def _add_str_zip(self, data, archive_name, provenance):
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/002_setjmp.c.patch b/nixpkgs/pkgs/development/compilers/graalvm/002_setjmp.c.patch
new file mode 100644
index 000000000000..38a29fd8fbfd
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/graalvm/002_setjmp.c.patch
@@ -0,0 +1,16 @@
+diff --git a/sulong/projects/com.oracle.truffle.llvm.libraries.bitcode/src/setjmp.c b/sulong/projects/com.oracle.truffle.llvm.libraries.bitcode/src/setjmp.c
+index 16b869354d8..3691739d13b 100644
+--- a/sulong/projects/com.oracle.truffle.llvm.libraries.bitcode/src/setjmp.c
++++ b/sulong/projects/com.oracle.truffle.llvm.libraries.bitcode/src/setjmp.c
+@@ -41,11 +41,3 @@ int sigsetjmp(sigjmp_buf env, int savesigs) {
+   WARN_UNSUPPORTED(sigsetjmp);
+   return 0;
+ }
+-
+-void longjmp(jmp_buf env, int val) {
+-  ERR_UNSUPPORTED(longjmp);
+-}
+-
+-void siglongjmp(sigjmp_buf env, int val) {
+-  ERR_UNSUPPORTED(siglongjmp);
+-}
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/003_mx_truffle.py.patch b/nixpkgs/pkgs/development/compilers/graalvm/003_mx_truffle.py.patch
new file mode 100644
index 000000000000..bb9a00687124
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/graalvm/003_mx_truffle.py.patch
@@ -0,0 +1,12 @@
+diff --git a/truffle/mx.truffle/mx_truffle.py b/truffle/mx.truffle/mx_truffle.py
+index 8889c5ad810..add211a45c5 100644
+--- a/truffle/mx.truffle/mx_truffle.py
++++ b/truffle/mx.truffle/mx_truffle.py
+@@ -695,6 +695,7 @@ class LibffiBuildTask(mx.AbstractNativeBuildTask):
+                      os.path.relpath(self.subject.delegate.dir, self.subject.suite.vc_dir)]
+         for patch in self.subject.patches:
+             mx.run(git_apply + [patch], cwd=self.subject.suite.vc_dir)
++        mx.run(['cp', os.path.join(os.getenv('TMP'), 'truffle.make'), os.path.join(self.subject.delegate.dir, 'Makefile')])
+ 
+         self.delegate.logBuild()
+         self.delegate.build()
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/004_mx_jvmci.py.patch b/nixpkgs/pkgs/development/compilers/graalvm/004_mx_jvmci.py.patch
new file mode 100644
index 000000000000..0aa1bc9b88dd
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/graalvm/004_mx_jvmci.py.patch
@@ -0,0 +1,12 @@
+diff --git a/mx.jvmci/mx_jvmci.py b/mx.jvmci/mx_jvmci.py
+index 491fc19ab9..b4ddc03abb 100644
+--- a/mx.jvmci/mx_jvmci.py
++++ b/mx.jvmci/mx_jvmci.py
+@@ -192,6 +192,7 @@ class HotSpotVMJDKDeployedDist(JDKDeployedDist):
+                 if m.name in _hs_deploy_map:
+                     targetDir = join(jdkDir, _hs_deploy_map[m.name])
+                     mx.logv('Deploying {} from {} to {}'.format(m.name, dist.name, targetDir))
++                    subprocess.call(["chmod", "-R", "+rw", targetDir])
+                     tar.extract(m, targetDir)
+ 
+ """
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/005_tool_jt.rb.patch b/nixpkgs/pkgs/development/compilers/graalvm/005_tool_jt.rb.patch
new file mode 100644
index 000000000000..06f693db9f63
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/graalvm/005_tool_jt.rb.patch
@@ -0,0 +1,46 @@
+diff --git a/tool/jt.rb b/tool/jt.rb
+index 870d88edcb..0a6e4c367b 100755
+--- a/tool/jt.rb
++++ b/tool/jt.rb
+@@ -152,13 +152,16 @@ module Utilities
+   end
+ 
+   def find_mx
+-    if which('mx')
+-      'mx'
++    if ENV.key?("MX_GIT_CACHE_DIR")
++      "mx-internal"
+     else
+-      mx_repo = find_or_clone_repo("https://github.com/graalvm/mx.git")
+-      "#{mx_repo}/mx"
++      if which('mx')
++        'mx'
++      else
++        mx_repo = find_or_clone_repo("https://github.com/graalvm/mx.git")
++        "#{mx_repo}/mx"
++      end
+     end
+-  end
+ 
+   def find_launcher(use_native)
+     if use_native
+@@ -444,8 +447,8 @@ module Commands
+           --no-sforceimports                         do not run sforceimports before building
+           parser                                     build the parser
+           options                                    build the options
+-          graalvm                                    build a minimal JVM-only GraalVM containing only TruffleRuby, 
+-                                                     available by default in mxbuild/truffleruby-jvm, 
++          graalvm                                    build a minimal JVM-only GraalVM containing only TruffleRuby,
++                                                     available by default in mxbuild/truffleruby-jvm,
+                                                      the Ruby is symlinked into rbenv or chruby if available
+               --graal      include the GraalVM Compiler in the build
+               --native     build native ruby image as well, available in mxbuild/truffleruby-native
+@@ -491,7 +494,7 @@ module Commands
+       jt test compiler                               run compiler tests
+       jt test integration [TESTS]                    run integration tests
+       jt test bundle [--jdebug]                      tests using bundler
+-      jt test gems [TESTS]                           tests using gems 
++      jt test gems [TESTS]                           tests using gems
+       jt test ecosystem [TESTS]                      tests using the wider ecosystem such as bundler, Rails, etc
+       jt test cexts [--no-openssl] [--no-gems] [test_names...]
+                                                      run C extension tests (set GEM_HOME)
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/006_mx_copylib.py.patch b/nixpkgs/pkgs/development/compilers/graalvm/006_mx_copylib.py.patch
new file mode 100644
index 000000000000..43ca3e168327
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/graalvm/006_mx_copylib.py.patch
@@ -0,0 +1,14 @@
+diff --git a/mx.fastr/mx_copylib.py b/mx.fastr/mx_copylib.py
+index 4f57e1954..db45220d9 100644
+--- a/mx.fastr/mx_copylib.py
++++ b/mx.fastr/mx_copylib.py
+@@ -54,6 +54,9 @@ def _copylib(lib, libpath, plain_libpath_base, target):
+     else:
+         try:
+             if platform.system() == 'Linux':
++                # https://github.com/oracle/fastr/issues/110
++                if libpath.endswith("libgcc_s.so"):
++                    libpath = libpath + ".1"
+                 output = subprocess.check_output(['objdump', '-p', libpath])
+             elif platform.system() == 'SunOS':
+                 output = subprocess.check_output(['elfdump', '-d', libpath])
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/007_unimplemented.c.patch b/nixpkgs/pkgs/development/compilers/graalvm/007_unimplemented.c.patch
new file mode 100644
index 000000000000..96cca7ed239b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/graalvm/007_unimplemented.c.patch
@@ -0,0 +1,85 @@
+diff --git a/com.oracle.truffle.r.native/fficall/src/common/unimplemented.c b/com.oracle.truffle.r.native/fficall/src/common/unimplemented.c
+index dcf081316..c2cb4879b 100644
+--- a/com.oracle.truffle.r.native/fficall/src/common/unimplemented.c
++++ b/com.oracle.truffle.r.native/fficall/src/common/unimplemented.c
+@@ -20,8 +20,10 @@
+ 
+ #include <Rinternals.h>
+ #include <stdlib.h>
++#include <rlocale.h>
+ 
+ #include <R_ext/eventloop.h>
++#include <R_ext/GraphicsEngine.h>
+ #include <Defn.h>
+ 
+ Rboolean known_to_be_latin1 = FALSE;
+@@ -166,3 +168,69 @@ int Scollate(SEXP a, SEXP b) {
+ void z_prec_r(Rcomplex *r, Rcomplex *x, double digits) {
+     unimplemented("z_prec_r");
+ }
++
++int Rf_AdobeSymbol2ucs2(int n) {
++  unimplemented("Rf_AdobeSymbol2ucs2");
++  return 0;
++}
++
++size_t Mbrtowc(wchar_t *wc, const char *s, size_t n, mbstate_t *ps) {
++  unimplemented("Mbrtowc");
++  return 0;
++}
++
++double R_GE_VStrHeight(const char *s, cetype_t enc, const pGEcontext gc, pGEDevDesc dd) {
++  unimplemented("R_GE_VStrHeight");
++  return 0;
++}
++
++void R_GE_VText(double x, double y, const char * const s, cetype_t enc,
++		double x_justify, double y_justify, double rotation,
++		const pGEcontext gc, pGEDevDesc dd) {
++  unimplemented("R_GE_VText");
++}
++
++double R_GE_VStrWidth(const char *s, cetype_t enc, const pGEcontext gc, pGEDevDesc dd) {
++  unimplemented("R_GE_VStrWidth");
++}
++
++void setulb(int n, int m, double *x, double *l, double *u, int *nbd,
++	    double *f, double *g, double factr, double *pgtol,
++	    double *wa, int * iwa, char *task, int iprint, int *isave) {
++  unimplemented("setulb");
++}
++
++void genptry(int n, double *p, double *ptry, double scale, void *ex) {
++  unimplemented("genptry");
++}
++
++double EXP(double x) {
++  unimplemented("EXP");
++  return 0;
++}
++
++double LOG(double x) {
++  unimplemented("LOG");
++  return 0;
++}
++
++Rwchar_t Rf_utf8toucs32(wchar_t high, const char *s) {
++  unimplemented("Rf_utf8toucs32");
++  return 0;
++}
++
++size_t mbtoucs(unsigned int *wc, const char *s, size_t n) {
++  unimplemented("mbtoucs");
++  return (size_t) 0;
++}
++
++
++int DispatchOrEval(SEXP call, SEXP op, const char *generic, SEXP args,
++		   SEXP rho, SEXP *ans, int dropmissing, int argsevald) {
++  unimplemented("DispatchOrEval");
++  return 0;
++}
++
++void ENSURE_NAMEDMAX (SEXP x) {
++  unimplemented("ENSURE_NAMEDMAX");
++}
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/008_remove_jfr.patch b/nixpkgs/pkgs/development/compilers/graalvm/008_remove_jfr.patch
new file mode 100644
index 000000000000..1aea044c8023
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/graalvm/008_remove_jfr.patch
@@ -0,0 +1,33 @@
+diff --git a/mx.jvmci/suite.py b/mx.jvmci/suite.py
+index 9690c0a38f..fa1d36b7e1 100644
+--- a/mx.jvmci/suite.py
++++ b/mx.jvmci/suite.py
+@@ -241,18 +241,7 @@ suite = {
+       "workingSets" : "JVMCI,HotSpot,SPARC",
+     },
+ 
+-    "jdk.vm.ci.hotspot.jfr" : {
+-      "subDir" : "jvmci",
+-      "sourceDirs" : ["src"],
+-      "dependencies" : [
+-        "jdk.vm.ci.hotspot",
+-        "JFR",
+-      ],
+-      "checkstyle" : "jdk.vm.ci.hotspot",
+-      "javaCompliance" : "1.8",
+-      "profile" : "",
+-      "workingSets" : "JVMCI,HotSpot",
+-    },
++
+ 
+     "hotspot" : {
+       "native" : True,
+@@ -354,7 +343,7 @@ suite = {
+         "jdk.vm.ci.hotspot.aarch64",
+         "jdk.vm.ci.hotspot.amd64",
+         "jdk.vm.ci.hotspot.sparc",
+-        "jdk.vm.ci.hotspot.jfr",
++
+       ],
+       "distDependencies" : [
+         "JVMCI_SERVICES",
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/009_remove_signedness_verifier.patch b/nixpkgs/pkgs/development/compilers/graalvm/009_remove_signedness_verifier.patch
new file mode 100644
index 000000000000..cf8bd4050662
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/graalvm/009_remove_signedness_verifier.patch
@@ -0,0 +1,21 @@
+diff --git a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/c/query/SizeAndSignednessVerifier.java b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/c/query/SizeAndSignednessVerifier.java
+index 23a76357fd2..f13694b6ed7 100644
+--- a/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/c/query/SizeAndSignednessVerifier.java
++++ b/substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/c/query/SizeAndSignednessVerifier.java
+@@ -249,15 +249,6 @@ public final class SizeAndSignednessVerifier extends NativeInfoTreeVisitor {
+     }
+ 
+     private void checkSignedness(boolean isUnsigned, ResolvedJavaType type, ResolvedJavaMethod method) {
+-        if (isSigned(type)) {
+-            if (isUnsigned) {
+-                addError("Type " + type.toJavaName(false) + " is signed, but accessed C value is unsigned", method);
+-            }
+-        } else if (nativeLibs.isWordBase(type)) {
+-            /* every Word type other than Signed is assumed to be unsigned. */
+-            if (!isUnsigned) {
+-                addError("Type " + type.toJavaName(false) + " is unsigned, but accessed C value is signed", method);
+-            }
+-        }
++
+     }
+ }
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/010_mx_substratevm.py b/nixpkgs/pkgs/development/compilers/graalvm/010_mx_substratevm.py
new file mode 100644
index 000000000000..afb6b5681679
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/graalvm/010_mx_substratevm.py
@@ -0,0 +1,13 @@
+diff --git a/substratevm/mx.substratevm/mx_substratevm.py b/substratevm/mx.substratevm/mx_substratevm.py
+index b89163ef983..0fd0138b336 100644
+--- a/substratevm/mx.substratevm/mx_substratevm.py
++++ b/substratevm/mx.substratevm/mx_substratevm.py
+@@ -189,7 +189,7 @@ if str(svm_java_compliance().value) not in GRAAL_COMPILER_FLAGS_MAP:
+     mx.abort("Substrate VM does not support this Java version: " + str(svm_java_compliance()))
+ GRAAL_COMPILER_FLAGS = GRAAL_COMPILER_FLAGS_BASE + GRAAL_COMPILER_FLAGS_MAP[str(svm_java_compliance().value)]
+ 
+-IMAGE_ASSERTION_FLAGS = ['-H:+VerifyGraalGraphs', '-H:+VerifyPhases']
++IMAGE_ASSERTION_FLAGS = ['-H:+VerifyGraalGraphs', '-H:+VerifyPhases', '-H:+ReportExceptionStackTraces']
+ suite = mx.suite('substratevm')
+ svmSuites = [suite]
+ clibraryDists = ['SVM_HOSTED_NATIVE']
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/default.nix b/nixpkgs/pkgs/development/compilers/graalvm/default.nix
new file mode 100644
index 000000000000..337e0f735ebe
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/graalvm/default.nix
@@ -0,0 +1,538 @@
+{ stdenv, lib, fetchFromGitHub, fetchurl, fetchzip, fetchgit, mercurial_4, python27, setJavaClassPath,
+  which, zlib, makeWrapper, openjdk, unzip, git, clang, llvm, icu, ruby, glibc, bash, gcc, libobjc,
+  xcodebuild, gfortran, readline, bzip2, lzma, pcre, curl, ed, libresolv, libiconv, writeScriptBin,
+  openssl, perl, CoreFoundation, Foundation, JavaNativeFoundation, JavaRuntimeSupport, JavaVM, Cocoa
+}:
+
+let
+  version = "19.2.1";
+  mercurial = mercurial_4;
+  truffleMake = ./truffle.make;
+  makeMxGitCache = list: out: ''
+     mkdir ${out}
+    ${lib.concatMapStrings ({ url, name, rev, sha256 }: ''
+      mkdir -p ${out}/${name}
+      cp -rf ${fetchgit { inherit url rev sha256; }}/* ${out}/${name}
+    ''
+    ) list}
+
+    # # GRAAL-NODEJS # #
+    chmod -R +rw ${out}
+    sed -i "s|#include \"../../../../mxbuild/trufflenode/coremodules/node_snapshots.h\"| \
+           #include \"$NIX_BUILD_TOP/mxbuild/graal-nodejs/trufflenode/coremodules/node_snapshots.h\"|g" \
+      ${out}/graaljs/graal-nodejs/deps/v8/src/graal/callbacks.cc
+
+    # patch the shebang in python script runner
+    chmod -R +rw ${out}/graaljs/graal-nodejs/mx.graal-nodejs/python2
+    patchShebangs ${out}/graaljs/graal-nodejs/mx.graal-nodejs/python2/python
+
+    # # TUFFLE-RUBY # #
+    (cd ${out}/truffleruby && git apply ${./005_tool_jt.rb.patch})
+    patchShebangs ${out}/truffleruby/tool/query-versions-json.rb
+
+    substituteInPlace ${out}/truffleruby/src/main/c/Makefile \
+      --replace '(MX_HOME)/mx' '(MX_HOME)/mx-internal'
+
+    substituteInPlace ${out}/truffleruby/src/processor/java/org/truffleruby/processor/BuildInformationProcessor.java \
+      --replace 'trufflerubyHome = findHome();' \
+                'trufflerubyHome = new File(System.getenv("MX_GIT_CACHE_DIR"), "truffleruby");' \
+      --replace tool/query-versions-json.rb 'ruby tool/query-versions-json.rb' \
+      --replace 'revision = runCommand("git rev-parse --short=8 HEAD");' \
+                'revision = "${version}";' \
+      --replace 'compileDate = runCommand("git log -1 --date=short --pretty=format:%cd");' \
+                'compileDate = "1970-01-01";'
+
+    substituteInPlace ${out}/truffleruby/mx.truffleruby/mx_truffleruby.py \
+      --replace "mx_binary = join(mx._mx_home, 'mx')" "mx_binary = join(mx._mx_home, 'mx-internal')"
+
+    # # FASTR # #
+    (cd ${out}/fastr && git apply ${ ./006_mx_copylib.py.patch })
+    (cd ${out}/fastr && git apply ${ ./007_unimplemented.c.patch })
+    substituteInPlace ${out}/fastr/com.oracle.truffle.r.parser.processor/src/com/oracle/truffle/r/parser/processor/GenerateRParserProcessor.java \
+      --replace 'File suiteRoot = srcGenDir.getCanonicalFile().getParentFile().getParentFile().getParentFile();' \
+                'File suiteRoot = new File(System.getenv("MX_GIT_CACHE_DIR"), "fastr");'
+
+    substituteInPlace ${out}/fastr/com.oracle.truffle.r.native/gnur/Makefile.libs \
+      --replace 'mx -p' 'mx-internal -p'
+
+    substituteInPlace ${out}/fastr/com.oracle.truffle.r.native/include/Makefile \
+      --replace 'mx -p' 'mx-internal -p'
+
+    substituteInPlace ${out}/fastr/com.oracle.truffle.r.native/fficall/Makefile \
+      --replace 'mx -p' 'mx-internal -p'
+
+    substituteInPlace ${out}/fastr/com.oracle.truffle.r.native.recommended/Makefile \
+      --replace 'mx -p' 'mx-internal -p'
+
+    # Make sure that the logs aren't hidden when compiling gnur
+    substituteInPlace ${out}/fastr/com.oracle.truffle.r.native/gnur/Makefile.gnur \
+      --replace '> gnur_configure.log 2>&1' "" \
+      --replace '> gnur_make.log 2>&1' ""
+
+    substituteInPlace ${out}/fastr/com.oracle.truffle.r.native/run/Linux/Renviron \
+      --replace /bin/ "" \
+      --replace /usr/bin/ ""
+
+    sed -i "s|exec \$mx|exec mx-internal|g" ${out}/fastr/com.oracle.truffle.r.native/run/*.sh
+    chmod +x ${out}/fastr/com.oracle.truffle.r.native/run/*.sh
+    patchShebangs ${out}/fastr/com.oracle.truffle.r.native/run/*.sh
+
+    cd ${out}
+    hg init
+    hg add
+    hg commit -m 'dummy commit'
+    hg tag      ${lib.escapeShellArg "vm${version}"}
+    hg checkout ${lib.escapeShellArg "vm${version}"}
+  '';
+
+  # pre-download some cache entries ('mx' will not be able to download under nixbld)
+  makeMxCache = list:
+    stdenv.mkDerivation {
+      name = "mx-cache";
+      buildInputs = [ unzip ];
+      buildCommand = with lib; ''
+        mkdir $out
+        ${lib.concatMapStrings
+          ({url, name, sha1, isNinja ? false}: ''
+            install -D ${fetchurl { inherit url sha1; }} $out/${name}
+            echo -n ${sha1} > $out/${name}.sha1
+            ${if isNinja then ''
+                export BASENAME=${removeSuffix ".zip" name}
+                mkdir "$out/$BASENAME.extracted" &&
+                unzip "$out/${name}" -d "$out/$BASENAME.extracted"
+
+                # Ninja is called later in the build process
+               ${lib.optionalString stdenv.isLinux ''
+                 if [ -f $out/$BASENAME.extracted/ninja ]; then
+                   patchelf --set-interpreter \
+                     "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+                     --set-rpath "${stdenv.cc.cc.lib}/lib64" \
+                     $out/$BASENAME.extracted/ninja
+                 fi''}
+                ''
+              else ""}
+         '') list}
+      '';
+    };
+
+  jvmci8-mxcache = [
+    rec { sha1 = "53addc878614171ff0fcbc8f78aed12175c22cdb"; name = "JACOCOCORE_0.8.4_${sha1}/jacococore-0.8.4.jar";                                   url = "mirror://maven/org/jacoco/org.jacoco.core/0.8.4/org.jacoco.core-0.8.4.jar"; }
+    rec { sha1 = "9bd1fa334d941005bc9ab3ac92478a590f5b7d73"; name = "JACOCOCORE_0.8.4_${sha1}/jacococore-0.8.4.sources.jar";                           url = "mirror://maven/org/jacoco/org.jacoco.core/0.8.4/org.jacoco.core-0.8.4-sources.jar"; }
+    rec { sha1 = "e5ca9511493b7e3bc2cabdb8ded92e855f3aac32"; name = "JACOCOREPORT_0.8.4_${sha1}/jacocoreport-0.8.4.jar";                               url = "mirror://maven/org/jacoco/org.jacoco.report/0.8.4/org.jacoco.report-0.8.4.jar"; }
+    rec { sha1 = "eb61e479b35b467954f28a565c094c563b790e19"; name = "JACOCOREPORT_0.8.4_${sha1}/jacocoreport-0.8.4.sources.jar";                       url = "mirror://maven/org/jacoco/org.jacoco.report/0.8.4/org.jacoco.report-0.8.4-sources.jar"; }
+    rec { sha1 = "869021a6d90cfb008b12e83fccbe42eca29e5355"; name = "JACOCOAGENT_0.8.4_${sha1}/jacocoagent-0.8.4.jar";                                 url = "mirror://maven/org/jacoco/org.jacoco.agent/0.8.4/org.jacoco.agent-0.8.4-runtime.jar"; }
+    rec { sha1 = "306816fb57cf94f108a43c95731b08934dcae15c"; name = "JOPTSIMPLE_4_6_${sha1}/joptsimple-4-6.jar";                                       url = "mirror://maven/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6.jar"; }
+    rec { sha1 = "9cd14a61d7aa7d554f251ef285a6f2c65caf7b65"; name = "JOPTSIMPLE_4_6_${sha1}/joptsimple-4-6.sources.jar";                               url = "mirror://maven/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6-sources.jar"; }
+    rec { sha1 = "fa29aa438674ff19d5e1386d2c3527a0267f291e"; name = "ASM_7.1_${sha1}/asm-7.1.jar";                                                     url = "mirror://maven/org/ow2/asm/asm/7.1/asm-7.1.jar"; }
+    rec { sha1 = "9d170062d595240da35301362b079e5579c86f49"; name = "ASM_7.1_${sha1}/asm-7.1.sources.jar";                                             url = "mirror://maven/org/ow2/asm/asm/7.1/asm-7.1-sources.jar"; }
+    rec { sha1 = "a3662cf1c1d592893ffe08727f78db35392fa302"; name = "ASM_TREE_7.1_${sha1}/asm-tree-7.1.jar";                                           url = "mirror://maven/org/ow2/asm/asm-tree/7.1/asm-tree-7.1.jar"; }
+    rec { sha1 = "157238292b551de8680505fa2d19590d136e25b9"; name = "ASM_TREE_7.1_${sha1}/asm-tree-7.1.sources.jar";                                   url = "mirror://maven/org/ow2/asm/asm-tree/7.1/asm-tree-7.1-sources.jar"; }
+    rec { sha1 = "379e0250f7a4a42c66c5e94e14d4c4491b3c2ed3"; name = "ASM_ANALYSIS_7.1_${sha1}/asm-analysis-7.1.jar";                                   url = "mirror://maven/org/ow2/asm/asm-analysis/7.1/asm-analysis-7.1.jar"; }
+    rec { sha1 = "36789198124eb075f1a5efa18a0a7812fb16f47f"; name = "ASM_ANALYSIS_7.1_${sha1}/asm-analysis-7.1.sources.jar";                           url = "mirror://maven/org/ow2/asm/asm-analysis/7.1/asm-analysis-7.1-sources.jar"; }
+    rec { sha1 = "431dc677cf5c56660c1c9004870de1ed1ea7ce6c"; name = "ASM_COMMONS_7.1_${sha1}/asm-commons-7.1.jar";                                     url = "mirror://maven/org/ow2/asm/asm-commons/7.1/asm-commons-7.1.jar"; }
+    rec { sha1 = "a62ff3ae6e37affda7c6fb7d63b89194c6d006ee"; name = "ASM_COMMONS_7.1_${sha1}/asm-commons-7.1.sources.jar";                             url = "mirror://maven/org/ow2/asm/asm-commons/7.1/asm-commons-7.1-sources.jar"; }
+    rec { sha1 = "ec2544ab27e110d2d431bdad7d538ed509b21e62"; name = "COMMONS_MATH3_3_2_${sha1}/commons-math3-3-2.jar";                                 url = "mirror://maven/org/apache/commons/commons-math3/3.2/commons-math3-3.2.jar"; }
+    rec { sha1 = "cd098e055bf192a60c81d81893893e6e31a6482f"; name = "COMMONS_MATH3_3_2_${sha1}/commons-math3-3-2.sources.jar";                         url = "mirror://maven/org/apache/commons/commons-math3/3.2/commons-math3-3.2-sources.jar"; }
+    rec { sha1 = "442447101f63074c61063858033fbfde8a076873"; name = "JMH_1_21_${sha1}/jmh-1-21.jar";                                                   url = "mirror://maven/org/openjdk/jmh/jmh-core/1.21/jmh-core-1.21.jar"; }
+    rec { sha1 = "a6fe84788bf8cf762b0e561bf48774c2ea74e370"; name = "JMH_1_21_${sha1}/jmh-1-21.sources.jar";                                           url = "mirror://maven/org/openjdk/jmh/jmh-core/1.21/jmh-core-1.21-sources.jar"; }
+    rec { sha1 = "7aac374614a8a76cad16b91f1a4419d31a7dcda3"; name = "JMH_GENERATOR_ANNPROCESS_1_21_${sha1}/jmh-generator-annprocess-1-21.jar";         url = "mirror://maven/org/openjdk/jmh/jmh-generator-annprocess/1.21/jmh-generator-annprocess-1.21.jar"; }
+    rec { sha1 = "fb48e2a97df95f8b9dced54a1a37749d2a64d2ae"; name = "JMH_GENERATOR_ANNPROCESS_1_21_${sha1}/jmh-generator-annprocess-1-21.sources.jar"; url = "mirror://maven/org/openjdk/jmh/jmh-generator-annprocess/1.21/jmh-generator-annprocess-1.21-sources.jar"; }
+    rec { sha1 = "2973d150c0dc1fefe998f834810d68f278ea58ec"; name = "JUNIT_${sha1}/junit.jar";                                                         url = "mirror://maven/junit/junit/4.12/junit-4.12.jar"; }
+    rec { sha1 = "a6c32b40bf3d76eca54e3c601e5d1470c86fcdfa"; name = "JUNIT_${sha1}/junit.sources.jar";                                                 url = "mirror://maven/junit/junit/4.12/junit-4.12-sources.jar"; }
+    rec { sha1 = "42a25dc3219429f0e5d060061f71acb49bf010a0"; name = "HAMCREST_${sha1}/hamcrest.jar";                                                   url = "mirror://maven/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"; }
+    rec { sha1 = "1dc37250fbc78e23a65a67fbbaf71d2e9cbc3c0b"; name = "HAMCREST_${sha1}/hamcrest.sources.jar";                                           url = "mirror://maven/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-sources.jar"; }
+    rec { sha1 = "0d031013db9a80d6c88330c42c983fbfa7053193"; name = "hsdis_${sha1}/hsdis.so";                                                          url = "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/hsdis/intel/hsdis-amd64-linux-${sha1}.so"; }
+] ++ lib.optionals stdenv.isLinux [
+  rec { sha1 = "0d031013db9a80d6c88330c42c983fbfa7053193"; name = "hsdis_${sha1}/hsdis.so";                                                          url = "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/hsdis/intel/hsdis-amd64-linux-${sha1}.so"; }
+                                                                          ]
+++ lib.optionals stdenv.isDarwin [
+  rec { sha1 = "67f6d23cbebd8998450a88b5bef362171f66f11a"; name = "hsdis_${sha1}/hsdis.dylib";                                                       url = "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/hsdis/intel/hsdis-amd64-darwin-${sha1}.dylib"; }
+                                                                          ];
+
+  graal-mxcache = jvmci8-mxcache ++ [
+    # rec { sha1 = "5001adab652fc4eb35e30cdefbb0765442f8b7db"; name = "LLVM_ORG_LIBCXX_SRC_${sha1}/llvm-org-libcxx-src.tar.gz";                          url = "https://lafo.ssw.uni-linz.ac.at/pub/llvm-org/compiler-rt-llvmorg-8.0.0-4-gd563e33a79-bgae3b177eaa-linux-amd64.tar.gz"; }
+    rec { sha1 = "5001adab652fc4eb35e30cdefbb0765442f8b7db"; name = "LLVM_ORG_COMPILER_RT_LINUX_${sha1}/llvm-org-compiler-rt-linux.tar.gz";            url = "https://lafo.ssw.uni-linz.ac.at/pub/llvm-org/compiler-rt-llvmorg-8.0.0-4-gd563e33a79-bgae3b177eaa-linux-amd64.tar.gz"; }
+    rec { sha1 = "a990b2dba1c706f5c43c56fedfe70bad9a695852"; name = "LLVM_WRAPPER_${sha1}/llvm-wrapper.jar";                                           url = "mirror://maven/org/bytedeco/javacpp-presets/llvm/6.0.1-1.4.2/llvm-6.0.1-1.4.2.jar"; }
+    rec { sha1 = "decbd95d46092fa9afaf2523b5b23d07ad7ad6bc"; name = "LLVM_WRAPPER_${sha1}/llvm-wrapper.sources.jar";                                   url = "mirror://maven/org/bytedeco/javacpp-presets/llvm/6.0.1-1.4.2/llvm-6.0.1-1.4.2-sources.jar"; }
+    rec { sha1 = "cfa6a0259d98bff5aa8d41ba11b4d1dad648fbaa"; name = "JAVACPP_${sha1}/javacpp.jar";                                                     url = "mirror://maven/org/bytedeco/javacpp/1.4.2/javacpp-1.4.2.jar"; }
+    rec { sha1 = "fdb2d2c17f6b91cdd5421554396da8905f0dfed2"; name = "JAVACPP_${sha1}/javacpp.sources.jar";                                             url = "mirror://maven/org/bytedeco/javacpp/1.4.2/javacpp-1.4.2-sources.jar"; }
+    rec { sha1 = "702ca2d0ae93841c5ab75e4d119b29780ec0b7d9"; name = "NINJA_SYNTAX_${sha1}/ninja-syntax.tar.gz";                                        url = "https://pypi.org/packages/source/n/ninja_syntax/ninja_syntax-1.7.2.tar.gz"; }
+    rec { sha1 = "f2cfb09cee12469ff64f0d698b13de19903bb4f7"; name = "NanoHTTPD-WebSocket_${sha1}/nanohttpd-websocket.jar";                             url = "mirror://maven/org/nanohttpd/nanohttpd-websocket/2.3.1/nanohttpd-websocket-2.3.1.jar"; }
+    rec { sha1 = "a8d54d1ca554a77f377eff6bf9e16ca8383c8f6c"; name = "NanoHTTPD_${sha1}/nanohttpd.jar";                                                 url = "mirror://maven/org/nanohttpd/nanohttpd/2.3.1/nanohttpd-2.3.1.jar"; }
+    rec { sha1 = "946f8aa9daa917dd81a8b818111bec7e288f821a"; name = "ANTLR4_${sha1}/antlr4.jar";                                                       url = "mirror://maven/org/antlr/antlr4-runtime/4.7.1/antlr4-runtime-4.7.1.jar"; }
+    rec { sha1 = "c3aeac59c022bdc497c8c48ed86fa50450e4896a"; name = "JLINE_${sha1}/jline.jar";                                                         url = "mirror://maven/jline/jline/2.14.6/jline-2.14.6.jar"; }
+    rec { sha1 = "d0bdc21c5e6404726b102998e44c66a738897905"; name = "JAVA_ALLOCATION_INSTRUMENTER_${sha1}/java-allocation-instrumenter.jar";           url = "mirror://maven/com/google/code/java-allocation-instrumenter/java-allocation-instrumenter/3.1.0/java-allocation-instrumenter-3.1.0.jar"; }
+    rec { sha1 = "0da08b8cce7bbf903602a25a3a163ae252435795"; name = "ASM5_${sha1}/asm5.jar";                                                           url = "mirror://maven/org/ow2/asm/asm/5.0.4/asm-5.0.4.jar"; }
+    rec { sha1 = "396ce0c07ba2b481f25a70195c7c94922f0d1b0b"; name = "ASM_TREE5_${sha1}/asm-tree5.jar";                                                 url = "mirror://maven/org/ow2/asm/asm-tree/5.0.4/asm-tree-5.0.4.jar"; }
+    rec { sha1 = "280c265b789e041c02e5c97815793dfc283fb1e6"; name = "LIBFFI_SOURCES_${sha1}/libffi-sources.tar.gz";                                    url = "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/libffi-3.2.1.tar.gz"; }
+    rec { sha1 = "8819cea8bfe22c9c63f55465e296b3855ea41786"; name = "TruffleJSON_${sha1}/trufflejson.jar";                                             url = "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/trufflejson-20180130.jar"; }
+    rec { sha1 = "9712a8124c40298015f04a74f61b3d81a51513af"; name = "CHECKSTYLE_8.8_${sha1}/checkstyle-8.8.jar";                                       url = "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/checkstyle-8.8-all.jar"; }
+    rec { sha1 = "8dc5a90bed5f51d7538d05b8c31c31b7dfddbd66"; name = "VISUALVM_COMMON_${sha1}/visualvm-common.tar.gz";                                  url = "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/visualvm/visualvm-19_0_0-20.tar.gz"; }
+    rec { sha1 = "e6e60889b7211a80b21052a249bd7e0f88f79fee"; name = "Java-WebSocket_${sha1}/java-websocket.jar";                                       url = "mirror://maven/org/java-websocket/Java-WebSocket/1.3.9/Java-WebSocket-1.3.9.jar"; }
+    rec { sha1 = "7a4d00d5ec5febd252a6182e8b6e87a0a9821f81"; name = "ICU4J_${sha1}/icu4j.jar";                                                         url = "mirror://maven/com/ibm/icu/icu4j/62.1/icu4j-62.1.jar"; }
+    # This duplication of asm with underscore and minus is totally weird
+    rec { sha1 = "c01b6798f81b0fc2c5faa70cbe468c275d4b50c7"; name = "ASM-6.2.1_${sha1}/asm-6.2.1.jar";                                                 url = "mirror://maven/org/ow2/asm/asm/6.2.1/asm-6.2.1.jar"; }
+    rec { sha1 = "cee28077ac7a63d3de0b205ec314d83944ff6267"; name = "ASM-6.2.1_${sha1}/asm-6.2.1.sources.jar";                                         url = "mirror://maven/org/ow2/asm/asm/6.2.1/asm-6.2.1-sources.jar"; }
+    rec { sha1 = "332b022092ecec53cdb6272dc436884b2d940615"; name = "ASM_TREE-6.2.1_${sha1}/asm-tree-6.2.1.jar";                                       url = "mirror://maven/org/ow2/asm/asm-tree/6.2.1/asm-tree-6.2.1.jar"; }
+    rec { sha1 = "072bd64989090e4ed58e4657e3d4481d96f643af"; name = "ASM_TREE-6.2.1_${sha1}/asm-tree-6.2.1.sources.jar";                               url = "mirror://maven/org/ow2/asm/asm-tree/6.2.1/asm-tree-6.2.1-sources.jar"; }
+    rec { sha1 = "e8b876c5ccf226cae2f44ed2c436ad3407d0ec1d"; name = "ASM_ANALYSIS-6.2.1_${sha1}/asm-analysis-6.2.1.jar";                               url = "mirror://maven/org/ow2/asm/asm-analysis/6.2.1/asm-analysis-6.2.1.jar"; }
+    rec { sha1 = "b0b249bd185677648692e7c57b488b6d7c2a6653"; name = "ASM_ANALYSIS-6.2.1_${sha1}/asm-analysis-6.2.1.sources.jar";                       url = "mirror://maven/org/ow2/asm/asm-analysis/6.2.1/asm-analysis-6.2.1-sources.jar"; }
+    rec { sha1 = "eaf31376d741a3e2017248a4c759209fe25c77d3"; name = "ASM_COMMONS-6.2.1_${sha1}/asm-commons-6.2.1.jar";                                 url = "mirror://maven/org/ow2/asm/asm-commons/6.2.1/asm-commons-6.2.1.jar"; }
+    rec { sha1 = "667fa0f9d370e7848b0e3d173942855a91fd1daf"; name = "ASM_COMMONS-6.2.1_${sha1}/asm-commons-6.2.1.sources.jar";                         url = "mirror://maven/org/ow2/asm/asm-commons/6.2.1/asm-commons-6.2.1-sources.jar"; }
+    # From here on the deps are new
+    rec { sha1 = "400d664d7c92a659d988c00cb65150d1b30cf339"; name = "ASM_UTIL-6.2.1_${sha1}/asm-util-6.2.1.jar";                                       url = "mirror://maven/org/ow2/asm/asm-util/6.2.1/asm-util-6.2.1.jar"; }
+    rec { sha1 = "c9f7246bf93bb0dc7fe9e7c9eca531a8fb98d252"; name = "ASM_UTIL-6.2.1_${sha1}/asm-util-6.2.1.sources.jar";                               url = "mirror://maven/org/ow2/asm/asm-util/6.2.1/asm-util-6.2.1-sources.jar"; }
+    rec { sha1 = "4b52bd03014f6d080ef0528865c1ee50621e35c6"; name = "NETBEANS_PROFILER_${sha1}/netbeans-profiler.jar";                                 url = "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/truffle/js/org-netbeans-lib-profiler-8.2-201609300101.jar"; }
+    rec { sha1 = "b5840706cc8ce639fcafeab1bc61da2d8aa37afd"; name = "NASHORN_INTERNAL_TESTS_${sha1}/nashorn-internal-tests.jar";                       url = "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/truffle/js/nashorn-internal-tests-700f5e3f5ff2.jar"; }
+    rec { sha1 = "9577018f9ce3636a2e1cb0a0c7fe915e5098ded5"; name = "JACKSON_ANNOTATIONS_${sha1}/jackson-annotations.jar";                             url = "mirror://maven/com/fasterxml/jackson/core/jackson-annotations/2.8.6/jackson-annotations-2.8.6.jar"; }
+    rec { sha1 = "2ef7b1cc34de149600f5e75bc2d5bf40de894e60"; name = "JACKSON_CORE_${sha1}/jackson-core.jar";                                           url = "mirror://maven/com/fasterxml/jackson/core/jackson-core/2.8.6/jackson-core-2.8.6.jar"; }
+    rec { sha1 = "c43de61f74ecc61322ef8f402837ba65b0aa2bf4"; name = "JACKSON_DATABIND_${sha1}/jackson-databind.jar";                                   url = "mirror://maven/com/fasterxml/jackson/core/jackson-databind/2.8.6/jackson-databind-2.8.6.jar"; }
+    rec { sha1 = "2838952e91baa37ac73ed817451268a193ba440a"; name = "JCODINGS_${sha1}/jcodings.jar";                                                   url = "mirror://maven/org/jruby/jcodings/jcodings/1.0.40/jcodings-1.0.40.jar"; }
+    rec { sha1 = "0ed89e096c83d540acac00d6ee3ea935b4c905ff"; name = "JCODINGS_${sha1}/jcodings.sources.jar";                                           url = "mirror://maven/org/jruby/jcodings/jcodings/1.0.40/jcodings-1.0.40-sources.jar"; }
+    rec { sha1 = "5dbb09787a9b8780737b71fbf942235ef59051b9"; name = "JONI_${sha1}/joni.jar";                                                           url = "mirror://maven/org/jruby/joni/joni/2.1.25/joni-2.1.25.jar"; }
+    rec { sha1 = "505a09064f6e2209616f38724f6d97d8d889aa92"; name = "JONI_${sha1}/joni.sources.jar";                                                   url = "mirror://maven/org/jruby/joni/joni/2.1.25/joni-2.1.25-sources.jar"; }
+    rec { sha1 = "c4f7d054303948eb6a4066194253886c8af07128"; name = "XZ-1.8_${sha1}/xz-1.8.jar";                                                       url = "mirror://maven/org/tukaani/xz/1.8/xz-1.8.jar"; }
+    rec { sha1 = "9314d3d372b05546a33791fbc8dd579c92ebd16b"; name = "GNUR_${sha1}/gnur.tar.gz";                                                        url = "http://cran.rstudio.com/src/base/R-3/R-3.5.1.tar.gz"; }
+    rec { sha1 = "90aa8308da72ae610207d8f6ca27736921be692a"; name = "ANTLR4_COMPLETE_${sha1}/antlr4-complete.jar";                                     url = "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/antlr-4.7.1-complete.jar"; }] ++
+  lib.optionals stdenv.isLinux [
+    rec { sha1 = "df4c1f784294d02a82d78664064248283bfcc297"; name = "LLVM_ORG_${sha1}/llvm-org.tar.gz";                                                url = "https://lafo.ssw.uni-linz.ac.at/pub/llvm-org/llvm-llvmorg-8.0.0-4-gd563e33a79-bgae3b177eaa-linux-amd64.tar.gz"; }
+    rec { sha1 = "344483aefa15147c121a8fb6fb35a2406768cc5c"; name = "LLVM_PLATFORM_SPECIFIC_${sha1}/llvm-platform-specific.jar";                       url = "mirror://maven/org/bytedeco/javacpp-presets/llvm/6.0.1-1.4.2/llvm-6.0.1-1.4.2-linux-x86_64.jar"; }
+    rec { sha1 = "fd1a723d62cbbc591041d303e8b151d89f131643"; name = "VISUALVM_PLATFORM_SPECIFIC_${sha1}/visualvm-platform-specific.tar.gz";            url = "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/visualvm/visualvm-19_0_0-20-linux-amd64.tar.gz"; }
+    rec { sha1 = "987234c4ce45505c21302e097c24efef4873325c"; name = "NINJA_${sha1}/ninja.zip";                                                         url = "https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-linux.zip";
+          isNinja = true; }] ++
+  lib.optionals stdenv.isDarwin [
+    rec { sha1 = "0fa1af180755fa4cc018ee9be33f2d7d827593c4"; name = "LLVM_ORG_${sha1}/llvm-org.tar.gz";                                                url = "https://lafo.ssw.uni-linz.ac.at/pub/llvm-org/llvm-llvmorg-8.0.0-4-gd563e33a79-bgae3b177eaa-darwin-amd64.tar.gz"; }
+    rec { sha1 = "57bc74574104a9e0a2dc4d7a71ffcc5731909e57"; name = "LLVM_PLATFORM_SPECIFIC_${sha1}/llvm-platform-specific.jar";                       url = "mirror://maven/org/bytedeco/javacpp-presets/llvm/6.0.1-1.4.2/llvm-6.0.1-1.4.2-macosx-x86_64.jar"; }
+    rec { sha1 = "ae23bb365930f720acc88c62640bae6852a37d67"; name = "VISUALVM_PLATFORM_SPECIFIC_${sha1}/visualvm-platform-specific.tar.gz";            url = "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/visualvm/visualvm-19_0_0-20-macosx-x86_64.tar.gz"; }
+    rec { sha1 = "8142c497f7dfbdb052a1e31960fdfe2c6f9a5ca2"; name = "NINJA_${sha1}/ninja.zip";                                                         url = "https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-mac.zip";
+          isNinja = true; }];
+
+  graal-mxcachegit = [
+    { sha256 = "01w39ms39gl3cw7c2fgcacr2yjg94im9x2x7p5g94l6xlcgqvcnr"; name = "graaljs";     url = "https://github.com/graalvm/graaljs.git";     rev = "vm-${version}"; }
+    { sha256 = "1dps9n5b9c80pbg1fmlwpffy6ina0f0h27di24kafc8isxrdggia"; name = "truffleruby"; url = "https://github.com/oracle/truffleruby.git";  rev = "vm-${version}"; }
+    { sha256 = "0jdpdqm3ld1wsasmi8ka26qf19cibjac8lrqm040h5vh0iqzxizy"; name = "fastr";       url = "https://github.com/oracle/fastr.git";        rev = "vm-${version}"; }
+    { sha256 = "1gv8vafwrafjzvgv4gwk4kcsb3bnvsx07qa5inc0bdyxy5shl381"; name = "graalpython"; url = "https://github.com/graalvm/graalpython.git"; rev = "vm-${version}"; }];
+
+  ninja-syntax = python27.pkgs.buildPythonPackage rec {
+    version = "1.7.2";
+    pname = "ninja_syntax";
+    doCheck = false;
+    src = python27.pkgs.fetchPypi {
+      inherit pname version;
+      sha256 = "07zg30m0khx55fv2gxxn7pqd549z0vk3x592mrdlk9l8krxwjb9l";
+    };
+  };
+
+  findbugs = fetchzip {
+    name   = "findbugs-3.0.0";
+    url    = "https://lafo.ssw.uni-linz.ac.at/pub/graal-external-deps/findbugs-3.0.0.zip";
+    sha256 = "0sf5f9h1s6fmhfigjy81i109j1ani5kzdr4njlpq0mnkkh9fpr7m";
+  };
+
+  python27withPackages = python27.withPackages (ps: [ ninja-syntax ]);
+
+in rec {
+
+  mx = stdenv.mkDerivation rec {
+    version = "5.247.1";
+    pname = "mx";
+    src = fetchFromGitHub {
+      owner  = "graalvm";
+      repo   = "mx";
+      rev    = version;
+      sha256 = "038qr49rqzkhj76nqd27h8fysssnlpdhmy23ks2y81xlxhlzkc59";
+    };
+    nativeBuildInputs = [ makeWrapper ];
+    prePatch = ''
+      cp mx.py bak_mx.py
+    '';
+    patches = [ ./001_mx.py.patch ];
+    postPatch = ''
+      mv mx.py internal_mx.py
+      mv bak_mx.py mx.py
+    '';
+    buildPhase = ''
+      substituteInPlace mx --replace /bin/pwd pwd
+
+      # avoid crash with 'ValueError: ZIP does not support timestamps before 1980'
+      substituteInPlace internal_mx.py --replace \
+        'zipfile.ZipInfo(arcname, time.localtime(getmtime(join(root, f)))[:6])' \
+        'zipfile.ZipInfo(arcname, time.strptime ("1 Jan 1980", "%d %b %Y"       )[:6])'
+    '';
+    installPhase = ''
+      mkdir -p $out/bin
+      cp -dpR * $out/bin
+      wrapProgram $out/bin/mx \
+        --prefix PATH : ${lib.makeBinPath [ python27withPackages mercurial ]} \
+        --set    FINDBUGS_HOME ${findbugs}
+      makeWrapper ${python27}/bin/python $out/bin/mx-internal \
+        --add-flags "$out/bin/internal_mx.py" \
+        --prefix PATH : ${lib.makeBinPath [ python27withPackages mercurial ]} \
+        --set    FINDBUGS_HOME ${findbugs}
+    '';
+    meta = with stdenv.lib; {
+      homepage = "https://github.com/graalvm/mx";
+      description = "Command-line tool used for the development of Graal projects";
+      license = licenses.gpl2;
+      platforms = python27.meta.platforms;
+    };
+  };
+
+  jvmci8 = stdenv.mkDerivation rec {
+    version = "19.3-b05";
+    pname = "jvmci";
+    src = fetchFromGitHub {
+      owner  = "graalvm";
+      repo   = "graal-jvmci-8";
+      rev    = "jvmci-${version}";
+      sha256 =  "0j7my76vldbrvki9x1gn9ics3x2z96j05jdy4nflbpik8i396114";
+    };
+    buildInputs = [ mx mercurial openjdk ] ++ lib.optional stdenv.isDarwin [
+      libobjc CoreFoundation Foundation JavaNativeFoundation JavaRuntimeSupport JavaVM xcodebuild Cocoa
+    ];
+    postUnpack = ''
+      # a fake mercurial dir to prevent mx crash and supply the version to mx
+      ( cd $sourceRoot
+        hg init
+        hg add
+        hg commit -m 'dummy commit'
+        hg tag      ${lib.escapeShellArg src.rev}
+        hg checkout ${lib.escapeShellArg src.rev}
+      )
+    '';
+    patches = [ ./004_mx_jvmci.py.patch ] ++
+              lib.optional stdenv.isDarwin [
+                ./008_remove_jfr.patch ];
+    postPatch =''
+      # The hotspot version name regex fix
+      substituteInPlace mx.jvmci/mx_jvmci.py \
+        --replace "\\d+.\\d+-b\\d+" "\\d+.\\d+-b[g\\d][a\\d]"
+      # darwin: https://github.com/oracle/graal/issues/1816
+      substituteInPlace src/share/vm/code/compiledIC.cpp \
+        --replace 'entry == false' '*entry == false'
+    '';
+    hardeningDisable = [ "fortify" ];
+    NIX_CFLAGS_COMPILE = toString (lib.optional stdenv.isDarwin [
+      "-Wno-reserved-user-defined-literal"
+      "-Wno-c++11-narrowing"
+    ] ++
+    lib.optional stdenv.isLinux [
+      "-Wno-error=format-overflow" # newly detected by gcc7
+      "-Wno-error=nonnull"
+    ]);
+
+    buildPhase = ''
+      export MX_ALT_OUTPUT_ROOT=$NIX_BUILD_TOP/mxbuild
+      export MX_CACHE_DIR=${makeMxCache jvmci8-mxcache}
+
+      mx-internal --primary-suite . --vm=server -v build -DFULL_DEBUG_SYMBOLS=0
+      mx-internal --primary-suite . --vm=server -v vm -version
+      mx-internal --primary-suite . --vm=server -v unittest
+    '';
+    installPhase = ''
+      mkdir -p $out
+      ${if stdenv.isDarwin
+        then "mv openjdk1.8.0_*/darwin-amd64/product/* $out"
+        else "mv openjdk1.8.0_*/linux-amd64/product/* $out"}
+      install -v -m0555 -D $MX_CACHE_DIR/hsdis*/hsdis.so $out/jre/lib/amd64/hsdis-amd64.so
+    '';
+    # copy-paste openjdk's preFixup
+    preFixup = ''
+      # Propagate the setJavaClassPath setup hook from the JRE so that
+      # any package that depends on the JRE has $CLASSPATH set up
+      # properly.
+      mkdir -p $out/nix-support
+      printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
+
+      # Set JAVA_HOME automatically.
+      mkdir -p $out/nix-support
+      cat <<EOF > $out/nix-support/setup-hook
+      if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
+      EOF
+    '';
+    postFixup = openjdk.postFixup or null;
+    dontStrip = true; # stripped javac crashes with "segmentaion fault"
+    inherit (openjdk) meta;
+  };
+
+  graalvm8 = 	stdenv.mkDerivation rec {
+    inherit version;
+    pname = "graal";
+    src = fetchFromGitHub {
+      owner  = "oracle";
+      repo   = "graal";
+      rev    = "vm-${version}";
+      sha256 = "0v8zkmzkyhmmmvra5pp876d4i4ijrrw15j98ipayc7is02kwiwmq";
+    };
+
+    patches = [ ./002_setjmp.c.patch ./003_mx_truffle.py.patch ] ++
+              lib.optional stdenv.isDarwin [
+                ./009_remove_signedness_verifier.patch ./010_mx_substratevm.py
+              ];
+
+    buildInputs = [ mx zlib.dev mercurial jvmci8 git llvm clang
+                    python27withPackages icu ruby bzip2 which
+                    readline bzip2 lzma pcre curl ed gfortran
+                  ]  ++ lib.optional stdenv.isDarwin [
+                    CoreFoundation gcc.cc.lib libiconv perl openssl
+                  ];
+
+    postUnpack = ''
+      ${lib.optionalString stdenv.isLinux ''
+        cp ${stdenv.cc.cc}/include/c++/${lib.getVersion stdenv.cc.cc}/stdlib.h \
+          $sourceRoot/sulong/projects/com.oracle.truffle.llvm.libraries.bitcode/include
+      ''}
+      cp ${truffleMake} $TMPDIR/truffle.make
+      rm $sourceRoot/truffle/src/libffi/patches/others/0001-Add-mx-bootstrap-Makefile.patch
+
+      # a fake mercurial dir to prevent mx crash and supply the version to mx
+      ( cd $sourceRoot
+        hg init
+        hg add
+        hg commit -m 'dummy commit'
+        hg tag      ${lib.escapeShellArg src.rev}
+        hg checkout ${lib.escapeShellArg src.rev}
+      )
+
+      # make a copy of jvmci8
+      mkdir $NIX_BUILD_TOP/jvmci8
+      cp -dpR ${jvmci8}/* $NIX_BUILD_TOP/jvmci8
+      chmod +w -R $NIX_BUILD_TOP/jvmci8
+      export MX_CACHE_DIR=${makeMxCache graal-mxcache}
+      export MX_GIT_CACHE_DIR=$NIX_BUILD_TOP/mxgitcache
+      ${makeMxGitCache graal-mxcachegit "$MX_GIT_CACHE_DIR"}
+      cd $TMPDIR
+    '';
+
+    postPatch = ''
+      substituteInPlace substratevm/src/com.oracle.svm.core.posix/src/com/oracle/svm/core/posix/headers/PosixDirectives.java \
+        --replace '<zlib.h>' '<${zlib.dev}/include/zlib.h>'
+      substituteInPlace substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/image/CCLinkerInvocation.java \
+        --replace 'cmd.add("-v");' 'cmd.add("-v"); cmd.add("-L${zlib}/lib");'
+
+      # For debugging native-image build, add this replace statement on CCompilerInvoker.java
+      # --replace '(String line : lines) {' '(String line : lines) {System.out.println("DEBUG: " + line);'
+      ${if stdenv.isLinux then ''
+          substituteInPlace substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/c/codegen/CCompilerInvoker.java \
+            --replace 'command.add(Platform.includedIn(Platform.WINDOWS.class) ? "CL" : "gcc");' \
+                      'command.add(Platform.includedIn(Platform.WINDOWS.class) ? "CL" : "${stdenv.cc}/bin/gcc");' ''
+        else ''
+          substituteInPlace substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/c/codegen/CCompilerInvoker.java \
+            --replace 'command.add(Platform.includedIn(Platform.WINDOWS.class) ? "CL" : "gcc");' \
+                      'command.add(Platform.includedIn(Platform.WINDOWS.class) ? "CL" : "${gcc.cc}/bin/gcc");
+                       command.add("-F"); command.add("${CoreFoundation}/Library/Frameworks");
+                       command.add("-framework"); command.add("CoreFoundation");'
+       ''}
+
+      # prevent cyclical imports caused by identical <include> names
+      substituteInPlace substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/image/CCLinkerInvocation.java \
+        --replace 'protected String compilerCommand = "cc";' 'protected String compilerCommand = "${stdenv.cc}/bin/cc";'
+      # dragonegg can't seem to compile on nix, so let's not require it
+      substituteInPlace sulong/mx.sulong/suite.py \
+        --replace '"requireDragonegg" : True,' '"requireDragonegg" : False,'
+      substituteInPlace truffle/mx.truffle/mx_truffle.py \
+        --replace 'os.path.relpath(self.subject.delegate.dir, self.subject.suite.vc_dir)' \
+                  'self.subject.delegate.dir'
+      substituteInPlace sulong/projects/bootstrap-toolchain-launchers/Makefile \
+        --replace /bin/bash ${bash}/bin/bash
+      # Patch the native-image template, as it will be run during build
+      chmod +x vm/mx.vm/launcher_template.sh && patchShebangs vm/mx.vm
+      # Prevent random errors from too low maxRuntimecompilemethods
+      substituteInPlace truffle/mx.truffle/macro-truffle.properties \
+        --replace '-H:MaxRuntimeCompileMethods=1400' \
+                  '-H:MaxRuntimeCompileMethods=28000'
+      ${lib.optionalString stdenv.isDarwin ''
+        substituteInPlace truffle/src/com.oracle.truffle.nfi.test.native/src/object.cc \
+          --replace '#include <stdlib.h>' ""
+      ''}
+      ${lib.optionalString stdenv.isLinux ''
+        substituteInPlace sulong/projects/com.oracle.truffle.llvm.libraries.bitcode/include/stdlib.h \
+          --replace '# include <cstdlib>' '# include "${stdenv.cc.cc}/include/c++/${lib.getVersion stdenv.cc.cc}/cstdlib"'
+      ''}
+    '';
+
+    buildPhase = ''
+      export MX_ALT_OUTPUT_ROOT=$NIX_BUILD_TOP/mxbuild
+      export MX_GIT_CACHE='refcache'
+      export JVMCI_VERSION_CHECK='ignore'
+      export JAVA_HOME=$NIX_BUILD_TOP/jvmci8
+      export FASTR_RELEASE=true
+      export PKG_LDFLAGS_OVERRIDE="-L${pcre.out}/lib -L${zlib}/lib -L${gfortran.cc.lib}/lib64"
+      ${lib.optionalString stdenv.isDarwin ''
+        export CC="gcc"
+        export CPP="gcc -E"
+        export NIX_CXXSTDLIB_LINK=""
+        export NIX_CXXSTDLIB_LINK_FOR_TARGET=""
+        export OPENSSL_PREFIX=$(realpath openssl)
+        # this fixes error: impure path 'LibFFIHeaderDirectives' used in link
+        export NIX_ENFORCE_PURITY=0
+      ''}
+      ( cd vm
+        mx-internal -v --suite sdk --suite compiler --suite vm --suite tools --suite regex --suite truffle \
+                       --dynamicimports /substratevm,/sulong,graal-js,graalpython,fastr,truffleruby build
+      )
+    '';
+
+    installPhase =
+      (if stdenv.isDarwin then ''
+      mkdir -p $out
+      rm -rf $MX_ALT_OUTPUT_ROOT/vm/darwin-amd64/GRAALVM_*STAGE1*
+      cp -rf $MX_ALT_OUTPUT_ROOT/vm/darwin-amd64/GRAALVM*/graalvm-unknown-${version}/* $out
+      ''
+       else ''
+      mkdir -p $out
+      rm -rf $MX_ALT_OUTPUT_ROOT/vm/linux-amd64/GRAALVM_*STAGE1*
+      cp -rf $MX_ALT_OUTPUT_ROOT/vm/linux-amd64/GRAALVM*/graalvm-unknown-${version}/* $out
+
+      # BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html
+      substituteInPlace $out/jre/lib/security/java.security \
+        --replace file:/dev/random    file:/dev/./urandom \
+        --replace NativePRNGBlocking  SHA1PRNG
+      # copy static and dynamic libraries needed for static compilation
+      cp -rf ${glibc}/lib/* $out/jre/lib/svm/clibraries/linux-amd64/
+      cp ${glibc.static}/lib/* $out/jre/lib/svm/clibraries/linux-amd64/
+      cp ${zlib.static}/lib/libz.a $out/jre/lib/svm/clibraries/linux-amd64/libz.a
+    '');
+
+    inherit (jvmci8) preFixup;
+    dontStrip = true; # stripped javac crashes with "segmentaion fault"
+    doInstallCheck = true;
+    installCheckPhase = ''
+      echo ${lib.escapeShellArg ''
+               public class HelloWorld {
+                 public static void main(String[] args) {
+                   System.out.println("Hello World");
+                 }
+               }
+             ''} > HelloWorld.java
+      $out/bin/javac HelloWorld.java
+
+      # run on JVM with Graal Compiler
+      $out/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler HelloWorld
+      $out/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler HelloWorld | fgrep 'Hello World'
+
+      # Ahead-Of-Time compilation
+      $out/bin/native-image --no-server HelloWorld
+      ./helloworld
+      ./helloworld | fgrep 'Hello World'
+
+      ${lib.optionalString stdenv.isLinux
+        ''
+          # Ahead-Of-Time compilation with --static (supported on linux only)
+          $out/bin/native-image --no-server --static HelloWorld
+          ./helloworld
+          ./helloworld | fgrep 'Hello World'
+        ''}
+         '';
+    enableParallelBuilding = true;
+    passthru.home = graalvm8;
+
+    meta = with stdenv.lib; {
+      homepage = "https://github.com/oracle/graal";
+      description = "High-Performance Polyglot VM";
+      license = licenses.gpl2;
+      maintainers = with maintainers; [ volth hlolli ];
+      platforms = [ "x86_64-linux" "x86_64-darwin" /*"aarch64-linux"*/ ];
+    };
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/enterprise-edition.nix b/nixpkgs/pkgs/development/compilers/graalvm/enterprise-edition.nix
new file mode 100644
index 000000000000..89896c556efa
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/graalvm/enterprise-edition.nix
@@ -0,0 +1,175 @@
+{ stdenv, requireFile, perl, unzip, glibc, zlib, bzip2, gdk-pixbuf, xorg, glib, fontconfig, freetype, cairo, pango, gtk3, gtk2, ffmpeg_3, libGL, atk, alsaLib, libav_0_8, setJavaClassPath }:
+
+let
+  common = javaVersion:
+    let
+      graalvmXXX-ee = stdenv.mkDerivation rec {
+        pname = "graalvm${javaVersion}-ee";
+        version = "20.0.0";
+        srcs = [
+          (requireFile {
+             name   = "graalvm-ee-java${javaVersion}-linux-amd64-${version}.tar.gz";
+             sha256 = {  "8" = "2df9b31b96f7a24b6a2fe3ecea0b5e819d5d058fde6320016dba1787ce59e99e";
+                        "11" = "b704fd27b5993584a1ad659b41f42ff0ae8893c066b64a6f6a1719fbee382536";
+                      }.${javaVersion};
+             url    = "https://www.oracle.com/technetwork/graalvm/downloads/index.html";
+          })
+          (requireFile {
+             name   = "native-image-installable-svm-svmee-java${javaVersion}-linux-amd64-${version}.jar";
+             sha256 = {  "8" = "a9f3f86d880d133bd24ad3b1d95129a96e80ea1d8fbc865d09e9410b921e6897";
+                        "11" = "57086123a95f1e9d4e67b92f830bad9325431908c69a40ef10f28ed586d8bd35";
+                      }.${javaVersion};
+             url    = "https://www.oracle.com/technetwork/graalvm/downloads/index.html";
+          })
+          (requireFile {
+             name   = "ruby-installable-svm-svmee-java${javaVersion}-linux-amd64-${version}.jar";
+             sha256 = {  "8" = "28b2910736f41070c84b97f1b1a3c5fa43ebdcd926ec92c8f145550b5b975b3c";
+                        "11" = "27ff1befa67fe5cc9eb0216b6b1105876f44d13eff6137f36f29f13377ea687b";
+                      }.${javaVersion};
+             url    = "https://www.oracle.com/technetwork/graalvm/downloads/index.html";
+          })
+          (requireFile {
+             name   = "python-installable-svm-svmee-java${javaVersion}-linux-amd64-${version}.jar";
+             sha256 = {  "8" = "9c83bcd71e316805c2914c9002ce348ae44829606adc2375d9188b1eaaaf82f9";
+                        "11" = "5ca51478bcb5ea5bd9be35856dd7fb2ef03b888cd1b7284a8c15531979025fb4";
+                      }.${javaVersion};
+             url    = "https://www.oracle.com/technetwork/graalvm/downloads/index.html";
+          })
+          (requireFile {
+             name   = "wasm-installable-svm-svmee-java${javaVersion}-linux-amd64-${version}.jar";
+             sha256 = {  "8" = "e8bd14d3f9bf652104e4346e0899a0351afaecae030a9c0ce0f91b1f93d9e660";
+                        "11" = "d24eeb84625bb7a5e330b897fd6dde7fc579a687997b64625199c33fa83c40b4";
+                      }.${javaVersion};
+             url    = "https://www.oracle.com/technetwork/graalvm/downloads/index.html";
+          })
+        ];
+        nativeBuildInputs = [ unzip perl ];
+        unpackPhase = ''
+          unpack_jar() {
+            jar=$1
+            unzip $jar -d $out
+            perl -ne 'use File::Path qw(make_path);
+                      use File::Basename qw(dirname);
+                      if (/^(.+) = (.+)$/) {
+                        make_path dirname("$ENV{out}/$1");
+                        system "ln -s $2 $ENV{out}/$1";
+                      }' $out/META-INF/symlinks
+            perl -ne 'if (/^(.+) = ([r-])([w-])([x-])([r-])([w-])([x-])([r-])([w-])([x-])$/) {
+                        my $mode = ($2 eq 'r' ? 0400 : 0) + ($3 eq 'w' ? 0200 : 0) + ($4  eq 'x' ? 0100 : 0) +
+                                   ($5 eq 'r' ? 0040 : 0) + ($6 eq 'w' ? 0020 : 0) + ($7  eq 'x' ? 0010 : 0) +
+                                   ($8 eq 'r' ? 0004 : 0) + ($9 eq 'w' ? 0002 : 0) + ($10 eq 'x' ? 0001 : 0);
+                        chmod $mode, "$ENV{out}/$1";
+                      }' $out/META-INF/permissions
+            rm -rf $out/META-INF
+          }
+
+          mkdir -p $out
+          arr=($srcs)
+          tar xf ''${arr[0]} -C $out --strip-components=1
+          unpack_jar ''${arr[1]}
+          unpack_jar ''${arr[2]}
+          unpack_jar ''${arr[3]}
+          unpack_jar ''${arr[4]}
+        '';
+
+        installPhase = {
+          "8" = ''
+            # BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html
+            substituteInPlace $out/jre/lib/security/java.security \
+              --replace file:/dev/random    file:/dev/./urandom \
+              --replace NativePRNGBlocking  SHA1PRNG
+
+            # provide libraries needed for static compilation
+            for f in ${glibc}/lib/* ${glibc.static}/lib/* ${zlib.static}/lib/*; do
+              ln -s $f $out/jre/lib/svm/clibraries/linux-amd64/$(basename $f)
+            done
+
+            # allow using external truffle-api.jar and languages not included in the distrubution
+            rm $out/jre/lib/jvmci/parentClassLoader.classpath
+          '';
+          "11" = ''
+            # BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html
+            substituteInPlace $out/conf/security/java.security \
+              --replace file:/dev/random    file:/dev/./urandom \
+              --replace NativePRNGBlocking  SHA1PRNG
+
+            # provide libraries needed for static compilation
+            for f in ${glibc}/lib/* ${glibc.static}/lib/* ${zlib.static}/lib/*; do
+              ln -s $f $out/lib/svm/clibraries/linux-amd64/$(basename $f)
+            done
+           '';
+        }.${javaVersion};
+
+        dontStrip = true;
+
+        # copy-paste openjdk's preFixup
+        preFixup = ''
+          # Set JAVA_HOME automatically.
+          mkdir -p $out/nix-support
+          cat <<EOF > $out/nix-support/setup-hook
+            if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
+          EOF
+        '';
+
+        postFixup = ''
+          rpath="${ {  "8" = "$out/jre/lib/amd64/jli:$out/jre/lib/amd64/server:$out/jre/lib/amd64";
+                      "11" = "$out/lib/jli:$out/lib/server:$out/lib";
+                    }.${javaVersion}
+                 }:${
+            stdenv.lib.strings.makeLibraryPath [ glibc xorg.libXxf86vm xorg.libX11 xorg.libXext xorg.libXtst xorg.libXi xorg.libXrender
+                                                 glib zlib bzip2 alsaLib fontconfig freetype pango gtk3 gtk2 cairo gdk-pixbuf atk ffmpeg_3 libGL ]}"
+
+          for f in $(find $out -type f -perm -0100); do
+            patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$f" || true
+            patchelf --set-rpath   "$rpath"                                    "$f" || true
+          done
+
+          for f in $(find $out -type f -perm -0100); do
+            if ldd "$f" | fgrep 'not found'; then echo "in file $f"; fi
+          done
+        '';
+
+        propagatedBuildInputs = [ setJavaClassPath zlib ]; # $out/bin/native-image needs zlib to build native executables
+
+        doInstallCheck = true;
+        installCheckPhase = ''
+          echo ${stdenv.lib.escapeShellArg ''
+                   public class HelloWorld {
+                     public static void main(String[] args) {
+                       System.out.println("Hello World");
+                     }
+                   }
+                 ''} > HelloWorld.java
+          $out/bin/javac HelloWorld.java
+
+          # run on JVM with Graal Compiler
+          $out/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler HelloWorld
+          $out/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler HelloWorld | fgrep 'Hello World'
+
+          # Ahead-Of-Time compilation
+          $out/bin/native-image --no-server HelloWorld
+          ./helloworld
+          ./helloworld | fgrep 'Hello World'
+
+          # Ahead-Of-Time compilation with --static
+          $out/bin/native-image --no-server --static HelloWorld
+          ./helloworld
+          ./helloworld | fgrep 'Hello World'
+        '';
+
+        passthru.home = graalvmXXX-ee;
+
+        meta = with stdenv.lib; {
+          homepage = "https://www.graalvm.org/";
+          description = "High-Performance Polyglot VM";
+          license = licenses.unfree;
+          maintainers = with maintainers; [ volth hlolli ];
+          platforms = [ "x86_64-linux" ];
+        };
+      };
+    in
+      graalvmXXX-ee;
+in {
+  graalvm8-ee  = common  "8";
+  graalvm11-ee = common "11";
+}
diff --git a/nixpkgs/pkgs/development/compilers/graalvm/truffle.make b/nixpkgs/pkgs/development/compilers/graalvm/truffle.make
new file mode 100644
index 000000000000..ec357446a5df
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/graalvm/truffle.make
@@ -0,0 +1,16 @@
+# This Makefile is used by mx to bootstrap libffi build.
+
+# `make MX_VERBOSE=y` will report all lines executed. The actual value doesn't
+# matter as long as it's not empty.
+
+QUIETLY$(MX_VERBOSE) = @
+
+.PHONY: default
+
+default:
+	sed -i "s|-print-multi-os-directory||g" ../$(SOURCES)/configure
+	$(QUIETLY) echo CONFIGURE libffi
+	$(QUIETLY) mkdir ../$(OUTPUT)
+	$(QUIETLY) cd ../$(OUTPUT) && ../$(SOURCES)/configure $(CONFIGURE_ARGS)
+	$(QUIETLY) echo MAKE libffi
+	$(QUIETLY) $(MAKE) -C ../$(OUTPUT)
diff --git a/nixpkgs/pkgs/development/compilers/gwt/2.4.0.nix b/nixpkgs/pkgs/development/compilers/gwt/2.4.0.nix
new file mode 100644
index 000000000000..14bf940fadf1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/gwt/2.4.0.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl, unzip }:
+
+stdenv.mkDerivation {
+  name = "gwt-java-2.4.0";
+
+  src = fetchurl {
+    url = "https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/google-web-toolkit/gwt-2.4.0.zip";
+    sha256 = "1gvyg00vx7fdqgfl2w7nhql78clg3abs6fxxy7m03pprdm5qmm17";
+  };
+
+  buildInputs = [ unzip ];
+
+  installPhase = ''
+    mkdir -p $out
+    unzip $src
+    mv gwt-2.4.0 $out/bin
+  '';
+
+  meta = {
+    homepage = "http://www.gwtproject.org/";
+    description = "A development toolkit for building and optimizing complex browser-based applications";
+    license = stdenv.lib.licenses.asl20;
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/halide/default.nix b/nixpkgs/pkgs/development/compilers/halide/default.nix
new file mode 100644
index 000000000000..356ebe231729
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/halide/default.nix
@@ -0,0 +1,67 @@
+{ llvmPackages, lib, fetchFromGitHub, cmake
+, libpng, libjpeg, mesa, eigen
+, openblas, blas, lapack
+}:
+
+assert blas.implementation == "openblas" && lapack.implementation == "openblas";
+
+let
+  version = "2019_08_27";
+
+in llvmPackages.stdenv.mkDerivation {
+
+  name = "halide-${builtins.replaceStrings ["_"] ["."] version}";
+
+  src = fetchFromGitHub {
+    owner = "halide";
+    repo = "Halide";
+    rev = "release_${version}";
+    sha256 = "09xf8v9zyxx2fn6s1yzjkyzcf9zyzrg3x5vivgd2ljzbfhm8wh7n";
+  };
+
+  patches = [ ./nix.patch ];
+
+  # clang fails to compile intermediate code because
+  # of unused "--gcc-toolchain" option
+  postPatch = ''
+    sed -i "s/-Werror//" src/CMakeLists.txt
+  '';
+
+  cmakeFlags = [ "-DWARNINGS_AS_ERRORS=OFF" ];
+
+  # To handle the lack of 'local' RPATH; required, as they call one of
+  # their built binaries requiring their libs, in the build process.
+  preBuild = ''
+    export LD_LIBRARY_PATH="$(pwd)/lib''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
+  '';
+
+  enableParallelBuilding = true;
+
+  # Note: only openblas and not atlas part of this Nix expression
+  # see pkgs/development/libraries/science/math/liblapack/3.5.0.nix
+  # to get a hint howto setup atlas instead of openblas
+  buildInputs = [ llvmPackages.llvm libpng libjpeg mesa eigen openblas ];
+
+  nativeBuildInputs = [ cmake ];
+
+  # No install target for cmake available.
+  # Calling install target in Makefile causes complete rebuild
+  # and the library rpath is broken, because libncursesw.so.6 is missing.
+  # Another way is using "make halide_archive", but the tarball is not easy
+  # to disassemble.
+  installPhase = ''
+    find
+    mkdir -p "$out/lib" "$out/bin"
+    cp bin/HalideTrace* "$out/bin"
+    cp lib/libHalide.so "$out/lib"
+    cp -r include "$out"
+  '';
+
+  meta = with lib; {
+    description = "C++ based language for image processing and computational photography";
+    homepage = "https://halide-lang.org";
+    license = licenses.mit;
+    platforms = [ "i686-linux" "x86_64-linux" ];
+    maintainers = [ maintainers.ck3d ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/halide/nix.patch b/nixpkgs/pkgs/development/compilers/halide/nix.patch
new file mode 100644
index 000000000000..fb9bbf1a4cf7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/halide/nix.patch
@@ -0,0 +1,56 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4ba384324..7e23038f7 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -75,10 +75,10 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
+ 
+ set(LLVM_VERSION "${LLVM_VERSION_MAJOR}${LLVM_VERSION_MINOR}")
+ 
+-file(TO_NATIVE_PATH "${LLVM_TOOLS_BINARY_DIR}/llvm-as${CMAKE_EXECUTABLE_SUFFIX}" LLVM_AS)
+-file(TO_NATIVE_PATH "${LLVM_TOOLS_BINARY_DIR}/llvm-nm${CMAKE_EXECUTABLE_SUFFIX}" LLVM_NM)
+-file(TO_NATIVE_PATH "${LLVM_TOOLS_BINARY_DIR}/clang${CMAKE_EXECUTABLE_SUFFIX}" CLANG)
+-file(TO_NATIVE_PATH "${LLVM_TOOLS_BINARY_DIR}/llvm-config${CMAKE_EXECUTABLE_SUFFIX}" LLVM_CONFIG)
++find_program(LLVM_AS llvm-as HINTS ${LLVM_TOOLS_BINARY_DIR})
++find_program(LLVM_NM llvm-nm HINTS ${LLVM_TOOLS_BINARY_DIR})
++find_program(CLANG clang HINTS ${LLVM_TOOLS_BINARY_DIR})
++find_program(LLVM_CONFIG llvm-config HINTS ${LLVM_TOOLS_BINARY_DIR})
+ 
+ # LLVM doesn't appear to expose --system-libs via its CMake interface,
+ # so we must shell out to llvm-config to find this info
+diff --git a/apps/linear_algebra/CMakeLists.txt b/apps/linear_algebra/CMakeLists.txt
+index 132c80e6a..36ce865f2 100644
+--- a/apps/linear_algebra/CMakeLists.txt
++++ b/apps/linear_algebra/CMakeLists.txt
+@@ -26,7 +26,7 @@ if (CBLAS_FOUND)
+   #  Atlas requires also linking against its provided libcblas for cblas symbols
+   set(ATLAS_EXTRA_LIBS cblas) # XXX fragile
+   set(OpenBLAS_EXTRA_LIBS)
+-  set(BLAS_VENDORS OpenBLAS ATLAS)
++  set(BLAS_VENDORS OpenBLAS)
+ 
+   # TODO
+   # there are more vendors we could add here that support the cblas interface
+@@ -41,6 +41,7 @@ if (CBLAS_FOUND)
+       message(STATUS " ${BLAS_VENDOR}: Missing")
+     else()
+       message(STATUS " ${BLAS_VENDOR}: Found")
++      set(BLAS_LIBRARIES "${BLAS_LIBRARIES}" CACHE FILEPATH "BLAS library to use")
+       list(APPEND BLAS_VENDORS ${NAME})
+     endif()
+   endforeach()
+diff --git a/apps/linear_algebra/tests/CMakeLists.txt b/apps/linear_algebra/tests/CMakeLists.txt
+index cc02eb0a4..c20419a0d 100644
+--- a/apps/linear_algebra/tests/CMakeLists.txt
++++ b/apps/linear_algebra/tests/CMakeLists.txt
+@@ -19,7 +19,7 @@ target_compile_options(test_halide_blas PRIVATE -Wno-unused-variable)
+ target_link_libraries(test_halide_blas
+   PRIVATE
+    halide_blas
+-   cblas # XXX fragile
++   ${BLAS_LIBRARIES}
+    ${HALIDE_COMPILER_LIB}
+ )
+ 
+-- 
+2.23.0
+
diff --git a/nixpkgs/pkgs/development/compilers/haxe/default.nix b/nixpkgs/pkgs/development/compilers/haxe/default.nix
new file mode 100644
index 000000000000..a3110c0c1af1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/haxe/default.nix
@@ -0,0 +1,103 @@
+{ stdenv, fetchgit, coreutils, ocamlPackages, zlib, pcre, neko }:
+
+let inherit (ocamlPackages) ocaml camlp4; in
+
+let
+  generic = { version, sha256, prePatch }:
+    stdenv.mkDerivation {
+      pname = "haxe";
+      inherit version;
+
+      buildInputs = [ocaml zlib pcre neko camlp4];
+
+      src = fetchgit {
+        url = "https://github.com/HaxeFoundation/haxe.git";
+        inherit sha256;
+        fetchSubmodules = true;
+        rev = "refs/tags/${version}";
+      };
+
+      inherit prePatch;
+
+      buildFlags = [ "all" "tools" ];
+
+      installPhase = ''
+        install -vd "$out/bin" "$out/lib/haxe/std"
+        cp -vr haxe haxelib std "$out/lib/haxe"
+
+        # make wrappers which provide a temporary HAXELIB_PATH with symlinks to multiple repositories HAXELIB_PATH may point to
+        for name in haxe haxelib; do
+        cat > $out/bin/$name <<EOF
+        #!{bash}/bin/bash
+
+        if [[ "\$HAXELIB_PATH" =~ : ]]; then
+          NEW_HAXELIB_PATH="\$(${coreutils}/bin/mktemp -d)"
+
+          IFS=':' read -ra libs <<< "\$HAXELIB_PATH"
+          for libdir in "\''${libs[@]}"; do
+            for lib in "\$libdir"/*; do
+              if [ ! -e "\$NEW_HAXELIB_PATH/\$(${coreutils}/bin/basename "\$lib")" ]; then
+                ${coreutils}/bin/ln -s "--target-directory=\$NEW_HAXELIB_PATH" "\$lib"
+              fi
+            done
+          done
+          export HAXELIB_PATH="\$NEW_HAXELIB_PATH"
+          $out/lib/haxe/$name "\$@"
+          rm -rf "\$NEW_HAXELIB_PATH"
+        else
+          exec $out/lib/haxe/$name "\$@"
+        fi
+        EOF
+        chmod +x $out/bin/$name
+        done
+      '';
+
+      setupHook = ./setup-hook.sh;
+
+      dontStrip = true;
+
+      # While it might be a good idea to run the upstream test suite, let's at
+      # least make sure we can actually run the compiler.
+      doInstallCheck = true;
+      installCheckPhase = ''
+        # Get out of the source directory to make sure the stdlib from the
+        # sources doesn't interfere with the installed one.
+        mkdir installcheck
+        pushd installcheck > /dev/null
+        cat >> InstallCheck.hx <<EOF
+        class InstallCheck {
+          public static function main() trace("test");
+        }
+        EOF
+        "$out/bin/haxe" -js installcheck.js -main InstallCheck
+        grep -q 'console\.log.*test' installcheck.js
+        popd > /dev/null
+      '';
+
+      meta = with stdenv.lib; {
+        description = "Programming language targeting JavaScript, Flash, NekoVM, PHP, C++";
+        homepage = "https://haxe.org";
+        license = with licenses; [ gpl2 bsd2 /*?*/ ];  # -> docs/license.txt
+        maintainers = [ maintainers.marcweber ];
+        platforms = platforms.linux ++ platforms.darwin;
+      };
+    };
+in {
+  # this old version is required to compile some libraries
+  haxe_3_2 = generic {
+    version = "3.2.1";
+    sha256 = "1x9ay5a2llq46fww3k07jxx8h1vfpyxb522snc6702a050ki5vz3";
+    prePatch = ''
+      sed -i -e 's|"/usr/lib/haxe/std/";|"'"$out/lib/haxe/std/"'";\n&|g' main.ml
+      sed -i -e 's|"neko"|"${neko}/bin/neko"|g' extra/haxelib_src/src/tools/haxelib/Main.hx
+    '';
+  };
+  haxe_3_4 = generic {
+    version = "3.4.6";
+    sha256 = "1myc4b8fwp0f9vky17wv45n34a583f5sjvajsc93f5gm1wanp4if";
+    prePatch = ''
+      sed -i -re 's!(let +prefix_path += +).*( +in)!\1"'"$out/"'"\2!' src/main.ml
+      sed -i -e 's|"neko"|"${neko}/bin/neko"|g' extra/haxelib_src/src/haxelib/client/Main.hx
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/haxe/setup-hook.sh b/nixpkgs/pkgs/development/compilers/haxe/setup-hook.sh
new file mode 100644
index 000000000000..e6496107a5ee
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/haxe/setup-hook.sh
@@ -0,0 +1,7 @@
+addHaxeLibPath() {
+  if [ ! -d "$1/lib/haxe/std" ]; then
+    addToSearchPath HAXELIB_PATH "$1/lib/haxe"
+  fi
+}
+
+addEnvHooks "$targetOffset" addHaxeLibPath
diff --git a/nixpkgs/pkgs/development/compilers/hhvm/default.nix b/nixpkgs/pkgs/development/compilers/hhvm/default.nix
new file mode 100644
index 000000000000..08ba9e468147
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/hhvm/default.nix
@@ -0,0 +1,68 @@
+{ stdenv, fetchgit, cmake, pkgconfig, boost, libunwind, libmemcached
+, pcre, libevent, gd, curl, libxml2, icu, flex, bison, openssl, zlib, php
+, expat, libcap, oniguruma, libdwarf, libmcrypt, tbb, gperftools, glog, libkrb5
+, bzip2, openldap, readline, libelf, uwimap, binutils, cyrus_sasl, pam, libpng
+, libxslt, freetype, gdb, git, perl, libmysqlclient, gmp, libyaml, libedit
+, libvpx, imagemagick, fribidi, gperf, which, ocamlPackages
+}:
+
+stdenv.mkDerivation rec {
+  pname = "hhvm";
+  version = "3.23.2";
+
+  # use git version since we need submodules
+  src = fetchgit {
+    url    = "https://github.com/facebook/hhvm.git";
+    rev    = "HHVM-${version}";
+    sha256 = "1nic49j8nghx82lgvz0b95r78sqz46qaaqv4nx48p8yrj9ysnd7i";
+    fetchSubmodules = true;
+  };
+
+  buildInputs =
+    [ cmake pkgconfig boost libunwind libmysqlclient libmemcached pcre gdb git perl
+      libevent gd curl libxml2 icu flex bison openssl zlib php expat libcap
+      oniguruma libdwarf libmcrypt tbb gperftools bzip2 openldap readline
+      libelf uwimap binutils cyrus_sasl pam glog libpng libxslt libkrb5
+      gmp libyaml libedit libvpx imagemagick fribidi gperf which
+      ocamlPackages.ocaml ocamlPackages.ocamlbuild
+    ];
+
+  patches = [
+    ./flexible-array-members-gcc6.patch
+  ];
+
+  enableParallelBuilding = true;
+  dontUseCmakeBuildDir = true;
+  NIX_LDFLAGS = "-lpam -L${pam}/lib";
+
+  # work around broken build system
+  NIX_CFLAGS_COMPILE = "-I${freetype.dev}/include/freetype2";
+
+  # the cmake package does not handle absolute CMAKE_INSTALL_INCLUDEDIR correctly
+  # (setting it to an absolute path causes include files to go to $out/$out/include,
+  #  because the absolute path is interpreted with root at $out).
+  cmakeFlags = [ "-DCMAKE_INSTALL_INCLUDEDIR=include" ];
+
+  prePatch = ''
+    substituteInPlace ./configure \
+      --replace "/usr/bin/env bash" ${stdenv.shell}
+    substituteInPlace ./third-party/ocaml/CMakeLists.txt \
+      --replace "/bin/bash" ${stdenv.shell}
+    perl -pi -e 's/([ \t(])(isnan|isinf)\(/$1std::$2(/g' \
+      hphp/runtime/base/*.cpp \
+      hphp/runtime/ext/std/*.cpp \
+      hphp/runtime/ext_zend_compat/php-src/main/*.cpp \
+      hphp/runtime/ext_zend_compat/php-src/main/*.h
+    sed '1i#include <functional>' -i third-party/mcrouter/src/mcrouter/lib/cycles/Cycles.h
+    patchShebangs .
+  '';
+
+  meta = {
+    description = "High-performance JIT compiler for PHP/Hack";
+    homepage    = "https://hhvm.com";
+    license     = "PHP/Zend";
+    platforms   = [ "x86_64-linux" ];
+    maintainers = [ stdenv.lib.maintainers.thoughtpolice ];
+    broken = true; # Since 2018-04-21, see https://hydra.nixos.org/build/73059373
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/hhvm/flexible-array-members-gcc6.patch b/nixpkgs/pkgs/development/compilers/hhvm/flexible-array-members-gcc6.patch
new file mode 100644
index 000000000000..61b6e5e8d8c3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/hhvm/flexible-array-members-gcc6.patch
@@ -0,0 +1,20 @@
+diff --git a/third-party/re2/src/re2/dfa.cc b/third-party/re2/src/re2/dfa.cc
+index 483f678..3aa3610 100644
+--- a/third-party/re2/src/re2/dfa.cc
++++ b/third-party/re2/src/re2/dfa.cc
+@@ -101,8 +101,13 @@ class DFA {
+     uint flag_;         // Empty string bitfield flags in effect on the way
+                         // into this state, along with kFlagMatch if this
+                         // is a matching state.
+-    std::atomic<State*> next_[];    // Outgoing arrows from State,
+-                        // one per input byte class
++// Work around the bug affecting flexible array members in GCC 6.1 and 6.2.
++// (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70932)
++#if !defined(__clang__) && defined(__GNUC__) && __GNUC__ == 6 && __GNUC_MINOR__ >= 1
++    std::atomic<State*> next_[0];   // Outgoing arrows from State, one per input byte class
++#else
++    std::atomic<State*> next_[];    // Outgoing arrows from State, one per input byte class
++#endif
+   };
+
+   enum {
diff --git a/nixpkgs/pkgs/development/compilers/hop/default.nix b/nixpkgs/pkgs/development/compilers/hop/default.nix
new file mode 100644
index 000000000000..f63f4169bc36
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/hop/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl, bigloo }:
+
+stdenv.mkDerivation rec {
+  name = "hop-2.5.1";
+  src = fetchurl {
+    url = "ftp://ftp-sop.inria.fr/indes/fp/Hop/${name}.tar.gz";
+    sha256 = "1bvp7pc71bln5yvfj87s8750c6l53wjl6f8m12v62q9926adhwys";
+  };
+
+  buildInputs = [ bigloo ];
+
+  preConfigure = ''
+    export NIX_LDFLAGS="$NIX_LDFLAGS -lbigloogc-4.1a";
+  '';
+
+  configureFlags = [
+    "--bigloo=${bigloo}/bin/bigloo"
+    "--bigloolibdir=${bigloo}/lib/bigloo/4.1a/"
+  ];
+
+  meta = with stdenv.lib; {
+    description = "A multi-tier programming language for the Web 2.0 and the so-called diffuse Web";
+    homepage = "http://hop.inria.fr/";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ vbgl ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/iasl/default.nix b/nixpkgs/pkgs/development/compilers/iasl/default.nix
new file mode 100644
index 000000000000..d68fba1d624c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/iasl/default.nix
@@ -0,0 +1,30 @@
+{stdenv, fetchurl, fetchpatch, bison, flex}:
+
+stdenv.mkDerivation rec {
+  pname = "iasl";
+  version = "20200110";
+
+  src = fetchurl {
+    url = "https://acpica.org/sites/acpica/files/acpica-unix-${version}.tar.gz";
+    sha256 = "1cb6aa6acrixmdzvj9vv4qs9lmlsbkd27pjlz14i1kq1x3xn0gwx";
+  };
+
+  NIX_CFLAGS_COMPILE = "-O3";
+
+  buildFlags = [ "iasl" ];
+
+  buildInputs = [ bison flex ];
+
+  installPhase =
+    ''
+      install -d $out/bin
+      install generate/unix/bin*/iasl $out/bin
+    '';
+
+  meta = {
+    description = "Intel ACPI Compiler";
+    homepage = "http://www.acpica.org/";
+    license = stdenv.lib.licenses.iasl;
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/idris2/default.nix b/nixpkgs/pkgs/development/compilers/idris2/default.nix
new file mode 100644
index 000000000000..d2a071b61ddf
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/idris2/default.nix
@@ -0,0 +1,45 @@
+{ stdenv, fetchFromGitHub, makeWrapper
+, clang, chez
+}:
+
+# Uses scheme to bootstrap the build of idris2
+stdenv.mkDerivation rec {
+  name = "idris2";
+  version = "0.2.0";
+
+  src = fetchFromGitHub {
+    owner = "idris-lang";
+    repo = "Idris2";
+    rev = "v${version}";
+    sha256 = "153z6zgb90kglw8rspk8ph5gh5nkplhi27mxai6yqbbjs2glx5d4";
+  };
+
+  strictDeps = true;
+  nativeBuildInputs = [ makeWrapper clang chez ];
+  buildInputs = [ chez ];
+
+  prePatch = ''
+    patchShebangs --build tests
+  '';
+
+  makeFlags = [ "PREFIX=$(out)" ]
+    ++ stdenv.lib.optional stdenv.isDarwin "OS=";
+
+  # The name of the main executable of pkgs.chez is `scheme`
+  buildFlags = [ "bootstrap-build" "SCHEME=scheme" ];
+
+  checkTarget = "bootstrap-test";
+
+  # idris2 needs to find scheme at runtime to compile
+  postInstall = ''
+    wrapProgram "$out/bin/idris2" --set CHEZ "${chez}/bin/scheme"
+  '';
+
+  meta = {
+    description = "A purely functional programming language with first class types";
+    homepage = "https://github.com/idris-lang/Idris2";
+    license = stdenv.lib.licenses.bsd3;
+    maintainers = with stdenv.lib.maintainers; [ wchresta ];
+    inherit (chez.meta) platforms;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/inform7/default.nix b/nixpkgs/pkgs/development/compilers/inform7/default.nix
new file mode 100644
index 000000000000..62bd0142f323
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/inform7/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchzip, coreutils, perl, gnutar, gzip }:
+let
+  version = "6M62";
+in stdenv.mkDerivation {
+  pname = "inform7";
+  inherit version;
+  buildInputs = [ perl coreutils gnutar gzip ];
+  src = fetchzip {
+    url = "http://inform7.com/download/content/6M62/I7_6M62_Linux_all.tar.gz";
+    sha256 = "0bk0pfymvsn1g8ci0pfdw7dgrlzb232a8pc67y2xk6zgpf3m41vj";
+  };
+  preConfigure = "touch Makefile.PL";
+  buildPhase = "";
+  installPhase = ''
+    mkdir -p $out
+    pushd $src
+    ./install-inform7.sh --prefix $out
+    popd
+
+    substituteInPlace "$out/bin/i7" \
+      --replace "/usr/bin/perl" "${perl}/bin/perl"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A design system for interactive fiction.";
+    homepage = "http://inform7.com/";
+    license = licenses.artistic2;
+    maintainers = with maintainers; [ mbbx6spp ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/intel-graphics-compiler/default.nix b/nixpkgs/pkgs/development/compilers/intel-graphics-compiler/default.nix
new file mode 100644
index 000000000000..6374846f4407
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/intel-graphics-compiler/default.nix
@@ -0,0 +1,73 @@
+{ stdenv
+, fetchFromGitHub
+, cmake
+, pkgconfig
+
+, bison
+, flex
+, llvmPackages_8
+, opencl-clang
+, python
+, spirv-llvm-translator
+
+, buildWithPatches ? true
+}:
+
+let
+  llvmPkgs = llvmPackages_8 // {
+    inherit spirv-llvm-translator;
+  };
+  inherit (llvmPkgs) llvm;
+  inherit (if buildWithPatches then opencl-clang else llvmPkgs) clang clang-unwrapped spirv-llvm-translator;
+  inherit (stdenv.lib) getVersion optional optionals versionOlder versions;
+in
+
+stdenv.mkDerivation rec {
+  pname = "intel-graphics-compiler";
+  version = "1.0.4062";
+
+  src = fetchFromGitHub {
+    owner = "intel";
+    repo = "intel-graphics-compiler";
+    rev = "igc-${version}";
+    sha256 = "1fr9mb7s5f0kiwxf04lqbyqbxfsvki0kwnpcy41m3p3la22mqz47";
+  };
+
+  nativeBuildInputs = [ clang cmake bison flex llvm python ];
+
+  buildInputs = [ clang opencl-clang spirv-llvm-translator ];
+
+  # checkInputs = [ lit pythonPackages.nose ];
+
+  # FIXME: How do we run the test suite?
+  # https://github.com/intel/intel-graphics-compiler/issues/98
+  doCheck = false;
+
+  # Handholding the braindead build script
+  # We put this in a derivation because the cmake requires an absolute path
+  prebuilds = stdenv.mkDerivation {
+    name = "igc-cclang-prebuilds";
+    phases = [ "installPhase" ];
+    installPhase = ''
+      mkdir $out
+      ln -s ${clang}/bin/clang $out/
+      ln -s clang $out/clang-${versions.major (getVersion clang)}
+      ln -s ${opencl-clang}/lib/* $out/
+      ln -s ${clang-unwrapped}/lib/clang/${getVersion clang}/include/opencl-c.h $out/
+    '';
+  };
+
+  cmakeFlags = [
+    "-DCCLANG_BUILD_PREBUILDS=ON"
+    "-DCCLANG_BUILD_PREBUILDS_DIR=${prebuilds}"
+    "-DIGC_PREFERRED_LLVM_VERSION=${getVersion llvm}"
+  ];
+
+  meta = with stdenv.lib; {
+    homepage    = "https://github.com/intel/intel-graphics-compiler";
+    description = "LLVM-based compiler for OpenCL targeting Intel Gen graphics hardware";
+    license     = licenses.mit;
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ gloaming ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/intercal/default.nix b/nixpkgs/pkgs/development/compilers/intercal/default.nix
new file mode 100644
index 000000000000..8b91e3f2c6d8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/intercal/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, fetchurl
+, pkgconfig
+, bison, flex
+, makeWrapper }:
+
+with stdenv.lib;
+stdenv.mkDerivation rec {
+
+  pname = "intercal";
+  version = "0.31";
+
+  src = fetchurl {
+    url = "http://catb.org/esr/intercal/${pname}-${version}.tar.gz";
+    sha256 = "1z2gpa5rbqb7jscqlf258k0b0jc7d2zkyipb5csjpj6d3sw45n4k";
+  };
+
+  buildInputs =
+  [ pkgconfig bison flex makeWrapper ];
+
+  # Intercal invokes gcc, so we need an explicit PATH
+  postInstall = ''
+    wrapProgram $out/bin/ick --suffix PATH ':' ${stdenv.cc}/bin
+  '';
+
+  meta = {
+    description = "The original esoteric programming language";
+    longDescription = ''
+      INTERCAL, an abbreviation for "Compiler Language With No
+      Pronounceable Acronym", is a famously esoterical programming
+      language. It was created in 1972, by Donald R. Woods and James
+      M. Lyon, with the unusual goal of creating a language with no
+      similarities whatsoever to any existing programming
+      languages. The language largely succeeds in this goal, apart
+      from its use of an assignment statement.
+    '';
+    homepage = "http://www.catb.org/~esr/intercal/";
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.AndersonTorres ];
+    platforms = platforms.linux;
+  };
+}
+# TODO: investigate if LD_LIBRARY_PATH needs to be set
diff --git a/nixpkgs/pkgs/development/compilers/ios-cross-compile/9.2.nix b/nixpkgs/pkgs/development/compilers/ios-cross-compile/9.2.nix
new file mode 100644
index 000000000000..e64c0c912d94
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ios-cross-compile/9.2.nix
@@ -0,0 +1,65 @@
+{ stdenv, git, clang,
+  fetchFromGitHub, requireFile,
+  openssl, xz, gnutar,
+  automake, autoconf, libtool, clangStdenv } :
+
+clangStdenv.mkDerivation rec {
+  name = "ios-cross-compile-${version}";
+  version = "9.2";
+  sdk = "iPhoneOS9.2.sdk";
+  cctools_port = fetchFromGitHub {
+    owner = "tpoechtrager";
+    repo = "cctools-port";
+    rev = "7d405492b09fa27546caaa989b8493829365deab";
+    sha256 = "0nj1q5bqdx5jm68dispybxc7wnkb6p8p2igpnap9q6qyv2r9p07w";
+  };
+  ldid = fetchFromGitHub {
+    owner = "tpoechtrager";
+    repo = "ldid";
+    rev = "3064ed628108da4b9a52cfbe5d4c1a5817811400";
+    sha256 = "1a6zaz8fgbi239l5zqx9xi3hsrv3jmfh8dkiy5gmnjs6v4gcf6sf";
+  };
+  src = requireFile rec {
+    name = "iPhoneOS9.2.sdk.tar.xz";
+    sha256 = "1l2h3cic9psrq3nmfv9aaxkdk8y2pvr0iq6apj87mb3ms9a4cqrq";
+    message = ''
+      You need to do the following steps to get a prepared
+      ios tarball.
+
+      1) Download an XCode dmg, specifically XCode_7.2.dmg
+      2) Install darling-dmg, available via: nix-env -i darling-dmg
+      3) Follow this shell history:
+
+      $ cd ~/
+      $ mkdir xcode
+      $ darling-dmg Xcode_7.2dmg xcode
+      $ cd xcode/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
+      $ mktemp -d
+        /tmp/gar/tmp.4ZZ8kqyfqp/
+      $ mkdir /tmp/gar/tmp.4ZZ8kqyfqp/iPhoneOS9.2.sdk
+      $ cp -r iPhoneOS.sdk/* /tmp/gar/tmp.4ZZ8kqyfqp/iPhoneOS9.2.sdk
+      $ cp -r ../../../../Toolchains/XcodeDefault.xctoolchain/usr/include/c++/* \
+        /tmp/gar/tmp.4ZZ8kqyfqp/iPhoneOS9.2.sdk/usr/include/c++
+      $ tar -cf - * | xz -9 -c - > iPhoneOS9.2.sdk.tar.xz
+      $ cd ~/
+      $ fusermount -u xcode
+
+      Then do:
+
+      nix-prefetch-url file:///path/to/${name}
+
+      and run this installation again.
+   '';
+  };
+  buildInputs = [ git xz gnutar openssl automake autoconf libtool clang ];
+  alt_wrapper = ./alt_wrapper.c;
+  builder = ./9.2_builder.sh;
+  meta = {
+    description =
+    "Provides an iOS cross compiler from 7.1 up to iOS-${version} and ldid";
+    platforms = stdenv.lib.platforms.linux;
+    hydraPlatforms = [];
+    maintainers = with stdenv.lib.maintainers; [ fxfactorial ];
+    license = stdenv.lib.licenses.gpl2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/ios-cross-compile/9.2_builder.sh b/nixpkgs/pkgs/development/compilers/ios-cross-compile/9.2_builder.sh
new file mode 100644
index 000000000000..4604b1fdea72
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ios-cross-compile/9.2_builder.sh
@@ -0,0 +1,153 @@
+# -*- shell-script -*-
+source $stdenv/setup
+
+function extract
+{
+    printf "extracting $(basename $1) ...\n"
+    local tarflags="xf"
+
+    case "$1" in
+        *.tar.xz)
+	    xz -dc $1 | tar "$tarflags" - ;;
+	*)
+	    printf "Make sure you give a iPhoneOS9.2.sdk.tar.xz file \n" ;;
+    esac
+}
+
+function verify_arch {
+    case "$1" in
+	# Our good arches.
+	armv7|arm64) ;;
+	*)
+	    local
+	    acc="armv7 | arm64"
+	    error_message=$(
+		printf '%s is not an acceptable arch. Try one of %s' "$1" "$acc"
+			 )
+	    printf "$error_message\n"
+	    exit
+    esac
+}
+
+function verify_sdk_version {
+    sdk_version=$(basename "$1" | grep -P -o "[0-9].[0-9]+")
+    case "$sdk_version" in
+	# Make sure the SDK is correct.
+	[5-9].[0-9]) ;;
+	*)
+	    printf 'No iPhone SDK version in file name\n'
+    esac
+}
+
+function do_build {
+
+    if [ $# -lt 2 ]; then
+	printf "usage: $0 iPhoneOS.sdk.tar* <target cpu>\n" 1>&2
+	printf "i.e. $0 /path/to/iPhoneOS.sdk.tar.xz armv7\n" 1>&2
+	exit 1
+    fi
+
+    mkdir -p $out
+
+    chmod -R 755 "$cctools_port"
+
+    pushd "$cctools_port"/usage_examples/ios_toolchain &> /dev/null
+
+    export LC_ALL=C
+    
+    local
+    triple='%s-apple-darwin11'
+    target_dir="$PWD/target"
+    sdk_dir="$target_dir/SDK"
+    platform="$(uname -s)"
+    # Will be mutated by verify_sdk_version
+    sdk_version=
+
+    mkdir -p "$target_dir"
+    mkdir -p "$target_dir/bin"
+    mkdir -p "$sdk_dir"
+
+    verify_arch "$2"
+    verify_sdk_version "$1"
+
+    triple="$(printf "$triple" "$2")"
+    pushd "$sdk_dir" &>/dev/null
+    extract "$1"
+
+    local sys_lib=$(
+    	find $sdk_dir -name libSystem.dylib -o -name libSystem.tbd | head -n1
+    	  )
+
+    if [ -z "$sys_lib" ]; then
+    	printf "SDK should contain libSystem{.dylib,.tbd}\n" 1>&2
+    	exit 1
+    fi
+
+    local sys_root=$(readlink -f "$(dirname $sys_lib)/../..")
+
+    local sdk_unboxed=$(basename $sys_root)
+
+    mv -f "$sys_root"/* "$sdk_dir" || true
+
+    popd &>/dev/null
+
+    printf "\nbuilding wrapper\n"
+
+    printf "int main(){return 0;}" | clang -xc -O2 -o "$target_dir"/bin/dsymutil -
+
+    clang -O2 -std=c99 $alt_wrapper \
+    	  -DTARGET_CPU=$(printf '"%s"' "$2") \
+    	  -DNIX_APPLE_HDRS=$(
+    	printf '"%s"' "-I$out/$sdk/usr/include"
+    	  ) \
+    	  -DNIX_APPLE_FRAMEWORKS=$(
+    	printf '"%s"' "$out/$sdk/System/Library/Frameworks"
+    	  ) \
+    	  -DNIX_APPLE_PRIV_FRAMEWORKS=$(
+    	printf '"%s"' "$out/$sdk/System/Library/PrivateFrameworks"
+    	  ) \
+    	  -DOS_VER_MIN=$(printf '"%s"' "7.1") \
+    	  -o "$target_dir/bin/$triple-clang"
+
+    pushd "$target_dir"/bin &>/dev/null
+
+    cp "$triple"-clang "$triple"-clang++
+
+    popd &>/dev/null
+
+    printf "\nbuilding ldid\n"
+
+    mkdir -p tmp
+    pushd tmp &>/dev/null
+    pushd "$ldid" &>/dev/null
+
+    chmod -R 755 "$ldid"
+
+    make INSTALLPREFIX="$target_dir" -j4 install
+    popd &>/dev/null
+    popd &>/dev/null
+
+    printf "\nbuilding cctools / ld64\n"
+
+    pushd ../../cctools &>/dev/null
+    git clean -fdx . &>/dev/null || true
+    ./autogen.sh
+    ./configure --target="$triple" --prefix="$target_dir"
+    make -j4
+    make install &>/dev/null
+
+    popd &>/dev/null
+
+    local me=`whoami`
+
+    for d in bin libexec SDK; do
+    	chown -R $me:$me target/$d
+    	cp -R target/$d $out
+    done
+
+    # Crucial piece
+    rm -rf $out/$sdk
+    mv $out/SDK $out/$sdk
+}
+
+do_build $src armv7
diff --git a/nixpkgs/pkgs/development/compilers/ios-cross-compile/alt_wrapper.c b/nixpkgs/pkgs/development/compilers/ios-cross-compile/alt_wrapper.c
new file mode 100644
index 000000000000..928b64e6fd9d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ios-cross-compile/alt_wrapper.c
@@ -0,0 +1,212 @@
+/*
+  This and the shell builder was originally written by
+  https://github.com/tpoechtrager but I had to modify both so that
+  they played nicely and were reproducible with nixpkgs. Much thanks
+  to MixRank for letting me work on this.
+  Edgar Aroutiounian <edgar.factorial@gmail.com>
+ */
+
+#ifndef TARGET_CPU
+#define TARGET_CPU "armv7"
+#endif
+
+#ifndef OS_VER_MIN
+#define OS_VER_MIN "4.2"
+#endif
+
+#ifndef NIX_APPLE_HDRS
+#define NIX_APPLE_HDRS ""
+#endif
+
+#ifndef NIX_APPLE_FRAMEWORKS
+#define NIX_APPLE_FRAMEWORKS ""
+#endif
+
+#ifndef NIX_APPLE_PRIV_FRAMEWORKS
+#define NIX_APPLE_PRIV_FRAMEWORKS ""
+#endif
+
+#define _GNU_SOURCE
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <stddef.h>
+#include <unistd.h>
+#include <limits.h>
+
+#ifdef __APPLE__
+#include <mach-o/dyld.h>
+#endif
+
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+#include <sys/sysctl.h>
+#endif
+
+#ifdef __OpenBSD__
+#include <sys/types.h>
+#include <sys/user.h>
+#include <sys/stat.h>
+#endif
+
+char *get_executable_path(char *epath, size_t buflen)
+{
+  char *p;
+#ifdef __APPLE__
+  unsigned int l = buflen;
+  if (_NSGetExecutablePath(epath, &l) != 0) return NULL;
+#elif defined(__FreeBSD__) || defined(__DragonFly__)
+  int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
+  size_t l = buflen;
+  if (sysctl(mib, 4, epath, &l, NULL, 0) != 0) return NULL;
+#elif defined(__OpenBSD__)
+  int mib[4];
+  char **argv;
+  size_t len;
+  size_t l;
+  const char *comm;
+  int ok = 0;
+  mib[0] = CTL_KERN;
+  mib[1] = KERN_PROC_ARGS;
+  mib[2] = getpid();
+  mib[3] = KERN_PROC_ARGV;
+  if (sysctl(mib, 4, NULL, &len, NULL, 0) < 0)
+    abort();
+  if (!(argv = malloc(len)))
+    abort();
+  if (sysctl(mib, 4, argv, &len, NULL, 0) < 0)
+    abort();
+  comm = argv[0];
+  if (*comm == '/' || *comm == '.') {
+    char *rpath;
+    if ((rpath = realpath(comm, NULL))) {
+      strlcpy(epath, rpath, buflen);
+      free(rpath);
+      ok = 1;
+    }
+  } else {
+    char *sp;
+    char *xpath = strdup(getenv("PATH"));
+    char *path = strtok_r(xpath, ":", &sp);
+    struct stat st;
+    if (!xpath)
+      abort();
+    while (path) {
+      snprintf(epath, buflen, "%s/%s", path, comm);
+      if (!stat(epath, &st) && (st.st_mode & S_IXUSR)) {
+	ok = 1;
+	break;
+      }
+      path = strtok_r(NULL, ":", &sp);
+    }
+    free(xpath);
+  }
+  free(argv);
+  if (!ok) return NULL;
+  l = strlen(epath);
+#else
+  ssize_t l = readlink("/proc/self/exe", epath, buflen);
+#endif
+  if (l <= 0) return NULL;
+  epath[buflen - 1] = '\0';
+  p = strrchr(epath, '/');
+  if (p) *p = '\0';
+  return epath;
+}
+
+char *get_filename(char *str)
+{
+  char *p = strrchr(str, '/');
+  return p ? &p[1] : str;
+}
+
+void target_info(char *argv[], char **triple, char **compiler)
+{
+  char *p = get_filename(argv[0]);
+  char *x = strrchr(p, '-');
+  if (!x) abort();
+  *compiler = &x[1];
+  *x = '\0';
+  *triple = p;
+}
+
+void env(char **p, const char *name, char *fallback)
+{
+  char *ev = getenv(name);
+  if (ev) { *p = ev; return; }
+  *p = fallback;
+}
+
+int main(int argc, char *argv[])
+{
+  char **args = alloca(sizeof(char*) * (argc + 17));
+  int i, j;
+
+  char execpath[PATH_MAX+1];
+  char sdkpath[PATH_MAX+1];
+  char codesign_allocate[64];
+  char osvermin[64];
+
+  char *compiler, *target, *sdk, *cpu, *osmin;
+
+  target_info(argv, &target, &compiler);
+
+  if (!get_executable_path(execpath, sizeof(execpath))) abort();
+  snprintf(sdkpath, sizeof(sdkpath), "%s/../SDK", execpath);
+
+  snprintf(codesign_allocate, sizeof(codesign_allocate),
+	   "%s-codesign_allocate", target);
+
+  setenv("CODESIGN_ALLOCATE", codesign_allocate, 1);
+  setenv("IOS_FAKE_CODE_SIGN", "1", 1);
+
+  env(&sdk, "IOS_SDK_SYSROOT", sdkpath);
+  env(&cpu, "IOS_TARGET_CPU", TARGET_CPU);
+
+  env(&osmin, "IPHONEOS_DEPLOYMENT_TARGET", OS_VER_MIN);
+  unsetenv("IPHONEOS_DEPLOYMENT_TARGET");
+
+  snprintf(osvermin, sizeof(osvermin), "-miphoneos-version-min=%s", osmin);
+
+  for (i = 1; i < argc; ++i) {
+    if (!strcmp(argv[i], "-arch")) {
+      cpu = NULL;
+      break;
+    }
+  }
+
+  i = 0;
+
+  args[i++] = compiler;
+  args[i++] = "-target";
+  args[i++] = target;
+  args[i++] = "-isysroot";
+  args[i++] = sdk;
+  args[i++] = NIX_APPLE_HDRS;
+  args[i++] = "-F";
+  args[i++] = NIX_APPLE_FRAMEWORKS;
+  args[i++] = "-F";
+  args[i++] = NIX_APPLE_PRIV_FRAMEWORKS;
+
+  if (cpu) {
+    args[i++] = "-arch";
+    args[i++] = cpu;
+  }
+
+  args[i++] = osvermin;
+  args[i++] = "-mlinker-version=253.3";
+
+  for (j = 1; j < argc; ++i, ++j) args[i] = argv[j];
+
+  args[i] = NULL;
+
+  setenv("COMPILER_PATH", execpath, 1);
+  /* int k; */
+  /* for (k = 0; k < i; k++) */
+  /*   printf("Compiler option: %s\n", args[k]); */
+  /* printf("End of Compiler args\n"); */
+  execvp(compiler, args);
+
+  fprintf(stderr, "cannot invoke compiler, this is a serious bug\n");
+  return 1;
+}
diff --git a/nixpkgs/pkgs/development/compilers/ispc/default.nix b/nixpkgs/pkgs/development/compilers/ispc/default.nix
new file mode 100644
index 000000000000..01e1eaca6e1d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ispc/default.nix
@@ -0,0 +1,70 @@
+{ stdenv, fetchFromGitHub
+, cmake, which, m4, python3, bison, flex, llvmPackages
+
+  # the default test target is sse4, but that is not supported by all Hydra agents
+, testedTargets ? [ "sse2" ]
+}:
+
+stdenv.mkDerivation rec {
+  pname   = "ispc";
+  version = "1.13.0";
+
+  src = fetchFromGitHub {
+    owner  = pname;
+    repo   = pname;
+    rev    = "v${version}";
+    sha256 = "1l74xkpwwxc38k2ngg7mpvswziiy91yxslgfad6688hh1n5jvayd";
+  };
+
+  nativeBuildInputs = [ cmake which m4 bison flex python3 ];
+  buildInputs = with llvmPackages; [
+    # we need to link against libclang, so we need the unwrapped
+    llvm llvmPackages.clang-unwrapped
+  ];
+
+  postPatch = ''
+    substituteInPlace CMakeLists.txt \
+      --replace curses ncurses
+    substituteInPlace cmake/GenerateBuiltins.cmake \
+      --replace 'bit 32 64' 'bit 64'
+  '';
+
+  inherit testedTargets;
+
+  # needs 'transcendentals' executable, which is only on linux
+  doCheck = stdenv.isLinux;
+
+  # the compiler enforces -Werror, and -fno-strict-overflow makes it mad.
+  # hilariously this is something of a double negative: 'disable' the
+  # 'strictoverflow' hardening protection actually means we *allow* the compiler
+  # to do strict overflow optimization. somewhat misleading...
+  hardeningDisable = [ "strictoverflow" ];
+
+  checkPhase = ''
+    export ISPC_HOME=$PWD/bin
+    for target in $testedTargets
+    do
+      echo "Testing target $target"
+      echo "================================"
+      echo
+      (cd ../
+       PATH=${llvmPackages.clang}/bin:$PATH python run_tests.py -t $target --non-interactive --verbose --file=test_output.log
+       fgrep -q "No new fails"  test_output.log || exit 1)
+    done
+  '';
+
+  cmakeFlags = [
+    "-DCLANG_EXECUTABLE=${llvmPackages.clang}/bin/clang"
+    "-DISPC_INCLUDE_EXAMPLES=OFF"
+    "-DISPC_INCLUDE_UTILS=OFF"
+    "-DARM_ENABLED=FALSE"
+  ];
+
+  meta = with stdenv.lib; {
+    homepage    = "https://ispc.github.io/";
+    description = "Intel 'Single Program, Multiple Data' Compiler, a vectorised language";
+    license     = licenses.bsd3;
+    platforms   = [ "x86_64-linux" "x86_64-darwin" ]; # TODO: buildable on more platforms?
+    maintainers = with maintainers; [ aristid thoughtpolice ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/jasmin/default.nix b/nixpkgs/pkgs/development/compilers/jasmin/default.nix
new file mode 100644
index 000000000000..ef1b3055190e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/jasmin/default.nix
@@ -0,0 +1,44 @@
+{ stdenv
+, fetchurl
+, unzip
+, jdk
+, ant
+, makeWrapper
+, jre
+, callPackage
+}:
+
+stdenv.mkDerivation rec {
+  pname = "jasmin";
+  version = "2.4";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/jasmin/jasmin-${version}/jasmin-${version}.zip";
+    sha256 = "17a41vr96glcdrdbk88805wwvv1r6w8wg7if23yhd0n6rrl0r8ga";
+  };
+
+  nativeBuildInputs = [ unzip jdk ant makeWrapper ];
+
+  buildPhase = "ant all";
+  installPhase =
+  ''
+    install -Dm644 jasmin.jar $out/share/java/jasmin.jar
+    mkdir -p $out/bin
+    makeWrapper ${jre}/bin/java $out/bin/jasmin \
+      --add-flags "-jar $out/share/java/jasmin.jar"
+  '';
+
+  passthru.tests = {
+    minimal-module = callPackage ./test-assemble-hello-world {};
+  };
+
+  meta = with stdenv.lib; {
+    description = "An assembler for the Java Virtual Machine";
+    homepage = "http://jasmin.sourceforge.net/";
+    downloadPage = "https://sourceforge.net/projects/jasmin/files/latest/download";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ fgaz ];
+    platforms = platforms.all;
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/compilers/jasmin/test-assemble-hello-world/HelloWorld.j b/nixpkgs/pkgs/development/compilers/jasmin/test-assemble-hello-world/HelloWorld.j
new file mode 100644
index 000000000000..564e6c8a9aa2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/jasmin/test-assemble-hello-world/HelloWorld.j
@@ -0,0 +1,31 @@
+.class public HelloWorld
+.super java/lang/Object
+
+;
+; standard initializer (calls java.lang.Object's initializer)
+;
+.method public <init>()V
+   aload_0
+   invokenonvirtual java/lang/Object/<init>()V
+   return
+.end method
+
+;
+; main() - prints out Hello World
+;
+.method public static main([Ljava/lang/String;)V
+   .limit stack 2   ; up to two items can be pushed
+
+   ; push System.out onto the stack
+   getstatic java/lang/System/out Ljava/io/PrintStream;
+
+   ; push a string onto the stack
+   ldc "Hello World!"
+
+   ; call the PrintStream.println() method.
+   invokevirtual java/io/PrintStream/println(Ljava/lang/String;)V
+
+   ; done
+   return
+.end method
+
diff --git a/nixpkgs/pkgs/development/compilers/jasmin/test-assemble-hello-world/default.nix b/nixpkgs/pkgs/development/compilers/jasmin/test-assemble-hello-world/default.nix
new file mode 100644
index 000000000000..1840edffa779
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/jasmin/test-assemble-hello-world/default.nix
@@ -0,0 +1,12 @@
+{ stdenv, jasmin, jre }:
+
+stdenv.mkDerivation {
+  name = "jasmin-test-assemble-hello-world";
+  meta.timeout = 60;
+  buildCommand = ''
+    ${jasmin}/bin/jasmin ${./HelloWorld.j}
+    ${jre}/bin/java HelloWorld | grep "Hello World"
+    touch $out
+  '';
+}
+
diff --git a/nixpkgs/pkgs/development/compilers/javacard-devkit/default.nix b/nixpkgs/pkgs/development/compilers/javacard-devkit/default.nix
new file mode 100644
index 000000000000..5b691530d34b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/javacard-devkit/default.nix
@@ -0,0 +1,69 @@
+{ stdenv, requireFile, unzip, makeWrapper, oraclejdk8, autoPatchelfHook
+, pcsclite
+}:
+
+stdenv.mkDerivation rec {
+  pname = "javacard-devkit";
+  version = "2.2.2";
+  uscoreVersion = builtins.replaceStrings ["."] ["_"] version;
+
+  src = requireFile {
+    name = "java_card_kit-${uscoreVersion}-linux.zip";
+    url = "http://www.oracle.com/technetwork/java/javasebusiness/downloads/"
+        + "java-archive-downloads-javame-419430.html#java_card_kit-2.2.2-oth-JPR";
+    sha256 = "1rzkw8izqq73ifvyp937wnjjc40a40drc4zsm0l1s6jyv3d7agb2";
+  };
+
+  nativeBuildInputs = [ unzip oraclejdk8 makeWrapper autoPatchelfHook ];
+  buildInputs = [ pcsclite ];
+
+  zipPrefix = "java_card_kit-${uscoreVersion}";
+
+  sourceRoot = ".";
+  unpackCmd = ''
+    unzip -p "$curSrc" "$zipPrefix/$zipPrefix-rr-bin-linux-do.zip" | jar x
+  '';
+
+  installPhase = ''
+    mkdir -p "$out/share/$pname"
+    cp -rt "$out/share/$pname" api_export_files
+    cp -rt "$out" lib
+
+    for i in bin/*; do
+      case "$i" in
+        *.so) install -vD "$i" "$out/libexec/$pname/$(basename "$i")";;
+        *) target="$out/bin/$(basename "$i")"
+           install -vD "$i" "$target"
+           sed -i -e 's|^$JAVA_HOME/bin/java|''${JAVA:-$JAVA_HOME/bin/java}|' "$target"
+           wrapProgram "$target" \
+             --set JAVA_HOME "$JAVA_HOME" \
+             --prefix CLASSPATH : "$out/share/$pname/api_export_files"
+           ;;
+      esac
+    done
+
+    makeWrapper "$JAVA_HOME/bin/javac" "$out/bin/javacardc" \
+      --prefix CLASSPATH : "$out/lib/api.jar"
+  '';
+
+  meta = {
+    description = "Official development kit by Oracle for programming for the Java Card platform";
+    longDescription = ''
+      This Java Card SDK is the official SDK made available by Oracle for programming for the Java Card platform.
+
+      Instructions for usage:
+
+      First, compile your '.java' (NixOS-specific: you should not need to set the class path -- if you need, it's a bug):
+          javacardc -source 1.5 -target 1.5 [MyJavaFile].java
+      Then, test with 'jcwde' (NixOS-specific: you can change the java version used to run jcwde with eg. JAVA=jdb):
+          CLASSPATH=. jcwde [MyJcwdeConfig].app & sleep 1 && apdutool [MyApdus].apdu
+      Finally, convert the '.class' file into a '.cap':
+          converter -applet [AppletAID] [MyApplet] [myPackage] [PackageAID] [Version]
+      For more details, please refer to the documentation by Oracle
+    '';
+    homepage = "https://www.oracle.com/technetwork/java/embedded/javacard/overview/index.html";
+    license = stdenv.lib.licenses.unfree;
+    maintainers = [ stdenv.lib.maintainers.ekleog ];
+    platforms = [ "i686-linux" "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/jetbrains-jdk/default.nix b/nixpkgs/pkgs/development/compilers/jetbrains-jdk/default.nix
new file mode 100644
index 000000000000..1502b243d889
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/jetbrains-jdk/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, openjdk11, fetchFromGitHub, jetbrains }:
+
+openjdk11.overrideAttrs (oldAttrs: rec {
+  pname = "jetbrains-jdk";
+  version = "11.0.6-b774";
+  src = fetchFromGitHub {
+    owner = "JetBrains";
+    repo = "JetBrainsRuntime";
+    rev = "jb${stdenv.lib.replaceStrings ["."] ["_"] version}";
+    sha256 = "0lx3h74jwa14kr8ybwxbzc4jsjj6xnymvckdsrhqhvrciya7bxzw";
+  };
+  patches = [];
+  meta = with stdenv.lib; {
+    description = "An OpenJDK fork to better support Jetbrains's products.";
+    longDescription = ''
+     JetBrains Runtime is a runtime environment for running IntelliJ Platform
+     based products on Windows, Mac OS X, and Linux. JetBrains Runtime is
+     based on OpenJDK project with some modifications. These modifications
+     include: Subpixel Anti-Aliasing, enhanced font rendering on Linux, HiDPI
+     support, ligatures, some fixes for native crashes not presented in
+     official build, and other small enhancements.
+
+     JetBrains Runtime is not a certified build of OpenJDK. Please, use at
+     your own risk.
+    '';
+    homepage = "https://bintray.com/jetbrains/intellij-jdk/";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ edwtjo petabyteboy ];
+    platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
+  };
+  passthru = oldAttrs.passthru // {
+    home = "${jetbrains.jdk}/lib/openjdk";
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/jsonnet/default.nix b/nixpkgs/pkgs/development/compilers/jsonnet/default.nix
new file mode 100644
index 000000000000..510fca1838ec
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/jsonnet/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, lib, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "jsonnet";
+  version = "0.16.0";
+
+  src = fetchFromGitHub {
+    rev = "v${version}";
+    owner = "google";
+    repo = "jsonnet";
+    sha256 = "0wxhc0ghjk88zrrn9a18h979ipkia2rx12489515gzhlplfx6724";
+  };
+
+  enableParallelBuilding = true;
+
+  makeFlags = [
+    "jsonnet"
+    "jsonnetfmt"
+    "libjsonnet.so"
+  ];
+
+  installPhase = ''
+    mkdir -p $out/bin $out/lib $out/include
+    cp jsonnet $out/bin/
+    cp jsonnetfmt $out/bin/
+    cp libjsonnet*.so $out/lib/
+    cp -a include/*.h $out/include/
+  '';
+
+  meta = {
+    description = "Purely-functional configuration language that helps you define JSON data";
+    maintainers = with lib.maintainers; [ benley copumpkin ];
+    license = lib.licenses.asl20;
+    homepage = "https://github.com/google/jsonnet";
+    platforms = lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/julia/0.7.nix b/nixpkgs/pkgs/development/compilers/julia/0.7.nix
new file mode 100644
index 000000000000..e0992d800033
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/julia/0.7.nix
@@ -0,0 +1,9 @@
+import ./shared.nix {
+  majorVersion = "0";
+  minorVersion = "7";
+  maintenanceVersion = "0";
+  src_sha256 = "1j57569qm2ii8ddzsp08hds2navpk7acdz83kh27dvk44axhwj6f";
+
+  libuvVersion = "ed3700c849289ed01fe04273a7bf865340b2bd7e";
+  libuvSha256 = "137w666zsjw1p0ma3lf94d75hr1q45sgkfmbizkyji2qm57cnxjs";
+}
diff --git a/nixpkgs/pkgs/development/compilers/julia/0001.1-use-system-utf8proc.patch b/nixpkgs/pkgs/development/compilers/julia/0001.1-use-system-utf8proc.patch
new file mode 100644
index 000000000000..be4391399f55
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/julia/0001.1-use-system-utf8proc.patch
@@ -0,0 +1,29 @@
+From 54a66b5728ec98f44a1768f064509be4fd3f2ef6 Mon Sep 17 00:00:00 2001
+From: Thomas Tuegel <ttuegel@gmail.com>
+Date: Sat, 10 Oct 2015 13:09:48 -0500
+Subject: [PATCH 1/3] use system utf8proc
+
+---
+ src/flisp/Makefile | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/flisp/Makefile b/src/flisp/Makefile
+index bec8624..5437b5c 100644
+--- a/src/flisp/Makefile
++++ b/src/flisp/Makefile
+@@ -24,9 +24,9 @@ DOBJS = $(SRCS:%.c=$(BUILDDIR)/%.dbg.obj)
+ LLTDIR := ../support
+ LLT_release := $(BUILDDIR)/$(LLTDIR)/libsupport.a
+ LLT_debug := $(BUILDDIR)/$(LLTDIR)/libsupport-debug.a
+-LIBFILES_release := $(LLT_release) $(LIBUV) $(LIBUTF8PROC)
+-LIBFILES_debug := $(LLT_debug) $(LIBUV) $(LIBUTF8PROC)
+-LIBS :=
++LIBFILES_release := $(LLT_release) $(LIBUV)
++LIBFILES_debug := $(LLT_debug) $(LIBUV)
++LIBS := $(LIBUTF8PROC)
+ ifneq ($(OS),WINNT)
+ LIBS += -lpthread
+ endif
+-- 
+2.5.2
+
diff --git a/nixpkgs/pkgs/development/compilers/julia/1.0.nix b/nixpkgs/pkgs/development/compilers/julia/1.0.nix
new file mode 100644
index 000000000000..3cd9daee1416
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/julia/1.0.nix
@@ -0,0 +1,9 @@
+import ./shared.nix {
+  majorVersion = "1";
+  minorVersion = "0";
+  maintenanceVersion = "4";
+  src_sha256 = "1dfx68wbrrzpbh74rla7i2g3r5z6wa1pxq3ahyfm5m27vfyjbkhg";
+
+  libuvVersion = "ed3700c849289ed01fe04273a7bf865340b2bd7e";
+  libuvSha256 = "137w666zsjw1p0ma3lf94d75hr1q45sgkfmbizkyji2qm57cnxjs";
+}
diff --git a/nixpkgs/pkgs/development/compilers/julia/1.1.nix b/nixpkgs/pkgs/development/compilers/julia/1.1.nix
new file mode 100644
index 000000000000..5be34b4c4b4c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/julia/1.1.nix
@@ -0,0 +1,9 @@
+import ./shared.nix {
+  majorVersion = "1";
+  minorVersion = "1";
+  maintenanceVersion = "1";
+  src_sha256 = "1yqjd0n42xf9hzxpvc9vysyjj98p42by216jkdqakdy7dkjcmnhq";
+
+  libuvVersion = "2348256acf5759a544e5ca7935f638d2bc091d60";
+  libuvSha256 = "1363f4vqayfcv5zqg07qmzjff56yhad74k16c22ian45lram8mv8";
+}
diff --git a/nixpkgs/pkgs/development/compilers/julia/1.3.nix b/nixpkgs/pkgs/development/compilers/julia/1.3.nix
new file mode 100644
index 000000000000..15694734d487
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/julia/1.3.nix
@@ -0,0 +1,160 @@
+{ stdenv, fetchurl, fetchzip, fetchFromGitHub
+# build tools
+, gfortran, m4, makeWrapper, patchelf, perl, which, python2
+, cmake
+# libjulia dependencies
+, libunwind, readline, utf8proc, zlib
+# standard library dependencies
+, curl, fftwSinglePrec, fftw, gmp, libgit2, mpfr, openlibm, openspecfun, pcre2
+# linear algebra
+, blas, lapack, arpack
+# Darwin frameworks
+, CoreServices, ApplicationServices
+}:
+
+assert (!blas.isILP64) && (!lapack.isILP64);
+
+with stdenv.lib;
+
+let
+  majorVersion = "1";
+  minorVersion = "3";
+  maintenanceVersion = "1";
+  src_sha256 = "0q9a7yc3b235psrwl5ghyxgwly25lf8n818l8h6bkf2ymdbsv5p6";
+  version = "${majorVersion}.${minorVersion}.${maintenanceVersion}";
+in
+
+stdenv.mkDerivation rec {
+  pname = "julia";
+  inherit version;
+
+   src = fetchzip {
+     url = "https://github.com/JuliaLang/julia/releases/download/v${majorVersion}.${minorVersion}.${maintenanceVersion}/julia-${majorVersion}.${minorVersion}.${maintenanceVersion}-full.tar.gz";
+     sha256 = src_sha256;
+   };
+
+  prePatch = ''
+    export PATH=$PATH:${cmake}/bin
+    '';
+
+  patches = [
+    ./use-system-utf8proc-julia-1.3.patch
+
+    # Julia recompiles a precompiled file if the mtime stored *in* the
+    # .ji file differs from the mtime of the .ji file.  This
+    # doesn't work in Nix because Nix changes the mtime of files in
+    # the Nix store to 1. So patch Julia to accept mtimes of 1.
+    ./allow_nix_mtime.patch
+  ];
+
+  postPatch = ''
+    patchShebangs . contrib
+    for i in backtrace cmdlineargs; do
+      mv test/$i.jl{,.off}
+      touch test/$i.jl
+    done
+    rm stdlib/Sockets/test/runtests.jl && touch stdlib/Sockets/test/runtests.jl
+    rm stdlib/Distributed/test/runtests.jl && touch stdlib/Distributed/test/runtests.jl
+    sed -e 's/Invalid Content-Type:/invalid Content-Type:/g' -i ./stdlib/LibGit2/test/libgit2.jl
+    sed -e 's/Failed to resolve /failed to resolve /g' -i ./stdlib/LibGit2/test/libgit2.jl
+  '';
+
+  buildInputs = [
+    arpack fftw fftwSinglePrec gmp libgit2 libunwind mpfr
+    pcre2.dev blas lapack openlibm openspecfun readline utf8proc
+    zlib
+  ]
+  ++ stdenv.lib.optionals stdenv.isDarwin [CoreServices ApplicationServices]
+  ;
+
+  nativeBuildInputs = [ curl gfortran m4 makeWrapper patchelf perl python2 which ];
+
+  makeFlags =
+    let
+      arch = head (splitString "-" stdenv.system);
+      march = { x86_64 = stdenv.hostPlatform.platform.gcc.arch or "x86-64"; i686 = "pentium4"; }.${arch}
+              or (throw "unsupported architecture: ${arch}");
+      # Julia requires Pentium 4 (SSE2) or better
+      cpuTarget = { x86_64 = "x86-64"; i686 = "pentium4"; }.${arch}
+                  or (throw "unsupported architecture: ${arch}");
+      # Julia applies a lot of patches to its dependencies, so for now do not use the system LLVM
+      # https://github.com/JuliaLang/julia/tree/master/deps/patches
+    in [
+      "ARCH=${arch}"
+      "MARCH=${march}"
+      "JULIA_CPU_TARGET=${cpuTarget}"
+      "PREFIX=$(out)"
+      "prefix=$(out)"
+      "SHELL=${stdenv.shell}"
+
+      "USE_SYSTEM_BLAS=1"
+      "USE_BLAS64=${if blas.isILP64 then "1" else "0"}"
+
+      "USE_SYSTEM_LAPACK=1"
+
+      "USE_SYSTEM_ARPACK=1"
+      "USE_SYSTEM_FFTW=1"
+      "USE_SYSTEM_GMP=1"
+      "USE_SYSTEM_LIBGIT2=1"
+      "USE_SYSTEM_LIBUNWIND=1"
+
+      "USE_SYSTEM_MPFR=1"
+      "USE_SYSTEM_OPENLIBM=1"
+      "USE_SYSTEM_OPENSPECFUN=1"
+      "USE_SYSTEM_PATCHELF=1"
+      "USE_SYSTEM_PCRE=1"
+      "PCRE_CONFIG=${pcre2.dev}/bin/pcre2-config"
+      "PCRE_INCL_PATH=${pcre2.dev}/include/pcre2.h"
+      "USE_SYSTEM_READLINE=1"
+      "USE_SYSTEM_UTF8PROC=1"
+      "USE_SYSTEM_ZLIB=1"
+
+      "USE_BINARYBUILDER=0"
+    ];
+
+  LD_LIBRARY_PATH = makeLibraryPath [
+    arpack fftw fftwSinglePrec gmp libgit2 mpfr blas openlibm
+    openspecfun pcre2 lapack
+  ];
+
+  enableParallelBuilding = true;
+
+  doCheck = !stdenv.isDarwin;
+  checkTarget = "testall";
+  # Julia's tests require read/write access to $HOME
+  preCheck = ''
+    export HOME="$NIX_BUILD_TOP"
+  '';
+
+  preBuild = ''
+    sed -e '/^install:/s@[^ ]*/doc/[^ ]*@@' -i Makefile
+    sed -e '/[$](DESTDIR)[$](docdir)/d' -i Makefile
+    export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
+  '';
+
+  postInstall = ''
+    # Symlink shared libraries from LD_LIBRARY_PATH into lib/julia,
+    # as using a wrapper with LD_LIBRARY_PATH causes segmentation
+    # faults when program returns an error:
+    #   $ julia -e 'throw(Error())'
+    find $(echo $LD_LIBRARY_PATH | sed 's|:| |g') -maxdepth 1 -name '*.${if stdenv.isDarwin then "dylib" else "so"}*' | while read lib; do
+      if [[ ! -e $out/lib/julia/$(basename $lib) ]]; then
+        ln -sv $lib $out/lib/julia/$(basename $lib)
+      fi
+    done
+  '';
+
+  passthru = {
+    inherit majorVersion minorVersion maintenanceVersion;
+    site = "share/julia/site/v${majorVersion}.${minorVersion}";
+  };
+
+  meta = {
+    description = "High-level performance-oriented dynamical language for technical computing";
+    homepage = "https://julialang.org/";
+    license = stdenv.lib.licenses.mit;
+    maintainers = with stdenv.lib.maintainers; [ raskin rob garrison ];
+    platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
+    broken = stdenv.isi686;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/julia/allow_nix_mtime.patch b/nixpkgs/pkgs/development/compilers/julia/allow_nix_mtime.patch
new file mode 100644
index 000000000000..e4a164cfa1ad
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/julia/allow_nix_mtime.patch
@@ -0,0 +1,25 @@
+From f79775378a9eeec5b99f18cc95735b12d172aba3 Mon Sep 17 00:00:00 2001
+From: Tom McLaughlin <pyro777@gmail.com>
+Date: Wed, 12 Dec 2018 13:01:32 -0800
+Subject: [PATCH] Patch to make work better with nix
+
+---
+ base/loading.jl | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/base/loading.jl b/base/loading.jl
+index 51201b98b6..b40c0690f6 100644
+--- a/base/loading.jl
++++ b/base/loading.jl
+@@ -1384,7 +1384,7 @@ function stale_cachefile(modpath::String, cachefile::String)
+                 # Issue #13606: compensate for Docker images rounding mtimes
+                 # Issue #20837: compensate for GlusterFS truncating mtimes to microseconds
+                 ftime = mtime(f)
+-                if ftime != ftime_req && ftime != floor(ftime_req) && ftime != trunc(ftime_req, digits=6)
++                if ftime != ftime_req && ftime != floor(ftime_req) && ftime != trunc(ftime_req, digits=6) && ftime != 1.0
+                     @debug "Rejecting stale cache file $cachefile (mtime $ftime_req) because file $f (mtime $ftime) has changed"
+                     return true
+                 end
+-- 
+2.17.1
+
diff --git a/nixpkgs/pkgs/development/compilers/julia/shared.nix b/nixpkgs/pkgs/development/compilers/julia/shared.nix
new file mode 100644
index 000000000000..29ac41150506
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/julia/shared.nix
@@ -0,0 +1,210 @@
+{ majorVersion
+, minorVersion
+, maintenanceVersion
+, src_sha256
+# source deps
+, libuvVersion
+, libuvSha256
+}:
+{ stdenv, fetchurl, fetchzip
+# build tools
+, gfortran, m4, makeWrapper, patchelf, perl, which, python2
+, cmake
+# libjulia dependencies
+, libunwind, readline, utf8proc, zlib
+# standard library dependencies
+, curl, fftwSinglePrec, fftw, gmp, libgit2, mpfr, openlibm, openspecfun, pcre2
+# linear algebra
+, blas, lapack, arpack
+# Darwin frameworks
+, CoreServices, ApplicationServices
+}:
+
+with stdenv.lib;
+
+assert (!blas.isILP64) && (!lapack.isILP64);
+
+let
+  dsfmtVersion = "2.2.3";
+  dsfmt = fetchurl {
+    url = "http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/SFMT/dSFMT-src-${dsfmtVersion}.tar.gz";
+    sha256 = "03kaqbjbi6viz0n33dk5jlf6ayxqlsq4804n7kwkndiga9s4hd42";
+  };
+
+  libuv = fetchurl {
+    url = "https://api.github.com/repos/JuliaLang/libuv/tarball/${libuvVersion}";
+    sha256 = libuvSha256;
+  };
+
+  rmathVersion = "0.1";
+  rmath-julia = fetchurl {
+    url = "https://api.github.com/repos/JuliaLang/Rmath-julia/tarball/v${rmathVersion}";
+    sha256 = "1qyps217175qhid46l8f5i1v8i82slgp23ia63x2hzxwfmx8617p";
+  };
+
+  virtualenvVersion = "15.0.0";
+  virtualenv = fetchurl {
+    url = "mirror://pypi/v/virtualenv/virtualenv-${virtualenvVersion}.tar.gz";
+    sha256 = "06fw4liazpx5vf3am45q2pdiwrv0id7ckv7n6zmpml29x6vkzmkh";
+  };
+
+  libwhichVersion = "81e9723c0273d78493dc8c8ed570f68d9ce7e89e";
+  libwhich = fetchurl {
+    url = "https://api.github.com/repos/vtjnash/libwhich/tarball/${libwhichVersion}";
+    sha256 = "1p7zg31kpmpbmh1znrk1xrbd074agx13b9q4dcw8n2zrwwdlbz3b";
+  };
+
+  llvmVersion = "6.0.0";
+  llvm = fetchurl {
+    url = "http://releases.llvm.org/6.0.0/llvm-${llvmVersion}.src.tar.xz";
+    sha256 = "0224xvfg6h40y5lrbnb9qaq3grmdc5rg00xq03s1wxjfbf8krx8z";
+  };
+
+  suitesparseVersion = "4.4.5";
+  suitesparse = fetchurl {
+    url = "http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-${suitesparseVersion}.tar.gz";
+    sha256 = "1jcbxb8jx5wlcixzf6n5dca2rcfx6mlcms1k2rl5gp67ay3bix43";
+  };
+  version = "${majorVersion}.${minorVersion}.${maintenanceVersion}";
+in
+
+stdenv.mkDerivation rec {
+  pname = "julia";
+  inherit version;
+
+  src = fetchzip {
+    url = "https://github.com/JuliaLang/${pname}/releases/download/v${version}/${pname}-${version}.tar.gz";
+    sha256 = src_sha256;
+  };
+  prePatch = ''
+    export PATH=$PATH:${cmake}/bin
+    mkdir deps/srccache
+    cp "${dsfmt}" "./deps/srccache/dsfmt-${dsfmtVersion}.tar.gz"
+    cp "${rmath-julia}" "./deps/srccache/Rmath-julia-${rmathVersion}.tar.gz"
+    cp "${libuv}" "./deps/srccache/libuv-${libuvVersion}.tar.gz"
+    cp "${virtualenv}" "./deps/srccache/virtualenv-${virtualenvVersion}.tar.gz"
+    cp "${libwhich}" "./deps/srccache/libwhich-${libwhichVersion}.tar.gz"
+    cp "${llvm}" "./deps/srccache/llvm-${llvmVersion}.src.tar.xz"
+    cp "${suitesparse}" "./deps/srccache/SuiteSparse-${suitesparseVersion}.tar.gz"
+  '';
+
+  patches = [
+    ./0001.1-use-system-utf8proc.patch
+
+    # Julia recompiles a precompiled file if the mtime stored *in* the
+    # .ji file differs from the mtime of the .ji file.  This
+    # doesn't work in Nix because Nix changes the mtime of files in
+    # the Nix store to 1. So patch Julia to accept mtimes of 1.
+    ./allow_nix_mtime.patch
+  ];
+
+  postPatch = ''
+    patchShebangs . contrib
+    for i in backtrace cmdlineargs; do
+      mv test/$i.jl{,.off}
+      touch test/$i.jl
+    done
+    rm stdlib/Sockets/test/runtests.jl && touch stdlib/Sockets/test/runtests.jl
+    rm stdlib/Distributed/test/runtests.jl && touch stdlib/Distributed/test/runtests.jl
+    sed -e 's/Invalid Content-Type:/invalid Content-Type:/g' -i ./stdlib/LibGit2/test/libgit2.jl
+    sed -e 's/Failed to resolve /failed to resolve /g' -i ./stdlib/LibGit2/test/libgit2.jl
+  '';
+
+  buildInputs = [
+    arpack fftw fftwSinglePrec gmp libgit2 libunwind mpfr
+    pcre2.dev blas lapack openlibm openspecfun readline utf8proc
+    zlib
+  ]
+  ++ stdenv.lib.optionals stdenv.isDarwin [CoreServices ApplicationServices]
+  ;
+
+  nativeBuildInputs = [ curl gfortran m4 makeWrapper patchelf perl python2 which ];
+
+  makeFlags =
+    let
+      arch = head (splitString "-" stdenv.system);
+      march = { x86_64 = stdenv.hostPlatform.platform.gcc.arch or "x86-64"; i686 = "pentium4"; }.${arch}
+              or (throw "unsupported architecture: ${arch}");
+      # Julia requires Pentium 4 (SSE2) or better
+      cpuTarget = { x86_64 = "x86-64"; i686 = "pentium4"; }.${arch}
+                  or (throw "unsupported architecture: ${arch}");
+    in [
+      "ARCH=${arch}"
+      "MARCH=${march}"
+      "JULIA_CPU_TARGET=${cpuTarget}"
+      "PREFIX=$(out)"
+      "prefix=$(out)"
+      "SHELL=${stdenv.shell}"
+
+      "USE_SYSTEM_BLAS=1"
+      "USE_BLAS64=${if blas.isILP64 then "1" else "0"}"
+
+      "USE_SYSTEM_LAPACK=1"
+
+      "USE_SYSTEM_ARPACK=1"
+      "USE_SYSTEM_FFTW=1"
+      "USE_SYSTEM_GMP=1"
+      "USE_SYSTEM_LIBGIT2=1"
+      "USE_SYSTEM_LIBUNWIND=1"
+
+      #"USE_SYSTEM_LLVM=1"
+      "LLVM_VER=6.0.0"
+
+      "USE_SYSTEM_MPFR=1"
+      "USE_SYSTEM_OPENLIBM=1"
+      "USE_SYSTEM_OPENSPECFUN=1"
+      "USE_SYSTEM_PATCHELF=1"
+      "USE_SYSTEM_PCRE=1"
+      "PCRE_CONFIG=${pcre2.dev}/bin/pcre2-config"
+      "PCRE_INCL_PATH=${pcre2.dev}/include/pcre2.h"
+      "USE_SYSTEM_READLINE=1"
+      "USE_SYSTEM_UTF8PROC=1"
+      "USE_SYSTEM_ZLIB=1"
+    ];
+
+  LD_LIBRARY_PATH = makeLibraryPath [
+    arpack fftw fftwSinglePrec gmp libgit2 mpfr blas lapack openlibm
+    openspecfun pcre2
+  ];
+
+  enableParallelBuilding = true;
+
+  doCheck = !stdenv.isDarwin;
+  checkTarget = "testall";
+  # Julia's tests require read/write access to $HOME
+  preCheck = ''
+    export HOME="$NIX_BUILD_TOP"
+  '';
+
+  preBuild = ''
+    sed -e '/^install:/s@[^ ]*/doc/[^ ]*@@' -i Makefile
+    sed -e '/[$](DESTDIR)[$](docdir)/d' -i Makefile
+    export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
+  '';
+
+  postInstall = ''
+    # Symlink shared libraries from LD_LIBRARY_PATH into lib/julia,
+    # as using a wrapper with LD_LIBRARY_PATH causes segmentation
+    # faults when program returns an error:
+    #   $ julia -e 'throw(Error())'
+    find $(echo $LD_LIBRARY_PATH | sed 's|:| |g') -maxdepth 1 -name '*.${if stdenv.isDarwin then "dylib" else "so"}*' | while read lib; do
+      if [[ ! -e $out/lib/julia/$(basename $lib) ]]; then
+        ln -sv $lib $out/lib/julia/$(basename $lib)
+      fi
+    done
+  '';
+
+  passthru = {
+    inherit majorVersion minorVersion maintenanceVersion;
+    site = "share/julia/site/v${majorVersion}.${minorVersion}";
+  };
+
+  meta = {
+    description = "High-level performance-oriented dynamical language for technical computing";
+    homepage = "https://julialang.org/";
+    license = stdenv.lib.licenses.mit;
+    maintainers = with stdenv.lib.maintainers; [ raskin rob garrison ];
+    platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ];
+    broken = stdenv.isi686;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/julia/use-system-utf8proc-julia-1.3.patch b/nixpkgs/pkgs/development/compilers/julia/use-system-utf8proc-julia-1.3.patch
new file mode 100644
index 000000000000..63e0ba9ab057
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/julia/use-system-utf8proc-julia-1.3.patch
@@ -0,0 +1,24 @@
+---
+ src/flisp/Makefile | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+
+diff --git a/src/flisp/Makefile b/src/flisp/Makefile
+index d97075e..6bebca7 100644
+--- a/src/flisp/Makefile
++++ b/src/flisp/Makefile
+@@ -32,9 +32,9 @@ OBJS := $(SRCS:%.c=$(BUILDDIR)/%.o)
+ DOBJS := $(SRCS:%.c=$(BUILDDIR)/%.dbg.obj)
+ LLT_release := $(LLT_BUILDDIR)/libsupport.a
+ LLT_debug := $(LLT_BUILDDIR)/libsupport-debug.a
+-LIBFILES_release := $(LLT_release) $(LIBUV) $(LIBUTF8PROC)
+-LIBFILES_debug := $(LLT_debug) $(LIBUV) $(LIBUTF8PROC)
+-LIBS :=
++LIBFILES_release := $(LLT_release) $(LIBUV)
++LIBFILES_debug := $(LLT_debug) $(LIBUV)
++LIBS := $(LIBUTF8PROC)
+ ifneq ($(OS),WINNT)
+ LIBS += -lpthread
+ endif
+
+-- 
diff --git a/nixpkgs/pkgs/development/compilers/jwasm/default.nix b/nixpkgs/pkgs/development/compilers/jwasm/default.nix
new file mode 100644
index 000000000000..8ce55c757959
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/jwasm/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchFromGitHub
+, cmake }:
+
+with stdenv.lib;
+stdenv.mkDerivation rec {
+  pname = "jwasm";
+  version = "2.13";
+
+  src = fetchFromGitHub {
+    owner = "JWasm";
+    repo  = "JWasm";
+    rev = version;
+    sha256 = "0m972pc8vk8s9yv1pi85fsjgm6hj24gab7nalw2q04l0359nqi7w";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  installPhase = ''
+    install -Dpm755 jwasm -t $out/bin/
+    install -Dpm644 $src/History.txt  $src/Readme.txt \
+                    $src/Doc/enh.txt $src/Doc/fixes.txt \
+                    $src/Doc/gencode.txt $src/Doc/overview.txt \
+                    -t $out/share/doc/jwasm/
+  '';
+
+  meta = {
+    description = "A MASM-compatible x86 assembler";
+    homepage = "http://jwasm.github.io/";
+    license = licenses.gpl2Plus;
+    maintainers = with maintainers; [ AndersonTorres ];
+    platforms = platforms.darwin ++ platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/kotlin/default.nix b/nixpkgs/pkgs/development/compilers/kotlin/default.nix
new file mode 100644
index 000000000000..4e2810fa893c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/kotlin/default.nix
@@ -0,0 +1,46 @@
+{ stdenv, fetchurl, makeWrapper, jre, unzip }:
+
+let
+  version = "1.3.72";
+in stdenv.mkDerivation {
+  inherit version;
+  pname = "kotlin";
+
+  src = fetchurl {
+    url = "https://github.com/JetBrains/kotlin/releases/download/v${version}/kotlin-compiler-${version}.zip";
+    sha256 = "0v6c4vjiflwbjjc1lmiyzrilxwbqcz5ll6ls40zhw70zk23xpl6c";
+  };
+
+  propagatedBuildInputs = [ jre ] ;
+  buildInputs = [ makeWrapper unzip ] ;
+
+  installPhase = ''
+    mkdir -p $out
+    rm "bin/"*.bat
+    mv * $out
+
+    for p in $(ls $out/bin/) ; do
+      wrapProgram $out/bin/$p --prefix PATH ":" ${jre}/bin ;
+    done
+
+    if [ -f $out/LICENSE ]; then
+      install -D $out/LICENSE $out/share/kotlin/LICENSE
+      rm $out/LICENSE
+    fi
+  '';
+
+  meta = {
+    description = "General purpose programming language";
+    longDescription = ''
+      Kotlin is a statically typed language that targets the JVM and JavaScript.
+      It is a general-purpose language intended for industry use.
+      It is developed by a team at JetBrains although it is an OSS language
+      and has external contributors.
+    '';
+    homepage = "https://kotlinlang.org/";
+    license = stdenv.lib.licenses.asl20;
+    maintainers = with stdenv.lib.maintainers;
+      [ nequissimus ];
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/ldc/binary.nix b/nixpkgs/pkgs/development/compilers/ldc/binary.nix
new file mode 100644
index 000000000000..56d40be86194
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ldc/binary.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchurl, curl, tzdata, autoPatchelfHook, fixDarwinDylibNames, libxml2
+, version, hashes }:
+with stdenv;
+let
+  OS = if hostPlatform.isDarwin then "osx" else hostPlatform.parsed.kernel.name;
+  ARCH = toString hostPlatform.parsed.cpu.name;
+in mkDerivation {
+  pname = "ldc-bootstrap";
+  inherit version;
+
+  src = fetchurl rec {
+    name = "ldc2-${version}-${OS}-${ARCH}.tar.xz";
+    url = "https://github.com/ldc-developers/ldc/releases/download/v${version}/${name}";
+    sha256 = hashes."${OS}-${ARCH}" or (throw "missing bootstrap sha256 for ${OS}-${ARCH}");
+  };
+
+  dontConfigure = true;
+  dontBuild = true;
+
+  nativeBuildInputs = [ fixDarwinDylibNames autoPatchelfHook ];
+
+  buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ libxml2 stdenv.cc.cc ];
+
+  propagatedBuildInputs = [ curl tzdata ];
+
+  installPhase = ''
+    mkdir -p $out
+
+    mv bin etc import lib LICENSE README $out/
+  '';
+
+  meta = with lib; {
+    inherit version;
+    description = "The LLVM-based D Compiler";
+    homepage = "https://github.com/ldc-developers/ldc";
+    # from https://github.com/ldc-developers/ldc/blob/master/LICENSE
+    license = with licenses; [ bsd3 boost mit ncsa gpl2Plus ];
+    maintainers = with maintainers; [ ThomasMader lionello ];
+    platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/ldc/bootstrap.nix b/nixpkgs/pkgs/development/compilers/ldc/bootstrap.nix
new file mode 100644
index 000000000000..fde4c8426848
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ldc/bootstrap.nix
@@ -0,0 +1,10 @@
+{ callPackage }:
+callPackage ./binary.nix {
+  version = "1.19.0";
+  hashes = {
+    # Get these from `nix-prefetch-url https://github.com/ldc-developers/ldc/releases/download/v1.19.0/ldc2-1.19.0-osx-x86_64.tar.xz` etc..
+    osx-x86_64 = "1bp3xkh9zp64dzq8isanib1gacb3nfbl70qv15qygwk1zan6zgy7";
+    linux-x86_64 = "146grr2lwarfk13wgkpyb77xb6b3as1is2rf4s2hipqjmc8biy1h";
+    linux-aarch64  = "1fv6jshfvi15m7masgxq1hgp216qjd5amizrqdf26vhrq3a08li3";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/ldc/default.nix b/nixpkgs/pkgs/development/compilers/ldc/default.nix
new file mode 100644
index 000000000000..5a4baabcf8d8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ldc/default.nix
@@ -0,0 +1,5 @@
+import ./generic.nix {
+  version = "1.20.1";
+  ldcSha256 = "1bqsgab22v02pc3c9gcyf15y7aimadv24d68icaw5lpgnvzxy89b";
+}
+
diff --git a/nixpkgs/pkgs/development/compilers/ldc/generic.nix b/nixpkgs/pkgs/development/compilers/ldc/generic.nix
new file mode 100644
index 000000000000..c93d423945cb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ldc/generic.nix
@@ -0,0 +1,143 @@
+{ version, ldcSha256 }:
+{ stdenv, fetchurl, cmake, ninja, llvm_5, llvm_8, curl, tzdata
+, libconfig, lit, gdb, unzip, darwin, bash
+, callPackage, makeWrapper, runCommand, targetPackages
+, ldcBootstrap ? callPackage ./bootstrap.nix { }
+}:
+
+let
+  pathConfig = runCommand "ldc-lib-paths" {} ''
+    mkdir $out
+    echo ${tzdata}/share/zoneinfo/ > $out/TZDatabaseDirFile
+    echo ${curl.out}/lib/libcurl${stdenv.hostPlatform.extensions.sharedLibrary} > $out/LibcurlPathFile
+  '';
+
+in
+
+stdenv.mkDerivation rec {
+  pname = "ldc";
+  inherit version;
+
+  enableParallelBuilding = true;
+
+  src = fetchurl {
+    url = "https://github.com/ldc-developers/ldc/releases/download/v${version}/ldc-${version}-src.tar.gz";
+    sha256 = ldcSha256;
+  };
+
+  # https://issues.dlang.org/show_bug.cgi?id=19553
+  hardeningDisable = [ "fortify" ];
+
+  postUnpack = ''
+    patchShebangs .
+  ''
+  + ''
+      rm ldc-${version}-src/tests/d2/dmd-testsuite/fail_compilation/mixin_gc.d
+      rm ldc-${version}-src/tests/d2/dmd-testsuite/runnable/xtest46_gc.d
+      rm ldc-${version}-src/tests/d2/dmd-testsuite/runnable/testptrref_gc.d
+
+      # test depends on current year
+      rm ldc-${version}-src/tests/d2/dmd-testsuite/compilable/ddocYear.d
+  ''
+  + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
+      # https://github.com/NixOS/nixpkgs/issues/34817
+      rm -r ldc-${version}-src/tests/plugins/addFuncEntryCall
+  '';
+
+  postPatch = ''
+    # Setting SHELL=$SHELL when dmd testsuite is run doesn't work on Linux somehow
+    substituteInPlace tests/d2/dmd-testsuite/Makefile --replace "SHELL=/bin/bash" "SHELL=${bash}/bin/bash"
+  ''
+  + stdenv.lib.optionalString stdenv.hostPlatform.isLinux ''
+      substituteInPlace runtime/phobos/std/socket.d --replace "assert(ih.addrList[0] == 0x7F_00_00_01);" ""
+  ''
+  + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
+      substituteInPlace runtime/phobos/std/socket.d --replace "foreach (name; names)" "names = []; foreach (name; names)"
+  '';
+
+  nativeBuildInputs = [
+    cmake ninja makeWrapper unzip ldcBootstrap lit lit.python
+  ]
+  ++ stdenv.lib.optionals stdenv.hostPlatform.isDarwin [
+    darwin.apple_sdk.frameworks.Foundation
+    # https://github.com/NixOS/nixpkgs/issues/57120
+    # https://github.com/NixOS/nixpkgs/pull/59197#issuecomment-481972515
+    llvm_5
+  ]
+  ++ stdenv.lib.optionals (!stdenv.hostPlatform.isDarwin) [
+    llvm_8
+    # https://github.com/NixOS/nixpkgs/pull/36378#issuecomment-385034818
+    gdb
+  ];
+
+  buildInputs = [ curl tzdata ];
+
+  cmakeFlags = [
+    "-DD_FLAGS=-d-version=TZDatabaseDir;-d-version=LibcurlPath;-J${pathConfig}"
+    "-DCMAKE_BUILD_TYPE=Release"
+  ];
+
+  postConfigure = ''
+    export DMD=$PWD/bin/ldmd2
+  '';
+
+  makeFlags = [ "DMD=$DMD" ];
+
+  fixNames = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin  ''
+    fixDarwinDylibNames() {
+      local flags=()
+
+      for fn in "$@"; do
+        flags+=(-change "$(basename "$fn")" "$fn")
+      done
+
+      for fn in "$@"; do
+        if [ -L "$fn" ]; then continue; fi
+        echo "$fn: fixing dylib"
+        install_name_tool -id "$fn" "''${flags[@]}" "$fn"
+      done
+    }
+
+    fixDarwinDylibNames $(find "$(pwd)/lib" -name "*.dylib")
+    export DYLD_LIBRARY_PATH=$(pwd)/lib
+  '';
+
+  # https://github.com/ldc-developers/ldc/issues/2497#issuecomment-459633746
+  additionalExceptions = stdenv.lib.optionalString stdenv.hostPlatform.isDarwin
+    "|druntime-test-shared";
+
+  checkPhase = ''
+    # Build default lib test runners
+    ninja -j$NIX_BUILD_CORES all-test-runners
+
+    ${fixNames}
+
+    # Run dmd testsuite
+    export DMD_TESTSUITE_MAKE_ARGS="-j$NIX_BUILD_CORES DMD=$DMD"
+    ctest -V -R "dmd-testsuite"
+
+    # Build and run LDC D unittests.
+    ctest --output-on-failure -R "ldc2-unittest"
+
+    # Run LIT testsuite.
+    ctest -V -R "lit-tests"
+
+    # Run default lib unittests
+    ctest -j$NIX_BUILD_CORES --output-on-failure -E "ldc2-unittest|lit-tests|dmd-testsuite${additionalExceptions}"
+  '';
+
+  postInstall = ''
+    wrapProgram $out/bin/ldc2 \
+        --prefix PATH ":" "${targetPackages.stdenv.cc}/bin" \
+        --set-default CC "${targetPackages.stdenv.cc}/bin/cc"
+   '';
+
+  meta = with stdenv.lib; {
+    description = "The LLVM-based D compiler";
+    homepage = "https://github.com/ldc-developers/ldc";
+    # from https://github.com/ldc-developers/ldc/blob/master/LICENSE
+    license = with licenses; [ bsd3 boost mit ncsa gpl2Plus ];
+    maintainers = with maintainers; [ ThomasMader lionello ];
+    platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/bintools.nix b/nixpkgs/pkgs/development/compilers/llvm/10/bintools.nix
new file mode 100644
index 000000000000..72a2a7331930
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/bintools.nix
@@ -0,0 +1,19 @@
+{ runCommand, stdenv, llvm, lld, version }:
+
+let
+  prefix =
+    if stdenv.hostPlatform != stdenv.targetPlatform
+    then "${stdenv.targetPlatform.config}-"
+    else "";
+in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } ''
+   mkdir -p $out/bin
+   for prog in ${lld}/bin/*; do
+     ln -s $prog $out/bin/${prefix}$(basename $prog)
+   done
+   for prog in ${llvm}/bin/*; do
+     ln -s $prog $out/bin/${prefix}$(echo $(basename $prog) | sed -e "s|llvm-||")
+     ln -sf $prog $out/bin/${prefix}$(basename $prog)
+   done
+   rm -f $out/bin/${prefix}cat
+   ln -s ${lld}/bin/lld $out/bin/${prefix}ld
+''
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/clang/clang-extension-handling.patch b/nixpkgs/pkgs/development/compilers/llvm/10/clang/clang-extension-handling.patch
new file mode 100644
index 000000000000..a74d10989ffa
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/clang/clang-extension-handling.patch
@@ -0,0 +1,18 @@
+Compressed diff from
+```
+git show d21664cce1db8debe2528f36b1fbd2b8af9c9401 87dac7da68ea1e0adac78c59ef1891dcf9632b67 3a0f6e699bb6d96dc62dce6faef20ac26cf103fd
+```
+with the purpose of avoiding linker errors arising in the polly-flavoured clang.
+
+diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
+index 781c3eb7f2f..dc1413f4b59 100644
+--- clang/CMakeLists.txt
++++ clang/CMakeLists.txt
+@@ -864,6 +864,7 @@ add_subdirectory(utils/hmaptool)
+ 
+ if(CLANG_BUILT_STANDALONE)
+   llvm_distribution_add_targets()
++  process_llvm_pass_plugins()
+ endif()
+ 
+ configure_file(
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/clang/compiler-rt-baremetal.patch b/nixpkgs/pkgs/development/compilers/llvm/10/clang/compiler-rt-baremetal.patch
new file mode 100644
index 000000000000..a4a0f21b0fcd
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/clang/compiler-rt-baremetal.patch
@@ -0,0 +1,53 @@
+Index: lib/Driver/ToolChains/BareMetal.cpp
+===================================================================
+--- a/lib/Driver/ToolChains/BareMetal.cpp
++++ b/lib/Driver/ToolChains/BareMetal.cpp
+@@ -157,7 +157,7 @@
+ void BareMetal::AddLinkRuntimeLib(const ArgList &Args,
+                                   ArgStringList &CmdArgs) const {
+   CmdArgs.push_back(Args.MakeArgString("-lclang_rt.builtins-" +
+-                                       getTriple().getArchName() + ".a"));
++                                       getTriple().getArchName()));
+ }
+ 
+ void baremetal::Linker::ConstructJob(Compilation &C, const JobAction &JA,
+Index: test/Driver/baremetal.cpp
+===================================================================
+--- a/test/Driver/baremetal.cpp
++++ b/test/Driver/baremetal.cpp
+@@ -13,7 +13,7 @@
+ // CHECK-V6M-C-NEXT: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic"
+ // CHECK-V6M-C-SAME: "-L[[RESOURCE_DIR:[^"]+]]{{[/\\]+}}lib{{[/\\]+}}baremetal"
+ // CHECK-V6M-C-SAME: "-T" "semihosted.lds" "-Lsome{{[/\\]+}}directory{{[/\\]+}}user{{[/\\]+}}asked{{[/\\]+}}for"
+-// CHECK-V6M-C-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m.a"
++// CHECK-V6M-C-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m"
+ // CHECK-V6M-C-SAME: "-o" "{{.*}}.o"
+ 
+ // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+@@ -35,7 +35,7 @@
+ // CHECK-V6M-DEFAULTCXX: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic"
+ // CHECK-V6M-DEFAULTCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}lib{{(64)?}}{{[/\\]+}}clang{{[/\\]+}}{{.*}}{{[/\\]+}}lib{{[/\\]+}}baremetal"
+ // CHECK-V6M-DEFAULTCXX-SAME: "-lc++" "-lc++abi" "-lunwind"
+-// CHECK-V6M-DEFAULTCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m.a"
++// CHECK-V6M-DEFAULTCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m"
+ // CHECK-V6M-DEFAULTCXX-SAME: "-o" "{{.*}}.o"
+ 
+ // RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+@@ -48,7 +48,7 @@
+ // CHECK-V6M-LIBCXX: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic"
+ // CHECK-V6M-LIBCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}lib{{(64)?}}{{[/\\]+}}clang{{[/\\]+}}{{.*}}{{[/\\]+}}lib{{[/\\]+}}baremetal"
+ // CHECK-V6M-LIBCXX-SAME: "-lc++" "-lc++abi" "-lunwind"
+-// CHECK-V6M-LIBCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m.a"
++// CHECK-V6M-LIBCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m"
+ // CHECK-V6M-LIBCXX-SAME: "-o" "{{.*}}.o"
+ 
+ // RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+@@ -61,7 +61,7 @@
+ // CHECK-V6M-LIBSTDCXX: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic"
+ // CHECK-V6M-LIBSTDCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}lib{{(64)?}}{{[/\\]+}}clang{{[/\\]+}}{{.*}}{{[/\\]+}}lib{{[/\\]+}}baremetal"
+ // CHECK-V6M-LIBSTDCXX-SAME: "-lstdc++" "-lsupc++" "-lunwind"
+-// CHECK-V6M-LIBSTDCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m.a"
++// CHECK-V6M-LIBSTDCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m"
+ // CHECK-V6M-LIBSTDCXX-SAME: "-o" "{{.*}}.o"
+ 
+ // RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/clang/default.nix b/nixpkgs/pkgs/development/compilers/llvm/10/clang/default.nix
new file mode 100644
index 000000000000..10026ca4eb19
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/clang/default.nix
@@ -0,0 +1,121 @@
+{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python3, lld
+, fixDarwinDylibNames
+, enableManpages ? false
+}:
+
+let
+  self = stdenv.mkDerivation ({
+    pname = "clang";
+    inherit version;
+
+    src = fetch "clang" "08fbxa2a0kr3ni35ckppj0kyvlcyaywrhpqwcdrdy0z900mhcnw8";
+
+    unpackPhase = ''
+      unpackFile $src
+      mv clang-${version}* clang
+      sourceRoot=$PWD/clang
+      unpackFile ${clang-tools-extra_src}
+      mv clang-tools-extra-* $sourceRoot/tools/extra
+    '';
+
+    nativeBuildInputs = [ cmake python3 lld ]
+      ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx;
+
+    buildInputs = [ libxml2 llvm ]
+      ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+    cmakeFlags = [
+      "-DCMAKE_CXX_FLAGS=-std=c++14"
+      "-DCLANGD_BUILD_XPC=OFF"
+    ] ++ stdenv.lib.optionals enableManpages [
+      "-DCLANG_INCLUDE_DOCS=ON"
+      "-DLLVM_ENABLE_SPHINX=ON"
+      "-DSPHINX_OUTPUT_MAN=ON"
+      "-DSPHINX_OUTPUT_HTML=OFF"
+      "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+    ];
+
+    patches = [
+      # 10.0.0 only, this should be present in 10.0.1
+      ./clang-extension-handling.patch
+
+      ./purity.patch
+      # https://reviews.llvm.org/D51899
+      ./compiler-rt-baremetal.patch
+    ];
+
+    postPatch = ''
+      sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' \
+             -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' \
+             lib/Driver/ToolChains/*.cpp
+
+      # Patch for standalone doc building
+      sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt
+    '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
+      sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
+    '' + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
+      substituteInPlace tools/extra/clangd/CMakeLists.txt \
+        --replace "NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB" FALSE
+    '';
+
+    outputs = [ "out" "lib" "python" ];
+
+    # Clang expects to find LLVMgold in its own prefix
+    postInstall = ''
+      if [ -e ${llvm}/lib/LLVMgold.so ]; then
+        ln -sv ${llvm}/lib/LLVMgold.so $out/lib
+      fi
+
+      ln -sv $out/bin/clang $out/bin/cpp
+
+      # Move libclang to 'lib' output
+      moveToOutput "lib/libclang.*" "$lib"
+      moveToOutput "lib/libclang-cpp.*" "$lib"
+      substituteInPlace $out/lib/cmake/clang/ClangTargets-release.cmake \
+          --replace "\''${_IMPORT_PREFIX}/lib/libclang." "$lib/lib/libclang." \
+          --replace "\''${_IMPORT_PREFIX}/lib/libclang-cpp." "$lib/lib/libclang-cpp."
+
+      mkdir -p $python/bin $python/share/clang/
+      mv $out/bin/{git-clang-format,scan-view} $python/bin
+      if [ -e $out/bin/set-xcode-analyzer ]; then
+        mv $out/bin/set-xcode-analyzer $python/bin
+      fi
+      mv $out/share/clang/*.py $python/share/clang
+      rm $out/bin/c-index-test
+    '';
+
+    enableParallelBuilding = true;
+
+    passthru = {
+      isClang = true;
+      inherit llvm;
+    } // stdenv.lib.optionalAttrs (stdenv.targetPlatform.isLinux || (stdenv.cc.isGNU && stdenv.cc.cc ? gcc)) {
+      gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
+    };
+
+    meta = {
+      description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
+      homepage    = "https://llvm.org/";
+      license     = stdenv.lib.licenses.ncsa;
+      platforms   = stdenv.lib.platforms.all;
+    };
+  } // stdenv.lib.optionalAttrs enableManpages {
+    pname = "clang-manpages";
+
+    buildPhase = ''
+      make docs-clang-man
+    '';
+
+    installPhase = ''
+      mkdir -p $out/share/man/man1
+      # Manually install clang manpage
+      cp docs/man/*.1 $out/share/man/man1/
+    '';
+
+    outputs = [ "out" ];
+
+    doCheck = false;
+
+    meta.description = "man page for Clang ${version}";
+  });
+in self
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/clang/purity.patch b/nixpkgs/pkgs/development/compilers/llvm/10/clang/purity.patch
new file mode 100644
index 000000000000..a6729a9b004e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/clang/purity.patch
@@ -0,0 +1,30 @@
+From 4add81bba40dcec62c4ea4481be8e35ac53e89d8 Mon Sep 17 00:00:00 2001
+From: Will Dietz <w@wdtz.org>
+Date: Thu, 18 May 2017 11:56:12 -0500
+Subject: [PATCH] "purity" patch for 5.0
+
+---
+ lib/Driver/ToolChains/Gnu.cpp | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
+index fe3c0191bb..c6a482bece 100644
+--- a/lib/Driver/ToolChains/Gnu.cpp
++++ b/lib/Driver/ToolChains/Gnu.cpp
+@@ -494,13 +494,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
+   if (!IsStatic) {
+     if (Args.hasArg(options::OPT_rdynamic))
+       CmdArgs.push_back("-export-dynamic");
+-
+-    if (!Args.hasArg(options::OPT_shared) && !IsStaticPIE) {
+-      const std::string Loader =
+-          D.DyldPrefix + ToolChain.getDynamicLinker(Args);
+-      CmdArgs.push_back("-dynamic-linker");
+-      CmdArgs.push_back(Args.MakeArgString(Loader));
+-    }
+   }
+ 
+   CmdArgs.push_back("-o");
+-- 
+2.11.0
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/compiler-rt-armv7l.patch b/nixpkgs/pkgs/development/compilers/llvm/10/compiler-rt-armv7l.patch
new file mode 100644
index 000000000000..120cfe6feb2a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/compiler-rt-armv7l.patch
@@ -0,0 +1,32 @@
+diff -ur compiler-rt-10.0.0.src/cmake/builtin-config-ix.cmake compiler-rt-10.0.0.src-patched/cmake/builtin-config-ix.cmake
+--- compiler-rt-10.0.0.src/cmake/builtin-config-ix.cmake	2020-03-24 00:01:02.000000000 +0900
++++ compiler-rt-10.0.0.src-patched/cmake/builtin-config-ix.cmake	2020-05-10 03:42:00.883450706 +0900
+@@ -24,7 +24,7 @@
+ 
+ 
+ set(ARM64 aarch64)
+-set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k)
++set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k armv7l)
+ set(HEXAGON hexagon)
+ set(X86 i386)
+ set(X86_64 x86_64)
+diff -ur compiler-rt-10.0.0.src/lib/builtins/CMakeLists.txt compiler-rt-10.0.0.src-patched/lib/builtins/CMakeLists.txt
+--- compiler-rt-10.0.0.src/lib/builtins/CMakeLists.txt	2020-03-24 00:01:02.000000000 +0900
++++ compiler-rt-10.0.0.src-patched/lib/builtins/CMakeLists.txt	2020-05-10 03:44:49.468579650 +0900
+@@ -474,6 +474,7 @@
+ set(armv7_SOURCES ${arm_SOURCES})
+ set(armv7s_SOURCES ${arm_SOURCES})
+ set(armv7k_SOURCES ${arm_SOURCES})
++set(armv7l_SOURCES ${arm_SOURCES})
+ set(arm64_SOURCES ${aarch64_SOURCES})
+ 
+ # macho_embedded archs
+@@ -595,7 +596,7 @@
+   foreach (arch ${BUILTIN_SUPPORTED_ARCH})
+     if (CAN_TARGET_${arch})
+       # For ARM archs, exclude any VFP builtins if VFP is not supported
+-      if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7m|armv7em)$")
++      if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7l|armv7m|armv7em)$")
+         string(REPLACE ";" " " _TARGET_${arch}_CFLAGS "${TARGET_${arch}_CFLAGS}")
+         check_compile_definition(__VFP_FP__ "${CMAKE_C_FLAGS} ${_TARGET_${arch}_CFLAGS}" COMPILER_RT_HAS_${arch}_VFP)
+         if(NOT COMPILER_RT_HAS_${arch}_VFP)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/compiler-rt-codesign.patch b/nixpkgs/pkgs/development/compilers/llvm/10/compiler-rt-codesign.patch
new file mode 100644
index 000000000000..3cc12b94b200
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/compiler-rt-codesign.patch
@@ -0,0 +1,33 @@
+From 3dec5f3475a26aeb4678627795c4b67c6b7b4785 Mon Sep 17 00:00:00 2001
+From: Will Dietz <w@wdtz.org>
+Date: Tue, 19 Sep 2017 13:13:06 -0500
+Subject: [PATCH] remove codesign use on Apple, disable ios sim testing that
+ needs it
+
+---
+ cmake/Modules/AddCompilerRT.cmake |  8 ------
+ test/asan/CMakeLists.txt          | 52 ---------------------------------------
+ test/tsan/CMakeLists.txt          | 47 -----------------------------------
+ 3 files changed, 107 deletions(-)
+
+diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
+index bc5fb9ff7..b64eb4246 100644
+--- a/cmake/Modules/AddCompilerRT.cmake
++++ b/cmake/Modules/AddCompilerRT.cmake
+@@ -210,14 +210,6 @@ function(add_compiler_rt_runtime name type)
+         set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "")
+         set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib")
+       endif()
+-      if(APPLE)
+-        # Ad-hoc sign the dylibs
+-        add_custom_command(TARGET ${libname}
+-          POST_BUILD  
+-          COMMAND codesign --sign - $<TARGET_FILE:${libname}>
+-          WORKING_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR}
+-        )
+-      endif()
+     endif()
+     install(TARGETS ${libname}
+       ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}
+2.14.1
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/compiler-rt.nix b/nixpkgs/pkgs/development/compilers/llvm/10/compiler-rt.nix
new file mode 100644
index 000000000000..00c4f0677ebc
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/compiler-rt.nix
@@ -0,0 +1,86 @@
+{ stdenv, version, fetch, cmake, python3, llvm, libcxxabi }:
+
+let
+
+  useLLVM = stdenv.hostPlatform.useLLVM or false;
+  bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
+  inherit (stdenv.hostPlatform) isMusl;
+
+in
+
+stdenv.mkDerivation rec {
+  pname = "compiler-rt";
+  inherit version;
+  src = fetch pname "0x9c531k6ww21s2mkdwqx1vbdjmx6d4wmfb8gdbj0wqa796sczba";
+
+  nativeBuildInputs = [ cmake python3 llvm ];
+  buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
+
+  NIX_CFLAGS_COMPILE = [
+    "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0"
+  ];
+
+  cmakeFlags = [
+    "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
+    "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
+    "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
+  ] ++ stdenv.lib.optionals (useLLVM || bareMetal || isMusl) [
+    "-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
+    "-DCOMPILER_RT_BUILD_XRAY=OFF"
+    "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
+    "-DCOMPILER_RT_BUILD_PROFILE=OFF"
+  ] ++ stdenv.lib.optionals (useLLVM || bareMetal) [
+    "-DCMAKE_C_COMPILER_WORKS=ON"
+    "-DCMAKE_CXX_COMPILER_WORKS=ON"
+    "-DCOMPILER_RT_BAREMETAL_BUILD=ON"
+    "-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
+  ] ++ stdenv.lib.optionals (useLLVM) [
+    "-DCOMPILER_RT_BUILD_BUILTINS=ON"
+    "-DCMAKE_C_FLAGS=-nodefaultlibs"
+    #https://stackoverflow.com/questions/53633705/cmake-the-c-compiler-is-not-able-to-compile-a-simple-test-program
+    "-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
+  ] ++ stdenv.lib.optionals (bareMetal) [
+    "-DCOMPILER_RT_OS_DIR=baremetal"
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    ./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
+    ./find-darwin-sdk-version.patch # don't test for macOS being >= 10.15
+  ]# ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
+    ++ stdenv.lib.optional stdenv.hostPlatform.isAarch32 ./compiler-rt-armv7l.patch;
+
+
+  # TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
+  # to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra
+  # can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd
+  # get no binary cache for the entire platform. If you really find yourself wanting the TSAN, make this controllable by
+  # a flag and turn the flag off during the stdenv build.
+  postPatch = stdenv.lib.optionalString (!stdenv.isDarwin) ''
+    substituteInPlace cmake/builtin-config-ix.cmake \
+      --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)'
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    substituteInPlace cmake/config-ix.cmake \
+      --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
+  '' + stdenv.lib.optionalString (useLLVM) ''
+    substituteInPlace lib/builtins/int_util.c \
+      --replace "#include <stdlib.h>" ""
+    substituteInPlace lib/builtins/clear_cache.c \
+      --replace "#include <assert.h>" ""
+    substituteInPlace lib/builtins/cpu_model.c \
+      --replace "#include <assert.h>" ""
+  '';
+
+  # Hack around weird upsream RPATH bug
+  postInstall = stdenv.lib.optionalString (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isWasm) ''
+    ln -s "$out/lib"/*/* "$out/lib"
+  '' + stdenv.lib.optionalString (useLLVM) ''
+    ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbegin.o
+    ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtend.o
+    ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/crtbeginS.o
+    ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/crtendS.o
+  '';
+
+  enableParallelBuilding = true;
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/default.nix b/nixpkgs/pkgs/development/compilers/llvm/10/default.nix
new file mode 100644
index 000000000000..4181ab29bd7f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/default.nix
@@ -0,0 +1,203 @@
+{ lowPrio, newScope, pkgs, stdenv, cmake, gcc, libstdcxxHook
+, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith
+, buildLlvmTools # tools, but from the previous stage, for cross
+, targetLlvmLibraries # libraries, but from the next stage, for cross
+}:
+
+let
+  release_version = "10.0.0";
+  version = release_version; # differentiating these (variables) is important for rc's
+  targetConfig = stdenv.targetPlatform.config;
+
+  fetch = name: sha256: fetchurl {
+    url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${release_version}/${name}-${version}.src.tar.xz";
+    inherit sha256;
+  };
+
+  clang-tools-extra_src = fetch "clang-tools-extra" "074ija5s2jsdn0k035r2dzmryjmqxdnyg4xwvaqych2bazv8rpxc";
+
+  tools = stdenv.lib.makeExtensible (tools: let
+    callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
+    mkExtraBuildCommands = cc: ''
+      rsrc="$out/resource-root"
+      mkdir "$rsrc"
+      ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc"
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
+      echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
+    '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc && !(stdenv.targetPlatform.useLLVM or false)) ''
+      echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags
+    '';
+  in {
+
+    llvm = callPackage ./llvm.nix { };
+
+    clang-unwrapped = callPackage ./clang {
+      inherit (tools) lld;
+      inherit clang-tools-extra_src;
+    };
+
+    llvm-manpages = lowPrio (tools.llvm.override {
+      enableManpages = true;
+      python3 = pkgs.python3;  # don't use python-boot
+    });
+
+    clang-manpages = lowPrio (tools.clang-unwrapped.override {
+      enableManpages = true;
+      python3 = pkgs.python3;  # don't use python-boot
+    });
+
+    lldb-manpages = lowPrio (tools.lldb.override {
+      enableManpages = true;
+      python3 = pkgs.python3;  # don't use python-boot
+    });
+
+    libclang = tools.clang-unwrapped.lib;
+
+    clang = if stdenv.cc.isGNU then tools.libstdcxxClang else tools.libcxxClang;
+
+    libstdcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      extraPackages = [
+        libstdcxxHook
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = ''
+          echo "-target ${targetConfig}" >> $out/nix-support/cc-cflags
+          echo "-B${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-cflags
+          echo "-L${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-ldflags
+          echo "-L${gcc.cc.lib}/${targetConfig}/lib" >> $out/nix-support/cc-ldflags
+      '' + mkExtraBuildCommands cc;
+    };
+
+    libcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = targetLlvmLibraries.libcxx;
+      extraPackages = [
+        targetLlvmLibraries.libcxx
+        targetLlvmLibraries.libcxxabi
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+    };
+
+    lld = callPackage ./lld.nix {};
+
+    lldb = callPackage ./lldb.nix {};
+
+    # Below, is the LLVM bootstrapping logic. It handles building a
+    # fully LLVM toolchain from scratch. No GCC toolchain should be
+    # pulled in. As a consequence, it is very quick to build different
+    # targets provided by LLVM and we can also build for what GCC
+    # doesn’t support like LLVM. Probably we should move to some other
+    # file.
+
+    bintools = callPackage ./bintools.nix {};
+
+    lldClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = targetLlvmLibraries.libcxx;
+      bintools = wrapBintoolsWith {
+        inherit (tools) bintools;
+      };
+      extraPackages = [
+        targetLlvmLibraries.libcxx
+        targetLlvmLibraries.libcxxabi
+        targetLlvmLibraries.compiler-rt
+      ] ++ stdenv.lib.optionals (!stdenv.targetPlatform.isWasm) [
+        targetLlvmLibraries.libunwind
+      ];
+      extraBuildCommands = ''
+        echo "-target ${stdenv.targetPlatform.config}" >> $out/nix-support/cc-cflags
+        echo "-rtlib=compiler-rt -Wno-unused-command-line-argument" >> $out/nix-support/cc-cflags
+        echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
+      '' + stdenv.lib.optionalString (!stdenv.targetPlatform.isWasm) ''
+        echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags
+      '' + stdenv.lib.optionalString stdenv.targetPlatform.isWasm ''
+        echo "-fno-exceptions" >> $out/nix-support/cc-cflags
+      '' + mkExtraBuildCommands cc;
+    };
+
+    lldClangNoLibcxx = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = wrapBintoolsWith {
+        inherit (tools) bintools;
+      };
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = ''
+        echo "-target ${stdenv.targetPlatform.config}" >> $out/nix-support/cc-cflags
+        echo "-rtlib=compiler-rt" >> $out/nix-support/cc-cflags
+        echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
+        echo "-nostdlib++" >> $out/nix-support/cc-cflags
+      '' + mkExtraBuildCommands cc;
+    };
+
+    lldClangNoLibc = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = wrapBintoolsWith {
+        inherit (tools) bintools;
+        libc = null;
+      };
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = ''
+        echo "-target ${stdenv.targetPlatform.config}" >> $out/nix-support/cc-cflags
+        echo "-rtlib=compiler-rt" >> $out/nix-support/cc-cflags
+        echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
+      '' + mkExtraBuildCommands cc;
+    };
+
+    lldClangNoCompilerRt = wrapCCWith {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = wrapBintoolsWith {
+        inherit (tools) bintools;
+        libc = null;
+      };
+      extraPackages = [ ];
+      extraBuildCommands = ''
+        echo "-nostartfiles" >> $out/nix-support/cc-cflags
+        echo "-target ${stdenv.targetPlatform.config}" >> $out/nix-support/cc-cflags
+      '';
+    };
+
+  });
+
+  libraries = stdenv.lib.makeExtensible (libraries: let
+    callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
+  in {
+
+    compiler-rt = callPackage ./compiler-rt.nix ({} //
+      (stdenv.lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
+        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoCompilerRt;
+      }));
+
+    stdenv = overrideCC stdenv buildLlvmTools.clang;
+
+    libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
+
+    libcxx = callPackage ./libc++ ({} //
+      (stdenv.lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
+        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
+      }));
+
+    libcxxabi = callPackage ./libc++abi.nix ({} //
+      (stdenv.lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
+        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
+        libunwind = libraries.libunwind;
+      }));
+
+    openmp = callPackage ./openmp.nix {};
+
+    libunwind = callPackage ./libunwind.nix ({} //
+      (stdenv.lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
+        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
+      }));
+
+  });
+
+in { inherit tools libraries; } // libraries // tools
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/find-darwin-sdk-version.patch b/nixpkgs/pkgs/development/compilers/llvm/10/find-darwin-sdk-version.patch
new file mode 100644
index 000000000000..fc16ddda76b7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/find-darwin-sdk-version.patch
@@ -0,0 +1,62 @@
+--- a/cmake/Modules/CompilerRTDarwinUtils.cmake	2020-01-25 23:13:55.000000000 +0100
++++ b/cmake/Modules/CompilerRTDarwinUtils.cmake	2020-01-25 23:19:37.000000000 +0100
+@@ -43,41 +43,6 @@
+   set(DARWIN_${sdk_name}_CACHED_SYSROOT ${var_internal} CACHE STRING "Darwin SDK path for SDK ${sdk_name}." FORCE)
+ endfunction()
+ 
+-function(find_darwin_sdk_version var sdk_name)
+-  # We deliberately don't cache the result here because
+-  # CMake's caching causes too many problems.
+-  set(result_process 1)
+-  if(NOT DARWIN_PREFER_PUBLIC_SDK)
+-    # Let's first try the internal SDK, otherwise use the public SDK.
+-    execute_process(
+-      COMMAND xcrun --sdk ${sdk_name}.internal --show-sdk-version
+-      RESULT_VARIABLE result_process
+-      OUTPUT_VARIABLE var_internal
+-      OUTPUT_STRIP_TRAILING_WHITESPACE
+-      ERROR_FILE /dev/null
+-    )
+-  endif()
+-  if((NOT ${result_process} EQUAL 0) OR "" STREQUAL "${var_internal}")
+-    execute_process(
+-      COMMAND xcrun --sdk ${sdk_name} --show-sdk-version
+-      RESULT_VARIABLE result_process
+-      OUTPUT_VARIABLE var_internal
+-      OUTPUT_STRIP_TRAILING_WHITESPACE
+-      ERROR_FILE /dev/null
+-    )
+-  endif()
+-  if(NOT result_process EQUAL 0)
+-    message(FATAL_ERROR
+-      "Failed to determine SDK version for \"${sdk_name}\" SDK")
+-  endif()
+-  # Check reported version looks sane.
+-  if (NOT "${var_internal}" MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+)?$")
+-    message(FATAL_ERROR
+-      "Reported SDK version \"${var_internal}\" does not look like a version")
+-  endif()
+-  set(${var} ${var_internal} PARENT_SCOPE)
+-endfunction()
+-
+ # There isn't a clear mapping of what architectures are supported with a given
+ # target platform, but ld's version output does list the architectures it can
+ # link for.
+@@ -119,17 +84,6 @@
+     foreach(flag ${DARWIN_${os}_LINK_FLAGS})
+       set(os_linker_flags "${os_linker_flags} ${flag}")
+     endforeach()
+-
+-    # Disable building for i386 for macOS SDK >= 10.15. The SDK doesn't support
+-    # linking for i386 and the corresponding OS doesn't allow running macOS i386
+-    # binaries.
+-    if ("${os}" STREQUAL "osx")
+-      find_darwin_sdk_version(macosx_sdk_version "macosx")
+-      if ("${macosx_sdk_version}" VERSION_GREATER 10.15 OR "${macosx_sdk_version}" VERSION_EQUAL 10.15)
+-        message(STATUS "Disabling i386 slice for ${valid_archs}")
+-        list(REMOVE_ITEM archs "i386")
+-      endif()
+-    endif()
+   endif()
+ 
+   # The simple program will build for x86_64h on the simulator because it is 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/libc++/default.nix b/nixpkgs/pkgs/development/compilers/llvm/10/libc++/default.nix
new file mode 100644
index 000000000000..ed76ce77a8bb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/libc++/default.nix
@@ -0,0 +1,55 @@
+{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version
+, enableShared ? true }:
+
+stdenv.mkDerivation {
+  pname = "libc++";
+  inherit version;
+
+  src = fetch "libcxx" "1isnj78diknh0nvd73mlq8p8g209f9bab2mbysq826bg2wzql3r7";
+
+  postUnpack = ''
+    unpackFile ${libcxxabi.src}
+    export LIBCXXABI_INCLUDE_DIR="$PWD/$(ls -d libcxxabi-${version}*)/include"
+  '';
+
+  patches = stdenv.lib.optional stdenv.hostPlatform.isMusl ../../libcxx-0001-musl-hacks.patch;
+
+  preConfigure = ''
+    # Get headers from the cxxabi source so we can see private headers not installed by the cxxabi package
+    cmakeFlagsArray=($cmakeFlagsArray -DLIBCXX_CXX_ABI_INCLUDE_PATHS="$LIBCXXABI_INCLUDE_DIR")
+  '' + lib.optionalString stdenv.hostPlatform.isMusl ''
+    patchShebangs utils/cat_files.py
+  '';
+  nativeBuildInputs = [ cmake ]
+    ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) python3;
+
+  buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+  cmakeFlags = [
+    "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"
+    "-DLIBCXX_LIBCPPABI_VERSION=2"
+    "-DLIBCXX_CXX_ABI=libcxxabi"
+  ] ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1"
+    ++ stdenv.lib.optional (stdenv.hostPlatform.useLLVM or false) "-DLIBCXX_USE_COMPILER_RT=ON"
+    ++ stdenv.lib.optional stdenv.hostPlatform.isWasm [
+      "-DLIBCXX_ENABLE_THREADS=OFF"
+      "-DLIBCXX_ENABLE_FILESYSTEM=OFF"
+      "-DLIBCXX_ENABLE_EXCEPTIONS=OFF"
+    ] ++ stdenv.lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF";
+
+  enableParallelBuilding = true;
+
+  linkCxxAbi = stdenv.isLinux;
+
+  setupHooks = [
+    ../../../../../build-support/setup-hooks/role.bash
+    ./setup-hook.sh
+  ];
+
+  meta = {
+    homepage = "https://libcxx.llvm.org/";
+    description = "A new implementation of the C++ standard library, targeting C++11";
+    license = with stdenv.lib.licenses; [ ncsa mit ];
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/libc++/setup-hook.sh b/nixpkgs/pkgs/development/compilers/llvm/10/libc++/setup-hook.sh
new file mode 100644
index 000000000000..3a274aecc23d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/libc++/setup-hook.sh
@@ -0,0 +1,6 @@
+# See pkgs/build-support/setup-hooks/role.bash
+getHostRole
+
+linkCxxAbi="@linkCxxAbi@"
+export NIX_CXXSTDLIB_COMPILE${role_post}+=" -isystem @out@/include/c++/v1"
+export NIX_CXXSTDLIB_LINK${role_post}=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/libc++abi.nix b/nixpkgs/pkgs/development/compilers/llvm/10/libc++abi.nix
new file mode 100644
index 000000000000..ab45f27d24f4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/libc++abi.nix
@@ -0,0 +1,67 @@
+{ stdenv, cmake, fetch, libcxx, libunwind, llvm, version
+, enableShared ? true }:
+
+stdenv.mkDerivation {
+  pname = "libc++abi";
+  inherit version;
+
+  src = fetch "libcxxabi" "1q8lrbh68a9v4lr88b8xsjpmwx5z96sa5wnkb92xx7ccm1ssq6z7";
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind;
+
+  cmakeFlags = stdenv.lib.optionals (stdenv.hostPlatform.useLLVM or false) [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+    "-DLIBCXXABI_USE_LLVM_UNWINDER=ON"
+  ] ++ stdenv.lib.optionals stdenv.hostPlatform.isWasm [
+    "-DLIBCXXABI_ENABLE_THREADS=OFF"
+    "-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF"
+  ] ++ stdenv.lib.optionals (!enableShared) [
+    "-DLIBCXXABI_ENABLE_SHARED=OFF"
+  ];
+
+  patches = [ ./libcxxabi-no-threads.patch ];
+
+  postUnpack = ''
+    unpackFile ${libcxx.src}
+    unpackFile ${llvm.src}
+    cmakeFlags+=" -DLLVM_PATH=$PWD/$(ls -d llvm-*) -DLIBCXXABI_LIBCXX_PATH=$PWD/$(ls -d libcxx-*)"
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    export TRIPLE=x86_64-apple-darwin
+  '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
+    patch -p1 -d $(ls -d libcxx-*) -i ${../libcxx-0001-musl-hacks.patch}
+  '' + stdenv.lib.optionalString stdenv.hostPlatform.isWasm ''
+    patch -p1 -d $(ls -d llvm-*) -i ${./libcxxabi-wasm.patch}
+  '';
+
+  installPhase = if stdenv.isDarwin
+    then ''
+      for file in lib/*.dylib; do
+        # this should be done in CMake, but having trouble figuring out
+        # the magic combination of necessary CMake variables
+        # if you fancy a try, take a look at
+        # https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
+        install_name_tool -id $out/$file $file
+      done
+      make install
+      install -d 755 $out/include
+      install -m 644 ../include/*.h $out/include
+    ''
+    else ''
+      install -d -m 755 $out/include $out/lib
+      install -m 644 lib/libc++abi.a $out/lib
+      install -m 644 ../include/cxxabi.h $out/include
+    '' + stdenv.lib.optionalString enableShared ''
+      install -m 644 lib/libc++abi.so.1.0 $out/lib
+      ln -s libc++abi.so.1.0 $out/lib/libc++abi.so
+      ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
+    '';
+
+  meta = {
+    homepage = "https://libcxxabi.llvm.org/";
+    description = "A new implementation of low level support for a standard C++ library";
+    license = with stdenv.lib.licenses; [ ncsa mit ];
+    maintainers = with stdenv.lib.maintainers; [ vlstill ];
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/libcxxabi-no-threads.patch b/nixpkgs/pkgs/development/compilers/llvm/10/libcxxabi-no-threads.patch
new file mode 100644
index 000000000000..787f3e16500e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/libcxxabi-no-threads.patch
@@ -0,0 +1,12 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4138acf..41b4763 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -362,6 +362,7 @@ if (NOT LIBCXXABI_ENABLE_THREADS)
+                         " is also set to ON.")
+   endif()
+   add_definitions(-D_LIBCXXABI_HAS_NO_THREADS)
++  add_definitions(-D_LIBCPP_HAS_NO_THREADS)
+ endif()
+ 
+ if (LIBCXXABI_HAS_EXTERNAL_THREAD_API)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/libcxxabi-wasm.patch b/nixpkgs/pkgs/development/compilers/llvm/10/libcxxabi-wasm.patch
new file mode 100644
index 000000000000..4ebfe46aa813
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/libcxxabi-wasm.patch
@@ -0,0 +1,16 @@
+diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake
+index 15497d405e0..33f7f18193a 100644
+--- a/cmake/modules/HandleLLVMOptions.cmake
++++ b/cmake/modules/HandleLLVMOptions.cmake
+@@ -127,7 +127,10 @@ else(WIN32)
+       set(LLVM_HAVE_LINK_VERSION_SCRIPT 1)
+     endif()
+   else(FUCHSIA OR UNIX)
+-    MESSAGE(SEND_ERROR "Unable to determine platform")
++    if(${CMAKE_SYSTEM_NAME} MATCHES "Wasi")
++    else()
++      MESSAGE(SEND_ERROR "Unable to determine platform")
++    endif()
+   endif(FUCHSIA OR UNIX)
+ endif(WIN32)
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/libunwind.nix b/nixpkgs/pkgs/development/compilers/llvm/10/libunwind.nix
new file mode 100644
index 000000000000..4e55b28c2430
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/libunwind.nix
@@ -0,0 +1,14 @@
+{ stdenv, version, fetch, cmake, fetchpatch, enableShared ? true }:
+
+stdenv.mkDerivation rec {
+  pname = "libunwind";
+  inherit version;
+
+  src = fetch pname "09n66dl9cc17d81qflj5h1l4garmhvzfi2lhcb7rx00l8z65xp09";
+
+  nativeBuildInputs = [ cmake ];
+
+  enableParallelBuilding = true;
+
+  cmakeFlags = stdenv.lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/lld.nix b/nixpkgs/pkgs/development/compilers/llvm/10/lld.nix
new file mode 100644
index 000000000000..6a0032de2ac4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/lld.nix
@@ -0,0 +1,33 @@
+{ stdenv
+, fetch
+, cmake
+, libxml2
+, llvm
+, version
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lld";
+  inherit version;
+
+  src = fetch pname "026pwcbczcg0j5c9h7hxxrn3ki81ia9m9sfn0sy0bvzffv2xg85r";
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ llvm libxml2 ];
+
+  outputs = [ "out" "dev" ];
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    moveToOutput include "$dev"
+    moveToOutput lib "$dev"
+  '';
+
+  meta = {
+    description = "The LLVM Linker";
+    homepage    = "https://lld.llvm.org/";
+    license     = stdenv.lib.licenses.ncsa;
+    platforms   = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/lldb-procfs.patch b/nixpkgs/pkgs/development/compilers/llvm/10/lldb-procfs.patch
new file mode 100644
index 000000000000..b075dbaeee0a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/lldb-procfs.patch
@@ -0,0 +1,31 @@
+--- a/source/Plugins/Process/Linux/Procfs.h
++++ b/source/Plugins/Process/Linux/Procfs.h
+@@ -11,21 +11,12 @@
+ // sys/procfs.h on Android/Linux for all supported architectures.
+ 
+ #include <sys/ptrace.h>
++#include <asm/ptrace.h>
+ 
+-#ifdef __ANDROID__
+-#if defined(__arm64__) || defined(__aarch64__)
+-typedef unsigned long elf_greg_t;
+-typedef elf_greg_t
+-    elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))];
+-typedef struct user_fpsimd_state elf_fpregset_t;
+-#ifndef NT_FPREGSET
+-#define NT_FPREGSET NT_PRFPREG
+-#endif // NT_FPREGSET
+-#elif defined(__mips__)
+-#ifndef NT_FPREGSET
+-#define NT_FPREGSET NT_PRFPREG
+-#endif // NT_FPREGSET
+-#endif
+-#else // __ANDROID__
++#if !defined(__GLIBC__) && defined(__powerpc__)
++#define pt_regs musl_pt_regs
++#include <sys/procfs.h>
++#undef pt_regs
++#else
+ #include <sys/procfs.h>
+-#endif // __ANDROID__
++#endif
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/lldb.nix b/nixpkgs/pkgs/development/compilers/llvm/10/lldb.nix
new file mode 100644
index 000000000000..90716f67f836
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/lldb.nix
@@ -0,0 +1,101 @@
+{ stdenv
+, fetch
+, cmake
+, zlib
+, ncurses
+, swig
+, which
+, libedit
+, libxml2
+, llvm
+, clang-unwrapped
+, python3
+, version
+, darwin
+, lit
+, enableManpages ? false
+}:
+
+stdenv.mkDerivation (rec {
+  pname = "lldb";
+  inherit version;
+
+  src = fetch pname "0ddikvc0kbqlqvsypsm9nhfwmyw4prp4rv49f0bgacyh5ssgq7yx";
+
+  patches = [ ./lldb-procfs.patch ];
+
+  nativeBuildInputs = [ cmake python3 which swig lit ]
+    ++ stdenv.lib.optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
+
+  buildInputs = [
+    ncurses
+    zlib
+    libedit
+    libxml2
+    llvm
+  ]
+  ++ stdenv.lib.optionals stdenv.isDarwin [
+    darwin.libobjc
+    darwin.apple_sdk.libs.xpc
+    darwin.apple_sdk.frameworks.Foundation
+    darwin.bootstrap_cmds
+    darwin.apple_sdk.frameworks.Carbon
+    darwin.apple_sdk.frameworks.Cocoa
+  ];
+
+  CXXFLAGS = "-fno-rtti";
+  hardeningDisable = [ "format" ];
+
+  cmakeFlags = [
+    "-DLLDB_CODESIGN_IDENTITY=" # codesigning makes nondeterministic
+    "-DClang_DIR=${clang-unwrapped}/lib/cmake"
+    "-DLLVM_EXTERNAL_LIT=${lit}/bin/lit"
+  ] ++ stdenv.lib.optionals stdenv.isDarwin [
+    "-DLLDB_USE_SYSTEM_DEBUGSERVER=ON"
+  ] ++ stdenv.lib.optionals enableManpages [
+    "-DLLVM_ENABLE_SPHINX=ON"
+    "-DSPHINX_OUTPUT_MAN=ON"
+    "-DSPHINX_OUTPUT_HTML=OFF"
+  ]
+;
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    # Editor support
+    # vscode:
+    install -D ../tools/lldb-vscode/package.json $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/package.json
+    mkdir -p $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin
+    ln -s $out/bin/lldb-vscode $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A next-generation high-performance debugger";
+    homepage = "https://lldb.llvm.org";
+    license = licenses.ncsa;
+    platforms = platforms.all;
+  };
+} // stdenv.lib.optionalAttrs enableManpages {
+  pname = "lldb-manpages";
+
+  buildPhase = ''
+    make docs-lldb-man
+  '';
+
+  propagatedBuildInputs = [];
+
+  installPhase = ''
+    # manually install lldb man page
+    mkdir -p $out/share/man/man1
+    install docs/man/lldb.1 -t $out/share/man/man1/
+  '';
+
+  postPatch = null;
+  postInstall = null;
+
+  outputs = [ "out" ];
+
+  doCheck = false;
+
+  meta.description = "man pages for LLDB ${version}";
+})
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/llvm-extension-handling.patch b/nixpkgs/pkgs/development/compilers/llvm/10/llvm-extension-handling.patch
new file mode 100644
index 000000000000..cf4b1eaacf7d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/llvm-extension-handling.patch
@@ -0,0 +1,146 @@
+Compressed diff from
+```
+git show d21664cce1db8debe2528f36b1fbd2b8af9c9401 87dac7da68ea1e0adac78c59ef1891dcf9632b67 3a0f6e699bb6d96dc62dce6faef20ac26cf103fd
+```
+with the purpose of avoiding linker errors arising in the polly-flavoured clang.
+
+diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
+index a02c2a5a23f..faf8f561faa 100644
+--- llvm/CMakeLists.txt
++++ llvm/CMakeLists.txt
+@@ -1069,6 +1069,7 @@ endif()
+ # after all targets are created.
+ include(LLVMDistributionSupport)
+ llvm_distribution_add_targets()
++process_llvm_pass_plugins(GEN_CONFIG)
+ 
+ # This allows us to deploy the Universal CRT DLLs by passing -DCMAKE_INSTALL_UCRT_LIBRARIES=ON to CMake
+ if (MSVC AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows" AND CMAKE_INSTALL_UCRT_LIBRARIES)
+@@ -1093,5 +1094,3 @@ endif()
+ if (LLVM_INCLUDE_UTILS AND LLVM_INCLUDE_TOOLS)
+   add_subdirectory(utils/llvm-locstats)
+ endif()
+-
+-process_llvm_pass_plugins()
+diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
+index fd69786544a..8fbb33a22fd 100644
+--- llvm/cmake/modules/AddLLVM.cmake
++++ llvm/cmake/modules/AddLLVM.cmake
+@@ -884,53 +884,71 @@ function(add_llvm_pass_plugin name)
+     if (TARGET intrinsics_gen)
+       add_dependencies(obj.${name} intrinsics_gen)
+     endif()
+-    message(STATUS "Registering ${name} as a pass plugin (static build: ${LLVM_${name_upper}_LINK_INTO_TOOLS})")
+-    set_property(GLOBAL APPEND PROPERTY LLVM_COMPILE_EXTENSIONS ${name})
++    set_property(GLOBAL APPEND PROPERTY LLVM_STATIC_EXTENSIONS ${name})
+   elseif(NOT ARG_NO_MODULE)
+     add_llvm_library(${name} MODULE ${ARG_UNPARSED_ARGUMENTS})
+   else()
+     add_llvm_library(${name} OBJECT ${ARG_UNPARSED_ARGUMENTS})
+   endif()
++  message(STATUS "Registering ${name} as a pass plugin (static build: ${LLVM_${name_upper}_LINK_INTO_TOOLS})")
+ 
+ endfunction(add_llvm_pass_plugin)
+ 
+-# Generate X Macro file for extension handling. It provides a
+-# HANDLE_EXTENSION(extension_namespace, ExtensionProject) call for each extension
+-# allowing client code to define HANDLE_EXTENSION to have a specific code be run for
+-# each extension.
++# process_llvm_pass_plugins([GEN_CONFIG])
++#
++# Correctly set lib dependencies between plugins and tools, based on tools
++# registered with the ENABLE_PLUGINS option.
++#
++# if GEN_CONFIG option is set, also generate X Macro file for extension
++# handling. It provides a HANDLE_EXTENSION(extension_namespace, ExtensionProject)
++# call for each extension allowing client code to define
++# HANDLE_EXTENSION to have a specific code be run for each extension.
+ #
+-# Also correctly set lib dependencies between plugins and tools.
+ function(process_llvm_pass_plugins)
+-  get_property(LLVM_EXTENSIONS GLOBAL PROPERTY LLVM_COMPILE_EXTENSIONS)
+-  file(WRITE "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def.tmp" "//extension handlers\n")
+-  foreach(llvm_extension ${LLVM_EXTENSIONS})
+-    string(TOLOWER ${llvm_extension} llvm_extension_lower)
+-
+-    string(TOUPPER ${llvm_extension} llvm_extension_upper)
+-    string(SUBSTRING ${llvm_extension_upper} 0 1 llvm_extension_upper_first)
+-    string(SUBSTRING ${llvm_extension_lower} 1 -1 llvm_extension_lower_tail)
+-    string(CONCAT llvm_extension_project ${llvm_extension_upper_first} ${llvm_extension_lower_tail})
+-
+-    if(LLVM_${llvm_extension_upper}_LINK_INTO_TOOLS)
+-      file(APPEND "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def.tmp" "HANDLE_EXTENSION(${llvm_extension_project})\n")
+-
+-      get_property(llvm_plugin_targets GLOBAL PROPERTY LLVM_PLUGIN_TARGETS)
+-      foreach(llvm_plugin_target ${llvm_plugin_targets})
+-        set_property(TARGET ${llvm_plugin_target} APPEND PROPERTY LINK_LIBRARIES ${llvm_extension})
+-        set_property(TARGET ${llvm_plugin_target} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${llvm_extension})
+-      endforeach()
+-    else()
+-      add_llvm_library(${llvm_extension_lower} MODULE obj.${llvm_extension_lower})
+-    endif()
++  cmake_parse_arguments(ARG
++      "GEN_CONFIG" "" ""
++    ${ARGN})
+ 
++  if(ARG_GEN_CONFIG)
++      get_property(LLVM_STATIC_EXTENSIONS GLOBAL PROPERTY LLVM_STATIC_EXTENSIONS)
++  else()
++      include(LLVMConfigExtensions)
++  endif()
++
++  # Add static plugins to each plugin target.
++  foreach(llvm_extension ${LLVM_STATIC_EXTENSIONS})
++    get_property(llvm_plugin_targets GLOBAL PROPERTY LLVM_PLUGIN_TARGETS)
++    foreach(llvm_plugin_target ${llvm_plugin_targets})
++      set_property(TARGET ${llvm_plugin_target} APPEND PROPERTY LINK_LIBRARIES ${llvm_extension})
++      set_property(TARGET ${llvm_plugin_target} APPEND PROPERTY INTERFACE_LINK_LIBRARIES ${llvm_extension})
++    endforeach()
+   endforeach()
+-  file(APPEND "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def.tmp" "#undef HANDLE_EXTENSION\n")
+ 
+-  # only replace if there's an actual change
+-  execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
+-    "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def.tmp"
+-    "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def")
+-  file(REMOVE "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def.tmp")
++  # Eventually generate the extension header, and store config to a cmake file
++  # for usage in third-party configuration.
++  if(ARG_GEN_CONFIG)
++      set(LLVM_INSTALL_PACKAGE_DIR lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm)
++      set(llvm_cmake_builddir "${LLVM_BINARY_DIR}/${LLVM_INSTALL_PACKAGE_DIR}")
++      file(WRITE
++          "${llvm_cmake_builddir}/LLVMConfigExtensions.cmake"
++          "set(LLVM_STATIC_EXTENSIONS ${LLVM_STATIC_EXTENSIONS})")
++      install(FILES
++          ${llvm_cmake_builddir}/LLVMConfigExtensions.cmake
++          DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
++          COMPONENT cmake-exports)
++
++      file(WRITE "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def.tmp" "//extension handlers\n")
++      foreach(llvm_extension ${LLVM_STATIC_EXTENSIONS})
++        file(APPEND "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def.tmp" "HANDLE_EXTENSION(${llvm_extension})\n")
++      endforeach()
++      file(APPEND "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def.tmp" "#undef HANDLE_EXTENSION\n")
++
++      # only replace if there's an actual change
++      execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
++        "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def.tmp"
++        "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def")
++      file(REMOVE "${LLVM_BINARY_DIR}/include/llvm/Support/Extension.def.tmp")
++  endif()
+ endfunction()
+ 
+ function(export_executable_symbols target)
+diff --git a/llvm/cmake/modules/CMakeLists.txt b/llvm/cmake/modules/CMakeLists.txt
+index 9cf22b436fa..af757d6199a 100644
+--- llvm/cmake/modules/CMakeLists.txt
++++ llvm/cmake/modules/CMakeLists.txt
+@@ -136,6 +136,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
+     FILES_MATCHING PATTERN *.cmake
+     PATTERN .svn EXCLUDE
+     PATTERN LLVMConfig.cmake EXCLUDE
++    PATTERN LLVMConfigExtensions.cmake EXCLUDE
+     PATTERN LLVMConfigVersion.cmake EXCLUDE
+     PATTERN LLVM-Config.cmake EXCLUDE
+     PATTERN GetHostTriple.cmake EXCLUDE)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/llvm-outputs.patch b/nixpkgs/pkgs/development/compilers/llvm/10/llvm-outputs.patch
new file mode 100644
index 000000000000..40096fa3497f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/llvm-outputs.patch
@@ -0,0 +1,26 @@
+diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
+index 94d426b..37f7794 100644
+--- a/tools/llvm-config/llvm-config.cpp
++++ b/tools/llvm-config/llvm-config.cpp
+@@ -333,6 +333,21 @@ int main(int argc, char **argv) {
+     ActiveIncludeOption = "-I" + ActiveIncludeDir;
+   }
+ 
++  /// Nix-specific multiple-output handling: override ActiveLibDir if --link-shared
++  if (!IsInDevelopmentTree) {
++    bool WantShared = true;
++    for (int i = 1; i < argc; ++i) {
++      StringRef Arg = argv[i];
++      if (Arg == "--link-shared")
++        WantShared = true;
++      else if (Arg == "--link-static")
++        WantShared = false; // the last one wins
++    }
++
++    if (WantShared)
++      ActiveLibDir = std::string("@lib@") + "/lib" + LLVM_LIBDIR_SUFFIX;
++  }
++
+   /// We only use `shared library` mode in cases where the static library form
+   /// of the components provided are not available; note however that this is
+   /// skipped if we're run from within the build dir. However, once installed,
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/llvm.nix b/nixpkgs/pkgs/development/compilers/llvm/10/llvm.nix
new file mode 100644
index 000000000000..dd0728b40c94
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/llvm.nix
@@ -0,0 +1,192 @@
+{ stdenv
+, fetch
+, cmake
+, python3
+, libffi
+, libbfd
+, libpfm
+, libxml2
+, ncurses
+, version
+, release_version
+, zlib
+, buildPackages
+, debugVersion ? false
+, enableManpages ? false
+, enableSharedLibraries ? true
+, enablePFM ? !(stdenv.isDarwin
+  || stdenv.isAarch64 # broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
+  || stdenv.isAarch32 # broken for the armv7l builder
+)
+, enablePolly ? true
+}:
+
+let
+  inherit (stdenv.lib) optional optionals optionalString;
+
+  # Used when creating a version-suffixed symlink of libLLVM.dylib
+  shortVersion = with stdenv.lib;
+    concatStringsSep "." (take 1 (splitString "." release_version));
+
+in stdenv.mkDerivation (rec {
+  pname = "llvm";
+  inherit version;
+
+  src = fetch pname "1pwgm6cr0xr5a0hrbqs1zvsvvjvy0yq1y47c96804wcs795s90yz";
+  polly_src = fetch "polly" "15sd3dq0w60jsb76pis09lkagj5iy43h9hg4kd9gx5l8cbnsdyrm";
+
+  unpackPhase = ''
+    unpackFile $src
+    mv llvm-${version}* llvm
+    sourceRoot=$PWD/llvm
+  '' + optionalString enablePolly ''
+    unpackFile $polly_src
+    mv polly-* $sourceRoot/tools/polly
+  '';
+
+  outputs = [ "out" "python" ]
+    ++ optional enableSharedLibraries "lib";
+
+  nativeBuildInputs = [ cmake python3 ]
+    ++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
+
+  buildInputs = [ libxml2 libffi ]
+    ++ optional enablePFM libpfm; # exegesis
+
+  propagatedBuildInputs = [ ncurses zlib ];
+
+  patches = [
+    # 10.0.0rc3-only
+    ./llvm-extension-handling.patch
+  ];
+
+  postPatch = optionalString stdenv.isDarwin ''
+    substituteInPlace cmake/modules/AddLLVM.cmake \
+      --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \
+      --replace 'set(_install_rpath "@loader_path/../lib''${LLVM_LIBDIR_SUFFIX}" ''${extra_libdir})' ""
+  ''
+  # Patch llvm-config to return correct library path based on --link-{shared,static}.
+  + optionalString (enableSharedLibraries) ''
+    substitute '${./llvm-outputs.patch}' ./llvm-outputs.patch --subst-var lib
+    patch -p1 < ./llvm-outputs.patch
+  '' + ''
+    # FileSystem permissions tests fail with various special bits
+    substituteInPlace unittests/Support/CMakeLists.txt \
+      --replace "Path.cpp" ""
+    rm unittests/Support/Path.cpp
+  '' + optionalString stdenv.hostPlatform.isMusl ''
+    patch -p1 -i ${../TLI-musl.patch}
+    substituteInPlace unittests/Support/CMakeLists.txt \
+      --replace "add_subdirectory(DynamicLibrary)" ""
+    rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
+    # valgrind unhappy with musl or glibc, but fails w/musl only
+    rm test/CodeGen/AArch64/wineh4.mir
+  '' + optionalString stdenv.hostPlatform.isAarch32 ''
+    # skip failing X86 test cases on 32-bit ARM
+    rm test/DebugInfo/X86/convert-debugloc.ll
+    rm test/DebugInfo/X86/convert-inlined.ll
+    rm test/DebugInfo/X86/convert-linked.ll
+    rm test/tools/dsymutil/X86/op-convert.test
+  '' + optionalString (stdenv.hostPlatform.system == "armv6l-linux") ''
+    # Seems to require certain floating point hardware (NEON?)
+    rm test/ExecutionEngine/frem.ll
+  '' + ''
+    patchShebangs test/BugPoint/compile-custom.ll.py
+  '';
+
+  # hacky fix: created binaries need to be run before installation
+  preBuild = ''
+    mkdir -p $out/
+    ln -sv $PWD/lib $out
+  '';
+
+  cmakeFlags = with stdenv; [
+    "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
+    "-DLLVM_INSTALL_UTILS=ON"  # Needed by rustc
+    "-DLLVM_BUILD_TESTS=ON"
+    "-DLLVM_ENABLE_FFI=ON"
+    "-DLLVM_ENABLE_RTTI=ON"
+    "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_ENABLE_DUMP=ON"
+  ] ++ optionals enableSharedLibraries [
+    "-DLLVM_LINK_LLVM_DYLIB=ON"
+  ] ++ optionals enableManpages [
+    "-DLLVM_BUILD_DOCS=ON"
+    "-DLLVM_ENABLE_SPHINX=ON"
+    "-DSPHINX_OUTPUT_MAN=ON"
+    "-DSPHINX_OUTPUT_HTML=OFF"
+    "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+  ] ++ optionals (!isDarwin) [
+    "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
+  ] ++ optionals isDarwin [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+    "-DCAN_TARGET_i386=false"
+  ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "-DCMAKE_CROSSCOMPILING=True"
+    "-DLLVM_TABLEGEN=${buildPackages.llvm_10}/bin/llvm-tblgen"
+  ];
+
+  postBuild = ''
+    rm -fR $out
+  '';
+
+  preCheck = ''
+    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/lib
+  '';
+
+  postInstall = ''
+    mkdir -p $python/share
+    mv $out/share/opt-viewer $python/share/opt-viewer
+  ''
+  + optionalString enableSharedLibraries ''
+    moveToOutput "lib/libLLVM-*" "$lib"
+    moveToOutput "lib/libLLVM${stdenv.hostPlatform.extensions.sharedLibrary}" "$lib"
+  ''
+  + optionalString (enableSharedLibraries && (!stdenv.isDarwin)) ''
+    substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
+      --replace "\''${_IMPORT_PREFIX}/lib/libLLVM-" "$lib/lib/libLLVM-"
+  ''
+  + optionalString (stdenv.isDarwin && enableSharedLibraries) ''
+    substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
+      --replace "\''${_IMPORT_PREFIX}/lib/libLLVM.dylib" "$lib/lib/libLLVM.dylib"
+    ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
+    ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
+  '';
+
+  doCheck = stdenv.isLinux && (!stdenv.isx86_32);
+
+  checkTarget = "check-all";
+
+  enableParallelBuilding = true;
+
+  requiredSystemFeatures = [ "big-parallel" ];
+  meta = {
+    description = "Collection of modular and reusable compiler and toolchain technologies";
+    homepage    = "https://llvm.org/";
+    license     = stdenv.lib.licenses.ncsa;
+    maintainers = with stdenv.lib.maintainers; [ lovek323 raskin dtzWill ];
+    platforms   = stdenv.lib.platforms.all;
+  };
+} // stdenv.lib.optionalAttrs enableManpages {
+  pname = "llvm-manpages";
+
+  buildPhase = ''
+    make docs-llvm-man
+  '';
+
+  propagatedBuildInputs = [];
+
+  installPhase = ''
+    make -C docs install
+  '';
+
+  postPatch = null;
+  postInstall = null;
+
+  outputs = [ "out" ];
+
+  doCheck = false;
+
+  meta.description = "man pages for LLVM ${version}";
+})
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/openmp.nix b/nixpkgs/pkgs/development/compilers/llvm/10/openmp.nix
new file mode 100644
index 000000000000..624c99bc8683
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/openmp.nix
@@ -0,0 +1,26 @@
+{ stdenv
+, fetch
+, cmake
+, llvm
+, perl
+, version
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openmp";
+  inherit version;
+
+  src = fetch pname "1ymd13gj07x0b0vxziygm0p41vrq6nsgx837jqg9ll6h8ndg57rv";
+
+  nativeBuildInputs = [ cmake perl ];
+  buildInputs = [ llvm ];
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "Components required to build an executable OpenMP program";
+    homepage    = "https://openmp.llvm.org/";
+    license     = stdenv.lib.licenses.mit;
+    platforms   = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/10/sanitizers-nongnu.patch b/nixpkgs/pkgs/development/compilers/llvm/10/sanitizers-nongnu.patch
new file mode 100644
index 000000000000..1f2ac97818eb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/10/sanitizers-nongnu.patch
@@ -0,0 +1,412 @@
+From f7a253f8f85d0f49df6b73996737a3e84ac64236 Mon Sep 17 00:00:00 2001
+From: Will Dietz <w@wdtz.org>
+Date: Mon, 24 Sep 2018 11:17:25 -0500
+Subject: [PATCH] Ported to 7.0, taken from gentoo-musl project.
+
+------
+Ported to compiler-rt-sanitizers-5.0.0. Taken from
+
+https://gist.githubusercontent.com/pwaller/2337f3290f12634cad3e3730cff0a6c1/raw/83c87a8585e2f9662494db5662e5361beb093c26/nongnu.patch
+Signed-off-by: Jory A. Pratt <anarchy@gentoo.org>
+
+Taken from gentoo-musl project, with a few additional minor fixes.
+---
+ lib/asan/asan_linux.cc                        |  4 +-
+ lib/interception/interception_linux.cc        |  2 +-
+ lib/interception/interception_linux.h         |  2 +-
+ lib/msan/msan_linux.cc                        |  2 +-
+ lib/sanitizer_common/sanitizer_allocator.cc   |  2 +-
+ .../sanitizer_common_interceptors_ioctl.inc   |  4 +-
+ .../sanitizer_common_syscalls.inc             |  2 +-
+ lib/sanitizer_common/sanitizer_linux.cc       |  8 +++-
+ .../sanitizer_linux_libcdep.cc                | 10 ++---
+ lib/sanitizer_common/sanitizer_platform.h     |  6 +++
+ .../sanitizer_platform_interceptors.h         |  4 +-
+ .../sanitizer_platform_limits_posix.cc        | 37 +++++++++++--------
+ lib/tsan/rtl/tsan_platform_linux.cc           |  2 +-
+ 13 files changed, 51 insertions(+), 34 deletions(-)
+
+diff --git a/lib/asan/asan_linux.cc b/lib/asan/asan_linux.cc
+index 625f32d40..73cf77aca 100644
+--- a/lib/asan/asan_linux.cc
++++ b/lib/asan/asan_linux.cc
+@@ -46,7 +46,7 @@
+ #include <link.h>
+ #endif
+ 
+-#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS
++#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS || SANITIZER_NONGNU
+ #include <ucontext.h>
+ extern "C" void* _DYNAMIC;
+ #elif SANITIZER_NETBSD
+@@ -139,7 +139,7 @@ void AsanApplyToGlobals(globals_op_fptr op, const void *needle) {
+   UNIMPLEMENTED();
+ }
+ 
+-#if SANITIZER_ANDROID
++#if SANITIZER_ANDROID || SANITIZER_NONGNU
+ // FIXME: should we do anything for Android?
+ void AsanCheckDynamicRTPrereqs() {}
+ void AsanCheckIncompatibleRT() {}
+diff --git a/lib/interception/interception_linux.cc b/lib/interception/interception_linux.cc
+index 26bfcd8f6..529b234f7 100644
+--- a/lib/interception/interception_linux.cc
++++ b/lib/interception/interception_linux.cc
+@@ -43,7 +43,7 @@ bool GetRealFunctionAddress(const char *func_name, uptr *func_addr,
+ }
+ 
+ // Android and Solaris do not have dlvsym
+-#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD
++#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD && !SANITIZER_NONGNU
+ void *GetFuncAddrVer(const char *func_name, const char *ver) {
+   return dlvsym(RTLD_NEXT, func_name, ver);
+ }
+diff --git a/lib/interception/interception_linux.h b/lib/interception/interception_linux.h
+index 942c25609..24a4d5080 100644
+--- a/lib/interception/interception_linux.h
++++ b/lib/interception/interception_linux.h
+@@ -36,7 +36,7 @@ void *GetFuncAddrVer(const char *func_name, const char *ver);
+       (::__interception::uptr) & WRAP(func))
+ 
+ // Android,  Solaris and OpenBSD do not have dlvsym
+-#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD
++#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD && !SANITIZER_NONGNU
+ #define INTERCEPT_FUNCTION_VER_LINUX_OR_FREEBSD(func, symver) \
+   (::__interception::real_##func = (func##_f)(                \
+        unsigned long)::__interception::GetFuncAddrVer(#func, symver))
+diff --git a/lib/msan/msan_linux.cc b/lib/msan/msan_linux.cc
+index 385a650c4..6e30a8ce9 100644
+--- a/lib/msan/msan_linux.cc
++++ b/lib/msan/msan_linux.cc
+@@ -13,7 +13,7 @@
+ //===----------------------------------------------------------------------===//
+ 
+ #include "sanitizer_common/sanitizer_platform.h"
+-#if SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD
++#if SANITIZER_FREEBSD || (SANITIZER_LINUX && !SANITIZER_NONGNU) || SANITIZER_NETBSD
+ 
+ #include "msan.h"
+ #include "msan_report.h"
+diff --git a/lib/sanitizer_common/sanitizer_allocator.cc b/lib/sanitizer_common/sanitizer_allocator.cc
+index 6bfd5e5ee..048f6154f 100644
+--- a/lib/sanitizer_common/sanitizer_allocator.cc
++++ b/lib/sanitizer_common/sanitizer_allocator.cc
+@@ -27,7 +27,7 @@ const char *SecondaryAllocatorName = "LargeMmapAllocator";
+ 
+ // ThreadSanitizer for Go uses libc malloc/free.
+ #if SANITIZER_GO || defined(SANITIZER_USE_MALLOC)
+-# if SANITIZER_LINUX && !SANITIZER_ANDROID
++# if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ extern "C" void *__libc_malloc(uptr size);
+ #  if !SANITIZER_GO
+ extern "C" void *__libc_memalign(uptr alignment, uptr size);
+diff --git a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
+index 2d633c173..b6eb23116 100644
+--- a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
++++ b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
+@@ -104,7 +104,7 @@ static void ioctl_table_fill() {
+   _(SIOCGETVIFCNT, WRITE, struct_sioc_vif_req_sz);
+ #endif
+ 
+-#if SANITIZER_LINUX
++#if SANITIZER_LINUX && !SANITIZER_NONGNU
+   // Conflicting request ids.
+   // _(CDROMAUDIOBUFSIZ, NONE, 0);
+   // _(SNDCTL_TMR_CONTINUE, NONE, 0);
+@@ -365,7 +365,7 @@ static void ioctl_table_fill() {
+   _(VT_WAITACTIVE, NONE, 0);
+ #endif
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE
+   _(CYGETDEFTHRESH, WRITE, sizeof(int));
+   _(CYGETDEFTIMEOUT, WRITE, sizeof(int));
+diff --git a/lib/sanitizer_common/sanitizer_common_syscalls.inc b/lib/sanitizer_common/sanitizer_common_syscalls.inc
+index 469c8eb7e..24f87867d 100644
+--- a/lib/sanitizer_common/sanitizer_common_syscalls.inc
++++ b/lib/sanitizer_common/sanitizer_common_syscalls.inc
+@@ -2038,7 +2038,7 @@ POST_SYSCALL(setrlimit)(long res, long resource, void *rlim) {
+   }
+ }
+ 
+-#if !SANITIZER_ANDROID
++#if !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ PRE_SYSCALL(prlimit64)(long pid, long resource, const void *new_rlim,
+                        void *old_rlim) {
+   if (new_rlim) PRE_READ(new_rlim, struct_rlimit64_sz);
+diff --git a/lib/sanitizer_common/sanitizer_linux.cc b/lib/sanitizer_common/sanitizer_linux.cc
+index 96d6c1eff..9e2b7fb9d 100644
+--- a/lib/sanitizer_common/sanitizer_linux.cc
++++ b/lib/sanitizer_common/sanitizer_linux.cc
+@@ -541,13 +541,13 @@ const char *GetEnv(const char *name) {
+ #endif
+ }
+ 
+-#if !SANITIZER_FREEBSD && !SANITIZER_NETBSD && !SANITIZER_OPENBSD
++#if !SANITIZER_FREEBSD && !SANITIZER_NETBSD && !SANITIZER_OPENBSD && !SANITIZER_NONGNU
+ extern "C" {
+ SANITIZER_WEAK_ATTRIBUTE extern void *__libc_stack_end;
+ }
+ #endif
+ 
+-#if !SANITIZER_GO && !SANITIZER_FREEBSD && !SANITIZER_NETBSD &&                \
++#if (!SANITIZER_GO || SANITIZER_NONGNU) && !SANITIZER_FREEBSD && !SANITIZER_NETBSD &&                \
+     !SANITIZER_OPENBSD
+ static void ReadNullSepFileToArray(const char *path, char ***arr,
+                                    int arr_size) {
+@@ -590,6 +590,10 @@ static void GetArgsAndEnv(char ***argv, char ***envp) {
+ #elif SANITIZER_NETBSD
+   *argv = __ps_strings->ps_argvstr;
+   *envp = __ps_strings->ps_envstr;
++#elif SANITIZER_NONGNU
++    static const int kMaxArgv = 2000, kMaxEnvp = 2000;
++    ReadNullSepFileToArray("/proc/self/cmdline", argv, kMaxArgv);
++    ReadNullSepFileToArray("/proc/self/environ", envp, kMaxEnvp);
+ #else // SANITIZER_FREEBSD
+ #if !SANITIZER_GO
+   if (&__libc_stack_end) {
+diff --git a/lib/sanitizer_common/sanitizer_linux_libcdep.cc b/lib/sanitizer_common/sanitizer_linux_libcdep.cc
+index 4962ff832..438f94dbe 100644
+--- a/lib/sanitizer_common/sanitizer_linux_libcdep.cc
++++ b/lib/sanitizer_common/sanitizer_linux_libcdep.cc
+@@ -179,7 +179,7 @@ __attribute__((unused)) static bool GetLibcVersion(int *major, int *minor,
+ }
+ 
+ #if !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO &&               \
+-    !SANITIZER_NETBSD && !SANITIZER_OPENBSD && !SANITIZER_SOLARIS
++    !SANITIZER_NETBSD && !SANITIZER_OPENBSD && !SANITIZER_SOLARIS && !SANITIZER_NONGNU
+ static uptr g_tls_size;
+ 
+ #ifdef __i386__
+@@ -261,7 +261,7 @@ void InitTlsSize() { }
+ #if (defined(__x86_64__) || defined(__i386__) || defined(__mips__) ||          \
+      defined(__aarch64__) || defined(__powerpc64__) || defined(__s390__) ||    \
+      defined(__arm__)) &&                                                      \
+-    SANITIZER_LINUX && !SANITIZER_ANDROID
++    SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ // sizeof(struct pthread) from glibc.
+ static atomic_uintptr_t thread_descriptor_size;
+ 
+@@ -426,7 +426,7 @@ int GetSizeFromHdr(struct dl_phdr_info *info, size_t size, void *data) {
+ 
+ #if !SANITIZER_GO
+ static void GetTls(uptr *addr, uptr *size) {
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ # if defined(__x86_64__) || defined(__i386__) || defined(__s390__)
+   *addr = ThreadSelf();
+   *size = GetTlsSize();
+@@ -470,7 +470,7 @@ static void GetTls(uptr *addr, uptr *size) {
+ #elif SANITIZER_OPENBSD
+   *addr = 0;
+   *size = 0;
+-#elif SANITIZER_ANDROID
++#elif SANITIZER_ANDROID || SANITIZER_NONGNU
+   *addr = 0;
+   *size = 0;
+ #elif SANITIZER_SOLARIS
+@@ -486,7 +486,7 @@ static void GetTls(uptr *addr, uptr *size) {
+ #if !SANITIZER_GO
+ uptr GetTlsSize() {
+ #if SANITIZER_FREEBSD || SANITIZER_ANDROID || SANITIZER_NETBSD ||              \
+-    SANITIZER_OPENBSD || SANITIZER_SOLARIS
++    SANITIZER_OPENBSD || SANITIZER_SOLARIS || SANITIZER_NONGNU
+   uptr addr, size;
+   GetTls(&addr, &size);
+   return size;
+diff --git a/lib/sanitizer_common/sanitizer_platform.h b/lib/sanitizer_common/sanitizer_platform.h
+index d81e25580..e10680ac8 100644
+--- a/lib/sanitizer_common/sanitizer_platform.h
++++ b/lib/sanitizer_common/sanitizer_platform.h
+@@ -208,6 +208,12 @@
+ # define SANITIZER_SOLARIS32 0
+ #endif
+ 
++#if defined(__linux__) && !defined(__GLIBC__)
++# define SANITIZER_NONGNU 1
++#else
++# define SANITIZER_NONGNU 0
++#endif
++
+ #if defined(__myriad2__)
+ # define SANITIZER_MYRIAD2 1
+ #else
+diff --git a/lib/sanitizer_common/sanitizer_platform_interceptors.h b/lib/sanitizer_common/sanitizer_platform_interceptors.h
+index f95539a73..6c53b3415 100644
+--- a/lib/sanitizer_common/sanitizer_platform_interceptors.h
++++ b/lib/sanitizer_common/sanitizer_platform_interceptors.h
+@@ -39,7 +39,7 @@
+ # include "sanitizer_platform_limits_solaris.h"
+ #endif
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ # define SI_LINUX_NOT_ANDROID 1
+ #else
+ # define SI_LINUX_NOT_ANDROID 0
+@@ -322,7 +322,7 @@
+ #define SANITIZER_INTERCEPT_ETHER_R (SI_FREEBSD || SI_LINUX_NOT_ANDROID)
+ #define SANITIZER_INTERCEPT_SHMCTL          \
+   (SI_NETBSD || SI_OPENBSD || SI_SOLARIS || \
+-  ((SI_FREEBSD || SI_LINUX_NOT_ANDROID) && \
++  ((SI_FREEBSD || SI_LINUX_NOT_ANDROID || SANITIZER_NONGNU) && \
+     SANITIZER_WORDSIZE == 64))  // NOLINT
+ #define SANITIZER_INTERCEPT_RANDOM_R SI_LINUX_NOT_ANDROID
+ #define SANITIZER_INTERCEPT_PTHREAD_ATTR_GET SI_POSIX
+diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+index 54da635d7..2f6ff69c3 100644
+--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+@@ -14,6 +14,9 @@
+ 
+ #include "sanitizer_platform.h"
+ 
++// Workaround musl <--> linux conflicting definition of 'struct sysinfo'
++#define _LINUX_SYSINFO_H
++
+ #if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_MAC
+ // Tests in this file assume that off_t-dependent data structures match the
+ // libc ABI. For example, struct dirent here is what readdir() function (as
+@@ -138,12 +141,14 @@ typedef struct user_fpregs elf_fpregset_t;
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+ #include <glob.h>
+-#include <obstack.h>
++#  if !SANITIZER_NONGNU
++#    include <obstack.h>
++#  endif
+ #include <mqueue.h>
+-#include <net/if_ppp.h>
+-#include <netax25/ax25.h>
+-#include <netipx/ipx.h>
+-#include <netrom/netrom.h>
++#include <linux/if_ppp.h>
++#include <linux/ax25.h>
++#include <linux/ipx.h>
++#include <linux/netrom.h>
+ #if HAVE_RPC_XDR_H
+ # include <rpc/xdr.h>
+ #elif HAVE_TIRPC_RPC_XDR_H
+@@ -251,7 +256,7 @@ namespace __sanitizer {
+   unsigned struct_itimerspec_sz = sizeof(struct itimerspec);
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   // Use pre-computed size of struct ustat to avoid <sys/ustat.h> which
+   // has been removed from glibc 2.28.
+ #if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \
+@@ -322,7 +327,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(ElfW(Phdr));
+ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+ #endif
+ 
+-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
++#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   int glob_nomatch = GLOB_NOMATCH;
+   int glob_altdirfunc = GLOB_ALTDIRFUNC;
+ #endif
+@@ -416,7 +421,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+   unsigned struct_termios_sz = sizeof(struct termios);
+   unsigned struct_winsize_sz = sizeof(struct winsize);
+ 
+-#if SANITIZER_LINUX
++#if SANITIZER_LINUX && !SANITIZER_NONGNU
+   unsigned struct_arpreq_sz = sizeof(struct arpreq);
+   unsigned struct_cdrom_msf_sz = sizeof(struct cdrom_msf);
+   unsigned struct_cdrom_multisession_sz = sizeof(struct cdrom_multisession);
+@@ -466,7 +471,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+   unsigned struct_vt_mode_sz = sizeof(struct vt_mode);
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct);
+   unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor);
+ #if EV_VERSION > (0x010000)
+@@ -834,7 +839,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+   unsigned IOCTL_VT_WAITACTIVE = VT_WAITACTIVE;
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH;
+   unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT;
+   unsigned IOCTL_CYGETMON = CYGETMON;
+@@ -989,7 +994,7 @@ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phdr);
+ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phnum);
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
++#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ CHECK_TYPE_SIZE(glob_t);
+ CHECK_SIZE_AND_OFFSET(glob_t, gl_pathc);
+ CHECK_SIZE_AND_OFFSET(glob_t, gl_pathv);
+@@ -1023,6 +1028,7 @@ CHECK_TYPE_SIZE(iovec);
+ CHECK_SIZE_AND_OFFSET(iovec, iov_base);
+ CHECK_SIZE_AND_OFFSET(iovec, iov_len);
+ 
++#if !SANITIZER_NONGNU
+ CHECK_TYPE_SIZE(msghdr);
+ CHECK_SIZE_AND_OFFSET(msghdr, msg_name);
+ CHECK_SIZE_AND_OFFSET(msghdr, msg_namelen);
+@@ -1036,6 +1042,7 @@ CHECK_TYPE_SIZE(cmsghdr);
+ CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_len);
+ CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_level);
+ CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_type);
++#endif
+ 
+ #ifndef __GLIBC_PREREQ
+ #define __GLIBC_PREREQ(x, y) 0
+@@ -1145,7 +1152,7 @@ CHECK_SIZE_AND_OFFSET(mntent, mnt_passno);
+ 
+ CHECK_TYPE_SIZE(ether_addr);
+ 
+-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
++#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ CHECK_TYPE_SIZE(ipc_perm);
+ # if SANITIZER_FREEBSD
+ CHECK_SIZE_AND_OFFSET(ipc_perm, key);
+@@ -1206,7 +1213,7 @@ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_dstaddr);
+ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_data);
+ #endif
+ 
+-#if SANITIZER_LINUX
++#if SANITIZER_LINUX && !SANITIZER_NONGNU
+ COMPILER_CHECK(sizeof(__sanitizer_mallinfo) == sizeof(struct mallinfo));
+ #endif
+ 
+@@ -1256,7 +1263,7 @@ COMPILER_CHECK(__sanitizer_XDR_DECODE == XDR_DECODE);
+ COMPILER_CHECK(__sanitizer_XDR_FREE == XDR_FREE);
+ #endif
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ COMPILER_CHECK(sizeof(__sanitizer_FILE) <= sizeof(FILE));
+ CHECK_SIZE_AND_OFFSET(FILE, _flags);
+ CHECK_SIZE_AND_OFFSET(FILE, _IO_read_ptr);
+@@ -1275,7 +1282,7 @@ CHECK_SIZE_AND_OFFSET(FILE, _chain);
+ CHECK_SIZE_AND_OFFSET(FILE, _fileno);
+ #endif
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ COMPILER_CHECK(sizeof(__sanitizer__obstack_chunk) <= sizeof(_obstack_chunk));
+ CHECK_SIZE_AND_OFFSET(_obstack_chunk, limit);
+ CHECK_SIZE_AND_OFFSET(_obstack_chunk, prev);
+diff --git a/lib/tsan/rtl/tsan_platform_linux.cc b/lib/tsan/rtl/tsan_platform_linux.cc
+index de989b780..51a97b554 100644
+--- a/lib/tsan/rtl/tsan_platform_linux.cc
++++ b/lib/tsan/rtl/tsan_platform_linux.cc
+@@ -294,7 +294,7 @@ void InitializePlatform() {
+ // This is required to properly "close" the fds, because we do not see internal
+ // closes within glibc. The code is a pure hack.
+ int ExtractResolvFDs(void *state, int *fds, int nfd) {
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   int cnt = 0;
+   struct __res_state *statp = (struct __res_state*)state;
+   for (int i = 0; i < MAXNS && cnt < nfd; i++) {
+-- 
+2.19.0
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/5/clang/default.nix b/nixpkgs/pkgs/development/compilers/llvm/5/clang/default.nix
new file mode 100644
index 000000000000..1016398992fb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/5/clang/default.nix
@@ -0,0 +1,109 @@
+{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python3
+, fixDarwinDylibNames
+, enableManpages ? false
+}:
+
+let
+  gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
+  self = stdenv.mkDerivation ({
+    pname = "clang";
+    inherit version;
+
+    src = fetch "cfe" "0018520c4qxf5hgjdqgpz2dgl3faf4gsz87fdlb8zdmx99rfk77s";
+
+    unpackPhase = ''
+      unpackFile $src
+      mv cfe-${version}* clang
+      sourceRoot=$PWD/clang
+      unpackFile ${clang-tools-extra_src}
+      mv clang-tools-extra-* $sourceRoot/tools/extra
+    '';
+
+    nativeBuildInputs = [ cmake python3 ]
+      ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx;
+
+    buildInputs = [ libxml2 llvm ]
+      ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+    cmakeFlags = [
+      "-DCMAKE_CXX_FLAGS=-std=c++11"
+    ] ++ stdenv.lib.optionals enableManpages [
+      "-DCLANG_INCLUDE_DOCS=ON"
+      "-DLLVM_ENABLE_SPHINX=ON"
+      "-DSPHINX_OUTPUT_MAN=ON"
+      "-DSPHINX_OUTPUT_HTML=OFF"
+      "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+    ];
+
+    patches = [ ./purity.patch ];
+
+    postPatch = ''
+      sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' \
+             -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' \
+             lib/Driver/ToolChains/*.cpp
+
+      # Patch for standalone doc building
+      sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt
+    '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
+      sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
+    '';
+
+    outputs = [ "out" "lib" "python" ];
+
+    # Clang expects to find LLVMgold in its own prefix
+    postInstall = ''
+      if [ -e ${llvm}/lib/LLVMgold.so ]; then
+        ln -sv ${llvm}/lib/LLVMgold.so $out/lib
+      fi
+
+      ln -sv $out/bin/clang $out/bin/cpp
+
+      # Move libclang to 'lib' output
+      moveToOutput "lib/libclang.*" "$lib"
+      substituteInPlace $out/lib/cmake/clang/ClangTargets-release.cmake \
+          --replace "\''${_IMPORT_PREFIX}/lib/libclang." "$lib/lib/libclang."
+
+      mkdir -p $python/bin $python/share/clang/
+      mv $out/bin/{git-clang-format,scan-view} $python/bin
+      if [ -e $out/bin/set-xcode-analyzer ]; then
+        mv $out/bin/set-xcode-analyzer $python/bin
+      fi
+      mv $out/share/clang/*.py $python/share/clang
+      rm $out/bin/c-index-test
+    '';
+
+    enableParallelBuilding = true;
+
+    passthru = {
+      isClang = true;
+      inherit llvm;
+    } // stdenv.lib.optionalAttrs stdenv.isLinux {
+      inherit gcc;
+    };
+
+    meta = {
+      description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
+      homepage    = "https://llvm.org/";
+      license     = stdenv.lib.licenses.ncsa;
+      platforms   = stdenv.lib.platforms.all;
+    };
+  } // stdenv.lib.optionalAttrs enableManpages {
+    pname = "clang-manpages";
+
+    buildPhase = ''
+      make docs-clang-man
+    '';
+
+    installPhase = ''
+      mkdir -p $out/share/man/man1
+      # Manually install clang manpage
+      cp docs/man/*.1 $out/share/man/man1/
+    '';
+
+    outputs = [ "out" ];
+
+    doCheck = false;
+
+    meta.description = "man page for Clang ${version}";
+  });
+in self
diff --git a/nixpkgs/pkgs/development/compilers/llvm/5/clang/purity.patch b/nixpkgs/pkgs/development/compilers/llvm/5/clang/purity.patch
new file mode 100644
index 000000000000..b30d0d0b5d5b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/5/clang/purity.patch
@@ -0,0 +1,30 @@
+From 4add81bba40dcec62c4ea4481be8e35ac53e89d8 Mon Sep 17 00:00:00 2001
+From: Will Dietz <w@wdtz.org>
+Date: Thu, 18 May 2017 11:56:12 -0500
+Subject: [PATCH] "purity" patch for 5.0
+
+---
+ lib/Driver/ToolChains/Gnu.cpp | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
+index fe3c0191bb..c6a482bece 100644
+--- a/lib/Driver/ToolChains/Gnu.cpp
++++ b/lib/Driver/ToolChains/Gnu.cpp
+@@ -494,13 +494,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
+   if (!Args.hasArg(options::OPT_static)) {
+     if (Args.hasArg(options::OPT_rdynamic))
+       CmdArgs.push_back("-export-dynamic");
+-
+-    if (!Args.hasArg(options::OPT_shared)) {
+-      const std::string Loader =
+-          D.DyldPrefix + ToolChain.getDynamicLinker(Args);
+-      CmdArgs.push_back("-dynamic-linker");
+-      CmdArgs.push_back(Args.MakeArgString(Loader));
+-    }
+   }
+ 
+   CmdArgs.push_back("-o");
+-- 
+2.11.0
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt-armv7l.patch b/nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt-armv7l.patch
new file mode 100644
index 000000000000..77bf2640c477
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt-armv7l.patch
@@ -0,0 +1,23 @@
+diff -ur compiler-rt-5.0.2.src/cmake/builtin-config-ix.cmake compiler-rt-5.0.2.src-patched/cmake/builtin-config-ix.cmake
+--- compiler-rt-5.0.2.src/cmake/builtin-config-ix.cmake	2017-05-25 00:53:24.000000000 +0900
++++ compiler-rt-5.0.2.src-patched/cmake/builtin-config-ix.cmake	2020-05-10 03:24:24.937433155 +0900
+@@ -24,7 +24,7 @@
+ 
+ 
+ set(ARM64 aarch64)
+-set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k)
++set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k armv7l)
+ set(X86 i386 i686)
+ set(X86_64 x86_64)
+ set(MIPS32 mips mipsel)
+diff -ur compiler-rt-5.0.2.src/lib/builtins/CMakeLists.txt compiler-rt-5.0.2.src-patched/lib/builtins/CMakeLists.txt
+--- compiler-rt-5.0.2.src/lib/builtins/CMakeLists.txt	2017-07-13 04:33:30.000000000 +0900
++++ compiler-rt-5.0.2.src-patched/lib/builtins/CMakeLists.txt	2020-05-10 03:24:45.945075423 +0900
+@@ -444,6 +444,7 @@
+ set(armv7_SOURCES ${arm_SOURCES})
+ set(armv7s_SOURCES ${arm_SOURCES})
+ set(armv7k_SOURCES ${arm_SOURCES})
++set(armv7l_SOURCES ${arm_SOURCES})
+ set(arm64_SOURCES ${aarch64_SOURCES})
+ 
+ # macho_embedded archs
diff --git a/nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt-codesign.patch b/nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt-codesign.patch
new file mode 100644
index 000000000000..8f4c76bca1eb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt-codesign.patch
@@ -0,0 +1,155 @@
+From 3dec5f3475a26aeb4678627795c4b67c6b7b4785 Mon Sep 17 00:00:00 2001
+From: Will Dietz <w@wdtz.org>
+Date: Tue, 19 Sep 2017 13:13:06 -0500
+Subject: [PATCH] remove codesign use on Apple, disable ios sim testing that
+ needs it
+
+---
+ cmake/Modules/AddCompilerRT.cmake |  8 ------
+ test/asan/CMakeLists.txt          | 52 ---------------------------------------
+ test/tsan/CMakeLists.txt          | 47 -----------------------------------
+ 3 files changed, 107 deletions(-)
+
+diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
+index bc5fb9ff7..b64eb4246 100644
+--- a/cmake/Modules/AddCompilerRT.cmake
++++ b/cmake/Modules/AddCompilerRT.cmake
+@@ -210,14 +210,6 @@ function(add_compiler_rt_runtime name type)
+         set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "")
+         set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib")
+       endif()
+-      if(APPLE)
+-        # Ad-hoc sign the dylibs
+-        add_custom_command(TARGET ${libname}
+-          POST_BUILD  
+-          COMMAND codesign --sign - $<TARGET_FILE:${libname}>
+-          WORKING_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR}
+-        )
+-      endif()
+     endif()
+     install(TARGETS ${libname}
+       ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}
+diff --git a/test/asan/CMakeLists.txt b/test/asan/CMakeLists.txt
+index 8bfc15b5c..f23d0f71a 100644
+--- a/test/asan/CMakeLists.txt
++++ b/test/asan/CMakeLists.txt
+@@ -83,58 +83,6 @@ foreach(arch ${ASAN_TEST_ARCH})
+   endif()
+ endforeach()
+ 
+-# iOS and iOS simulator test suites
+-# These are not added into "check-all", in order to run these tests, use
+-# "check-asan-iossim-x86_64" and similar. They also require that an extra env
+-# variable to select which iOS device or simulator to use, e.g.:
+-# SANITIZER_IOSSIM_TEST_DEVICE_IDENTIFIER="iPhone 6"
+-if(APPLE)
+-  set(EXCLUDE_FROM_ALL ON)
+-
+-  set(ASAN_TEST_TARGET_CC ${COMPILER_RT_TEST_COMPILER})
+-  set(ASAN_TEST_IOS "1")
+-  pythonize_bool(ASAN_TEST_IOS)
+-  set(ASAN_TEST_DYNAMIC True)
+-
+-  foreach(arch ${DARWIN_iossim_ARCHS})
+-    set(ASAN_TEST_IOSSIM "1")
+-    pythonize_bool(ASAN_TEST_IOSSIM)
+-    set(ASAN_TEST_TARGET_ARCH ${arch})
+-    set(ASAN_TEST_TARGET_CFLAGS "-arch ${arch} -isysroot ${DARWIN_iossim_SYSROOT} ${COMPILER_RT_TEST_COMPILER_CFLAGS}")
+-    set(ASAN_TEST_CONFIG_SUFFIX "-${arch}-iossim")
+-    get_bits_for_arch(${arch} ASAN_TEST_BITS)
+-    string(TOUPPER ${arch} ARCH_UPPER_CASE)
+-    set(CONFIG_NAME "IOSSim${ARCH_UPPER_CASE}Config")
+-    configure_lit_site_cfg(
+-      ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
+-      ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg
+-      )
+-    add_lit_testsuite(check-asan-iossim-${arch} "AddressSanitizer iOS Simulator ${arch} tests"
+-      ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/
+-      DEPENDS ${ASAN_TEST_DEPS})
+-  endforeach()
+-
+-  foreach (arch ${DARWIN_ios_ARCHS})
+-    set(ASAN_TEST_IOSSIM "0")
+-    pythonize_bool(ASAN_TEST_IOSSIM)
+-    set(ASAN_TEST_TARGET_ARCH ${arch})
+-    set(ASAN_TEST_TARGET_CFLAGS "-arch ${arch} -isysroot ${DARWIN_ios_SYSROOT} ${COMPILER_RT_TEST_COMPILER_CFLAGS}")
+-    set(ASAN_TEST_CONFIG_SUFFIX "-${arch}-ios")
+-    get_bits_for_arch(${arch} ASAN_TEST_BITS)
+-    string(TOUPPER ${arch} ARCH_UPPER_CASE)
+-    set(CONFIG_NAME "IOS${ARCH_UPPER_CASE}Config")
+-    configure_lit_site_cfg(
+-      ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
+-      ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg
+-      )
+-    add_lit_testsuite(check-asan-ios-${arch} "AddressSanitizer iOS ${arch} tests"
+-      ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/
+-      DEPENDS ${ASAN_TEST_DEPS})
+-  endforeach()
+-
+-  set(EXCLUDE_FROM_ALL OFF)
+-endif()
+-
+ # Add unit tests.
+ if(COMPILER_RT_INCLUDE_TESTS)
+   set(ASAN_TEST_DYNAMIC False)
+diff --git a/test/tsan/CMakeLists.txt b/test/tsan/CMakeLists.txt
+index a68908612..cde0accb5 100644
+--- a/test/tsan/CMakeLists.txt
++++ b/test/tsan/CMakeLists.txt
+@@ -42,53 +42,6 @@ foreach(arch ${TSAN_TEST_ARCH})
+   list(APPEND TSAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME})
+ endforeach()
+ 
+-# iOS and iOS simulator test suites
+-# These are not added into "check-all", in order to run these tests, use
+-# "check-tsan-iossim-x86_64" and similar. They also require an extra environment
+-# variable to select which iOS device or simulator to use, e.g.:
+-# SANITIZER_IOSSIM_TEST_DEVICE_IDENTIFIER="iPhone 6"
+-if(APPLE)
+-  set(EXCLUDE_FROM_ALL ON)
+-
+-  set(TSAN_TEST_TARGET_CC ${COMPILER_RT_TEST_COMPILER})
+-  set(TSAN_TEST_IOS "1")
+-  pythonize_bool(TSAN_TEST_IOS)
+-
+-  set(arch "x86_64")
+-  set(TSAN_TEST_IOSSIM "1")
+-  pythonize_bool(TSAN_TEST_IOSSIM)
+-  set(TSAN_TEST_TARGET_ARCH ${arch})
+-  set(TSAN_TEST_TARGET_CFLAGS "-arch ${arch} -isysroot ${DARWIN_iossim_SYSROOT} ${COMPILER_RT_TEST_COMPILER_CFLAGS}")
+-  set(TSAN_TEST_CONFIG_SUFFIX "-${arch}-iossim")
+-  string(TOUPPER ${arch} ARCH_UPPER_CASE)
+-  set(CONFIG_NAME "IOSSim${ARCH_UPPER_CASE}Config")
+-  configure_lit_site_cfg(
+-    ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
+-    ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg
+-    )
+-  add_lit_testsuite(check-tsan-iossim-${arch} "ThreadSanitizer iOS Simulator ${arch} tests"
+-    ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/
+-    DEPENDS ${TSAN_TEST_DEPS})
+-
+-  set(arch "arm64")
+-  set(TSAN_TEST_IOSSIM "0")
+-  pythonize_bool(TSAN_TEST_IOSSIM)
+-  set(TSAN_TEST_TARGET_ARCH ${arch})
+-  set(TSAN_TEST_TARGET_CFLAGS "-arch ${arch} -isysroot ${DARWIN_ios_SYSROOT} ${COMPILER_RT_TEST_COMPILER_CFLAGS}")
+-  set(TSAN_TEST_CONFIG_SUFFIX "-${arch}-ios")
+-  string(TOUPPER ${arch} ARCH_UPPER_CASE)
+-  set(CONFIG_NAME "IOS${ARCH_UPPER_CASE}Config")
+-  configure_lit_site_cfg(
+-    ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
+-    ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg
+-    )
+-  add_lit_testsuite(check-tsan-ios-${arch} "ThreadSanitizer iOS Simulator ${arch} tests"
+-    ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/
+-    DEPENDS ${TSAN_TEST_DEPS})
+-
+-  set(EXCLUDE_FROM_ALL OFF)
+-endif()
+-
+ if(COMPILER_RT_INCLUDE_TESTS)
+   configure_lit_site_cfg(
+     ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in
+-- 
+2.14.1
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt-sys-ustat.patch b/nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt-sys-ustat.patch
new file mode 100644
index 000000000000..d9e9a10d8600
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt-sys-ustat.patch
@@ -0,0 +1,58 @@
+From 521935db9de17ad08748fd050137ac83b7734835 Mon Sep 17 00:00:00 2001
+From: Craig Topper <craig.topper@intel.com>
+Date: Thu, 24 May 2018 17:59:47 +0000
+Subject: [PATCH] sanitizer: Use pre-computed size of struct ustat for Linux
+
+<sys/ustat.h> has been removed from glibc 2.28 by:
+
+commit cf2478d53ad7071e84c724a986b56fe17f4f4ca7
+Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
+Date: Sun Mar 18 11:28:59 2018 +0800
+
+Deprecate ustat syscall interface
+This patch uses pre-computed size of struct ustat for Linux to fix
+
+https://bugs.llvm.org/show_bug.cgi?id=37418
+
+Patch by H.J. Lu.
+
+Differential Revision: https://reviews.llvm.org/D47281
+
+git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@333213 91177308-0d34-0410-b5e6-96231b3b80d8
+---
+ .../sanitizer_platform_limits_posix.cc            | 15 +++++++++++++--
+ 1 file changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+index 94b8f3f627..936d818673 100644
+--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+@@ -159,7 +159,6 @@ typedef struct user_fpregs elf_fpregset_t;
+ # include <sys/procfs.h>
+ #endif
+ #include <sys/user.h>
+-#include <sys/ustat.h>
+ #include <linux/cyclades.h>
+ #include <linux/if_eql.h>
+ #include <linux/if_plip.h>
+@@ -253,7 +252,19 @@ namespace __sanitizer {
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+-  unsigned struct_ustat_sz = sizeof(struct ustat);
++  // Use pre-computed size of struct ustat to avoid <sys/ustat.h> which
++  // has been removed from glibc 2.28.
++#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \
++  || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \
++  || defined(__x86_64__)
++#define SIZEOF_STRUCT_USTAT 32
++#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \
++  || defined(__powerpc__) || defined(__s390__)
++#define SIZEOF_STRUCT_USTAT 20
++#else
++#error Unknown size of struct ustat
++#endif
++  unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT;
+   unsigned struct_rlimit64_sz = sizeof(struct rlimit64);
+   unsigned struct_statvfs64_sz = sizeof(struct statvfs64);
+ #endif // SANITIZER_LINUX && !SANITIZER_ANDROID
diff --git a/nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt.nix b/nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt.nix
new file mode 100644
index 000000000000..624034b52286
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/5/compiler-rt.nix
@@ -0,0 +1,82 @@
+{ stdenv, version, fetch, cmake, python3, llvm, libcxxabi }:
+
+let
+
+  useLLVM = stdenv.hostPlatform.useLLVM or false;
+  bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
+  inherit (stdenv.hostPlatform) isMusl;
+
+in
+
+stdenv.mkDerivation {
+  pname = "compiler-rt";
+  inherit version;
+  src = fetch "compiler-rt" "0ipd4jdxpczgr2w6lzrabymz6dhzj69ywmyybjjc1q397zgrvziy";
+
+  nativeBuildInputs = [ cmake python3 llvm ];
+  buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
+
+  NIX_CFLAGS_COMPILE = [
+    "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0"
+  ];
+
+  cmakeFlags = [
+    "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
+    "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
+    "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
+  ] ++ stdenv.lib.optionals (useLLVM || bareMetal || isMusl) [
+    "-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
+    "-DCOMPILER_RT_BUILD_XRAY=OFF"
+    "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
+    "-DCOMPILER_RT_BUILD_PROFILE=OFF"
+  ] ++ stdenv.lib.optionals (useLLVM || bareMetal) [
+    "-DCMAKE_C_COMPILER_WORKS=ON"
+    "-DCMAKE_CXX_COMPILER_WORKS=ON"
+    "-DCOMPILER_RT_BAREMETAL_BUILD=ON"
+    "-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
+  ] ++ stdenv.lib.optionals (useLLVM) [
+    "-DCOMPILER_RT_BUILD_BUILTINS=ON"
+    "-DCMAKE_C_FLAGS=-nodefaultlibs"
+    #https://stackoverflow.com/questions/53633705/cmake-the-c-compiler-is-not-able-to-compile-a-simple-test-program
+    "-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
+  ] ++ stdenv.lib.optionals (bareMetal) [
+    "-DCOMPILER_RT_OS_DIR=baremetal"
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    ./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
+  ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
+    ++ stdenv.lib.optional (stdenv.hostPlatform.libc == "glibc") ./compiler-rt-sys-ustat.patch
+    ++ stdenv.lib.optional stdenv.hostPlatform.isAarch32 ./compiler-rt-armv7l.patch;
+
+  # TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
+  # to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra
+  # can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd
+  # get no binary cache for the entire platform. If you really find yourself wanting the TSAN, make this controllable by
+  # a flag and turn the flag off during the stdenv build.
+  postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
+    substituteInPlace cmake/config-ix.cmake \
+      --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
+  '' + stdenv.lib.optionalString (useLLVM) ''
+    substituteInPlace lib/builtins/int_util.c \
+      --replace "#include <stdlib.h>" ""
+    substituteInPlace lib/builtins/clear_cache.c \
+      --replace "#include <assert.h>" ""
+    substituteInPlace lib/builtins/cpu_model.c \
+      --replace "#include <assert.h>" ""
+  '';
+
+  # Hack around weird upsream RPATH bug
+  postInstall = stdenv.lib.optionalString (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isWasm) ''
+    ln -s "$out/lib"/*/* "$out/lib"
+  '' + stdenv.lib.optionalString (useLLVM) ''
+    ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/linux/crtbegin.o
+    ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/linux/crtend.o
+    ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/linux/crtbeginS.o
+    ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/linux/crtendS.o
+  '';
+
+  enableParallelBuilding = true;
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/5/default.nix b/nixpkgs/pkgs/development/compilers/llvm/5/default.nix
new file mode 100644
index 000000000000..e7083a6ed13a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/5/default.nix
@@ -0,0 +1,101 @@
+{ lowPrio, newScope, pkgs, stdenv, cmake, gcc, libstdcxxHook
+, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith
+, buildLlvmTools # tools, but from the previous stage, for cross
+, targetLlvmLibraries # libraries, but from the next stage, for cross
+}:
+
+let
+  release_version = "5.0.2";
+  version = release_version; # differentiating these is important for rc's
+  targetConfig = stdenv.targetPlatform.config;
+
+  fetch = name: sha256: fetchurl {
+    url = "https://releases.llvm.org/${release_version}/${name}-${version}.src.tar.xz";
+    inherit sha256;
+  };
+
+  clang-tools-extra_src = fetch "clang-tools-extra" "018b3fiwah8f8br5i26qmzh6sjvzchpn358sn8v079m49f2jldm3";
+
+  tools = stdenv.lib.makeExtensible (tools: let
+    callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
+    mkExtraBuildCommands = cc: ''
+      rsrc="$out/resource-root"
+      mkdir "$rsrc"
+      ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc"
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
+      echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
+    '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc && !(stdenv.targetPlatform.useLLVM or false)) ''
+      echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags
+    '';
+  in {
+
+    llvm = callPackage ./llvm.nix { };
+
+    clang-unwrapped = callPackage ./clang {
+      inherit clang-tools-extra_src;
+    };
+
+    llvm-manpages = lowPrio (tools.llvm.override {
+      enableManpages = true;
+      python3 = pkgs.python3;  # don't use python-boot
+    });
+
+    clang-manpages = lowPrio (tools.clang-unwrapped.override {
+      enableManpages = true;
+      python3 = pkgs.python3;  # don't use python-boot
+    });
+
+    libclang = tools.clang-unwrapped.lib;
+
+    clang = if stdenv.cc.isGNU then tools.libstdcxxClang else tools.libcxxClang;
+
+    libstdcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      extraTools = [
+        libstdcxxHook
+      ];
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = ''
+          echo "-target ${targetConfig}" >> $out/nix-support/cc-cflags
+          echo "-B${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-cflags
+          echo "-L${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-ldflags
+          echo "-L${gcc.cc.lib}/${targetConfig}/lib" >> $out/nix-support/cc-ldflags
+      '' + mkExtraBuildCommands cc;
+    };
+
+    libcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = targetLlvmLibraries.libcxx;
+      extraPackages = [
+        targetLlvmLibraries.libcxx
+        targetLlvmLibraries.libcxxabi
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+    };
+
+    lld = callPackage ./lld.nix {};
+
+    lldb = callPackage ./lldb.nix {};
+  });
+
+  libraries = stdenv.lib.makeExtensible (libraries: let
+    callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
+  in {
+
+    compiler-rt = callPackage ./compiler-rt.nix {};
+
+    stdenv = overrideCC stdenv buildLlvmTools.clang;
+
+    libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
+
+    libcxx = callPackage ./libc++ {};
+
+    libcxxabi = callPackage ./libc++abi.nix {};
+
+    openmp = callPackage ./openmp.nix {};
+  });
+
+in { inherit tools libraries; } // libraries // tools
diff --git a/nixpkgs/pkgs/development/compilers/llvm/5/fix-gcc9.patch b/nixpkgs/pkgs/development/compilers/llvm/5/fix-gcc9.patch
new file mode 100644
index 000000000000..eaf71f1468de
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/5/fix-gcc9.patch
@@ -0,0 +1,33 @@
+diff --git a/lib/Target/Mips/MipsFastISel.cpp b/lib/Target/Mips/MipsFastISel.cpp
+index f79cb0e6..c6279046 100644
+--- a/lib/Target/Mips/MipsFastISel.cpp
++++ b/lib/Target/Mips/MipsFastISel.cpp
+@@ -70,6 +70,7 @@
+ #include <cassert>
+ #include <cstdint>
+ #include <new>
++#include <array>
+ 
+ #define DEBUG_TYPE "mips-fastisel"
+ 
+@@ -1309,13 +1310,13 @@ bool MipsFastISel::fastLowerArguments() {
+     return false;
+   }
+ 
+-  const ArrayRef<MCPhysReg> GPR32ArgRegs = {Mips::A0, Mips::A1, Mips::A2,
+-                                            Mips::A3};
+-  const ArrayRef<MCPhysReg> FGR32ArgRegs = {Mips::F12, Mips::F14};
+-  const ArrayRef<MCPhysReg> AFGR64ArgRegs = {Mips::D6, Mips::D7};
+-  ArrayRef<MCPhysReg>::iterator NextGPR32 = GPR32ArgRegs.begin();
+-  ArrayRef<MCPhysReg>::iterator NextFGR32 = FGR32ArgRegs.begin();
+-  ArrayRef<MCPhysReg>::iterator NextAFGR64 = AFGR64ArgRegs.begin();
++   std::array<MCPhysReg, 4> GPR32ArgRegs = {{Mips::A0, Mips::A1, Mips::A2,
++                                            Mips::A3}};
++   std::array<MCPhysReg, 2> FGR32ArgRegs = {{Mips::F12, Mips::F14}};
++   std::array<MCPhysReg, 2> AFGR64ArgRegs = {{Mips::D6, Mips::D7}};
++   auto NextGPR32 = GPR32ArgRegs.begin();
++   auto NextFGR32 = FGR32ArgRegs.begin();
++   auto NextAFGR64 = AFGR64ArgRegs.begin();
+ 
+   struct AllocatedReg {
+     const TargetRegisterClass *RC;
diff --git a/nixpkgs/pkgs/development/compilers/llvm/5/libc++/default.nix b/nixpkgs/pkgs/development/compilers/llvm/5/libc++/default.nix
new file mode 100644
index 000000000000..88ad3c29c3e2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/5/libc++/default.nix
@@ -0,0 +1,53 @@
+{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version }:
+
+stdenv.mkDerivation {
+  pname = "libc++";
+  inherit version;
+
+  src = fetch "libcxx" "1672aaf95fgy4xsfra8pw24f6r93zwzpan1033hkcm8p2glqipvf";
+
+  postUnpack = ''
+    unpackFile ${libcxxabi.src}
+    export LIBCXXABI_INCLUDE_DIR="$PWD/$(ls -d libcxxabi-${version}*)/include"
+  '';
+
+  patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [
+    ../../libcxx-0001-musl-hacks.patch
+  ];
+
+  prePatch = ''
+    substituteInPlace lib/CMakeLists.txt --replace "/usr/lib/libc++" "\''${LIBCXX_LIBCXXABI_LIB_PATH}/libc++"
+  '';
+
+  preConfigure = ''
+    # Get headers from the cxxabi source so we can see private headers not installed by the cxxabi package
+    cmakeFlagsArray=($cmakeFlagsArray -DLIBCXX_CXX_ABI_INCLUDE_PATHS="$LIBCXXABI_INCLUDE_DIR")
+  '' + lib.optionalString stdenv.hostPlatform.isMusl ''
+    patchShebangs utils/cat_files.py
+  '';
+  nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python3;
+
+  buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+  cmakeFlags = [
+    "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"
+    "-DLIBCXX_LIBCPPABI_VERSION=2"
+    "-DLIBCXX_CXX_ABI=libcxxabi"
+  ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "-DLIBCXX_HAS_MUSL_LIBC=1";
+
+  enableParallelBuilding = true;
+
+  linkCxxAbi = stdenv.isLinux;
+
+  setupHooks = [
+    ../../../../../build-support/setup-hooks/role.bash
+    ./setup-hook.sh
+  ];
+
+  meta = {
+    homepage = "https://libcxx.llvm.org/";
+    description = "A new implementation of the C++ standard library, targeting C++11";
+    license = with stdenv.lib.licenses; [ ncsa mit ];
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/5/libc++/setup-hook.sh b/nixpkgs/pkgs/development/compilers/llvm/5/libc++/setup-hook.sh
new file mode 100644
index 000000000000..3a274aecc23d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/5/libc++/setup-hook.sh
@@ -0,0 +1,6 @@
+# See pkgs/build-support/setup-hooks/role.bash
+getHostRole
+
+linkCxxAbi="@linkCxxAbi@"
+export NIX_CXXSTDLIB_COMPILE${role_post}+=" -isystem @out@/include/c++/v1"
+export NIX_CXXSTDLIB_LINK${role_post}=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
diff --git a/nixpkgs/pkgs/development/compilers/llvm/5/libc++abi.nix b/nixpkgs/pkgs/development/compilers/llvm/5/libc++abi.nix
new file mode 100644
index 000000000000..96d6e78e01e4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/5/libc++abi.nix
@@ -0,0 +1,51 @@
+{ stdenv, cmake, fetch, libcxx, libunwind, llvm, version }:
+
+stdenv.mkDerivation {
+  pname = "libc++abi";
+  inherit version;
+
+  src = fetch "libcxxabi" "12lp799rskr4fc2xr64qn4jfkjnfd8b1aymvsxyn4k9ar7r9pgqv";
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD) libunwind;
+
+  postUnpack = ''
+    unpackFile ${libcxx.src}
+    unpackFile ${llvm.src}
+    export cmakeFlags="-DLLVM_PATH=$PWD/$(ls -d llvm-*) -DLIBCXXABI_LIBCXX_PATH=$PWD/$(ls -d libcxx-*)"
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    export TRIPLE=x86_64-apple-darwin
+  '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
+    patch -p1 -d $(ls -d libcxx-*) -i ${../libcxx-0001-musl-hacks.patch}
+  '';
+
+  installPhase = if stdenv.isDarwin
+    then ''
+      for file in lib/*.dylib; do
+        # this should be done in CMake, but having trouble figuring out
+        # the magic combination of necessary CMake variables
+        # if you fancy a try, take a look at
+        # https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
+        install_name_tool -id $out/$file $file
+      done
+      make install
+      install -d 755 $out/include
+      install -m 644 ../include/*.h $out/include
+    ''
+    else ''
+      install -d -m 755 $out/include $out/lib
+      install -m 644 lib/libc++abi.a $out/lib
+      install -m 644 lib/libc++abi.so.1.0 $out/lib
+      install -m 644 ../include/cxxabi.h $out/include
+      ln -s libc++abi.so.1.0 $out/lib/libc++abi.so
+      ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
+    '';
+
+  meta = {
+    homepage = "https://libcxxabi.llvm.org/";
+    description = "A new implementation of low level support for a standard C++ library";
+    license = with stdenv.lib.licenses; [ ncsa mit ];
+    maintainers = with stdenv.lib.maintainers; [ vlstill ];
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/5/lld.nix b/nixpkgs/pkgs/development/compilers/llvm/5/lld.nix
new file mode 100644
index 000000000000..3d9ed6ee6635
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/5/lld.nix
@@ -0,0 +1,33 @@
+{ stdenv
+, fetch
+, cmake
+, llvm
+, version
+}:
+
+stdenv.mkDerivation {
+  pname = "lld";
+  inherit version;
+
+  src = fetch "lld" "1ah75rjly6747jk1zbwca3z0svr9b09ylgxd4x9ns721xir6sia6";
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ llvm ];
+
+  outputs = [ "out" "dev" ];
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    moveToOutput include "$dev"
+    moveToOutput lib "$dev"
+  '';
+
+  meta = {
+    description = "The LLVM Linker";
+    homepage    = "https://lld.llvm.org/";
+    license     = stdenv.lib.licenses.ncsa;
+    platforms   = stdenv.lib.platforms.all;
+    badPlatforms = [ "x86_64-darwin" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/5/lldb.nix b/nixpkgs/pkgs/development/compilers/llvm/5/lldb.nix
new file mode 100644
index 000000000000..e0698e1dcf3d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/5/lldb.nix
@@ -0,0 +1,57 @@
+{ stdenv
+, fetch
+, cmake
+, zlib
+, ncurses
+, swig
+, which
+, libedit
+, libxml2
+, llvm
+, clang-unwrapped
+, python3
+, version
+, darwin
+}:
+
+stdenv.mkDerivation {
+  pname = "lldb";
+  inherit version;
+
+  src = fetch "lldb" "05j2a63yzln43852nng8a7y47spzlyr1cvdmgmbxgd29c8r0bfkq";
+
+  postPatch = ''
+    # Fix up various paths that assume llvm and clang are installed in the same place
+    sed -i 's,".*ClangConfig.cmake","${clang-unwrapped}/lib/cmake/clang/ClangConfig.cmake",' \
+      cmake/modules/LLDBStandalone.cmake
+    sed -i 's,".*tools/clang/include","${clang-unwrapped}/include",' \
+      cmake/modules/LLDBStandalone.cmake
+    sed -i 's,"$.LLVM_LIBRARY_DIR.",${llvm}/lib ${clang-unwrapped}/lib,' \
+      cmake/modules/LLDBStandalone.cmake
+  '';
+
+  nativeBuildInputs = [ cmake python3 which swig ];
+  buildInputs = [ ncurses zlib libedit libxml2 llvm ]
+    ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa ];
+
+  CXXFLAGS = "-fno-rtti";
+  hardeningDisable = [ "format" ];
+
+  cmakeFlags = [
+    "-DLLDB_CODESIGN_IDENTITY=" # codesigning makes nondeterministic
+  ];
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    mkdir -p $out/share/man/man1
+    cp ../docs/lldb.1 $out/share/man/man1/
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A next-generation high-performance debugger";
+    homepage    = "https://llvm.org/";
+    license     = licenses.ncsa;
+    platforms   = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/5/llvm-outputs.patch b/nixpkgs/pkgs/development/compilers/llvm/5/llvm-outputs.patch
new file mode 100644
index 000000000000..40096fa3497f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/5/llvm-outputs.patch
@@ -0,0 +1,26 @@
+diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
+index 94d426b..37f7794 100644
+--- a/tools/llvm-config/llvm-config.cpp
++++ b/tools/llvm-config/llvm-config.cpp
+@@ -333,6 +333,21 @@ int main(int argc, char **argv) {
+     ActiveIncludeOption = "-I" + ActiveIncludeDir;
+   }
+ 
++  /// Nix-specific multiple-output handling: override ActiveLibDir if --link-shared
++  if (!IsInDevelopmentTree) {
++    bool WantShared = true;
++    for (int i = 1; i < argc; ++i) {
++      StringRef Arg = argv[i];
++      if (Arg == "--link-shared")
++        WantShared = true;
++      else if (Arg == "--link-static")
++        WantShared = false; // the last one wins
++    }
++
++    if (WantShared)
++      ActiveLibDir = std::string("@lib@") + "/lib" + LLVM_LIBDIR_SUFFIX;
++  }
++
+   /// We only use `shared library` mode in cases where the static library form
+   /// of the components provided are not available; note however that this is
+   /// skipped if we're run from within the build dir. However, once installed,
diff --git a/nixpkgs/pkgs/development/compilers/llvm/5/llvm.nix b/nixpkgs/pkgs/development/compilers/llvm/5/llvm.nix
new file mode 100644
index 000000000000..987e6258527a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/5/llvm.nix
@@ -0,0 +1,177 @@
+{ stdenv
+, fetch
+, fetchpatch
+, cmake
+, python3
+, libffi
+, libbfd
+, libxml2
+, ncurses
+, version
+, release_version
+, zlib
+, debugVersion ? false
+, enableManpages ? false
+, enableSharedLibraries ? !enableManpages
+}:
+
+let
+  # Used when creating a versioned symlinks of libLLVM.dylib
+  versionSuffixes = with stdenv.lib;
+    let parts = splitVersion release_version; in
+    imap (i: _: concatStringsSep "." (take i parts)) parts;
+in
+
+stdenv.mkDerivation ({
+  pname = "llvm";
+  inherit version;
+
+  src = fetch "llvm" "0g1bbj2n6xv4p1n6hh17vj3vpvg56wacipc81dgwga9mg2lys8nm";
+
+  unpackPhase = ''
+    unpackFile $src
+    mv llvm-${version}* llvm
+    sourceRoot=$PWD/llvm
+  '';
+
+  outputs = [ "out" "python" ]
+    ++ stdenv.lib.optional enableSharedLibraries "lib";
+
+  nativeBuildInputs = [ cmake python3 ]
+    ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx;
+
+  buildInputs = [ libxml2 libffi ];
+
+  propagatedBuildInputs = [ ncurses zlib ];
+
+  patches = [
+    (fetchpatch {
+      url = "https://bugzilla.redhat.com/attachment.cgi?id=1389687";
+      name = "llvm-gcc8-type-mismatch.patch";
+      sha256 = "0ga2123aclq3x9w72d0rm0az12m8c1i4r1106vh701hf4cghgbch";
+    })
+    ./fix-gcc9.patch
+    #(fetchpatch {
+    #  name = "llvm-fix-gcc9.patch";
+    #  url = "https://reviews.llvm.org/file/data/zs3ck5ryvc5n672fd2kw/PHID-FILE-byoqefzwmkd7qnlip4v2/file";
+    #  sha256 = "0injj1hqgrbcbihhwp2nbal88jfykad30r54f2cdcx7gws2fcy8i";
+    #  stripLen = 1;
+    #})
+  ];
+  postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
+    substituteInPlace cmake/modules/AddLLVM.cmake \
+      --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \
+      --replace 'set(_install_rpath "@loader_path/../lib" ''${extra_libdir})' ""
+  ''
+  # Patch llvm-config to return correct library path based on --link-{shared,static}.
+  + stdenv.lib.optionalString (enableSharedLibraries) ''
+    substitute '${./llvm-outputs.patch}' ./llvm-outputs.patch --subst-var lib
+    patch -p1 < ./llvm-outputs.patch
+  '' + ''
+    # FileSystem permissions tests fail with various special bits
+    substituteInPlace unittests/Support/CMakeLists.txt \
+      --replace "Path.cpp" ""
+    rm unittests/Support/Path.cpp
+  '' + stdenv.lib.optionalString stdenv.isAarch64 ''
+    patch -p0 < ${../aarch64.patch}
+  '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
+    patch -p1 -i ${../TLI-musl.patch}
+    substituteInPlace unittests/Support/CMakeLists.txt \
+      --replace "add_subdirectory(DynamicLibrary)" ""
+    rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
+  '';
+
+  # hacky fix: created binaries need to be run before installation
+  preBuild = ''
+    mkdir -p $out/
+    ln -sv $PWD/lib $out
+  '';
+
+  cmakeFlags = with stdenv; [
+    "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
+    "-DLLVM_INSTALL_UTILS=ON"  # Needed by rustc
+    "-DLLVM_BUILD_TESTS=ON"
+    "-DLLVM_ENABLE_FFI=ON"
+    "-DLLVM_ENABLE_RTTI=ON"
+
+    "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DTARGET_TRIPLE=${stdenv.hostPlatform.config}"
+  ]
+  ++ stdenv.lib.optional enableSharedLibraries
+    "-DLLVM_LINK_LLVM_DYLIB=ON"
+  ++ stdenv.lib.optionals enableManpages [
+    "-DLLVM_BUILD_DOCS=ON"
+    "-DLLVM_ENABLE_SPHINX=ON"
+    "-DSPHINX_OUTPUT_MAN=ON"
+    "-DSPHINX_OUTPUT_HTML=OFF"
+    "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+  ]
+  ++ stdenv.lib.optional (!isDarwin)
+    "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
+  ++ stdenv.lib.optionals (isDarwin) [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+    "-DCAN_TARGET_i386=false"
+  ];
+
+  postBuild = ''
+    rm -fR $out
+  '';
+
+  preCheck = ''
+    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/lib
+  '';
+
+  postInstall = ''
+    mkdir -p $python/share
+    mv $out/share/opt-viewer $python/share/opt-viewer
+  ''
+  + stdenv.lib.optionalString enableSharedLibraries ''
+    moveToOutput "lib/libLLVM-*" "$lib"
+    moveToOutput "lib/libLLVM${stdenv.hostPlatform.extensions.sharedLibrary}" "$lib"
+    moveToOutput "lib/libLTO${stdenv.hostPlatform.extensions.sharedLibrary}" "$lib"
+    substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
+      --replace "\''${_IMPORT_PREFIX}/lib/libLLVM-" "$lib/lib/libLLVM-"
+  ''
+  + stdenv.lib.optionalString (stdenv.isDarwin && enableSharedLibraries) ''
+    substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
+      --replace "\''${_IMPORT_PREFIX}/lib/libLLVM.dylib" "$lib/lib/libLLVM.dylib" \
+      --replace "\''${_IMPORT_PREFIX}/lib/libLTO.dylib" "$lib/lib/libLTO.dylib"
+    ${stdenv.lib.concatMapStringsSep "\n" (v: ''
+      ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${v}.dylib
+    '') versionSuffixes}
+  '';
+
+  doCheck = stdenv.isLinux && (!stdenv.isi686);
+
+  checkTarget = "check-all";
+
+  enableParallelBuilding = true;
+
+  requiredSystemFeatures = [ "big-parallel" ];
+  meta = {
+    description = "Collection of modular and reusable compiler and toolchain technologies";
+    homepage    = "https://llvm.org/";
+    license     = stdenv.lib.licenses.ncsa;
+    maintainers = with stdenv.lib.maintainers; [ lovek323 raskin dtzWill ];
+    platforms   = stdenv.lib.platforms.all;
+  };
+} // stdenv.lib.optionalAttrs enableManpages {
+  pname = "llvm-manpages";
+
+  buildPhase = ''
+    make docs-llvm-man
+  '';
+
+  propagatedBuildInputs = [];
+
+  installPhase = ''
+    make -C docs install
+  '';
+
+  outputs = [ "out" ];
+
+  doCheck = false;
+
+  meta.description = "man pages for LLVM ${version}";
+})
diff --git a/nixpkgs/pkgs/development/compilers/llvm/5/openmp.nix b/nixpkgs/pkgs/development/compilers/llvm/5/openmp.nix
new file mode 100644
index 000000000000..da328de24d13
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/5/openmp.nix
@@ -0,0 +1,26 @@
+{ stdenv
+, fetch
+, cmake
+, llvm
+, perl
+, version
+}:
+
+stdenv.mkDerivation {
+  pname = "openmp";
+  inherit version;
+
+  src = fetch "openmp" "0p2n52676wlq6y9q99n5pivq6pvvda1p994r69fxj206ahn59jir";
+
+  nativeBuildInputs = [ cmake perl ];
+  buildInputs = [ llvm ];
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "Components required to build an executable OpenMP program";
+    homepage    = "https://openmp.llvm.org/";
+    license     = stdenv.lib.licenses.mit;
+    platforms   = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/5/sanitizers-nongnu.patch b/nixpkgs/pkgs/development/compilers/llvm/5/sanitizers-nongnu.patch
new file mode 100644
index 000000000000..c9ddfe45c898
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/5/sanitizers-nongnu.patch
@@ -0,0 +1,370 @@
+From 3e1fcb7d4909db8f0f7dd0109b2eee20115c8be3 Mon Sep 17 00:00:00 2001
+From: "Jory A. Pratt" <anarchy@gentoo.org>
+Date: Sat, 9 Sep 2017 08:31:15 -0500
+Subject: [PATCH] Ported to compiler-rt-sanitizers-5.0.0. Taken from
+
+https://gist.githubusercontent.com/pwaller/2337f3290f12634cad3e3730cff0a6c1/raw/83c87a8585e2f9662494db5662e5361beb093c26/nongnu.patch
+Signed-off-by: Jory A. Pratt <anarchy@gentoo.org>
+
+Taken from gentoo-musl project, with a few additional minor fixes.
+---
+ lib/asan/asan_linux.cc                             |  4 +--
+ lib/interception/interception_linux.cc             |  2 +-
+ lib/interception/interception_linux.h              |  2 +-
+ lib/msan/msan_linux.cc                             |  2 +-
+ .../sanitizer_common_interceptors_ioctl.inc        |  4 +--
+ lib/sanitizer_common/sanitizer_common_syscalls.inc |  2 +-
+ lib/sanitizer_common/sanitizer_linux_libcdep.cc    | 12 +++----
+ lib/sanitizer_common/sanitizer_platform.h          |  7 ++++
+ .../sanitizer_platform_interceptors.h              |  2 +-
+ .../sanitizer_platform_limits_posix.cc             | 40 +++++++++++++---------
+ lib/tsan/rtl/tsan_platform_linux.cc                |  2 +-
+ 11 files changed, 47 insertions(+), 32 deletions(-)
+
+diff --git a/lib/asan/asan_linux.cc b/lib/asan/asan_linux.cc
+index 6d47ba432..c58dd4864 100644
+--- a/lib/asan/asan_linux.cc
++++ b/lib/asan/asan_linux.cc
+@@ -39,7 +39,7 @@
+ #include <sys/link_elf.h>
+ #endif
+ 
+-#if SANITIZER_ANDROID || SANITIZER_FREEBSD
++#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_NONGNU
+ #include <ucontext.h>
+ extern "C" void* _DYNAMIC;
+ #else
+@@ -86,7 +86,7 @@ void AsanApplyToGlobals(globals_op_fptr op, const void *needle) {
+   UNIMPLEMENTED();
+ }
+ 
+-#if SANITIZER_ANDROID
++#if SANITIZER_ANDROID || SANITIZER_NONGNU
+ // FIXME: should we do anything for Android?
+ void AsanCheckDynamicRTPrereqs() {}
+ void AsanCheckIncompatibleRT() {}
+diff --git a/lib/interception/interception_linux.cc b/lib/interception/interception_linux.cc
+index 6e908ac01..76c1688ce 100644
+--- a/lib/interception/interception_linux.cc
++++ b/lib/interception/interception_linux.cc
+@@ -24,7 +24,7 @@ bool GetRealFunctionAddress(const char *func_name, uptr *func_addr,
+   return real == wrapper;
+ }
+ 
+-#if !defined(__ANDROID__)  // android does not have dlvsym
++#if !defined(__ANDROID__) && defined(__GLIBC__)  // android does not have dlvsym
+ void *GetFuncAddrVer(const char *func_name, const char *ver) {
+   return dlvsym(RTLD_NEXT, func_name, ver);
+ }
+diff --git a/lib/interception/interception_linux.h b/lib/interception/interception_linux.h
+index 27a66c882..f60c38991 100644
+--- a/lib/interception/interception_linux.h
++++ b/lib/interception/interception_linux.h
+@@ -34,7 +34,7 @@ void *GetFuncAddrVer(const char *func_name, const char *ver);
+       (::__interception::uptr) & (func),                                   \
+       (::__interception::uptr) & WRAP(func))
+ 
+-#if !defined(__ANDROID__)  // android does not have dlvsym
++#if !defined(__ANDROID__) && !SANITIZER_NONGNU // android does not have dlvsym
+ #define INTERCEPT_FUNCTION_VER_LINUX_OR_FREEBSD(func, symver) \
+   (::__interception::real_##func = (func##_f)(                \
+        unsigned long)::__interception::GetFuncAddrVer(#func, symver))
+diff --git a/lib/msan/msan_linux.cc b/lib/msan/msan_linux.cc
+index 0a687f620..0852d97d7 100644
+--- a/lib/msan/msan_linux.cc
++++ b/lib/msan/msan_linux.cc
+@@ -13,7 +13,7 @@
+ //===----------------------------------------------------------------------===//
+ 
+ #include "sanitizer_common/sanitizer_platform.h"
+-#if SANITIZER_FREEBSD || SANITIZER_LINUX
++#if SANITIZER_FREEBSD || SANITIZER_LINUX && !SANITIZER_NONGNU
+ 
+ #include "msan.h"
+ #include "msan_thread.h"
+diff --git a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
+index 4ed9afedf..64f584e93 100644
+--- a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
++++ b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
+@@ -100,7 +100,7 @@ static void ioctl_table_fill() {
+   _(SIOCGETVIFCNT, WRITE, struct_sioc_vif_req_sz);
+ #endif
+ 
+-#if SANITIZER_LINUX
++#if SANITIZER_LINUX && !SANITIZER_NONGNU
+   // Conflicting request ids.
+   // _(CDROMAUDIOBUFSIZ, NONE, 0);
+   // _(SNDCTL_TMR_CONTINUE, NONE, 0);
+@@ -361,7 +361,7 @@ static void ioctl_table_fill() {
+   _(VT_WAITACTIVE, NONE, 0);
+ #endif
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE
+   _(CYGETDEFTHRESH, WRITE, sizeof(int));
+   _(CYGETDEFTIMEOUT, WRITE, sizeof(int));
+diff --git a/lib/sanitizer_common/sanitizer_common_syscalls.inc b/lib/sanitizer_common/sanitizer_common_syscalls.inc
+index 469c8eb7e..24f87867d 100644
+--- a/lib/sanitizer_common/sanitizer_common_syscalls.inc
++++ b/lib/sanitizer_common/sanitizer_common_syscalls.inc
+@@ -2038,7 +2038,7 @@ POST_SYSCALL(setrlimit)(long res, long resource, void *rlim) {
+   }
+ }
+ 
+-#if !SANITIZER_ANDROID
++#if !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ PRE_SYSCALL(prlimit64)(long pid, long resource, const void *new_rlim,
+                        void *old_rlim) {
+   if (new_rlim) PRE_READ(new_rlim, struct_rlimit64_sz);
+diff --git a/lib/sanitizer_common/sanitizer_linux_libcdep.cc b/lib/sanitizer_common/sanitizer_linux_libcdep.cc
+index 52196db12..045d9331f 100644
+--- a/lib/sanitizer_common/sanitizer_linux_libcdep.cc
++++ b/lib/sanitizer_common/sanitizer_linux_libcdep.cc
+@@ -148,7 +148,7 @@ bool SanitizerGetThreadName(char *name, int max_len) {
+ #endif
+ }
+ 
+-#if !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO
++#if !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO && !SANITIZER_NONGNU
+ static uptr g_tls_size;
+ 
+ #ifdef __i386__
+@@ -176,11 +176,11 @@ void InitTlsSize() {
+ }
+ #else
+ void InitTlsSize() { }
+-#endif  // !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO
++#endif  // !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO && !SANITIZER_NONGNU
+ 
+ #if (defined(__x86_64__) || defined(__i386__) || defined(__mips__) \
+     || defined(__aarch64__) || defined(__powerpc64__) || defined(__s390__) \
+-    || defined(__arm__)) && SANITIZER_LINUX && !SANITIZER_ANDROID
++    || defined(__arm__)) && SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ // sizeof(struct pthread) from glibc.
+ static atomic_uintptr_t kThreadDescriptorSize;
+ 
+@@ -335,7 +335,7 @@ uptr ThreadSelf() {
+ 
+ #if !SANITIZER_GO
+ static void GetTls(uptr *addr, uptr *size) {
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ # if defined(__x86_64__) || defined(__i386__) || defined(__s390__)
+   *addr = ThreadSelf();
+   *size = GetTlsSize();
+@@ -362,7 +362,7 @@ static void GetTls(uptr *addr, uptr *size) {
+     *addr = (uptr) dtv[2];
+     *size = (*addr == 0) ? 0 : ((uptr) segbase[0] - (uptr) dtv[2]);
+   }
+-#elif SANITIZER_ANDROID
++#elif SANITIZER_ANDROID || SANITIZER_NONGNU
+   *addr = 0;
+   *size = 0;
+ #else
+@@ -373,7 +373,7 @@ static void GetTls(uptr *addr, uptr *size) {
+ 
+ #if !SANITIZER_GO
+ uptr GetTlsSize() {
+-#if SANITIZER_FREEBSD || SANITIZER_ANDROID
++#if SANITIZER_FREEBSD || SANITIZER_ANDROID || SANITIZER_NONGNU
+   uptr addr, size;
+   GetTls(&addr, &size);
+   return size;
+diff --git a/lib/sanitizer_common/sanitizer_platform.h b/lib/sanitizer_common/sanitizer_platform.h
+index 396f7c934..5af6f1ed5 100644
+--- a/lib/sanitizer_common/sanitizer_platform.h
++++ b/lib/sanitizer_common/sanitizer_platform.h
+@@ -175,6 +175,13 @@
+ # define SANITIZER_ARM 0
+ #endif
+ 
++
++#if defined(__linux__) && !defined(__GLIBC__)
++# define SANITIZER_NONGNU 1
++#else
++# define SANITIZER_NONGNU 0
++#endif
++
+ // By default we allow to use SizeClassAllocator64 on 64-bit platform.
+ // But in some cases (e.g. AArch64's 39-bit address space) SizeClassAllocator64
+ // does not work well and we need to fallback to SizeClassAllocator32.
+diff --git a/lib/sanitizer_common/sanitizer_platform_interceptors.h b/lib/sanitizer_common/sanitizer_platform_interceptors.h
+index 0380cee92..0a39abbd0 100644
+--- a/lib/sanitizer_common/sanitizer_platform_interceptors.h
++++ b/lib/sanitizer_common/sanitizer_platform_interceptors.h
+@@ -31,7 +31,7 @@
+ # define SI_POSIX 0
+ #endif
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ # define SI_LINUX_NOT_ANDROID 1
+ #else
+ # define SI_LINUX_NOT_ANDROID 0
+diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+index 83f4fd22f..fa8c1b8bd 100644
+--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+@@ -14,6 +14,9 @@
+ 
+ #include "sanitizer_platform.h"
+ 
++// Workaround musl <--> linux conflicting definition of 'struct sysinfo'
++#define _LINUX_SYSINFO_H
++
+ #if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_MAC
+ // Tests in this file assume that off_t-dependent data structures match the
+ // libc ABI. For example, struct dirent here is what readdir() function (as
+@@ -138,12 +141,14 @@ typedef struct user_fpregs elf_fpregset_t;
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+ #include <glob.h>
+-#include <obstack.h>
++#  if !SANITIZER_NONGNU
++#    include <obstack.h>
++#  endif
+ #include <mqueue.h>
+-#include <net/if_ppp.h>
+-#include <netax25/ax25.h>
+-#include <netipx/ipx.h>
+-#include <netrom/netrom.h>
++#include <linux/if_ppp.h>
++#include <linux/ax25.h>
++#include <linux/ipx.h>
++#include <linux/netrom.h>
+ #if HAVE_RPC_XDR_H
+ # include <rpc/xdr.h>
+ #elif HAVE_TIRPC_RPC_XDR_H
+@@ -159,7 +164,8 @@ typedef struct user_fpregs elf_fpregset_t;
+ # include <sys/procfs.h>
+ #endif
+ #include <sys/user.h>
+-#include <sys/ustat.h>
++// #include <sys/ustat.h>
++#include <sys/statfs.h>
+ #include <linux/cyclades.h>
+ #include <linux/if_eql.h>
+ #include <linux/if_plip.h>
+@@ -251,7 +257,7 @@ namespace __sanitizer {
+   unsigned struct_itimerspec_sz = sizeof(struct itimerspec);
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   unsigned struct_ustat_sz = sizeof(struct ustat);
+   unsigned struct_rlimit64_sz = sizeof(struct rlimit64);
+   unsigned struct_statvfs64_sz = sizeof(struct statvfs64);
+@@ -309,7 +315,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(ElfW(Phdr));
+ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+ #endif
+ 
+-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
++#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   int glob_nomatch = GLOB_NOMATCH;
+   int glob_altdirfunc = GLOB_ALTDIRFUNC;
+ #endif
+@@ -403,7 +409,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+   unsigned struct_termios_sz = sizeof(struct termios);
+   unsigned struct_winsize_sz = sizeof(struct winsize);
+ 
+-#if SANITIZER_LINUX
++#if SANITIZER_LINUX && !SANITIZER_NONGNU
+   unsigned struct_arpreq_sz = sizeof(struct arpreq);
+   unsigned struct_cdrom_msf_sz = sizeof(struct cdrom_msf);
+   unsigned struct_cdrom_multisession_sz = sizeof(struct cdrom_multisession);
+@@ -453,7 +459,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+   unsigned struct_vt_mode_sz = sizeof(struct vt_mode);
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct);
+   unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor);
+ #if EV_VERSION > (0x010000)
+@@ -821,7 +827,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+   unsigned IOCTL_VT_WAITACTIVE = VT_WAITACTIVE;
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH;
+   unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT;
+   unsigned IOCTL_CYGETMON = CYGETMON;
+@@ -976,7 +982,7 @@ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phdr);
+ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phnum);
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
++#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ CHECK_TYPE_SIZE(glob_t);
+ CHECK_SIZE_AND_OFFSET(glob_t, gl_pathc);
+ CHECK_SIZE_AND_OFFSET(glob_t, gl_pathv);
+@@ -1010,6 +1016,7 @@ CHECK_TYPE_SIZE(iovec);
+ CHECK_SIZE_AND_OFFSET(iovec, iov_base);
+ CHECK_SIZE_AND_OFFSET(iovec, iov_len);
+ 
++#if !SANITIZER_NONGNU
+ CHECK_TYPE_SIZE(msghdr);
+ CHECK_SIZE_AND_OFFSET(msghdr, msg_name);
+ CHECK_SIZE_AND_OFFSET(msghdr, msg_namelen);
+@@ -1023,6 +1030,7 @@ CHECK_TYPE_SIZE(cmsghdr);
+ CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_len);
+ CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_level);
+ CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_type);
++#endif
+ 
+ COMPILER_CHECK(sizeof(__sanitizer_dirent) <= sizeof(dirent));
+ CHECK_SIZE_AND_OFFSET(dirent, d_ino);
+@@ -1125,7 +1133,7 @@ CHECK_SIZE_AND_OFFSET(mntent, mnt_passno);
+ 
+ CHECK_TYPE_SIZE(ether_addr);
+ 
+-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
++#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ CHECK_TYPE_SIZE(ipc_perm);
+ # if SANITIZER_FREEBSD
+ CHECK_SIZE_AND_OFFSET(ipc_perm, key);
+@@ -1186,7 +1194,7 @@ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_dstaddr);
+ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_data);
+ #endif
+ 
+-#if SANITIZER_LINUX
++#if SANITIZER_LINUX && !SANITIZER_NONGNU
+ COMPILER_CHECK(sizeof(__sanitizer_mallinfo) == sizeof(struct mallinfo));
+ #endif
+ 
+@@ -1236,7 +1244,7 @@ COMPILER_CHECK(__sanitizer_XDR_DECODE == XDR_DECODE);
+ COMPILER_CHECK(__sanitizer_XDR_FREE == XDR_FREE);
+ #endif
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ COMPILER_CHECK(sizeof(__sanitizer_FILE) <= sizeof(FILE));
+ CHECK_SIZE_AND_OFFSET(FILE, _flags);
+ CHECK_SIZE_AND_OFFSET(FILE, _IO_read_ptr);
+@@ -1255,7 +1263,7 @@ CHECK_SIZE_AND_OFFSET(FILE, _chain);
+ CHECK_SIZE_AND_OFFSET(FILE, _fileno);
+ #endif
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ COMPILER_CHECK(sizeof(__sanitizer__obstack_chunk) <= sizeof(_obstack_chunk));
+ CHECK_SIZE_AND_OFFSET(_obstack_chunk, limit);
+ CHECK_SIZE_AND_OFFSET(_obstack_chunk, prev);
+diff --git a/lib/tsan/rtl/tsan_platform_linux.cc b/lib/tsan/rtl/tsan_platform_linux.cc
+index ead1e5704..2c020e3fe 100644
+--- a/lib/tsan/rtl/tsan_platform_linux.cc
++++ b/lib/tsan/rtl/tsan_platform_linux.cc
+@@ -284,7 +284,7 @@ void InitializePlatform() {
+ // This is required to properly "close" the fds, because we do not see internal
+ // closes within glibc. The code is a pure hack.
+ int ExtractResolvFDs(void *state, int *fds, int nfd) {
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   int cnt = 0;
+   struct __res_state *statp = (struct __res_state*)state;
+   for (int i = 0; i < MAXNS && cnt < nfd; i++) {
+-- 
+2.16.2
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/6/clang/default.nix b/nixpkgs/pkgs/development/compilers/llvm/6/clang/default.nix
new file mode 100644
index 000000000000..e2f7166354ae
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/6/clang/default.nix
@@ -0,0 +1,109 @@
+{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python3
+, fixDarwinDylibNames
+, enableManpages ? false
+}:
+
+let
+  gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
+  self = stdenv.mkDerivation ({
+    pname = "clang";
+    inherit version;
+
+    src = fetch "cfe" "0rxn4rh7rrnsqbdgp4gzc8ishbkryhpl1kd3mpnxzpxxhla3y93w";
+
+    unpackPhase = ''
+      unpackFile $src
+      mv cfe-${version}* clang
+      sourceRoot=$PWD/clang
+      unpackFile ${clang-tools-extra_src}
+      mv clang-tools-extra-* $sourceRoot/tools/extra
+    '';
+
+    nativeBuildInputs = [ cmake python3 ]
+      ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx;
+
+    buildInputs = [ libxml2 llvm ]
+      ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+    cmakeFlags = [
+      "-DCMAKE_CXX_FLAGS=-std=c++11"
+    ] ++ stdenv.lib.optionals enableManpages [
+      "-DCLANG_INCLUDE_DOCS=ON"
+      "-DLLVM_ENABLE_SPHINX=ON"
+      "-DSPHINX_OUTPUT_MAN=ON"
+      "-DSPHINX_OUTPUT_HTML=OFF"
+      "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+    ];
+
+    patches = [ ./purity.patch ];
+
+    postPatch = ''
+      sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' \
+             -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' \
+             lib/Driver/ToolChains/*.cpp
+
+      # Patch for standalone doc building
+      sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt
+    '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
+      sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
+    '';
+
+    outputs = [ "out" "lib" "python" ];
+
+    # Clang expects to find LLVMgold in its own prefix
+    postInstall = ''
+      if [ -e ${llvm}/lib/LLVMgold.so ]; then
+        ln -sv ${llvm}/lib/LLVMgold.so $out/lib
+      fi
+
+      ln -sv $out/bin/clang $out/bin/cpp
+
+      # Move libclang to 'lib' output
+      moveToOutput "lib/libclang.*" "$lib"
+      substituteInPlace $out/lib/cmake/clang/ClangTargets-release.cmake \
+          --replace "\''${_IMPORT_PREFIX}/lib/libclang." "$lib/lib/libclang."
+
+      mkdir -p $python/bin $python/share/clang/
+      mv $out/bin/{git-clang-format,scan-view} $python/bin
+      if [ -e $out/bin/set-xcode-analyzer ]; then
+        mv $out/bin/set-xcode-analyzer $python/bin
+      fi
+      mv $out/share/clang/*.py $python/share/clang
+      rm $out/bin/c-index-test
+    '';
+
+    enableParallelBuilding = true;
+
+    passthru = {
+      isClang = true;
+      inherit llvm;
+    } // stdenv.lib.optionalAttrs stdenv.targetPlatform.isLinux {
+      inherit gcc;
+    };
+
+    meta = {
+      description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
+      homepage    = "https://llvm.org/";
+      license     = stdenv.lib.licenses.ncsa;
+      platforms   = stdenv.lib.platforms.all;
+    };
+  } // stdenv.lib.optionalAttrs enableManpages {
+    pname = "clang-manpages";
+
+    buildPhase = ''
+      make docs-clang-man
+    '';
+
+    installPhase = ''
+      mkdir -p $out/share/man/man1
+      # Manually install clang manpage
+      cp docs/man/*.1 $out/share/man/man1/
+    '';
+
+    outputs = [ "out" ];
+
+    doCheck = false;
+
+    meta.description = "man page for Clang ${version}";
+  });
+in self
diff --git a/nixpkgs/pkgs/development/compilers/llvm/6/clang/purity.patch b/nixpkgs/pkgs/development/compilers/llvm/6/clang/purity.patch
new file mode 100644
index 000000000000..b30d0d0b5d5b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/6/clang/purity.patch
@@ -0,0 +1,30 @@
+From 4add81bba40dcec62c4ea4481be8e35ac53e89d8 Mon Sep 17 00:00:00 2001
+From: Will Dietz <w@wdtz.org>
+Date: Thu, 18 May 2017 11:56:12 -0500
+Subject: [PATCH] "purity" patch for 5.0
+
+---
+ lib/Driver/ToolChains/Gnu.cpp | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
+index fe3c0191bb..c6a482bece 100644
+--- a/lib/Driver/ToolChains/Gnu.cpp
++++ b/lib/Driver/ToolChains/Gnu.cpp
+@@ -494,13 +494,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
+   if (!Args.hasArg(options::OPT_static)) {
+     if (Args.hasArg(options::OPT_rdynamic))
+       CmdArgs.push_back("-export-dynamic");
+-
+-    if (!Args.hasArg(options::OPT_shared)) {
+-      const std::string Loader =
+-          D.DyldPrefix + ToolChain.getDynamicLinker(Args);
+-      CmdArgs.push_back("-dynamic-linker");
+-      CmdArgs.push_back(Args.MakeArgString(Loader));
+-    }
+   }
+ 
+   CmdArgs.push_back("-o");
+-- 
+2.11.0
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/6/compiler-rt-armv7l.patch b/nixpkgs/pkgs/development/compilers/llvm/6/compiler-rt-armv7l.patch
new file mode 100644
index 000000000000..ca2ed632faa2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/6/compiler-rt-armv7l.patch
@@ -0,0 +1,32 @@
+diff -ur compiler-rt-6.0.1.src/cmake/builtin-config-ix.cmake compiler-rt-6.0.1.src-patched/cmake/builtin-config-ix.cmake
+--- compiler-rt-6.0.1.src/cmake/builtin-config-ix.cmake	2017-12-01 06:04:11.000000000 +0900
++++ compiler-rt-6.0.1.src-patched/cmake/builtin-config-ix.cmake	2020-05-10 03:30:01.939694303 +0900
+@@ -24,7 +24,7 @@
+ 
+ 
+ set(ARM64 aarch64)
+-set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k)
++set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k armv7l)
+ set(X86 i386)
+ set(X86_64 x86_64)
+ set(MIPS32 mips mipsel)
+diff -ur compiler-rt-6.0.1.src/lib/builtins/CMakeLists.txt compiler-rt-6.0.1.src-patched/lib/builtins/CMakeLists.txt
+--- compiler-rt-6.0.1.src/lib/builtins/CMakeLists.txt	2017-12-25 06:11:32.000000000 +0900
++++ compiler-rt-6.0.1.src-patched/lib/builtins/CMakeLists.txt	2020-05-10 03:30:44.814964156 +0900
+@@ -452,6 +452,7 @@
+ set(armv7_SOURCES ${arm_SOURCES})
+ set(armv7s_SOURCES ${arm_SOURCES})
+ set(armv7k_SOURCES ${arm_SOURCES})
++set(armv7l_SOURCES ${arm_SOURCES})
+ set(arm64_SOURCES ${aarch64_SOURCES})
+ 
+ # macho_embedded archs
+@@ -521,7 +522,7 @@
+       set(_arch ${arch})
+       if("${arch}" STREQUAL "armv6m")
+         set(_arch "arm|armv6m")
+-      elseif("${arch}" MATCHES "^(armhf|armv7|armv7s|armv7k|armv7m|armv7em)$")
++      elseif("${arch}" MATCHES "^(armhf|armv7|armv7s|armv7k|armv7l|armv7m|armv7em)$")
+         set(_arch "arm")
+       endif()
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/6/compiler-rt-codesign.patch b/nixpkgs/pkgs/development/compilers/llvm/6/compiler-rt-codesign.patch
new file mode 100644
index 000000000000..8f4c76bca1eb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/6/compiler-rt-codesign.patch
@@ -0,0 +1,155 @@
+From 3dec5f3475a26aeb4678627795c4b67c6b7b4785 Mon Sep 17 00:00:00 2001
+From: Will Dietz <w@wdtz.org>
+Date: Tue, 19 Sep 2017 13:13:06 -0500
+Subject: [PATCH] remove codesign use on Apple, disable ios sim testing that
+ needs it
+
+---
+ cmake/Modules/AddCompilerRT.cmake |  8 ------
+ test/asan/CMakeLists.txt          | 52 ---------------------------------------
+ test/tsan/CMakeLists.txt          | 47 -----------------------------------
+ 3 files changed, 107 deletions(-)
+
+diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
+index bc5fb9ff7..b64eb4246 100644
+--- a/cmake/Modules/AddCompilerRT.cmake
++++ b/cmake/Modules/AddCompilerRT.cmake
+@@ -210,14 +210,6 @@ function(add_compiler_rt_runtime name type)
+         set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "")
+         set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib")
+       endif()
+-      if(APPLE)
+-        # Ad-hoc sign the dylibs
+-        add_custom_command(TARGET ${libname}
+-          POST_BUILD  
+-          COMMAND codesign --sign - $<TARGET_FILE:${libname}>
+-          WORKING_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR}
+-        )
+-      endif()
+     endif()
+     install(TARGETS ${libname}
+       ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}
+diff --git a/test/asan/CMakeLists.txt b/test/asan/CMakeLists.txt
+index 8bfc15b5c..f23d0f71a 100644
+--- a/test/asan/CMakeLists.txt
++++ b/test/asan/CMakeLists.txt
+@@ -83,58 +83,6 @@ foreach(arch ${ASAN_TEST_ARCH})
+   endif()
+ endforeach()
+ 
+-# iOS and iOS simulator test suites
+-# These are not added into "check-all", in order to run these tests, use
+-# "check-asan-iossim-x86_64" and similar. They also require that an extra env
+-# variable to select which iOS device or simulator to use, e.g.:
+-# SANITIZER_IOSSIM_TEST_DEVICE_IDENTIFIER="iPhone 6"
+-if(APPLE)
+-  set(EXCLUDE_FROM_ALL ON)
+-
+-  set(ASAN_TEST_TARGET_CC ${COMPILER_RT_TEST_COMPILER})
+-  set(ASAN_TEST_IOS "1")
+-  pythonize_bool(ASAN_TEST_IOS)
+-  set(ASAN_TEST_DYNAMIC True)
+-
+-  foreach(arch ${DARWIN_iossim_ARCHS})
+-    set(ASAN_TEST_IOSSIM "1")
+-    pythonize_bool(ASAN_TEST_IOSSIM)
+-    set(ASAN_TEST_TARGET_ARCH ${arch})
+-    set(ASAN_TEST_TARGET_CFLAGS "-arch ${arch} -isysroot ${DARWIN_iossim_SYSROOT} ${COMPILER_RT_TEST_COMPILER_CFLAGS}")
+-    set(ASAN_TEST_CONFIG_SUFFIX "-${arch}-iossim")
+-    get_bits_for_arch(${arch} ASAN_TEST_BITS)
+-    string(TOUPPER ${arch} ARCH_UPPER_CASE)
+-    set(CONFIG_NAME "IOSSim${ARCH_UPPER_CASE}Config")
+-    configure_lit_site_cfg(
+-      ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
+-      ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg
+-      )
+-    add_lit_testsuite(check-asan-iossim-${arch} "AddressSanitizer iOS Simulator ${arch} tests"
+-      ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/
+-      DEPENDS ${ASAN_TEST_DEPS})
+-  endforeach()
+-
+-  foreach (arch ${DARWIN_ios_ARCHS})
+-    set(ASAN_TEST_IOSSIM "0")
+-    pythonize_bool(ASAN_TEST_IOSSIM)
+-    set(ASAN_TEST_TARGET_ARCH ${arch})
+-    set(ASAN_TEST_TARGET_CFLAGS "-arch ${arch} -isysroot ${DARWIN_ios_SYSROOT} ${COMPILER_RT_TEST_COMPILER_CFLAGS}")
+-    set(ASAN_TEST_CONFIG_SUFFIX "-${arch}-ios")
+-    get_bits_for_arch(${arch} ASAN_TEST_BITS)
+-    string(TOUPPER ${arch} ARCH_UPPER_CASE)
+-    set(CONFIG_NAME "IOS${ARCH_UPPER_CASE}Config")
+-    configure_lit_site_cfg(
+-      ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
+-      ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg
+-      )
+-    add_lit_testsuite(check-asan-ios-${arch} "AddressSanitizer iOS ${arch} tests"
+-      ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/
+-      DEPENDS ${ASAN_TEST_DEPS})
+-  endforeach()
+-
+-  set(EXCLUDE_FROM_ALL OFF)
+-endif()
+-
+ # Add unit tests.
+ if(COMPILER_RT_INCLUDE_TESTS)
+   set(ASAN_TEST_DYNAMIC False)
+diff --git a/test/tsan/CMakeLists.txt b/test/tsan/CMakeLists.txt
+index a68908612..cde0accb5 100644
+--- a/test/tsan/CMakeLists.txt
++++ b/test/tsan/CMakeLists.txt
+@@ -42,53 +42,6 @@ foreach(arch ${TSAN_TEST_ARCH})
+   list(APPEND TSAN_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME})
+ endforeach()
+ 
+-# iOS and iOS simulator test suites
+-# These are not added into "check-all", in order to run these tests, use
+-# "check-tsan-iossim-x86_64" and similar. They also require an extra environment
+-# variable to select which iOS device or simulator to use, e.g.:
+-# SANITIZER_IOSSIM_TEST_DEVICE_IDENTIFIER="iPhone 6"
+-if(APPLE)
+-  set(EXCLUDE_FROM_ALL ON)
+-
+-  set(TSAN_TEST_TARGET_CC ${COMPILER_RT_TEST_COMPILER})
+-  set(TSAN_TEST_IOS "1")
+-  pythonize_bool(TSAN_TEST_IOS)
+-
+-  set(arch "x86_64")
+-  set(TSAN_TEST_IOSSIM "1")
+-  pythonize_bool(TSAN_TEST_IOSSIM)
+-  set(TSAN_TEST_TARGET_ARCH ${arch})
+-  set(TSAN_TEST_TARGET_CFLAGS "-arch ${arch} -isysroot ${DARWIN_iossim_SYSROOT} ${COMPILER_RT_TEST_COMPILER_CFLAGS}")
+-  set(TSAN_TEST_CONFIG_SUFFIX "-${arch}-iossim")
+-  string(TOUPPER ${arch} ARCH_UPPER_CASE)
+-  set(CONFIG_NAME "IOSSim${ARCH_UPPER_CASE}Config")
+-  configure_lit_site_cfg(
+-    ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
+-    ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg
+-    )
+-  add_lit_testsuite(check-tsan-iossim-${arch} "ThreadSanitizer iOS Simulator ${arch} tests"
+-    ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/
+-    DEPENDS ${TSAN_TEST_DEPS})
+-
+-  set(arch "arm64")
+-  set(TSAN_TEST_IOSSIM "0")
+-  pythonize_bool(TSAN_TEST_IOSSIM)
+-  set(TSAN_TEST_TARGET_ARCH ${arch})
+-  set(TSAN_TEST_TARGET_CFLAGS "-arch ${arch} -isysroot ${DARWIN_ios_SYSROOT} ${COMPILER_RT_TEST_COMPILER_CFLAGS}")
+-  set(TSAN_TEST_CONFIG_SUFFIX "-${arch}-ios")
+-  string(TOUPPER ${arch} ARCH_UPPER_CASE)
+-  set(CONFIG_NAME "IOS${ARCH_UPPER_CASE}Config")
+-  configure_lit_site_cfg(
+-    ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
+-    ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg
+-    )
+-  add_lit_testsuite(check-tsan-ios-${arch} "ThreadSanitizer iOS Simulator ${arch} tests"
+-    ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/
+-    DEPENDS ${TSAN_TEST_DEPS})
+-
+-  set(EXCLUDE_FROM_ALL OFF)
+-endif()
+-
+ if(COMPILER_RT_INCLUDE_TESTS)
+   configure_lit_site_cfg(
+     ${CMAKE_CURRENT_SOURCE_DIR}/Unit/lit.site.cfg.in
+-- 
+2.14.1
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/6/compiler-rt.nix b/nixpkgs/pkgs/development/compilers/llvm/6/compiler-rt.nix
new file mode 100644
index 000000000000..13abf6d95611
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/6/compiler-rt.nix
@@ -0,0 +1,84 @@
+{ stdenv, version, fetch, cmake, python3, llvm, libcxxabi }:
+
+let
+
+  useLLVM = stdenv.hostPlatform.useLLVM or false;
+  bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
+  inherit (stdenv.hostPlatform) isMusl;
+
+in
+
+stdenv.mkDerivation {
+  pname = "compiler-rt";
+  inherit version;
+  src = fetch "compiler-rt" "1fcr3jn24yr8lh36nc0c4ikli4744i2q9m1ik67p1jymwwaixkgl";
+
+  nativeBuildInputs = [ cmake python3 llvm ];
+  buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
+
+  NIX_CFLAGS_COMPILE = [
+    "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0"
+  ];
+
+  cmakeFlags = [
+    "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
+    "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
+    "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
+  ] ++ stdenv.lib.optionals (useLLVM || bareMetal || isMusl) [
+    "-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
+    "-DCOMPILER_RT_BUILD_XRAY=OFF"
+    "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
+    "-DCOMPILER_RT_BUILD_PROFILE=OFF"
+  ] ++ stdenv.lib.optionals (useLLVM || bareMetal) [
+    "-DCMAKE_C_COMPILER_WORKS=ON"
+    "-DCMAKE_CXX_COMPILER_WORKS=ON"
+    "-DCOMPILER_RT_BAREMETAL_BUILD=ON"
+    "-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
+  ] ++ stdenv.lib.optionals (useLLVM) [
+    "-DCOMPILER_RT_BUILD_BUILTINS=ON"
+    "-DCMAKE_C_FLAGS=-nodefaultlibs"
+    #https://stackoverflow.com/questions/53633705/cmake-the-c-compiler-is-not-able-to-compile-a-simple-test-program
+    "-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
+  ] ++ stdenv.lib.optionals (bareMetal) [
+    "-DCOMPILER_RT_OS_DIR=baremetal"
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    ./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
+  ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
+    ++ stdenv.lib.optional stdenv.hostPlatform.isAarch32 ./compiler-rt-armv7l.patch;
+
+  # TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
+  # to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra
+  # can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd
+  # get no binary cache for the entire platform. If you really find yourself wanting the TSAN, make this controllable by
+  # a flag and turn the flag off during the stdenv build.
+  postPatch = stdenv.lib.optionalString (!stdenv.isDarwin) ''
+    substituteInPlace cmake/builtin-config-ix.cmake \
+      --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)'
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    substituteInPlace cmake/config-ix.cmake \
+      --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
+  '' + stdenv.lib.optionalString (useLLVM) ''
+    substituteInPlace lib/builtins/int_util.c \
+      --replace "#include <stdlib.h>" ""
+    substituteInPlace lib/builtins/clear_cache.c \
+      --replace "#include <assert.h>" ""
+    substituteInPlace lib/builtins/cpu_model.c \
+      --replace "#include <assert.h>" ""
+  '';
+
+  # Hack around weird upsream RPATH bug
+  postInstall = stdenv.lib.optionalString (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isWasm) ''
+    ln -s "$out/lib"/*/* "$out/lib"
+  '' + stdenv.lib.optionalString (useLLVM) ''
+    ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/linux/crtbegin.o
+    ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/linux/crtend.o
+    ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/linux/crtbeginS.o
+    ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/linux/crtendS.o
+  '';
+
+  enableParallelBuilding = true;
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/6/default.nix b/nixpkgs/pkgs/development/compilers/llvm/6/default.nix
new file mode 100644
index 000000000000..b544a4f6ba69
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/6/default.nix
@@ -0,0 +1,101 @@
+{ lowPrio, newScope, pkgs, stdenv, cmake, gcc, libstdcxxHook
+, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith
+, buildLlvmTools # tools, but from the previous stage, for cross
+, targetLlvmLibraries # libraries, but from the next stage, for cross
+}:
+
+let
+  release_version = "6.0.1";
+  version = release_version; # differentiating these is important for rc's
+  targetConfig = stdenv.targetPlatform.config;
+
+  fetch = name: sha256: fetchurl {
+    url = "https://releases.llvm.org/${release_version}/${name}-${version}.src.tar.xz";
+    inherit sha256;
+  };
+
+  clang-tools-extra_src = fetch "clang-tools-extra" "1w8ml7fyn4vyxmy59n2qm4r1k1kgwgwkaldp6m45fdv4g0kkfbhd";
+
+  tools = stdenv.lib.makeExtensible (tools: let
+    callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
+    mkExtraBuildCommands = cc: ''
+      rsrc="$out/resource-root"
+      mkdir "$rsrc"
+      ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc"
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
+      echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
+    '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc && !(stdenv.targetPlatform.useLLVM or false)) ''
+      echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags
+    '';
+  in {
+
+    llvm = callPackage ./llvm.nix { };
+
+    clang-unwrapped = callPackage ./clang {
+      inherit clang-tools-extra_src;
+    };
+
+    llvm-manpages = lowPrio (tools.llvm.override {
+      enableManpages = true;
+      python3 = pkgs.python3;  # don't use python-boot
+    });
+
+    clang-manpages = lowPrio (tools.clang-unwrapped.override {
+      enableManpages = true;
+      python3 = pkgs.python3;  # don't use python-boot
+    });
+
+    libclang = tools.clang-unwrapped.lib;
+
+    clang = if stdenv.cc.isGNU then tools.libstdcxxClang else tools.libcxxClang;
+
+    libstdcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      extraTools = [
+        libstdcxxHook
+      ];
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = ''
+          echo "-target ${targetConfig}" >> $out/nix-support/cc-cflags
+          echo "-B${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-cflags
+          echo "-L${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-ldflags
+          echo "-L${gcc.cc.lib}/${targetConfig}/lib" >> $out/nix-support/cc-ldflags
+      '' + mkExtraBuildCommands cc;
+    };
+
+    libcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = targetLlvmLibraries.libcxx;
+      extraPackages = [
+        targetLlvmLibraries.libcxx
+        targetLlvmLibraries.libcxxabi
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+    };
+
+    lld = callPackage ./lld.nix {};
+
+    lldb = callPackage ./lldb.nix {};
+  });
+
+  libraries = stdenv.lib.makeExtensible (libraries: let
+    callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
+  in {
+
+    compiler-rt = callPackage ./compiler-rt.nix {};
+
+    stdenv = overrideCC stdenv buildLlvmTools.clang;
+
+    libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
+
+    libcxx = callPackage ./libc++ {};
+
+    libcxxabi = callPackage ./libc++abi.nix {};
+
+    openmp = callPackage ./openmp.nix {};
+  });
+
+in { inherit tools libraries; } // libraries // tools
diff --git a/nixpkgs/pkgs/development/compilers/llvm/6/libc++/default.nix b/nixpkgs/pkgs/development/compilers/llvm/6/libc++/default.nix
new file mode 100644
index 000000000000..57f1431f4711
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/6/libc++/default.nix
@@ -0,0 +1,53 @@
+{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version }:
+
+stdenv.mkDerivation {
+  pname = "libc++";
+  inherit version;
+
+  src = fetch "libcxx" "0rzw4qvxp6qx4l4h9amrq02gp7hbg8lw4m0sy3k60f50234gnm3n";
+
+  postUnpack = ''
+    unpackFile ${libcxxabi.src}
+    export LIBCXXABI_INCLUDE_DIR="$PWD/$(ls -d libcxxabi-${version}*)/include"
+  '';
+
+  patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [
+    ../../libcxx-0001-musl-hacks.patch
+  ];
+
+  prePatch = ''
+    substituteInPlace lib/CMakeLists.txt --replace "/usr/lib/libc++" "\''${LIBCXX_LIBCXXABI_LIB_PATH}/libc++"
+  '';
+
+  preConfigure = ''
+    # Get headers from the cxxabi source so we can see private headers not installed by the cxxabi package
+    cmakeFlagsArray=($cmakeFlagsArray -DLIBCXX_CXX_ABI_INCLUDE_PATHS="$LIBCXXABI_INCLUDE_DIR")
+  '' + lib.optionalString stdenv.hostPlatform.isMusl ''
+    patchShebangs utils/cat_files.py
+  '';
+  nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python3;
+
+  buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+  cmakeFlags = [
+    "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"
+    "-DLIBCXX_LIBCPPABI_VERSION=2"
+    "-DLIBCXX_CXX_ABI=libcxxabi"
+  ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "-DLIBCXX_HAS_MUSL_LIBC=1";
+
+  enableParallelBuilding = true;
+
+  linkCxxAbi = stdenv.isLinux;
+
+  setupHooks = [
+    ../../../../../build-support/setup-hooks/role.bash
+    ./setup-hook.sh
+  ];
+
+  meta = {
+    homepage = "https://libcxx.llvm.org/";
+    description = "A new implementation of the C++ standard library, targeting C++11";
+    license = with stdenv.lib.licenses; [ ncsa mit ];
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/6/libc++/setup-hook.sh b/nixpkgs/pkgs/development/compilers/llvm/6/libc++/setup-hook.sh
new file mode 100644
index 000000000000..3a274aecc23d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/6/libc++/setup-hook.sh
@@ -0,0 +1,6 @@
+# See pkgs/build-support/setup-hooks/role.bash
+getHostRole
+
+linkCxxAbi="@linkCxxAbi@"
+export NIX_CXXSTDLIB_COMPILE${role_post}+=" -isystem @out@/include/c++/v1"
+export NIX_CXXSTDLIB_LINK${role_post}=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
diff --git a/nixpkgs/pkgs/development/compilers/llvm/6/libc++abi.nix b/nixpkgs/pkgs/development/compilers/llvm/6/libc++abi.nix
new file mode 100644
index 000000000000..246bc6153e59
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/6/libc++abi.nix
@@ -0,0 +1,51 @@
+{ stdenv, cmake, fetch, libcxx, libunwind, llvm, version }:
+
+stdenv.mkDerivation {
+  pname = "libc++abi";
+  inherit version;
+
+  src = fetch "libcxxabi" "0prqvdj317qrc8nddaq1hh2ag9algkd9wbkj3y4mr5588k12x7r0";
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD) libunwind;
+
+  postUnpack = ''
+    unpackFile ${libcxx.src}
+    unpackFile ${llvm.src}
+    export cmakeFlags="-DLLVM_PATH=$PWD/$(ls -d llvm-*) -DLIBCXXABI_LIBCXX_PATH=$PWD/$(ls -d libcxx-*)"
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    export TRIPLE=x86_64-apple-darwin
+  '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
+    patch -p1 -d $(ls -d libcxx-*) -i ${../libcxx-0001-musl-hacks.patch}
+  '';
+
+  installPhase = if stdenv.isDarwin
+    then ''
+      for file in lib/*.dylib; do
+        # this should be done in CMake, but having trouble figuring out
+        # the magic combination of necessary CMake variables
+        # if you fancy a try, take a look at
+        # https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
+        install_name_tool -id $out/$file $file
+      done
+      make install
+      install -d 755 $out/include
+      install -m 644 ../include/*.h $out/include
+    ''
+    else ''
+      install -d -m 755 $out/include $out/lib
+      install -m 644 lib/libc++abi.a $out/lib
+      install -m 644 lib/libc++abi.so.1.0 $out/lib
+      install -m 644 ../include/cxxabi.h $out/include
+      ln -s libc++abi.so.1.0 $out/lib/libc++abi.so
+      ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
+    '';
+
+  meta = {
+    homepage = "https://libcxxabi.llvm.org/";
+    description = "A new implementation of low level support for a standard C++ library";
+    license = with stdenv.lib.licenses; [ ncsa mit ];
+    maintainers = with stdenv.lib.maintainers; [ vlstill ];
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/6/lld.nix b/nixpkgs/pkgs/development/compilers/llvm/6/lld.nix
new file mode 100644
index 000000000000..81b94df31194
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/6/lld.nix
@@ -0,0 +1,33 @@
+{ stdenv
+, fetch
+, cmake
+, libxml2
+, llvm
+, version
+}:
+
+stdenv.mkDerivation {
+  pname = "lld";
+  inherit version;
+
+  src = fetch "lld" "04afcfq2h7ysyqxxhyhb7ig4p0vdw7mi63kh8mffl74j0rc781p7";
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ llvm libxml2 ];
+
+  outputs = [ "out" "dev" ];
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    moveToOutput include "$dev"
+    moveToOutput lib "$dev"
+  '';
+
+  meta = {
+    description = "The LLVM Linker";
+    homepage    = "https://lld.llvm.org/";
+    license     = stdenv.lib.licenses.ncsa;
+    platforms   = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/6/lldb.nix b/nixpkgs/pkgs/development/compilers/llvm/6/lldb.nix
new file mode 100644
index 000000000000..80e298eaf8c0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/6/lldb.nix
@@ -0,0 +1,57 @@
+{ stdenv
+, fetch
+, cmake
+, zlib
+, ncurses
+, swig
+, which
+, libedit
+, libxml2
+, llvm
+, clang-unwrapped
+, python3
+, version
+, darwin
+}:
+
+stdenv.mkDerivation {
+  pname = "lldb";
+  inherit version;
+
+  src = fetch "lldb" "05178zkyh84x32n91md6wm22lkzzrrfwa5cpmgzn0yrg3y2771bb";
+
+  postPatch = ''
+    # Fix up various paths that assume llvm and clang are installed in the same place
+    sed -i 's,".*ClangConfig.cmake","${clang-unwrapped}/lib/cmake/clang/ClangConfig.cmake",' \
+      cmake/modules/LLDBStandalone.cmake
+    sed -i 's,".*tools/clang/include","${clang-unwrapped}/include",' \
+      cmake/modules/LLDBStandalone.cmake
+    sed -i 's,"$.LLVM_LIBRARY_DIR.",${llvm}/lib ${clang-unwrapped}/lib,' \
+      cmake/modules/LLDBStandalone.cmake
+  '';
+
+  nativeBuildInputs = [ cmake python3 which swig ];
+  buildInputs = [ ncurses zlib libedit libxml2 llvm ]
+    ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa ];
+
+  CXXFLAGS = "-fno-rtti";
+  hardeningDisable = [ "format" ];
+
+  cmakeFlags = [
+    "-DLLDB_CODESIGN_IDENTITY=" # codesigning makes nondeterministic
+  ];
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    mkdir -p $out/share/man/man1
+    cp ../docs/lldb.1 $out/share/man/man1/
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A next-generation high-performance debugger";
+    homepage    = "https://llvm.org/";
+    license     = licenses.ncsa;
+    platforms   = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/6/llvm-outputs.patch b/nixpkgs/pkgs/development/compilers/llvm/6/llvm-outputs.patch
new file mode 100644
index 000000000000..40096fa3497f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/6/llvm-outputs.patch
@@ -0,0 +1,26 @@
+diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
+index 94d426b..37f7794 100644
+--- a/tools/llvm-config/llvm-config.cpp
++++ b/tools/llvm-config/llvm-config.cpp
+@@ -333,6 +333,21 @@ int main(int argc, char **argv) {
+     ActiveIncludeOption = "-I" + ActiveIncludeDir;
+   }
+ 
++  /// Nix-specific multiple-output handling: override ActiveLibDir if --link-shared
++  if (!IsInDevelopmentTree) {
++    bool WantShared = true;
++    for (int i = 1; i < argc; ++i) {
++      StringRef Arg = argv[i];
++      if (Arg == "--link-shared")
++        WantShared = true;
++      else if (Arg == "--link-static")
++        WantShared = false; // the last one wins
++    }
++
++    if (WantShared)
++      ActiveLibDir = std::string("@lib@") + "/lib" + LLVM_LIBDIR_SUFFIX;
++  }
++
+   /// We only use `shared library` mode in cases where the static library form
+   /// of the components provided are not available; note however that this is
+   /// skipped if we're run from within the build dir. However, once installed,
diff --git a/nixpkgs/pkgs/development/compilers/llvm/6/llvm.nix b/nixpkgs/pkgs/development/compilers/llvm/6/llvm.nix
new file mode 100644
index 000000000000..22dbb75d2d50
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/6/llvm.nix
@@ -0,0 +1,176 @@
+{ stdenv
+, fetch
+, cmake
+, python3
+, libffi
+, libbfd
+, libxml2
+, ncurses
+, version
+, release_version
+, zlib
+, buildPackages
+, fetchpatch
+, debugVersion ? false
+, enableManpages ? false
+, enableSharedLibraries ? true
+}:
+
+let
+  inherit (stdenv.lib) optional optionals optionalString;
+
+  # Used when creating a versioned symlinks of libLLVM.dylib
+  versionSuffixes = with stdenv.lib;
+    let parts = splitVersion release_version; in
+    imap (i: _: concatStringsSep "." (take i parts)) parts;
+in
+
+stdenv.mkDerivation ({
+  pname = "llvm";
+  inherit version;
+
+  src = fetch "llvm" "1qpls3vk85lydi5b4axl0809fv932qgsqgdgrk098567z4jc7mmn";
+
+  unpackPhase = ''
+    unpackFile $src
+    mv llvm-${version}* llvm
+    sourceRoot=$PWD/llvm
+  '';
+
+  outputs = [ "out" "python" ]
+    ++ optional enableSharedLibraries "lib";
+
+  nativeBuildInputs = [ cmake python3 ]
+    ++ optional enableManpages python3.pkgs.sphinx;
+
+  buildInputs = [ libxml2 libffi ];
+
+  propagatedBuildInputs = [ ncurses zlib ];
+
+  patches = [
+    # Patches to fix tests, included in llvm_7
+    (fetchpatch {
+      url = "https://github.com/llvm-mirror/llvm/commit/737553be0c9c25c497b45a241689994f177d5a5d.patch";
+      sha256 = "0hnaxnkx7zy5yg98f1ggv8a9l0r6g19n6ygqsv26masrnlcbccli";
+    })
+    (fetchpatch {
+      url = "https://github.com/llvm-mirror/llvm/commit/1c0dd31a7837c3e2f1c4ac14e4d5ac640688bd1f.patch";
+      includes = [ "test/tools/gold/X86/common.ll" ];
+      sha256 = "0fxgrxmfnjx17w3lcq19rk68b2xksh1bynz3ina784kma7hp4wdb";
+    })
+  ];
+
+  postPatch = optionalString stdenv.isDarwin ''
+    substituteInPlace cmake/modules/AddLLVM.cmake \
+      --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \
+      --replace 'set(_install_rpath "@loader_path/../lib" ''${extra_libdir})' ""
+  ''
+  # Patch llvm-config to return correct library path based on --link-{shared,static}.
+  + optionalString (enableSharedLibraries) ''
+    substitute '${./llvm-outputs.patch}' ./llvm-outputs.patch --subst-var lib
+    patch -p1 < ./llvm-outputs.patch
+  '' + ''
+    # FileSystem permissions tests fail with various special bits
+    substituteInPlace unittests/Support/CMakeLists.txt \
+      --replace "Path.cpp" ""
+    rm unittests/Support/Path.cpp
+  '' + optionalString stdenv.hostPlatform.isMusl ''
+    patch -p1 -i ${../TLI-musl.patch}
+    substituteInPlace unittests/Support/CMakeLists.txt \
+      --replace "add_subdirectory(DynamicLibrary)" ""
+    rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
+  '';
+
+  # hacky fix: created binaries need to be run before installation
+  preBuild = ''
+    mkdir -p $out/
+    ln -sv $PWD/lib $out
+  '';
+
+  cmakeFlags = with stdenv; [
+    "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
+    "-DLLVM_INSTALL_UTILS=ON"  # Needed by rustc
+    "-DLLVM_BUILD_TESTS=ON"
+    "-DLLVM_ENABLE_FFI=ON"
+    "-DLLVM_ENABLE_RTTI=ON"
+    "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly"
+    "-DLLVM_ENABLE_DUMP=ON"
+  ] ++ optionals enableSharedLibraries [
+    "-DLLVM_LINK_LLVM_DYLIB=ON"
+  ] ++ optionals enableManpages [
+    "-DLLVM_BUILD_DOCS=ON"
+    "-DLLVM_ENABLE_SPHINX=ON"
+    "-DSPHINX_OUTPUT_MAN=ON"
+    "-DSPHINX_OUTPUT_HTML=OFF"
+    "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+  ] ++ optionals (!isDarwin) [
+    "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
+  ] ++ optionals (isDarwin) [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+    "-DCAN_TARGET_i386=false"
+  ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "-DCMAKE_CROSSCOMPILING=True"
+    "-DLLVM_TABLEGEN=${buildPackages.llvm_6}/bin/llvm-tblgen"
+  ];
+
+  postBuild = ''
+    rm -fR $out
+  '';
+
+  preCheck = ''
+    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/lib
+  '';
+
+  postInstall = ''
+    mkdir -p $python/share
+    mv $out/share/opt-viewer $python/share/opt-viewer
+  ''
+  + optionalString enableSharedLibraries ''
+    moveToOutput "lib/libLLVM-*" "$lib"
+    moveToOutput "lib/libLLVM${stdenv.hostPlatform.extensions.sharedLibrary}" "$lib"
+    substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
+      --replace "\''${_IMPORT_PREFIX}/lib/libLLVM-" "$lib/lib/libLLVM-"
+  ''
+  + optionalString (stdenv.isDarwin && enableSharedLibraries) ''
+    substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
+      --replace "\''${_IMPORT_PREFIX}/lib/libLLVM.dylib" "$lib/lib/libLLVM.dylib"
+    ${stdenv.lib.concatMapStringsSep "\n" (v: ''
+      ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${v}.dylib
+    '') versionSuffixes}
+  '';
+
+  doCheck = stdenv.isLinux && (!stdenv.isi686);
+
+  checkTarget = "check-all";
+
+  enableParallelBuilding = true;
+
+  requiredSystemFeatures = [ "big-parallel" ];
+  meta = {
+    description = "Collection of modular and reusable compiler and toolchain technologies";
+    homepage    = "https://llvm.org/";
+    license     = stdenv.lib.licenses.ncsa;
+    maintainers = with stdenv.lib.maintainers; [ lovek323 raskin dtzWill ];
+    platforms   = stdenv.lib.platforms.all;
+  };
+} // stdenv.lib.optionalAttrs enableManpages {
+  pname = "llvm-manpages";
+
+  buildPhase = ''
+    make docs-llvm-man
+  '';
+
+  propagatedBuildInputs = [];
+
+  installPhase = ''
+    make -C docs install
+  '';
+
+  outputs = [ "out" ];
+
+  doCheck = false;
+
+  meta.description = "man pages for LLVM ${version}";
+})
diff --git a/nixpkgs/pkgs/development/compilers/llvm/6/openmp.nix b/nixpkgs/pkgs/development/compilers/llvm/6/openmp.nix
new file mode 100644
index 000000000000..c1a4480a5524
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/6/openmp.nix
@@ -0,0 +1,26 @@
+{ stdenv
+, fetch
+, cmake
+, llvm
+, perl
+, version
+}:
+
+stdenv.mkDerivation {
+  pname = "openmp";
+  inherit version;
+
+  src = fetch "openmp" "0nhwfba9c351r16zgyjyfwdayr98nairky3c2f0b2lc360mwmbv6";
+
+  nativeBuildInputs = [ cmake perl ];
+  buildInputs = [ llvm ];
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "Components required to build an executable OpenMP program";
+    homepage    = "https://openmp.llvm.org/";
+    license     = stdenv.lib.licenses.mit;
+    platforms   = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/6/sanitizers-nongnu.patch b/nixpkgs/pkgs/development/compilers/llvm/6/sanitizers-nongnu.patch
new file mode 100644
index 000000000000..6266eb1958d1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/6/sanitizers-nongnu.patch
@@ -0,0 +1,413 @@
+From 7b4b3333a2718628b1d510ec1d8438ad67308299 Mon Sep 17 00:00:00 2001
+From: Will Dietz <w@wdtz.org>
+Date: Fri, 29 Jun 2018 09:48:59 -0500
+Subject: [PATCH] Ported to 6.0, taken from gentoo-musl project.
+
+------
+Ported to compiler-rt-sanitizers-5.0.0. Taken from
+
+https://gist.githubusercontent.com/pwaller/2337f3290f12634cad3e3730cff0a6c1/raw/83c87a8585e2f9662494db5662e5361beb093c26/nongnu.patch
+Signed-off-by: Jory A. Pratt <anarchy@gentoo.org>
+
+Taken from gentoo-musl project, with a few additional minor fixes.
+---
+ lib/asan/asan_linux.cc                        |  4 +-
+ lib/interception/interception_linux.cc        |  2 +-
+ lib/interception/interception_linux.h         |  3 +-
+ lib/msan/msan_linux.cc                        |  2 +-
+ lib/sanitizer_common/sanitizer_allocator.cc   |  2 +-
+ .../sanitizer_common_interceptors_ioctl.inc   |  4 +-
+ .../sanitizer_common_syscalls.inc             |  2 +-
+ lib/sanitizer_common/sanitizer_linux.cc       |  8 +++-
+ .../sanitizer_linux_libcdep.cc                | 10 ++---
+ lib/sanitizer_common/sanitizer_platform.h     |  6 +++
+ .../sanitizer_platform_interceptors.h         |  4 +-
+ .../sanitizer_platform_limits_posix.cc        | 37 +++++++++++--------
+ lib/tsan/rtl/tsan_platform_linux.cc           |  2 +-
+ 13 files changed, 51 insertions(+), 35 deletions(-)
+
+diff --git a/lib/asan/asan_linux.cc b/lib/asan/asan_linux.cc
+index 625f32d40..73cf77aca 100644
+--- a/lib/asan/asan_linux.cc
++++ b/lib/asan/asan_linux.cc
+@@ -46,7 +46,7 @@
+ #include <link.h>
+ #endif
+ 
+-#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS
++#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS || SANITIZER_NONGNU
+ #include <ucontext.h>
+ extern "C" void* _DYNAMIC;
+ #elif SANITIZER_NETBSD
+@@ -139,7 +139,7 @@ void AsanApplyToGlobals(globals_op_fptr op, const void *needle) {
+   UNIMPLEMENTED();
+ }
+ 
+-#if SANITIZER_ANDROID
++#if SANITIZER_ANDROID || SANITIZER_NONGNU
+ // FIXME: should we do anything for Android?
+ void AsanCheckDynamicRTPrereqs() {}
+ void AsanCheckIncompatibleRT() {}
+diff --git a/lib/interception/interception_linux.cc b/lib/interception/interception_linux.cc
+index c991550a4..2b706418b 100644
+--- a/lib/interception/interception_linux.cc
++++ b/lib/interception/interception_linux.cc
+@@ -43,7 +43,7 @@ bool GetRealFunctionAddress(const char *func_name, uptr *func_addr,
+ }
+ 
+ // Android and Solaris do not have dlvsym
+-#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS
++#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_NONGNU
+ void *GetFuncAddrVer(const char *func_name, const char *ver) {
+   return dlvsym(RTLD_NEXT, func_name, ver);
+ }
+diff --git a/lib/interception/interception_linux.h b/lib/interception/interception_linux.h
+index 98fe51b85..c13302b98 100644
+--- a/lib/interception/interception_linux.h
++++ b/lib/interception/interception_linux.h
+@@ -35,8 +35,7 @@ void *GetFuncAddrVer(const char *func_name, const char *ver);
+       (::__interception::uptr) & (func),                                   \
+       (::__interception::uptr) & WRAP(func))
+ 
+-// Android and Solaris do not have dlvsym
+-#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS
++#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_NONGNU
+ #define INTERCEPT_FUNCTION_VER_LINUX_OR_FREEBSD(func, symver) \
+   (::__interception::real_##func = (func##_f)(                \
+        unsigned long)::__interception::GetFuncAddrVer(#func, symver))
+diff --git a/lib/msan/msan_linux.cc b/lib/msan/msan_linux.cc
+index 4e6321fcb..4d50feb82 100644
+--- a/lib/msan/msan_linux.cc
++++ b/lib/msan/msan_linux.cc
+@@ -13,7 +13,7 @@
+ //===----------------------------------------------------------------------===//
+ 
+ #include "sanitizer_common/sanitizer_platform.h"
+-#if SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD
++#if SANITIZER_FREEBSD || (SANITIZER_LINUX && !SANITIZER_NONGNU) || SANITIZER_NETBSD
+ 
+ #include "msan.h"
+ #include "msan_thread.h"
+diff --git a/lib/sanitizer_common/sanitizer_allocator.cc b/lib/sanitizer_common/sanitizer_allocator.cc
+index fc4f7a75a..76cf4f769 100644
+--- a/lib/sanitizer_common/sanitizer_allocator.cc
++++ b/lib/sanitizer_common/sanitizer_allocator.cc
+@@ -23,7 +23,7 @@ namespace __sanitizer {
+ 
+ // ThreadSanitizer for Go uses libc malloc/free.
+ #if SANITIZER_GO || defined(SANITIZER_USE_MALLOC)
+-# if SANITIZER_LINUX && !SANITIZER_ANDROID
++# if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ extern "C" void *__libc_malloc(uptr size);
+ #  if !SANITIZER_GO
+ extern "C" void *__libc_memalign(uptr alignment, uptr size);
+diff --git a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
+index 24e7548a5..20259b1d6 100644
+--- a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
++++ b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
+@@ -102,7 +102,7 @@ static void ioctl_table_fill() {
+   _(SIOCGETVIFCNT, WRITE, struct_sioc_vif_req_sz);
+ #endif
+ 
+-#if SANITIZER_LINUX
++#if SANITIZER_LINUX && !SANITIZER_NONGNU
+   // Conflicting request ids.
+   // _(CDROMAUDIOBUFSIZ, NONE, 0);
+   // _(SNDCTL_TMR_CONTINUE, NONE, 0);
+@@ -363,7 +363,7 @@ static void ioctl_table_fill() {
+   _(VT_WAITACTIVE, NONE, 0);
+ #endif
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE
+   _(CYGETDEFTHRESH, WRITE, sizeof(int));
+   _(CYGETDEFTIMEOUT, WRITE, sizeof(int));
+diff --git a/lib/sanitizer_common/sanitizer_common_syscalls.inc b/lib/sanitizer_common/sanitizer_common_syscalls.inc
+index 469c8eb7e..24f87867d 100644
+--- a/lib/sanitizer_common/sanitizer_common_syscalls.inc
++++ b/lib/sanitizer_common/sanitizer_common_syscalls.inc
+@@ -2038,7 +2038,7 @@ POST_SYSCALL(setrlimit)(long res, long resource, void *rlim) {
+   }
+ }
+ 
+-#if !SANITIZER_ANDROID
++#if !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ PRE_SYSCALL(prlimit64)(long pid, long resource, const void *new_rlim,
+                        void *old_rlim) {
+   if (new_rlim) PRE_READ(new_rlim, struct_rlimit64_sz);
+diff --git a/lib/sanitizer_common/sanitizer_linux.cc b/lib/sanitizer_common/sanitizer_linux.cc
+index 6c83e8db4..542c4fe64 100644
+--- a/lib/sanitizer_common/sanitizer_linux.cc
++++ b/lib/sanitizer_common/sanitizer_linux.cc
+@@ -522,13 +522,13 @@ const char *GetEnv(const char *name) {
+ #endif
+ }
+ 
+-#if !SANITIZER_FREEBSD && !SANITIZER_NETBSD
++#if !SANITIZER_FREEBSD && !SANITIZER_NETBSD && !SANITIZER_NONGNU
+ extern "C" {
+   SANITIZER_WEAK_ATTRIBUTE extern void *__libc_stack_end;
+ }
+ #endif
+ 
+-#if !SANITIZER_GO && !SANITIZER_FREEBSD && !SANITIZER_NETBSD
++#if (!SANITIZER_GO || SANITIZER_NONGNU) && !SANITIZER_FREEBSD && !SANITIZER_NETBSD
+ static void ReadNullSepFileToArray(const char *path, char ***arr,
+                                    int arr_size) {
+   char *buff;
+@@ -569,6 +569,10 @@ static void GetArgsAndEnv(char ***argv, char ***envp) {
+ #elif SANITIZER_NETBSD
+   *argv = __ps_strings->ps_argvstr;
+   *argv = __ps_strings->ps_envstr;
++#elif SANITIZER_NONGNU
++    static const int kMaxArgv = 2000, kMaxEnvp = 2000;
++    ReadNullSepFileToArray("/proc/self/cmdline", argv, kMaxArgv);
++    ReadNullSepFileToArray("/proc/self/environ", envp, kMaxEnvp);
+ #else
+ #if !SANITIZER_GO
+   if (&__libc_stack_end) {
+diff --git a/lib/sanitizer_common/sanitizer_linux_libcdep.cc b/lib/sanitizer_common/sanitizer_linux_libcdep.cc
+index 56fdfc870..a932d5db1 100644
+--- a/lib/sanitizer_common/sanitizer_linux_libcdep.cc
++++ b/lib/sanitizer_common/sanitizer_linux_libcdep.cc
+@@ -174,7 +174,7 @@ bool SanitizerGetThreadName(char *name, int max_len) {
+ }
+ 
+ #if !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO && \
+-    !SANITIZER_NETBSD && !SANITIZER_SOLARIS
++    !SANITIZER_NETBSD && !SANITIZER_SOLARIS && !SANITIZER_NONGNU
+ static uptr g_tls_size;
+ 
+ #ifdef __i386__
+@@ -207,7 +207,7 @@ void InitTlsSize() { }
+ 
+ #if (defined(__x86_64__) || defined(__i386__) || defined(__mips__) \
+     || defined(__aarch64__) || defined(__powerpc64__) || defined(__s390__) \
+-    || defined(__arm__)) && SANITIZER_LINUX && !SANITIZER_ANDROID
++    || defined(__arm__)) && SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ // sizeof(struct pthread) from glibc.
+ static atomic_uintptr_t kThreadDescriptorSize;
+ 
+@@ -391,7 +391,7 @@ int GetSizeFromHdr(struct dl_phdr_info *info, size_t size, void *data) {
+ 
+ #if !SANITIZER_GO
+ static void GetTls(uptr *addr, uptr *size) {
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ # if defined(__x86_64__) || defined(__i386__) || defined(__s390__)
+   *addr = ThreadSelf();
+   *size = GetTlsSize();
+@@ -432,7 +432,7 @@ static void GetTls(uptr *addr, uptr *size) {
+       *addr = (uptr)tcb->tcb_dtv[1];
+     }
+   }
+-#elif SANITIZER_ANDROID
++#elif SANITIZER_ANDROID || SANITIZER_NONGNU
+   *addr = 0;
+   *size = 0;
+ #elif SANITIZER_SOLARIS
+@@ -448,7 +448,7 @@ static void GetTls(uptr *addr, uptr *size) {
+ #if !SANITIZER_GO
+ uptr GetTlsSize() {
+ #if SANITIZER_FREEBSD || SANITIZER_ANDROID || SANITIZER_NETBSD || \
+-    SANITIZER_SOLARIS
++    SANITIZER_SOLARIS || SANITIZER_NONGNU
+   uptr addr, size;
+   GetTls(&addr, &size);
+   return size;
+diff --git a/lib/sanitizer_common/sanitizer_platform.h b/lib/sanitizer_common/sanitizer_platform.h
+index 334903c26..fc2afac2c 100644
+--- a/lib/sanitizer_common/sanitizer_platform.h
++++ b/lib/sanitizer_common/sanitizer_platform.h
+@@ -195,6 +195,12 @@
+ # define SANITIZER_SOLARIS32 0
+ #endif
+ 
++#if defined(__linux__) && !defined(__GLIBC__)
++# define SANITIZER_NONGNU 1
++#else
++# define SANITIZER_NONGNU 0
++#endif
++
+ // By default we allow to use SizeClassAllocator64 on 64-bit platform.
+ // But in some cases (e.g. AArch64's 39-bit address space) SizeClassAllocator64
+ // does not work well and we need to fallback to SizeClassAllocator32.
+diff --git a/lib/sanitizer_common/sanitizer_platform_interceptors.h b/lib/sanitizer_common/sanitizer_platform_interceptors.h
+index b99ac4480..628d226a1 100644
+--- a/lib/sanitizer_common/sanitizer_platform_interceptors.h
++++ b/lib/sanitizer_common/sanitizer_platform_interceptors.h
+@@ -38,7 +38,7 @@
+ # include "sanitizer_platform_limits_solaris.h"
+ #endif
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ # define SI_LINUX_NOT_ANDROID 1
+ #else
+ # define SI_LINUX_NOT_ANDROID 0
+@@ -291,7 +291,7 @@
+   (SI_FREEBSD || SI_MAC || SI_LINUX_NOT_ANDROID)
+ #define SANITIZER_INTERCEPT_ETHER_R (SI_FREEBSD || SI_LINUX_NOT_ANDROID)
+ #define SANITIZER_INTERCEPT_SHMCTL                       \
+-  (SI_NETBSD || SI_SOLARIS || ((SI_FREEBSD || SI_LINUX_NOT_ANDROID) && \
++  (SI_NETBSD || SI_SOLARIS || ((SI_FREEBSD || SI_LINUX_NOT_ANDROID || SANITIZER_NONGNU) && \
+                  SANITIZER_WORDSIZE == 64))  // NOLINT
+ #define SANITIZER_INTERCEPT_RANDOM_R SI_LINUX_NOT_ANDROID
+ #define SANITIZER_INTERCEPT_PTHREAD_ATTR_GET SI_POSIX
+diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+index feb7bad6f..4e89ab2a6 100644
+--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+@@ -14,6 +14,9 @@
+ 
+ #include "sanitizer_platform.h"
+ 
++// Workaround musl <--> linux conflicting definition of 'struct sysinfo'
++#define _LINUX_SYSINFO_H
++
+ #if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_MAC
+ // Tests in this file assume that off_t-dependent data structures match the
+ // libc ABI. For example, struct dirent here is what readdir() function (as
+@@ -138,12 +141,14 @@ typedef struct user_fpregs elf_fpregset_t;
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+ #include <glob.h>
+-#include <obstack.h>
++#  if !SANITIZER_NONGNU
++#    include <obstack.h>
++#  endif
+ #include <mqueue.h>
+-#include <net/if_ppp.h>
+-#include <netax25/ax25.h>
+-#include <netipx/ipx.h>
+-#include <netrom/netrom.h>
++#include <linux/if_ppp.h>
++#include <linux/ax25.h>
++#include <linux/ipx.h>
++#include <linux/netrom.h>
+ #if HAVE_RPC_XDR_H
+ # include <rpc/xdr.h>
+ #elif HAVE_TIRPC_RPC_XDR_H
+@@ -251,7 +256,7 @@ namespace __sanitizer {
+   unsigned struct_itimerspec_sz = sizeof(struct itimerspec);
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   // Use pre-computed size of struct ustat to avoid <sys/ustat.h> which
+   // has been removed from glibc 2.28.
+ #if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \
+@@ -322,7 +327,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(ElfW(Phdr));
+ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+ #endif
+ 
+-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
++#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   int glob_nomatch = GLOB_NOMATCH;
+   int glob_altdirfunc = GLOB_ALTDIRFUNC;
+ #endif
+@@ -416,7 +421,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+   unsigned struct_termios_sz = sizeof(struct termios);
+   unsigned struct_winsize_sz = sizeof(struct winsize);
+ 
+-#if SANITIZER_LINUX
++#if SANITIZER_LINUX && !SANITIZER_NONGNU
+   unsigned struct_arpreq_sz = sizeof(struct arpreq);
+   unsigned struct_cdrom_msf_sz = sizeof(struct cdrom_msf);
+   unsigned struct_cdrom_multisession_sz = sizeof(struct cdrom_multisession);
+@@ -466,7 +471,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+   unsigned struct_vt_mode_sz = sizeof(struct vt_mode);
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct);
+   unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor);
+ #if EV_VERSION > (0x010000)
+@@ -834,7 +839,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+   unsigned IOCTL_VT_WAITACTIVE = VT_WAITACTIVE;
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH;
+   unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT;
+   unsigned IOCTL_CYGETMON = CYGETMON;
+@@ -989,7 +994,7 @@ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phdr);
+ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phnum);
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
++#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ CHECK_TYPE_SIZE(glob_t);
+ CHECK_SIZE_AND_OFFSET(glob_t, gl_pathc);
+ CHECK_SIZE_AND_OFFSET(glob_t, gl_pathv);
+@@ -1023,6 +1028,7 @@ CHECK_TYPE_SIZE(iovec);
+ CHECK_SIZE_AND_OFFSET(iovec, iov_base);
+ CHECK_SIZE_AND_OFFSET(iovec, iov_len);
+ 
++#if !SANITIZER_NONGNU
+ CHECK_TYPE_SIZE(msghdr);
+ CHECK_SIZE_AND_OFFSET(msghdr, msg_name);
+ CHECK_SIZE_AND_OFFSET(msghdr, msg_namelen);
+@@ -1036,6 +1042,7 @@ CHECK_TYPE_SIZE(cmsghdr);
+ CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_len);
+ CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_level);
+ CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_type);
++#endif
+ 
+ COMPILER_CHECK(sizeof(__sanitizer_dirent) <= sizeof(dirent));
+ CHECK_SIZE_AND_OFFSET(dirent, d_ino);
+@@ -1138,7 +1145,7 @@ CHECK_SIZE_AND_OFFSET(mntent, mnt_passno);
+ 
+ CHECK_TYPE_SIZE(ether_addr);
+ 
+-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
++#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ CHECK_TYPE_SIZE(ipc_perm);
+ # if SANITIZER_FREEBSD
+ CHECK_SIZE_AND_OFFSET(ipc_perm, key);
+@@ -1199,7 +1206,7 @@ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_dstaddr);
+ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_data);
+ #endif
+ 
+-#if SANITIZER_LINUX
++#if SANITIZER_LINUX && !SANITIZER_NONGNU
+ COMPILER_CHECK(sizeof(__sanitizer_mallinfo) == sizeof(struct mallinfo));
+ #endif
+ 
+@@ -1249,7 +1256,7 @@ COMPILER_CHECK(__sanitizer_XDR_DECODE == XDR_DECODE);
+ COMPILER_CHECK(__sanitizer_XDR_FREE == XDR_FREE);
+ #endif
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ COMPILER_CHECK(sizeof(__sanitizer_FILE) <= sizeof(FILE));
+ CHECK_SIZE_AND_OFFSET(FILE, _flags);
+ CHECK_SIZE_AND_OFFSET(FILE, _IO_read_ptr);
+@@ -1268,7 +1275,7 @@ CHECK_SIZE_AND_OFFSET(FILE, _chain);
+ CHECK_SIZE_AND_OFFSET(FILE, _fileno);
+ #endif
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ COMPILER_CHECK(sizeof(__sanitizer__obstack_chunk) <= sizeof(_obstack_chunk));
+ CHECK_SIZE_AND_OFFSET(_obstack_chunk, limit);
+ CHECK_SIZE_AND_OFFSET(_obstack_chunk, prev);
+diff --git a/lib/tsan/rtl/tsan_platform_linux.cc b/lib/tsan/rtl/tsan_platform_linux.cc
+index e14d5f575..389a3bc88 100644
+--- a/lib/tsan/rtl/tsan_platform_linux.cc
++++ b/lib/tsan/rtl/tsan_platform_linux.cc
+@@ -285,7 +285,7 @@ void InitializePlatform() {
+ // This is required to properly "close" the fds, because we do not see internal
+ // closes within glibc. The code is a pure hack.
+ int ExtractResolvFDs(void *state, int *fds, int nfd) {
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   int cnt = 0;
+   struct __res_state *statp = (struct __res_state*)state;
+   for (int i = 0; i < MAXNS && cnt < nfd; i++) {
+-- 
+2.18.0
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/7/bintools.nix b/nixpkgs/pkgs/development/compilers/llvm/7/bintools.nix
new file mode 100644
index 000000000000..72a2a7331930
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/7/bintools.nix
@@ -0,0 +1,19 @@
+{ runCommand, stdenv, llvm, lld, version }:
+
+let
+  prefix =
+    if stdenv.hostPlatform != stdenv.targetPlatform
+    then "${stdenv.targetPlatform.config}-"
+    else "";
+in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } ''
+   mkdir -p $out/bin
+   for prog in ${lld}/bin/*; do
+     ln -s $prog $out/bin/${prefix}$(basename $prog)
+   done
+   for prog in ${llvm}/bin/*; do
+     ln -s $prog $out/bin/${prefix}$(echo $(basename $prog) | sed -e "s|llvm-||")
+     ln -sf $prog $out/bin/${prefix}$(basename $prog)
+   done
+   rm -f $out/bin/${prefix}cat
+   ln -s ${lld}/bin/lld $out/bin/${prefix}ld
+''
diff --git a/nixpkgs/pkgs/development/compilers/llvm/7/clang/HIP-use-PATH-7.patch b/nixpkgs/pkgs/development/compilers/llvm/7/clang/HIP-use-PATH-7.patch
new file mode 100644
index 000000000000..764dddd966cb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/7/clang/HIP-use-PATH-7.patch
@@ -0,0 +1,68 @@
+From 8412cba68835f8f4cc527d02194b181faa5944d4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Holger=20W=C3=BCnsche?= <holger.o.wuensche@t-online.de>
+Date: Tue, 21 Jan 2020 19:46:09 +0100
+Subject: [PATCH] [HIP] use GetProgramPath for executable discovery
+
+This change replaces the manual building of executable paths
+using llvm::sys::path::append with GetProgramPath.
+This enables adding other paths in case executables reside
+in different directories and makes the code easier to read.
+
+Differential Revision: https://reviews.llvm.org/D72903
+---
+ clang/lib/Driver/ToolChains/HIP.cpp | 18 ++++++------------
+ 1 file changed, 6 insertions(+), 12 deletions(-)
+
+diff --git a/lib/Driver/ToolChains/HIP.cpp b/lib/Driver/ToolChains/HIP.cpp
+index 03acf45a9b3..75fd3226c75 100644
+--- a/lib/Driver/ToolChains/HIP.cpp
++++ b/lib/Driver/ToolChains/HIP.cpp
+@@ -98,9 +98,8 @@ const char *AMDGCN::Linker::constructLLVMLinkCommand(
+   const char *OutputFileName =
+       C.addTempFile(C.getArgs().MakeArgString(TmpName));
+   CmdArgs.push_back(OutputFileName);
+-  SmallString<128> ExecPath(C.getDriver().Dir);
+-  llvm::sys::path::append(ExecPath, "llvm-link");
+-  const char *Exec = Args.MakeArgString(ExecPath);
++  const char *Exec =
++      Args.MakeArgString(getToolChain().GetProgramPath("llvm-link"));
+   C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+   return OutputFileName;
+ }
+@@ -141,9 +140,8 @@ const char *AMDGCN::Linker::constructOptCommand(
+   const char *OutputFileName =
+       C.addTempFile(C.getArgs().MakeArgString(TmpFileName));
+   OptArgs.push_back(OutputFileName);
+-  SmallString<128> OptPath(C.getDriver().Dir);
+-  llvm::sys::path::append(OptPath, "opt");
+-  const char *OptExec = Args.MakeArgString(OptPath);
++  const char *OptExec =
++      Args.MakeArgString(getToolChain().GetProgramPath("opt"));
+   C.addCommand(llvm::make_unique<Command>(JA, *this, OptExec, OptArgs, Inputs));
+   return OutputFileName;
+ }
+@@ -161,9 +159,7 @@ const char *AMDGCN::Linker::constructLlcCommand(
+   const char *LlcOutputFile =
+       C.addTempFile(C.getArgs().MakeArgString(LlcOutputFileName));
+   LlcArgs.push_back(LlcOutputFile);
+-  SmallString<128> LlcPath(C.getDriver().Dir);
+-  llvm::sys::path::append(LlcPath, "llc");
+-  const char *Llc = Args.MakeArgString(LlcPath);
++  const char *Llc = Args.MakeArgString(getToolChain().GetProgramPath("llc"));
+   C.addCommand(llvm::make_unique<Command>(JA, *this, Llc, LlcArgs, Inputs));
+   return LlcOutputFile;
+ }
+@@ -178,9 +174,7 @@ void AMDGCN::Linker::constructLldCommand(Compilation &C, const JobAction &JA,
+   ArgStringList LldArgs{"-flavor",    "gnu", "--no-undefined",
+                         "-shared",    "-o",  Output.getFilename(),
+                         InputFileName};
+-  SmallString<128> LldPath(C.getDriver().Dir);
+-  llvm::sys::path::append(LldPath, "lld");
+-  const char *Lld = Args.MakeArgString(LldPath);
++  const char *Lld = Args.MakeArgString(getToolChain().GetProgramPath("lld"));
+   C.addCommand(llvm::make_unique<Command>(JA, *this, Lld, LldArgs, Inputs));
+ }
+ 
+-- 
+2.23.1
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/7/clang/default.nix b/nixpkgs/pkgs/development/compilers/llvm/7/clang/default.nix
new file mode 100644
index 000000000000..18ea46ea39c4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/7/clang/default.nix
@@ -0,0 +1,119 @@
+{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python3, lld
+, fixDarwinDylibNames
+, enableManpages ? false
+, enablePolly ? false # TODO: get this info from llvm (passthru?)
+}:
+
+let
+  self = stdenv.mkDerivation ({
+    pname = "clang";
+    inherit version;
+
+    src = fetch "cfe" "0vc4i87qwxnw9lci4ayws9spakg0z6w5w670snj9f8g5m9rc8zg9";
+
+    unpackPhase = ''
+      unpackFile $src
+      mv cfe-${version}* clang
+      sourceRoot=$PWD/clang
+      unpackFile ${clang-tools-extra_src}
+      mv clang-tools-extra-* $sourceRoot/tools/extra
+    '';
+
+    nativeBuildInputs = [ cmake python3 ]
+      ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx;
+
+    buildInputs = [ libxml2 llvm lld ]
+      ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+    cmakeFlags = [
+      "-DCMAKE_CXX_FLAGS=-std=c++11"
+    ] ++ stdenv.lib.optionals enableManpages [
+      "-DCLANG_INCLUDE_DOCS=ON"
+      "-DLLVM_ENABLE_SPHINX=ON"
+      "-DSPHINX_OUTPUT_MAN=ON"
+      "-DSPHINX_OUTPUT_HTML=OFF"
+      "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+    ] ++ stdenv.lib.optionals enablePolly [
+      "-DWITH_POLLY=ON"
+      "-DLINK_POLLY_INTO_TOOLS=ON"
+    ];
+
+    patches = [
+      ./purity.patch
+      # make clang -xhip use $PATH to find executables
+      ./HIP-use-PATH-7.patch
+    ];
+
+    postPatch = ''
+      sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' \
+             -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' \
+             lib/Driver/ToolChains/*.cpp
+
+      # Patch for standalone doc building
+      sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt
+    '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
+      sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
+    '' + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
+      substituteInPlace tools/extra/clangd/CMakeLists.txt \
+        --replace "NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB" FALSE
+    '';
+
+    outputs = [ "out" "lib" "python" ];
+
+    # Clang expects to find LLVMgold in its own prefix
+    postInstall = ''
+      if [ -e ${llvm}/lib/LLVMgold.so ]; then
+        ln -sv ${llvm}/lib/LLVMgold.so $out/lib
+      fi
+
+      ln -sv $out/bin/clang $out/bin/cpp
+
+      # Move libclang to 'lib' output
+      moveToOutput "lib/libclang.*" "$lib"
+      substituteInPlace $out/lib/cmake/clang/ClangTargets-release.cmake \
+          --replace "\''${_IMPORT_PREFIX}/lib/libclang." "$lib/lib/libclang."
+
+      mkdir -p $python/bin $python/share/clang/
+      mv $out/bin/{git-clang-format,scan-view} $python/bin
+      if [ -e $out/bin/set-xcode-analyzer ]; then
+        mv $out/bin/set-xcode-analyzer $python/bin
+      fi
+      mv $out/share/clang/*.py $python/share/clang
+      rm $out/bin/c-index-test
+    '';
+
+    enableParallelBuilding = true;
+
+    passthru = {
+      isClang = true;
+      inherit llvm;
+    } // stdenv.lib.optionalAttrs (stdenv.targetPlatform.isLinux || (stdenv.cc.isGNU && stdenv.cc.cc ? gcc)) {
+      gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
+    };
+
+    meta = {
+      description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
+      homepage    = "https://llvm.org/";
+      license     = stdenv.lib.licenses.ncsa;
+      platforms   = stdenv.lib.platforms.all;
+    };
+  } // stdenv.lib.optionalAttrs enableManpages {
+    pname = "clang-manpages";
+
+    buildPhase = ''
+      make docs-clang-man
+    '';
+
+    installPhase = ''
+      mkdir -p $out/share/man/man1
+      # Manually install clang manpage
+      cp docs/man/*.1 $out/share/man/man1/
+    '';
+
+    outputs = [ "out" ];
+
+    doCheck = false;
+
+    meta.description = "man page for Clang ${version}";
+  });
+in self
diff --git a/nixpkgs/pkgs/development/compilers/llvm/7/clang/purity.patch b/nixpkgs/pkgs/development/compilers/llvm/7/clang/purity.patch
new file mode 100644
index 000000000000..b30d0d0b5d5b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/7/clang/purity.patch
@@ -0,0 +1,30 @@
+From 4add81bba40dcec62c4ea4481be8e35ac53e89d8 Mon Sep 17 00:00:00 2001
+From: Will Dietz <w@wdtz.org>
+Date: Thu, 18 May 2017 11:56:12 -0500
+Subject: [PATCH] "purity" patch for 5.0
+
+---
+ lib/Driver/ToolChains/Gnu.cpp | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
+index fe3c0191bb..c6a482bece 100644
+--- a/lib/Driver/ToolChains/Gnu.cpp
++++ b/lib/Driver/ToolChains/Gnu.cpp
+@@ -494,13 +494,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
+   if (!Args.hasArg(options::OPT_static)) {
+     if (Args.hasArg(options::OPT_rdynamic))
+       CmdArgs.push_back("-export-dynamic");
+-
+-    if (!Args.hasArg(options::OPT_shared)) {
+-      const std::string Loader =
+-          D.DyldPrefix + ToolChain.getDynamicLinker(Args);
+-      CmdArgs.push_back("-dynamic-linker");
+-      CmdArgs.push_back(Args.MakeArgString(Loader));
+-    }
+   }
+ 
+   CmdArgs.push_back("-o");
+-- 
+2.11.0
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/7/compiler-rt-armv7l.patch b/nixpkgs/pkgs/development/compilers/llvm/7/compiler-rt-armv7l.patch
new file mode 100644
index 000000000000..89d7f1aec918
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/7/compiler-rt-armv7l.patch
@@ -0,0 +1,38 @@
+diff -ur compiler-rt-7.1.0.src/cmake/builtin-config-ix.cmake compiler-rt-7.1.0.src-patched/cmake/builtin-config-ix.cmake
+--- compiler-rt-7.1.0.src/cmake/builtin-config-ix.cmake	2018-05-25 06:36:27.000000000 +0900
++++ compiler-rt-7.1.0.src-patched/cmake/builtin-config-ix.cmake	2020-05-09 20:26:33.030608692 +0900
+@@ -24,7 +24,7 @@
+ 
+ 
+ set(ARM64 aarch64)
+-set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k)
++set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k armv7l)
+ set(HEXAGON hexagon)
+ set(X86 i386)
+ set(X86_64 x86_64)
+diff -ur compiler-rt-7.1.0.src/lib/builtins/CMakeLists.txt compiler-rt-7.1.0.src-patched/lib/builtins/CMakeLists.txt
+--- compiler-rt-7.1.0.src/lib/builtins/CMakeLists.txt	2018-07-31 03:18:59.000000000 +0900
++++ compiler-rt-7.1.0.src-patched/lib/builtins/CMakeLists.txt	2020-05-09 20:27:38.893409318 +0900
+@@ -453,6 +453,7 @@
+ set(armv7_SOURCES ${arm_SOURCES})
+ set(armv7s_SOURCES ${arm_SOURCES})
+ set(armv7k_SOURCES ${arm_SOURCES})
++set(armv7l_SOURCES ${arm_SOURCES})
+ set(arm64_SOURCES ${aarch64_SOURCES})
+ 
+ # macho_embedded archs
+@@ -563,12 +564,12 @@
+       set(_arch ${arch})
+       if("${arch}" STREQUAL "armv6m")
+         set(_arch "arm|armv6m")
+-      elseif("${arch}" MATCHES "^(armhf|armv7|armv7s|armv7k|armv7m|armv7em)$")
++      elseif("${arch}" MATCHES "^(armhf|armv7|armv7s|armv7k|armv7l|armv7m|armv7em)$")
+         set(_arch "arm")
+       endif()
+ 
+       # For ARM archs, exclude any VFP builtins if VFP is not supported
+-      if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7m|armv7em)$")
++      if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7l|armv7m|armv7em)$")
+         string(REPLACE ";" " " _TARGET_${arch}_CFLAGS "${TARGET_${arch}_CFLAGS}")
+         check_compile_definition(__VFP_FP__ "${CMAKE_C_FLAGS} ${_TARGET_${arch}_CFLAGS}" COMPILER_RT_HAS_${arch}_VFP)
+         if(NOT COMPILER_RT_HAS_${arch}_VFP)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/7/compiler-rt-codesign.patch b/nixpkgs/pkgs/development/compilers/llvm/7/compiler-rt-codesign.patch
new file mode 100644
index 000000000000..3cc12b94b200
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/7/compiler-rt-codesign.patch
@@ -0,0 +1,33 @@
+From 3dec5f3475a26aeb4678627795c4b67c6b7b4785 Mon Sep 17 00:00:00 2001
+From: Will Dietz <w@wdtz.org>
+Date: Tue, 19 Sep 2017 13:13:06 -0500
+Subject: [PATCH] remove codesign use on Apple, disable ios sim testing that
+ needs it
+
+---
+ cmake/Modules/AddCompilerRT.cmake |  8 ------
+ test/asan/CMakeLists.txt          | 52 ---------------------------------------
+ test/tsan/CMakeLists.txt          | 47 -----------------------------------
+ 3 files changed, 107 deletions(-)
+
+diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
+index bc5fb9ff7..b64eb4246 100644
+--- a/cmake/Modules/AddCompilerRT.cmake
++++ b/cmake/Modules/AddCompilerRT.cmake
+@@ -210,14 +210,6 @@ function(add_compiler_rt_runtime name type)
+         set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "")
+         set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib")
+       endif()
+-      if(APPLE)
+-        # Ad-hoc sign the dylibs
+-        add_custom_command(TARGET ${libname}
+-          POST_BUILD  
+-          COMMAND codesign --sign - $<TARGET_FILE:${libname}>
+-          WORKING_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR}
+-        )
+-      endif()
+     endif()
+     install(TARGETS ${libname}
+       ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}
+2.14.1
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/7/compiler-rt.nix b/nixpkgs/pkgs/development/compilers/llvm/7/compiler-rt.nix
new file mode 100644
index 000000000000..84ca6af3b36d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/7/compiler-rt.nix
@@ -0,0 +1,85 @@
+{ stdenv, version, fetch, cmake, python3, llvm, libcxxabi }:
+
+let
+
+  useLLVM = stdenv.hostPlatform.useLLVM or false;
+  bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
+  inherit (stdenv.hostPlatform) isMusl;
+
+in
+
+stdenv.mkDerivation {
+  pname = "compiler-rt";
+  inherit version;
+  src = fetch "compiler-rt" "1n48p8gjarihkws0i2bay5w9bdwyxyxxbpwyng7ba58jb30dlyq5";
+
+  nativeBuildInputs = [ cmake python3 llvm ];
+  buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
+
+  NIX_CFLAGS_COMPILE = [
+    "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0"
+  ];
+
+  cmakeFlags = [
+    "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
+    "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
+    "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
+  ] ++ stdenv.lib.optionals (useLLVM || bareMetal || isMusl) [
+    "-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
+    "-DCOMPILER_RT_BUILD_XRAY=OFF"
+    "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
+    "-DCOMPILER_RT_BUILD_PROFILE=OFF"
+  ] ++ stdenv.lib.optionals (useLLVM || bareMetal) [
+    "-DCMAKE_C_COMPILER_WORKS=ON"
+    "-DCMAKE_CXX_COMPILER_WORKS=ON"
+    "-DCOMPILER_RT_BAREMETAL_BUILD=ON"
+    "-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
+  ] ++ stdenv.lib.optionals (useLLVM) [
+    "-DCOMPILER_RT_BUILD_BUILTINS=ON"
+    "-DCMAKE_C_FLAGS=-nodefaultlibs"
+    #https://stackoverflow.com/questions/53633705/cmake-the-c-compiler-is-not-able-to-compile-a-simple-test-program
+    "-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
+  ] ++ stdenv.lib.optionals (bareMetal) [
+    "-DCOMPILER_RT_OS_DIR=baremetal"
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    ./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
+  ] ++ stdenv.lib.optional (useLLVM) ./crtbegin-and-end.patch
+    ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
+    ++ stdenv.lib.optional stdenv.hostPlatform.isAarch32 ./compiler-rt-armv7l.patch;
+
+  # TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
+  # to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra
+  # can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd
+  # get no binary cache for the entire platform. If you really find yourself wanting the TSAN, make this controllable by
+  # a flag and turn the flag off during the stdenv build.
+  postPatch = stdenv.lib.optionalString (!stdenv.isDarwin) ''
+    substituteInPlace cmake/builtin-config-ix.cmake \
+      --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)'
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    substituteInPlace cmake/config-ix.cmake \
+      --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
+  '' + stdenv.lib.optionalString (useLLVM) ''
+    substituteInPlace lib/builtins/int_util.c \
+      --replace "#include <stdlib.h>" ""
+    substituteInPlace lib/builtins/clear_cache.c \
+      --replace "#include <assert.h>" ""
+    substituteInPlace lib/builtins/cpu_model.c \
+      --replace "#include <assert.h>" ""
+  '';
+
+  # Hack around weird upsream RPATH bug
+  postInstall = stdenv.lib.optionalString (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isWasm) ''
+    ln -s "$out/lib"/*/* "$out/lib"
+  '' + stdenv.lib.optionalString (useLLVM) ''
+    ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/linux/crtbegin.o
+    ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/linux/crtend.o
+    ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/linux/crtbeginS.o
+    ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/linux/crtendS.o
+  '';
+
+  enableParallelBuilding = true;
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/7/crtbegin-and-end.patch b/nixpkgs/pkgs/development/compilers/llvm/7/crtbegin-and-end.patch
new file mode 100644
index 000000000000..e63be181f95c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/7/crtbegin-and-end.patch
@@ -0,0 +1,595 @@
+Get crtbegin and crtend without compiler GCC! PR is at https://reviews.llvm.org/D28791
+
+Index: compiler-rt/CMakeLists.txt
+===================================================================
+--- compiler-rt/CMakeLists.txt
++++ compiler-rt/CMakeLists.txt
+@@ -29,6 +29,8 @@
+ 
+ option(COMPILER_RT_BUILD_BUILTINS "Build builtins" ON)
+ mark_as_advanced(COMPILER_RT_BUILD_BUILTINS)
++option(COMPILER_RT_BUILD_CRT "Build crtbegin.o/crtend.o" ON)
++mark_as_advanced(COMPILER_RT_BUILD_CRT)
+ option(COMPILER_RT_BUILD_SANITIZERS "Build sanitizers" ON)
+ mark_as_advanced(COMPILER_RT_BUILD_SANITIZERS)
+ option(COMPILER_RT_BUILD_XRAY "Build xray" ON)
+Index: compiler-rt/cmake/Modules/AddCompilerRT.cmake
+===================================================================
+--- compiler-rt/cmake/Modules/AddCompilerRT.cmake
++++ compiler-rt/cmake/Modules/AddCompilerRT.cmake
+@@ -132,7 +132,7 @@
+ # Adds static or shared runtime for a list of architectures and operating
+ # systems and puts it in the proper directory in the build and install trees.
+ # add_compiler_rt_runtime(<name>
+-#                         {STATIC|SHARED}
++#                         {OBJECT|STATIC|SHARED}
+ #                         ARCHS <architectures>
+ #                         OS <os list>
+ #                         SOURCES <source files>
+@@ -144,8 +144,8 @@
+ #                         PARENT_TARGET <convenience parent target>
+ #                         ADDITIONAL_HEADERS <header files>)
+ function(add_compiler_rt_runtime name type)
+-  if(NOT type MATCHES "^(STATIC|SHARED)$")
+-    message(FATAL_ERROR "type argument must be STATIC or SHARED")
++  if(NOT type MATCHES "^(OBJECT|STATIC|SHARED)$")
++    message(FATAL_ERROR "type argument must be OBJECT, STATIC or SHARED")
+     return()
+   endif()
+   cmake_parse_arguments(LIB
+@@ -204,7 +204,10 @@
+         message(FATAL_ERROR "Architecture ${arch} can't be targeted")
+         return()
+       endif()
+-      if(type STREQUAL "STATIC")
++      if(type STREQUAL "OBJECT")
++        set(libname "${name}-${arch}")
++        set(output_name_${libname} ${libname}${COMPILER_RT_OS_SUFFIX})
++      elseif(type STREQUAL "STATIC")
+         set(libname "${name}-${arch}")
+         set_output_name(output_name_${libname} ${name} ${arch})
+       else()
+@@ -270,12 +273,34 @@
+       set(COMPONENT_OPTION COMPONENT ${libname})
+     endif()
+ 
+-    add_library(${libname} ${type} ${sources_${libname}})
+-    set_target_compile_flags(${libname} ${extra_cflags_${libname}})
+-    set_target_link_flags(${libname} ${extra_link_flags_${libname}})
+-    set_property(TARGET ${libname} APPEND PROPERTY
+-                COMPILE_DEFINITIONS ${LIB_DEFS})
+-    set_target_output_directories(${libname} ${output_dir_${libname}})
++    if(type STREQUAL "OBJECT")
++      string(TOUPPER ${CMAKE_BUILD_TYPE} config)
++      get_property(cflags SOURCE ${sources_${libname}} PROPERTY COMPILE_FLAGS)
++      separate_arguments(cflags)
++      add_custom_command(
++          OUTPUT ${output_dir_${libname}}/${libname}.o
++          COMMAND ${CMAKE_C_COMPILER} ${sources_${libname}} ${cflags} ${extra_cflags_${libname}} -c -o ${output_dir_${libname}}/${libname}.o
++          DEPENDS ${sources_${libname}}
++          COMMENT "Building C object ${libname}.o")
++      add_custom_target(${libname} DEPENDS ${output_dir_${libname}}/${libname}.o)
++      install(FILES ${output_dir_${libname}}/${libname}.o
++        DESTINATION ${install_dir_${libname}}
++        ${COMPONENT_OPTION})
++    else()
++      add_library(${libname} ${type} ${sources_${libname}})
++      set_target_compile_flags(${libname} ${extra_cflags_${libname}})
++      set_target_link_flags(${libname} ${extra_link_flags_${libname}})
++      set_property(TARGET ${libname} APPEND PROPERTY
++                   COMPILE_DEFINITIONS ${LIB_DEFS})
++      set_target_output_directories(${libname} ${output_dir_${libname}})
++      install(TARGETS ${libname}
++        ARCHIVE DESTINATION ${install_dir_${libname}}
++                ${COMPONENT_OPTION}
++        LIBRARY DESTINATION ${install_dir_${libname}}
++                ${COMPONENT_OPTION}
++        RUNTIME DESTINATION ${install_dir_${libname}}
++                ${COMPONENT_OPTION})
++    endif()
+     set_target_properties(${libname} PROPERTIES
+         OUTPUT_NAME ${output_name_${libname}})
+     set_target_properties(${libname} PROPERTIES FOLDER "Compiler-RT Runtime")
+@@ -299,13 +324,6 @@
+         )
+       endif()
+     endif()
+-    install(TARGETS ${libname}
+-      ARCHIVE DESTINATION ${install_dir_${libname}}
+-              ${COMPONENT_OPTION}
+-      LIBRARY DESTINATION ${install_dir_${libname}}
+-              ${COMPONENT_OPTION}
+-      RUNTIME DESTINATION ${install_dir_${libname}}
+-              ${COMPONENT_OPTION})
+ 
+     # We only want to generate per-library install targets if you aren't using
+     # an IDE because the extra targets get cluttered in IDEs.
+Index: compiler-rt/cmake/config-ix.cmake
+===================================================================
+--- compiler-rt/cmake/config-ix.cmake
++++ compiler-rt/cmake/config-ix.cmake
+@@ -227,6 +227,7 @@
+     ${ARM32} ${ARM64} ${MIPS32} ${MIPS64} ${S390X})
+ set(ALL_ASAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64}
+     ${MIPS32} ${MIPS64} ${PPC64} ${S390X})
++set(ALL_CRT_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64})
+ set(ALL_DFSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64})
+ set(ALL_FUZZER_SUPPORTED_ARCH ${X86_64} ${ARM64})
+ 
+@@ -474,6 +475,7 @@
+     SANITIZER_COMMON_SUPPORTED_ARCH)
+ 
+ else()
++  filter_available_targets(CRT_SUPPORTED_ARCH ${ALL_CRT_SUPPORTED_ARCH})
+   # Architectures supported by compiler-rt libraries.
+   filter_available_targets(SANITIZER_COMMON_SUPPORTED_ARCH
+     ${ALL_SANITIZER_COMMON_SUPPORTED_ARCH})
+@@ -563,6 +565,12 @@
+ 
+ # TODO: Add builtins support.
+ 
++if (CRT_SUPPORTED_ARCH AND OS_NAME MATCHES "Linux")
++  set(COMPILER_RT_HAS_CRT TRUE)
++else()
++  set(COMPILER_RT_HAS_CRT FALSE)
++endif()
++
+ if (COMPILER_RT_HAS_SANITIZER_COMMON AND DFSAN_SUPPORTED_ARCH AND
+     OS_NAME MATCHES "Linux")
+   set(COMPILER_RT_HAS_DFSAN TRUE)
+Index: compiler-rt/lib/CMakeLists.txt
+===================================================================
+--- compiler-rt/lib/CMakeLists.txt
++++ compiler-rt/lib/CMakeLists.txt
+@@ -17,6 +17,10 @@
+   add_subdirectory(builtins)
+ endif()
+ 
++if(COMPILER_RT_BUILD_CRT)
++  add_subdirectory(crt)
++endif()
++
+ function(compiler_rt_build_runtime runtime)
+   string(TOUPPER ${runtime} runtime_uppercase)
+   if(COMPILER_RT_HAS_${runtime_uppercase})
+Index: compiler-rt/lib/crt/CMakeLists.txt
+===================================================================
+--- /dev/null
++++ compiler-rt/lib/crt/CMakeLists.txt
+@@ -0,0 +1,102 @@
++add_compiler_rt_component(crt)
++
++function(check_cxx_section_exists section output)
++  cmake_parse_arguments(ARG "" "" "SOURCE;FLAGS" ${ARGN})
++  if(NOT ARG_SOURCE)
++    set(ARG_SOURCE "int main() { return 0; }\n")
++  endif()
++
++  string(RANDOM TARGET_NAME)
++  set(TARGET_NAME "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/cmTC_${TARGET_NAME}.dir")
++  file(MAKE_DIRECTORY ${TARGET_NAME})
++
++  file(WRITE "${TARGET_NAME}/CheckSectionExists.c" "${ARG_SOURCE}\n")
++
++  string(REGEX MATCHALL "<[A-Za-z0-9_]*>" substitutions
++         ${CMAKE_C_COMPILE_OBJECT})
++
++  set(try_compile_flags "${ARG_FLAGS}")
++  if(CMAKE_C_COMPILER_ID MATCHES Clang AND CMAKE_C_COMPILER_TARGET)
++    list(APPEND try_compile_flags "-target ${CMAKE_C_COMPILER_TARGET}")
++  endif()
++
++  string(REPLACE ";" " " extra_flags "${try_compile_flags}")
++
++  set(test_compile_command "${CMAKE_C_COMPILE_OBJECT}")
++  foreach(substitution ${substitutions})
++    if(substitution STREQUAL "<CMAKE_C_COMPILER>")
++      string(REPLACE "<CMAKE_C_COMPILER>"
++             "${CMAKE_C_COMPILER}" test_compile_command ${test_compile_command})
++    elseif(substitution STREQUAL "<OBJECT>")
++      string(REPLACE "<OBJECT>" "${TARGET_NAME}/CheckSectionExists.o"
++             test_compile_command ${test_compile_command})
++    elseif(substitution STREQUAL "<SOURCE>")
++      string(REPLACE "<SOURCE>" "${TARGET_NAME}/CheckSectionExists.c"
++             test_compile_command ${test_compile_command})
++    elseif(substitution STREQUAL "<FLAGS>")
++      string(REPLACE "<FLAGS>" "${CMAKE_C_FLAGS} ${extra_flags}"
++             test_compile_command ${test_compile_command})
++    else()
++      string(REPLACE "${substitution}" "" test_compile_command
++             ${test_compile_command})
++    endif()
++  endforeach()
++
++  string(REPLACE " " ";" test_compile_command "${test_compile_command}")
++
++  execute_process(
++    COMMAND ${test_compile_command}
++    RESULT_VARIABLE TEST_RESULT
++    OUTPUT_VARIABLE TEST_OUTPUT
++    ERROR_VARIABLE TEST_ERROR
++  )
++
++  execute_process(
++    COMMAND ${CMAKE_OBJDUMP} -h "${TARGET_NAME}/CheckSectionExists.o"
++    RESULT_VARIABLE CHECK_RESULT
++    OUTPUT_VARIABLE CHECK_OUTPUT
++    ERROR_VARIABLE CHECK_ERROR
++  )
++  string(FIND "${CHECK_OUTPUT}" "${section}" SECTION_FOUND)
++
++  if(NOT SECTION_FOUND EQUAL -1)
++    set(${output} TRUE PARENT_SCOPE)
++  else()
++    set(${output} FALSE PARENT_SCOPE)
++  endif()
++
++  file(REMOVE_RECURSE ${TARGET_NAME})
++endfunction()
++
++check_cxx_section_exists(".init_array" COMPILER_RT_HAS_INITFINI_ARRAY
++  SOURCE "__attribute__((constructor)) void f() {}\nint main() { return 0; }\n")
++
++append_list_if(COMPILER_RT_HAS_INITFINI_ARRAY -DCRT_HAS_INITFINI_ARRAY CRT_CFLAGS)
++append_list_if(COMPILER_RT_HAS_FPIC_FLAG -fPIC CRT_CFLAGS)
++
++foreach(arch ${CRT_SUPPORTED_ARCH})
++  add_compiler_rt_runtime(clang_rt.crtbegin
++    OBJECT
++    ARCHS ${arch}
++    SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/crtbegin.c
++    CFLAGS ${CRT_CFLAGS}
++    PARENT_TARGET crt)
++  add_compiler_rt_runtime(clang_rt.crtbegin_shared
++    OBJECT
++    ARCHS ${arch}
++    SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/crtbegin.c
++    CFLAGS ${CRT_CFLAGS} -DCRT_SHARED
++    PARENT_TARGET crt)
++  add_compiler_rt_runtime(clang_rt.crtend
++    OBJECT
++    ARCHS ${arch}
++    SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/crtend.c
++    CFLAGS ${CRT_CFLAGS}
++    PARENT_TARGET crt)
++  add_compiler_rt_runtime(clang_rt.crtend_shared
++    OBJECT
++    ARCHS ${arch}
++    SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/crtend.c
++    CFLAGS ${CRT_CFLAGS} -DCRT_SHARED
++    PARENT_TARGET crt)
++endforeach()
+Index: compiler-rt/lib/crt/crtbegin.c
+===================================================================
+--- /dev/null
++++ compiler-rt/lib/crt/crtbegin.c
+@@ -0,0 +1,108 @@
++/* ===-- crtbegin.c - Start of constructors and destructors ----------------===
++ *
++ *      	       The LLVM Compiler Infrastructure
++ *
++ * This file is dual licensed under the MIT and the University of Illinois Open
++ * Source Licenses. See LICENSE.TXT for details.
++ *
++ * ===----------------------------------------------------------------------===
++ */
++
++#include <stddef.h>
++
++__attribute__((visibility("hidden")))
++#ifdef CRT_SHARED
++void *__dso_handle = &__dso_handle;
++#else
++void *__dso_handle = (void *)0;
++#endif
++
++static long __EH_FRAME_LIST__[]
++    __attribute__((section(".eh_frame"), aligned(sizeof(void *)))) = {};
++
++extern void __register_frame_info(const void *, void *) __attribute__((weak));
++extern void *__deregister_frame_info(const void *) __attribute__((weak));
++
++#ifndef CRT_HAS_INITFINI_ARRAY
++typedef void (*fp)(void);
++
++static fp __CTOR_LIST__[]
++    __attribute__((section(".ctors"), aligned(sizeof(fp)), used)) = {(fp)-1};
++extern fp __CTOR_LIST_END__[];
++#endif
++
++#ifdef CRT_SHARED
++extern void __cxa_finalize(void *) __attribute__((weak));
++#endif
++
++static void __attribute__((used)) __do_init() {
++  static _Bool __initialized;
++  if (__builtin_expect(__initialized, 0))
++    return;
++  __initialized = 1;
++
++  static struct { void *p[8]; } __object;
++  if (__register_frame_info)
++    __register_frame_info(__EH_FRAME_LIST__, &__object);
++
++#ifndef CRT_HAS_INITFINI_ARRAY
++  const size_t n = __CTOR_LIST_END__ - __CTOR_LIST__ - 1;
++  for (size_t i = n; i >= 1; i--) __CTOR_LIST__[i]();
++#endif
++}
++
++#ifdef CRT_HAS_INITFINI_ARRAY
++__attribute__((section(".init_array"),
++               used)) static void (*__init)(void) = __do_init;
++#else  // CRT_HAS_INITFINI_ARRAY
++#if defined(__i386__) || defined(__x86_64__)
++asm(".pushsection .init,\"ax\",@progbits\n\t"
++    "call " __USER_LABEL_PREFIX__ "__do_init\n\t"
++    ".popsection");
++#elif defined(__arm__)
++asm(".pushsection .init,\"ax\",%progbits\n\t"
++    "bl " __USER_LABEL_PREFIX__ "__do_init\n\t"
++    ".popsection");
++#endif  // CRT_HAS_INITFINI_ARRAY
++#endif
++
++#ifndef CRT_HAS_INITFINI_ARRAY
++static fp __DTOR_LIST__[]
++    __attribute__((section(".dtors"), aligned(sizeof(fp)), used)) = {(fp)-1};
++extern fp __DTOR_LIST_END__[];
++#endif
++
++static void __attribute__((used)) __do_fini() {
++  static _Bool __finalized;
++  if (__builtin_expect(__finalized, 0))
++    return;
++  __finalized = 1;
++
++#ifdef CRT_SHARED
++  if (__cxa_finalize)
++    __cxa_finalize(__dso_handle);
++#endif
++
++#ifndef CRT_HAS_INITFINI_ARRAY
++  if (__deregister_frame_info)
++    __deregister_frame_info(__EH_FRAME_LIST__);
++
++  const size_t n = __DTOR_LIST_END__ - __DTOR_LIST__ - 1;
++  for (size_t i = 1; i < n; i++) __DTOR_LIST__[i]();
++#endif
++}
++
++#ifdef CRT_HAS_INITFINI_ARRAY
++__attribute__((section(".fini_array"),
++               used)) static void (*__fini)(void) = __do_fini;
++#else  // CRT_HAS_INITFINI_ARRAY
++#if defined(__i386__) || defined(__x86_64__)
++asm(".pushsection .fini,\"ax\",@progbits\n\t"
++    "call " __USER_LABEL_PREFIX__ "__do_fini\n\t"
++    ".popsection");
++#elif defined(__arm__)
++asm(".pushsection .fini,\"ax\",%progbits\n\t"
++    "bl " __USER_LABEL_PREFIX__ "__do_fini\n\t"
++    ".popsection");
++#endif
++#endif  // CRT_HAS_INIT_FINI_ARRAY
+Index: compiler-rt/lib/crt/crtend.c
+===================================================================
+--- /dev/null
++++ compiler-rt/lib/crt/crtend.c
+@@ -0,0 +1,24 @@
++/* ===-- crtend.c - End of constructors and destructors --------------------===
++ *
++ *      	       The LLVM Compiler Infrastructure
++ *
++ * This file is dual licensed under the MIT and the University of Illinois Open
++ * Source Licenses. See LICENSE.TXT for details.
++ *
++ * ===----------------------------------------------------------------------===
++ */
++
++#include <stdint.h>
++
++// Put 4-byte zero which is the length field in FDE at the end as a terminator.
++const int32_t __EH_FRAME_LIST_END__[]
++    __attribute__((section(".eh_frame"), aligned(sizeof(int32_t)),
++                   visibility("hidden"), used)) = {0};
++
++#ifndef CRT_HAS_INITFINI_ARRAY
++typedef void (*fp)(void);
++fp __CTOR_LIST_END__[]
++    __attribute__((section(".ctors"), visibility("hidden"), used)) = {0};
++fp __DTOR_LIST_END__[]
++    __attribute__((section(".dtors"), visibility("hidden"), used)) = {0};
++#endif
+Index: compiler-rt/test/CMakeLists.txt
+===================================================================
+--- compiler-rt/test/CMakeLists.txt
++++ compiler-rt/test/CMakeLists.txt
+@@ -73,6 +73,9 @@
+   if(COMPILER_RT_BUILD_XRAY)
+     compiler_rt_test_runtime(xray)
+   endif()
++  if(COMPILER_RT_HAS_CRT)
++    add_subdirectory(crt)
++  endif()
+   # ShadowCallStack does not yet provide a runtime with compiler-rt, the tests
+   # include their own minimal runtime
+   add_subdirectory(shadowcallstack)
+Index: compiler-rt/test/crt/CMakeLists.txt
+===================================================================
+--- /dev/null
++++ compiler-rt/test/crt/CMakeLists.txt
+@@ -0,0 +1,31 @@
++set(CRT_LIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
++
++set(CRT_TESTSUITES)
++
++set(CRT_TEST_DEPS "")
++
++if(NOT COMPILER_RT_STANDALONE_BUILD AND COMPILER_RT_BUILD_CRT AND
++   COMPILER_RT_HAS_CRT)
++  list(APPEND CRT_TEST_DEPS crt)
++endif()
++
++set(CRT_TEST_ARCH ${CRT_SUPPORTED_ARCH})
++if (COMPILER_RT_BUILD_CRT AND COMPILER_RT_HAS_CRT)
++  foreach(arch ${CRT_TEST_ARCH})
++    set(CRT_TEST_TARGET_ARCH ${arch})
++    string(TOLOWER "-${arch}-${OS_NAME}" CRT_TEST_CONFIG_SUFFIX)
++    get_test_cc_for_arch(${arch} CRT_TEST_TARGET_CC CRT_TEST_TARGET_CFLAGS)
++    string(TOUPPER ${arch} ARCH_UPPER_CASE)
++    set(CONFIG_NAME ${ARCH_UPPER_CASE}${OS_NAME}Config)
++
++    configure_lit_site_cfg(
++      ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
++      ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg)
++    list(APPEND CRT_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME})
++  endforeach()
++endif()
++
++add_lit_testsuite(check-crt "Running the CRT tests"
++  ${CRT_TESTSUITES}
++  DEPENDS ${CRT_TEST_DEPS})
++set_target_properties(check-crt PROPERTIES FOLDER "Compiler-RT Misc")
+Index: compiler-rt/test/crt/dso_handle.cpp
+===================================================================
+--- /dev/null
++++ compiler-rt/test/crt/dso_handle.cpp
+@@ -0,0 +1,33 @@
++// RUN: %clangxx -g -DCRT_SHARED -c %s -fPIC -o %tshared.o
++// RUN: %clangxx -g -c %s -fPIC -o %t.o
++// RUN: %clangxx -g -shared -o %t.so -nostdlib %crti %shared_crtbegin %tshared.o %libstdcxx -lc -lm -lgcc_s %shared_crtend %crtn
++// RUN: %clangxx -g -o %t -nostdlib %crt1 %crti %crtbegin %t.o %libstdcxx -lc -lm %libgcc %t.so %crtend %crtn
++// RUN: %run %t 2>&1 | FileCheck %s
++
++#include <stdio.h>
++
++// CHECK: 1
++// CHECK-NEXT: ~A()
++
++#ifdef CRT_SHARED
++bool G;
++void C() {
++  printf("%d\n", G);
++}
++
++struct A {
++  A() { G = true; }
++  ~A() {
++    printf("~A()\n");
++  }
++};
++
++A a;
++#else
++void C();
++
++int main() {
++  C();
++  return 0;
++}
++#endif
+Index: compiler-rt/test/crt/lit.cfg
+===================================================================
+--- /dev/null
++++ compiler-rt/test/crt/lit.cfg
+@@ -0,0 +1,80 @@
++# -*- Python -*-
++
++import os
++import subprocess
++
++# Setup config name.
++config.name = 'CRT' + config.name_suffix
++
++# Setup source root.
++config.test_source_root = os.path.dirname(__file__)
++
++
++def get_library_path(file):
++    cmd = subprocess.Popen([config.clang.strip(),
++                            config.target_cflags.strip(),
++                            '-print-file-name=%s' % file],
++                           stdout=subprocess.PIPE,
++                           env=config.environment)
++    if not cmd.stdout:
++      lit_config.fatal("Couldn't find the library path for '%s'" % file)
++    dir = cmd.stdout.read().strip()
++    if sys.platform in ['win32'] and execute_external:
++        # Don't pass dosish path separator to msys bash.exe.
++        dir = dir.replace('\\', '/')
++    # Ensure the result is an ascii string, across Python2.5+ - Python3.
++    return str(dir.decode('ascii'))
++
++
++def get_libgcc_file_name():
++    cmd = subprocess.Popen([config.clang.strip(),
++                            config.target_cflags.strip(),
++                            '-print-libgcc-file-name'],
++                           stdout=subprocess.PIPE,
++                           env=config.environment)
++    if not cmd.stdout:
++      lit_config.fatal("Couldn't find the library path for '%s'" % file)
++    dir = cmd.stdout.read().strip()
++    if sys.platform in ['win32'] and execute_external:
++        # Don't pass dosish path separator to msys bash.exe.
++        dir = dir.replace('\\', '/')
++    # Ensure the result is an ascii string, across Python2.5+ - Python3.
++    return str(dir.decode('ascii'))
++
++
++def build_invocation(compile_flags):
++    return ' ' + ' '.join([config.clang] + compile_flags) + ' '
++
++
++# Setup substitutions.
++config.substitutions.append(
++    ('%clang ', build_invocation([config.target_cflags])))
++config.substitutions.append(
++    ('%clangxx ',
++     build_invocation(config.cxx_mode_flags + [config.target_cflags])))
++
++base_lib = os.path.join(
++    config.compiler_rt_libdir, "clang_rt.%%s-%s.o" % config.target_arch)
++config.substitutions.append(('%crtbegin', base_lib % "crtbegin"))
++config.substitutions.append(('%shared_crtbegin', base_lib % "crtbegin_shared"))
++config.substitutions.append(('%crtend', base_lib % "crtend"))
++config.substitutions.append(('%shared_crtend', base_lib % "crtend_shared"))
++
++config.substitutions.append(
++    ('%crt1', get_library_path('crt1.o')))
++config.substitutions.append(
++    ('%crti', get_library_path('crti.o')))
++config.substitutions.append(
++    ('%crtn', get_library_path('crtn.o')))
++
++config.substitutions.append(
++    ('%libgcc', get_libgcc_file_name()))
++
++config.substitutions.append(
++    ('%libstdcxx', '-l' + config.sanitizer_cxx_lib.lstrip('lib')))
++
++# Default test suffixes.
++config.suffixes = ['.c', '.cc', '.cpp']
++
++if config.host_os not in ['Linux']:
++    config.unsupported = True
+Index: compiler-rt/test/crt/lit.site.cfg.in
+===================================================================
+--- /dev/null
++++ compiler-rt/test/crt/lit.site.cfg.in
+@@ -0,0 +1,14 @@
++@LIT_SITE_CFG_IN_HEADER@
++
++# Tool-specific config options.
++config.name_suffix = "@CRT_TEST_CONFIG_SUFFIX@"
++config.crt_lit_source_dir = "@CRT_LIT_SOURCE_DIR@"
++config.target_cflags = "@CRT_TEST_TARGET_CFLAGS@"
++config.target_arch = "@CRT_TEST_TARGET_ARCH@"
++config.sanitizer_cxx_lib = "@SANITIZER_TEST_CXX_LIBNAME@"
++
++# Load common config for all compiler-rt lit tests
++lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/test/lit.common.configured")
++
++# Load tool-specific config that would do the real work.
++lit_config.load_config(config, "@CRT_LIT_SOURCE_DIR@/lit.cfg")
diff --git a/nixpkgs/pkgs/development/compilers/llvm/7/default.nix b/nixpkgs/pkgs/development/compilers/llvm/7/default.nix
new file mode 100644
index 000000000000..0b71c3a28d23
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/7/default.nix
@@ -0,0 +1,158 @@
+{ lowPrio, newScope, pkgs, stdenv, cmake, gcc, libstdcxxHook
+, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith
+, buildLlvmTools # tools, but from the previous stage, for cross
+, targetLlvmLibraries # libraries, but from the next stage, for cross
+}:
+
+let
+  release_version = "7.1.0";
+  version = release_version; # differentiating these is important for rc's
+  targetConfig = stdenv.targetPlatform.config;
+
+  fetch = name: sha256: fetchurl {
+    url = "https://releases.llvm.org/${release_version}/${name}-${version}.src.tar.xz";
+    inherit sha256;
+  };
+
+  clang-tools-extra_src = fetch "clang-tools-extra" "0lb4kdh7j2fhfz8kd6iv5df7m3pikiryk1vvwsf87spc90n09q0w";
+
+  tools = stdenv.lib.makeExtensible (tools: let
+    callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
+    mkExtraBuildCommands = cc: ''
+      rsrc="$out/resource-root"
+      mkdir "$rsrc"
+      ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc"
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
+      echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
+    '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc && !(stdenv.targetPlatform.useLLVM or false)) ''
+      echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags
+    '';
+  in {
+
+    llvm = callPackage ./llvm.nix { };
+    llvm-polly = callPackage ./llvm.nix { enablePolly = true; };
+
+    clang-unwrapped = callPackage ./clang {
+      inherit (tools) lld;
+      inherit clang-tools-extra_src;
+    };
+    clang-polly-unwrapped = callPackage ./clang {
+      inherit clang-tools-extra_src;
+      llvm = tools.llvm-polly;
+      enablePolly = true;
+    };
+
+    llvm-manpages = lowPrio (tools.llvm.override {
+      enableManpages = true;
+      python3 = pkgs.python3;  # don't use python-boot
+    });
+
+    clang-manpages = lowPrio (tools.clang-unwrapped.override {
+      enableManpages = true;
+      python3 = pkgs.python3;  # don't use python-boot
+    });
+
+    libclang = tools.clang-unwrapped.lib;
+
+    clang = if stdenv.cc.isGNU then tools.libstdcxxClang else tools.libcxxClang;
+
+    libstdcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      extraTools = [
+        libstdcxxHook
+      ];
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = ''
+          echo "-target ${targetConfig}" >> $out/nix-support/cc-cflags
+          echo "-B${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-cflags
+          echo "-L${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-ldflags
+          echo "-L${gcc.cc.lib}/${targetConfig}/lib" >> $out/nix-support/cc-ldflags
+      '' + mkExtraBuildCommands cc;
+    };
+
+    libcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = targetLlvmLibraries.libcxx;
+      extraPackages = [
+        targetLlvmLibraries.libcxx
+        targetLlvmLibraries.libcxxabi
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+    };
+
+    lld = callPackage ./lld.nix {};
+
+    lldb = callPackage ./lldb.nix {};
+
+    bintools = callPackage ./bintools.nix {};
+
+    lldClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      bintools = wrapBintoolsWith {
+        inherit (tools) bintools;
+      };
+      extraPackages = [
+        # targetLlvmLibraries.libcxx
+        # targetLlvmLibraries.libcxxabi
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = ''
+        echo "-target ${stdenv.targetPlatform.config} -rtlib=compiler-rt" >> $out/nix-support/cc-cflags
+      '' + mkExtraBuildCommands cc;
+    };
+
+    lldClangNoLibc = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      bintools = wrapBintoolsWith {
+        inherit (tools) bintools;
+        libc = null;
+      };
+      extraPackages = [
+        # targetLlvmLibraries.libcxx
+        # targetLlvmLibraries.libcxxabi
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = ''
+        echo "-target ${stdenv.targetPlatform.config} -rtlib=compiler-rt" >> $out/nix-support/cc-cflags
+      '' + mkExtraBuildCommands cc;
+    };
+
+    lldClangNoCompilerRt = wrapCCWith {
+      cc = tools.clang-unwrapped;
+      bintools = wrapBintoolsWith {
+        inherit (tools) bintools;
+        libc = null;
+      };
+      extraPackages = [ ];
+      extraBuildCommands = ''
+        echo "-nostartfiles -target ${stdenv.targetPlatform.config}" >> $out/nix-support/cc-cflags
+      '';
+    };
+
+  });
+
+  libraries = stdenv.lib.makeExtensible (libraries: let
+    callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
+  in {
+
+    compiler-rt = callPackage ./compiler-rt.nix {
+      stdenv = if stdenv.hostPlatform.useLLVM or false
+               then overrideCC stdenv buildLlvmTools.lldClangNoCompilerRt
+               else stdenv;
+    };
+
+    stdenv = overrideCC stdenv buildLlvmTools.clang;
+
+    libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
+
+    libcxx = callPackage ./libc++ {};
+
+    libcxxabi = callPackage ./libc++abi.nix {};
+
+    openmp = callPackage ./openmp.nix {};
+  });
+
+in { inherit tools libraries; } // libraries // tools
diff --git a/nixpkgs/pkgs/development/compilers/llvm/7/libc++/default.nix b/nixpkgs/pkgs/development/compilers/llvm/7/libc++/default.nix
new file mode 100644
index 000000000000..96cb671fa431
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/7/libc++/default.nix
@@ -0,0 +1,53 @@
+{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version
+, enableShared ? ! stdenv.hostPlatform.isMusl }:
+
+stdenv.mkDerivation {
+  pname = "libc++";
+  inherit version;
+
+  src = fetch "libcxx" "0kmhcapm2cjwalyiqasj9dmqbw59mcwdl8fgl951wg7ax84b8hj4";
+
+  postUnpack = ''
+    unpackFile ${libcxxabi.src}
+    export LIBCXXABI_INCLUDE_DIR="$PWD/$(ls -d libcxxabi-${version}*)/include"
+  '';
+
+  patches = stdenv.lib.optional stdenv.hostPlatform.isMusl ../../libcxx-0001-musl-hacks.patch;
+
+  prePatch = ''
+    substituteInPlace lib/CMakeLists.txt --replace "/usr/lib/libc++" "\''${LIBCXX_LIBCXXABI_LIB_PATH}/libc++"
+  '';
+
+  preConfigure = ''
+    # Get headers from the cxxabi source so we can see private headers not installed by the cxxabi package
+    cmakeFlagsArray=($cmakeFlagsArray -DLIBCXX_CXX_ABI_INCLUDE_PATHS="$LIBCXXABI_INCLUDE_DIR")
+  '' + lib.optionalString stdenv.hostPlatform.isMusl ''
+    patchShebangs utils/cat_files.py
+  '';
+  nativeBuildInputs = [ cmake ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl python3;
+
+  buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+  cmakeFlags = [
+    "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"
+    "-DLIBCXX_LIBCPPABI_VERSION=2"
+    "-DLIBCXX_CXX_ABI=libcxxabi"
+  ] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "-DLIBCXX_HAS_MUSL_LIBC=1"
+  ++ stdenv.lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF" ;
+
+  enableParallelBuilding = true;
+
+  linkCxxAbi = stdenv.isLinux;
+
+  setupHooks = [
+    ../../../../../build-support/setup-hooks/role.bash
+    ./setup-hook.sh
+  ];
+
+  meta = {
+    homepage = "https://libcxx.llvm.org/";
+    description = "A new implementation of the C++ standard library, targeting C++11";
+    license = with stdenv.lib.licenses; [ ncsa mit ];
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/7/libc++/setup-hook.sh b/nixpkgs/pkgs/development/compilers/llvm/7/libc++/setup-hook.sh
new file mode 100644
index 000000000000..3a274aecc23d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/7/libc++/setup-hook.sh
@@ -0,0 +1,6 @@
+# See pkgs/build-support/setup-hooks/role.bash
+getHostRole
+
+linkCxxAbi="@linkCxxAbi@"
+export NIX_CXXSTDLIB_COMPILE${role_post}+=" -isystem @out@/include/c++/v1"
+export NIX_CXXSTDLIB_LINK${role_post}=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
diff --git a/nixpkgs/pkgs/development/compilers/llvm/7/libc++abi.nix b/nixpkgs/pkgs/development/compilers/llvm/7/libc++abi.nix
new file mode 100644
index 000000000000..97141a0bd402
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/7/libc++abi.nix
@@ -0,0 +1,54 @@
+{ stdenv, cmake, fetch, libcxx, llvm, version
+  # on musl the shared objects don't build
+, enableShared ? ! stdenv.hostPlatform.isMusl }:
+
+stdenv.mkDerivation {
+  pname = "libc++abi";
+  inherit version;
+
+  src = fetch "libcxxabi" "1zcqxsdjhawgz1cvpk07y3jl6fg9p3ay4nl69zsirqb2ghgyhhb2";
+
+  nativeBuildInputs = [ cmake ];
+
+  postUnpack = ''
+    unpackFile ${libcxx.src}
+    unpackFile ${llvm.src}
+    cmakeFlagsArray=($cmakeFlagsArray -DLLVM_PATH=$PWD/$(ls -d llvm-*) -DLIBCXXABI_LIBCXX_PATH=$PWD/$(ls -d libcxx-*) )
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    export TRIPLE=x86_64-apple-darwin
+  '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
+    patch -p1 -d $(ls -d libcxx-*) -i ${../libcxx-0001-musl-hacks.patch}
+  '';
+
+  cmakeFlags = stdenv.lib.optional (!enableShared) "-DLIBCXXABI_ENABLE_SHARED=OFF";
+
+  installPhase = if stdenv.isDarwin
+    then ''
+      for file in lib/*.dylib; do
+        # this should be done in CMake, but having trouble figuring out
+        # the magic combination of necessary CMake variables
+        # if you fancy a try, take a look at
+        # https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
+        install_name_tool -id $out/$file $file
+      done
+      make install
+      install -d 755 $out/include
+      install -m 644 ../include/*.h $out/include
+    ''
+    else ''
+      install -d -m 755 $out/include $out/lib
+      install -m 644 lib/libc++abi.a $out/lib
+      ${stdenv.lib.optionalString enableShared "install -m 644 lib/libc++abi.so.1.0 $out/lib"}
+      install -m 644 ../include/cxxabi.h $out/include
+      ${stdenv.lib.optionalString enableShared "ln -s libc++abi.so.1.0 $out/lib/libc++abi.so"}
+      ${stdenv.lib.optionalString enableShared "ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1"}
+    '';
+
+  meta = {
+    homepage = "https://libcxxabi.llvm.org/";
+    description = "A new implementation of low level support for a standard C++ library";
+    license = with stdenv.lib.licenses; [ ncsa mit ];
+    maintainers = with stdenv.lib.maintainers; [ vlstill ];
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/7/lld.nix b/nixpkgs/pkgs/development/compilers/llvm/7/lld.nix
new file mode 100644
index 000000000000..bee9202ed6c1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/7/lld.nix
@@ -0,0 +1,33 @@
+{ stdenv
+, fetch
+, cmake
+, libxml2
+, llvm
+, version
+}:
+
+stdenv.mkDerivation {
+  pname = "lld";
+  inherit version;
+
+  src = fetch "lld" "0rsqb7zcnij5r5ipfhr129j7skr5n9pyr388kjpqwh091952f3x1";
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ llvm libxml2 ];
+
+  outputs = [ "out" "dev" ];
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    moveToOutput include "$dev"
+    moveToOutput lib "$dev"
+  '';
+
+  meta = {
+    description = "The LLVM Linker";
+    homepage    = "https://lld.llvm.org/";
+    license     = stdenv.lib.licenses.ncsa;
+    platforms   = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/7/lldb.nix b/nixpkgs/pkgs/development/compilers/llvm/7/lldb.nix
new file mode 100644
index 000000000000..8fadd3cf7849
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/7/lldb.nix
@@ -0,0 +1,68 @@
+{ stdenv
+, fetch
+, cmake
+, zlib
+, ncurses
+, swig
+, which
+, libedit
+, libxml2
+, llvm
+, clang-unwrapped
+, perl
+, python3
+, version
+, darwin
+}:
+
+stdenv.mkDerivation {
+  pname = "lldb";
+  inherit version;
+
+  src = fetch "lldb" "0klsscg1sczc4nw2l53xggi969k361cng2sjjrfp3bv4g5x14s4v";
+
+  nativeBuildInputs = [ cmake perl python3 which swig ];
+  buildInputs = [ ncurses zlib libedit libxml2 llvm ]
+    ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa ];
+
+
+  postPatch = ''
+    # Fix up various paths that assume llvm and clang are installed in the same place
+    sed -i 's,".*ClangConfig.cmake","${clang-unwrapped}/lib/cmake/clang/ClangConfig.cmake",' \
+      cmake/modules/LLDBStandalone.cmake
+    sed -i 's,".*tools/clang/include","${clang-unwrapped}/include",' \
+      cmake/modules/LLDBStandalone.cmake
+    sed -i 's,"$.LLVM_LIBRARY_DIR.",${llvm}/lib ${clang-unwrapped}/lib,' \
+      cmake/modules/LLDBStandalone.cmake
+    sed -i -e 's,message(SEND_ERROR "Cannot find debugserver on system."),,' \
+           -e 's,string(STRIP ''${XCODE_DEV_DIR} XCODE_DEV_DIR),,' \
+           tools/debugserver/source/CMakeLists.txt
+
+    # Fix /usr/bin references for sandboxed builds.
+    patchShebangs scripts
+  '';
+
+  cmakeFlags = [
+    "-DLLDB_CODESIGN_IDENTITY=" # codesigning makes nondeterministic
+    "-DSKIP_DEBUGSERVER=ON"
+  ];
+
+  CXXFLAGS = "-fno-rtti";
+  hardeningDisable = [ "format" ];
+
+  NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-I${libxml2.dev}/include/libxml2";
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    mkdir -p $out/share/man/man1
+    cp ../docs/lldb.1 $out/share/man/man1/
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A next-generation high-performance debugger";
+    homepage    = "https://llvm.org/";
+    license     = licenses.ncsa;
+    platforms   = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/7/llvm-outputs.patch b/nixpkgs/pkgs/development/compilers/llvm/7/llvm-outputs.patch
new file mode 100644
index 000000000000..40096fa3497f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/7/llvm-outputs.patch
@@ -0,0 +1,26 @@
+diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
+index 94d426b..37f7794 100644
+--- a/tools/llvm-config/llvm-config.cpp
++++ b/tools/llvm-config/llvm-config.cpp
+@@ -333,6 +333,21 @@ int main(int argc, char **argv) {
+     ActiveIncludeOption = "-I" + ActiveIncludeDir;
+   }
+ 
++  /// Nix-specific multiple-output handling: override ActiveLibDir if --link-shared
++  if (!IsInDevelopmentTree) {
++    bool WantShared = true;
++    for (int i = 1; i < argc; ++i) {
++      StringRef Arg = argv[i];
++      if (Arg == "--link-shared")
++        WantShared = true;
++      else if (Arg == "--link-static")
++        WantShared = false; // the last one wins
++    }
++
++    if (WantShared)
++      ActiveLibDir = std::string("@lib@") + "/lib" + LLVM_LIBDIR_SUFFIX;
++  }
++
+   /// We only use `shared library` mode in cases where the static library form
+   /// of the components provided are not available; note however that this is
+   /// skipped if we're run from within the build dir. However, once installed,
diff --git a/nixpkgs/pkgs/development/compilers/llvm/7/llvm.nix b/nixpkgs/pkgs/development/compilers/llvm/7/llvm.nix
new file mode 100644
index 000000000000..dc57d0d6bd5c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/7/llvm.nix
@@ -0,0 +1,201 @@
+{ stdenv
+, fetch
+, fetchpatch
+, cmake
+, python3
+, libffi
+, libbfd
+, libpfm
+, libxml2
+, ncurses
+, version
+, release_version
+, zlib
+, buildPackages
+, debugVersion ? false
+, enableManpages ? false
+, enableSharedLibraries ? true
+, enablePFM ? !(stdenv.isDarwin
+  || stdenv.isAarch64 # broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
+  || stdenv.isAarch32 # broken for the armv7l builder
+  )
+, enablePolly ? false
+}:
+
+let
+  inherit (stdenv.lib) optional optionals optionalString;
+
+  # Used when creating a versioned symlinks of libLLVM.dylib
+  versionSuffixes = with stdenv.lib;
+    let parts = splitVersion release_version; in
+    imap (i: _: concatStringsSep "." (take i parts)) parts;
+
+in stdenv.mkDerivation ({
+  pname = "llvm";
+  inherit version;
+
+  src = fetch "llvm" "0r1p5didv4rkgxyvbkyz671xddg6i3dxvbpsi1xxipkla0l9pk0v";
+  polly_src = fetch "polly" "16qkns4ab4x0azrvhy4j7cncbyb2rrbdrqj87zphvqxm5pvm8m1h";
+
+  unpackPhase = ''
+    unpackFile $src
+    mv llvm-${version}* llvm
+    sourceRoot=$PWD/llvm
+  '' + optionalString enablePolly ''
+    unpackFile $polly_src
+    mv polly-* $sourceRoot/tools/polly
+  '';
+
+  outputs = [ "out" "python" ]
+    ++ optional enableSharedLibraries "lib";
+
+  nativeBuildInputs = [ cmake python3 ]
+    ++ optional enableManpages python3.pkgs.sphinx;
+
+  buildInputs = [ libxml2 libffi ]
+    ++ optional enablePFM libpfm; # exegesis
+
+  propagatedBuildInputs = [ ncurses zlib ];
+
+  patches = [
+    # backport, fix building rust crates with lto
+    (fetchpatch {
+      url = "https://github.com/llvm-mirror/llvm/commit/da1fb72bb305d6bc1f3899d541414146934bf80f.patch";
+      sha256 = "0p81gkhc1xhcx0hmnkwyhrn8x8l8fd24xgaj1whni29yga466dwc";
+    })
+    (fetchpatch {
+      url = "https://github.com/llvm-mirror/llvm/commit/cc1f2a595ead516812a6c50398f0f3480ebe031f.patch";
+      sha256 = "0k6k1p5yisgwx417a67s7sr9930rqh1n0zv5jvply8vjjy4b3kf8";
+    })
+  ];
+
+  postPatch = optionalString stdenv.isDarwin ''
+    substituteInPlace cmake/modules/AddLLVM.cmake \
+      --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \
+      --replace 'set(_install_rpath "@loader_path/../lib" ''${extra_libdir})' ""
+  ''
+  # Patch llvm-config to return correct library path based on --link-{shared,static}.
+  + optionalString (enableSharedLibraries) ''
+    substitute '${./llvm-outputs.patch}' ./llvm-outputs.patch --subst-var lib
+    patch -p1 < ./llvm-outputs.patch
+  '' + ''
+    # FileSystem permissions tests fail with various special bits
+    substituteInPlace unittests/Support/CMakeLists.txt \
+      --replace "Path.cpp" ""
+    rm unittests/Support/Path.cpp
+  '' + optionalString stdenv.hostPlatform.isMusl ''
+    patch -p1 -i ${../TLI-musl.patch}
+    substituteInPlace unittests/Support/CMakeLists.txt \
+      --replace "add_subdirectory(DynamicLibrary)" ""
+    rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
+  '' + optionalString stdenv.hostPlatform.isAarch32 ''
+    # skip failing X86 test cases on armv7l
+    rm test/DebugInfo/X86/debug_addr.ll
+    rm test/tools/llvm-dwarfdump/X86/debug_addr.s
+    rm test/tools/llvm-dwarfdump/X86/debug_addr_address_size_mismatch.s
+    rm test/tools/llvm-dwarfdump/X86/debug_addr_dwarf4.s
+    rm test/tools/llvm-dwarfdump/X86/debug_addr_unsupported_version.s
+    rm test/tools/llvm-dwarfdump/X86/debug_addr_version_mismatch.s
+  '' + optionalString (stdenv.hostPlatform.system == "armv6l-linux") ''
+    # Seems to require certain floating point hardware (NEON?)
+    rm test/ExecutionEngine/frem.ll
+  '' + ''
+    patchShebangs test/BugPoint/compile-custom.ll.py
+  '';
+
+  # hacky fix: created binaries need to be run before installation
+  preBuild = ''
+    mkdir -p $out/
+    ln -sv $PWD/lib $out
+  '';
+
+  cmakeFlags = with stdenv; [
+    "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
+    "-DLLVM_INSTALL_UTILS=ON"  # Needed by rustc
+    "-DLLVM_BUILD_TESTS=ON"
+    "-DLLVM_ENABLE_FFI=ON"
+    "-DLLVM_ENABLE_RTTI=ON"
+    "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly"
+    "-DLLVM_ENABLE_DUMP=ON"
+  ] ++ optionals enableSharedLibraries [
+    "-DLLVM_LINK_LLVM_DYLIB=ON"
+  ] ++ optionals enableManpages [
+    "-DLLVM_BUILD_DOCS=ON"
+    "-DLLVM_ENABLE_SPHINX=ON"
+    "-DSPHINX_OUTPUT_MAN=ON"
+    "-DSPHINX_OUTPUT_HTML=OFF"
+    "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+  ] ++ optionals (!isDarwin) [
+    "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
+  ] ++ optionals (isDarwin) [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+    "-DCAN_TARGET_i386=false"
+  ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "-DCMAKE_CROSSCOMPILING=True"
+    "-DLLVM_TABLEGEN=${buildPackages.llvm_7}/bin/llvm-tblgen"
+  ];
+
+  postBuild = ''
+    rm -fR $out
+  '';
+
+  preCheck = ''
+    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/lib
+  '';
+
+  postInstall = ''
+    mkdir -p $python/share
+    mv $out/share/opt-viewer $python/share/opt-viewer
+  ''
+  + optionalString enableSharedLibraries ''
+    moveToOutput "lib/libLLVM-*" "$lib"
+    moveToOutput "lib/libLLVM${stdenv.hostPlatform.extensions.sharedLibrary}" "$lib"
+    substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
+      --replace "\''${_IMPORT_PREFIX}/lib/libLLVM-" "$lib/lib/libLLVM-"
+  ''
+  + optionalString (stdenv.isDarwin && enableSharedLibraries) ''
+    substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
+      --replace "\''${_IMPORT_PREFIX}/lib/libLLVM.dylib" "$lib/lib/libLLVM.dylib"
+    ${stdenv.lib.concatMapStringsSep "\n" (v: ''
+      ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${v}.dylib
+    '') versionSuffixes}
+  '';
+
+  doCheck = stdenv.isLinux && (!stdenv.isx86_32);
+
+  checkTarget = "check-all";
+
+  enableParallelBuilding = true;
+
+  requiredSystemFeatures = [ "big-parallel" ];
+  meta = {
+    description = "Collection of modular and reusable compiler and toolchain technologies";
+    homepage    = "https://llvm.org/";
+    license     = stdenv.lib.licenses.ncsa;
+    maintainers = with stdenv.lib.maintainers; [ lovek323 raskin dtzWill ];
+    platforms   = stdenv.lib.platforms.all;
+  };
+} // stdenv.lib.optionalAttrs enableManpages {
+  pname = "llvm-manpages";
+
+  buildPhase = ''
+    make docs-llvm-man
+  '';
+
+  propagatedBuildInputs = [];
+
+  installPhase = ''
+    make -C docs install
+  '';
+
+  postPatch = null;
+  postInstall = null;
+
+  outputs = [ "out" ];
+
+  doCheck = false;
+
+  meta.description = "man pages for LLVM ${version}";
+})
diff --git a/nixpkgs/pkgs/development/compilers/llvm/7/openmp.nix b/nixpkgs/pkgs/development/compilers/llvm/7/openmp.nix
new file mode 100644
index 000000000000..898d49dce834
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/7/openmp.nix
@@ -0,0 +1,26 @@
+{ stdenv
+, fetch
+, cmake
+, llvm
+, perl
+, version
+}:
+
+stdenv.mkDerivation {
+  pname = "openmp";
+  inherit version;
+
+  src = fetch "openmp" "1dg53wzsci2kra8lh1y0chh60h2l8h1by93br5spzvzlxshkmrqy";
+
+  nativeBuildInputs = [ cmake perl ];
+  buildInputs = [ llvm ];
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "Components required to build an executable OpenMP program";
+    homepage    = "https://openmp.llvm.org/";
+    license     = stdenv.lib.licenses.mit;
+    platforms   = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/7/sanitizers-nongnu.patch b/nixpkgs/pkgs/development/compilers/llvm/7/sanitizers-nongnu.patch
new file mode 100644
index 000000000000..1f2ac97818eb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/7/sanitizers-nongnu.patch
@@ -0,0 +1,412 @@
+From f7a253f8f85d0f49df6b73996737a3e84ac64236 Mon Sep 17 00:00:00 2001
+From: Will Dietz <w@wdtz.org>
+Date: Mon, 24 Sep 2018 11:17:25 -0500
+Subject: [PATCH] Ported to 7.0, taken from gentoo-musl project.
+
+------
+Ported to compiler-rt-sanitizers-5.0.0. Taken from
+
+https://gist.githubusercontent.com/pwaller/2337f3290f12634cad3e3730cff0a6c1/raw/83c87a8585e2f9662494db5662e5361beb093c26/nongnu.patch
+Signed-off-by: Jory A. Pratt <anarchy@gentoo.org>
+
+Taken from gentoo-musl project, with a few additional minor fixes.
+---
+ lib/asan/asan_linux.cc                        |  4 +-
+ lib/interception/interception_linux.cc        |  2 +-
+ lib/interception/interception_linux.h         |  2 +-
+ lib/msan/msan_linux.cc                        |  2 +-
+ lib/sanitizer_common/sanitizer_allocator.cc   |  2 +-
+ .../sanitizer_common_interceptors_ioctl.inc   |  4 +-
+ .../sanitizer_common_syscalls.inc             |  2 +-
+ lib/sanitizer_common/sanitizer_linux.cc       |  8 +++-
+ .../sanitizer_linux_libcdep.cc                | 10 ++---
+ lib/sanitizer_common/sanitizer_platform.h     |  6 +++
+ .../sanitizer_platform_interceptors.h         |  4 +-
+ .../sanitizer_platform_limits_posix.cc        | 37 +++++++++++--------
+ lib/tsan/rtl/tsan_platform_linux.cc           |  2 +-
+ 13 files changed, 51 insertions(+), 34 deletions(-)
+
+diff --git a/lib/asan/asan_linux.cc b/lib/asan/asan_linux.cc
+index 625f32d40..73cf77aca 100644
+--- a/lib/asan/asan_linux.cc
++++ b/lib/asan/asan_linux.cc
+@@ -46,7 +46,7 @@
+ #include <link.h>
+ #endif
+ 
+-#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS
++#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS || SANITIZER_NONGNU
+ #include <ucontext.h>
+ extern "C" void* _DYNAMIC;
+ #elif SANITIZER_NETBSD
+@@ -139,7 +139,7 @@ void AsanApplyToGlobals(globals_op_fptr op, const void *needle) {
+   UNIMPLEMENTED();
+ }
+ 
+-#if SANITIZER_ANDROID
++#if SANITIZER_ANDROID || SANITIZER_NONGNU
+ // FIXME: should we do anything for Android?
+ void AsanCheckDynamicRTPrereqs() {}
+ void AsanCheckIncompatibleRT() {}
+diff --git a/lib/interception/interception_linux.cc b/lib/interception/interception_linux.cc
+index 26bfcd8f6..529b234f7 100644
+--- a/lib/interception/interception_linux.cc
++++ b/lib/interception/interception_linux.cc
+@@ -43,7 +43,7 @@ bool GetRealFunctionAddress(const char *func_name, uptr *func_addr,
+ }
+ 
+ // Android and Solaris do not have dlvsym
+-#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD
++#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD && !SANITIZER_NONGNU
+ void *GetFuncAddrVer(const char *func_name, const char *ver) {
+   return dlvsym(RTLD_NEXT, func_name, ver);
+ }
+diff --git a/lib/interception/interception_linux.h b/lib/interception/interception_linux.h
+index 942c25609..24a4d5080 100644
+--- a/lib/interception/interception_linux.h
++++ b/lib/interception/interception_linux.h
+@@ -36,7 +36,7 @@ void *GetFuncAddrVer(const char *func_name, const char *ver);
+       (::__interception::uptr) & WRAP(func))
+ 
+ // Android,  Solaris and OpenBSD do not have dlvsym
+-#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD
++#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD && !SANITIZER_NONGNU
+ #define INTERCEPT_FUNCTION_VER_LINUX_OR_FREEBSD(func, symver) \
+   (::__interception::real_##func = (func##_f)(                \
+        unsigned long)::__interception::GetFuncAddrVer(#func, symver))
+diff --git a/lib/msan/msan_linux.cc b/lib/msan/msan_linux.cc
+index 385a650c4..6e30a8ce9 100644
+--- a/lib/msan/msan_linux.cc
++++ b/lib/msan/msan_linux.cc
+@@ -13,7 +13,7 @@
+ //===----------------------------------------------------------------------===//
+ 
+ #include "sanitizer_common/sanitizer_platform.h"
+-#if SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD
++#if SANITIZER_FREEBSD || (SANITIZER_LINUX && !SANITIZER_NONGNU) || SANITIZER_NETBSD
+ 
+ #include "msan.h"
+ #include "msan_report.h"
+diff --git a/lib/sanitizer_common/sanitizer_allocator.cc b/lib/sanitizer_common/sanitizer_allocator.cc
+index 6bfd5e5ee..048f6154f 100644
+--- a/lib/sanitizer_common/sanitizer_allocator.cc
++++ b/lib/sanitizer_common/sanitizer_allocator.cc
+@@ -27,7 +27,7 @@ const char *SecondaryAllocatorName = "LargeMmapAllocator";
+ 
+ // ThreadSanitizer for Go uses libc malloc/free.
+ #if SANITIZER_GO || defined(SANITIZER_USE_MALLOC)
+-# if SANITIZER_LINUX && !SANITIZER_ANDROID
++# if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ extern "C" void *__libc_malloc(uptr size);
+ #  if !SANITIZER_GO
+ extern "C" void *__libc_memalign(uptr alignment, uptr size);
+diff --git a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
+index 2d633c173..b6eb23116 100644
+--- a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
++++ b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
+@@ -104,7 +104,7 @@ static void ioctl_table_fill() {
+   _(SIOCGETVIFCNT, WRITE, struct_sioc_vif_req_sz);
+ #endif
+ 
+-#if SANITIZER_LINUX
++#if SANITIZER_LINUX && !SANITIZER_NONGNU
+   // Conflicting request ids.
+   // _(CDROMAUDIOBUFSIZ, NONE, 0);
+   // _(SNDCTL_TMR_CONTINUE, NONE, 0);
+@@ -365,7 +365,7 @@ static void ioctl_table_fill() {
+   _(VT_WAITACTIVE, NONE, 0);
+ #endif
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE
+   _(CYGETDEFTHRESH, WRITE, sizeof(int));
+   _(CYGETDEFTIMEOUT, WRITE, sizeof(int));
+diff --git a/lib/sanitizer_common/sanitizer_common_syscalls.inc b/lib/sanitizer_common/sanitizer_common_syscalls.inc
+index 469c8eb7e..24f87867d 100644
+--- a/lib/sanitizer_common/sanitizer_common_syscalls.inc
++++ b/lib/sanitizer_common/sanitizer_common_syscalls.inc
+@@ -2038,7 +2038,7 @@ POST_SYSCALL(setrlimit)(long res, long resource, void *rlim) {
+   }
+ }
+ 
+-#if !SANITIZER_ANDROID
++#if !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ PRE_SYSCALL(prlimit64)(long pid, long resource, const void *new_rlim,
+                        void *old_rlim) {
+   if (new_rlim) PRE_READ(new_rlim, struct_rlimit64_sz);
+diff --git a/lib/sanitizer_common/sanitizer_linux.cc b/lib/sanitizer_common/sanitizer_linux.cc
+index 96d6c1eff..9e2b7fb9d 100644
+--- a/lib/sanitizer_common/sanitizer_linux.cc
++++ b/lib/sanitizer_common/sanitizer_linux.cc
+@@ -541,13 +541,13 @@ const char *GetEnv(const char *name) {
+ #endif
+ }
+ 
+-#if !SANITIZER_FREEBSD && !SANITIZER_NETBSD && !SANITIZER_OPENBSD
++#if !SANITIZER_FREEBSD && !SANITIZER_NETBSD && !SANITIZER_OPENBSD && !SANITIZER_NONGNU
+ extern "C" {
+ SANITIZER_WEAK_ATTRIBUTE extern void *__libc_stack_end;
+ }
+ #endif
+ 
+-#if !SANITIZER_GO && !SANITIZER_FREEBSD && !SANITIZER_NETBSD &&                \
++#if (!SANITIZER_GO || SANITIZER_NONGNU) && !SANITIZER_FREEBSD && !SANITIZER_NETBSD &&                \
+     !SANITIZER_OPENBSD
+ static void ReadNullSepFileToArray(const char *path, char ***arr,
+                                    int arr_size) {
+@@ -590,6 +590,10 @@ static void GetArgsAndEnv(char ***argv, char ***envp) {
+ #elif SANITIZER_NETBSD
+   *argv = __ps_strings->ps_argvstr;
+   *envp = __ps_strings->ps_envstr;
++#elif SANITIZER_NONGNU
++    static const int kMaxArgv = 2000, kMaxEnvp = 2000;
++    ReadNullSepFileToArray("/proc/self/cmdline", argv, kMaxArgv);
++    ReadNullSepFileToArray("/proc/self/environ", envp, kMaxEnvp);
+ #else // SANITIZER_FREEBSD
+ #if !SANITIZER_GO
+   if (&__libc_stack_end) {
+diff --git a/lib/sanitizer_common/sanitizer_linux_libcdep.cc b/lib/sanitizer_common/sanitizer_linux_libcdep.cc
+index 4962ff832..438f94dbe 100644
+--- a/lib/sanitizer_common/sanitizer_linux_libcdep.cc
++++ b/lib/sanitizer_common/sanitizer_linux_libcdep.cc
+@@ -179,7 +179,7 @@ __attribute__((unused)) static bool GetLibcVersion(int *major, int *minor,
+ }
+ 
+ #if !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO &&               \
+-    !SANITIZER_NETBSD && !SANITIZER_OPENBSD && !SANITIZER_SOLARIS
++    !SANITIZER_NETBSD && !SANITIZER_OPENBSD && !SANITIZER_SOLARIS && !SANITIZER_NONGNU
+ static uptr g_tls_size;
+ 
+ #ifdef __i386__
+@@ -261,7 +261,7 @@ void InitTlsSize() { }
+ #if (defined(__x86_64__) || defined(__i386__) || defined(__mips__) ||          \
+      defined(__aarch64__) || defined(__powerpc64__) || defined(__s390__) ||    \
+      defined(__arm__)) &&                                                      \
+-    SANITIZER_LINUX && !SANITIZER_ANDROID
++    SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ // sizeof(struct pthread) from glibc.
+ static atomic_uintptr_t thread_descriptor_size;
+ 
+@@ -426,7 +426,7 @@ int GetSizeFromHdr(struct dl_phdr_info *info, size_t size, void *data) {
+ 
+ #if !SANITIZER_GO
+ static void GetTls(uptr *addr, uptr *size) {
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ # if defined(__x86_64__) || defined(__i386__) || defined(__s390__)
+   *addr = ThreadSelf();
+   *size = GetTlsSize();
+@@ -470,7 +470,7 @@ static void GetTls(uptr *addr, uptr *size) {
+ #elif SANITIZER_OPENBSD
+   *addr = 0;
+   *size = 0;
+-#elif SANITIZER_ANDROID
++#elif SANITIZER_ANDROID || SANITIZER_NONGNU
+   *addr = 0;
+   *size = 0;
+ #elif SANITIZER_SOLARIS
+@@ -486,7 +486,7 @@ static void GetTls(uptr *addr, uptr *size) {
+ #if !SANITIZER_GO
+ uptr GetTlsSize() {
+ #if SANITIZER_FREEBSD || SANITIZER_ANDROID || SANITIZER_NETBSD ||              \
+-    SANITIZER_OPENBSD || SANITIZER_SOLARIS
++    SANITIZER_OPENBSD || SANITIZER_SOLARIS || SANITIZER_NONGNU
+   uptr addr, size;
+   GetTls(&addr, &size);
+   return size;
+diff --git a/lib/sanitizer_common/sanitizer_platform.h b/lib/sanitizer_common/sanitizer_platform.h
+index d81e25580..e10680ac8 100644
+--- a/lib/sanitizer_common/sanitizer_platform.h
++++ b/lib/sanitizer_common/sanitizer_platform.h
+@@ -208,6 +208,12 @@
+ # define SANITIZER_SOLARIS32 0
+ #endif
+ 
++#if defined(__linux__) && !defined(__GLIBC__)
++# define SANITIZER_NONGNU 1
++#else
++# define SANITIZER_NONGNU 0
++#endif
++
+ #if defined(__myriad2__)
+ # define SANITIZER_MYRIAD2 1
+ #else
+diff --git a/lib/sanitizer_common/sanitizer_platform_interceptors.h b/lib/sanitizer_common/sanitizer_platform_interceptors.h
+index f95539a73..6c53b3415 100644
+--- a/lib/sanitizer_common/sanitizer_platform_interceptors.h
++++ b/lib/sanitizer_common/sanitizer_platform_interceptors.h
+@@ -39,7 +39,7 @@
+ # include "sanitizer_platform_limits_solaris.h"
+ #endif
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ # define SI_LINUX_NOT_ANDROID 1
+ #else
+ # define SI_LINUX_NOT_ANDROID 0
+@@ -322,7 +322,7 @@
+ #define SANITIZER_INTERCEPT_ETHER_R (SI_FREEBSD || SI_LINUX_NOT_ANDROID)
+ #define SANITIZER_INTERCEPT_SHMCTL          \
+   (SI_NETBSD || SI_OPENBSD || SI_SOLARIS || \
+-  ((SI_FREEBSD || SI_LINUX_NOT_ANDROID) && \
++  ((SI_FREEBSD || SI_LINUX_NOT_ANDROID || SANITIZER_NONGNU) && \
+     SANITIZER_WORDSIZE == 64))  // NOLINT
+ #define SANITIZER_INTERCEPT_RANDOM_R SI_LINUX_NOT_ANDROID
+ #define SANITIZER_INTERCEPT_PTHREAD_ATTR_GET SI_POSIX
+diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+index 54da635d7..2f6ff69c3 100644
+--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+@@ -14,6 +14,9 @@
+ 
+ #include "sanitizer_platform.h"
+ 
++// Workaround musl <--> linux conflicting definition of 'struct sysinfo'
++#define _LINUX_SYSINFO_H
++
+ #if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_MAC
+ // Tests in this file assume that off_t-dependent data structures match the
+ // libc ABI. For example, struct dirent here is what readdir() function (as
+@@ -138,12 +141,14 @@ typedef struct user_fpregs elf_fpregset_t;
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+ #include <glob.h>
+-#include <obstack.h>
++#  if !SANITIZER_NONGNU
++#    include <obstack.h>
++#  endif
+ #include <mqueue.h>
+-#include <net/if_ppp.h>
+-#include <netax25/ax25.h>
+-#include <netipx/ipx.h>
+-#include <netrom/netrom.h>
++#include <linux/if_ppp.h>
++#include <linux/ax25.h>
++#include <linux/ipx.h>
++#include <linux/netrom.h>
+ #if HAVE_RPC_XDR_H
+ # include <rpc/xdr.h>
+ #elif HAVE_TIRPC_RPC_XDR_H
+@@ -251,7 +256,7 @@ namespace __sanitizer {
+   unsigned struct_itimerspec_sz = sizeof(struct itimerspec);
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   // Use pre-computed size of struct ustat to avoid <sys/ustat.h> which
+   // has been removed from glibc 2.28.
+ #if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \
+@@ -322,7 +327,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(ElfW(Phdr));
+ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+ #endif
+ 
+-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
++#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   int glob_nomatch = GLOB_NOMATCH;
+   int glob_altdirfunc = GLOB_ALTDIRFUNC;
+ #endif
+@@ -416,7 +421,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+   unsigned struct_termios_sz = sizeof(struct termios);
+   unsigned struct_winsize_sz = sizeof(struct winsize);
+ 
+-#if SANITIZER_LINUX
++#if SANITIZER_LINUX && !SANITIZER_NONGNU
+   unsigned struct_arpreq_sz = sizeof(struct arpreq);
+   unsigned struct_cdrom_msf_sz = sizeof(struct cdrom_msf);
+   unsigned struct_cdrom_multisession_sz = sizeof(struct cdrom_multisession);
+@@ -466,7 +471,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+   unsigned struct_vt_mode_sz = sizeof(struct vt_mode);
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct);
+   unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor);
+ #if EV_VERSION > (0x010000)
+@@ -834,7 +839,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+   unsigned IOCTL_VT_WAITACTIVE = VT_WAITACTIVE;
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH;
+   unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT;
+   unsigned IOCTL_CYGETMON = CYGETMON;
+@@ -989,7 +994,7 @@ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phdr);
+ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phnum);
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
++#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ CHECK_TYPE_SIZE(glob_t);
+ CHECK_SIZE_AND_OFFSET(glob_t, gl_pathc);
+ CHECK_SIZE_AND_OFFSET(glob_t, gl_pathv);
+@@ -1023,6 +1028,7 @@ CHECK_TYPE_SIZE(iovec);
+ CHECK_SIZE_AND_OFFSET(iovec, iov_base);
+ CHECK_SIZE_AND_OFFSET(iovec, iov_len);
+ 
++#if !SANITIZER_NONGNU
+ CHECK_TYPE_SIZE(msghdr);
+ CHECK_SIZE_AND_OFFSET(msghdr, msg_name);
+ CHECK_SIZE_AND_OFFSET(msghdr, msg_namelen);
+@@ -1036,6 +1042,7 @@ CHECK_TYPE_SIZE(cmsghdr);
+ CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_len);
+ CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_level);
+ CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_type);
++#endif
+ 
+ #ifndef __GLIBC_PREREQ
+ #define __GLIBC_PREREQ(x, y) 0
+@@ -1145,7 +1152,7 @@ CHECK_SIZE_AND_OFFSET(mntent, mnt_passno);
+ 
+ CHECK_TYPE_SIZE(ether_addr);
+ 
+-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
++#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ CHECK_TYPE_SIZE(ipc_perm);
+ # if SANITIZER_FREEBSD
+ CHECK_SIZE_AND_OFFSET(ipc_perm, key);
+@@ -1206,7 +1213,7 @@ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_dstaddr);
+ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_data);
+ #endif
+ 
+-#if SANITIZER_LINUX
++#if SANITIZER_LINUX && !SANITIZER_NONGNU
+ COMPILER_CHECK(sizeof(__sanitizer_mallinfo) == sizeof(struct mallinfo));
+ #endif
+ 
+@@ -1256,7 +1263,7 @@ COMPILER_CHECK(__sanitizer_XDR_DECODE == XDR_DECODE);
+ COMPILER_CHECK(__sanitizer_XDR_FREE == XDR_FREE);
+ #endif
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ COMPILER_CHECK(sizeof(__sanitizer_FILE) <= sizeof(FILE));
+ CHECK_SIZE_AND_OFFSET(FILE, _flags);
+ CHECK_SIZE_AND_OFFSET(FILE, _IO_read_ptr);
+@@ -1275,7 +1282,7 @@ CHECK_SIZE_AND_OFFSET(FILE, _chain);
+ CHECK_SIZE_AND_OFFSET(FILE, _fileno);
+ #endif
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ COMPILER_CHECK(sizeof(__sanitizer__obstack_chunk) <= sizeof(_obstack_chunk));
+ CHECK_SIZE_AND_OFFSET(_obstack_chunk, limit);
+ CHECK_SIZE_AND_OFFSET(_obstack_chunk, prev);
+diff --git a/lib/tsan/rtl/tsan_platform_linux.cc b/lib/tsan/rtl/tsan_platform_linux.cc
+index de989b780..51a97b554 100644
+--- a/lib/tsan/rtl/tsan_platform_linux.cc
++++ b/lib/tsan/rtl/tsan_platform_linux.cc
+@@ -294,7 +294,7 @@ void InitializePlatform() {
+ // This is required to properly "close" the fds, because we do not see internal
+ // closes within glibc. The code is a pure hack.
+ int ExtractResolvFDs(void *state, int *fds, int nfd) {
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   int cnt = 0;
+   struct __res_state *statp = (struct __res_state*)state;
+   for (int i = 0; i < MAXNS && cnt < nfd; i++) {
+-- 
+2.19.0
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/bintools.nix b/nixpkgs/pkgs/development/compilers/llvm/8/bintools.nix
new file mode 100644
index 000000000000..72a2a7331930
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/bintools.nix
@@ -0,0 +1,19 @@
+{ runCommand, stdenv, llvm, lld, version }:
+
+let
+  prefix =
+    if stdenv.hostPlatform != stdenv.targetPlatform
+    then "${stdenv.targetPlatform.config}-"
+    else "";
+in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } ''
+   mkdir -p $out/bin
+   for prog in ${lld}/bin/*; do
+     ln -s $prog $out/bin/${prefix}$(basename $prog)
+   done
+   for prog in ${llvm}/bin/*; do
+     ln -s $prog $out/bin/${prefix}$(echo $(basename $prog) | sed -e "s|llvm-||")
+     ln -sf $prog $out/bin/${prefix}$(basename $prog)
+   done
+   rm -f $out/bin/${prefix}cat
+   ln -s ${lld}/bin/lld $out/bin/${prefix}ld
+''
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/clang/HIP-use-PATH-8.patch b/nixpkgs/pkgs/development/compilers/llvm/8/clang/HIP-use-PATH-8.patch
new file mode 100644
index 000000000000..f4be100d1ab9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/clang/HIP-use-PATH-8.patch
@@ -0,0 +1,80 @@
+From d9f1b7d7571b252e0ba2359ae6cfa93a9903c0e7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Holger=20W=C3=BCnsche?= <holger.o.wuensche@t-online.de>
+Date: Tue, 21 Jan 2020 19:49:44 +0100
+Subject: [PATCH] [HIP] use GetProgramPath for executable discovery
+
+This change replaces the manual building of executable paths
+using llvm::sys::path::append with GetProgramPath.
+This enables adding other paths in case executables reside
+in different directories and makes the code easier to read.
+
+Differential Revision: https://reviews.llvm.org/D72903
+---
+ clang/lib/Driver/ToolChains/HIP.cpp | 23 ++++++++---------------
+ 1 file changed, 8 insertions(+), 15 deletions(-)
+
+diff --git a/lib/Driver/ToolChains/HIP.cpp b/lang/lib/Driver/ToolChains/HIP.cpp
+index 868765cf88e..31f2d68ec6c 100644
+--- a/lib/Driver/ToolChains/HIP.cpp
++++ b/lib/Driver/ToolChains/HIP.cpp
+@@ -104,9 +104,8 @@ const char *AMDGCN::Linker::constructLLVMLinkCommand(
+   const char *OutputFileName =
+       C.addTempFile(C.getArgs().MakeArgString(TmpName));
+   CmdArgs.push_back(OutputFileName);
+-  SmallString<128> ExecPath(C.getDriver().Dir);
+-  llvm::sys::path::append(ExecPath, "llvm-link");
+-  const char *Exec = Args.MakeArgString(ExecPath);
++  const char *Exec =
++      Args.MakeArgString(getToolChain().GetProgramPath("llvm-link"));
+   C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+   return OutputFileName;
+ }
+@@ -147,9 +146,8 @@ const char *AMDGCN::Linker::constructOptCommand(
+   const char *OutputFileName =
+       C.addTempFile(C.getArgs().MakeArgString(TmpFileName));
+   OptArgs.push_back(OutputFileName);
+-  SmallString<128> OptPath(C.getDriver().Dir);
+-  llvm::sys::path::append(OptPath, "opt");
+-  const char *OptExec = Args.MakeArgString(OptPath);
++  const char *OptExec =
++      Args.MakeArgString(getToolChain().GetProgramPath("opt"));
+   C.addCommand(llvm::make_unique<Command>(JA, *this, OptExec, OptArgs, Inputs));
+   return OutputFileName;
+ }
+@@ -167,9 +165,7 @@ const char *AMDGCN::Linker::constructLlcCommand(
+   const char *LlcOutputFile =
+       C.addTempFile(C.getArgs().MakeArgString(LlcOutputFileName));
+   LlcArgs.push_back(LlcOutputFile);
+-  SmallString<128> LlcPath(C.getDriver().Dir);
+-  llvm::sys::path::append(LlcPath, "llc");
+-  const char *Llc = Args.MakeArgString(LlcPath);
++  const char *Llc = Args.MakeArgString(getToolChain().GetProgramPath("llc"));
+   C.addCommand(llvm::make_unique<Command>(JA, *this, Llc, LlcArgs, Inputs));
+   return LlcOutputFile;
+ }
+@@ -184,9 +180,7 @@ void AMDGCN::Linker::constructLldCommand(Compilation &C, const JobAction &JA,
+   ArgStringList LldArgs{"-flavor",    "gnu", "--no-undefined",
+                         "-shared",    "-o",  Output.getFilename(),
+                         InputFileName};
+-  SmallString<128> LldPath(C.getDriver().Dir);
+-  llvm::sys::path::append(LldPath, "lld");
+-  const char *Lld = Args.MakeArgString(LldPath);
++  const char *Lld = Args.MakeArgString(getToolChain().GetProgramPath("lld"));
+   C.addCommand(llvm::make_unique<Command>(JA, *this, Lld, LldArgs, Inputs));
+ }
+ 
+@@ -218,9 +212,8 @@ void AMDGCN::constructHIPFatbinCommand(Compilation &C, const JobAction &JA,
+       Args.MakeArgString(std::string("-outputs=").append(OutputFileName));
+   BundlerArgs.push_back(BundlerOutputArg);
+ 
+-  SmallString<128> BundlerPath(C.getDriver().Dir);
+-  llvm::sys::path::append(BundlerPath, "clang-offload-bundler");
+-  const char *Bundler = Args.MakeArgString(BundlerPath);
++  const char *Bundler = Args.MakeArgString(
++          T.getToolChain().GetProgramPath("clang-offload-bundler"));
+   C.addCommand(llvm::make_unique<Command>(JA, T, Bundler, BundlerArgs, Inputs));
+ }
+ 
+-- 
+2.23.1
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/clang/clang-xpc.patch b/nixpkgs/pkgs/development/compilers/llvm/8/clang/clang-xpc.patch
new file mode 100644
index 000000000000..eb57d3458228
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/clang/clang-xpc.patch
@@ -0,0 +1,41 @@
+From 61c9b97d7b81cc2c013b423bf1763a92b14fcae3 Mon Sep 17 00:00:00 2001
+From: Jan Korous <jkorous@apple.com>
+Date: Tue, 26 Mar 2019 03:48:25 +0000
+Subject: [PATCH] [clangd][xpc][cmake] Respect explicit value of
+ CLANGD_BUILD_XPC
+
+We shouldn't prevent user from disabling XPC framework build on Darwin.
+However, by keeping it on by default our CI systems also test
+it by default on macOS.
+
+Based on user request:
+http://lists.llvm.org/pipermail/cfe-dev/2019-March/061778.html
+
+Differential Revision: https://reviews.llvm.org/D59808
+
+git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@356974 91177308-0d34-0410-b5e6-96231b3b80d8
+---
+ CMakeLists.txt | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 66ebeaeeaa..514b17fb3c 100644
+--- a/tools/extra/CMakeLists.txt
++++ b/tools/extra/CMakeLists.txt
+@@ -1,6 +1,13 @@
+-option(CLANGD_BUILD_XPC "Build XPC Support For Clangd." OFF)
+-if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+-  set(CLANGD_BUILD_XPC ON CACHE BOOL "" FORCE)
++if (NOT DEFINED CLANGD_BUILD_XPC)
++  if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
++    set(CLANGD_BUILD_XPC_DEFAULT ON)
++  else ()
++    set(CLANGD_BUILD_XPC_DEFAULT OFF)
++  endif ()
++
++  set(CLANGD_BUILD_XPC ${CLANGD_BUILD_XPC_DEFAULT} CACHE BOOL "Build XPC Support For Clangd." FORCE)
++
++  unset(CLANGD_BUILD_XPC_DEFAULT)
+ endif ()
+ 
+ add_subdirectory(clang-apply-replacements)
\ No newline at end of file
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/clang/compiler-rt-baremetal.patch b/nixpkgs/pkgs/development/compilers/llvm/8/clang/compiler-rt-baremetal.patch
new file mode 100644
index 000000000000..a4a0f21b0fcd
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/clang/compiler-rt-baremetal.patch
@@ -0,0 +1,53 @@
+Index: lib/Driver/ToolChains/BareMetal.cpp
+===================================================================
+--- a/lib/Driver/ToolChains/BareMetal.cpp
++++ b/lib/Driver/ToolChains/BareMetal.cpp
+@@ -157,7 +157,7 @@
+ void BareMetal::AddLinkRuntimeLib(const ArgList &Args,
+                                   ArgStringList &CmdArgs) const {
+   CmdArgs.push_back(Args.MakeArgString("-lclang_rt.builtins-" +
+-                                       getTriple().getArchName() + ".a"));
++                                       getTriple().getArchName()));
+ }
+ 
+ void baremetal::Linker::ConstructJob(Compilation &C, const JobAction &JA,
+Index: test/Driver/baremetal.cpp
+===================================================================
+--- a/test/Driver/baremetal.cpp
++++ b/test/Driver/baremetal.cpp
+@@ -13,7 +13,7 @@
+ // CHECK-V6M-C-NEXT: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic"
+ // CHECK-V6M-C-SAME: "-L[[RESOURCE_DIR:[^"]+]]{{[/\\]+}}lib{{[/\\]+}}baremetal"
+ // CHECK-V6M-C-SAME: "-T" "semihosted.lds" "-Lsome{{[/\\]+}}directory{{[/\\]+}}user{{[/\\]+}}asked{{[/\\]+}}for"
+-// CHECK-V6M-C-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m.a"
++// CHECK-V6M-C-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m"
+ // CHECK-V6M-C-SAME: "-o" "{{.*}}.o"
+ 
+ // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+@@ -35,7 +35,7 @@
+ // CHECK-V6M-DEFAULTCXX: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic"
+ // CHECK-V6M-DEFAULTCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}lib{{(64)?}}{{[/\\]+}}clang{{[/\\]+}}{{.*}}{{[/\\]+}}lib{{[/\\]+}}baremetal"
+ // CHECK-V6M-DEFAULTCXX-SAME: "-lc++" "-lc++abi" "-lunwind"
+-// CHECK-V6M-DEFAULTCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m.a"
++// CHECK-V6M-DEFAULTCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m"
+ // CHECK-V6M-DEFAULTCXX-SAME: "-o" "{{.*}}.o"
+ 
+ // RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+@@ -48,7 +48,7 @@
+ // CHECK-V6M-LIBCXX: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic"
+ // CHECK-V6M-LIBCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}lib{{(64)?}}{{[/\\]+}}clang{{[/\\]+}}{{.*}}{{[/\\]+}}lib{{[/\\]+}}baremetal"
+ // CHECK-V6M-LIBCXX-SAME: "-lc++" "-lc++abi" "-lunwind"
+-// CHECK-V6M-LIBCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m.a"
++// CHECK-V6M-LIBCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m"
+ // CHECK-V6M-LIBCXX-SAME: "-o" "{{.*}}.o"
+ 
+ // RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+@@ -61,7 +61,7 @@
+ // CHECK-V6M-LIBSTDCXX: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic"
+ // CHECK-V6M-LIBSTDCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}lib{{(64)?}}{{[/\\]+}}clang{{[/\\]+}}{{.*}}{{[/\\]+}}lib{{[/\\]+}}baremetal"
+ // CHECK-V6M-LIBSTDCXX-SAME: "-lstdc++" "-lsupc++" "-lunwind"
+-// CHECK-V6M-LIBSTDCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m.a"
++// CHECK-V6M-LIBSTDCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m"
+ // CHECK-V6M-LIBSTDCXX-SAME: "-o" "{{.*}}.o"
+ 
+ // RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/clang/default.nix b/nixpkgs/pkgs/development/compilers/llvm/8/clang/default.nix
new file mode 100644
index 000000000000..3b398628e567
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/clang/default.nix
@@ -0,0 +1,129 @@
+{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python3, lld
+, fixDarwinDylibNames
+, enableManpages ? false
+, enablePolly ? false # TODO: get this info from llvm (passthru?)
+}:
+
+let
+  self = stdenv.mkDerivation ({
+    pname = "clang";
+    inherit version;
+
+    src = fetch "cfe" "0ihnbdl058gvl2wdy45p5am55bq8ifx8m9mhcsgj9ax8yxlzvvvh";
+
+    unpackPhase = ''
+      unpackFile $src
+      mv cfe-${version}* clang
+      sourceRoot=$PWD/clang
+      unpackFile ${clang-tools-extra_src}
+      mv clang-tools-extra-* $sourceRoot/tools/extra
+    '';
+
+    nativeBuildInputs = [ cmake python3 ]
+      ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx;
+
+    buildInputs = [ libxml2 llvm lld ]
+      ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+    cmakeFlags = [
+      "-DCMAKE_CXX_FLAGS=-std=c++11"
+      "-DCLANGD_BUILD_XPC=OFF"
+    ] ++ stdenv.lib.optionals enableManpages [
+      "-DCLANG_INCLUDE_DOCS=ON"
+      "-DLLVM_ENABLE_SPHINX=ON"
+      "-DSPHINX_OUTPUT_MAN=ON"
+      "-DSPHINX_OUTPUT_HTML=OFF"
+      "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+    ] ++ stdenv.lib.optionals enablePolly [
+      "-DWITH_POLLY=ON"
+      "-DLINK_POLLY_INTO_TOOLS=ON"
+    ];
+
+    patches = [
+      ./purity.patch
+      ./clang-xpc.patch
+      # Backport for -static-pie, which the latter touches, and which is nice in
+      # its own right.
+      ./static-pie.patch
+      # Backport for the `--unwindlib=[libgcc|compiler-rt]` flag, which is
+      # needed for our bootstrapping to not interfere with C.
+      ./unwindlib.patch
+      # https://reviews.llvm.org/D51899
+      ./compiler-rt-baremetal.patch
+      # make clang -xhip use $PATH to find executables
+      ./HIP-use-PATH-8.patch
+    ];
+
+    postPatch = ''
+      sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' \
+             -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' \
+             lib/Driver/ToolChains/*.cpp
+
+      # Patch for standalone doc building
+      sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt
+    '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
+      sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
+    '' + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
+      substituteInPlace tools/extra/clangd/CMakeLists.txt \
+        --replace "NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB" FALSE
+    '';
+
+    outputs = [ "out" "lib" "python" ];
+
+    # Clang expects to find LLVMgold in its own prefix
+    postInstall = ''
+      if [ -e ${llvm}/lib/LLVMgold.so ]; then
+        ln -sv ${llvm}/lib/LLVMgold.so $out/lib
+      fi
+
+      ln -sv $out/bin/clang $out/bin/cpp
+
+      # Move libclang to 'lib' output
+      moveToOutput "lib/libclang.*" "$lib"
+      substituteInPlace $out/lib/cmake/clang/ClangTargets-release.cmake \
+          --replace "\''${_IMPORT_PREFIX}/lib/libclang." "$lib/lib/libclang."
+
+      mkdir -p $python/bin $python/share/clang/
+      mv $out/bin/{git-clang-format,scan-view} $python/bin
+      if [ -e $out/bin/set-xcode-analyzer ]; then
+        mv $out/bin/set-xcode-analyzer $python/bin
+      fi
+      mv $out/share/clang/*.py $python/share/clang
+      rm $out/bin/c-index-test
+    '';
+
+    enableParallelBuilding = true;
+
+    passthru = {
+      isClang = true;
+      inherit llvm;
+    } // stdenv.lib.optionalAttrs (stdenv.targetPlatform.isLinux || (stdenv.cc.isGNU && stdenv.cc.cc ? gcc)) {
+      gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
+    };
+
+    meta = {
+      description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
+      homepage    = "https://llvm.org/";
+      license     = stdenv.lib.licenses.ncsa;
+      platforms   = stdenv.lib.platforms.all;
+    };
+  } // stdenv.lib.optionalAttrs enableManpages {
+    pname = "clang-manpages";
+
+    buildPhase = ''
+      make docs-clang-man
+    '';
+
+    installPhase = ''
+      mkdir -p $out/share/man/man1
+      # Manually install clang manpage
+      cp docs/man/*.1 $out/share/man/man1/
+    '';
+
+    outputs = [ "out" ];
+
+    doCheck = false;
+
+    meta.description = "man page for Clang ${version}";
+  });
+in self
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/clang/purity.patch b/nixpkgs/pkgs/development/compilers/llvm/8/clang/purity.patch
new file mode 100644
index 000000000000..b30d0d0b5d5b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/clang/purity.patch
@@ -0,0 +1,30 @@
+From 4add81bba40dcec62c4ea4481be8e35ac53e89d8 Mon Sep 17 00:00:00 2001
+From: Will Dietz <w@wdtz.org>
+Date: Thu, 18 May 2017 11:56:12 -0500
+Subject: [PATCH] "purity" patch for 5.0
+
+---
+ lib/Driver/ToolChains/Gnu.cpp | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
+index fe3c0191bb..c6a482bece 100644
+--- a/lib/Driver/ToolChains/Gnu.cpp
++++ b/lib/Driver/ToolChains/Gnu.cpp
+@@ -494,13 +494,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
+   if (!Args.hasArg(options::OPT_static)) {
+     if (Args.hasArg(options::OPT_rdynamic))
+       CmdArgs.push_back("-export-dynamic");
+-
+-    if (!Args.hasArg(options::OPT_shared)) {
+-      const std::string Loader =
+-          D.DyldPrefix + ToolChain.getDynamicLinker(Args);
+-      CmdArgs.push_back("-dynamic-linker");
+-      CmdArgs.push_back(Args.MakeArgString(Loader));
+-    }
+   }
+ 
+   CmdArgs.push_back("-o");
+-- 
+2.11.0
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/clang/static-pie.patch b/nixpkgs/pkgs/development/compilers/llvm/8/clang/static-pie.patch
new file mode 100644
index 000000000000..d1f86a162327
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/clang/static-pie.patch
@@ -0,0 +1,157 @@
+commit 7a9842bc92921e79b84630045276861be90b2d47
+Author: Siva Chandra <sivachandra@google.com>
+Date:   Wed Feb 20 19:07:04 2019 +0000
+
+    [Clang Driver] Add support for "-static-pie" argument to the Clang driver.
+    
+    Summary: This change mimics GCC's support for the "-static-pie" argument.
+    
+    Subscribers: cfe-commits
+    
+    Tags: #clang
+    
+    Differential Revision: https://reviews.llvm.org/D58307
+    
+    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@354502 91177308-0d34-0410-b5e6-96231b3b80d8
+    (cherry picked from commit 7d6cd7825e6883f8650e32b07f3750824c2cef62)
+
+diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td
+index d02d9744d7..75a21e66c7 100644
+--- a/include/clang/Driver/Options.td
++++ b/include/clang/Driver/Options.td
+@@ -2502,6 +2502,7 @@ def pthread : Flag<["-"], "pthread">, Flags<[CC1Option]>,
+ def no_pthread : Flag<["-"], "no-pthread">, Flags<[CC1Option]>;
+ def p : Flag<["-"], "p">;
+ def pie : Flag<["-"], "pie">;
++def static_pie : Flag<["-"], "static-pie">;
+ def read__only__relocs : Separate<["-"], "read_only_relocs">;
+ def remap : Flag<["-"], "remap">;
+ def rewrite_objc : Flag<["-"], "rewrite-objc">, Flags<[DriverOption,CC1Option]>,
+diff --git a/lib/Driver/ToolChains/CommonArgs.cpp b/lib/Driver/ToolChains/CommonArgs.cpp
+index d7e316befa..85ffc1618d 100644
+--- a/lib/Driver/ToolChains/CommonArgs.cpp
++++ b/lib/Driver/ToolChains/CommonArgs.cpp
+@@ -1138,19 +1138,22 @@ static void AddLibgcc(const llvm::Triple &Triple, const Driver &D,
+   bool isCygMing = Triple.isOSCygMing();
+   bool IsIAMCU = Triple.isOSIAMCU();
+   bool StaticLibgcc = Args.hasArg(options::OPT_static_libgcc) ||
+-                      Args.hasArg(options::OPT_static);
++                      Args.hasArg(options::OPT_static) ||
++                      Args.hasArg(options::OPT_static_pie);
+ 
+   bool SharedLibgcc = Args.hasArg(options::OPT_shared_libgcc);
+   bool UnspecifiedLibgcc = !StaticLibgcc && !SharedLibgcc;
+ 
+   // Gcc adds libgcc arguments in various ways:
+   //
+-  // gcc <none>: -lgcc --as-needed -lgcc_s --no-as-needed
+-  // g++ <none>:                   -lgcc_s               -lgcc
+-  // gcc shared:                   -lgcc_s               -lgcc
+-  // g++ shared:                   -lgcc_s               -lgcc
+-  // gcc static: -lgcc             -lgcc_eh
+-  // g++ static: -lgcc             -lgcc_eh
++  // gcc <none>:     -lgcc --as-needed -lgcc_s --no-as-needed
++  // g++ <none>:                       -lgcc_s               -lgcc
++  // gcc shared:                       -lgcc_s               -lgcc
++  // g++ shared:                       -lgcc_s               -lgcc
++  // gcc static:     -lgcc             -lgcc_eh
++  // g++ static:     -lgcc             -lgcc_eh
++  // gcc static-pie: -lgcc             -lgcc_eh
++  // g++ static-pie: -lgcc             -lgcc_eh
+   //
+   // Also, certain targets need additional adjustments.
+ 
+diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
+index 69dba8fec8..0faa0bb473 100644
+--- a/lib/Driver/ToolChains/Gnu.cpp
++++ b/lib/Driver/ToolChains/Gnu.cpp
+@@ -334,6 +334,7 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
+   const bool isAndroid = ToolChain.getTriple().isAndroid();
+   const bool IsIAMCU = ToolChain.getTriple().isOSIAMCU();
+   const bool IsPIE = getPIE(Args, ToolChain);
++  const bool IsStaticPIE = Args.hasArg(options::OPT_static_pie);
+   const bool HasCRTBeginEndFiles =
+       ToolChain.getTriple().hasEnvironment() ||
+       (ToolChain.getTriple().getVendor() != llvm::Triple::MipsTechnologies);
+@@ -354,6 +355,12 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
+   if (IsPIE)
+     CmdArgs.push_back("-pie");
+ 
++  if (IsStaticPIE) {
++    CmdArgs.push_back("-static");
++    CmdArgs.push_back("-pie");
++    CmdArgs.push_back("--no-dynamic-linker");
++  }
++
+   if (Args.hasArg(options::OPT_rdynamic))
+     CmdArgs.push_back("-export-dynamic");
+ 
+@@ -415,6 +422,8 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
+           crt1 = "gcrt1.o";
+         else if (IsPIE)
+           crt1 = "Scrt1.o";
++        else if (IsStaticPIE)
++          crt1 = "rcrt1.o";
+         else
+           crt1 = "crt1.o";
+       }
+@@ -432,7 +441,7 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
+         crtbegin = isAndroid ? "crtbegin_static.o" : "crtbeginT.o";
+       else if (Args.hasArg(options::OPT_shared))
+         crtbegin = isAndroid ? "crtbegin_so.o" : "crtbeginS.o";
+-      else if (IsPIE)
++      else if (IsPIE || IsStaticPIE)
+         crtbegin = isAndroid ? "crtbegin_dynamic.o" : "crtbeginS.o";
+       else
+         crtbegin = isAndroid ? "crtbegin_dynamic.o" : "crtbegin.o";
+@@ -483,7 +492,7 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
+ 
+   if (!Args.hasArg(options::OPT_nostdlib)) {
+     if (!Args.hasArg(options::OPT_nodefaultlibs)) {
+-      if (Args.hasArg(options::OPT_static))
++      if (Args.hasArg(options::OPT_static) || IsStaticPIE)
+         CmdArgs.push_back("--start-group");
+ 
+       if (NeedsSanitizerDeps)
+@@ -518,7 +527,7 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
+       if (IsIAMCU)
+         CmdArgs.push_back("-lgloss");
+ 
+-      if (Args.hasArg(options::OPT_static))
++      if (Args.hasArg(options::OPT_static) || IsStaticPIE)
+         CmdArgs.push_back("--end-group");
+       else
+         AddRunTimeLibs(ToolChain, D, CmdArgs, Args);
+@@ -535,7 +544,7 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
+       const char *crtend;
+       if (Args.hasArg(options::OPT_shared))
+         crtend = isAndroid ? "crtend_so.o" : "crtendS.o";
+-      else if (IsPIE)
++      else if (IsPIE || IsStaticPIE)
+         crtend = isAndroid ? "crtend_android.o" : "crtendS.o";
+       else
+         crtend = isAndroid ? "crtend_android.o" : "crtend.o";
+diff --git a/test/Driver/linux-ld.c b/test/Driver/linux-ld.c
+index 3ab81be490..800f782523 100644
+--- a/test/Driver/linux-ld.c
++++ b/test/Driver/linux-ld.c
+@@ -176,6 +176,19 @@
+ // CHECK-CLANG-NO-LIBGCC-STATIC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
+ // CHECK-CLANG-NO-LIBGCC-STATIC: "--start-group" "-lgcc" "-lgcc_eh" "-lc" "--end-group"
+ //
++// RUN: %clang -static-pie -no-canonical-prefixes %s -### -o %t.o 2>&1 \
++// RUN:     --target=x86_64-unknown-linux -rtlib=platform \
++// RUN:     --gcc-toolchain="" \
++// RUN:     --sysroot=%S/Inputs/basic_linux_tree \
++// RUN:   | FileCheck --check-prefix=CHECK-CLANG-LD-STATIC-PIE %s
++// CHECK-CLANG-LD-STATIC-PIE: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
++// CHECK-CLANG-LD-STATIC-PIE: "-static"
++// CHECK-CLANG-LD-STATIC-PIE: "-pie"
++// CHECK-CLANG-LD-STATIC-PIE: "--no-dynamic-linker"
++// CHECK-CLANG-LD-STATIC-PIE: "-m" "elf_x86_64"
++// CHECK-CLANG-LD-STATIC-PIE: "{{.*}}rcrt1.o"
++// CHECK-CLANG-LD-STATIC-PIE: "--start-group" "-lgcc" "-lgcc_eh" "-lc" "--end-group"
++//
+ // RUN: %clang -dynamic -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+ // RUN:     --target=x86_64-unknown-linux -rtlib=platform \
+ // RUN:     --gcc-toolchain="" \
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/clang/unwindlib.patch b/nixpkgs/pkgs/development/compilers/llvm/8/clang/unwindlib.patch
new file mode 100644
index 000000000000..6958fce60cef
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/clang/unwindlib.patch
@@ -0,0 +1,372 @@
+commit cd5603a4767277a29d3e67a9c3f2a5d2129cd973
+Author: Sterling Augustine <saugustine@google.com>
+Date:   Tue Mar 19 20:01:59 2019 +0000
+
+    Add --unwindlib=[libgcc|compiler-rt] to parallel --rtlib= [take 2]
+    
+    "clang++ hello.cc --rtlib=compiler-rt"
+    
+    now can works without specifying additional unwind or exception
+    handling libraries.
+    
+    This reworked version of the feature no longer modifies today's default
+    unwind library for compiler-rt: which is nothing. Rather, a user
+    can specify -DCLANG_DEFAULT_UNWINDLIB=libunwind when configuring
+    the compiler.
+    
+    This should address the issues from the previous version.
+    
+    Update tests for new --unwindlib semantics.
+    
+    Differential Revision: https://reviews.llvm.org/D59109
+    
+    git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@356508 91177308-0d34-0410-b5e6-96231b3b80d8
+    (cherry picked from commit 344aa82a52f2fae527f58284567ae305a314f7a8)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index c2016a45ca..edeb2b66a1 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -261,6 +261,24 @@ if (NOT(CLANG_DEFAULT_RTLIB STREQUAL "" OR
+     "Default runtime library to use (\"libgcc\" or \"compiler-rt\", empty for platform default)" FORCE)
+ endif()
+ 
++set(CLANG_DEFAULT_UNWINDLIB "" CACHE STRING
++  "Default unwind library to use (\"none\" \"libgcc\" or \"libunwind\", empty to match runtime library.)")
++if (CLANG_DEFAULT_UNWINDLIB STREQUAL "")
++  if (CLANG_DEFAULT_RTLIB STREQUAL "libgcc")
++    set (CLANG_DEFAULT_UNWINDLIB "libgcc" CACHE STRING "" FORCE)
++  elseif (CLANG_DEFAULT_RTLIBS STREQUAL "libunwind")
++    set (CLANG_DEFAULT_UNWINDLIB "none" CACHE STRING "" FORCE)
++  endif()
++endif()
++
++if (NOT(CLANG_DEFAULT_UNWINDLIB STREQUAL "none" OR
++        CLANG_DEFAULT_UNWINDLIB STREQUAL "libgcc" OR
++        CLANG_DEFAULT_UNWINDLIB STREQUAL "libunwind"))
++  message(WARNING "Resetting default unwindlib to use platform default")
++  set(CLANG_DEFAULT_UNWINDLIB "" CACHE STRING
++    "Default unwind library to use (\"none\" \"libgcc\" or \"libunwind\", empty for none)" FORCE)
++endif()
++
+ set(CLANG_DEFAULT_OBJCOPY "objcopy" CACHE STRING
+   "Default objcopy executable to use.")
+ 
+diff --git a/include/clang/Basic/DiagnosticDriverKinds.td b/include/clang/Basic/DiagnosticDriverKinds.td
+index 5475e28ed7..15971210e4 100644
+--- a/include/clang/Basic/DiagnosticDriverKinds.td
++++ b/include/clang/Basic/DiagnosticDriverKinds.td
+@@ -52,6 +52,10 @@ def err_drv_invalid_rtlib_name : Error<
+   "invalid runtime library name in argument '%0'">;
+ def err_drv_unsupported_rtlib_for_platform : Error<
+   "unsupported runtime library '%0' for platform '%1'">;
++def err_drv_invalid_unwindlib_name : Error<
++  "invalid unwind library name in argument '%0'">;
++def err_drv_incompatible_unwindlib : Error<
++  "--rtlib=libgcc requires --unwindlib=libgcc">;
+ def err_drv_invalid_stdlib_name : Error<
+   "invalid library name in argument '%0'">;
+ def err_drv_invalid_output_with_multiple_archs : Error<
+diff --git a/include/clang/Config/config.h.cmake b/include/clang/Config/config.h.cmake
+index 1d624450b9..2d4cb747e8 100644
+--- a/include/clang/Config/config.h.cmake
++++ b/include/clang/Config/config.h.cmake
+@@ -23,6 +23,9 @@
+ /* Default runtime library to use. */
+ #define CLANG_DEFAULT_RTLIB "${CLANG_DEFAULT_RTLIB}"
+ 
++/* Default unwind library to use. */
++#define CLANG_DEFAULT_UNWINDLIB "${CLANG_DEFAULT_UNWINDLIB}"
++
+ /* Default objcopy to use */
+ #define CLANG_DEFAULT_OBJCOPY "${CLANG_DEFAULT_OBJCOPY}"
+ 
+diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td
+index 75a21e66c7..4da0e54965 100644
+--- a/include/clang/Driver/Options.td
++++ b/include/clang/Driver/Options.td
+@@ -2570,6 +2570,8 @@ def std_EQ : Joined<["-", "--"], "std=">, Flags<[CC1Option]>,
+   }]>;
+ def stdlib_EQ : Joined<["-", "--"], "stdlib=">, Flags<[CC1Option]>,
+   HelpText<"C++ standard library to use">, Values<"libc++,libstdc++,platform">;
++def unwindlib_EQ : Joined<["-", "--"], "unwindlib=">, Flags<[CC1Option]>,
++  HelpText<"Unwind library to use">, Values<"libgcc,unwindlib,platform">;
+ def sub__library : JoinedOrSeparate<["-"], "sub_library">;
+ def sub__umbrella : JoinedOrSeparate<["-"], "sub_umbrella">;
+ def system_header_prefix : Joined<["--"], "system-header-prefix=">,
+diff --git a/include/clang/Driver/ToolChain.h b/include/clang/Driver/ToolChain.h
+index d5f75b8271..4bedf760eb 100644
+--- a/include/clang/Driver/ToolChain.h
++++ b/include/clang/Driver/ToolChain.h
+@@ -100,6 +100,12 @@ public:
+     RLT_Libgcc
+   };
+ 
++  enum UnwindLibType {
++    UNW_None,
++    UNW_CompilerRT,
++    UNW_Libgcc
++  };
++
+   enum RTTIMode {
+     RM_Enabled,
+     RM_Disabled,
+@@ -368,6 +374,10 @@ public:
+     return ToolChain::CST_Libstdcxx;
+   }
+ 
++  virtual UnwindLibType GetDefaultUnwindLibType() const {
++    return ToolChain::UNW_None;
++  }
++
+   virtual std::string getCompilerRTPath() const;
+ 
+   virtual std::string getCompilerRT(const llvm::opt::ArgList &Args,
+@@ -512,6 +522,10 @@ public:
+   // given compilation arguments.
+   virtual CXXStdlibType GetCXXStdlibType(const llvm::opt::ArgList &Args) const;
+ 
++  // GetUnwindLibType - Determine the unwind library type to use with the
++  // given compilation arguments.
++  virtual UnwindLibType GetUnwindLibType(const llvm::opt::ArgList &Args) const;
++
+   /// AddClangCXXStdlibIncludeArgs - Add the clang -cc1 level arguments to set
+   /// the include paths to use for the given C++ standard library type.
+   virtual void
+diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp
+index 88a627eab6..d82423f4a8 100644
+--- a/lib/Driver/ToolChain.cpp
++++ b/lib/Driver/ToolChain.cpp
+@@ -680,6 +680,33 @@ ToolChain::RuntimeLibType ToolChain::GetRuntimeLibType(
+   return GetDefaultRuntimeLibType();
+ }
+ 
++ToolChain::UnwindLibType ToolChain::GetUnwindLibType(
++    const ArgList &Args) const {
++  const Arg *A = Args.getLastArg(options::OPT_unwindlib_EQ);
++  StringRef LibName = A ? A->getValue() : CLANG_DEFAULT_UNWINDLIB;
++
++  if (LibName == "none")
++    return ToolChain::UNW_None;
++  else if (LibName == "platform" || LibName == "") {
++    ToolChain::RuntimeLibType RtLibType = GetRuntimeLibType(Args);
++    if (RtLibType == ToolChain::RLT_CompilerRT)
++      return ToolChain::UNW_None;
++    else if (RtLibType == ToolChain::RLT_Libgcc)
++      return ToolChain::UNW_Libgcc;
++  } else if (LibName == "libunwind") {
++    if (GetRuntimeLibType(Args) == RLT_Libgcc)
++      getDriver().Diag(diag::err_drv_incompatible_unwindlib);
++    return ToolChain::UNW_CompilerRT;
++  } else if (LibName == "libgcc")
++    return ToolChain::UNW_Libgcc;
++
++  if (A)
++    getDriver().Diag(diag::err_drv_invalid_unwindlib_name)
++        << A->getAsString(Args);
++
++  return GetDefaultUnwindLibType();
++}
++
+ ToolChain::CXXStdlibType ToolChain::GetCXXStdlibType(const ArgList &Args) const{
+   const Arg *A = Args.getLastArg(options::OPT_stdlib_EQ);
+   StringRef LibName = A ? A->getValue() : CLANG_DEFAULT_CXX_STDLIB;
+diff --git a/lib/Driver/ToolChains/CommonArgs.cpp b/lib/Driver/ToolChains/CommonArgs.cpp
+index 85ffc1618d..9fd29726a4 100644
+--- a/lib/Driver/ToolChains/CommonArgs.cpp
++++ b/lib/Driver/ToolChains/CommonArgs.cpp
+@@ -1132,47 +1132,80 @@ bool tools::isObjCAutoRefCount(const ArgList &Args) {
+   return Args.hasFlag(options::OPT_fobjc_arc, options::OPT_fno_objc_arc, false);
+ }
+ 
+-static void AddLibgcc(const llvm::Triple &Triple, const Driver &D,
+-                      ArgStringList &CmdArgs, const ArgList &Args) {
+-  bool isAndroid = Triple.isAndroid();
+-  bool isCygMing = Triple.isOSCygMing();
+-  bool IsIAMCU = Triple.isOSIAMCU();
+-  bool StaticLibgcc = Args.hasArg(options::OPT_static_libgcc) ||
+-                      Args.hasArg(options::OPT_static) ||
+-                      Args.hasArg(options::OPT_static_pie);
+-
+-  bool SharedLibgcc = Args.hasArg(options::OPT_shared_libgcc);
+-  bool UnspecifiedLibgcc = !StaticLibgcc && !SharedLibgcc;
+-
+-  // Gcc adds libgcc arguments in various ways:
+-  //
+-  // gcc <none>:     -lgcc --as-needed -lgcc_s --no-as-needed
+-  // g++ <none>:                       -lgcc_s               -lgcc
+-  // gcc shared:                       -lgcc_s               -lgcc
+-  // g++ shared:                       -lgcc_s               -lgcc
+-  // gcc static:     -lgcc             -lgcc_eh
+-  // g++ static:     -lgcc             -lgcc_eh
+-  // gcc static-pie: -lgcc             -lgcc_eh
+-  // g++ static-pie: -lgcc             -lgcc_eh
+-  //
+-  // Also, certain targets need additional adjustments.
++enum class LibGccType { UnspecifiedLibGcc, StaticLibGcc, SharedLibGcc };
++
++static LibGccType getLibGccType(const ArgList &Args) {
++  bool Static = Args.hasArg(options::OPT_static_libgcc) ||
++                Args.hasArg(options::OPT_static) ||
++                Args.hasArg(options::OPT_static_pie);
++
++  bool Shared = Args.hasArg(options::OPT_shared_libgcc);
++  if (Shared)
++    return LibGccType::SharedLibGcc;
++  if (Static)
++    return LibGccType::StaticLibGcc;
++  return LibGccType::UnspecifiedLibGcc;
++}
+ 
+-  bool LibGccFirst = (D.CCCIsCC() && UnspecifiedLibgcc) || StaticLibgcc;
+-  if (LibGccFirst)
+-    CmdArgs.push_back("-lgcc");
++// Gcc adds libgcc arguments in various ways:
++//
++// gcc <none>:     -lgcc --as-needed -lgcc_s --no-as-needed
++// g++ <none>:                       -lgcc_s               -lgcc
++// gcc shared:                       -lgcc_s               -lgcc
++// g++ shared:                       -lgcc_s               -lgcc
++// gcc static:     -lgcc             -lgcc_eh
++// g++ static:     -lgcc             -lgcc_eh
++// gcc static-pie: -lgcc             -lgcc_eh
++// g++ static-pie: -lgcc             -lgcc_eh
++//
++// Also, certain targets need additional adjustments.
++
++static void AddUnwindLibrary(const ToolChain &TC, const Driver &D,
++                             ArgStringList &CmdArgs, const ArgList &Args) {
++  ToolChain::UnwindLibType UNW = TC.GetUnwindLibType(Args);
++  // Targets that don't use unwind libraries.
++  if (TC.getTriple().isAndroid() || TC.getTriple().isOSIAMCU() ||
++      TC.getTriple().isOSBinFormatWasm() ||
++      UNW == ToolChain::UNW_None)
++    return;
+ 
+-  bool AsNeeded = D.CCCIsCC() && UnspecifiedLibgcc && !isAndroid && !isCygMing;
++  LibGccType LGT = getLibGccType(Args);
++  bool AsNeeded = D.CCCIsCC() && LGT == LibGccType::UnspecifiedLibGcc &&
++                  !TC.getTriple().isAndroid() && !TC.getTriple().isOSCygMing();
+   if (AsNeeded)
+     CmdArgs.push_back("--as-needed");
+ 
+-  if ((UnspecifiedLibgcc || SharedLibgcc) && !isAndroid)
+-    CmdArgs.push_back("-lgcc_s");
+-
+-  else if (StaticLibgcc && !isAndroid && !IsIAMCU)
+-    CmdArgs.push_back("-lgcc_eh");
++  switch (UNW) {
++  case ToolChain::UNW_None:
++    return;
++  case ToolChain::UNW_Libgcc: {
++    LibGccType LGT = getLibGccType(Args);
++    if (LGT == LibGccType::UnspecifiedLibGcc || LGT == LibGccType::SharedLibGcc)
++      CmdArgs.push_back("-lgcc_s");
++    else if (LGT == LibGccType::StaticLibGcc)
++      CmdArgs.push_back("-lgcc_eh");
++    break;
++  }
++  case ToolChain::UNW_CompilerRT:
++    CmdArgs.push_back("-lunwind");
++    break;
++  }
+ 
+   if (AsNeeded)
+     CmdArgs.push_back("--no-as-needed");
++}
++
++static void AddLibgcc(const ToolChain &TC, const Driver &D,
++                      ArgStringList &CmdArgs, const ArgList &Args) {
++  bool isAndroid = TC.getTriple().isAndroid();
++
++  LibGccType LGT = getLibGccType(Args);
++  bool LibGccFirst = (D.CCCIsCC() && LGT == LibGccType::UnspecifiedLibGcc) ||
++                     LGT == LibGccType::StaticLibGcc;
++  if (LibGccFirst)
++    CmdArgs.push_back("-lgcc");
++
++  AddUnwindLibrary(TC, D, CmdArgs, Args);
+ 
+   if (!LibGccFirst)
+     CmdArgs.push_back("-lgcc");
+@@ -1182,7 +1215,7 @@ static void AddLibgcc(const llvm::Triple &Triple, const Driver &D,
+   //
+   // NOTE: This fixes a link error on Android MIPS as well.  The non-static
+   // libgcc for MIPS relies on _Unwind_Find_FDE and dl_iterate_phdr from libdl.
+-  if (isAndroid && !StaticLibgcc)
++  if (isAndroid && getLibGccType(Args) != LibGccType::StaticLibGcc)
+     CmdArgs.push_back("-ldl");
+ }
+ 
+@@ -1194,6 +1227,7 @@ void tools::AddRunTimeLibs(const ToolChain &TC, const Driver &D,
+   switch (RLT) {
+   case ToolChain::RLT_CompilerRT:
+     CmdArgs.push_back(TC.getCompilerRTArgString(Args, "builtins"));
++    AddUnwindLibrary(TC, D, CmdArgs, Args);
+     break;
+   case ToolChain::RLT_Libgcc:
+     // Make sure libgcc is not used under MSVC environment by default
+@@ -1205,7 +1239,7 @@ void tools::AddRunTimeLibs(const ToolChain &TC, const Driver &D,
+             << Args.getLastArg(options::OPT_rtlib_EQ)->getValue() << "MSVC";
+       }
+     } else
+-      AddLibgcc(TC.getTriple(), D, CmdArgs, Args);
++      AddLibgcc(TC, D, CmdArgs, Args);
+     break;
+   }
+ }
+diff --git a/test/Driver/compiler-rt-unwind.c b/test/Driver/compiler-rt-unwind.c
+new file mode 100644
+index 0000000000..00024dfa7e
+--- /dev/null
++++ b/test/Driver/compiler-rt-unwind.c
+@@ -0,0 +1,49 @@
++// General tests that the driver handles combinations of --rtlib=XXX and
++// --unwindlib=XXX properly.
++//
++// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
++// RUN:     --target=x86_64-unknown-linux \
++// RUN:     --gcc-toolchain="" \
++// RUN:   | FileCheck --check-prefix=RTLIB-EMPTY %s
++// RTLIB-EMPTY: "{{.*}}lgcc"
++// RTLIB-EMPTY: "{{.*}}-lgcc_s"
++//
++// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
++// RUN:     --target=x86_64-unknown-linux -rtlib=libgcc \
++// RUN:     --gcc-toolchain="" \
++// RUN:   | FileCheck --check-prefix=RTLIB-GCC %s
++// RTLIB-GCC: "{{.*}}lgcc"
++// RTLIB-GCC: "{{.*}}lgcc_s"
++//
++// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
++// RUN:     --target=x86_64-unknown-linux -rtlib=libgcc --unwindlib=libunwind \
++// RUN:     --gcc-toolchain="" \
++// RUN:   | FileCheck --check-prefix=RTLIB-GCC-UNWINDLIB-COMPILER-RT %s
++// RTLIB-GCC-UNWINDLIB-COMPILER-RT: "{{.*}}lgcc"
++// RTLIB-GCC-UNWINDLIB-COMPILER-RT: "{{.*}}lunwind"
++//
++// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1   \
++// RUN:     --target=x86_64-unknown-linux -rtlib=compiler-rt \
++// RUN:     --gcc-toolchain="" \
++// RUN:   | FileCheck --check-prefix=RTLIB-COMPILER-RT %s
++// RTLIB-COMPILER-RT: "{{.*}}libclang_rt.builtins-x86_64.a"
++//
++// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1   \
++// RUN:     --target=x86_64-unknown-linux -rtlib=compiler-rt --unwindlib=libgcc \
++// RUN:     --gcc-toolchain="" \
++// RUN:   | FileCheck --check-prefix=RTLIB-COMPILER-RT-UNWINDLIB-GCC %s
++// RTLIB-COMPILER-RT-UNWINDLIB-GCC: "{{.*}}libclang_rt.builtins-x86_64.a"
++// RTLIB-COMPILER-RT-UNWINDLIB-GCC: "{{.*}}lgcc_s"
++//
++// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1              \
++// RUN:     --target=x86_64-unknown-linux -rtlib=compiler-rt --unwindlib=libgcc \
++// RUN:     -static --gcc-toolchain="" \
++// RUN:   | FileCheck --check-prefix=RTLIB-COMPILER-RT-UNWINDLIB-GCC-STATIC %s
++// RTLIB-COMPILER-RT-UNWINDLIB-GCC-STATIC: "{{.*}}libclang_rt.builtins-x86_64.a"
++// RTLIB-COMPILER-RT-UNWINDLIB-GCC-STATIC: "{{.*}}lgcc_eh"
++//
++// RUN: not %clang -no-canonical-prefixes %s -o %t.o 2> %t.err              \
++// RUN:     --target=x86_64-unknown-linux -rtlib=libgcc --unwindlib=libunwind \
++// RUN:     --gcc-toolchain="" \
++// RUN: FileCheck --input-file=%t.err --check-prefix=RTLIB-GCC-UNWINDLIB-COMPILER_RT %s
++// RTLIB-GCC-UNWINDLIB-COMPILER_RT: "{{[.|\\\n]*}}--rtlib=libgcc requires --unwindlib=libgcc"
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/compiler-rt-armv7l.patch b/nixpkgs/pkgs/development/compilers/llvm/8/compiler-rt-armv7l.patch
new file mode 100644
index 000000000000..89d7f1aec918
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/compiler-rt-armv7l.patch
@@ -0,0 +1,38 @@
+diff -ur compiler-rt-7.1.0.src/cmake/builtin-config-ix.cmake compiler-rt-7.1.0.src-patched/cmake/builtin-config-ix.cmake
+--- compiler-rt-7.1.0.src/cmake/builtin-config-ix.cmake	2018-05-25 06:36:27.000000000 +0900
++++ compiler-rt-7.1.0.src-patched/cmake/builtin-config-ix.cmake	2020-05-09 20:26:33.030608692 +0900
+@@ -24,7 +24,7 @@
+ 
+ 
+ set(ARM64 aarch64)
+-set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k)
++set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k armv7l)
+ set(HEXAGON hexagon)
+ set(X86 i386)
+ set(X86_64 x86_64)
+diff -ur compiler-rt-7.1.0.src/lib/builtins/CMakeLists.txt compiler-rt-7.1.0.src-patched/lib/builtins/CMakeLists.txt
+--- compiler-rt-7.1.0.src/lib/builtins/CMakeLists.txt	2018-07-31 03:18:59.000000000 +0900
++++ compiler-rt-7.1.0.src-patched/lib/builtins/CMakeLists.txt	2020-05-09 20:27:38.893409318 +0900
+@@ -453,6 +453,7 @@
+ set(armv7_SOURCES ${arm_SOURCES})
+ set(armv7s_SOURCES ${arm_SOURCES})
+ set(armv7k_SOURCES ${arm_SOURCES})
++set(armv7l_SOURCES ${arm_SOURCES})
+ set(arm64_SOURCES ${aarch64_SOURCES})
+ 
+ # macho_embedded archs
+@@ -563,12 +564,12 @@
+       set(_arch ${arch})
+       if("${arch}" STREQUAL "armv6m")
+         set(_arch "arm|armv6m")
+-      elseif("${arch}" MATCHES "^(armhf|armv7|armv7s|armv7k|armv7m|armv7em)$")
++      elseif("${arch}" MATCHES "^(armhf|armv7|armv7s|armv7k|armv7l|armv7m|armv7em)$")
+         set(_arch "arm")
+       endif()
+ 
+       # For ARM archs, exclude any VFP builtins if VFP is not supported
+-      if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7m|armv7em)$")
++      if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7l|armv7m|armv7em)$")
+         string(REPLACE ";" " " _TARGET_${arch}_CFLAGS "${TARGET_${arch}_CFLAGS}")
+         check_compile_definition(__VFP_FP__ "${CMAKE_C_FLAGS} ${_TARGET_${arch}_CFLAGS}" COMPILER_RT_HAS_${arch}_VFP)
+         if(NOT COMPILER_RT_HAS_${arch}_VFP)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/compiler-rt-codesign.patch b/nixpkgs/pkgs/development/compilers/llvm/8/compiler-rt-codesign.patch
new file mode 100644
index 000000000000..3cc12b94b200
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/compiler-rt-codesign.patch
@@ -0,0 +1,33 @@
+From 3dec5f3475a26aeb4678627795c4b67c6b7b4785 Mon Sep 17 00:00:00 2001
+From: Will Dietz <w@wdtz.org>
+Date: Tue, 19 Sep 2017 13:13:06 -0500
+Subject: [PATCH] remove codesign use on Apple, disable ios sim testing that
+ needs it
+
+---
+ cmake/Modules/AddCompilerRT.cmake |  8 ------
+ test/asan/CMakeLists.txt          | 52 ---------------------------------------
+ test/tsan/CMakeLists.txt          | 47 -----------------------------------
+ 3 files changed, 107 deletions(-)
+
+diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
+index bc5fb9ff7..b64eb4246 100644
+--- a/cmake/Modules/AddCompilerRT.cmake
++++ b/cmake/Modules/AddCompilerRT.cmake
+@@ -210,14 +210,6 @@ function(add_compiler_rt_runtime name type)
+         set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "")
+         set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib")
+       endif()
+-      if(APPLE)
+-        # Ad-hoc sign the dylibs
+-        add_custom_command(TARGET ${libname}
+-          POST_BUILD  
+-          COMMAND codesign --sign - $<TARGET_FILE:${libname}>
+-          WORKING_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR}
+-        )
+-      endif()
+     endif()
+     install(TARGETS ${libname}
+       ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}
+2.14.1
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/compiler-rt.nix b/nixpkgs/pkgs/development/compilers/llvm/8/compiler-rt.nix
new file mode 100644
index 000000000000..15e55800dc8e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/compiler-rt.nix
@@ -0,0 +1,85 @@
+{ stdenv, version, fetch, cmake, python3, llvm, libcxxabi }:
+
+let
+
+  useLLVM = stdenv.hostPlatform.useLLVM or false;
+  bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
+  inherit (stdenv.hostPlatform) isMusl;
+
+in
+
+stdenv.mkDerivation {
+  pname = "compiler-rt";
+  inherit version;
+  src = fetch "compiler-rt" "0dqqf8f930l8gag4d9qjgn1n0pj0nbv2anviqqhdi1rkhas8z0hi";
+
+  nativeBuildInputs = [ cmake python3 llvm ];
+  buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
+
+  NIX_CFLAGS_COMPILE = [
+    "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0"
+  ];
+
+  cmakeFlags = [
+    "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
+    "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
+    "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
+  ] ++ stdenv.lib.optionals (useLLVM || bareMetal || isMusl) [
+    "-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
+    "-DCOMPILER_RT_BUILD_XRAY=OFF"
+    "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
+    "-DCOMPILER_RT_BUILD_PROFILE=OFF"
+  ] ++ stdenv.lib.optionals (useLLVM || bareMetal) [
+    "-DCMAKE_C_COMPILER_WORKS=ON"
+    "-DCMAKE_CXX_COMPILER_WORKS=ON"
+    "-DCOMPILER_RT_BAREMETAL_BUILD=ON"
+    "-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
+  ] ++ stdenv.lib.optionals (useLLVM) [
+    "-DCOMPILER_RT_BUILD_BUILTINS=ON"
+    "-DCMAKE_C_FLAGS=-nodefaultlibs"
+    #https://stackoverflow.com/questions/53633705/cmake-the-c-compiler-is-not-able-to-compile-a-simple-test-program
+    "-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
+  ] ++ stdenv.lib.optionals (bareMetal) [
+    "-DCOMPILER_RT_OS_DIR=baremetal"
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    ./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
+  ]# ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
+    ++ stdenv.lib.optional (useLLVM) ./crtbegin-and-end.patch
+    ++ stdenv.lib.optional stdenv.hostPlatform.isAarch32 ./compiler-rt-armv7l.patch;
+
+  # TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
+  # to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra
+  # can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd
+  # get no binary cache for the entire platform. If you really find yourself wanting the TSAN, make this controllable by
+  # a flag and turn the flag off during the stdenv build.
+  postPatch = stdenv.lib.optionalString (!stdenv.isDarwin) ''
+    substituteInPlace cmake/builtin-config-ix.cmake \
+      --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)'
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    substituteInPlace cmake/config-ix.cmake \
+      --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
+  '' + stdenv.lib.optionalString (useLLVM) ''
+    substituteInPlace lib/builtins/int_util.c \
+      --replace "#include <stdlib.h>" ""
+    substituteInPlace lib/builtins/clear_cache.c \
+      --replace "#include <assert.h>" ""
+    substituteInPlace lib/builtins/cpu_model.c \
+      --replace "#include <assert.h>" ""
+  '';
+
+  # Hack around weird upsream RPATH bug
+  postInstall = stdenv.lib.optionalString (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isWasm) ''
+    ln -s "$out/lib"/*/* "$out/lib"
+  '' + stdenv.lib.optionalString (useLLVM) ''
+    ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbegin.o
+    ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtend.o
+    ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/crtbeginS.o
+    ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/crtendS.o
+  '';
+
+  enableParallelBuilding = true;
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/crtbegin-and-end.patch b/nixpkgs/pkgs/development/compilers/llvm/8/crtbegin-and-end.patch
new file mode 100644
index 000000000000..e63be181f95c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/crtbegin-and-end.patch
@@ -0,0 +1,595 @@
+Get crtbegin and crtend without compiler GCC! PR is at https://reviews.llvm.org/D28791
+
+Index: compiler-rt/CMakeLists.txt
+===================================================================
+--- compiler-rt/CMakeLists.txt
++++ compiler-rt/CMakeLists.txt
+@@ -29,6 +29,8 @@
+ 
+ option(COMPILER_RT_BUILD_BUILTINS "Build builtins" ON)
+ mark_as_advanced(COMPILER_RT_BUILD_BUILTINS)
++option(COMPILER_RT_BUILD_CRT "Build crtbegin.o/crtend.o" ON)
++mark_as_advanced(COMPILER_RT_BUILD_CRT)
+ option(COMPILER_RT_BUILD_SANITIZERS "Build sanitizers" ON)
+ mark_as_advanced(COMPILER_RT_BUILD_SANITIZERS)
+ option(COMPILER_RT_BUILD_XRAY "Build xray" ON)
+Index: compiler-rt/cmake/Modules/AddCompilerRT.cmake
+===================================================================
+--- compiler-rt/cmake/Modules/AddCompilerRT.cmake
++++ compiler-rt/cmake/Modules/AddCompilerRT.cmake
+@@ -132,7 +132,7 @@
+ # Adds static or shared runtime for a list of architectures and operating
+ # systems and puts it in the proper directory in the build and install trees.
+ # add_compiler_rt_runtime(<name>
+-#                         {STATIC|SHARED}
++#                         {OBJECT|STATIC|SHARED}
+ #                         ARCHS <architectures>
+ #                         OS <os list>
+ #                         SOURCES <source files>
+@@ -144,8 +144,8 @@
+ #                         PARENT_TARGET <convenience parent target>
+ #                         ADDITIONAL_HEADERS <header files>)
+ function(add_compiler_rt_runtime name type)
+-  if(NOT type MATCHES "^(STATIC|SHARED)$")
+-    message(FATAL_ERROR "type argument must be STATIC or SHARED")
++  if(NOT type MATCHES "^(OBJECT|STATIC|SHARED)$")
++    message(FATAL_ERROR "type argument must be OBJECT, STATIC or SHARED")
+     return()
+   endif()
+   cmake_parse_arguments(LIB
+@@ -204,7 +204,10 @@
+         message(FATAL_ERROR "Architecture ${arch} can't be targeted")
+         return()
+       endif()
+-      if(type STREQUAL "STATIC")
++      if(type STREQUAL "OBJECT")
++        set(libname "${name}-${arch}")
++        set(output_name_${libname} ${libname}${COMPILER_RT_OS_SUFFIX})
++      elseif(type STREQUAL "STATIC")
+         set(libname "${name}-${arch}")
+         set_output_name(output_name_${libname} ${name} ${arch})
+       else()
+@@ -270,12 +273,34 @@
+       set(COMPONENT_OPTION COMPONENT ${libname})
+     endif()
+ 
+-    add_library(${libname} ${type} ${sources_${libname}})
+-    set_target_compile_flags(${libname} ${extra_cflags_${libname}})
+-    set_target_link_flags(${libname} ${extra_link_flags_${libname}})
+-    set_property(TARGET ${libname} APPEND PROPERTY
+-                COMPILE_DEFINITIONS ${LIB_DEFS})
+-    set_target_output_directories(${libname} ${output_dir_${libname}})
++    if(type STREQUAL "OBJECT")
++      string(TOUPPER ${CMAKE_BUILD_TYPE} config)
++      get_property(cflags SOURCE ${sources_${libname}} PROPERTY COMPILE_FLAGS)
++      separate_arguments(cflags)
++      add_custom_command(
++          OUTPUT ${output_dir_${libname}}/${libname}.o
++          COMMAND ${CMAKE_C_COMPILER} ${sources_${libname}} ${cflags} ${extra_cflags_${libname}} -c -o ${output_dir_${libname}}/${libname}.o
++          DEPENDS ${sources_${libname}}
++          COMMENT "Building C object ${libname}.o")
++      add_custom_target(${libname} DEPENDS ${output_dir_${libname}}/${libname}.o)
++      install(FILES ${output_dir_${libname}}/${libname}.o
++        DESTINATION ${install_dir_${libname}}
++        ${COMPONENT_OPTION})
++    else()
++      add_library(${libname} ${type} ${sources_${libname}})
++      set_target_compile_flags(${libname} ${extra_cflags_${libname}})
++      set_target_link_flags(${libname} ${extra_link_flags_${libname}})
++      set_property(TARGET ${libname} APPEND PROPERTY
++                   COMPILE_DEFINITIONS ${LIB_DEFS})
++      set_target_output_directories(${libname} ${output_dir_${libname}})
++      install(TARGETS ${libname}
++        ARCHIVE DESTINATION ${install_dir_${libname}}
++                ${COMPONENT_OPTION}
++        LIBRARY DESTINATION ${install_dir_${libname}}
++                ${COMPONENT_OPTION}
++        RUNTIME DESTINATION ${install_dir_${libname}}
++                ${COMPONENT_OPTION})
++    endif()
+     set_target_properties(${libname} PROPERTIES
+         OUTPUT_NAME ${output_name_${libname}})
+     set_target_properties(${libname} PROPERTIES FOLDER "Compiler-RT Runtime")
+@@ -299,13 +324,6 @@
+         )
+       endif()
+     endif()
+-    install(TARGETS ${libname}
+-      ARCHIVE DESTINATION ${install_dir_${libname}}
+-              ${COMPONENT_OPTION}
+-      LIBRARY DESTINATION ${install_dir_${libname}}
+-              ${COMPONENT_OPTION}
+-      RUNTIME DESTINATION ${install_dir_${libname}}
+-              ${COMPONENT_OPTION})
+ 
+     # We only want to generate per-library install targets if you aren't using
+     # an IDE because the extra targets get cluttered in IDEs.
+Index: compiler-rt/cmake/config-ix.cmake
+===================================================================
+--- compiler-rt/cmake/config-ix.cmake
++++ compiler-rt/cmake/config-ix.cmake
+@@ -227,6 +227,7 @@
+     ${ARM32} ${ARM64} ${MIPS32} ${MIPS64} ${S390X})
+ set(ALL_ASAN_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64}
+     ${MIPS32} ${MIPS64} ${PPC64} ${S390X})
++set(ALL_CRT_SUPPORTED_ARCH ${X86} ${X86_64} ${ARM32} ${ARM64})
+ set(ALL_DFSAN_SUPPORTED_ARCH ${X86_64} ${MIPS64} ${ARM64})
+ set(ALL_FUZZER_SUPPORTED_ARCH ${X86_64} ${ARM64})
+ 
+@@ -474,6 +475,7 @@
+     SANITIZER_COMMON_SUPPORTED_ARCH)
+ 
+ else()
++  filter_available_targets(CRT_SUPPORTED_ARCH ${ALL_CRT_SUPPORTED_ARCH})
+   # Architectures supported by compiler-rt libraries.
+   filter_available_targets(SANITIZER_COMMON_SUPPORTED_ARCH
+     ${ALL_SANITIZER_COMMON_SUPPORTED_ARCH})
+@@ -563,6 +565,12 @@
+ 
+ # TODO: Add builtins support.
+ 
++if (CRT_SUPPORTED_ARCH AND OS_NAME MATCHES "Linux")
++  set(COMPILER_RT_HAS_CRT TRUE)
++else()
++  set(COMPILER_RT_HAS_CRT FALSE)
++endif()
++
+ if (COMPILER_RT_HAS_SANITIZER_COMMON AND DFSAN_SUPPORTED_ARCH AND
+     OS_NAME MATCHES "Linux")
+   set(COMPILER_RT_HAS_DFSAN TRUE)
+Index: compiler-rt/lib/CMakeLists.txt
+===================================================================
+--- compiler-rt/lib/CMakeLists.txt
++++ compiler-rt/lib/CMakeLists.txt
+@@ -17,6 +17,10 @@
+   add_subdirectory(builtins)
+ endif()
+ 
++if(COMPILER_RT_BUILD_CRT)
++  add_subdirectory(crt)
++endif()
++
+ function(compiler_rt_build_runtime runtime)
+   string(TOUPPER ${runtime} runtime_uppercase)
+   if(COMPILER_RT_HAS_${runtime_uppercase})
+Index: compiler-rt/lib/crt/CMakeLists.txt
+===================================================================
+--- /dev/null
++++ compiler-rt/lib/crt/CMakeLists.txt
+@@ -0,0 +1,102 @@
++add_compiler_rt_component(crt)
++
++function(check_cxx_section_exists section output)
++  cmake_parse_arguments(ARG "" "" "SOURCE;FLAGS" ${ARGN})
++  if(NOT ARG_SOURCE)
++    set(ARG_SOURCE "int main() { return 0; }\n")
++  endif()
++
++  string(RANDOM TARGET_NAME)
++  set(TARGET_NAME "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/cmTC_${TARGET_NAME}.dir")
++  file(MAKE_DIRECTORY ${TARGET_NAME})
++
++  file(WRITE "${TARGET_NAME}/CheckSectionExists.c" "${ARG_SOURCE}\n")
++
++  string(REGEX MATCHALL "<[A-Za-z0-9_]*>" substitutions
++         ${CMAKE_C_COMPILE_OBJECT})
++
++  set(try_compile_flags "${ARG_FLAGS}")
++  if(CMAKE_C_COMPILER_ID MATCHES Clang AND CMAKE_C_COMPILER_TARGET)
++    list(APPEND try_compile_flags "-target ${CMAKE_C_COMPILER_TARGET}")
++  endif()
++
++  string(REPLACE ";" " " extra_flags "${try_compile_flags}")
++
++  set(test_compile_command "${CMAKE_C_COMPILE_OBJECT}")
++  foreach(substitution ${substitutions})
++    if(substitution STREQUAL "<CMAKE_C_COMPILER>")
++      string(REPLACE "<CMAKE_C_COMPILER>"
++             "${CMAKE_C_COMPILER}" test_compile_command ${test_compile_command})
++    elseif(substitution STREQUAL "<OBJECT>")
++      string(REPLACE "<OBJECT>" "${TARGET_NAME}/CheckSectionExists.o"
++             test_compile_command ${test_compile_command})
++    elseif(substitution STREQUAL "<SOURCE>")
++      string(REPLACE "<SOURCE>" "${TARGET_NAME}/CheckSectionExists.c"
++             test_compile_command ${test_compile_command})
++    elseif(substitution STREQUAL "<FLAGS>")
++      string(REPLACE "<FLAGS>" "${CMAKE_C_FLAGS} ${extra_flags}"
++             test_compile_command ${test_compile_command})
++    else()
++      string(REPLACE "${substitution}" "" test_compile_command
++             ${test_compile_command})
++    endif()
++  endforeach()
++
++  string(REPLACE " " ";" test_compile_command "${test_compile_command}")
++
++  execute_process(
++    COMMAND ${test_compile_command}
++    RESULT_VARIABLE TEST_RESULT
++    OUTPUT_VARIABLE TEST_OUTPUT
++    ERROR_VARIABLE TEST_ERROR
++  )
++
++  execute_process(
++    COMMAND ${CMAKE_OBJDUMP} -h "${TARGET_NAME}/CheckSectionExists.o"
++    RESULT_VARIABLE CHECK_RESULT
++    OUTPUT_VARIABLE CHECK_OUTPUT
++    ERROR_VARIABLE CHECK_ERROR
++  )
++  string(FIND "${CHECK_OUTPUT}" "${section}" SECTION_FOUND)
++
++  if(NOT SECTION_FOUND EQUAL -1)
++    set(${output} TRUE PARENT_SCOPE)
++  else()
++    set(${output} FALSE PARENT_SCOPE)
++  endif()
++
++  file(REMOVE_RECURSE ${TARGET_NAME})
++endfunction()
++
++check_cxx_section_exists(".init_array" COMPILER_RT_HAS_INITFINI_ARRAY
++  SOURCE "__attribute__((constructor)) void f() {}\nint main() { return 0; }\n")
++
++append_list_if(COMPILER_RT_HAS_INITFINI_ARRAY -DCRT_HAS_INITFINI_ARRAY CRT_CFLAGS)
++append_list_if(COMPILER_RT_HAS_FPIC_FLAG -fPIC CRT_CFLAGS)
++
++foreach(arch ${CRT_SUPPORTED_ARCH})
++  add_compiler_rt_runtime(clang_rt.crtbegin
++    OBJECT
++    ARCHS ${arch}
++    SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/crtbegin.c
++    CFLAGS ${CRT_CFLAGS}
++    PARENT_TARGET crt)
++  add_compiler_rt_runtime(clang_rt.crtbegin_shared
++    OBJECT
++    ARCHS ${arch}
++    SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/crtbegin.c
++    CFLAGS ${CRT_CFLAGS} -DCRT_SHARED
++    PARENT_TARGET crt)
++  add_compiler_rt_runtime(clang_rt.crtend
++    OBJECT
++    ARCHS ${arch}
++    SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/crtend.c
++    CFLAGS ${CRT_CFLAGS}
++    PARENT_TARGET crt)
++  add_compiler_rt_runtime(clang_rt.crtend_shared
++    OBJECT
++    ARCHS ${arch}
++    SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/crtend.c
++    CFLAGS ${CRT_CFLAGS} -DCRT_SHARED
++    PARENT_TARGET crt)
++endforeach()
+Index: compiler-rt/lib/crt/crtbegin.c
+===================================================================
+--- /dev/null
++++ compiler-rt/lib/crt/crtbegin.c
+@@ -0,0 +1,108 @@
++/* ===-- crtbegin.c - Start of constructors and destructors ----------------===
++ *
++ *      	       The LLVM Compiler Infrastructure
++ *
++ * This file is dual licensed under the MIT and the University of Illinois Open
++ * Source Licenses. See LICENSE.TXT for details.
++ *
++ * ===----------------------------------------------------------------------===
++ */
++
++#include <stddef.h>
++
++__attribute__((visibility("hidden")))
++#ifdef CRT_SHARED
++void *__dso_handle = &__dso_handle;
++#else
++void *__dso_handle = (void *)0;
++#endif
++
++static long __EH_FRAME_LIST__[]
++    __attribute__((section(".eh_frame"), aligned(sizeof(void *)))) = {};
++
++extern void __register_frame_info(const void *, void *) __attribute__((weak));
++extern void *__deregister_frame_info(const void *) __attribute__((weak));
++
++#ifndef CRT_HAS_INITFINI_ARRAY
++typedef void (*fp)(void);
++
++static fp __CTOR_LIST__[]
++    __attribute__((section(".ctors"), aligned(sizeof(fp)), used)) = {(fp)-1};
++extern fp __CTOR_LIST_END__[];
++#endif
++
++#ifdef CRT_SHARED
++extern void __cxa_finalize(void *) __attribute__((weak));
++#endif
++
++static void __attribute__((used)) __do_init() {
++  static _Bool __initialized;
++  if (__builtin_expect(__initialized, 0))
++    return;
++  __initialized = 1;
++
++  static struct { void *p[8]; } __object;
++  if (__register_frame_info)
++    __register_frame_info(__EH_FRAME_LIST__, &__object);
++
++#ifndef CRT_HAS_INITFINI_ARRAY
++  const size_t n = __CTOR_LIST_END__ - __CTOR_LIST__ - 1;
++  for (size_t i = n; i >= 1; i--) __CTOR_LIST__[i]();
++#endif
++}
++
++#ifdef CRT_HAS_INITFINI_ARRAY
++__attribute__((section(".init_array"),
++               used)) static void (*__init)(void) = __do_init;
++#else  // CRT_HAS_INITFINI_ARRAY
++#if defined(__i386__) || defined(__x86_64__)
++asm(".pushsection .init,\"ax\",@progbits\n\t"
++    "call " __USER_LABEL_PREFIX__ "__do_init\n\t"
++    ".popsection");
++#elif defined(__arm__)
++asm(".pushsection .init,\"ax\",%progbits\n\t"
++    "bl " __USER_LABEL_PREFIX__ "__do_init\n\t"
++    ".popsection");
++#endif  // CRT_HAS_INITFINI_ARRAY
++#endif
++
++#ifndef CRT_HAS_INITFINI_ARRAY
++static fp __DTOR_LIST__[]
++    __attribute__((section(".dtors"), aligned(sizeof(fp)), used)) = {(fp)-1};
++extern fp __DTOR_LIST_END__[];
++#endif
++
++static void __attribute__((used)) __do_fini() {
++  static _Bool __finalized;
++  if (__builtin_expect(__finalized, 0))
++    return;
++  __finalized = 1;
++
++#ifdef CRT_SHARED
++  if (__cxa_finalize)
++    __cxa_finalize(__dso_handle);
++#endif
++
++#ifndef CRT_HAS_INITFINI_ARRAY
++  if (__deregister_frame_info)
++    __deregister_frame_info(__EH_FRAME_LIST__);
++
++  const size_t n = __DTOR_LIST_END__ - __DTOR_LIST__ - 1;
++  for (size_t i = 1; i < n; i++) __DTOR_LIST__[i]();
++#endif
++}
++
++#ifdef CRT_HAS_INITFINI_ARRAY
++__attribute__((section(".fini_array"),
++               used)) static void (*__fini)(void) = __do_fini;
++#else  // CRT_HAS_INITFINI_ARRAY
++#if defined(__i386__) || defined(__x86_64__)
++asm(".pushsection .fini,\"ax\",@progbits\n\t"
++    "call " __USER_LABEL_PREFIX__ "__do_fini\n\t"
++    ".popsection");
++#elif defined(__arm__)
++asm(".pushsection .fini,\"ax\",%progbits\n\t"
++    "bl " __USER_LABEL_PREFIX__ "__do_fini\n\t"
++    ".popsection");
++#endif
++#endif  // CRT_HAS_INIT_FINI_ARRAY
+Index: compiler-rt/lib/crt/crtend.c
+===================================================================
+--- /dev/null
++++ compiler-rt/lib/crt/crtend.c
+@@ -0,0 +1,24 @@
++/* ===-- crtend.c - End of constructors and destructors --------------------===
++ *
++ *      	       The LLVM Compiler Infrastructure
++ *
++ * This file is dual licensed under the MIT and the University of Illinois Open
++ * Source Licenses. See LICENSE.TXT for details.
++ *
++ * ===----------------------------------------------------------------------===
++ */
++
++#include <stdint.h>
++
++// Put 4-byte zero which is the length field in FDE at the end as a terminator.
++const int32_t __EH_FRAME_LIST_END__[]
++    __attribute__((section(".eh_frame"), aligned(sizeof(int32_t)),
++                   visibility("hidden"), used)) = {0};
++
++#ifndef CRT_HAS_INITFINI_ARRAY
++typedef void (*fp)(void);
++fp __CTOR_LIST_END__[]
++    __attribute__((section(".ctors"), visibility("hidden"), used)) = {0};
++fp __DTOR_LIST_END__[]
++    __attribute__((section(".dtors"), visibility("hidden"), used)) = {0};
++#endif
+Index: compiler-rt/test/CMakeLists.txt
+===================================================================
+--- compiler-rt/test/CMakeLists.txt
++++ compiler-rt/test/CMakeLists.txt
+@@ -73,6 +73,9 @@
+   if(COMPILER_RT_BUILD_XRAY)
+     compiler_rt_test_runtime(xray)
+   endif()
++  if(COMPILER_RT_HAS_CRT)
++    add_subdirectory(crt)
++  endif()
+   # ShadowCallStack does not yet provide a runtime with compiler-rt, the tests
+   # include their own minimal runtime
+   add_subdirectory(shadowcallstack)
+Index: compiler-rt/test/crt/CMakeLists.txt
+===================================================================
+--- /dev/null
++++ compiler-rt/test/crt/CMakeLists.txt
+@@ -0,0 +1,31 @@
++set(CRT_LIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
++
++set(CRT_TESTSUITES)
++
++set(CRT_TEST_DEPS "")
++
++if(NOT COMPILER_RT_STANDALONE_BUILD AND COMPILER_RT_BUILD_CRT AND
++   COMPILER_RT_HAS_CRT)
++  list(APPEND CRT_TEST_DEPS crt)
++endif()
++
++set(CRT_TEST_ARCH ${CRT_SUPPORTED_ARCH})
++if (COMPILER_RT_BUILD_CRT AND COMPILER_RT_HAS_CRT)
++  foreach(arch ${CRT_TEST_ARCH})
++    set(CRT_TEST_TARGET_ARCH ${arch})
++    string(TOLOWER "-${arch}-${OS_NAME}" CRT_TEST_CONFIG_SUFFIX)
++    get_test_cc_for_arch(${arch} CRT_TEST_TARGET_CC CRT_TEST_TARGET_CFLAGS)
++    string(TOUPPER ${arch} ARCH_UPPER_CASE)
++    set(CONFIG_NAME ${ARCH_UPPER_CASE}${OS_NAME}Config)
++
++    configure_lit_site_cfg(
++      ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
++      ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME}/lit.site.cfg)
++    list(APPEND CRT_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME})
++  endforeach()
++endif()
++
++add_lit_testsuite(check-crt "Running the CRT tests"
++  ${CRT_TESTSUITES}
++  DEPENDS ${CRT_TEST_DEPS})
++set_target_properties(check-crt PROPERTIES FOLDER "Compiler-RT Misc")
+Index: compiler-rt/test/crt/dso_handle.cpp
+===================================================================
+--- /dev/null
++++ compiler-rt/test/crt/dso_handle.cpp
+@@ -0,0 +1,33 @@
++// RUN: %clangxx -g -DCRT_SHARED -c %s -fPIC -o %tshared.o
++// RUN: %clangxx -g -c %s -fPIC -o %t.o
++// RUN: %clangxx -g -shared -o %t.so -nostdlib %crti %shared_crtbegin %tshared.o %libstdcxx -lc -lm -lgcc_s %shared_crtend %crtn
++// RUN: %clangxx -g -o %t -nostdlib %crt1 %crti %crtbegin %t.o %libstdcxx -lc -lm %libgcc %t.so %crtend %crtn
++// RUN: %run %t 2>&1 | FileCheck %s
++
++#include <stdio.h>
++
++// CHECK: 1
++// CHECK-NEXT: ~A()
++
++#ifdef CRT_SHARED
++bool G;
++void C() {
++  printf("%d\n", G);
++}
++
++struct A {
++  A() { G = true; }
++  ~A() {
++    printf("~A()\n");
++  }
++};
++
++A a;
++#else
++void C();
++
++int main() {
++  C();
++  return 0;
++}
++#endif
+Index: compiler-rt/test/crt/lit.cfg
+===================================================================
+--- /dev/null
++++ compiler-rt/test/crt/lit.cfg
+@@ -0,0 +1,80 @@
++# -*- Python -*-
++
++import os
++import subprocess
++
++# Setup config name.
++config.name = 'CRT' + config.name_suffix
++
++# Setup source root.
++config.test_source_root = os.path.dirname(__file__)
++
++
++def get_library_path(file):
++    cmd = subprocess.Popen([config.clang.strip(),
++                            config.target_cflags.strip(),
++                            '-print-file-name=%s' % file],
++                           stdout=subprocess.PIPE,
++                           env=config.environment)
++    if not cmd.stdout:
++      lit_config.fatal("Couldn't find the library path for '%s'" % file)
++    dir = cmd.stdout.read().strip()
++    if sys.platform in ['win32'] and execute_external:
++        # Don't pass dosish path separator to msys bash.exe.
++        dir = dir.replace('\\', '/')
++    # Ensure the result is an ascii string, across Python2.5+ - Python3.
++    return str(dir.decode('ascii'))
++
++
++def get_libgcc_file_name():
++    cmd = subprocess.Popen([config.clang.strip(),
++                            config.target_cflags.strip(),
++                            '-print-libgcc-file-name'],
++                           stdout=subprocess.PIPE,
++                           env=config.environment)
++    if not cmd.stdout:
++      lit_config.fatal("Couldn't find the library path for '%s'" % file)
++    dir = cmd.stdout.read().strip()
++    if sys.platform in ['win32'] and execute_external:
++        # Don't pass dosish path separator to msys bash.exe.
++        dir = dir.replace('\\', '/')
++    # Ensure the result is an ascii string, across Python2.5+ - Python3.
++    return str(dir.decode('ascii'))
++
++
++def build_invocation(compile_flags):
++    return ' ' + ' '.join([config.clang] + compile_flags) + ' '
++
++
++# Setup substitutions.
++config.substitutions.append(
++    ('%clang ', build_invocation([config.target_cflags])))
++config.substitutions.append(
++    ('%clangxx ',
++     build_invocation(config.cxx_mode_flags + [config.target_cflags])))
++
++base_lib = os.path.join(
++    config.compiler_rt_libdir, "clang_rt.%%s-%s.o" % config.target_arch)
++config.substitutions.append(('%crtbegin', base_lib % "crtbegin"))
++config.substitutions.append(('%shared_crtbegin', base_lib % "crtbegin_shared"))
++config.substitutions.append(('%crtend', base_lib % "crtend"))
++config.substitutions.append(('%shared_crtend', base_lib % "crtend_shared"))
++
++config.substitutions.append(
++    ('%crt1', get_library_path('crt1.o')))
++config.substitutions.append(
++    ('%crti', get_library_path('crti.o')))
++config.substitutions.append(
++    ('%crtn', get_library_path('crtn.o')))
++
++config.substitutions.append(
++    ('%libgcc', get_libgcc_file_name()))
++
++config.substitutions.append(
++    ('%libstdcxx', '-l' + config.sanitizer_cxx_lib.lstrip('lib')))
++
++# Default test suffixes.
++config.suffixes = ['.c', '.cc', '.cpp']
++
++if config.host_os not in ['Linux']:
++    config.unsupported = True
+Index: compiler-rt/test/crt/lit.site.cfg.in
+===================================================================
+--- /dev/null
++++ compiler-rt/test/crt/lit.site.cfg.in
+@@ -0,0 +1,14 @@
++@LIT_SITE_CFG_IN_HEADER@
++
++# Tool-specific config options.
++config.name_suffix = "@CRT_TEST_CONFIG_SUFFIX@"
++config.crt_lit_source_dir = "@CRT_LIT_SOURCE_DIR@"
++config.target_cflags = "@CRT_TEST_TARGET_CFLAGS@"
++config.target_arch = "@CRT_TEST_TARGET_ARCH@"
++config.sanitizer_cxx_lib = "@SANITIZER_TEST_CXX_LIBNAME@"
++
++# Load common config for all compiler-rt lit tests
++lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/test/lit.common.configured")
++
++# Load tool-specific config that would do the real work.
++lit_config.load_config(config, "@CRT_LIT_SOURCE_DIR@/lit.cfg")
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/default.nix b/nixpkgs/pkgs/development/compilers/llvm/8/default.nix
new file mode 100644
index 000000000000..d9383d042bbc
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/default.nix
@@ -0,0 +1,206 @@
+{ lowPrio, newScope, pkgs, stdenv, cmake, gcc, libstdcxxHook
+, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith
+, buildLlvmTools # tools, but from the previous stage, for cross
+, targetLlvmLibraries # libraries, but from the next stage, for cross
+}:
+
+let
+  release_version = "8.0.1";
+  version = release_version; # differentiating these is important for rc's
+  targetConfig = stdenv.targetPlatform.config;
+
+  fetch = name: sha256: fetchurl {
+    url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${release_version}/${name}-${version}.src.tar.xz";
+    inherit sha256;
+  };
+
+  clang-tools-extra_src = fetch "clang-tools-extra" "1qf3097bc5ia8p6cpmbx985rjr3yaah5s8fc0nv7pw742yv7jw8q";
+
+  tools = stdenv.lib.makeExtensible (tools: let
+    callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
+    mkExtraBuildCommands = cc: ''
+      rsrc="$out/resource-root"
+      mkdir "$rsrc"
+      ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc"
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
+      echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
+    '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc && !(stdenv.targetPlatform.useLLVM or false)) ''
+      echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags
+    '';
+  in {
+
+    llvm = callPackage ./llvm.nix { };
+    llvm-polly = callPackage ./llvm.nix { enablePolly = true; };
+
+    clang-unwrapped = callPackage ./clang {
+      inherit (tools) lld;
+      inherit clang-tools-extra_src;
+    };
+    clang-polly-unwrapped = callPackage ./clang {
+      inherit clang-tools-extra_src;
+      llvm = tools.llvm-polly;
+      enablePolly = true;
+    };
+
+    llvm-manpages = lowPrio (tools.llvm.override {
+      enableManpages = true;
+      python3 = pkgs.python3;  # don't use python-boot
+    });
+
+    clang-manpages = lowPrio (tools.clang-unwrapped.override {
+      enableManpages = true;
+      python3 = pkgs.python3;  # don't use python-boot
+    });
+
+    libclang = tools.clang-unwrapped.lib;
+
+    clang = if stdenv.cc.isGNU then tools.libstdcxxClang else tools.libcxxClang;
+
+    libstdcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      extraTools = [
+        libstdcxxHook
+      ];
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = ''
+          echo "-target ${targetConfig}" >> $out/nix-support/cc-cflags
+          echo "-B${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-cflags
+          echo "-L${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-ldflags
+          echo "-L${gcc.cc.lib}/${targetConfig}/lib" >> $out/nix-support/cc-ldflags
+      '' + mkExtraBuildCommands cc;
+    };
+
+    libcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = targetLlvmLibraries.libcxx;
+      extraPackages = [
+        targetLlvmLibraries.libcxx
+        targetLlvmLibraries.libcxxabi
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+    };
+
+    lld = callPackage ./lld.nix {};
+
+    lldb = callPackage ./lldb.nix {};
+
+    # Below, is the LLVM bootstrapping logic. It handles building a
+    # fully LLVM toolchain from scratch. No GCC toolchain should be
+    # pulled in. As a consequence, it is very quick to build different
+    # targets provided by LLVM and we can also build for what GCC
+    # doesn’t support like LLVM. Probably we should move to some other
+    # file.
+
+    bintools = callPackage ./bintools.nix {};
+
+    lldClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = targetLlvmLibraries.libcxx;
+      bintools = wrapBintoolsWith {
+        inherit (tools) bintools;
+      };
+      extraPackages = [
+        targetLlvmLibraries.libcxx
+        targetLlvmLibraries.libcxxabi
+        targetLlvmLibraries.compiler-rt
+      ] ++ stdenv.lib.optionals (!stdenv.targetPlatform.isWasm) [
+        targetLlvmLibraries.libunwind
+      ];
+      extraBuildCommands = ''
+        echo "-target ${stdenv.targetPlatform.config}" >> $out/nix-support/cc-cflags
+        echo "-rtlib=compiler-rt -Wno-unused-command-line-argument" >> $out/nix-support/cc-cflags
+        echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
+      '' + stdenv.lib.optionalString (!stdenv.targetPlatform.isWasm) ''
+        echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags
+      '' + stdenv.lib.optionalString stdenv.targetPlatform.isWasm ''
+        echo "-fno-exceptions" >> $out/nix-support/cc-cflags
+      '' + mkExtraBuildCommands cc;
+    };
+
+    lldClangNoLibcxx = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = wrapBintoolsWith {
+        inherit (tools) bintools;
+      };
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = ''
+        echo "-target ${stdenv.targetPlatform.config}" >> $out/nix-support/cc-cflags
+        echo "-rtlib=compiler-rt" >> $out/nix-support/cc-cflags
+        echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
+        echo "-nostdlib++" >> $out/nix-support/cc-cflags
+      '' + mkExtraBuildCommands cc;
+    };
+
+    lldClangNoLibc = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = wrapBintoolsWith {
+        inherit (tools) bintools;
+        libc = null;
+      };
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = ''
+        echo "-target ${stdenv.targetPlatform.config}" >> $out/nix-support/cc-cflags
+        echo "-rtlib=compiler-rt" >> $out/nix-support/cc-cflags
+        echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
+      '' + mkExtraBuildCommands cc;
+    };
+
+    lldClangNoCompilerRt = wrapCCWith {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = wrapBintoolsWith {
+        inherit (tools) bintools;
+        libc = null;
+      };
+      extraPackages = [ ];
+      extraBuildCommands = ''
+        echo "-nostartfiles" >> $out/nix-support/cc-cflags
+        echo "-target ${stdenv.targetPlatform.config}" >> $out/nix-support/cc-cflags
+      '';
+    };
+
+  });
+
+  libraries = stdenv.lib.makeExtensible (libraries: let
+    callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
+  in {
+
+    compiler-rt = callPackage ./compiler-rt.nix ({} //
+      (stdenv.lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
+        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoCompilerRt;
+      }));
+
+    stdenv = overrideCC stdenv buildLlvmTools.clang;
+
+    libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
+
+    libcxx = callPackage ./libc++ ({} //
+      (stdenv.lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
+        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
+      }));
+
+    libcxxabi = callPackage ./libc++abi.nix ({} //
+      (stdenv.lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
+        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
+        libunwind = libraries.libunwind;
+      }));
+
+    openmp = callPackage ./openmp.nix {};
+
+    libunwind = callPackage ./libunwind.nix ({} //
+      (stdenv.lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
+        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
+      }));
+
+  });
+
+in { inherit tools libraries; } // libraries // tools
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/libc++/default.nix b/nixpkgs/pkgs/development/compilers/llvm/8/libc++/default.nix
new file mode 100644
index 000000000000..24bca6aafcd1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/libc++/default.nix
@@ -0,0 +1,59 @@
+{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version
+, enableShared ? true }:
+
+stdenv.mkDerivation {
+  pname = "libc++";
+  inherit version;
+
+  src = fetch "libcxx" "0y4vc9z36c1zlq15cnibdzxnc1xi5glbc6klnm8a41q3db4541kz";
+
+  postUnpack = ''
+    unpackFile ${libcxxabi.src}
+    export LIBCXXABI_INCLUDE_DIR="$PWD/$(ls -d libcxxabi-${version}*)/include"
+  '';
+
+  patches = stdenv.lib.optional stdenv.hostPlatform.isMusl ../../libcxx-0001-musl-hacks.patch;
+
+  prePatch = ''
+    substituteInPlace lib/CMakeLists.txt --replace "/usr/lib/libc++" "\''${LIBCXX_LIBCXXABI_LIB_PATH}/libc++"
+  '';
+
+  preConfigure = ''
+    # Get headers from the cxxabi source so we can see private headers not installed by the cxxabi package
+    cmakeFlagsArray=($cmakeFlagsArray -DLIBCXX_CXX_ABI_INCLUDE_PATHS="$LIBCXXABI_INCLUDE_DIR")
+  '' + lib.optionalString stdenv.hostPlatform.isMusl ''
+    patchShebangs utils/cat_files.py
+  '';
+  nativeBuildInputs = [ cmake ]
+    ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) python3;
+
+  buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+  cmakeFlags = [
+    "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"
+    "-DLIBCXX_LIBCPPABI_VERSION=2"
+    "-DLIBCXX_CXX_ABI=libcxxabi"
+  ] ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1"
+    ++ stdenv.lib.optional (stdenv.hostPlatform.useLLVM or false) "-DLIBCXX_USE_COMPILER_RT=ON"
+    ++ stdenv.lib.optional stdenv.hostPlatform.isWasm [
+      "-DLIBCXX_ENABLE_THREADS=OFF"
+      "-DLIBCXX_ENABLE_FILESYSTEM=OFF"
+      "-DLIBCXX_ENABLE_EXCEPTIONS=OFF"
+    ] ++ stdenv.lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF";
+
+  enableParallelBuilding = true;
+
+  linkCxxAbi = stdenv.isLinux;
+
+  setupHooks = [
+    ../../../../../build-support/setup-hooks/role.bash
+    ./setup-hook.sh
+  ];
+
+  meta = {
+    homepage = "https://libcxx.llvm.org/";
+    description = "A new implementation of the C++ standard library, targeting C++11";
+    license = with stdenv.lib.licenses; [ ncsa mit ];
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/libc++/setup-hook.sh b/nixpkgs/pkgs/development/compilers/llvm/8/libc++/setup-hook.sh
new file mode 100644
index 000000000000..3a274aecc23d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/libc++/setup-hook.sh
@@ -0,0 +1,6 @@
+# See pkgs/build-support/setup-hooks/role.bash
+getHostRole
+
+linkCxxAbi="@linkCxxAbi@"
+export NIX_CXXSTDLIB_COMPILE${role_post}+=" -isystem @out@/include/c++/v1"
+export NIX_CXXSTDLIB_LINK${role_post}=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/libc++abi.nix b/nixpkgs/pkgs/development/compilers/llvm/8/libc++abi.nix
new file mode 100644
index 000000000000..590872aaab64
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/libc++abi.nix
@@ -0,0 +1,67 @@
+{ stdenv, cmake, fetch, libcxx, libunwind, llvm, version
+, enableShared ? true }:
+
+stdenv.mkDerivation {
+  pname = "libc++abi";
+  inherit version;
+
+  src = fetch "libcxxabi" "1vznz8n1z1h8af0ga451m98lc2hjnv4fyzl71napsvjhvk4g6nxp";
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind;
+
+  cmakeFlags = stdenv.lib.optionals (stdenv.hostPlatform.useLLVM or false) [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+    "-DLIBCXXABI_USE_LLVM_UNWINDER=ON"
+  ] ++ stdenv.lib.optionals stdenv.hostPlatform.isWasm [
+    "-DLIBCXXABI_ENABLE_THREADS=OFF"
+    "-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF"
+  ] ++ stdenv.lib.optionals (!enableShared) [
+    "-DLIBCXXABI_ENABLE_SHARED=OFF"
+  ];
+
+  patches = [ ./libcxxabi-no-threads.patch ];
+
+  postUnpack = ''
+    unpackFile ${libcxx.src}
+    unpackFile ${llvm.src}
+    cmakeFlags+=" -DLLVM_PATH=$PWD/$(ls -d llvm-*) -DLIBCXXABI_LIBCXX_PATH=$PWD/$(ls -d libcxx-*)"
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    export TRIPLE=x86_64-apple-darwin
+  '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
+    patch -p1 -d $(ls -d libcxx-*) -i ${../libcxx-0001-musl-hacks.patch}
+  '' + stdenv.lib.optionalString stdenv.hostPlatform.isWasm ''
+    patch -p1 -d $(ls -d llvm-*) -i ${./libcxxabi-wasm.patch}
+  '';
+
+  installPhase = if stdenv.isDarwin
+    then ''
+      for file in lib/*.dylib; do
+        # this should be done in CMake, but having trouble figuring out
+        # the magic combination of necessary CMake variables
+        # if you fancy a try, take a look at
+        # https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
+        install_name_tool -id $out/$file $file
+      done
+      make install
+      install -d 755 $out/include
+      install -m 644 ../include/*.h $out/include
+    ''
+    else ''
+      install -d -m 755 $out/include $out/lib
+      install -m 644 lib/libc++abi.a $out/lib
+      install -m 644 ../include/cxxabi.h $out/include
+    '' + stdenv.lib.optionalString enableShared ''
+      install -m 644 lib/libc++abi.so.1.0 $out/lib
+      ln -s libc++abi.so.1.0 $out/lib/libc++abi.so
+      ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
+    '';
+
+  meta = {
+    homepage = "https://libcxxabi.llvm.org/";
+    description = "A new implementation of low level support for a standard C++ library";
+    license = with stdenv.lib.licenses; [ ncsa mit ];
+    maintainers = with stdenv.lib.maintainers; [ vlstill ];
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/libcxxabi-no-threads.patch b/nixpkgs/pkgs/development/compilers/llvm/8/libcxxabi-no-threads.patch
new file mode 100644
index 000000000000..787f3e16500e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/libcxxabi-no-threads.patch
@@ -0,0 +1,12 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4138acf..41b4763 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -362,6 +362,7 @@ if (NOT LIBCXXABI_ENABLE_THREADS)
+                         " is also set to ON.")
+   endif()
+   add_definitions(-D_LIBCXXABI_HAS_NO_THREADS)
++  add_definitions(-D_LIBCPP_HAS_NO_THREADS)
+ endif()
+ 
+ if (LIBCXXABI_HAS_EXTERNAL_THREAD_API)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/libcxxabi-wasm.patch b/nixpkgs/pkgs/development/compilers/llvm/8/libcxxabi-wasm.patch
new file mode 100644
index 000000000000..4ebfe46aa813
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/libcxxabi-wasm.patch
@@ -0,0 +1,16 @@
+diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake
+index 15497d405e0..33f7f18193a 100644
+--- a/cmake/modules/HandleLLVMOptions.cmake
++++ b/cmake/modules/HandleLLVMOptions.cmake
+@@ -127,7 +127,10 @@ else(WIN32)
+       set(LLVM_HAVE_LINK_VERSION_SCRIPT 1)
+     endif()
+   else(FUCHSIA OR UNIX)
+-    MESSAGE(SEND_ERROR "Unable to determine platform")
++    if(${CMAKE_SYSTEM_NAME} MATCHES "Wasi")
++    else()
++      MESSAGE(SEND_ERROR "Unable to determine platform")
++    endif()
+   endif(FUCHSIA OR UNIX)
+ endif(WIN32)
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/libunwind.nix b/nixpkgs/pkgs/development/compilers/llvm/8/libunwind.nix
new file mode 100644
index 000000000000..646cd3c3ca4a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/libunwind.nix
@@ -0,0 +1,25 @@
+{ stdenv, version, fetch, cmake, fetchpatch, enableShared ? true }:
+
+stdenv.mkDerivation {
+  pname = "libunwind";
+  inherit version;
+
+  src = fetch "libunwind" "0vhgcgzsb33l83qaikrkj87ypqb48mi607rccczccwiiv8ficw0q";
+
+  nativeBuildInputs = [ cmake ];
+
+  patches = [
+    (fetchpatch {
+      url = "https://github.com/llvm-mirror/libunwind/commit/34a45c630d4c79af403661d267db42fbe7de1178.patch";
+      sha256 = "0n0pv6jvcky8pn3srhrf9x5kbnd0d2kia9xlx2g590f5q0bgwfhv";
+    })
+    (fetchpatch {
+      url = "https://github.com/llvm-mirror/libunwind/commit/e050272d2eb57eb4e56a37b429a61df2ebb8aa3e.patch";
+      sha256 = "1sxyx5xnax8k713jjcxgq3jq3cpnxygs2rcdf5vfja0f2k9jzldl";
+    })
+  ];
+
+  enableParallelBuilding = true;
+
+  cmakeFlags = stdenv.lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/lld.nix b/nixpkgs/pkgs/development/compilers/llvm/8/lld.nix
new file mode 100644
index 000000000000..ba9cf3c57d77
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/lld.nix
@@ -0,0 +1,33 @@
+{ stdenv
+, fetch
+, cmake
+, libxml2
+, llvm
+, version
+}:
+
+stdenv.mkDerivation {
+  pname = "lld";
+  inherit version;
+
+  src = fetch "lld" "121xhxrlvwy3k5nf6p1wv31whxlb635ssfkci8z93mwv4ja1xflz";
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ llvm libxml2 ];
+
+  outputs = [ "out" "dev" ];
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    moveToOutput include "$dev"
+    moveToOutput lib "$dev"
+  '';
+
+  meta = {
+    description = "The LLVM Linker";
+    homepage    = "https://lld.llvm.org/";
+    license     = stdenv.lib.licenses.ncsa;
+    platforms   = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/lldb.nix b/nixpkgs/pkgs/development/compilers/llvm/8/lldb.nix
new file mode 100644
index 000000000000..298ce737fc73
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/lldb.nix
@@ -0,0 +1,61 @@
+{ stdenv
+, fetch
+, cmake
+, zlib
+, ncurses
+, swig
+, which
+, libedit
+, libxml2
+, llvm
+, clang-unwrapped
+, python3
+, version
+, darwin
+}:
+
+stdenv.mkDerivation {
+  pname = "lldb";
+  inherit version;
+
+  src = fetch "lldb" "1mriw4adrwm6kzabrjr7yqmdiylxd6glf6samd80dp8idnm9p9z8";
+
+  postPatch = ''
+    # Fix up various paths that assume llvm and clang are installed in the same place
+    sed -i 's,".*ClangConfig.cmake","${clang-unwrapped}/lib/cmake/clang/ClangConfig.cmake",' \
+      cmake/modules/LLDBStandalone.cmake
+    sed -i 's,".*tools/clang/include","${clang-unwrapped}/include",' \
+      cmake/modules/LLDBStandalone.cmake
+    sed -i 's,"$.LLVM_LIBRARY_DIR.",${llvm}/lib ${clang-unwrapped}/lib,' \
+      cmake/modules/LLDBStandalone.cmake
+  '';
+
+  nativeBuildInputs = [ cmake python3 which swig ];
+  buildInputs = [ ncurses zlib libedit libxml2 llvm ]
+    ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.libobjc darwin.apple_sdk.libs.xpc darwin.apple_sdk.frameworks.Foundation darwin.bootstrap_cmds darwin.apple_sdk.frameworks.Carbon darwin.apple_sdk.frameworks.Cocoa ];
+
+  CXXFLAGS = "-fno-rtti";
+  hardeningDisable = [ "format" ];
+
+  cmakeFlags = [
+    "-DLLDB_CODESIGN_IDENTITY=" # codesigning makes nondeterministic
+  ];
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    mkdir -p $out/share/man/man1
+    cp ../docs/lldb.1 $out/share/man/man1/
+
+    install -D ../tools/lldb-vscode/package.json $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/package.json
+    mkdir $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin
+    ln -s $out/bin/lldb-vscode $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A next-generation high-performance debugger";
+    homepage    = "https://llvm.org/";
+    license     = licenses.ncsa;
+    platforms   = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/llvm-outputs.patch b/nixpkgs/pkgs/development/compilers/llvm/8/llvm-outputs.patch
new file mode 100644
index 000000000000..40096fa3497f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/llvm-outputs.patch
@@ -0,0 +1,26 @@
+diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
+index 94d426b..37f7794 100644
+--- a/tools/llvm-config/llvm-config.cpp
++++ b/tools/llvm-config/llvm-config.cpp
+@@ -333,6 +333,21 @@ int main(int argc, char **argv) {
+     ActiveIncludeOption = "-I" + ActiveIncludeDir;
+   }
+ 
++  /// Nix-specific multiple-output handling: override ActiveLibDir if --link-shared
++  if (!IsInDevelopmentTree) {
++    bool WantShared = true;
++    for (int i = 1; i < argc; ++i) {
++      StringRef Arg = argv[i];
++      if (Arg == "--link-shared")
++        WantShared = true;
++      else if (Arg == "--link-static")
++        WantShared = false; // the last one wins
++    }
++
++    if (WantShared)
++      ActiveLibDir = std::string("@lib@") + "/lib" + LLVM_LIBDIR_SUFFIX;
++  }
++
+   /// We only use `shared library` mode in cases where the static library form
+   /// of the components provided are not available; note however that this is
+   /// skipped if we're run from within the build dir. However, once installed,
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/llvm.nix b/nixpkgs/pkgs/development/compilers/llvm/8/llvm.nix
new file mode 100644
index 000000000000..0f6179c2d310
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/llvm.nix
@@ -0,0 +1,176 @@
+{ stdenv
+, fetch
+, cmake
+, python3
+, libffi
+, libbfd
+, libpfm
+, libxml2
+, ncurses
+, version
+, release_version
+, zlib
+, buildPackages
+, debugVersion ? false
+, enableManpages ? false
+, enableSharedLibraries ? true
+, enablePFM ? !(stdenv.isDarwin
+  || stdenv.isAarch64 # broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
+  || stdenv.isAarch32 # broken for the armv7l builder
+)
+, enablePolly ? false
+}:
+
+let
+  inherit (stdenv.lib) optional optionals optionalString;
+
+  # Used when creating a version-suffixed symlink of libLLVM.dylib
+  shortVersion = with stdenv.lib;
+    concatStringsSep "." (take 1 (splitVersion release_version));
+
+in stdenv.mkDerivation ({
+  pname = "llvm";
+  inherit version;
+
+  src = fetch "llvm" "1rvm5gqp5v8hfn17kqws3zhk94w4kxndal12bqa0y57p09nply24";
+  polly_src = fetch "polly" "1lfjdz3ilj5xmjxvicd8f5ykybks67ry2pdb777352r3mzlgg8g8";
+
+  unpackPhase = ''
+    unpackFile $src
+    mv llvm-${version}* llvm
+    sourceRoot=$PWD/llvm
+  '' + optionalString enablePolly ''
+    unpackFile $polly_src
+    mv polly-* $sourceRoot/tools/polly
+  '';
+
+  outputs = [ "out" "python" ]
+    ++ optional enableSharedLibraries "lib";
+
+  nativeBuildInputs = [ cmake python3 ]
+    ++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
+
+  buildInputs = [ libxml2 libffi ]
+    ++ optional enablePFM libpfm; # exegesis
+
+  propagatedBuildInputs = [ ncurses zlib ];
+
+  postPatch = optionalString stdenv.isDarwin ''
+    substituteInPlace cmake/modules/AddLLVM.cmake \
+      --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \
+      --replace 'set(_install_rpath "@loader_path/../lib" ''${extra_libdir})' ""
+  ''
+  # Patch llvm-config to return correct library path based on --link-{shared,static}.
+  + optionalString (enableSharedLibraries) ''
+    substitute '${./llvm-outputs.patch}' ./llvm-outputs.patch --subst-var lib
+    patch -p1 < ./llvm-outputs.patch
+  '' + ''
+    # FileSystem permissions tests fail with various special bits
+    substituteInPlace unittests/Support/CMakeLists.txt \
+      --replace "Path.cpp" ""
+    rm unittests/Support/Path.cpp
+  '' + optionalString stdenv.hostPlatform.isMusl ''
+    patch -p1 -i ${../TLI-musl.patch}
+    substituteInPlace unittests/Support/CMakeLists.txt \
+      --replace "add_subdirectory(DynamicLibrary)" ""
+    rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
+    # valgrind unhappy with musl or glibc, but fails w/musl only
+    rm test/CodeGen/AArch64/wineh4.mir
+  '' + ''
+    patchShebangs test/BugPoint/compile-custom.ll.py
+  '';
+
+  # hacky fix: created binaries need to be run before installation
+  preBuild = ''
+    mkdir -p $out/
+    ln -sv $PWD/lib $out
+  '';
+
+  cmakeFlags = with stdenv; [
+    "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
+    "-DLLVM_INSTALL_UTILS=ON"  # Needed by rustc
+    "-DLLVM_BUILD_TESTS=ON"
+    "-DLLVM_ENABLE_FFI=ON"
+    "-DLLVM_ENABLE_RTTI=ON"
+    "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_ENABLE_DUMP=ON"
+  ] ++ optionals enableSharedLibraries [
+    "-DLLVM_LINK_LLVM_DYLIB=ON"
+  ] ++ optionals enableManpages [
+    "-DLLVM_BUILD_DOCS=ON"
+    "-DLLVM_ENABLE_SPHINX=ON"
+    "-DSPHINX_OUTPUT_MAN=ON"
+    "-DSPHINX_OUTPUT_HTML=OFF"
+    "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+  ] ++ optionals (!isDarwin) [
+    "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
+  ] ++ optionals (isDarwin) [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+    "-DCAN_TARGET_i386=false"
+  ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "-DCMAKE_CROSSCOMPILING=True"
+    "-DLLVM_TABLEGEN=${buildPackages.llvm_8}/bin/llvm-tblgen"
+  ];
+
+  postBuild = ''
+    rm -fR $out
+  '';
+
+  preCheck = ''
+    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/lib
+  '';
+
+  postInstall = ''
+    mkdir -p $python/share
+    mv $out/share/opt-viewer $python/share/opt-viewer
+  ''
+  + optionalString enableSharedLibraries ''
+    moveToOutput "lib/libLLVM-*" "$lib"
+    moveToOutput "lib/libLLVM${stdenv.hostPlatform.extensions.sharedLibrary}" "$lib"
+    substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
+      --replace "\''${_IMPORT_PREFIX}/lib/libLLVM-" "$lib/lib/libLLVM-"
+  ''
+  + optionalString (stdenv.isDarwin && enableSharedLibraries) ''
+    substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
+      --replace "\''${_IMPORT_PREFIX}/lib/libLLVM.dylib" "$lib/lib/libLLVM.dylib"
+    ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
+    ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
+  '';
+
+  doCheck = stdenv.isLinux && (!stdenv.isx86_32);
+
+  checkTarget = "check-all";
+
+  enableParallelBuilding = true;
+
+  requiredSystemFeatures = [ "big-parallel" ];
+  meta = {
+    description = "Collection of modular and reusable compiler and toolchain technologies";
+    homepage    = "https://llvm.org/";
+    license     = stdenv.lib.licenses.ncsa;
+    maintainers = with stdenv.lib.maintainers; [ lovek323 raskin dtzWill ];
+    platforms   = stdenv.lib.platforms.all;
+  };
+} // stdenv.lib.optionalAttrs enableManpages {
+  pname = "llvm-manpages";
+
+  buildPhase = ''
+    make docs-llvm-man
+  '';
+
+  propagatedBuildInputs = [];
+
+  installPhase = ''
+    make -C docs install
+  '';
+
+  postPatch = null;
+  postInstall = null;
+
+  outputs = [ "out" ];
+
+  doCheck = false;
+
+  meta.description = "man pages for LLVM ${version}";
+})
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/openmp.nix b/nixpkgs/pkgs/development/compilers/llvm/8/openmp.nix
new file mode 100644
index 000000000000..42cc7adf4f00
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/openmp.nix
@@ -0,0 +1,26 @@
+{ stdenv
+, fetch
+, cmake
+, llvm
+, perl
+, version
+}:
+
+stdenv.mkDerivation {
+  pname = "openmp";
+  inherit version;
+
+  src = fetch "openmp" "0b3jlxhqbpyd1nqkpxjfggm5d9va5qpyf7d4i5y7n4a1mlydv19y";
+
+  nativeBuildInputs = [ cmake perl ];
+  buildInputs = [ llvm ];
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "Components required to build an executable OpenMP program";
+    homepage    = "https://openmp.llvm.org/";
+    license     = stdenv.lib.licenses.mit;
+    platforms   = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/8/sanitizers-nongnu.patch b/nixpkgs/pkgs/development/compilers/llvm/8/sanitizers-nongnu.patch
new file mode 100644
index 000000000000..1f2ac97818eb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/8/sanitizers-nongnu.patch
@@ -0,0 +1,412 @@
+From f7a253f8f85d0f49df6b73996737a3e84ac64236 Mon Sep 17 00:00:00 2001
+From: Will Dietz <w@wdtz.org>
+Date: Mon, 24 Sep 2018 11:17:25 -0500
+Subject: [PATCH] Ported to 7.0, taken from gentoo-musl project.
+
+------
+Ported to compiler-rt-sanitizers-5.0.0. Taken from
+
+https://gist.githubusercontent.com/pwaller/2337f3290f12634cad3e3730cff0a6c1/raw/83c87a8585e2f9662494db5662e5361beb093c26/nongnu.patch
+Signed-off-by: Jory A. Pratt <anarchy@gentoo.org>
+
+Taken from gentoo-musl project, with a few additional minor fixes.
+---
+ lib/asan/asan_linux.cc                        |  4 +-
+ lib/interception/interception_linux.cc        |  2 +-
+ lib/interception/interception_linux.h         |  2 +-
+ lib/msan/msan_linux.cc                        |  2 +-
+ lib/sanitizer_common/sanitizer_allocator.cc   |  2 +-
+ .../sanitizer_common_interceptors_ioctl.inc   |  4 +-
+ .../sanitizer_common_syscalls.inc             |  2 +-
+ lib/sanitizer_common/sanitizer_linux.cc       |  8 +++-
+ .../sanitizer_linux_libcdep.cc                | 10 ++---
+ lib/sanitizer_common/sanitizer_platform.h     |  6 +++
+ .../sanitizer_platform_interceptors.h         |  4 +-
+ .../sanitizer_platform_limits_posix.cc        | 37 +++++++++++--------
+ lib/tsan/rtl/tsan_platform_linux.cc           |  2 +-
+ 13 files changed, 51 insertions(+), 34 deletions(-)
+
+diff --git a/lib/asan/asan_linux.cc b/lib/asan/asan_linux.cc
+index 625f32d40..73cf77aca 100644
+--- a/lib/asan/asan_linux.cc
++++ b/lib/asan/asan_linux.cc
+@@ -46,7 +46,7 @@
+ #include <link.h>
+ #endif
+ 
+-#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS
++#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS || SANITIZER_NONGNU
+ #include <ucontext.h>
+ extern "C" void* _DYNAMIC;
+ #elif SANITIZER_NETBSD
+@@ -139,7 +139,7 @@ void AsanApplyToGlobals(globals_op_fptr op, const void *needle) {
+   UNIMPLEMENTED();
+ }
+ 
+-#if SANITIZER_ANDROID
++#if SANITIZER_ANDROID || SANITIZER_NONGNU
+ // FIXME: should we do anything for Android?
+ void AsanCheckDynamicRTPrereqs() {}
+ void AsanCheckIncompatibleRT() {}
+diff --git a/lib/interception/interception_linux.cc b/lib/interception/interception_linux.cc
+index 26bfcd8f6..529b234f7 100644
+--- a/lib/interception/interception_linux.cc
++++ b/lib/interception/interception_linux.cc
+@@ -43,7 +43,7 @@ bool GetRealFunctionAddress(const char *func_name, uptr *func_addr,
+ }
+ 
+ // Android and Solaris do not have dlvsym
+-#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD
++#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD && !SANITIZER_NONGNU
+ void *GetFuncAddrVer(const char *func_name, const char *ver) {
+   return dlvsym(RTLD_NEXT, func_name, ver);
+ }
+diff --git a/lib/interception/interception_linux.h b/lib/interception/interception_linux.h
+index 942c25609..24a4d5080 100644
+--- a/lib/interception/interception_linux.h
++++ b/lib/interception/interception_linux.h
+@@ -36,7 +36,7 @@ void *GetFuncAddrVer(const char *func_name, const char *ver);
+       (::__interception::uptr) & WRAP(func))
+ 
+ // Android,  Solaris and OpenBSD do not have dlvsym
+-#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD
++#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD && !SANITIZER_NONGNU
+ #define INTERCEPT_FUNCTION_VER_LINUX_OR_FREEBSD(func, symver) \
+   (::__interception::real_##func = (func##_f)(                \
+        unsigned long)::__interception::GetFuncAddrVer(#func, symver))
+diff --git a/lib/msan/msan_linux.cc b/lib/msan/msan_linux.cc
+index 385a650c4..6e30a8ce9 100644
+--- a/lib/msan/msan_linux.cc
++++ b/lib/msan/msan_linux.cc
+@@ -13,7 +13,7 @@
+ //===----------------------------------------------------------------------===//
+ 
+ #include "sanitizer_common/sanitizer_platform.h"
+-#if SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD
++#if SANITIZER_FREEBSD || (SANITIZER_LINUX && !SANITIZER_NONGNU) || SANITIZER_NETBSD
+ 
+ #include "msan.h"
+ #include "msan_report.h"
+diff --git a/lib/sanitizer_common/sanitizer_allocator.cc b/lib/sanitizer_common/sanitizer_allocator.cc
+index 6bfd5e5ee..048f6154f 100644
+--- a/lib/sanitizer_common/sanitizer_allocator.cc
++++ b/lib/sanitizer_common/sanitizer_allocator.cc
+@@ -27,7 +27,7 @@ const char *SecondaryAllocatorName = "LargeMmapAllocator";
+ 
+ // ThreadSanitizer for Go uses libc malloc/free.
+ #if SANITIZER_GO || defined(SANITIZER_USE_MALLOC)
+-# if SANITIZER_LINUX && !SANITIZER_ANDROID
++# if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ extern "C" void *__libc_malloc(uptr size);
+ #  if !SANITIZER_GO
+ extern "C" void *__libc_memalign(uptr alignment, uptr size);
+diff --git a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
+index 2d633c173..b6eb23116 100644
+--- a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
++++ b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
+@@ -104,7 +104,7 @@ static void ioctl_table_fill() {
+   _(SIOCGETVIFCNT, WRITE, struct_sioc_vif_req_sz);
+ #endif
+ 
+-#if SANITIZER_LINUX
++#if SANITIZER_LINUX && !SANITIZER_NONGNU
+   // Conflicting request ids.
+   // _(CDROMAUDIOBUFSIZ, NONE, 0);
+   // _(SNDCTL_TMR_CONTINUE, NONE, 0);
+@@ -365,7 +365,7 @@ static void ioctl_table_fill() {
+   _(VT_WAITACTIVE, NONE, 0);
+ #endif
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE
+   _(CYGETDEFTHRESH, WRITE, sizeof(int));
+   _(CYGETDEFTIMEOUT, WRITE, sizeof(int));
+diff --git a/lib/sanitizer_common/sanitizer_common_syscalls.inc b/lib/sanitizer_common/sanitizer_common_syscalls.inc
+index 469c8eb7e..24f87867d 100644
+--- a/lib/sanitizer_common/sanitizer_common_syscalls.inc
++++ b/lib/sanitizer_common/sanitizer_common_syscalls.inc
+@@ -2038,7 +2038,7 @@ POST_SYSCALL(setrlimit)(long res, long resource, void *rlim) {
+   }
+ }
+ 
+-#if !SANITIZER_ANDROID
++#if !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ PRE_SYSCALL(prlimit64)(long pid, long resource, const void *new_rlim,
+                        void *old_rlim) {
+   if (new_rlim) PRE_READ(new_rlim, struct_rlimit64_sz);
+diff --git a/lib/sanitizer_common/sanitizer_linux.cc b/lib/sanitizer_common/sanitizer_linux.cc
+index 96d6c1eff..9e2b7fb9d 100644
+--- a/lib/sanitizer_common/sanitizer_linux.cc
++++ b/lib/sanitizer_common/sanitizer_linux.cc
+@@ -541,13 +541,13 @@ const char *GetEnv(const char *name) {
+ #endif
+ }
+ 
+-#if !SANITIZER_FREEBSD && !SANITIZER_NETBSD && !SANITIZER_OPENBSD
++#if !SANITIZER_FREEBSD && !SANITIZER_NETBSD && !SANITIZER_OPENBSD && !SANITIZER_NONGNU
+ extern "C" {
+ SANITIZER_WEAK_ATTRIBUTE extern void *__libc_stack_end;
+ }
+ #endif
+ 
+-#if !SANITIZER_GO && !SANITIZER_FREEBSD && !SANITIZER_NETBSD &&                \
++#if (!SANITIZER_GO || SANITIZER_NONGNU) && !SANITIZER_FREEBSD && !SANITIZER_NETBSD &&                \
+     !SANITIZER_OPENBSD
+ static void ReadNullSepFileToArray(const char *path, char ***arr,
+                                    int arr_size) {
+@@ -590,6 +590,10 @@ static void GetArgsAndEnv(char ***argv, char ***envp) {
+ #elif SANITIZER_NETBSD
+   *argv = __ps_strings->ps_argvstr;
+   *envp = __ps_strings->ps_envstr;
++#elif SANITIZER_NONGNU
++    static const int kMaxArgv = 2000, kMaxEnvp = 2000;
++    ReadNullSepFileToArray("/proc/self/cmdline", argv, kMaxArgv);
++    ReadNullSepFileToArray("/proc/self/environ", envp, kMaxEnvp);
+ #else // SANITIZER_FREEBSD
+ #if !SANITIZER_GO
+   if (&__libc_stack_end) {
+diff --git a/lib/sanitizer_common/sanitizer_linux_libcdep.cc b/lib/sanitizer_common/sanitizer_linux_libcdep.cc
+index 4962ff832..438f94dbe 100644
+--- a/lib/sanitizer_common/sanitizer_linux_libcdep.cc
++++ b/lib/sanitizer_common/sanitizer_linux_libcdep.cc
+@@ -179,7 +179,7 @@ __attribute__((unused)) static bool GetLibcVersion(int *major, int *minor,
+ }
+ 
+ #if !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO &&               \
+-    !SANITIZER_NETBSD && !SANITIZER_OPENBSD && !SANITIZER_SOLARIS
++    !SANITIZER_NETBSD && !SANITIZER_OPENBSD && !SANITIZER_SOLARIS && !SANITIZER_NONGNU
+ static uptr g_tls_size;
+ 
+ #ifdef __i386__
+@@ -261,7 +261,7 @@ void InitTlsSize() { }
+ #if (defined(__x86_64__) || defined(__i386__) || defined(__mips__) ||          \
+      defined(__aarch64__) || defined(__powerpc64__) || defined(__s390__) ||    \
+      defined(__arm__)) &&                                                      \
+-    SANITIZER_LINUX && !SANITIZER_ANDROID
++    SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ // sizeof(struct pthread) from glibc.
+ static atomic_uintptr_t thread_descriptor_size;
+ 
+@@ -426,7 +426,7 @@ int GetSizeFromHdr(struct dl_phdr_info *info, size_t size, void *data) {
+ 
+ #if !SANITIZER_GO
+ static void GetTls(uptr *addr, uptr *size) {
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ # if defined(__x86_64__) || defined(__i386__) || defined(__s390__)
+   *addr = ThreadSelf();
+   *size = GetTlsSize();
+@@ -470,7 +470,7 @@ static void GetTls(uptr *addr, uptr *size) {
+ #elif SANITIZER_OPENBSD
+   *addr = 0;
+   *size = 0;
+-#elif SANITIZER_ANDROID
++#elif SANITIZER_ANDROID || SANITIZER_NONGNU
+   *addr = 0;
+   *size = 0;
+ #elif SANITIZER_SOLARIS
+@@ -486,7 +486,7 @@ static void GetTls(uptr *addr, uptr *size) {
+ #if !SANITIZER_GO
+ uptr GetTlsSize() {
+ #if SANITIZER_FREEBSD || SANITIZER_ANDROID || SANITIZER_NETBSD ||              \
+-    SANITIZER_OPENBSD || SANITIZER_SOLARIS
++    SANITIZER_OPENBSD || SANITIZER_SOLARIS || SANITIZER_NONGNU
+   uptr addr, size;
+   GetTls(&addr, &size);
+   return size;
+diff --git a/lib/sanitizer_common/sanitizer_platform.h b/lib/sanitizer_common/sanitizer_platform.h
+index d81e25580..e10680ac8 100644
+--- a/lib/sanitizer_common/sanitizer_platform.h
++++ b/lib/sanitizer_common/sanitizer_platform.h
+@@ -208,6 +208,12 @@
+ # define SANITIZER_SOLARIS32 0
+ #endif
+ 
++#if defined(__linux__) && !defined(__GLIBC__)
++# define SANITIZER_NONGNU 1
++#else
++# define SANITIZER_NONGNU 0
++#endif
++
+ #if defined(__myriad2__)
+ # define SANITIZER_MYRIAD2 1
+ #else
+diff --git a/lib/sanitizer_common/sanitizer_platform_interceptors.h b/lib/sanitizer_common/sanitizer_platform_interceptors.h
+index f95539a73..6c53b3415 100644
+--- a/lib/sanitizer_common/sanitizer_platform_interceptors.h
++++ b/lib/sanitizer_common/sanitizer_platform_interceptors.h
+@@ -39,7 +39,7 @@
+ # include "sanitizer_platform_limits_solaris.h"
+ #endif
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ # define SI_LINUX_NOT_ANDROID 1
+ #else
+ # define SI_LINUX_NOT_ANDROID 0
+@@ -322,7 +322,7 @@
+ #define SANITIZER_INTERCEPT_ETHER_R (SI_FREEBSD || SI_LINUX_NOT_ANDROID)
+ #define SANITIZER_INTERCEPT_SHMCTL          \
+   (SI_NETBSD || SI_OPENBSD || SI_SOLARIS || \
+-  ((SI_FREEBSD || SI_LINUX_NOT_ANDROID) && \
++  ((SI_FREEBSD || SI_LINUX_NOT_ANDROID || SANITIZER_NONGNU) && \
+     SANITIZER_WORDSIZE == 64))  // NOLINT
+ #define SANITIZER_INTERCEPT_RANDOM_R SI_LINUX_NOT_ANDROID
+ #define SANITIZER_INTERCEPT_PTHREAD_ATTR_GET SI_POSIX
+diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+index 54da635d7..2f6ff69c3 100644
+--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+@@ -14,6 +14,9 @@
+ 
+ #include "sanitizer_platform.h"
+ 
++// Workaround musl <--> linux conflicting definition of 'struct sysinfo'
++#define _LINUX_SYSINFO_H
++
+ #if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_MAC
+ // Tests in this file assume that off_t-dependent data structures match the
+ // libc ABI. For example, struct dirent here is what readdir() function (as
+@@ -138,12 +141,14 @@ typedef struct user_fpregs elf_fpregset_t;
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+ #include <glob.h>
+-#include <obstack.h>
++#  if !SANITIZER_NONGNU
++#    include <obstack.h>
++#  endif
+ #include <mqueue.h>
+-#include <net/if_ppp.h>
+-#include <netax25/ax25.h>
+-#include <netipx/ipx.h>
+-#include <netrom/netrom.h>
++#include <linux/if_ppp.h>
++#include <linux/ax25.h>
++#include <linux/ipx.h>
++#include <linux/netrom.h>
+ #if HAVE_RPC_XDR_H
+ # include <rpc/xdr.h>
+ #elif HAVE_TIRPC_RPC_XDR_H
+@@ -251,7 +256,7 @@ namespace __sanitizer {
+   unsigned struct_itimerspec_sz = sizeof(struct itimerspec);
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   // Use pre-computed size of struct ustat to avoid <sys/ustat.h> which
+   // has been removed from glibc 2.28.
+ #if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \
+@@ -322,7 +327,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(ElfW(Phdr));
+ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+ #endif
+ 
+-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
++#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   int glob_nomatch = GLOB_NOMATCH;
+   int glob_altdirfunc = GLOB_ALTDIRFUNC;
+ #endif
+@@ -416,7 +421,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+   unsigned struct_termios_sz = sizeof(struct termios);
+   unsigned struct_winsize_sz = sizeof(struct winsize);
+ 
+-#if SANITIZER_LINUX
++#if SANITIZER_LINUX && !SANITIZER_NONGNU
+   unsigned struct_arpreq_sz = sizeof(struct arpreq);
+   unsigned struct_cdrom_msf_sz = sizeof(struct cdrom_msf);
+   unsigned struct_cdrom_multisession_sz = sizeof(struct cdrom_multisession);
+@@ -466,7 +471,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+   unsigned struct_vt_mode_sz = sizeof(struct vt_mode);
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct);
+   unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor);
+ #if EV_VERSION > (0x010000)
+@@ -834,7 +839,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+   unsigned IOCTL_VT_WAITACTIVE = VT_WAITACTIVE;
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH;
+   unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT;
+   unsigned IOCTL_CYGETMON = CYGETMON;
+@@ -989,7 +994,7 @@ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phdr);
+ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phnum);
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
++#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ CHECK_TYPE_SIZE(glob_t);
+ CHECK_SIZE_AND_OFFSET(glob_t, gl_pathc);
+ CHECK_SIZE_AND_OFFSET(glob_t, gl_pathv);
+@@ -1023,6 +1028,7 @@ CHECK_TYPE_SIZE(iovec);
+ CHECK_SIZE_AND_OFFSET(iovec, iov_base);
+ CHECK_SIZE_AND_OFFSET(iovec, iov_len);
+ 
++#if !SANITIZER_NONGNU
+ CHECK_TYPE_SIZE(msghdr);
+ CHECK_SIZE_AND_OFFSET(msghdr, msg_name);
+ CHECK_SIZE_AND_OFFSET(msghdr, msg_namelen);
+@@ -1036,6 +1042,7 @@ CHECK_TYPE_SIZE(cmsghdr);
+ CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_len);
+ CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_level);
+ CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_type);
++#endif
+ 
+ #ifndef __GLIBC_PREREQ
+ #define __GLIBC_PREREQ(x, y) 0
+@@ -1145,7 +1152,7 @@ CHECK_SIZE_AND_OFFSET(mntent, mnt_passno);
+ 
+ CHECK_TYPE_SIZE(ether_addr);
+ 
+-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
++#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ CHECK_TYPE_SIZE(ipc_perm);
+ # if SANITIZER_FREEBSD
+ CHECK_SIZE_AND_OFFSET(ipc_perm, key);
+@@ -1206,7 +1213,7 @@ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_dstaddr);
+ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_data);
+ #endif
+ 
+-#if SANITIZER_LINUX
++#if SANITIZER_LINUX && !SANITIZER_NONGNU
+ COMPILER_CHECK(sizeof(__sanitizer_mallinfo) == sizeof(struct mallinfo));
+ #endif
+ 
+@@ -1256,7 +1263,7 @@ COMPILER_CHECK(__sanitizer_XDR_DECODE == XDR_DECODE);
+ COMPILER_CHECK(__sanitizer_XDR_FREE == XDR_FREE);
+ #endif
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ COMPILER_CHECK(sizeof(__sanitizer_FILE) <= sizeof(FILE));
+ CHECK_SIZE_AND_OFFSET(FILE, _flags);
+ CHECK_SIZE_AND_OFFSET(FILE, _IO_read_ptr);
+@@ -1275,7 +1282,7 @@ CHECK_SIZE_AND_OFFSET(FILE, _chain);
+ CHECK_SIZE_AND_OFFSET(FILE, _fileno);
+ #endif
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ COMPILER_CHECK(sizeof(__sanitizer__obstack_chunk) <= sizeof(_obstack_chunk));
+ CHECK_SIZE_AND_OFFSET(_obstack_chunk, limit);
+ CHECK_SIZE_AND_OFFSET(_obstack_chunk, prev);
+diff --git a/lib/tsan/rtl/tsan_platform_linux.cc b/lib/tsan/rtl/tsan_platform_linux.cc
+index de989b780..51a97b554 100644
+--- a/lib/tsan/rtl/tsan_platform_linux.cc
++++ b/lib/tsan/rtl/tsan_platform_linux.cc
+@@ -294,7 +294,7 @@ void InitializePlatform() {
+ // This is required to properly "close" the fds, because we do not see internal
+ // closes within glibc. The code is a pure hack.
+ int ExtractResolvFDs(void *state, int *fds, int nfd) {
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   int cnt = 0;
+   struct __res_state *statp = (struct __res_state*)state;
+   for (int i = 0; i < MAXNS && cnt < nfd; i++) {
+-- 
+2.19.0
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/bintools.nix b/nixpkgs/pkgs/development/compilers/llvm/9/bintools.nix
new file mode 100644
index 000000000000..72a2a7331930
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/bintools.nix
@@ -0,0 +1,19 @@
+{ runCommand, stdenv, llvm, lld, version }:
+
+let
+  prefix =
+    if stdenv.hostPlatform != stdenv.targetPlatform
+    then "${stdenv.targetPlatform.config}-"
+    else "";
+in runCommand "llvm-binutils-${version}" { preferLocalBuild = true; } ''
+   mkdir -p $out/bin
+   for prog in ${lld}/bin/*; do
+     ln -s $prog $out/bin/${prefix}$(basename $prog)
+   done
+   for prog in ${llvm}/bin/*; do
+     ln -s $prog $out/bin/${prefix}$(echo $(basename $prog) | sed -e "s|llvm-||")
+     ln -sf $prog $out/bin/${prefix}$(basename $prog)
+   done
+   rm -f $out/bin/${prefix}cat
+   ln -s ${lld}/bin/lld $out/bin/${prefix}ld
+''
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/clang/HIP-use-PATH-9.patch b/nixpkgs/pkgs/development/compilers/llvm/9/clang/HIP-use-PATH-9.patch
new file mode 100644
index 000000000000..102d810ff681
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/clang/HIP-use-PATH-9.patch
@@ -0,0 +1,80 @@
+From 7147e9774c74abcd1d6db24e24d0fd989c2b97dd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Holger=20W=C3=BCnsche?= <holger.o.wuensche@t-online.de>
+Date: Tue, 21 Jan 2020 19:52:04 +0100
+Subject: [PATCH] [HIP] use GetProgramPath for executable discovery
+
+This change replaces the manual building of executable paths
+using llvm::sys::path::append with GetProgramPath.
+This enables adding other paths in case executables reside
+in different directories and makes the code easier to read.
+
+Differential Revision: https://reviews.llvm.org/D72903
+---
+ clang/lib/Driver/ToolChains/HIP.cpp | 23 ++++++++---------------
+ 1 file changed, 8 insertions(+), 15 deletions(-)
+
+diff --git a/lib/Driver/ToolChains/HIP.cpp b/lib/Driver/ToolChains/HIP.cpp
+index 2ec97e798fd..735c302debb 100644
+--- a/lib/Driver/ToolChains/HIP.cpp
++++ b/lib/Driver/ToolChains/HIP.cpp
+@@ -66,9 +66,8 @@ const char *AMDGCN::Linker::constructLLVMLinkCommand(
+   const char *OutputFileName =
+       C.addTempFile(C.getArgs().MakeArgString(TmpName));
+   CmdArgs.push_back(OutputFileName);
+-  SmallString<128> ExecPath(C.getDriver().Dir);
+-  llvm::sys::path::append(ExecPath, "llvm-link");
+-  const char *Exec = Args.MakeArgString(ExecPath);
++  const char *Exec =
++      Args.MakeArgString(getToolChain().GetProgramPath("llvm-link"));
+   C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
+   return OutputFileName;
+ }
+@@ -114,9 +113,8 @@ const char *AMDGCN::Linker::constructOptCommand(
+   const char *OutputFileName =
+       C.addTempFile(C.getArgs().MakeArgString(TmpFileName));
+   OptArgs.push_back(OutputFileName);
+-  SmallString<128> OptPath(C.getDriver().Dir);
+-  llvm::sys::path::append(OptPath, "opt");
+-  const char *OptExec = Args.MakeArgString(OptPath);
++  const char *OptExec =
++      Args.MakeArgString(getToolChain().GetProgramPath("opt"));
+   C.addCommand(llvm::make_unique<Command>(JA, *this, OptExec, OptArgs, Inputs));
+   return OutputFileName;
+ }
+@@ -156,9 +154,7 @@ const char *AMDGCN::Linker::constructLlcCommand(
+   const char *LlcOutputFile =
+       C.addTempFile(C.getArgs().MakeArgString(LlcOutputFileName));
+   LlcArgs.push_back(LlcOutputFile);
+-  SmallString<128> LlcPath(C.getDriver().Dir);
+-  llvm::sys::path::append(LlcPath, "llc");
+-  const char *Llc = Args.MakeArgString(LlcPath);
++  const char *Llc = Args.MakeArgString(getToolChain().GetProgramPath("llc"));
+   C.addCommand(llvm::make_unique<Command>(JA, *this, Llc, LlcArgs, Inputs));
+   return LlcOutputFile;
+ }
+@@ -172,9 +168,7 @@ void AMDGCN::Linker::constructLldCommand(Compilation &C, const JobAction &JA,
+   // The output from ld.lld is an HSA code object file.
+   ArgStringList LldArgs{
+       "-flavor", "gnu", "-shared", "-o", Output.getFilename(), InputFileName};
+-  SmallString<128> LldPath(C.getDriver().Dir);
+-  llvm::sys::path::append(LldPath, "lld");
+-  const char *Lld = Args.MakeArgString(LldPath);
++  const char *Lld = Args.MakeArgString(getToolChain().GetProgramPath("lld"));
+   C.addCommand(llvm::make_unique<Command>(JA, *this, Lld, LldArgs, Inputs));
+ }
+ 
+@@ -206,9 +200,8 @@ void AMDGCN::constructHIPFatbinCommand(Compilation &C, const JobAction &JA,
+       Args.MakeArgString(std::string("-outputs=").append(OutputFileName));
+   BundlerArgs.push_back(BundlerOutputArg);
+ 
+-  SmallString<128> BundlerPath(C.getDriver().Dir);
+-  llvm::sys::path::append(BundlerPath, "clang-offload-bundler");
+-  const char *Bundler = Args.MakeArgString(BundlerPath);
++  const char *Bundler = Args.MakeArgString(
++      T.getToolChain().GetProgramPath("clang-offload-bundler"));
+   C.addCommand(llvm::make_unique<Command>(JA, T, Bundler, BundlerArgs, Inputs));
+ }
+ 
+-- 
+2.23.1
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/clang/compiler-rt-baremetal.patch b/nixpkgs/pkgs/development/compilers/llvm/9/clang/compiler-rt-baremetal.patch
new file mode 100644
index 000000000000..a4a0f21b0fcd
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/clang/compiler-rt-baremetal.patch
@@ -0,0 +1,53 @@
+Index: lib/Driver/ToolChains/BareMetal.cpp
+===================================================================
+--- a/lib/Driver/ToolChains/BareMetal.cpp
++++ b/lib/Driver/ToolChains/BareMetal.cpp
+@@ -157,7 +157,7 @@
+ void BareMetal::AddLinkRuntimeLib(const ArgList &Args,
+                                   ArgStringList &CmdArgs) const {
+   CmdArgs.push_back(Args.MakeArgString("-lclang_rt.builtins-" +
+-                                       getTriple().getArchName() + ".a"));
++                                       getTriple().getArchName()));
+ }
+ 
+ void baremetal::Linker::ConstructJob(Compilation &C, const JobAction &JA,
+Index: test/Driver/baremetal.cpp
+===================================================================
+--- a/test/Driver/baremetal.cpp
++++ b/test/Driver/baremetal.cpp
+@@ -13,7 +13,7 @@
+ // CHECK-V6M-C-NEXT: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic"
+ // CHECK-V6M-C-SAME: "-L[[RESOURCE_DIR:[^"]+]]{{[/\\]+}}lib{{[/\\]+}}baremetal"
+ // CHECK-V6M-C-SAME: "-T" "semihosted.lds" "-Lsome{{[/\\]+}}directory{{[/\\]+}}user{{[/\\]+}}asked{{[/\\]+}}for"
+-// CHECK-V6M-C-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m.a"
++// CHECK-V6M-C-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m"
+ // CHECK-V6M-C-SAME: "-o" "{{.*}}.o"
+ 
+ // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+@@ -35,7 +35,7 @@
+ // CHECK-V6M-DEFAULTCXX: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic"
+ // CHECK-V6M-DEFAULTCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}lib{{(64)?}}{{[/\\]+}}clang{{[/\\]+}}{{.*}}{{[/\\]+}}lib{{[/\\]+}}baremetal"
+ // CHECK-V6M-DEFAULTCXX-SAME: "-lc++" "-lc++abi" "-lunwind"
+-// CHECK-V6M-DEFAULTCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m.a"
++// CHECK-V6M-DEFAULTCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m"
+ // CHECK-V6M-DEFAULTCXX-SAME: "-o" "{{.*}}.o"
+ 
+ // RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+@@ -48,7 +48,7 @@
+ // CHECK-V6M-LIBCXX: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic"
+ // CHECK-V6M-LIBCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}lib{{(64)?}}{{[/\\]+}}clang{{[/\\]+}}{{.*}}{{[/\\]+}}lib{{[/\\]+}}baremetal"
+ // CHECK-V6M-LIBCXX-SAME: "-lc++" "-lc++abi" "-lunwind"
+-// CHECK-V6M-LIBCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m.a"
++// CHECK-V6M-LIBCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m"
+ // CHECK-V6M-LIBCXX-SAME: "-o" "{{.*}}.o"
+ 
+ // RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+@@ -61,7 +61,7 @@
+ // CHECK-V6M-LIBSTDCXX: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic"
+ // CHECK-V6M-LIBSTDCXX-SAME: "-L{{[^"]*}}{{[/\\]+}}lib{{(64)?}}{{[/\\]+}}clang{{[/\\]+}}{{.*}}{{[/\\]+}}lib{{[/\\]+}}baremetal"
+ // CHECK-V6M-LIBSTDCXX-SAME: "-lstdc++" "-lsupc++" "-lunwind"
+-// CHECK-V6M-LIBSTDCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m.a"
++// CHECK-V6M-LIBSTDCXX-SAME: "-lc" "-lm" "-lclang_rt.builtins-armv6m"
+ // CHECK-V6M-LIBSTDCXX-SAME: "-o" "{{.*}}.o"
+ 
+ // RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/clang/default.nix b/nixpkgs/pkgs/development/compilers/llvm/9/clang/default.nix
new file mode 100644
index 000000000000..c938a01f8979
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/clang/default.nix
@@ -0,0 +1,124 @@
+{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python3, lld
+, fixDarwinDylibNames
+, enableManpages ? false
+, enablePolly ? false # TODO: get this info from llvm (passthru?)
+}:
+
+let
+  self = stdenv.mkDerivation ({
+    pname = "clang";
+    inherit version;
+
+    src = fetch "clang" "0ls2h3iv4finqyflyhry21qhc9cm9ga7g1zq21020p065qmm2y2p";
+
+    unpackPhase = ''
+      unpackFile $src
+      mv clang-${version}* clang
+      sourceRoot=$PWD/clang
+      unpackFile ${clang-tools-extra_src}
+      mv clang-tools-extra-* $sourceRoot/tools/extra
+    '';
+
+    nativeBuildInputs = [ cmake python3 ]
+      ++ stdenv.lib.optional enableManpages python3.pkgs.sphinx;
+
+    buildInputs = [ libxml2 llvm lld ]
+      ++ stdenv.lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+    cmakeFlags = [
+      "-DCMAKE_CXX_FLAGS=-std=c++11"
+      "-DCLANGD_BUILD_XPC=OFF"
+    ] ++ stdenv.lib.optionals enableManpages [
+      "-DCLANG_INCLUDE_DOCS=ON"
+      "-DLLVM_ENABLE_SPHINX=ON"
+      "-DSPHINX_OUTPUT_MAN=ON"
+      "-DSPHINX_OUTPUT_HTML=OFF"
+      "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+    ] ++ stdenv.lib.optionals enablePolly [
+      "-DWITH_POLLY=ON"
+      "-DLINK_POLLY_INTO_TOOLS=ON"
+    ];
+
+    patches = [
+      ./purity.patch
+      # https://reviews.llvm.org/D51899
+      ./compiler-rt-baremetal.patch
+      # make clang -xhip use $PATH to find executables
+      ./HIP-use-PATH-9.patch
+    ];
+
+    postPatch = ''
+      sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' \
+             -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' \
+             lib/Driver/ToolChains/*.cpp
+
+      # Patch for standalone doc building
+      sed -i '1s,^,find_package(Sphinx REQUIRED)\n,' docs/CMakeLists.txt
+    '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
+      sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/ToolChains/*.cpp
+    '' + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
+      substituteInPlace tools/extra/clangd/CMakeLists.txt \
+        --replace "NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB" FALSE
+    '';
+
+    outputs = [ "out" "lib" "python" ];
+
+    # Clang expects to find LLVMgold in its own prefix
+    postInstall = ''
+      if [ -e ${llvm}/lib/LLVMgold.so ]; then
+        ln -sv ${llvm}/lib/LLVMgold.so $out/lib
+      fi
+
+      ln -sv $out/bin/clang $out/bin/cpp
+
+      # Move libclang to 'lib' output
+      moveToOutput "lib/libclang.*" "$lib"
+      moveToOutput "lib/libclang-cpp.*" "$lib"
+      substituteInPlace $out/lib/cmake/clang/ClangTargets-release.cmake \
+          --replace "\''${_IMPORT_PREFIX}/lib/libclang." "$lib/lib/libclang." \
+          --replace "\''${_IMPORT_PREFIX}/lib/libclang-cpp." "$lib/lib/libclang-cpp."
+
+      mkdir -p $python/bin $python/share/clang/
+      mv $out/bin/{git-clang-format,scan-view} $python/bin
+      if [ -e $out/bin/set-xcode-analyzer ]; then
+        mv $out/bin/set-xcode-analyzer $python/bin
+      fi
+      mv $out/share/clang/*.py $python/share/clang
+      rm $out/bin/c-index-test
+    '';
+
+    enableParallelBuilding = true;
+
+    passthru = {
+      isClang = true;
+      inherit llvm;
+    } // stdenv.lib.optionalAttrs (stdenv.targetPlatform.isLinux || (stdenv.cc.isGNU && stdenv.cc.cc ? gcc)) {
+      gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
+    };
+
+    meta = {
+      description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
+      homepage    = "https://llvm.org/";
+      license     = stdenv.lib.licenses.ncsa;
+      platforms   = stdenv.lib.platforms.all;
+    };
+  } // stdenv.lib.optionalAttrs enableManpages {
+    pname = "clang-manpages";
+
+    buildPhase = ''
+      make docs-clang-man
+    '';
+
+    installPhase = ''
+      mkdir -p $out/share/man/man1
+      # Manually install clang manpage
+      cp docs/man/*.1 $out/share/man/man1/
+    '';
+
+    outputs = [ "out" ];
+
+    doCheck = false;
+
+    meta.description = "man page for Clang ${version}";
+  });
+in self
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/clang/purity.patch b/nixpkgs/pkgs/development/compilers/llvm/9/clang/purity.patch
new file mode 100644
index 000000000000..a6729a9b004e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/clang/purity.patch
@@ -0,0 +1,30 @@
+From 4add81bba40dcec62c4ea4481be8e35ac53e89d8 Mon Sep 17 00:00:00 2001
+From: Will Dietz <w@wdtz.org>
+Date: Thu, 18 May 2017 11:56:12 -0500
+Subject: [PATCH] "purity" patch for 5.0
+
+---
+ lib/Driver/ToolChains/Gnu.cpp | 7 -------
+ 1 file changed, 7 deletions(-)
+
+diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
+index fe3c0191bb..c6a482bece 100644
+--- a/lib/Driver/ToolChains/Gnu.cpp
++++ b/lib/Driver/ToolChains/Gnu.cpp
+@@ -494,13 +494,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
+   if (!IsStatic) {
+     if (Args.hasArg(options::OPT_rdynamic))
+       CmdArgs.push_back("-export-dynamic");
+-
+-    if (!Args.hasArg(options::OPT_shared) && !IsStaticPIE) {
+-      const std::string Loader =
+-          D.DyldPrefix + ToolChain.getDynamicLinker(Args);
+-      CmdArgs.push_back("-dynamic-linker");
+-      CmdArgs.push_back(Args.MakeArgString(Loader));
+-    }
+   }
+ 
+   CmdArgs.push_back("-o");
+-- 
+2.11.0
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/compiler-rt-armv7l.patch b/nixpkgs/pkgs/development/compilers/llvm/9/compiler-rt-armv7l.patch
new file mode 100644
index 000000000000..89d7f1aec918
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/compiler-rt-armv7l.patch
@@ -0,0 +1,38 @@
+diff -ur compiler-rt-7.1.0.src/cmake/builtin-config-ix.cmake compiler-rt-7.1.0.src-patched/cmake/builtin-config-ix.cmake
+--- compiler-rt-7.1.0.src/cmake/builtin-config-ix.cmake	2018-05-25 06:36:27.000000000 +0900
++++ compiler-rt-7.1.0.src-patched/cmake/builtin-config-ix.cmake	2020-05-09 20:26:33.030608692 +0900
+@@ -24,7 +24,7 @@
+ 
+ 
+ set(ARM64 aarch64)
+-set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k)
++set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k armv7l)
+ set(HEXAGON hexagon)
+ set(X86 i386)
+ set(X86_64 x86_64)
+diff -ur compiler-rt-7.1.0.src/lib/builtins/CMakeLists.txt compiler-rt-7.1.0.src-patched/lib/builtins/CMakeLists.txt
+--- compiler-rt-7.1.0.src/lib/builtins/CMakeLists.txt	2018-07-31 03:18:59.000000000 +0900
++++ compiler-rt-7.1.0.src-patched/lib/builtins/CMakeLists.txt	2020-05-09 20:27:38.893409318 +0900
+@@ -453,6 +453,7 @@
+ set(armv7_SOURCES ${arm_SOURCES})
+ set(armv7s_SOURCES ${arm_SOURCES})
+ set(armv7k_SOURCES ${arm_SOURCES})
++set(armv7l_SOURCES ${arm_SOURCES})
+ set(arm64_SOURCES ${aarch64_SOURCES})
+ 
+ # macho_embedded archs
+@@ -563,12 +564,12 @@
+       set(_arch ${arch})
+       if("${arch}" STREQUAL "armv6m")
+         set(_arch "arm|armv6m")
+-      elseif("${arch}" MATCHES "^(armhf|armv7|armv7s|armv7k|armv7m|armv7em)$")
++      elseif("${arch}" MATCHES "^(armhf|armv7|armv7s|armv7k|armv7l|armv7m|armv7em)$")
+         set(_arch "arm")
+       endif()
+ 
+       # For ARM archs, exclude any VFP builtins if VFP is not supported
+-      if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7m|armv7em)$")
++      if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7l|armv7m|armv7em)$")
+         string(REPLACE ";" " " _TARGET_${arch}_CFLAGS "${TARGET_${arch}_CFLAGS}")
+         check_compile_definition(__VFP_FP__ "${CMAKE_C_FLAGS} ${_TARGET_${arch}_CFLAGS}" COMPILER_RT_HAS_${arch}_VFP)
+         if(NOT COMPILER_RT_HAS_${arch}_VFP)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/compiler-rt-codesign.patch b/nixpkgs/pkgs/development/compilers/llvm/9/compiler-rt-codesign.patch
new file mode 100644
index 000000000000..3cc12b94b200
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/compiler-rt-codesign.patch
@@ -0,0 +1,33 @@
+From 3dec5f3475a26aeb4678627795c4b67c6b7b4785 Mon Sep 17 00:00:00 2001
+From: Will Dietz <w@wdtz.org>
+Date: Tue, 19 Sep 2017 13:13:06 -0500
+Subject: [PATCH] remove codesign use on Apple, disable ios sim testing that
+ needs it
+
+---
+ cmake/Modules/AddCompilerRT.cmake |  8 ------
+ test/asan/CMakeLists.txt          | 52 ---------------------------------------
+ test/tsan/CMakeLists.txt          | 47 -----------------------------------
+ 3 files changed, 107 deletions(-)
+
+diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake
+index bc5fb9ff7..b64eb4246 100644
+--- a/cmake/Modules/AddCompilerRT.cmake
++++ b/cmake/Modules/AddCompilerRT.cmake
+@@ -210,14 +210,6 @@ function(add_compiler_rt_runtime name type)
+         set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "")
+         set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib")
+       endif()
+-      if(APPLE)
+-        # Ad-hoc sign the dylibs
+-        add_custom_command(TARGET ${libname}
+-          POST_BUILD  
+-          COMMAND codesign --sign - $<TARGET_FILE:${libname}>
+-          WORKING_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR}
+-        )
+-      endif()
+     endif()
+     install(TARGETS ${libname}
+       ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR}
+2.14.1
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/compiler-rt.nix b/nixpkgs/pkgs/development/compilers/llvm/9/compiler-rt.nix
new file mode 100644
index 000000000000..0183754a2fd4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/compiler-rt.nix
@@ -0,0 +1,84 @@
+{ stdenv, version, fetch, cmake, python3, llvm, libcxxabi }:
+
+let
+
+  useLLVM = stdenv.hostPlatform.useLLVM or false;
+  bareMetal = stdenv.hostPlatform.parsed.kernel.name == "none";
+  inherit (stdenv.hostPlatform) isMusl;
+
+in
+
+stdenv.mkDerivation rec {
+  pname = "compiler-rt";
+  inherit version;
+  src = fetch pname "0xwh79g3zggdabxgnd0bphry75asm1qz7mv3hcqihqwqr6aspgy2";
+
+  nativeBuildInputs = [ cmake python3 llvm ];
+  buildInputs = stdenv.lib.optional stdenv.hostPlatform.isDarwin libcxxabi;
+
+  NIX_CFLAGS_COMPILE = [
+    "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0"
+  ];
+
+  cmakeFlags = [
+    "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON"
+    "-DCMAKE_C_COMPILER_TARGET=${stdenv.hostPlatform.config}"
+    "-DCMAKE_ASM_COMPILER_TARGET=${stdenv.hostPlatform.config}"
+  ] ++ stdenv.lib.optionals (useLLVM || bareMetal || isMusl) [
+    "-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
+    "-DCOMPILER_RT_BUILD_XRAY=OFF"
+    "-DCOMPILER_RT_BUILD_LIBFUZZER=OFF"
+    "-DCOMPILER_RT_BUILD_PROFILE=OFF"
+  ] ++ stdenv.lib.optionals (useLLVM || bareMetal) [
+    "-DCMAKE_C_COMPILER_WORKS=ON"
+    "-DCMAKE_CXX_COMPILER_WORKS=ON"
+    "-DCOMPILER_RT_BAREMETAL_BUILD=ON"
+    "-DCMAKE_SIZEOF_VOID_P=${toString (stdenv.hostPlatform.parsed.cpu.bits / 8)}"
+  ] ++ stdenv.lib.optionals (useLLVM) [
+    "-DCOMPILER_RT_BUILD_BUILTINS=ON"
+    "-DCMAKE_C_FLAGS=-nodefaultlibs"
+    #https://stackoverflow.com/questions/53633705/cmake-the-c-compiler-is-not-able-to-compile-a-simple-test-program
+    "-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY"
+  ] ++ stdenv.lib.optionals (bareMetal) [
+    "-DCOMPILER_RT_OS_DIR=baremetal"
+  ];
+
+  outputs = [ "out" "dev" ];
+
+  patches = [
+    ./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory
+  ]# ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch
+    ++ stdenv.lib.optional stdenv.hostPlatform.isAarch32 ./compiler-rt-armv7l.patch;
+
+  # TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
+  # to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra
+  # can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd
+  # get no binary cache for the entire platform. If you really find yourself wanting the TSAN, make this controllable by
+  # a flag and turn the flag off during the stdenv build.
+  postPatch = stdenv.lib.optionalString (!stdenv.isDarwin) ''
+    substituteInPlace cmake/builtin-config-ix.cmake \
+      --replace 'set(X86 i386)' 'set(X86 i386 i486 i586 i686)'
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    substituteInPlace cmake/config-ix.cmake \
+      --replace 'set(COMPILER_RT_HAS_TSAN TRUE)' 'set(COMPILER_RT_HAS_TSAN FALSE)'
+  '' + stdenv.lib.optionalString (useLLVM) ''
+    substituteInPlace lib/builtins/int_util.c \
+      --replace "#include <stdlib.h>" ""
+    substituteInPlace lib/builtins/clear_cache.c \
+      --replace "#include <assert.h>" ""
+    substituteInPlace lib/builtins/cpu_model.c \
+      --replace "#include <assert.h>" ""
+  '';
+
+  # Hack around weird upsream RPATH bug
+  postInstall = stdenv.lib.optionalString (stdenv.hostPlatform.isDarwin || stdenv.hostPlatform.isWasm) ''
+    ln -s "$out/lib"/*/* "$out/lib"
+  '' + stdenv.lib.optionalString (useLLVM) ''
+    ln -s $out/lib/*/clang_rt.crtbegin-*.o $out/lib/crtbegin.o
+    ln -s $out/lib/*/clang_rt.crtend-*.o $out/lib/crtend.o
+    ln -s $out/lib/*/clang_rt.crtbegin_shared-*.o $out/lib/crtbeginS.o
+    ln -s $out/lib/*/clang_rt.crtend_shared-*.o $out/lib/crtendS.o
+  '';
+
+  enableParallelBuilding = true;
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/default.nix b/nixpkgs/pkgs/development/compilers/llvm/9/default.nix
new file mode 100644
index 000000000000..3b6db967b6a2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/default.nix
@@ -0,0 +1,206 @@
+{ lowPrio, newScope, pkgs, stdenv, cmake, gcc, libstdcxxHook
+, libxml2, python3, isl, fetchurl, overrideCC, wrapCCWith, wrapBintoolsWith
+, buildLlvmTools # tools, but from the previous stage, for cross
+, targetLlvmLibraries # libraries, but from the next stage, for cross
+}:
+
+let
+  release_version = "9.0.1";
+  version = release_version; # differentiating these is important for rc's
+  targetConfig = stdenv.targetPlatform.config;
+
+  fetch = name: sha256: fetchurl {
+    url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-${release_version}/${name}-${version}.src.tar.xz";
+    inherit sha256;
+  };
+
+  clang-tools-extra_src = fetch "clang-tools-extra" "01vgzd4k1q93nfs8gyl83mjlc4x0qsgfqw32lacbjzdxg0mdfvxj";
+
+  tools = stdenv.lib.makeExtensible (tools: let
+    callPackage = newScope (tools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
+    mkExtraBuildCommands = cc: ''
+      rsrc="$out/resource-root"
+      mkdir "$rsrc"
+      ln -s "${cc}/lib/clang/${release_version}/include" "$rsrc"
+      ln -s "${targetLlvmLibraries.compiler-rt.out}/lib" "$rsrc/lib"
+      echo "-resource-dir=$rsrc" >> $out/nix-support/cc-cflags
+    '' + stdenv.lib.optionalString (stdenv.targetPlatform.isLinux && tools.clang-unwrapped ? gcc && !(stdenv.targetPlatform.useLLVM or false)) ''
+      echo "--gcc-toolchain=${tools.clang-unwrapped.gcc}" >> $out/nix-support/cc-cflags
+    '';
+  in {
+
+    llvm = callPackage ./llvm.nix { };
+    llvm-polly = callPackage ./llvm.nix { enablePolly = true; };
+
+    clang-unwrapped = callPackage ./clang {
+      inherit (tools) lld;
+      inherit clang-tools-extra_src;
+    };
+    clang-polly-unwrapped = callPackage ./clang {
+      inherit clang-tools-extra_src;
+      llvm = tools.llvm-polly;
+      enablePolly = true;
+    };
+
+    llvm-manpages = lowPrio (tools.llvm.override {
+      enableManpages = true;
+      python3 = pkgs.python3;  # don't use python-boot
+    });
+
+    clang-manpages = lowPrio (tools.clang-unwrapped.override {
+      enableManpages = true;
+      python3 = pkgs.python3;  # don't use python-boot
+    });
+
+    libclang = tools.clang-unwrapped.lib;
+
+    clang = if stdenv.cc.isGNU then tools.libstdcxxClang else tools.libcxxClang;
+
+    libstdcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      extraTools = [
+        libstdcxxHook
+      ];
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = ''
+          echo "-target ${targetConfig}" >> $out/nix-support/cc-cflags
+          echo "-B${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-cflags
+          echo "-L${gcc.cc}/lib/gcc/${targetConfig}/${gcc.version}" >> $out/nix-support/cc-ldflags
+          echo "-L${gcc.cc.lib}/${targetConfig}/lib" >> $out/nix-support/cc-ldflags
+      '' + mkExtraBuildCommands cc;
+    };
+
+    libcxxClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = targetLlvmLibraries.libcxx;
+      extraPackages = [
+        targetLlvmLibraries.libcxx
+        targetLlvmLibraries.libcxxabi
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = mkExtraBuildCommands cc;
+    };
+
+    lld = callPackage ./lld.nix {};
+
+    lldb = callPackage ./lldb.nix {};
+
+    # Below, is the LLVM bootstrapping logic. It handles building a
+    # fully LLVM toolchain from scratch. No GCC toolchain should be
+    # pulled in. As a consequence, it is very quick to build different
+    # targets provided by LLVM and we can also build for what GCC
+    # doesn’t support like LLVM. Probably we should move to some other
+    # file.
+
+    bintools = callPackage ./bintools.nix {};
+
+    lldClang = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = targetLlvmLibraries.libcxx;
+      bintools = wrapBintoolsWith {
+        inherit (tools) bintools;
+      };
+      extraPackages = [
+        targetLlvmLibraries.libcxx
+        targetLlvmLibraries.libcxxabi
+        targetLlvmLibraries.compiler-rt
+      ] ++ stdenv.lib.optionals (!stdenv.targetPlatform.isWasm) [
+        targetLlvmLibraries.libunwind
+      ];
+      extraBuildCommands = ''
+        echo "-target ${stdenv.targetPlatform.config}" >> $out/nix-support/cc-cflags
+        echo "-rtlib=compiler-rt -Wno-unused-command-line-argument" >> $out/nix-support/cc-cflags
+        echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
+      '' + stdenv.lib.optionalString (!stdenv.targetPlatform.isWasm) ''
+        echo "--unwindlib=libunwind" >> $out/nix-support/cc-cflags
+      '' + stdenv.lib.optionalString stdenv.targetPlatform.isWasm ''
+        echo "-fno-exceptions" >> $out/nix-support/cc-cflags
+      '' + mkExtraBuildCommands cc;
+    };
+
+    lldClangNoLibcxx = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = wrapBintoolsWith {
+        inherit (tools) bintools;
+      };
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = ''
+        echo "-target ${stdenv.targetPlatform.config}" >> $out/nix-support/cc-cflags
+        echo "-rtlib=compiler-rt" >> $out/nix-support/cc-cflags
+        echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
+        echo "-nostdlib++" >> $out/nix-support/cc-cflags
+      '' + mkExtraBuildCommands cc;
+    };
+
+    lldClangNoLibc = wrapCCWith rec {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = wrapBintoolsWith {
+        inherit (tools) bintools;
+        libc = null;
+      };
+      extraPackages = [
+        targetLlvmLibraries.compiler-rt
+      ];
+      extraBuildCommands = ''
+        echo "-target ${stdenv.targetPlatform.config}" >> $out/nix-support/cc-cflags
+        echo "-rtlib=compiler-rt" >> $out/nix-support/cc-cflags
+        echo "-B${targetLlvmLibraries.compiler-rt}/lib" >> $out/nix-support/cc-cflags
+      '' + mkExtraBuildCommands cc;
+    };
+
+    lldClangNoCompilerRt = wrapCCWith {
+      cc = tools.clang-unwrapped;
+      libcxx = null;
+      bintools = wrapBintoolsWith {
+        inherit (tools) bintools;
+        libc = null;
+      };
+      extraPackages = [ ];
+      extraBuildCommands = ''
+        echo "-nostartfiles" >> $out/nix-support/cc-cflags
+        echo "-target ${stdenv.targetPlatform.config}" >> $out/nix-support/cc-cflags
+      '';
+    };
+
+  });
+
+  libraries = stdenv.lib.makeExtensible (libraries: let
+    callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv cmake libxml2 python3 isl release_version version fetch; });
+  in {
+
+    compiler-rt = callPackage ./compiler-rt.nix ({} //
+      (stdenv.lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
+        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoCompilerRt;
+      }));
+
+    stdenv = overrideCC stdenv buildLlvmTools.clang;
+
+    libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
+
+    libcxx = callPackage ./libc++ ({} //
+      (stdenv.lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
+        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
+      }));
+
+    libcxxabi = callPackage ./libc++abi.nix ({} //
+      (stdenv.lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
+        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
+        libunwind = libraries.libunwind;
+      }));
+
+    openmp = callPackage ./openmp.nix {};
+
+    libunwind = callPackage ./libunwind.nix ({} //
+      (stdenv.lib.optionalAttrs (stdenv.hostPlatform.useLLVM or false) {
+        stdenv = overrideCC stdenv buildLlvmTools.lldClangNoLibcxx;
+      }));
+
+  });
+
+in { inherit tools libraries; } // libraries // tools
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/fix-test-on-non-x86-like-others.patch b/nixpkgs/pkgs/development/compilers/llvm/9/fix-test-on-non-x86-like-others.patch
new file mode 100644
index 000000000000..e6c2f0406844
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/fix-test-on-non-x86-like-others.patch
@@ -0,0 +1,23 @@
+Index: test/tools/gold/X86/linkonce_odr_unnamed_addr.ll
+===================================================================
+diff --git a/test/tools/gold/X86/linkonce_odr_unnamed_addr.ll b/llvm/trunk/test/tools/gold/X86/linkonce_odr_unnamed_addr.ll
+--- a/test/tools/gold/X86/linkonce_odr_unnamed_addr.ll	(revision 372333)
++++ b/test/tools/gold/X86/linkonce_odr_unnamed_addr.ll	(working copy)
+@@ -3,7 +3,7 @@
+ 
+ ; RUN: opt -module-summary %s -o %t.o
+ ; RUN: opt -module-summary %p/Inputs/linkonce_odr_unnamed_addr.ll -o %t2.o
+-; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \
++; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \
+ ; RUN:    --plugin-opt=save-temps \
+ ; RUN:    %t.o %t2.o -o %t3.o
+ ; RUN: llvm-dis %t.o.1.promote.bc -o - | FileCheck %s
+@@ -11,7 +11,7 @@
+ ; Now test when one module is a native object. In that case we must be
+ ; conservative and not auto hide.
+ ; RUN: llc %p/Inputs/linkonce_odr_unnamed_addr.ll -o %t2native.o -filetype=obj
+-; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \
++; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \
+ ; RUN:    --plugin-opt=save-temps \
+ ; RUN:    %t.o %t2native.o -o %t3.o
+ ; RUN: llvm-dis %t.o.1.promote.bc -o - | FileCheck %s --check-prefix=NOSUMMARY
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/libc++/default.nix b/nixpkgs/pkgs/development/compilers/llvm/9/libc++/default.nix
new file mode 100644
index 000000000000..f3081d1f2699
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/libc++/default.nix
@@ -0,0 +1,55 @@
+{ lib, stdenv, fetch, cmake, python3, libcxxabi, fixDarwinDylibNames, version
+, enableShared ? true }:
+
+stdenv.mkDerivation {
+  pname = "libc++";
+  inherit version;
+
+  src = fetch "libcxx" "0d2bj5i6mk4caq7skd5nsdmz8c2m5w5anximl5wz3x32p08zz089";
+
+  postUnpack = ''
+    unpackFile ${libcxxabi.src}
+    export LIBCXXABI_INCLUDE_DIR="$PWD/$(ls -d libcxxabi-${version}*)/include"
+  '';
+
+  patches = stdenv.lib.optional stdenv.hostPlatform.isMusl ../../libcxx-0001-musl-hacks.patch;
+
+  preConfigure = ''
+    # Get headers from the cxxabi source so we can see private headers not installed by the cxxabi package
+    cmakeFlagsArray=($cmakeFlagsArray -DLIBCXX_CXX_ABI_INCLUDE_PATHS="$LIBCXXABI_INCLUDE_DIR")
+  '' + lib.optionalString stdenv.hostPlatform.isMusl ''
+    patchShebangs utils/cat_files.py
+  '';
+  nativeBuildInputs = [ cmake ]
+    ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) python3;
+
+  buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
+
+  cmakeFlags = [
+    "-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"
+    "-DLIBCXX_LIBCPPABI_VERSION=2"
+    "-DLIBCXX_CXX_ABI=libcxxabi"
+  ] ++ stdenv.lib.optional (stdenv.hostPlatform.isMusl || stdenv.hostPlatform.isWasi) "-DLIBCXX_HAS_MUSL_LIBC=1"
+    ++ stdenv.lib.optional (stdenv.hostPlatform.useLLVM or false) "-DLIBCXX_USE_COMPILER_RT=ON"
+    ++ stdenv.lib.optional stdenv.hostPlatform.isWasm [
+      "-DLIBCXX_ENABLE_THREADS=OFF"
+      "-DLIBCXX_ENABLE_FILESYSTEM=OFF"
+      "-DLIBCXX_ENABLE_EXCEPTIONS=OFF"
+    ] ++ stdenv.lib.optional (!enableShared) "-DLIBCXX_ENABLE_SHARED=OFF";
+
+  enableParallelBuilding = true;
+
+  linkCxxAbi = stdenv.isLinux;
+
+  setupHooks = [
+    ../../../../../build-support/setup-hooks/role.bash
+    ./setup-hook.sh
+  ];
+
+  meta = {
+    homepage = "https://libcxx.llvm.org/";
+    description = "A new implementation of the C++ standard library, targeting C++11";
+    license = with stdenv.lib.licenses; [ ncsa mit ];
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/libc++/setup-hook.sh b/nixpkgs/pkgs/development/compilers/llvm/9/libc++/setup-hook.sh
new file mode 100644
index 000000000000..3a274aecc23d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/libc++/setup-hook.sh
@@ -0,0 +1,6 @@
+# See pkgs/build-support/setup-hooks/role.bash
+getHostRole
+
+linkCxxAbi="@linkCxxAbi@"
+export NIX_CXXSTDLIB_COMPILE${role_post}+=" -isystem @out@/include/c++/v1"
+export NIX_CXXSTDLIB_LINK${role_post}=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/libc++abi.nix b/nixpkgs/pkgs/development/compilers/llvm/9/libc++abi.nix
new file mode 100644
index 000000000000..5b63560282c0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/libc++abi.nix
@@ -0,0 +1,67 @@
+{ stdenv, cmake, fetch, libcxx, libunwind, llvm, version
+, enableShared ? true }:
+
+stdenv.mkDerivation {
+  pname = "libc++abi";
+  inherit version;
+
+  src = fetch "libcxxabi" "1b4aiaa8cirx52vk2p5kfk57qmbqf1ipb4nqnjhdgqps9jm7iyg8";
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD && !stdenv.hostPlatform.isWasm) libunwind;
+
+  cmakeFlags = stdenv.lib.optionals (stdenv.hostPlatform.useLLVM or false) [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+    "-DLIBCXXABI_USE_LLVM_UNWINDER=ON"
+  ] ++ stdenv.lib.optionals stdenv.hostPlatform.isWasm [
+    "-DLIBCXXABI_ENABLE_THREADS=OFF"
+    "-DLIBCXXABI_ENABLE_EXCEPTIONS=OFF"
+  ] ++ stdenv.lib.optionals (!enableShared) [
+    "-DLIBCXXABI_ENABLE_SHARED=OFF"
+  ];
+
+  patches = [ ./libcxxabi-no-threads.patch ];
+
+  postUnpack = ''
+    unpackFile ${libcxx.src}
+    unpackFile ${llvm.src}
+    cmakeFlags+=" -DLLVM_PATH=$PWD/$(ls -d llvm-*) -DLIBCXXABI_LIBCXX_PATH=$PWD/$(ls -d libcxx-*)"
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    export TRIPLE=x86_64-apple-darwin
+  '' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
+    patch -p1 -d $(ls -d libcxx-*) -i ${../libcxx-0001-musl-hacks.patch}
+  '' + stdenv.lib.optionalString stdenv.hostPlatform.isWasm ''
+    patch -p1 -d $(ls -d llvm-*) -i ${./libcxxabi-wasm.patch}
+  '';
+
+  installPhase = if stdenv.isDarwin
+    then ''
+      for file in lib/*.dylib; do
+        # this should be done in CMake, but having trouble figuring out
+        # the magic combination of necessary CMake variables
+        # if you fancy a try, take a look at
+        # https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/RPATH-handling
+        install_name_tool -id $out/$file $file
+      done
+      make install
+      install -d 755 $out/include
+      install -m 644 ../include/*.h $out/include
+    ''
+    else ''
+      install -d -m 755 $out/include $out/lib
+      install -m 644 lib/libc++abi.a $out/lib
+      install -m 644 ../include/cxxabi.h $out/include
+    '' + stdenv.lib.optionalString enableShared ''
+      install -m 644 lib/libc++abi.so.1.0 $out/lib
+      ln -s libc++abi.so.1.0 $out/lib/libc++abi.so
+      ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
+    '';
+
+  meta = {
+    homepage = "https://libcxxabi.llvm.org/";
+    description = "A new implementation of low level support for a standard C++ library";
+    license = with stdenv.lib.licenses; [ ncsa mit ];
+    maintainers = with stdenv.lib.maintainers; [ vlstill ];
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/libcxxabi-no-threads.patch b/nixpkgs/pkgs/development/compilers/llvm/9/libcxxabi-no-threads.patch
new file mode 100644
index 000000000000..787f3e16500e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/libcxxabi-no-threads.patch
@@ -0,0 +1,12 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4138acf..41b4763 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -362,6 +362,7 @@ if (NOT LIBCXXABI_ENABLE_THREADS)
+                         " is also set to ON.")
+   endif()
+   add_definitions(-D_LIBCXXABI_HAS_NO_THREADS)
++  add_definitions(-D_LIBCPP_HAS_NO_THREADS)
+ endif()
+ 
+ if (LIBCXXABI_HAS_EXTERNAL_THREAD_API)
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/libcxxabi-wasm.patch b/nixpkgs/pkgs/development/compilers/llvm/9/libcxxabi-wasm.patch
new file mode 100644
index 000000000000..4ebfe46aa813
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/libcxxabi-wasm.patch
@@ -0,0 +1,16 @@
+diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake
+index 15497d405e0..33f7f18193a 100644
+--- a/cmake/modules/HandleLLVMOptions.cmake
++++ b/cmake/modules/HandleLLVMOptions.cmake
+@@ -127,7 +127,10 @@ else(WIN32)
+       set(LLVM_HAVE_LINK_VERSION_SCRIPT 1)
+     endif()
+   else(FUCHSIA OR UNIX)
+-    MESSAGE(SEND_ERROR "Unable to determine platform")
++    if(${CMAKE_SYSTEM_NAME} MATCHES "Wasi")
++    else()
++      MESSAGE(SEND_ERROR "Unable to determine platform")
++    endif()
+   endif(FUCHSIA OR UNIX)
+ endif(WIN32)
+ 
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/libunwind.nix b/nixpkgs/pkgs/development/compilers/llvm/9/libunwind.nix
new file mode 100644
index 000000000000..883c36baf062
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/libunwind.nix
@@ -0,0 +1,14 @@
+{ stdenv, version, fetch, cmake, fetchpatch, enableShared ? true }:
+
+stdenv.mkDerivation rec {
+  pname = "libunwind";
+  inherit version;
+
+  src = fetch pname "1wb02ha3gl6p0a321hwpll74pz5qvjr11xmjqx62g288f1m10njk";
+
+  nativeBuildInputs = [ cmake ];
+
+  enableParallelBuilding = true;
+
+  cmakeFlags = stdenv.lib.optional (!enableShared) "-DLIBUNWIND_ENABLE_SHARED=OFF";
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/lld.nix b/nixpkgs/pkgs/development/compilers/llvm/9/lld.nix
new file mode 100644
index 000000000000..488870e729a5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/lld.nix
@@ -0,0 +1,33 @@
+{ stdenv
+, fetch
+, cmake
+, libxml2
+, llvm
+, version
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lld";
+  inherit version;
+
+  src = fetch pname "10hckfxpapfnh6y9apjiya2jpw9nmbbmh8ayijx89mrg7snjn9l6";
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ llvm libxml2 ];
+
+  outputs = [ "out" "dev" ];
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    moveToOutput include "$dev"
+    moveToOutput lib "$dev"
+  '';
+
+  meta = {
+    description = "The LLVM Linker";
+    homepage    = "https://lld.llvm.org/";
+    license     = stdenv.lib.licenses.ncsa;
+    platforms   = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/lldb-procfs.patch b/nixpkgs/pkgs/development/compilers/llvm/9/lldb-procfs.patch
new file mode 100644
index 000000000000..b075dbaeee0a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/lldb-procfs.patch
@@ -0,0 +1,31 @@
+--- a/source/Plugins/Process/Linux/Procfs.h
++++ b/source/Plugins/Process/Linux/Procfs.h
+@@ -11,21 +11,12 @@
+ // sys/procfs.h on Android/Linux for all supported architectures.
+ 
+ #include <sys/ptrace.h>
++#include <asm/ptrace.h>
+ 
+-#ifdef __ANDROID__
+-#if defined(__arm64__) || defined(__aarch64__)
+-typedef unsigned long elf_greg_t;
+-typedef elf_greg_t
+-    elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))];
+-typedef struct user_fpsimd_state elf_fpregset_t;
+-#ifndef NT_FPREGSET
+-#define NT_FPREGSET NT_PRFPREG
+-#endif // NT_FPREGSET
+-#elif defined(__mips__)
+-#ifndef NT_FPREGSET
+-#define NT_FPREGSET NT_PRFPREG
+-#endif // NT_FPREGSET
+-#endif
+-#else // __ANDROID__
++#if !defined(__GLIBC__) && defined(__powerpc__)
++#define pt_regs musl_pt_regs
++#include <sys/procfs.h>
++#undef pt_regs
++#else
+ #include <sys/procfs.h>
+-#endif // __ANDROID__
++#endif
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/lldb.nix b/nixpkgs/pkgs/development/compilers/llvm/9/lldb.nix
new file mode 100644
index 000000000000..a8e193c27b17
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/lldb.nix
@@ -0,0 +1,72 @@
+{ stdenv
+, fetch
+, cmake
+, zlib
+, ncurses
+, swig
+, which
+, libedit
+, libxml2
+, llvm
+, clang-unwrapped
+, python3
+, version
+, darwin
+, lit
+}:
+
+stdenv.mkDerivation rec {
+  pname = "lldb";
+  inherit version;
+
+  src = fetch pname "02gb3fbz09kyw8n71218v5v77ip559x3gqbcp8y3w6n3jpbryywa";
+
+  patches = [ ./lldb-procfs.patch ];
+
+  nativeBuildInputs = [ cmake python3 which swig lit ];
+  buildInputs = [
+    ncurses
+    zlib
+    libedit
+    libxml2
+    llvm
+  ]
+  ++ stdenv.lib.optionals stdenv.isDarwin [
+    darwin.libobjc
+    darwin.apple_sdk.libs.xpc
+    darwin.apple_sdk.frameworks.Foundation
+    darwin.bootstrap_cmds
+    darwin.apple_sdk.frameworks.Carbon
+    darwin.apple_sdk.frameworks.Cocoa
+  ];
+
+  CXXFLAGS = "-fno-rtti";
+  hardeningDisable = [ "format" ];
+
+  cmakeFlags = [
+    "-DLLDB_CODESIGN_IDENTITY=" # codesigning makes nondeterministic
+    "-DClang_DIR=${clang-unwrapped}/lib/cmake"
+    "-DLLVM_EXTERNAL_LIT=${lit}/bin/lit"
+  ];
+
+  enableParallelBuilding = true;
+
+  postInstall = ''
+    # man page
+    mkdir -p $out/share/man/man1
+    install ../docs/lldb.1 -t $out/share/man/man1/
+
+    # Editor support
+    # vscode:
+    install -D ../tools/lldb-vscode/package.json $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/package.json
+    mkdir -p $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin
+    ln -s $out/bin/lldb-vscode $out/share/vscode/extensions/llvm-org.lldb-vscode-0.1.0/bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A next-generation high-performance debugger";
+    homepage = "https://llvm.org/";
+    license = licenses.ncsa;
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/llvm-outputs.patch b/nixpkgs/pkgs/development/compilers/llvm/9/llvm-outputs.patch
new file mode 100644
index 000000000000..40096fa3497f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/llvm-outputs.patch
@@ -0,0 +1,26 @@
+diff --git a/tools/llvm-config/llvm-config.cpp b/tools/llvm-config/llvm-config.cpp
+index 94d426b..37f7794 100644
+--- a/tools/llvm-config/llvm-config.cpp
++++ b/tools/llvm-config/llvm-config.cpp
+@@ -333,6 +333,21 @@ int main(int argc, char **argv) {
+     ActiveIncludeOption = "-I" + ActiveIncludeDir;
+   }
+ 
++  /// Nix-specific multiple-output handling: override ActiveLibDir if --link-shared
++  if (!IsInDevelopmentTree) {
++    bool WantShared = true;
++    for (int i = 1; i < argc; ++i) {
++      StringRef Arg = argv[i];
++      if (Arg == "--link-shared")
++        WantShared = true;
++      else if (Arg == "--link-static")
++        WantShared = false; // the last one wins
++    }
++
++    if (WantShared)
++      ActiveLibDir = std::string("@lib@") + "/lib" + LLVM_LIBDIR_SUFFIX;
++  }
++
+   /// We only use `shared library` mode in cases where the static library form
+   /// of the components provided are not available; note however that this is
+   /// skipped if we're run from within the build dir. However, once installed,
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/llvm.nix b/nixpkgs/pkgs/development/compilers/llvm/9/llvm.nix
new file mode 100644
index 000000000000..013e5bb36b94
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/llvm.nix
@@ -0,0 +1,193 @@
+{ stdenv
+, fetch
+, cmake
+, python3
+, libffi
+, libbfd
+, libpfm
+, libxml2
+, ncurses
+, version
+, release_version
+, zlib
+, buildPackages
+, debugVersion ? false
+, enableManpages ? false
+, enableSharedLibraries ? true
+, enablePFM ? !(stdenv.isDarwin
+  || stdenv.isAarch64 # broken for Ampere eMAG 8180 (c2.large.arm on Packet) #56245
+  || stdenv.isAarch32 # broken for the armv7l builder
+)
+, enablePolly ? false
+}:
+
+let
+  inherit (stdenv.lib) optional optionals optionalString;
+
+  # Used when creating a version-suffixed symlink of libLLVM.dylib
+  shortVersion = with stdenv.lib;
+    concatStringsSep "." (take 1 (splitString "." release_version));
+
+in stdenv.mkDerivation (rec {
+  pname = "llvm";
+  inherit version;
+
+  src = fetch pname "16hwp3qa54c3a3v7h8nlw0fh5criqh0hlr1skybyk0cz70gyx880";
+  polly_src = fetch "polly" "1kqg0isv0kicnylrdp5iajlgd6alc0zx1l3cxc9hs8r3z6fwcjls";
+
+  unpackPhase = ''
+    unpackFile $src
+    mv llvm-${version}* llvm
+    sourceRoot=$PWD/llvm
+  '' + optionalString enablePolly ''
+    unpackFile $polly_src
+    mv polly-* $sourceRoot/tools/polly
+  '';
+
+  outputs = [ "out" "python" ]
+    ++ optional enableSharedLibraries "lib";
+
+  nativeBuildInputs = [ cmake python3 ]
+    ++ optionals enableManpages [ python3.pkgs.sphinx python3.pkgs.recommonmark ];
+
+  buildInputs = [ libxml2 libffi ]
+    ++ optional enablePFM libpfm; # exegesis
+
+  propagatedBuildInputs = [ ncurses zlib ];
+
+  postPatch = optionalString stdenv.isDarwin ''
+    substituteInPlace cmake/modules/AddLLVM.cmake \
+      --replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \
+      --replace 'set(_install_rpath "@loader_path/../lib" ''${extra_libdir})' ""
+  ''
+  # Patch llvm-config to return correct library path based on --link-{shared,static}.
+  + optionalString (enableSharedLibraries) ''
+    substitute '${./llvm-outputs.patch}' ./llvm-outputs.patch --subst-var lib
+    patch -p1 < ./llvm-outputs.patch
+  '' + ''
+    # FileSystem permissions tests fail with various special bits
+    substituteInPlace unittests/Support/CMakeLists.txt \
+      --replace "Path.cpp" ""
+    rm unittests/Support/Path.cpp
+  '' + optionalString stdenv.hostPlatform.isMusl ''
+    patch -p1 -i ${../TLI-musl.patch}
+    substituteInPlace unittests/Support/CMakeLists.txt \
+      --replace "add_subdirectory(DynamicLibrary)" ""
+    rm unittests/Support/DynamicLibrary/DynamicLibraryTest.cpp
+    # valgrind unhappy with musl or glibc, but fails w/musl only
+    rm test/CodeGen/AArch64/wineh4.mir
+  '' + optionalString stdenv.hostPlatform.isAarch32 ''
+    # skip failing X86 test cases on 32-bit ARM
+    rm test/DebugInfo/X86/convert-debugloc.ll
+    rm test/DebugInfo/X86/convert-inlined.ll
+    rm test/DebugInfo/X86/convert-linked.ll
+    rm test/tools/dsymutil/X86/op-convert.test
+  '' + optionalString (stdenv.hostPlatform.system == "armv6l-linux") ''
+    # Seems to require certain floating point hardware (NEON?)
+    rm test/ExecutionEngine/frem.ll
+  '' + ''
+    patchShebangs test/BugPoint/compile-custom.ll.py
+
+    # Fix test so that no extra locale files are needed
+    substituteInPlace test/tools/llvm-ar/mri-utf8.test \
+      --replace en_US.UTF-8 C.UTF-8
+
+    # Fix x86 gold test on non-x86 platforms
+    # (similar fix made to others in this directory previously, FWIW)
+    patch -p1 -i  ${./fix-test-on-non-x86-like-others.patch}
+  '';
+
+  # hacky fix: created binaries need to be run before installation
+  preBuild = ''
+    mkdir -p $out/
+    ln -sv $PWD/lib $out
+  '';
+
+  cmakeFlags = with stdenv; [
+    "-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
+    "-DLLVM_INSTALL_UTILS=ON"  # Needed by rustc
+    "-DLLVM_BUILD_TESTS=ON"
+    "-DLLVM_ENABLE_FFI=ON"
+    "-DLLVM_ENABLE_RTTI=ON"
+    "-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
+    "-DLLVM_ENABLE_DUMP=ON"
+  ] ++ optionals enableSharedLibraries [
+    "-DLLVM_LINK_LLVM_DYLIB=ON"
+  ] ++ optionals enableManpages [
+    "-DLLVM_BUILD_DOCS=ON"
+    "-DLLVM_ENABLE_SPHINX=ON"
+    "-DSPHINX_OUTPUT_MAN=ON"
+    "-DSPHINX_OUTPUT_HTML=OFF"
+    "-DSPHINX_WARNINGS_AS_ERRORS=OFF"
+  ] ++ optionals (!isDarwin) [
+    "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
+  ] ++ optionals (isDarwin) [
+    "-DLLVM_ENABLE_LIBCXX=ON"
+    "-DCAN_TARGET_i386=false"
+  ] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
+    "-DCMAKE_CROSSCOMPILING=True"
+    "-DLLVM_TABLEGEN=${buildPackages.llvm_9}/bin/llvm-tblgen"
+  ];
+
+  postBuild = ''
+    rm -fR $out
+  '';
+
+  preCheck = ''
+    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$PWD/lib
+  '';
+
+  postInstall = ''
+    mkdir -p $python/share
+    mv $out/share/opt-viewer $python/share/opt-viewer
+  ''
+  + optionalString enableSharedLibraries ''
+    moveToOutput "lib/libLLVM-*" "$lib"
+    moveToOutput "lib/libLLVM${stdenv.hostPlatform.extensions.sharedLibrary}" "$lib"
+    substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
+      --replace "\''${_IMPORT_PREFIX}/lib/libLLVM-" "$lib/lib/libLLVM-"
+  ''
+  + optionalString (stdenv.isDarwin && enableSharedLibraries) ''
+    substituteInPlace "$out/lib/cmake/llvm/LLVMExports-${if debugVersion then "debug" else "release"}.cmake" \
+      --replace "\''${_IMPORT_PREFIX}/lib/libLLVM.dylib" "$lib/lib/libLLVM.dylib"
+    ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${shortVersion}.dylib
+    ln -s $lib/lib/libLLVM.dylib $lib/lib/libLLVM-${release_version}.dylib
+  '';
+
+  doCheck = stdenv.isLinux && (!stdenv.isx86_32);
+
+  checkTarget = "check-all";
+
+  enableParallelBuilding = true;
+
+  requiredSystemFeatures = [ "big-parallel" ];
+  meta = {
+    description = "Collection of modular and reusable compiler and toolchain technologies";
+    homepage    = "https://llvm.org/";
+    license     = stdenv.lib.licenses.ncsa;
+    maintainers = with stdenv.lib.maintainers; [ lovek323 raskin dtzWill ];
+    platforms   = stdenv.lib.platforms.all;
+  };
+} // stdenv.lib.optionalAttrs enableManpages {
+  pname = "llvm-manpages";
+
+  buildPhase = ''
+    make docs-llvm-man
+  '';
+
+  propagatedBuildInputs = [];
+
+  installPhase = ''
+    make -C docs install
+  '';
+
+  postPatch = null;
+  postInstall = null;
+
+  outputs = [ "out" ];
+
+  doCheck = false;
+
+  meta.description = "man pages for LLVM ${version}";
+})
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/openmp.nix b/nixpkgs/pkgs/development/compilers/llvm/9/openmp.nix
new file mode 100644
index 000000000000..84f898ec06a1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/openmp.nix
@@ -0,0 +1,26 @@
+{ stdenv
+, fetch
+, cmake
+, llvm
+, perl
+, version
+}:
+
+stdenv.mkDerivation rec {
+  pname = "openmp";
+  inherit version;
+
+  src = fetch pname "1knafnpp0f7hylx8q20lkd6g1sf0flly572dayc5d5kghh7hd52w";
+
+  nativeBuildInputs = [ cmake perl ];
+  buildInputs = [ llvm ];
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "Components required to build an executable OpenMP program";
+    homepage    = "https://openmp.llvm.org/";
+    license     = stdenv.lib.licenses.mit;
+    platforms   = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/llvm/9/sanitizers-nongnu.patch b/nixpkgs/pkgs/development/compilers/llvm/9/sanitizers-nongnu.patch
new file mode 100644
index 000000000000..1f2ac97818eb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/9/sanitizers-nongnu.patch
@@ -0,0 +1,412 @@
+From f7a253f8f85d0f49df6b73996737a3e84ac64236 Mon Sep 17 00:00:00 2001
+From: Will Dietz <w@wdtz.org>
+Date: Mon, 24 Sep 2018 11:17:25 -0500
+Subject: [PATCH] Ported to 7.0, taken from gentoo-musl project.
+
+------
+Ported to compiler-rt-sanitizers-5.0.0. Taken from
+
+https://gist.githubusercontent.com/pwaller/2337f3290f12634cad3e3730cff0a6c1/raw/83c87a8585e2f9662494db5662e5361beb093c26/nongnu.patch
+Signed-off-by: Jory A. Pratt <anarchy@gentoo.org>
+
+Taken from gentoo-musl project, with a few additional minor fixes.
+---
+ lib/asan/asan_linux.cc                        |  4 +-
+ lib/interception/interception_linux.cc        |  2 +-
+ lib/interception/interception_linux.h         |  2 +-
+ lib/msan/msan_linux.cc                        |  2 +-
+ lib/sanitizer_common/sanitizer_allocator.cc   |  2 +-
+ .../sanitizer_common_interceptors_ioctl.inc   |  4 +-
+ .../sanitizer_common_syscalls.inc             |  2 +-
+ lib/sanitizer_common/sanitizer_linux.cc       |  8 +++-
+ .../sanitizer_linux_libcdep.cc                | 10 ++---
+ lib/sanitizer_common/sanitizer_platform.h     |  6 +++
+ .../sanitizer_platform_interceptors.h         |  4 +-
+ .../sanitizer_platform_limits_posix.cc        | 37 +++++++++++--------
+ lib/tsan/rtl/tsan_platform_linux.cc           |  2 +-
+ 13 files changed, 51 insertions(+), 34 deletions(-)
+
+diff --git a/lib/asan/asan_linux.cc b/lib/asan/asan_linux.cc
+index 625f32d40..73cf77aca 100644
+--- a/lib/asan/asan_linux.cc
++++ b/lib/asan/asan_linux.cc
+@@ -46,7 +46,7 @@
+ #include <link.h>
+ #endif
+ 
+-#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS
++#if SANITIZER_ANDROID || SANITIZER_FREEBSD || SANITIZER_SOLARIS || SANITIZER_NONGNU
+ #include <ucontext.h>
+ extern "C" void* _DYNAMIC;
+ #elif SANITIZER_NETBSD
+@@ -139,7 +139,7 @@ void AsanApplyToGlobals(globals_op_fptr op, const void *needle) {
+   UNIMPLEMENTED();
+ }
+ 
+-#if SANITIZER_ANDROID
++#if SANITIZER_ANDROID || SANITIZER_NONGNU
+ // FIXME: should we do anything for Android?
+ void AsanCheckDynamicRTPrereqs() {}
+ void AsanCheckIncompatibleRT() {}
+diff --git a/lib/interception/interception_linux.cc b/lib/interception/interception_linux.cc
+index 26bfcd8f6..529b234f7 100644
+--- a/lib/interception/interception_linux.cc
++++ b/lib/interception/interception_linux.cc
+@@ -43,7 +43,7 @@ bool GetRealFunctionAddress(const char *func_name, uptr *func_addr,
+ }
+ 
+ // Android and Solaris do not have dlvsym
+-#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD
++#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD && !SANITIZER_NONGNU
+ void *GetFuncAddrVer(const char *func_name, const char *ver) {
+   return dlvsym(RTLD_NEXT, func_name, ver);
+ }
+diff --git a/lib/interception/interception_linux.h b/lib/interception/interception_linux.h
+index 942c25609..24a4d5080 100644
+--- a/lib/interception/interception_linux.h
++++ b/lib/interception/interception_linux.h
+@@ -36,7 +36,7 @@ void *GetFuncAddrVer(const char *func_name, const char *ver);
+       (::__interception::uptr) & WRAP(func))
+ 
+ // Android,  Solaris and OpenBSD do not have dlvsym
+-#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD
++#if !SANITIZER_ANDROID && !SANITIZER_SOLARIS && !SANITIZER_OPENBSD && !SANITIZER_NONGNU
+ #define INTERCEPT_FUNCTION_VER_LINUX_OR_FREEBSD(func, symver) \
+   (::__interception::real_##func = (func##_f)(                \
+        unsigned long)::__interception::GetFuncAddrVer(#func, symver))
+diff --git a/lib/msan/msan_linux.cc b/lib/msan/msan_linux.cc
+index 385a650c4..6e30a8ce9 100644
+--- a/lib/msan/msan_linux.cc
++++ b/lib/msan/msan_linux.cc
+@@ -13,7 +13,7 @@
+ //===----------------------------------------------------------------------===//
+ 
+ #include "sanitizer_common/sanitizer_platform.h"
+-#if SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD
++#if SANITIZER_FREEBSD || (SANITIZER_LINUX && !SANITIZER_NONGNU) || SANITIZER_NETBSD
+ 
+ #include "msan.h"
+ #include "msan_report.h"
+diff --git a/lib/sanitizer_common/sanitizer_allocator.cc b/lib/sanitizer_common/sanitizer_allocator.cc
+index 6bfd5e5ee..048f6154f 100644
+--- a/lib/sanitizer_common/sanitizer_allocator.cc
++++ b/lib/sanitizer_common/sanitizer_allocator.cc
+@@ -27,7 +27,7 @@ const char *SecondaryAllocatorName = "LargeMmapAllocator";
+ 
+ // ThreadSanitizer for Go uses libc malloc/free.
+ #if SANITIZER_GO || defined(SANITIZER_USE_MALLOC)
+-# if SANITIZER_LINUX && !SANITIZER_ANDROID
++# if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ extern "C" void *__libc_malloc(uptr size);
+ #  if !SANITIZER_GO
+ extern "C" void *__libc_memalign(uptr alignment, uptr size);
+diff --git a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
+index 2d633c173..b6eb23116 100644
+--- a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
++++ b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
+@@ -104,7 +104,7 @@ static void ioctl_table_fill() {
+   _(SIOCGETVIFCNT, WRITE, struct_sioc_vif_req_sz);
+ #endif
+ 
+-#if SANITIZER_LINUX
++#if SANITIZER_LINUX && !SANITIZER_NONGNU
+   // Conflicting request ids.
+   // _(CDROMAUDIOBUFSIZ, NONE, 0);
+   // _(SNDCTL_TMR_CONTINUE, NONE, 0);
+@@ -365,7 +365,7 @@ static void ioctl_table_fill() {
+   _(VT_WAITACTIVE, NONE, 0);
+ #endif
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE
+   _(CYGETDEFTHRESH, WRITE, sizeof(int));
+   _(CYGETDEFTIMEOUT, WRITE, sizeof(int));
+diff --git a/lib/sanitizer_common/sanitizer_common_syscalls.inc b/lib/sanitizer_common/sanitizer_common_syscalls.inc
+index 469c8eb7e..24f87867d 100644
+--- a/lib/sanitizer_common/sanitizer_common_syscalls.inc
++++ b/lib/sanitizer_common/sanitizer_common_syscalls.inc
+@@ -2038,7 +2038,7 @@ POST_SYSCALL(setrlimit)(long res, long resource, void *rlim) {
+   }
+ }
+ 
+-#if !SANITIZER_ANDROID
++#if !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ PRE_SYSCALL(prlimit64)(long pid, long resource, const void *new_rlim,
+                        void *old_rlim) {
+   if (new_rlim) PRE_READ(new_rlim, struct_rlimit64_sz);
+diff --git a/lib/sanitizer_common/sanitizer_linux.cc b/lib/sanitizer_common/sanitizer_linux.cc
+index 96d6c1eff..9e2b7fb9d 100644
+--- a/lib/sanitizer_common/sanitizer_linux.cc
++++ b/lib/sanitizer_common/sanitizer_linux.cc
+@@ -541,13 +541,13 @@ const char *GetEnv(const char *name) {
+ #endif
+ }
+ 
+-#if !SANITIZER_FREEBSD && !SANITIZER_NETBSD && !SANITIZER_OPENBSD
++#if !SANITIZER_FREEBSD && !SANITIZER_NETBSD && !SANITIZER_OPENBSD && !SANITIZER_NONGNU
+ extern "C" {
+ SANITIZER_WEAK_ATTRIBUTE extern void *__libc_stack_end;
+ }
+ #endif
+ 
+-#if !SANITIZER_GO && !SANITIZER_FREEBSD && !SANITIZER_NETBSD &&                \
++#if (!SANITIZER_GO || SANITIZER_NONGNU) && !SANITIZER_FREEBSD && !SANITIZER_NETBSD &&                \
+     !SANITIZER_OPENBSD
+ static void ReadNullSepFileToArray(const char *path, char ***arr,
+                                    int arr_size) {
+@@ -590,6 +590,10 @@ static void GetArgsAndEnv(char ***argv, char ***envp) {
+ #elif SANITIZER_NETBSD
+   *argv = __ps_strings->ps_argvstr;
+   *envp = __ps_strings->ps_envstr;
++#elif SANITIZER_NONGNU
++    static const int kMaxArgv = 2000, kMaxEnvp = 2000;
++    ReadNullSepFileToArray("/proc/self/cmdline", argv, kMaxArgv);
++    ReadNullSepFileToArray("/proc/self/environ", envp, kMaxEnvp);
+ #else // SANITIZER_FREEBSD
+ #if !SANITIZER_GO
+   if (&__libc_stack_end) {
+diff --git a/lib/sanitizer_common/sanitizer_linux_libcdep.cc b/lib/sanitizer_common/sanitizer_linux_libcdep.cc
+index 4962ff832..438f94dbe 100644
+--- a/lib/sanitizer_common/sanitizer_linux_libcdep.cc
++++ b/lib/sanitizer_common/sanitizer_linux_libcdep.cc
+@@ -179,7 +179,7 @@ __attribute__((unused)) static bool GetLibcVersion(int *major, int *minor,
+ }
+ 
+ #if !SANITIZER_FREEBSD && !SANITIZER_ANDROID && !SANITIZER_GO &&               \
+-    !SANITIZER_NETBSD && !SANITIZER_OPENBSD && !SANITIZER_SOLARIS
++    !SANITIZER_NETBSD && !SANITIZER_OPENBSD && !SANITIZER_SOLARIS && !SANITIZER_NONGNU
+ static uptr g_tls_size;
+ 
+ #ifdef __i386__
+@@ -261,7 +261,7 @@ void InitTlsSize() { }
+ #if (defined(__x86_64__) || defined(__i386__) || defined(__mips__) ||          \
+      defined(__aarch64__) || defined(__powerpc64__) || defined(__s390__) ||    \
+      defined(__arm__)) &&                                                      \
+-    SANITIZER_LINUX && !SANITIZER_ANDROID
++    SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ // sizeof(struct pthread) from glibc.
+ static atomic_uintptr_t thread_descriptor_size;
+ 
+@@ -426,7 +426,7 @@ int GetSizeFromHdr(struct dl_phdr_info *info, size_t size, void *data) {
+ 
+ #if !SANITIZER_GO
+ static void GetTls(uptr *addr, uptr *size) {
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ # if defined(__x86_64__) || defined(__i386__) || defined(__s390__)
+   *addr = ThreadSelf();
+   *size = GetTlsSize();
+@@ -470,7 +470,7 @@ static void GetTls(uptr *addr, uptr *size) {
+ #elif SANITIZER_OPENBSD
+   *addr = 0;
+   *size = 0;
+-#elif SANITIZER_ANDROID
++#elif SANITIZER_ANDROID || SANITIZER_NONGNU
+   *addr = 0;
+   *size = 0;
+ #elif SANITIZER_SOLARIS
+@@ -486,7 +486,7 @@ static void GetTls(uptr *addr, uptr *size) {
+ #if !SANITIZER_GO
+ uptr GetTlsSize() {
+ #if SANITIZER_FREEBSD || SANITIZER_ANDROID || SANITIZER_NETBSD ||              \
+-    SANITIZER_OPENBSD || SANITIZER_SOLARIS
++    SANITIZER_OPENBSD || SANITIZER_SOLARIS || SANITIZER_NONGNU
+   uptr addr, size;
+   GetTls(&addr, &size);
+   return size;
+diff --git a/lib/sanitizer_common/sanitizer_platform.h b/lib/sanitizer_common/sanitizer_platform.h
+index d81e25580..e10680ac8 100644
+--- a/lib/sanitizer_common/sanitizer_platform.h
++++ b/lib/sanitizer_common/sanitizer_platform.h
+@@ -208,6 +208,12 @@
+ # define SANITIZER_SOLARIS32 0
+ #endif
+ 
++#if defined(__linux__) && !defined(__GLIBC__)
++# define SANITIZER_NONGNU 1
++#else
++# define SANITIZER_NONGNU 0
++#endif
++
+ #if defined(__myriad2__)
+ # define SANITIZER_MYRIAD2 1
+ #else
+diff --git a/lib/sanitizer_common/sanitizer_platform_interceptors.h b/lib/sanitizer_common/sanitizer_platform_interceptors.h
+index f95539a73..6c53b3415 100644
+--- a/lib/sanitizer_common/sanitizer_platform_interceptors.h
++++ b/lib/sanitizer_common/sanitizer_platform_interceptors.h
+@@ -39,7 +39,7 @@
+ # include "sanitizer_platform_limits_solaris.h"
+ #endif
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ # define SI_LINUX_NOT_ANDROID 1
+ #else
+ # define SI_LINUX_NOT_ANDROID 0
+@@ -322,7 +322,7 @@
+ #define SANITIZER_INTERCEPT_ETHER_R (SI_FREEBSD || SI_LINUX_NOT_ANDROID)
+ #define SANITIZER_INTERCEPT_SHMCTL          \
+   (SI_NETBSD || SI_OPENBSD || SI_SOLARIS || \
+-  ((SI_FREEBSD || SI_LINUX_NOT_ANDROID) && \
++  ((SI_FREEBSD || SI_LINUX_NOT_ANDROID || SANITIZER_NONGNU) && \
+     SANITIZER_WORDSIZE == 64))  // NOLINT
+ #define SANITIZER_INTERCEPT_RANDOM_R SI_LINUX_NOT_ANDROID
+ #define SANITIZER_INTERCEPT_PTHREAD_ATTR_GET SI_POSIX
+diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+index 54da635d7..2f6ff69c3 100644
+--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+@@ -14,6 +14,9 @@
+ 
+ #include "sanitizer_platform.h"
+ 
++// Workaround musl <--> linux conflicting definition of 'struct sysinfo'
++#define _LINUX_SYSINFO_H
++
+ #if SANITIZER_LINUX || SANITIZER_FREEBSD || SANITIZER_MAC
+ // Tests in this file assume that off_t-dependent data structures match the
+ // libc ABI. For example, struct dirent here is what readdir() function (as
+@@ -138,12 +141,14 @@ typedef struct user_fpregs elf_fpregset_t;
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+ #include <glob.h>
+-#include <obstack.h>
++#  if !SANITIZER_NONGNU
++#    include <obstack.h>
++#  endif
+ #include <mqueue.h>
+-#include <net/if_ppp.h>
+-#include <netax25/ax25.h>
+-#include <netipx/ipx.h>
+-#include <netrom/netrom.h>
++#include <linux/if_ppp.h>
++#include <linux/ax25.h>
++#include <linux/ipx.h>
++#include <linux/netrom.h>
+ #if HAVE_RPC_XDR_H
+ # include <rpc/xdr.h>
+ #elif HAVE_TIRPC_RPC_XDR_H
+@@ -251,7 +256,7 @@ namespace __sanitizer {
+   unsigned struct_itimerspec_sz = sizeof(struct itimerspec);
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   // Use pre-computed size of struct ustat to avoid <sys/ustat.h> which
+   // has been removed from glibc 2.28.
+ #if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \
+@@ -322,7 +327,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(ElfW(Phdr));
+ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+ #endif
+ 
+-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
++#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   int glob_nomatch = GLOB_NOMATCH;
+   int glob_altdirfunc = GLOB_ALTDIRFUNC;
+ #endif
+@@ -416,7 +421,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+   unsigned struct_termios_sz = sizeof(struct termios);
+   unsigned struct_winsize_sz = sizeof(struct winsize);
+ 
+-#if SANITIZER_LINUX
++#if SANITIZER_LINUX && !SANITIZER_NONGNU
+   unsigned struct_arpreq_sz = sizeof(struct arpreq);
+   unsigned struct_cdrom_msf_sz = sizeof(struct cdrom_msf);
+   unsigned struct_cdrom_multisession_sz = sizeof(struct cdrom_multisession);
+@@ -466,7 +471,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+   unsigned struct_vt_mode_sz = sizeof(struct vt_mode);
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct);
+   unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor);
+ #if EV_VERSION > (0x010000)
+@@ -834,7 +839,7 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+   unsigned IOCTL_VT_WAITACTIVE = VT_WAITACTIVE;
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH;
+   unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT;
+   unsigned IOCTL_CYGETMON = CYGETMON;
+@@ -989,7 +994,7 @@ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phdr);
+ CHECK_SIZE_AND_OFFSET(dl_phdr_info, dlpi_phnum);
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
++#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ CHECK_TYPE_SIZE(glob_t);
+ CHECK_SIZE_AND_OFFSET(glob_t, gl_pathc);
+ CHECK_SIZE_AND_OFFSET(glob_t, gl_pathv);
+@@ -1023,6 +1028,7 @@ CHECK_TYPE_SIZE(iovec);
+ CHECK_SIZE_AND_OFFSET(iovec, iov_base);
+ CHECK_SIZE_AND_OFFSET(iovec, iov_len);
+ 
++#if !SANITIZER_NONGNU
+ CHECK_TYPE_SIZE(msghdr);
+ CHECK_SIZE_AND_OFFSET(msghdr, msg_name);
+ CHECK_SIZE_AND_OFFSET(msghdr, msg_namelen);
+@@ -1036,6 +1042,7 @@ CHECK_TYPE_SIZE(cmsghdr);
+ CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_len);
+ CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_level);
+ CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_type);
++#endif
+ 
+ #ifndef __GLIBC_PREREQ
+ #define __GLIBC_PREREQ(x, y) 0
+@@ -1145,7 +1152,7 @@ CHECK_SIZE_AND_OFFSET(mntent, mnt_passno);
+ 
+ CHECK_TYPE_SIZE(ether_addr);
+ 
+-#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID
++#if (SANITIZER_LINUX || SANITIZER_FREEBSD) && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ CHECK_TYPE_SIZE(ipc_perm);
+ # if SANITIZER_FREEBSD
+ CHECK_SIZE_AND_OFFSET(ipc_perm, key);
+@@ -1206,7 +1213,7 @@ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_dstaddr);
+ CHECK_SIZE_AND_OFFSET(ifaddrs, ifa_data);
+ #endif
+ 
+-#if SANITIZER_LINUX
++#if SANITIZER_LINUX && !SANITIZER_NONGNU
+ COMPILER_CHECK(sizeof(__sanitizer_mallinfo) == sizeof(struct mallinfo));
+ #endif
+ 
+@@ -1256,7 +1263,7 @@ COMPILER_CHECK(__sanitizer_XDR_DECODE == XDR_DECODE);
+ COMPILER_CHECK(__sanitizer_XDR_FREE == XDR_FREE);
+ #endif
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ COMPILER_CHECK(sizeof(__sanitizer_FILE) <= sizeof(FILE));
+ CHECK_SIZE_AND_OFFSET(FILE, _flags);
+ CHECK_SIZE_AND_OFFSET(FILE, _IO_read_ptr);
+@@ -1275,7 +1282,7 @@ CHECK_SIZE_AND_OFFSET(FILE, _chain);
+ CHECK_SIZE_AND_OFFSET(FILE, _fileno);
+ #endif
+ 
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+ COMPILER_CHECK(sizeof(__sanitizer__obstack_chunk) <= sizeof(_obstack_chunk));
+ CHECK_SIZE_AND_OFFSET(_obstack_chunk, limit);
+ CHECK_SIZE_AND_OFFSET(_obstack_chunk, prev);
+diff --git a/lib/tsan/rtl/tsan_platform_linux.cc b/lib/tsan/rtl/tsan_platform_linux.cc
+index de989b780..51a97b554 100644
+--- a/lib/tsan/rtl/tsan_platform_linux.cc
++++ b/lib/tsan/rtl/tsan_platform_linux.cc
+@@ -294,7 +294,7 @@ void InitializePlatform() {
+ // This is required to properly "close" the fds, because we do not see internal
+ // closes within glibc. The code is a pure hack.
+ int ExtractResolvFDs(void *state, int *fds, int nfd) {
+-#if SANITIZER_LINUX && !SANITIZER_ANDROID
++#if SANITIZER_LINUX && !SANITIZER_ANDROID && !SANITIZER_NONGNU
+   int cnt = 0;
+   struct __res_state *statp = (struct __res_state*)state;
+   for (int i = 0; i < MAXNS && cnt < nfd; i++) {
+-- 
+2.19.0
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/TLI-musl.patch b/nixpkgs/pkgs/development/compilers/llvm/TLI-musl.patch
new file mode 100644
index 000000000000..1a6908086637
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/TLI-musl.patch
@@ -0,0 +1,35 @@
+From 5c571082fdaf61f6df19d9b7137dc26d71334058 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+Date: Thu, 18 Feb 2016 10:33:04 +0100
+Subject: [PATCH 2/3] Fix build with musl libc
+
+On musl libc the fopen64 and fopen are the same thing, but for
+compatibility they have a `#define fopen64 fopen`. Same applies for
+fseek64, fstat64, fstatvfs64, ftello64, lstat64, stat64 and tmpfile64.
+---
+ include/llvm/Analysis/TargetLibraryInfo.h | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/include/llvm/Analysis/TargetLibraryInfo.h b/include/llvm/Analysis/TargetLibraryInfo.h
+index 7becdf0..7f14427 100644
+--- a/include/llvm/Analysis/TargetLibraryInfo.h
++++ b/include/llvm/Analysis/TargetLibraryInfo.h
+@@ -18,6 +18,15 @@
+ #include "llvm/IR/Module.h"
+ #include "llvm/Pass.h"
+ 
++#undef fopen64
++#undef fseeko64
++#undef fstat64
++#undef fstatvfs64
++#undef ftello64
++#undef lstat64
++#undef stat64
++#undef tmpfile64
++
+ namespace llvm {
+ /// VecDesc - Describes a possible vectorization of a function.
+ /// Function 'VectorFnName' is equivalent to 'ScalarFnName' vectorized
+-- 
+2.7.3
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/aarch64.patch b/nixpkgs/pkgs/development/compilers/llvm/aarch64.patch
new file mode 100644
index 000000000000..205074e48e4e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/aarch64.patch
@@ -0,0 +1,51 @@
+--- lib/Support/Unix/Memory.inc
++++ lib/Support/Unix/Memory.inc
+@@ -126,8 +126,12 @@
+   Result.Address = Addr;
+   Result.Size = NumPages*PageSize;
+ 
+-  if (PFlags & MF_EXEC)
+-    Memory::InvalidateInstructionCache(Result.Address, Result.Size);
++  // Rely on protectMappedMemory to invalidate instruction cache.
++  if (PFlags & MF_EXEC) {
++    EC = Memory::protectMappedMemory (Result, PFlags);
++    if (EC != std::error_code())
++      return MemoryBlock();
++  }
+ 
+   return Result;
+ }
+@@ -156,15 +160,31 @@
+     return std::error_code(EINVAL, std::generic_category());
+ 
+   int Protect = getPosixProtectionFlags(Flags);
+-
+   uintptr_t Start = alignAddr((uint8_t *)M.Address - PageSize + 1, PageSize);
+   uintptr_t End = alignAddr((uint8_t *)M.Address + M.Size, PageSize);
++
++  bool InvalidateCache = (Flags & MF_EXEC);
++
++#if defined(__arm__) || defined(__aarch64__)
++  // Certain ARM implementations treat icache clear instruction as a memory read,
++  // and CPU segfaults on trying to clear cache on !PROT_READ page.  Therefore we need
++  // to temporarily add PROT_READ for the sake of flushing the instruction caches.
++  if (InvalidateCache && !(Protect & PROT_READ)) {
++    int Result = ::mprotect((void *)Start, End - Start, Protect | PROT_READ);
++    if (Result != 0)
++      return std::error_code(errno, std::generic_category());
++
++    Memory::InvalidateInstructionCache(M.Address, M.Size);
++    InvalidateCache = false;
++  }
++#endif
++
+   int Result = ::mprotect((void *)Start, End - Start, Protect);
+ 
+   if (Result != 0)
+     return std::error_code(errno, std::generic_category());
+ 
+-  if (Flags & MF_EXEC)
++  if (InvalidateCache)
+     Memory::InvalidateInstructionCache(M.Address, M.Size);
+ 
+   return std::error_code();
diff --git a/nixpkgs/pkgs/development/compilers/llvm/libcxx-0001-musl-hacks.patch b/nixpkgs/pkgs/development/compilers/llvm/libcxx-0001-musl-hacks.patch
new file mode 100644
index 000000000000..bcb5ad8cfb87
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/libcxx-0001-musl-hacks.patch
@@ -0,0 +1,39 @@
+From 1c936d7fda3275265e37f93697232a1ed652390f Mon Sep 17 00:00:00 2001
+From: Will Dietz <w@wdtz.org>
+Date: Sat, 9 Jul 2016 19:22:54 -0500
+Subject: [PATCH] musl fixes/hacks
+
+Conflicts:
+
+	include/__config
+	include/locale
+	src/locale.cpp
+---
+ include/locale |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/include/locale b/include/locale
+index 3d804e8..9b01f5b 100644
+--- a/include/locale
++++ b/include/locale
+@@ -695,7 +695,7 @@ __num_get_signed_integral(const char* __a, const char* __a_end,
+         typename remove_reference<decltype(errno)>::type __save_errno = errno;
+         errno = 0;
+         char *__p2;
+-        long long __ll = strtoll_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
++        long long __ll = strtoll(__a, &__p2, __base);
+         typename remove_reference<decltype(errno)>::type __current_errno = errno;
+         if (__current_errno == 0)
+             errno = __save_errno;
+@@ -735,7 +735,7 @@ __num_get_unsigned_integral(const char* __a, const char* __a_end,
+         typename remove_reference<decltype(errno)>::type __save_errno = errno;
+         errno = 0;
+         char *__p2;
+-        unsigned long long __ll = strtoull_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
++        unsigned long long __ll = strtoull(__a, &__p2, __base);
+         typename remove_reference<decltype(errno)>::type __current_errno = errno;
+         if (__current_errno == 0)
+             errno = __save_errno;
+-- 
+1.7.1
+
diff --git a/nixpkgs/pkgs/development/compilers/llvm/multi.nix b/nixpkgs/pkgs/development/compilers/llvm/multi.nix
new file mode 100644
index 000000000000..b4f2f8f9d6f6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/llvm/multi.nix
@@ -0,0 +1,48 @@
+{ runCommand,
+clang,
+gcc64,
+gcc32,
+glibc_multi
+}:
+
+let
+  combine = basegcc: runCommand "combine-gcc-libc" {} ''
+    mkdir -p $out
+    cp -r ${basegcc.cc}/lib $out/lib
+
+    chmod u+rw -R $out/lib
+    cp -r ${basegcc.libc}/lib/* $(ls -d $out/lib/gcc/*/*)
+  '';
+  gcc_multi_sysroot = runCommand "gcc-multi-sysroot" {} ''
+    mkdir -p $out/lib/gcc
+
+    ln -s ${combine gcc64}/lib/gcc/* $out/lib/gcc/
+    ln -s ${combine gcc32}/lib/gcc/* $out/lib/gcc/
+    # XXX: This shouldn't be needed, clang just doesn't look for "i686-unknown"
+    ln -s $out/lib/gcc/i686-unknown-linux-gnu $out/lib/gcc/i686-pc-linux-gnu
+
+
+    # includes
+    ln -s ${glibc_multi.dev}/include $out/
+
+    # dynamic linkers
+    mkdir -p $out/lib/32
+    ln -s ${glibc_multi.out}/lib/ld-linux* $out/lib
+    ln -s ${glibc_multi.out}/lib/32/ld-linux* $out/lib/32/
+  '';
+
+  clangMulti = clang.override {
+    # Only used for providing expected structure re:dynamic linkers, AFAIK
+    # Most of the magic is done by setting the --gcc-toolchain option below
+    libc = gcc_multi_sysroot;
+
+    bintools = clang.bintools.override {
+      libc = gcc_multi_sysroot;
+    };
+
+    extraBuildCommands = ''
+      sed -e '$a --gcc-toolchain=${gcc_multi_sysroot}' -i $out/nix-support/libc-cflags
+    '';
+  };
+
+in clangMulti
diff --git a/nixpkgs/pkgs/development/compilers/manticore/default.nix b/nixpkgs/pkgs/development/compilers/manticore/default.nix
new file mode 100644
index 000000000000..8d2ad8e6bbc5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/manticore/default.nix
@@ -0,0 +1,55 @@
+{ stdenv, fetchFromGitHub, coreutils, autoreconfHook, smlnj }:
+
+let
+  rev = "7376cb20ba5285a6b076a73c821e4743809c1d9d";
+in stdenv.mkDerivation {
+  pname = "manticore";
+  version = "2019.12.03";
+ 
+  src = fetchFromGitHub {
+    owner = "ManticoreProject";
+    repo = "manticore";
+    sha256 = "17h3ar7d6145dyrm006r3gd5frk3v4apjk383n78dh4vlniv1ay2";
+    inherit rev;
+  };
+
+  enableParallelBuilding = false;
+ 
+  nativeBuildInputs = [ autoreconfHook ];
+  
+  buildInputs = [ coreutils smlnj ];
+
+  autoreconfFlags = "-Iconfig -vfi";
+
+  unpackPhase = ''
+    mkdir -p $out
+    cd $out
+    unpackFile $src
+    mv source repo_checkout
+    cd repo_checkout
+    chmod u+w . -R
+  ''; 
+  
+  postPatch = ''
+    patchShebangs .
+    substituteInPlace configure.ac --replace 'MANTICORE_ROOT=`pwd`' 'MANTICORE_ROOT=$out/repo_checkout'
+  '';
+
+  preInstall = "mkdir -p $out/bin";
+
+  meta = {
+    description = "A parallel, pure variant of Standard ML";
+
+    longDescription = '' 
+      Manticore is a high-level parallel programming language aimed at
+      general-purpose applications running on multi-core
+      processors. Manticore supports parallelism at multiple levels:
+      explicit concurrency and coarse-grain parallelism via CML-style
+      constructs and fine-grain parallelism via various light-weight
+      notations, such as parallel tuple expressions and NESL/Nepal-style
+      parallel array comprehensions.  
+    '';
+
+    homepage = "http://manticore.cs.uchicago.edu/";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/matter-compiler/Gemfile b/nixpkgs/pkgs/development/compilers/matter-compiler/Gemfile
new file mode 100644
index 000000000000..21ec23452055
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/matter-compiler/Gemfile
@@ -0,0 +1,3 @@
+source "https://rubygems.org"
+
+gem 'matter_compiler'
diff --git a/nixpkgs/pkgs/development/compilers/matter-compiler/Gemfile.lock b/nixpkgs/pkgs/development/compilers/matter-compiler/Gemfile.lock
new file mode 100644
index 000000000000..230b99d91a63
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/matter-compiler/Gemfile.lock
@@ -0,0 +1,13 @@
+GEM
+  remote: https://rubygems.org/
+  specs:
+    matter_compiler (0.5.1)
+
+PLATFORMS
+  ruby
+
+DEPENDENCIES
+  matter_compiler
+
+BUNDLED WITH
+   2.1.4
diff --git a/nixpkgs/pkgs/development/compilers/matter-compiler/default.nix b/nixpkgs/pkgs/development/compilers/matter-compiler/default.nix
new file mode 100644
index 000000000000..89daf7b27eba
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/matter-compiler/default.nix
@@ -0,0 +1,20 @@
+{ lib, bundlerApp, bundlerUpdateScript }:
+
+bundlerApp {
+  pname = "matter_compiler";
+  gemdir = ./.;
+  exes = [ "matter_compiler" ];
+
+  passthru.updateScript = bundlerUpdateScript "matter-compiler";
+
+  meta = with lib; {
+    description = ''
+      Matter Compiler is a API Blueprint AST Media Types to API Blueprint conversion tool.
+      It composes an API blueprint from its serialzed AST media-type.
+    '';
+    homepage    = "https://github.com/apiaryio/matter_compiler/";
+    license     = licenses.mit;
+    maintainers = with maintainers; [ rvlander manveru nicknovitski ];
+    platforms   = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/matter-compiler/gemset.nix b/nixpkgs/pkgs/development/compilers/matter-compiler/gemset.nix
new file mode 100644
index 000000000000..014fc226607a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/matter-compiler/gemset.nix
@@ -0,0 +1,12 @@
+{
+  matter_compiler = {
+    groups = ["default"];
+    platforms = [];
+    source = {
+      remotes = ["https://rubygems.org"];
+      sha256 = "16501zdiqxk34v2d0nlbwrcrjm6g57hrsmsw0crwssn29v5zbykf";
+      type = "gem";
+    };
+    version = "0.5.1";
+  };
+}
\ No newline at end of file
diff --git a/nixpkgs/pkgs/development/compilers/mcpp/default.nix b/nixpkgs/pkgs/development/compilers/mcpp/default.nix
new file mode 100644
index 000000000000..bf0db4c1f6cd
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mcpp/default.nix
@@ -0,0 +1,20 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  pname = "mcpp";
+  version = "2.7.2";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/mcpp/mcpp-${version}.tar.gz";
+    sha256 = "0r48rfghjm90pkdyr4khxg783g9v98rdx2n69xn8f6c5i0hl96rv";
+  };
+
+  configureFlags = [ "--enable-mcpplib" ];
+
+  meta = with stdenv.lib; {
+    homepage = "http://mcpp.sourceforge.net/";
+    description = "A portable c preprocessor";
+    license = licenses.bsd2;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/mercury/default.nix b/nixpkgs/pkgs/development/compilers/mercury/default.nix
new file mode 100644
index 000000000000..d534e2483d63
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mercury/default.nix
@@ -0,0 +1,62 @@
+{ stdenv, fetchurl, gcc, flex, bison, texinfo, jdk, erlang, makeWrapper
+, readline }:
+
+stdenv.mkDerivation rec {
+  pname = "mercury";
+  version = "20.01.2";
+
+  src = fetchurl {
+    url    = "https://dl.mercurylang.org/release/mercury-srcdist-${version}.tar.gz";
+    sha256 = "084ml6kswgaqjgmib3gq7zjnqsimz3f35w13ff6z0dv4d9csmq4m";
+  };
+
+  buildInputs = [ gcc flex bison texinfo jdk erlang makeWrapper
+                  readline ];
+
+  patchPhase = ''
+    # Fix calls to programs in /bin
+    for p in uname pwd ; do
+      for f in $(egrep -lr /bin/$p *) ; do
+        sed -i 's@/bin/'$p'@'$p'@g' $f ;
+      done
+    done
+  '';
+
+  preConfigure = ''
+    mkdir -p $out/lib/mercury/cgi-bin ;
+    configureFlags="--enable-deep-profiler=$out/lib/mercury/cgi-bin";
+  '';
+
+  preBuild = ''
+    # Mercury buildsystem does not take -jN directly.
+    makeFlags="PARALLEL=-j$NIX_BUILD_CORES" ;
+  '';
+
+  postInstall = ''
+    # Wrap with compilers for the different targets.
+    for e in $(ls $out/bin) ; do
+      wrapProgram $out/bin/$e \
+        --prefix PATH ":" "${gcc}/bin" \
+        --prefix PATH ":" "${jdk}/bin" \
+        --prefix PATH ":" "${erlang}/bin"
+    done
+  '';
+
+  meta = {
+    description = "A pure logic programming language";
+    longDescription = ''
+      Mercury is a logic/functional programming language which combines the
+      clarity and expressiveness of declarative programming with advanced
+      static analysis and error detection features.  Its highly optimized
+      execution algorithm delivers efficiency far in excess of existing logic
+      programming systems, and close to conventional programming systems.
+      Mercury addresses the problems of large-scale program development,
+      allowing modularity, separate compilation, and numerous optimization/time
+      trade-offs.
+    '';
+    homepage    = "http://mercurylang.org";
+    license     = stdenv.lib.licenses.gpl2;
+    platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
+    maintainers = [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/meta-environment/meta-build-env/default.nix b/nixpkgs/pkgs/development/compilers/meta-environment/meta-build-env/default.nix
new file mode 100644
index 000000000000..a5c7054c3a61
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/meta-environment/meta-build-env/default.nix
@@ -0,0 +1,11 @@
+{stdenv, fetchurl}: stdenv.mkDerivation {
+  name = "meta-build-env-0.1";
+  src = fetchurl {
+    url = "http://www.meta-environment.org/releases/meta-build-env-0.1.tar.gz";
+    sha256 = "1imn1gaan4fv73v8w3k3lgyjzkcn7bdp69k6hlz0vqdg17ysd1x3";
+  };
+
+  meta = {
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/mezzo/default.nix b/nixpkgs/pkgs/development/compilers/mezzo/default.nix
new file mode 100644
index 000000000000..a90076c9eccd
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mezzo/default.nix
@@ -0,0 +1,47 @@
+{ stdenv, fetchFromGitHub, ocaml, findlib, ocamlbuild, menhir, yojson, ulex, pprint, fix, functory }:
+
+if stdenv.lib.versionAtLeast ocaml.version "4.06"
+then throw "mezzo is not available for OCaml ${ocaml.version}"
+else
+
+let
+  check-ocaml-version = with stdenv.lib; versionAtLeast (getVersion ocaml);
+in
+
+assert check-ocaml-version "4";
+
+stdenv.mkDerivation {
+
+  name = "mezzo-0.0.m8";
+
+  src = fetchFromGitHub {
+    owner = "protz";
+    repo = "mezzo";
+    rev = "m8";
+    sha256 = "0yck5r6di0935s3iy2mm9538jkf77ssr789qb06ms7sivd7g3ip6";
+  };
+
+  buildInputs = [ ocaml findlib ocamlbuild yojson menhir ulex pprint fix functory ];
+
+  # Sets warning 3 as non-fatal
+  prePatch = stdenv.lib.optionalString (check-ocaml-version "4.02") ''
+    substituteInPlace myocamlbuild.pre.ml \
+    --replace '@1..3' '@1..2+3'
+  '';
+
+  createFindlibDestdir = true;
+
+  postInstall = ''
+    mkdir $out/bin
+    cp mezzo $out/bin/
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "http://protz.github.io/mezzo/";
+    description = "A programming language in the ML tradition, which places strong emphasis on the control of aliasing and access to mutable memory";
+    license = licenses.gpl2;
+    platforms = ocaml.meta.platforms or [];
+  };
+}
+
+
diff --git a/nixpkgs/pkgs/development/compilers/microscheme/default.nix b/nixpkgs/pkgs/development/compilers/microscheme/default.nix
new file mode 100644
index 000000000000..ba3e388c3992
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/microscheme/default.nix
@@ -0,0 +1,30 @@
+{ stdenv, fetchzip, vim, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  pname = "microscheme";
+  version = "0.9.3";
+
+  src = fetchzip {
+    name = "${pname}-${version}-src";
+    url = "https://github.com/ryansuchocki/microscheme/archive/v${version}.tar.gz";
+    sha256 = "1r3ng4pw1s9yy1h5rafra1rq19d3vmb5pzbpcz1913wz22qdd976";
+  };
+
+  buildInputs = [ makeWrapper vim ];
+
+  installPhase = ''
+    make install PREFIX=$out
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "http://microscheme.org";
+    description = "A Scheme subset for Atmel microcontrollers";
+    longDescription = ''
+      Microscheme is a Scheme subset/variant designed for Atmel
+      microcontrollers, especially as found on Arduino boards.
+    '';
+    license = licenses.mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ ardumont ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/mint/default.nix b/nixpkgs/pkgs/development/compilers/mint/default.nix
new file mode 100644
index 000000000000..d1d103c047fb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mint/default.nix
@@ -0,0 +1,36 @@
+{ lib, fetchFromGitHub, crystal_0_33, openssl }:
+
+let crystal = crystal_0_33;
+in crystal.buildCrystalPackage rec {
+  version = "0.9.0";
+  pname = "mint";
+
+  src = fetchFromGitHub {
+    owner = "mint-lang";
+    repo = "mint";
+    rev = version;
+    sha256 = "0y1qr616x7s0pjgih6s1n4wiwb8kn8l1knnzmib6j4jmqax0jhz0";
+  };
+
+  postPatch = ''
+    export HOME=$TMP
+  '';
+
+  format = "shards";
+
+  # Update with
+  #   nix-shell -p crystal2nix --run crystal2nix
+  # with mint's shard.lock file in the current directory
+  shardsFile = ./shards.nix;
+
+  buildInputs = [ openssl ];
+
+  meta = with lib; {
+    description = "A refreshing language for the front-end web";
+    homepage = "https://mint-lang.com/";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ manveru ];
+    platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
+    broken = lib.versionOlder crystal.version "0.33";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/mint/shards.nix b/nixpkgs/pkgs/development/compilers/mint/shards.nix
new file mode 100644
index 000000000000..8e2b6b6ad4df
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mint/shards.nix
@@ -0,0 +1,80 @@
+{
+  admiral = {
+    owner = "jwaldrip";
+    repo = "admiral.cr";
+    rev = "v1.9.0";
+    sha256 = "0y8gsh1qz42bc9jawcrn0i49mzzfvf8znmivd8lybapf0f53fblz";
+  };
+  ameba = {
+    owner = "crystal-ameba";
+    repo = "ameba";
+    rev = "v0.12.0";
+    sha256 = "0g68yijbm2j4ig536fwq49d1z7x2iv9kp4g3gjklf5zn1sbqhm12";
+  };
+  baked_file_system = {
+    owner = "schovi";
+    repo = "baked_file_system";
+    rev = "v0.9.8";
+    sha256 = "12l375jllg1lxvfh610dz0a39p803xw6q9fxlmnc6hy55i0gm0y3";
+  };
+  diff = {
+    owner = "MakeNowJust";
+    repo = "crystal-diff";
+    rev = "v1.1.0";
+    sha256 = "1q5q2d5mp1r8c6k5v4755sb3b6awiz85d1j280djzhbd0pggk3z7";
+  };
+  dotenv = {
+    owner = "gdotdesign";
+    repo = "cr-dotenv";
+    rev = "v0.3.1";
+    sha256 = "1xp7c3g8dj1hqk2b885qr4y0s8661gpp9q28lv6rhr0ckllc6zgz";
+  };
+  exception_page = {
+    owner = "crystal-loot";
+    repo = "exception_page";
+    rev = "v0.1.4";
+    sha256 = "0bsp2m89sl0bg9d5szbs1nxyk7yk58rkk24aibr39hhb5zi70pqi";
+  };
+  kemal = {
+    owner = "kemalcr";
+    repo = "kemal";
+    rev = "v0.26.1";
+    sha256 = "169pwkjmk7x6j8i0rf5rpyk1y0hl7jaf9h6yrq4ha2ag9yq9i8fr";
+  };
+  kilt = {
+    owner = "jeromegn";
+    repo = "kilt";
+    rev = "v0.4.0";
+    sha256 = "1w9ib6j4xhwxdxx58nzc06gw7ci7vga03vgj1z1bnklamb0b0l0k";
+  };
+  markd = {
+    owner = "icyleaf";
+    repo = "markd";
+    rev = "v0.2.0";
+    sha256 = "0n27fndd77mlkgw1r4pf0sa8fz4gwsh7dpnjck95c0ml91cr8j1a";
+  };
+  radix = {
+    owner = "luislavena";
+    repo = "radix";
+    rev = "v0.3.9";
+    sha256 = "19pksfr7ddc31hvikb433jg0zav1ar93k6zmsgaf3vsrjnvia3ix";
+  };
+  string_inflection = {
+    owner = "mosop";
+    repo = "string_inflection";
+    rev = "v0.2.1";
+    sha256 = "10vkr28h7n53ijjv57ldxhh473086qg313lzs55a7wsh0zgc104m";
+  };
+  time_format = {
+    owner = "vladfaust";
+    repo = "time_format.cr";
+    rev = "v0.1.1";
+    sha256 = "0mmssnabf476i07sajm7s3rlvfcav4lkh0n8g12rybxr6c9f683v";
+  };
+  tree_template = {
+    owner = "anykeyh";
+    repo = "tree_template";
+    rev = "3fcb71ee6852040077dd1a2c8c55c67f4a95ba4e";
+    sha256 = "04w89wpnkna4ipyy3pxshqqwgk965hz1d31vqp0mrb0ilmpsywdk";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/mit-scheme/default.nix b/nixpkgs/pkgs/development/compilers/mit-scheme/default.nix
new file mode 100644
index 000000000000..b2fa8fba0ddf
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mit-scheme/default.nix
@@ -0,0 +1,92 @@
+{ fetchurl, stdenv, makeWrapper, gnum4, texinfo, texLive, automake,
+  enableX11 ? false, xlibsWrapper ? null }:
+
+let
+  version = "9.2";
+  bootstrapFromC = ! (stdenv.isi686 || stdenv.isx86_64);
+
+  arch = if      stdenv.isi686   then "-i386"
+         else if stdenv.isx86_64 then "-x86-64"
+         else                         "";
+in
+stdenv.mkDerivation {
+  name = if enableX11 then "mit-scheme-x11-${version}" else "mit-scheme-${version}";
+
+  # MIT/GNU Scheme is not bootstrappable, so it's recommended to compile from
+  # the platform-specific tarballs, which contain pre-built binaries.  It
+  # leads to more efficient code than when building the tarball that contains
+  # generated C code instead of those binaries.
+  src =
+    if stdenv.isi686
+    then fetchurl {
+      url = "mirror://gnu/mit-scheme/stable.pkg/${version}/mit-scheme-${version}-i386.tar.gz";
+      sha256 = "1fmlpnhf5a75db93phajh4ysbdgrgl72v45lk3kznriprl0a7jc6";
+    } else if stdenv.isx86_64
+    then fetchurl {
+      url = "mirror://gnu/mit-scheme/stable.pkg/${version}/mit-scheme-${version}-x86-64.tar.gz";
+      sha256 = "1skzxxhr0iq96bf0j5m7mvf3i4sppfyfa6gpqn34mwgkw1fx8274";
+    } else fetchurl {
+      url = "mirror://gnu/mit-scheme/stable.pkg/${version}/mit-scheme-c-${version}.tar.gz";
+      sha256 = "0w5ib5vsidihb4hb6fma3sp596ykr8izagm57axvgd6lqzwicsjg";
+    };
+
+  buildInputs = if enableX11 then [xlibsWrapper] else [];
+
+  configurePhase =
+    '' (cd src && ./configure)
+       (cd doc && ./configure)
+    '';
+
+  buildPhase =
+    '' cd src
+       ${if bootstrapFromC
+         then "./etc/make-liarc.sh --prefix=$out"
+         else "make compile-microcode"}
+
+       cd ../doc
+
+       # Provide a `texinfo.tex'.
+       export TEXINPUTS="$(echo ${automake}/share/automake-*)"
+       echo "\$TEXINPUTS is \`$TEXINPUTS'"
+       make
+
+       cd ..
+    '';
+
+  installPhase =
+    '' make prefix=$out install -C src
+       make prefix=$out install -C doc
+    '';
+
+  fixupPhase =
+    '' wrapProgram $out/bin/mit-scheme${arch} --set MITSCHEME_LIBRARY_PATH \
+         $out/lib/mit-scheme${arch}
+    '';
+
+  nativeBuildInputs = [ makeWrapper gnum4 texinfo texLive automake ];
+
+  # XXX: The `check' target doesn't exist.
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "MIT/GNU Scheme, a native code Scheme compiler";
+
+    longDescription =
+      '' MIT/GNU Scheme is an implementation of the Scheme programming
+         language, providing an interpreter, compiler, source-code debugger,
+         integrated Emacs-like editor, and a large runtime library.  MIT/GNU
+         Scheme is best suited to programming large applications with a rapid
+         development cycle.
+      '';
+
+    homepage = "https://www.gnu.org/software/mit-scheme/";
+
+    license = licenses.gpl2Plus;
+
+    maintainers = [ ];
+
+    # Build fails on Cygwin and Darwin:
+    # <http://article.gmane.org/gmane.lisp.scheme.mit-scheme.devel/489>.
+    platforms = platforms.gnu ++ platforms.linux ++ platforms.freebsd;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/mkcl/default.nix b/nixpkgs/pkgs/development/compilers/mkcl/default.nix
new file mode 100644
index 000000000000..baaf978d2984
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mkcl/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, fetchFromGitHub, makeWrapper, gmp, gcc }:
+
+with stdenv.lib; stdenv.mkDerivation rec {
+  pname = "mkcl";
+  version = "1.1.11";
+
+  src = fetchFromGitHub {
+    owner = "jcbeaudoin";
+    repo = "mkcl";
+    rev = "v${version}";
+    sha256 = "0i2bfkda20lfypis6i4m7srfz6miyf66d8knp693d6sms73m2l26";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  propagatedBuildInputs = [ gmp ];
+
+  hardeningDisable = [ "format" ];
+
+  configureFlags = [
+    "GMP_CFLAGS=-I${gmp.dev}/include"
+    "GMP_LDFLAGS=-L${gmp.out}/lib"
+  ];
+
+  # tinycc configure flags copied from the tinycc derivation.
+  postConfigure = ''(
+    cd contrib/tinycc
+    ./configure --cc=cc \
+      --elfinterp=$(< $NIX_CC/nix-support/dynamic-linker) \
+      --crtprefix=${getLib stdenv.cc.libc}/lib \
+      --sysincludepaths=${getDev stdenv.cc.libc}/include:{B}/include \
+      --libpaths=${getLib stdenv.cc.libc}/lib
+  )'';
+
+  postInstall = ''
+    wrapProgram $out/bin/mkcl --prefix PATH : "${gcc}/bin"
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "ANSI Common Lisp Implementation";
+    homepage = "https://common-lisp.net/project/mkcl/";
+    license = licenses.lgpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ tohl ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/mlton/20130715.nix b/nixpkgs/pkgs/development/compilers/mlton/20130715.nix
new file mode 100644
index 000000000000..52bb0a0775cf
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mlton/20130715.nix
@@ -0,0 +1,119 @@
+{ stdenv, fetchurl, patchelf, gmp }:
+
+let
+  version = "20130715";
+
+  usr_prefix = if stdenv.isDarwin then "usr/local" else "usr";
+
+  dynamic_linker = stdenv.cc.bintools.dynamicLinker;
+in
+
+stdenv.mkDerivation rec {
+  pname = "mlton";
+  inherit version;
+
+  binSrc =
+    if stdenv.hostPlatform.system == "i686-linux" then (fetchurl {
+      url = "mirror://sourceforge/project/mlton/mlton/${version}/${pname}-${version}-1.x86-linux.tgz";
+      sha256 = "1kxjjmnw4xk2d9hpvz43w9dvyhb3025k4zvjx785c33nrwkrdn4j";
+    })
+    else if stdenv.hostPlatform.system == "x86_64-linux" then (fetchurl {
+        url = "mirror://sourceforge/project/mlton/mlton/${version}/${pname}-${version}-1.amd64-linux.tgz";
+        sha256 = "0fyhwxb4nmpirjbjcvk9f6w67gmn2gkz7xcgz0xbfih9kc015ygn";
+    })
+    else if stdenv.hostPlatform.system == "x86_64-darwin" then (fetchurl {
+        url = "mirror://sourceforge/project/mlton/mlton/${version}/${pname}-${version}-1.amd64-darwin.gmp-macports.tgz";
+        sha256 = "044wnh9hhg6if886xy805683k0as347xd37r0r1yi4x7qlxzzgx9";
+    })
+    else throw "Architecture not supported";
+
+  codeSrc =
+    fetchurl {
+      url = "mirror://sourceforge/project/mlton/mlton/${version}/${pname}-${version}.src.tgz";
+      sha256 = "0v1x2hrh9hiqkvnbq11kf34v4i5a2x0ffxbzqaa8skyl26nmfn11";
+    };
+
+  srcs = [ binSrc codeSrc ];
+
+  sourceRoot = "${pname}-${version}";
+
+  buildInputs = [ gmp ];
+  nativeBuildInputs = stdenv.lib.optional stdenv.isLinux patchelf;
+
+  makeFlags = [ "all-no-docs" ];
+
+  configurePhase = ''
+    # Fix paths in the source.
+    find . -type f | grep -v -e '\.tgz''$' | xargs sed -i "s@/usr/bin/env bash@$(type -p bash)@"
+
+    substituteInPlace $(pwd)/Makefile --replace '/bin/cp' $(type -p cp)
+    substituteInPlace bin/mlton-script --replace gcc cc
+    substituteInPlace bin/regression --replace gcc cc
+    substituteInPlace lib/mlnlffi-lib/Makefile --replace gcc cc
+    substituteInPlace mlnlffigen/gen-cppcmd --replace gcc cc
+    substituteInPlace runtime/Makefile --replace gcc cc
+    substituteInPlace ../${usr_prefix}/bin/mlton --replace gcc cc
+
+    # Fix paths in the binary distribution.
+    BIN_DIST_DIR="$(pwd)/../${usr_prefix}"
+    for f in "bin/mlton" "lib/mlton/platform" "lib/mlton/static-library" ; do
+      substituteInPlace "$BIN_DIST_DIR/$f" --replace '/${usr_prefix}/bin/env bash' $(type -p bash)
+    done
+
+    substituteInPlace $(pwd)/../${usr_prefix}/bin/mlton --replace '/${usr_prefix}/lib/mlton' $(pwd)/../${usr_prefix}/lib/mlton
+  '' + stdenv.lib.optionalString stdenv.cc.isClang ''
+    sed -i "s_	patch -s -p0 <gdtoa.hide-public-fns.patch_	patch -s -p0 <gdtoa.hide-public-fns.patch\n\tsed -i 's|printf(emptyfmt|printf(\"\"|g' ./gdtoa/arithchk.c_" ./runtime/Makefile
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    sed -i 's|XCFLAGS += -I/usr/local/include -I/sw/include -I/opt/local/include||' ./runtime/Makefile
+  '';
+
+  preBuild = ''
+    # To build the source we have to put the binary distribution in the $PATH.
+    export PATH="$PATH:$(pwd)/../${usr_prefix}/bin/"
+
+    # Let the builder execute the binary distribution.
+    chmod u+x $(pwd)/../${usr_prefix}/bin/mllex
+    chmod u+x $(pwd)/../${usr_prefix}/bin/mlyacc
+    chmod u+x $(pwd)/../${usr_prefix}/bin/mlton
+
+    # So the builder runs the binary compiler with gmp.
+    export LD_LIBRARY_PATH=${gmp.out}/lib''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH
+
+  '' + stdenv.lib.optionalString stdenv.isLinux ''
+    # Patch ELF interpreter.
+    patchelf --set-interpreter ${dynamic_linker} $(pwd)/../${usr_prefix}/lib/mlton/mlton-compile
+    for e in mllex mlyacc ; do
+      patchelf --set-interpreter ${dynamic_linker} $(pwd)/../${usr_prefix}/bin/$e
+    done
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    # Patch libgmp linking
+    install_name_tool -change /opt/local/lib/libgmp.10.dylib ${gmp}/lib/libgmp.10.dylib $(pwd)/../${usr_prefix}/lib/mlton/mlton-compile
+    install_name_tool -change /opt/local/lib/libgmp.10.dylib ${gmp}/lib/libgmp.10.dylib $(pwd)/../${usr_prefix}/bin/mlyacc
+    install_name_tool -change /opt/local/lib/libgmp.10.dylib ${gmp}/lib/libgmp.10.dylib $(pwd)/../${usr_prefix}/bin/mllex
+  '';
+
+  doCheck = true;
+
+  installTargets = [ "install-no-docs" ];
+
+  postInstall = ''
+    # Fix path to mlton libraries.
+    substituteInPlace $(pwd)/install/${usr_prefix}/bin/mlton --replace '/${usr_prefix}/lib/mlton' $out/lib/mlton
+
+    # Path to libgmp.
+    substituteInPlace $(pwd)/install/${usr_prefix}/bin/mlton --replace "-link-opt '-lm -lgmp'" "-link-opt '-lm -lgmp -L${gmp.out}/lib'"
+
+    # Path to gmp.h.
+    substituteInPlace $(pwd)/install/${usr_prefix}/bin/mlton --replace "-cc-opt '-O1 -fno-common'" "-cc-opt '-O1 -fno-common -I${gmp.dev}/include'"
+
+    # Path to the same cc used in the build; needed at runtime.
+    substituteInPlace $(pwd)/install/${usr_prefix}/bin/mlton --replace "gcc='gcc'" "gcc='"$(type -p cc)"'"
+
+    # Copy files to final positions.
+    cp -r $(pwd)/install/${usr_prefix}/bin $out
+    cp -r $(pwd)/install/${usr_prefix}/lib $out
+    cp -r $(pwd)/install/${usr_prefix}/man $out
+  '';
+
+  meta = import ./meta.nix;
+}
diff --git a/nixpkgs/pkgs/development/compilers/mlton/20180207-binary.nix b/nixpkgs/pkgs/development/compilers/mlton/20180207-binary.nix
new file mode 100644
index 000000000000..2b4998f91c91
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mlton/20180207-binary.nix
@@ -0,0 +1,57 @@
+{ stdenv, fetchurl, patchelf, gmp }:
+let
+  dynamic-linker = stdenv.cc.bintools.dynamicLinker;
+in
+stdenv.mkDerivation rec {
+  pname = "mlton";
+  version = "20180207";
+
+  src = if stdenv.hostPlatform.system == "x86_64-linux" then (fetchurl {
+    url = "https://github.com/MLton/mlton/releases/download/on-${version}-release/${pname}-${version}-1.amd64-linux.tgz";
+    sha256 = "0f4q575yfm5dpg4a2wsnqn4l2zrar96p6rlsk0dw10ggyfwvsjlf";
+    })
+  else if stdenv.hostPlatform.system == "x86_64-darwin" then (fetchurl {
+    url = "https://github.com/MLton/mlton/releases/download/on-${version}-release/${pname}-${version}-1.amd64-darwin.gmp-static.tgz";
+      sha256 = "1cw7yhw48qp12q0adwf8srpjzrgkp84kmlkqw3pz8vkxz4p9hbdv";
+    })
+  else
+    throw "Architecture not supported";
+
+  buildInputs = [ gmp ];
+  nativeBuildInputs = stdenv.lib.optional stdenv.isLinux patchelf;
+
+  buildPhase = ''
+    make update \
+      CC="$(type -p cc)" \
+      WITH_GMP_INC_DIR="${gmp.dev}/include" \
+      WITH_GMP_LIB_DIR="${gmp}/lib"
+  '';
+
+  installPhase = ''
+    make install PREFIX=$out
+  '';
+
+  postFixup = stdenv.lib.optionalString stdenv.isLinux ''
+    patchelf --set-interpreter ${dynamic-linker} $out/lib/mlton/mlton-compile
+    patchelf --set-rpath ${gmp}/lib $out/lib/mlton/mlton-compile
+
+    for e in mllex mlnlffigen mlprof mlyacc; do
+      patchelf --set-interpreter ${dynamic-linker} $out/bin/$e
+      patchelf --set-rpath ${gmp}/lib $out/bin/$e
+    done
+  '' + stdenv.lib.optionalString stdenv.isDarwin ''
+    install_name_tool -change \
+      /opt/local/lib/libgmp.10.dylib \
+      ${gmp}/lib/libgmp.10.dylib \
+      $out/lib/mlton/mlton-compile
+
+    for e in mllex mlnlffigen mlprof mlyacc; do
+      install_name_tool -change \
+        /opt/local/lib/libgmp.10.dylib \
+        ${gmp}/lib/libgmp.10.dylib \
+        $out/bin/$e
+    done
+  '';
+
+  meta = import ./meta.nix;
+}
diff --git a/nixpkgs/pkgs/development/compilers/mlton/default.nix b/nixpkgs/pkgs/development/compilers/mlton/default.nix
new file mode 100644
index 000000000000..aaf588851402
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mlton/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchurl, fetchgit, patchelf, gmp }:
+rec {
+  mlton20130715 = import ./20130715.nix {
+    inherit stdenv fetchurl patchelf gmp;
+  };
+
+  mlton20180207Binary = import ./20180207-binary.nix {
+    inherit stdenv fetchurl patchelf gmp;
+  };
+
+  mlton20180207 = import ./from-git-source.nix {
+    mltonBootstrap = mlton20180207Binary;
+    version = "20180207";
+    rev = "on-20180207-release";
+    sha256 = "00rdd2di5x1dzac64il9z05m3fdzicjd3226wwjyynv631jj3q2a";
+    inherit stdenv fetchgit gmp;
+  };
+
+  mltonHEAD = import ./from-git-source.nix {
+    mltonBootstrap = mlton20180207Binary;
+    version = "HEAD";
+    rev = "e149c9917cfbfe6aba5c986a958ed76d5cc6cfde";
+    sha256 = "0a0j1i0f0fxw2my1309srq5j3vz0kawrrln01gxms2m5hy5dl50d";
+    inherit stdenv fetchgit gmp;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/mlton/from-git-source.nix b/nixpkgs/pkgs/development/compilers/mlton/from-git-source.nix
new file mode 100644
index 000000000000..2585b599caf3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mlton/from-git-source.nix
@@ -0,0 +1,36 @@
+{ fetchgit
+, gmp
+, mltonBootstrap
+, url ? "https://github.com/mlton/mlton"
+, rev
+, sha256
+, stdenv
+, version
+}:
+
+stdenv.mkDerivation {
+  pname = "mlton";
+  inherit version;
+
+  src = fetchgit {
+    inherit url rev sha256;
+  };
+
+  buildInputs = [mltonBootstrap gmp];
+
+  preBuild = ''
+    find . -type f | grep -v -e '\.tgz''$' | xargs sed -i "s@/usr/bin/env bash@$(type -p bash)@"
+
+    makeFlagsArray=(
+      MLTON_VERSION="${version} ${rev}"
+      CC="$(type -p cc)"
+      PREFIX="$out"
+      WITH_GMP_INC_DIR="${gmp.dev}/include"
+      WITH_GMP_LIB_DIR="${gmp}/lib"
+      )
+  '';
+
+  doCheck = true;
+
+  meta = import ./meta.nix;
+}
diff --git a/nixpkgs/pkgs/development/compilers/mlton/meta.nix b/nixpkgs/pkgs/development/compilers/mlton/meta.nix
new file mode 100644
index 000000000000..1e4c0aacfc3c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mlton/meta.nix
@@ -0,0 +1,15 @@
+{
+  description = "Open-source, whole-program, optimizing Standard ML compiler";
+  longDescription = ''
+    MLton is an open source, whole-program optimizing compiler for the Standard ML programming language.
+    MLton aims to produce fast executables, and to encourage rapid prototyping and modular programming
+    by eliminating performance penalties often associated with the use of high-level language features.
+    MLton development began in 1997, and continues to this day with a growing worldwide community of
+    developers and users, who have helped to port MLton to a number of platforms.
+    Description taken from http://en.wikipedia.org/wiki/Mlton .
+  '';
+
+  homepage = "http://mlton.org/";
+  license = "bsd";
+  platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin"];
+}
diff --git a/nixpkgs/pkgs/development/compilers/mono/4.nix b/nixpkgs/pkgs/development/compilers/mono/4.nix
new file mode 100644
index 000000000000..02c6177c9df0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mono/4.nix
@@ -0,0 +1,9 @@
+{ callPackage, Foundation, libobjc }:
+
+callPackage ./generic.nix ({
+  inherit Foundation libobjc;
+  version = "4.8.1.0";
+  sha256 = "1vyvp2g28ihcgxgxr8nhzyzdmzicsh5djzk8dk1hj5p5f2k3ijqq";
+  enableParallelBuilding = false; # #32386, https://hydra.nixos.org/build/65600645
+  extraPatches = [ ./mono4-glibc.patch ];
+})
diff --git a/nixpkgs/pkgs/development/compilers/mono/5.nix b/nixpkgs/pkgs/development/compilers/mono/5.nix
new file mode 100644
index 000000000000..0ecb362acb4d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mono/5.nix
@@ -0,0 +1,8 @@
+{ callPackage, Foundation, libobjc }:
+
+callPackage ./generic.nix ({
+  inherit Foundation libobjc;
+  version = "5.20.1.27";
+  sha256 = "15rpwxw642ad1na93k5nj7d2lb24f21kncr924gxr00178a9x0jy";
+  enableParallelBuilding = true;
+})
diff --git a/nixpkgs/pkgs/development/compilers/mono/6.nix b/nixpkgs/pkgs/development/compilers/mono/6.nix
new file mode 100644
index 000000000000..0157fa7b7f68
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mono/6.nix
@@ -0,0 +1,9 @@
+{ callPackage, Foundation, libobjc }:
+
+callPackage ./generic.nix ({
+  inherit Foundation libobjc;
+  version = "6.0.0.313";
+  srcArchiveSuffix = "tar.xz";
+  sha256 = "0l0cd6q5xh1vdm6zr78rkfqdsmrgzanjgpxvgig0pyd3glfyjim9";
+  enableParallelBuilding = true;
+})
diff --git a/nixpkgs/pkgs/development/compilers/mono/generic.nix b/nixpkgs/pkgs/development/compilers/mono/generic.nix
new file mode 100644
index 000000000000..e4d99dcec955
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mono/generic.nix
@@ -0,0 +1,83 @@
+{ stdenv, fetchurl, bison, pkgconfig, glib, gettext, perl, libgdiplus, libX11, callPackage, ncurses, zlib, withLLVM ? false, cacert, Foundation, libobjc, python, version, sha256, autoconf, libtool, automake, cmake, which
+, enableParallelBuilding ? true
+, srcArchiveSuffix ? "tar.bz2"
+, extraPatches ? []
+}:
+
+let
+  llvm     = callPackage ./llvm.nix { };
+in
+stdenv.mkDerivation rec {
+  pname = "mono";
+  inherit version;
+
+  src = fetchurl {
+    inherit sha256;
+    url = "https://download.mono-project.com/sources/mono/${pname}-${version}.${srcArchiveSuffix}";
+  };
+
+  buildInputs =
+    [ bison pkgconfig glib gettext perl libgdiplus libX11 ncurses zlib python autoconf libtool automake cmake which
+    ]
+    ++ (stdenv.lib.optionals stdenv.isDarwin [ Foundation libobjc ]);
+
+  configureFlags = [
+    "--x-includes=${libX11.dev}/include"
+    "--x-libraries=${libX11.out}/lib"
+    "--with-libgdiplus=${libgdiplus}/lib/libgdiplus.so"
+  ]
+  ++ stdenv.lib.optionals withLLVM [
+    "--enable-llvm"
+    "--with-llvm=${llvm}"
+  ];
+
+  configurePhase = ''
+    patchShebangs ./
+    ./autogen.sh --prefix $out $configureFlags
+  '';
+
+  # We want pkg-config to take priority over the dlls in the Mono framework and the GAC
+  # because we control pkg-config
+  patches = [ ./pkgconfig-before-gac.patch ] ++ extraPatches;
+
+  # Patch all the necessary scripts. Also, if we're using LLVM, we fix the default
+  # LLVM path to point into the Mono LLVM build, since it's private anyway.
+  preBuild = ''
+    makeFlagsArray=(INSTALL=`type -tp install`)
+    substituteInPlace mcs/class/corlib/System/Environment.cs --replace /usr/share "$out/share"
+  '' + stdenv.lib.optionalString withLLVM ''
+    substituteInPlace mono/mini/aot-compiler.c --replace "llvm_path = g_strdup (\"\")" "llvm_path = g_strdup (\"${llvm}/bin/\")"
+  '';
+
+  # Fix mono DLLMap so it can find libX11 to run winforms apps
+  # libgdiplus is correctly handled by the --with-libgdiplus configure flag
+  # Other items in the DLLMap may need to be pointed to their store locations, I don't think this is exhaustive
+  # https://www.mono-project.com/Config_DllMap
+  postBuild = ''
+    find . -name 'config' -type f | xargs \
+    sed -i -e "s@libX11.so.6@${libX11.out}/lib/libX11.so.6@g"
+  '';
+
+  # Without this, any Mono application attempting to open an SSL connection will throw with
+  # The authentication or decryption has failed.
+  # ---> Mono.Security.Protocol.Tls.TlsException: Invalid certificate received from server.
+  postInstall = ''
+    echo "Updating Mono key store"
+    $out/bin/cert-sync ${cacert}/etc/ssl/certs/ca-bundle.crt
+  ''
+  # According to [1], gmcs is just mcs
+  # [1] https://github.com/mono/mono/blob/master/scripts/gmcs.in
+  + ''
+    ln -s $out/bin/mcs $out/bin/gmcs
+  '';
+
+  inherit enableParallelBuilding;
+
+  meta = with stdenv.lib; {
+    homepage = "https://mono-project.com/";
+    description = "Cross platform, open source .NET development framework";
+    platforms = with platforms; darwin ++ linux;
+    maintainers = with maintainers; [ thoughtpolice obadz vrthra ];
+    license = licenses.free; # Combination of LGPL/X11/GPL ?
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/mono/llvm.nix b/nixpkgs/pkgs/development/compilers/mono/llvm.nix
new file mode 100644
index 000000000000..d08a4ebef24d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mono/llvm.nix
@@ -0,0 +1,52 @@
+{ stdenv
+, lib
+, fetchFromGitHub
+, groff
+, cmake
+, python2
+, perl
+, libffi
+, libbfd
+, libxml2
+, valgrind
+, ncurses
+, zlib
+}:
+
+stdenv.mkDerivation {
+  pname = "llvm";
+  version = "3.6-mono-2017-02-15";
+
+  src = fetchFromGitHub {
+    owner = "mono";
+    repo = "llvm";
+    rev = "dbb6fdffdeb780d11851a6be77c209bd7ada4bd3";
+    sha256 = "07wd1cs3fdvzb1lv41b655z5zk34f47j8fgd9ljjimi5j9pj71f7";
+  };
+
+  buildInputs = [ perl groff cmake libxml2 python2 libffi ] ++ lib.optional stdenv.isLinux valgrind;
+
+  propagatedBuildInputs = [ ncurses zlib ];
+
+  # hacky fix: created binaries need to be run before installation
+  preBuild = ''
+    mkdir -p $out/
+    ln -sv $PWD/lib $out
+  '';
+  postBuild = "rm -fR $out";
+
+  cmakeFlags = with stdenv; [
+    "-DLLVM_ENABLE_FFI=ON"
+    "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
+  ] ++ stdenv.lib.optional (!isDarwin) "-DBUILD_SHARED_LIBS=ON";
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "Collection of modular and reusable compiler and toolchain technologies - Mono build";
+    homepage    = "http://llvm.org/";
+    license     = stdenv.lib.licenses.bsd3;
+    maintainers = with stdenv.lib.maintainers; [ thoughtpolice ];
+    platforms   = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/mono/mono4-glibc.patch b/nixpkgs/pkgs/development/compilers/mono/mono4-glibc.patch
new file mode 100644
index 000000000000..07d5f03f90b8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mono/mono4-glibc.patch
@@ -0,0 +1,12 @@
+diff --git a/mono/io-layer/processes.c b/mono/io-layer/processes.c
+index 53c271a4..84bd3252 100644
+--- a/mono/io-layer/processes.c
++++ b/mono/io-layer/processes.c
+@@ -19,6 +19,7 @@
+ #include <errno.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
++#include <sys/sysmacros.h>
+ #include <unistd.h>
+ #ifdef HAVE_SIGNAL_H
+ #include <signal.h>
diff --git a/nixpkgs/pkgs/development/compilers/mono/pkgconfig-before-gac.patch b/nixpkgs/pkgs/development/compilers/mono/pkgconfig-before-gac.patch
new file mode 100644
index 000000000000..7632d850391e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mono/pkgconfig-before-gac.patch
@@ -0,0 +1,65 @@
+diff -Naur mono-4.0.1.old/mcs/tools/xbuild/data/12.0/Microsoft.Common.targets mono-4.0.1/mcs/tools/xbuild/data/12.0/Microsoft.Common.targets
+--- mono-4.0.1.old/mcs/tools/xbuild/data/12.0/Microsoft.Common.targets	2015-04-24 02:26:18.000000000 +0100
++++ mono-4.0.1/mcs/tools/xbuild/data/12.0/Microsoft.Common.targets	2015-05-26 00:52:33.997847464 +0100
+@@ -229,8 +229,8 @@
+ 			$(ReferencePath);
+ 			@(AdditionalReferencePath);
+ 			{HintPathFromItem};
+-			{TargetFrameworkDirectory};
+ 			{PkgConfig};
++			{TargetFrameworkDirectory};
+ 			{GAC};
+ 			{RawFileName};
+ 			$(OutDir)
+diff -Naur mono-4.0.1.old/mcs/tools/xbuild/data/14.0/Microsoft.Common.targets mono-4.0.1/mcs/tools/xbuild/data/14.0/Microsoft.Common.targets
+--- mono-4.0.1.old/mcs/tools/xbuild/data/14.0/Microsoft.Common.targets	2015-04-24 02:26:18.000000000 +0100
++++ mono-4.0.1/mcs/tools/xbuild/data/14.0/Microsoft.Common.targets	2015-05-26 00:52:41.832612748 +0100
+@@ -214,8 +214,8 @@
+ 			$(ReferencePath);
+ 			@(AdditionalReferencePath);
+ 			{HintPathFromItem};
+-			{TargetFrameworkDirectory};
+ 			{PkgConfig};
++			{TargetFrameworkDirectory};
+ 			{GAC};
+ 			{RawFileName};
+ 			$(OutDir)
+diff -Naur mono-4.0.1.old/mcs/tools/xbuild/data/2.0/Microsoft.Common.targets mono-4.0.1/mcs/tools/xbuild/data/2.0/Microsoft.Common.targets
+--- mono-4.0.1.old/mcs/tools/xbuild/data/2.0/Microsoft.Common.targets	2015-04-24 02:26:18.000000000 +0100
++++ mono-4.0.1/mcs/tools/xbuild/data/2.0/Microsoft.Common.targets	2015-05-26 00:52:46.298478961 +0100
+@@ -139,8 +139,8 @@
+ 			$(ReferencePath);
+ 			@(AdditionalReferencePath);
+ 			{HintPathFromItem};
+-			{TargetFrameworkDirectory};
+ 			{PkgConfig};
++			{TargetFrameworkDirectory};
+ 			{GAC};
+ 			{RawFileName};
+ 			$(OutDir)
+diff -Naur mono-4.0.1.old/mcs/tools/xbuild/data/3.5/Microsoft.Common.targets mono-4.0.1/mcs/tools/xbuild/data/3.5/Microsoft.Common.targets
+--- mono-4.0.1.old/mcs/tools/xbuild/data/3.5/Microsoft.Common.targets	2015-04-24 02:26:18.000000000 +0100
++++ mono-4.0.1/mcs/tools/xbuild/data/3.5/Microsoft.Common.targets	2015-05-26 00:52:52.119304583 +0100
+@@ -167,8 +167,8 @@
+ 			$(ReferencePath);
+ 			@(AdditionalReferencePath);
+ 			{HintPathFromItem};
+-			{TargetFrameworkDirectory};
+ 			{PkgConfig};
++			{TargetFrameworkDirectory};
+ 			{GAC};
+ 			{RawFileName};
+ 			$(OutDir)
+diff -Naur mono-4.0.1.old/mcs/tools/xbuild/data/4.0/Microsoft.Common.targets mono-4.0.1/mcs/tools/xbuild/data/4.0/Microsoft.Common.targets
+--- mono-4.0.1.old/mcs/tools/xbuild/data/4.0/Microsoft.Common.targets	2015-04-24 02:26:18.000000000 +0100
++++ mono-4.0.1/mcs/tools/xbuild/data/4.0/Microsoft.Common.targets	2015-05-26 00:52:56.519172776 +0100
+@@ -229,8 +229,8 @@
+ 			$(ReferencePath);
+ 			@(AdditionalReferencePath);
+ 			{HintPathFromItem};
+-			{TargetFrameworkDirectory};
+ 			{PkgConfig};
++			{TargetFrameworkDirectory};
+ 			{GAC};
+ 			{RawFileName};
+ 			$(OutDir)
diff --git a/nixpkgs/pkgs/development/compilers/mosml/default.nix b/nixpkgs/pkgs/development/compilers/mosml/default.nix
new file mode 100644
index 000000000000..3d94303cbaa5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mosml/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchurl, gmp, perl }:
+
+stdenv.mkDerivation rec {
+  pname = "mosml";
+  version = "2.10.1";
+
+  buildInputs = [ gmp perl ];
+
+  makeFlags = [ "PREFIX=$(out)" ] ++ stdenv.lib.optionals stdenv.isDarwin [ "CC=cc" ];
+
+  src = fetchurl {
+    url = "https://github.com/kfl/mosml/archive/ver-${version}.tar.gz";
+    sha256 = "13x7wj94p0inn84pzpj52dch5s9lznqrj287bd3nk3dqd0v3kmgy";
+  };
+
+  setSourceRoot = ''export sourceRoot="$(echo */src)"'';
+
+  meta = with stdenv.lib; {
+    description = "A light-weight implementation of Standard ML";
+    longDescription = ''
+      Moscow ML is a light-weight implementation of Standard ML (SML), a strict
+      functional language used in teaching and research.
+    '';
+    homepage = "https://mosml.org/";
+    license = licenses.gpl2;
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ vaibhavsagar ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/mozart/binary.nix b/nixpkgs/pkgs/development/compilers/mozart/binary.nix
new file mode 100644
index 000000000000..66d642dbbbd1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mozart/binary.nix
@@ -0,0 +1,80 @@
+{ stdenv, fetchurl, makeWrapper
+, boost, gmp
+, tcl-8_5, tk-8_5
+, emacs
+}:
+
+let
+  version = "2.0.0";
+
+  binaries = {
+    x86_64-linux = fetchurl {
+      url = "mirror://sourceforge/project/mozart-oz/v${version}-alpha.0/mozart2-${version}-alpha.0+build.4105.5c06ced-x86_64-linux.tar.gz";
+      sha256 = "0rsfrjimjxqbwprpzzlmydl3z3aiwg5qkb052jixdxjyad7gyh5z";
+    };
+  };
+in
+
+stdenv.mkDerivation {
+  pname = "mozart-binary";
+  inherit version;
+
+  preferLocalBuild = true;
+
+  src = binaries.${stdenv.hostPlatform.system} or (throw "unsupported system: ${stdenv.hostPlatform.system}");
+
+  libPath = stdenv.lib.makeLibraryPath
+    [ stdenv.cc.cc
+      boost
+      gmp
+      tcl-8_5
+      tk-8_5
+    ];
+
+  TK_LIBRARY = "${tk-8_5}/lib/tk8.5";
+
+  buildInputs = [ makeWrapper ];
+
+  buildCommand = ''
+    mkdir $out
+    tar xvf $src -C $out --strip-components=1
+
+    for exe in $out/bin/{ozemulator,ozwish} ; do
+      patchelf --set-interpreter $(< $NIX_CC/nix-support/dynamic-linker) \
+               --set-rpath $libPath \
+               $exe
+    done
+
+    wrapProgram $out/bin/ozwish \
+      --set OZHOME $out \
+      --set TK_LIBRARY $TK_LIBRARY
+
+    wrapProgram $out/bin/ozemulator --set OZHOME $out
+
+    ${stdenv.lib.optionalString (emacs != null) ''
+      wrapProgram $out/bin/oz --suffix PATH ":" ${stdenv.lib.makeBinPath [ emacs ]}
+    ''}
+
+    sed -i $out/share/applications/oz.desktop \
+        -e "s,Exec=oz %u,Exec=$out/bin/oz %u,"
+
+    gzip -9n $out/share/mozart/elisp"/"*.elc
+
+    patchShebangs $out
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "http://www.mozart-oz.org/";
+    description = "Multiplatform implementation of the Oz programming language";
+    longDescription = ''
+      The Mozart Programming System combines ongoing research in
+      programming language design and implementation, constraint logic
+      programming, distributed computing, and human-computer
+      interfaces. Mozart implements the Oz language and provides both
+      expressive power and advanced functionality.
+    '';
+    license = licenses.mit;
+    platforms = attrNames binaries;
+    hydraPlatforms = [];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/mozart/default.nix b/nixpkgs/pkgs/development/compilers/mozart/default.nix
new file mode 100644
index 000000000000..b8951c8c8004
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mozart/default.nix
@@ -0,0 +1,89 @@
+{ lib
+, fetchFromGitHub
+, fetchurl
+, cmake
+, unzip
+, makeWrapper
+, boost
+, llvmPackages
+, llvmPackages_5
+, gmp
+, emacs
+, emacs25-nox
+, jre_headless
+, tcl
+, tk
+}:
+
+let stdenv = llvmPackages.stdenv;
+
+in stdenv.mkDerivation rec {
+  pname = "mozart2";
+  version = "2.0.1";
+  name = "${pname}-${version}";
+
+  src = fetchurl {
+    url = "https://github.com/mozart/mozart2/releases/download/v${version}/${name}-Source.zip";
+    sha256 = "1mad9z5yzzix87cdb05lmif3960vngh180s2mb66cj5gwh5h9dll";
+  };
+
+  # This is a workaround to avoid using sbt.
+  # I guess it is acceptable to fetch the bootstrapping compiler in binary form.
+  bootcompiler = fetchurl {
+    url = "https://github.com/layus/mozart2/releases/download/v2.0.0-beta.1/bootcompiler.jar";
+    sha256 = "1hgh1a8hgzgr6781as4c4rc52m2wbazdlw3646s57c719g5xphjz";
+  };
+
+  postConfigure = ''
+    cp ${bootcompiler} bootcompiler/bootcompiler.jar
+  '';
+
+  nativeBuildInputs = [ cmake makeWrapper unzip ];
+
+  # We cannot compile with both gcc and clang, but we need clang during the
+  # process, so we compile everything with clang.
+  # BUT, we need clang4 for parsing, and a more recent clang for compiling.
+  cmakeFlags = [
+    "-DCMAKE_CXX_COMPILER=${llvmPackages.clang}/bin/clang++"
+    "-DCMAKE_C_COMPILER=${llvmPackages.clang}/bin/clang"
+    "-DBoost_USE_STATIC_LIBS=OFF"
+    "-DMOZART_BOOST_USE_STATIC_LIBS=OFF"
+    "-DCMAKE_PROGRAM_PATH=${llvmPackages_5.clang}/bin"
+    # Rationale: Nix's cc-wrapper needs to see a compile flag (like -c) to
+    # infer that it is not a linking call, and stop trashing the command line
+    # with linker flags.
+    # As it does not recognise -emit-ast, we pass -c immediately overridden
+    # by -emit-ast.
+    # The remaining is just the default flags that we cannot reuse and need
+    # to repeat here.
+    "-DMOZART_GENERATOR_FLAGS='-c;-emit-ast;--std=c++0x;-Wno-invalid-noreturn;-Wno-return-type;-Wno-braced-scalar-init'"
+    # We are building with clang, as nix does not support having clang and
+    # gcc together as compilers and we need clang for the sources generation.
+    # However, clang emits tons of warnings about gcc's atomic-base library.
+    "-DCMAKE_CXX_FLAGS=-Wno-braced-scalar-init"
+  ] ++ lib.optional stdenv.isDarwin "-DCMAKE_FIND_FRAMEWORK=LAST";
+
+  fixupPhase = ''
+    wrapProgram $out/bin/oz --set OZEMACS ${emacs}/bin/emacs
+  '';
+
+  buildInputs = [
+    boost
+    llvmPackages_5.llvm
+    llvmPackages_5.clang
+    llvmPackages_5.clang-unwrapped
+    gmp
+    emacs25-nox
+    jre_headless
+    tcl
+    tk
+  ];
+
+  meta = {
+    description = "An open source implementation of Oz 3.";
+    maintainers = [ lib.maintainers.layus ];
+    license = lib.licenses.bsd2;
+    homepage = "https://mozart.github.io";
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/compilers/mruby/default.nix b/nixpkgs/pkgs/development/compilers/mruby/default.nix
new file mode 100644
index 000000000000..f6a7fc2f1433
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/mruby/default.nix
@@ -0,0 +1,34 @@
+{ stdenv, ruby, bison, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "mruby";
+  version = "2.1.0";
+
+  src = fetchFromGitHub {
+    owner   = "mruby";
+    repo    = "mruby";
+    rev     = version;
+    sha256  = "1y072c7dh9jf8xwy7kia6cb4dkpspq4zf24ssn7zm5f46p4waxni";
+  };
+
+  nativeBuildInputs = [ ruby bison ];
+
+  # Necessary so it uses `gcc` instead of `ld` for linking.
+  # https://github.com/mruby/mruby/blob/35be8b252495d92ca811d76996f03c470ee33380/tasks/toolchains/gcc.rake#L25
+  preBuild = if stdenv.isLinux then "unset LD" else null;
+
+  installPhase = ''
+    mkdir $out
+    cp -R build/host/{bin,lib} $out
+  '';
+
+  doCheck = true;
+
+  meta = with stdenv.lib; {
+    description = "An embeddable implementation of the Ruby language";
+    homepage = "https://mruby.org";
+    maintainers = [ maintainers.nicknovitski ];
+    license = licenses.mit;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/nasm/default.nix b/nixpkgs/pkgs/development/compilers/nasm/default.nix
new file mode 100644
index 000000000000..67665c3bab18
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/nasm/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, fetchFromRepoOrCz, autoreconfHook, perl, asciidoc, xmlto, docbook_xml_dtd_45, docbook_xsl }:
+
+stdenv.mkDerivation rec {
+  pname = "nasm";
+  version = "2.14.02";
+
+  src = fetchFromRepoOrCz {
+    repo = "nasm";
+    rev = "${pname}-${version}";
+    sha256 = "15z6ybnzlsrqs2964h6czqhpmr7vc3ln4y4h0z9vrznk4mqcwbsa";
+  };
+
+  nativeBuildInputs = [ autoreconfHook perl asciidoc xmlto docbook_xml_dtd_45 docbook_xsl ];
+
+  postBuild = "make manpages";
+
+  doCheck = true;
+
+  checkPhase = ''
+    make golden && make test
+  '';
+
+  NIX_CFLAGS_COMPILE="-Wno-error=attributes";
+
+  meta = with stdenv.lib; {
+    homepage = "https://www.nasm.us/";
+    description = "An 80x86 and x86-64 assembler designed for portability and modularity";
+    platforms = platforms.unix;
+    maintainers = with maintainers; [ pSub willibutz ];
+    license = licenses.bsd2;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/neko/default.nix b/nixpkgs/pkgs/development/compilers/neko/default.nix
new file mode 100644
index 000000000000..705b222a86cb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/neko/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchurl, boehmgc, zlib, sqlite, pcre, cmake, pkgconfig
+, git, apacheHttpd, apr, aprutil, libmysqlclient, mbedtls, openssl, pkgs, gtk2, libpthreadstubs
+}:
+
+stdenv.mkDerivation rec {
+  pname = "neko";
+  version = "2.2.0";
+
+  src = fetchurl {
+    url = "https://nekovm.org/media/neko-${version}-src.tar.gz";
+    sha256 = "1qv47zaa0vzhjlq5wb71627n7dbsxpc1gqpg0hsngjxnbnh1q46g";
+  };
+
+  nativeBuildInputs = [ cmake pkgconfig git ];
+  buildInputs =
+    [ boehmgc zlib sqlite pcre apacheHttpd apr aprutil
+      libmysqlclient mbedtls openssl libpthreadstubs ]
+      ++ stdenv.lib.optional stdenv.isLinux gtk2
+      ++ stdenv.lib.optionals stdenv.isDarwin [ pkgs.darwin.apple_sdk.frameworks.Security
+                                                pkgs.darwin.apple_sdk.frameworks.Carbon];
+  cmakeFlags = [ "-DRUN_LDCONFIG=OFF" ];
+
+  installCheckPhase = ''
+    bin/neko bin/test.n
+  '';
+
+  doInstallCheck = true;
+  dontPatchELF = true;
+  dontStrip = true;
+
+  meta = with stdenv.lib; {
+    description = "A high-level dynamically typed programming language";
+    homepage = "https://nekovm.org";
+    license = licenses.lgpl21;
+    maintainers = [ maintainers.marcweber ];
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/nextpnr/default.nix b/nixpkgs/pkgs/development/compilers/nextpnr/default.nix
new file mode 100644
index 000000000000..cce22207a360
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/nextpnr/default.nix
@@ -0,0 +1,87 @@
+{ stdenv, fetchFromGitHub, cmake
+, boost, python3, eigen
+, icestorm, trellis
+, llvmPackages
+
+, enableGui ? true
+, wrapQtAppsHook
+, qtbase
+, OpenGL ? null
+}:
+
+let
+  boostPython = boost.override { python = python3; enablePython = true; };
+in
+with stdenv; mkDerivation rec {
+  pname = "nextpnr";
+  version = "2020.03.25";
+
+  srcs = [
+    (fetchFromGitHub {
+      owner  = "YosysHQ";
+      repo   = "nextpnr";
+      rev    = "a3ede0293a50c910e7d96319b2084d50f2501a6b";
+      sha256 = "0ikfjva4gqmlx6y7mjamg03ad7x9gnz32ahqv798ynd87svq10aq";
+      name   = "nextpnr";
+    })
+    (fetchFromGitHub {
+      owner  = "YosysHQ";
+      repo   = "nextpnr-tests";
+      rev    = "8f93e7e0f897b1b5da469919c9a43ba28b623b2a";
+      sha256 = "0zpd0w49k9l7rs3wmi2v8z5s4l4lad5rprs5l83w13667himpzyc";
+      name   = "nextpnr-tests";
+    })
+  ];
+
+  sourceRoot = "nextpnr";
+
+  nativeBuildInputs
+     = [ cmake ]
+    ++ (lib.optional enableGui wrapQtAppsHook);
+  buildInputs
+     = [ boostPython python3 eigen ]
+    ++ (lib.optional enableGui qtbase)
+    ++ (lib.optional stdenv.cc.isClang llvmPackages.openmp);
+
+  enableParallelBuilding = true;
+  cmakeFlags =
+    [ "-DCURRENT_GIT_VERSION=${lib.substring 0 7 (lib.elemAt srcs 0).rev}"
+      "-DARCH=generic;ice40;ecp5"
+      "-DBUILD_TESTS=ON"
+      "-DICEBOX_ROOT=${icestorm}/share/icebox"
+      "-DTRELLIS_INSTALL_PREFIX=${trellis}"
+      "-DPYTRELLIS_LIBDIR=${trellis}/lib/trellis"
+      "-DUSE_OPENMP=ON"
+      # warning: high RAM usage
+      "-DSERIALIZE_CHIPDB=OFF"
+    ]
+    ++ (lib.optional (!enableGui) "-DBUILD_GUI=OFF")
+    ++ (lib.optional (enableGui && stdenv.isDarwin)
+        "-DOPENGL_INCLUDE_DIR=${OpenGL}/Library/Frameworks");
+
+  patchPhase = with builtins; ''
+    # use PyPy for icestorm if enabled
+    substituteInPlace ./ice40/family.cmake \
+      --replace ''\'''${PYTHON_EXECUTABLE}' '${icestorm.pythonInterp}'
+  '';
+
+  preBuild = ''
+    ln -s ../nextpnr-tests tests
+  '';
+
+  doCheck = true;
+
+  postFixup = lib.optionalString enableGui ''
+    wrapQtApp $out/bin/nextpnr-generic
+    wrapQtApp $out/bin/nextpnr-ice40
+    wrapQtApp $out/bin/nextpnr-ecp5
+  '';
+
+  meta = with lib; {
+    description = "Place and route tool for FPGAs";
+    homepage    = "https://github.com/yosyshq/nextpnr";
+    license     = licenses.isc;
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ thoughtpolice emily ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/nim/default.nix b/nixpkgs/pkgs/development/compilers/nim/default.nix
new file mode 100644
index 000000000000..86518b8db09f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/nim/default.nix
@@ -0,0 +1,69 @@
+# based on https://github.com/nim-lang/Nim/blob/v0.18.0/.travis.yml
+
+{ stdenv, lib, fetchurl, makeWrapper, openssl, pcre, readline,
+  boehmgc, sfml, sqlite }:
+
+stdenv.mkDerivation rec {
+  pname = "nim";
+  version = "1.2.0";
+
+  src = fetchurl {
+    url = "https://nim-lang.org/download/${pname}-${version}.tar.xz";
+    sha256 = "0xf56xb42hc92h4xnvk72q4n3ysjbyhf0rg60lc84r9r6wx5i52f";
+  };
+
+  enableParallelBuilding = true;
+
+  NIX_LDFLAGS = "-lcrypto -lpcre -lreadline -lgc -lsqlite3";
+
+  # we could create a separate derivation for the "written in c" version of nim
+  # used for bootstrapping, but koch insists on moving the nim compiler around
+  # as part of building it, so it cannot be read-only
+
+  nativeBuildInputs = [
+    makeWrapper
+  ];
+
+  buildInputs = [
+    openssl pcre readline boehmgc sfml sqlite
+  ];
+
+  buildPhase = ''
+    runHook preBuild
+
+    # build.sh wants to write to $HOME/.cache
+    HOME=$TMPDIR
+    sh build.sh
+    ./bin/nim c koch
+    ./koch boot  -d:release \
+                 -d:useGnuReadline \
+                 ${lib.optionals (stdenv.isDarwin || stdenv.isLinux) "-d:nativeStacktrace"}
+    ./koch tools -d:release
+
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dt $out/bin bin/* koch
+    ./koch install $out
+    mv $out/nim/bin/* $out/bin/ && rmdir $out/nim/bin
+    mv $out/nim/*     $out/     && rmdir $out/nim
+
+    # Fortify hardening appends -O2 to gcc flags which is unwanted for unoptimized nim builds.
+    wrapProgram $out/bin/nim \
+      --run 'NIX_HARDENING_ENABLE=''${NIX_HARDENING_ENABLE/fortify/}' \
+      --suffix PATH : ${lib.makeBinPath [ stdenv.cc ]}
+
+    runHook postInstall
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Statically typed, imperative programming language";
+    homepage = "https://nim-lang.org/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ ehmry ];
+    platforms = with platforms; linux ++ darwin; # arbitrary
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/nvidia-cg-toolkit/default.nix b/nixpkgs/pkgs/development/compilers/nvidia-cg-toolkit/default.nix
new file mode 100644
index 000000000000..2f7a1c7a9643
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/nvidia-cg-toolkit/default.nix
@@ -0,0 +1,46 @@
+{ lib, stdenv, fetchurl }:
+
+assert stdenv ? glibc;
+
+stdenv.mkDerivation rec {
+  version = "3.1";
+
+  date = "April2012";
+
+  pname = "nvidia-cg-toolkit";
+
+  src =
+    if stdenv.hostPlatform.system == "x86_64-linux" then
+      fetchurl {
+        url = "https://developer.download.nvidia.com/cg/Cg_${version}/Cg-${version}_${date}_x86_64.tgz";
+        sha256 = "e8ff01e6cc38d1b3fd56a083f5860737dbd2f319a39037528fb1a74a89ae9878";
+      }
+    else if stdenv.hostPlatform.system == "i686-linux" then
+      fetchurl {
+        url = "http://developer.download.nvidia.com/cg/Cg_${version}/Cg-${version}_${date}_x86.tgz";
+        sha256 = "cef3591e436f528852db0e8c145d3842f920e0c89bcfb219c466797cb7b18879";
+      }
+    else throw "nvidia-cg-toolkit does not support platform ${stdenv.hostPlatform.system}";
+
+  installPhase = ''
+    for b in cgc cgfxcat cginfo
+    do
+        patchelf --set-interpreter ${stdenv.glibc.out}/lib/ld-linux*.so.? "bin/$b"
+    done
+    # FIXME: cgfxcat and cginfo need more patchelf
+    mkdir -p "$out/bin/"
+    cp -v bin/* "$out/bin/"
+    mkdir -p "$out/include/"
+    cp -v -r include/Cg/ "$out/include/"
+    mkdir -p "$out/lib/"
+    [ "$system" == "x86_64-linux" ] && cp -v lib64/* "$out/lib/"
+    [ "$system" == "i686-linux" ] && cp -v lib/* "$out/lib/"
+    mkdir -p "$out/share/doc/$name/"
+    cp -v -r local/Cg/* "$out/share/doc/$name/"
+  '';
+
+  meta = {
+    homepage = "https://developer.nvidia.com/cg-toolkit";
+    license = lib.licenses.unfreeRedistributable;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/obliv-c/default.nix b/nixpkgs/pkgs/development/compilers/obliv-c/default.nix
new file mode 100644
index 000000000000..8fd6f33740e4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/obliv-c/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, libgcrypt, fetchFromGitHub, ocamlPackages, perl }:
+stdenv.mkDerivation rec {
+  pname = "obliv-c";
+  version = "0.0pre20180624";
+  buildInputs = [ perl ]
+  ++ (with ocamlPackages; [ ocaml findlib ocamlbuild ]);
+  propagatedBuildInputs = [ libgcrypt ];
+  src = fetchFromGitHub {
+    owner = "samee";
+    repo = "obliv-c";
+    rev = "3d6804ca0fd85868207a0ccbd2509ec064723ac2";
+    sha256 = "1ib21ngn7zr58xxq4sjigrpaxb0wx35x3k9l4qvwflzrmvnman20";
+  };
+
+  patches = [ ./ignore-complex-float128.patch ];
+
+  preBuild = ''
+    patchShebangs .
+  '';
+
+  preInstall = ''
+    mkdir -p "$out/bin"
+    cp bin/* "$out/bin"
+    mkdir -p "$out/share/doc/obliv-c"
+    cp -r doc/* README* CHANGE* Change* LICEN* TODO* "$out/share/doc/obliv-c"
+    mkdir -p "$out/share/obliv-c"
+    cp -r test "$out/share/obliv-c"
+    mkdir -p "$out/include"
+    cp src/ext/oblivc/*.h "$out/include"
+    mkdir -p "$out/lib"
+    gcc $(ar t _build/libobliv.a | sed -e 's@^@_build/@') --shared -o _build/libobliv.so
+    cp _build/lib*.a _build/lib*.so* "$out/lib"
+  '';
+
+  meta = {
+    inherit version;
+    description = ''A GCC wrapper that makes it easy to embed secure computation protocols inside regular C programs'';
+    license = stdenv.lib.licenses.bsd3;
+    maintainers = [stdenv.lib.maintainers.raskin];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/obliv-c/ignore-complex-float128.patch b/nixpkgs/pkgs/development/compilers/obliv-c/ignore-complex-float128.patch
new file mode 100644
index 000000000000..e3a5b74a9cb2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/obliv-c/ignore-complex-float128.patch
@@ -0,0 +1,37 @@
+--- a/src/frontc/clexer.mll
++++ b/src/frontc/clexer.mll
+@@ -134,9 +134,11 @@ let init_lexicon _ =
+       (* WW: see /usr/include/sys/cdefs.h for why __signed and __volatile
+        * are accepted GCC-isms *)
+       ("_Bool", fun loc -> BOOL loc);
++      ("_Complex", fun loc -> COMPLEX loc);
+       ("char", fun loc -> CHAR loc);
+       ("int", fun loc -> INT loc);
+       ("float", fun loc -> FLOAT loc);
++      ("__float128", fun loc -> FLOAT128 loc);
+       ("double", fun loc -> DOUBLE loc);
+       ("void", fun loc -> VOID loc);
+       ("enum", fun loc -> ENUM loc);
+--- a/src/frontc/cparser.mly
++++ b/src/frontc/cparser.mly
+@@ -269,6 +269,8 @@ let oblivState (s:statement): statement =
+ %token<Cabs.cabsloc> VOLATILE EXTERN STATIC CONST RESTRICT AUTO REGISTER FROZEN
+ %token<Cabs.cabsloc> THREAD
+ 
++%token<Cabs.cabsloc> COMPLEX FLOAT128
++
+ %token<Cabs.cabsloc> SIZEOF ALIGNOF
+ 
+ %token EQ PLUS_EQ MINUS_EQ STAR_EQ SLASH_EQ PERCENT_EQ
+@@ -1002,7 +1004,11 @@ type_spec:   /* ISO 6.7.2 */
+ |   LONG            { Tlong, $1 }
+ |   INT64           { Tint64, $1 }
+ |   FLOAT           { Tfloat, $1 }
++|   FLOAT128        { Tfloat, $1 }
+ |   DOUBLE          { Tdouble, $1 }
++|   COMPLEX FLOAT   { Tfloat, $2 }
++|   COMPLEX FLOAT128{ Tfloat, $2 }
++|   COMPLEX DOUBLE  { Tdouble, $2 }
+ |   SIGNED          { Tsigned, $1 }
+ |   UNSIGNED        { Tunsigned, $1 }
+ |   STRUCT                 id_or_typename
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/3.08.0.nix b/nixpkgs/pkgs/development/compilers/ocaml/3.08.0.nix
new file mode 100644
index 000000000000..cd621c131ffa
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/3.08.0.nix
@@ -0,0 +1,21 @@
+{ stdenv, fetchurl, xlibsWrapper }:
+
+stdenv.mkDerivation rec {
+  pname = "ocaml";
+  version = "3.08.0";
+
+  builder = ./builder.sh;
+  src = fetchurl {
+    url = "http://tarballs.nixos.org/${pname}-${version}.tar.gz";
+    sha256 = "135g5waj7djzrj0dbc8z1llasfs2iv5asq41jifhldxb4l2b97mx";
+  };
+  configureScript = ./configure-3.08.0;
+  dontAddPrefix = "True";
+  configureFlags = ["-no-tk" "-x11lib" xlibsWrapper];
+  buildFlags = ["world" "bootstrap" "opt"];
+  checkTarget = ["opt.opt"];
+
+  meta = {
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/3.10.0.nix b/nixpkgs/pkgs/development/compilers/ocaml/3.10.0.nix
new file mode 100644
index 000000000000..8f26790020c8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/3.10.0.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchurl, xlibsWrapper, ncurses }:
+
+stdenv.mkDerivation (rec {
+
+  pname = "ocaml";
+  version = "3.10.0";
+
+  src = fetchurl {
+    url = "https://caml.inria.fr/pub/distrib/ocaml-3.10/${pname}-${version}.tar.bz2";
+    sha256 = "1ihmx1civ78s7k2hfc05z1s9vbyx2qw7fg8lnbxnfd6zxkk8878d";
+  };
+
+  prefixKey = "-prefix ";
+  configureFlags = ["-no-tk" "-x11lib" xlibsWrapper];
+  buildFlags = [ "world" "bootstrap" "world.opt" ];
+  buildInputs = [xlibsWrapper ncurses];
+  installTargets = "install installopt";
+  patchPhase = ''
+    CAT=$(type -tp cat)
+    sed -e "s@/bin/cat@$CAT@" -i config/auto-aux/sharpbang
+  '';
+  postBuild = ''
+    mkdir -p $out/include
+    ln -sv $out/lib/ocaml/caml $out/include/caml
+  '';
+
+  meta = {
+    homepage = "http://caml.inria.fr/ocaml";
+    license = with stdenv.lib.licenses; [ qpl lgpl2 ];
+    description = "Most popular variant of the Caml language";
+    platforms = stdenv.lib.platforms.linux;
+  };
+
+})
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/3.11.2.nix b/nixpkgs/pkgs/development/compilers/ocaml/3.11.2.nix
new file mode 100644
index 000000000000..946013562c22
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/3.11.2.nix
@@ -0,0 +1,75 @@
+{ stdenv, fetchurl, ncurses, xlibsWrapper }:
+
+let
+   useX11 = stdenv.isi686 || stdenv.isx86_64;
+   useNativeCompilers = stdenv.isi686 || stdenv.isx86_64 || stdenv.isMips;
+   inherit (stdenv.lib) optionals optionalString;
+in
+
+stdenv.mkDerivation rec {
+
+  pname = "ocaml";
+  version = "3.11.2";
+
+  src = fetchurl {
+    url = "https://caml.inria.fr/pub/distrib/ocaml-3.11/${pname}-${version}.tar.bz2";
+    sha256 = "86f3387a0d7e7c8be2a3c53af083a5a726e333686208d5ea0dd6bb5ac3f58143";
+  };
+
+  # Needed to avoid a SIGBUS on the final executable on mips
+  NIX_CFLAGS_COMPILE = if stdenv.isMips then "-fPIC" else "";
+
+  patches = optionals stdenv.isDarwin [ ./gnused-on-osx-fix.patch ] ++
+    [ (fetchurl {
+        name = "0007-Fix-ocamlopt-w.r.t.-binutils-2.21.patch";
+        url = "http://caml.inria.fr/mantis/file_download.php?file_id=418&type=bug";
+	sha256 = "612a9ac108bbfce2238aa5634123da162f0315dedb219958be705e0d92dcdd8e";
+      })
+    ];
+
+  prefixKey = "-prefix ";
+  configureFlags = ["-no-tk"] ++ optionals useX11 [ "-x11lib" xlibsWrapper ];
+  buildFlags = [ "world" ] ++ optionals useNativeCompilers [ "bootstrap" "world.opt" ];
+  buildInputs = [ncurses] ++ optionals useX11 [ xlibsWrapper ];
+  installTargets = "install" + optionalString useNativeCompilers " installopt";
+  prePatch = ''
+    CAT=$(type -tp cat)
+    sed -e "s@/bin/cat@$CAT@" -i config/auto-aux/sharpbang
+    patch -p0 < ${./mips64.patch}
+  '';
+  postBuild = ''
+    mkdir -p $out/include
+    ln -sv $out/lib/ocaml/caml $out/include/caml
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "http://caml.inria.fr/ocaml";
+    license = with licenses; [
+      qpl /* compiler */
+      lgpl2 /* library */
+    ];
+    description = "Most popular variant of the Caml language";
+
+    longDescription =
+      '' Objective Caml is the most popular variant of the Caml language.
+         From a language standpoint, it extends the core Caml language with a
+         fully-fledged object-oriented layer, as well as a powerful module
+         system, all connected by a sound, polymorphic type system featuring
+         type inference.
+
+         The Objective Caml system is an industrial-strength implementation
+         of this language, featuring a high-performance native-code compiler
+         (ocamlopt) for 9 processor architectures (IA32, PowerPC, AMD64,
+         Alpha, Sparc, Mips, IA64, HPPA, StrongArm), as well as a bytecode
+         compiler (ocamlc) and an interactive read-eval-print loop (ocaml)
+         for quick development and portability.  The Objective Caml
+         distribution includes a comprehensive standard library, a replay
+         debugger (ocamldebug), lexer (ocamllex) and parser (ocamlyacc)
+         generators, a pre-processor pretty-printer (camlp4) and a
+         documentation generator (ocamldoc).
+       '';
+
+    platforms = with platforms; linux ++ darwin;
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/3.12.1-darwin-fix-configure.patch b/nixpkgs/pkgs/development/compilers/ocaml/3.12.1-darwin-fix-configure.patch
new file mode 100644
index 000000000000..4b867bbb1e6f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/3.12.1-darwin-fix-configure.patch
@@ -0,0 +1,32 @@
+diff -Nuar ocaml-3.12.1/configure ocaml-3.12.1-fix-configure/configure
+--- ocaml-3.12.1/configure	2011-07-04 23:15:01.000000000 +0200
++++ ocaml-3.12.1-fix-configure/configure	2012-06-06 22:20:40.000000000 +0200
+@@ -259,7 +259,7 @@
+     bytecccompopts="-fno-defer-pop $gcc_warnings -DSHRINKED_GNUC"
+     mathlib="";;
+   *,*-*-darwin*)
+-    bytecccompopts="-fno-defer-pop -no-cpp-precomp $gcc_warnings"
++    bytecccompopts="-fno-defer-pop $gcc_warnings"
+     mathlib=""
+     # Tell gcc that we can use 32-bit code addresses for threaded code
+     # unless we are compiled for a shared library (-fPIC option)
+@@ -739,7 +739,7 @@
+   *,*,rhapsody,*)      nativecccompopts="$gcc_warnings -DDARWIN_VERSION_6 $dl_defs"
+                        if $arch64; then partialld="ld -r -arch ppc64"; fi;;
+   *,gcc*,cygwin,*)     nativecccompopts="$gcc_warnings -U_WIN32";;
+-  amd64,gcc*,macosx,*) partialld="ld -r -arch x86_64";;
++  amd64,gcc*,macosx,*) partialld="ld -r";;
+   amd64,gcc*,solaris,*) partialld="ld -r -m elf_x86_64";;
+   *,gcc*,*,*)          nativecccompopts="$gcc_warnings";;
+ esac
+@@ -752,8 +752,8 @@
+                     asppprofflags='-pg -DPROFILING';;
+   alpha,*,*)        as='as'
+                     aspp='gcc -c';;
+-  amd64,*,macosx)   as='as -arch x86_64'
+-                    aspp='gcc -arch x86_64 -c';;
++  amd64,*,macosx)   as='as'
++                    aspp='gcc -c';;
+   amd64,*,solaris)  as='as --64'
+                     aspp='gcc -m64 -c';;
+   amd64,*,*)        as='as'
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/3.12.1.nix b/nixpkgs/pkgs/development/compilers/ocaml/3.12.1.nix
new file mode 100644
index 000000000000..f90d61744f56
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/3.12.1.nix
@@ -0,0 +1,69 @@
+{ stdenv, fetchurl, ncurses, xlibsWrapper }:
+
+let
+   useX11 = !stdenv.isAarch32 && !stdenv.isMips;
+   useNativeCompilers = !stdenv.isMips;
+   inherit (stdenv.lib) optionals optionalString;
+in
+
+stdenv.mkDerivation rec {
+
+  pname = "ocaml";
+  version = "3.12.1";
+
+  src = fetchurl {
+    url = "https://caml.inria.fr/pub/distrib/ocaml-3.12/${pname}-${version}.tar.bz2";
+    sha256 = "13cmhkh7s6srnlvhg3s9qzh3a5dbk2m9qr35jzq922sylwymdkzd";
+  };
+
+  prefixKey = "-prefix ";
+  configureFlags = ["-no-tk"] ++ optionals useX11 [ "-x11lib" xlibsWrapper ];
+  buildFlags = [ "world" ] ++ optionals useNativeCompilers [ "bootstrap" "world.opt" ];
+  buildInputs = [ncurses] ++ optionals useX11 [ xlibsWrapper ];
+  installTargets = "install" + optionalString useNativeCompilers " installopt";
+  patches = optionals stdenv.isDarwin [ ./3.12.1-darwin-fix-configure.patch ];
+  preConfigure = ''
+    CAT=$(type -tp cat)
+    sed -e "s@/bin/cat@$CAT@" -i config/auto-aux/sharpbang
+  '';
+  postBuild = ''
+    mkdir -p $out/include
+    ln -sv $out/lib/ocaml/caml $out/include/caml
+  '';
+
+  passthru = {
+    nativeCompilers = useNativeCompilers;
+  };
+
+  meta = with stdenv.lib; {
+    homepage = "http://caml.inria.fr/ocaml";
+    branch = "3.12";
+    license = with licenses; [
+      qpl /* compiler */
+      lgpl2 /* library */
+    ];
+    description = "Most popular variant of the Caml language";
+
+    longDescription =
+      ''
+        OCaml is the most popular variant of the Caml language.  From a
+        language standpoint, it extends the core Caml language with a
+        fully-fledged object-oriented layer, as well as a powerful module
+        system, all connected by a sound, polymorphic type system featuring
+        type inference.
+
+        The OCaml system is an industrial-strength implementation of this
+        language, featuring a high-performance native-code compiler (ocamlopt)
+        for 9 processor architectures (IA32, PowerPC, AMD64, Alpha, Sparc,
+        Mips, IA64, HPPA, StrongArm), as well as a bytecode compiler (ocamlc)
+        and an interactive read-eval-print loop (ocaml) for quick development
+        and portability.  The OCaml distribution includes a comprehensive
+        standard library, a replay debugger (ocamldebug), lexer (ocamllex) and
+        parser (ocamlyacc) generators, a pre-processor pretty-printer (camlp4)
+        and a documentation generator (ocamldoc).
+      '';
+
+    platforms = with platforms; linux;
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/4.00.1.nix b/nixpkgs/pkgs/development/compilers/ocaml/4.00.1.nix
new file mode 100644
index 000000000000..81a8e0034feb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.00.1.nix
@@ -0,0 +1,67 @@
+{ stdenv, fetchurl, ncurses, xlibsWrapper }:
+
+let
+   useX11 = !stdenv.isAarch32 && !stdenv.isMips;
+   useNativeCompilers = !stdenv.isMips;
+   inherit (stdenv.lib) optional optionals optionalString;
+in
+
+stdenv.mkDerivation rec {
+  pname = "ocaml";
+  version = "4.00.1";
+
+  src = fetchurl {
+    url = "https://caml.inria.fr/pub/distrib/ocaml-4.00/${pname}-${version}.tar.bz2";
+    sha256 = "33c3f4acff51685f5bfd7c260f066645e767d4e865877bf1613c176a77799951";
+  };
+
+  prefixKey = "-prefix ";
+  configureFlags = [ "-no-tk" ] ++ optionals useX11 [ "-x11lib" xlibsWrapper ];
+  buildFlags = [ "world" ] ++ optionals useNativeCompilers [ "bootstrap" "world.opt" ];
+  buildInputs = [ ncurses ] ++ optional useX11 xlibsWrapper;
+  installTargets = "install" + optionalString useNativeCompilers " installopt";
+  preConfigure = ''
+    CAT=$(type -tp cat)
+    sed -e "s@/bin/cat@$CAT@" -i config/auto-aux/sharpbang
+  '';
+  postBuild = ''
+    mkdir -p $out/include
+    ln -sv $out/lib/ocaml/caml $out/include/caml
+  '';
+
+  passthru = {
+    nativeCompilers = useNativeCompilers;
+  };
+
+  meta = with stdenv.lib; {
+    homepage = "http://caml.inria.fr/ocaml";
+    branch = "4.00";
+    license = with licenses; [
+      qpl /* compiler */
+      lgpl2 /* library */
+    ];
+    description = "Most popular variant of the Caml language";
+
+    longDescription =
+      ''
+        OCaml is the most popular variant of the Caml language.  From a
+        language standpoint, it extends the core Caml language with a
+        fully-fledged object-oriented layer, as well as a powerful module
+        system, all connected by a sound, polymorphic type system featuring
+        type inference.
+
+        The OCaml system is an industrial-strength implementation of this
+        language, featuring a high-performance native-code compiler (ocamlopt)
+        for 9 processor architectures (IA32, PowerPC, AMD64, Alpha, Sparc,
+        Mips, IA64, HPPA, StrongArm), as well as a bytecode compiler (ocamlc)
+        and an interactive read-eval-print loop (ocaml) for quick development
+        and portability.  The OCaml distribution includes a comprehensive
+        standard library, a replay debugger (ocamldebug), lexer (ocamllex) and
+        parser (ocamlyacc) generators, a pre-processor pretty-printer (camlp4)
+        and a documentation generator (ocamldoc).
+      '';
+
+    platforms = with platforms; linux;
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/4.01.0.nix b/nixpkgs/pkgs/development/compilers/ocaml/4.01.0.nix
new file mode 100644
index 000000000000..6362f360f7da
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.01.0.nix
@@ -0,0 +1,7 @@
+import ./generic.nix {
+  major_version = "4";
+  minor_version = "01";
+  patch_version = "0";
+  patches = [ ./fix-clang-build-on-osx.diff ];
+  sha256 = "03d7ida94s1gpr3gadf4jyhmh5rrszd5s4m4z59daaib25rvfyv7";
+}
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/4.02.nix b/nixpkgs/pkgs/development/compilers/ocaml/4.02.nix
new file mode 100644
index 000000000000..4773f9f74a5a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.02.nix
@@ -0,0 +1,7 @@
+import ./generic.nix {
+  major_version = "4";
+  minor_version = "02";
+  patch_version = "3";
+  patches = [ ./ocamlbuild.patch ];
+  sha256 = "1qwwvy8nzd87hk8rd9sm667nppakiapnx4ypdwcrlnav2dz6kil3";
+}
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/4.03.nix b/nixpkgs/pkgs/development/compilers/ocaml/4.03.nix
new file mode 100644
index 000000000000..0bbe82330419
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.03.nix
@@ -0,0 +1,6 @@
+import ./generic.nix {
+  major_version = "4";
+  minor_version = "03";
+  patch_version = "0";
+  sha256 = "09p3iwwi55r6rbrpyp8f0wmkb0ppcgw67yxw6yfky60524wayp39";
+}
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/4.04.nix b/nixpkgs/pkgs/development/compilers/ocaml/4.04.nix
new file mode 100644
index 000000000000..4f49bcf80728
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.04.nix
@@ -0,0 +1,9 @@
+import ./generic.nix {
+  major_version = "4";
+  minor_version = "04";
+  patch_version = "2";
+  sha256 = "0bhgjzi78l10824qga85nlh18jg9lb6aiamf9dah1cs6jhzfsn6i";
+
+  # If the executable is stipped it does not work
+  dontStrip = true;
+}
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/4.05.nix b/nixpkgs/pkgs/development/compilers/ocaml/4.05.nix
new file mode 100644
index 000000000000..a63b06a9f628
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.05.nix
@@ -0,0 +1,9 @@
+import ./generic.nix {
+  major_version = "4";
+  minor_version = "05";
+  patch_version = "0";
+  sha256 = "1y9fw1ci9pwnbbrr9nwr8cq8vypcxwdf4akvxard3mxl2jx2g984";
+
+  # If the executable is stipped it does not work
+  dontStrip = true;
+}
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/4.06.nix b/nixpkgs/pkgs/development/compilers/ocaml/4.06.nix
new file mode 100644
index 000000000000..b54b8a6288fe
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.06.nix
@@ -0,0 +1,9 @@
+import ./generic.nix {
+  major_version = "4";
+  minor_version = "06";
+  patch_version = "1";
+  sha256 = "1n3pygfssd6nkrq876wszm5nm3v4605q4k16a66h1nmq9wvf01vg";
+
+  # If the executable is stipped it does not work
+  dontStrip = true;
+}
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/4.07.nix b/nixpkgs/pkgs/development/compilers/ocaml/4.07.nix
new file mode 100644
index 000000000000..c1952f30ba68
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.07.nix
@@ -0,0 +1,9 @@
+import ./generic.nix {
+  major_version = "4";
+  minor_version = "07";
+  patch_version = "1";
+  sha256 = "1f07hgj5k45cylj1q3k5mk8yi02cwzx849b1fwnwia8xlcfqpr6z";
+
+  # If the executable is stripped it does not work
+  dontStrip = true;
+}
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/4.08.nix b/nixpkgs/pkgs/development/compilers/ocaml/4.08.nix
new file mode 100644
index 000000000000..11c22e636ef1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.08.nix
@@ -0,0 +1,12 @@
+import ./generic.nix {
+  major_version = "4";
+  minor_version = "08";
+  patch_version = "1";
+  sha256 = "18sycl3zmgb8ghpxymriy5d72gvw7m5ra65v51hcrmzzac21hkyd";
+
+  # If the executable is stripped it does not work
+  dontStrip = true;
+
+  # Breaks build with Clang
+  hardeningDisable = [ "strictoverflow" ];
+}
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/4.09.nix b/nixpkgs/pkgs/development/compilers/ocaml/4.09.nix
new file mode 100644
index 000000000000..a093a2446419
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.09.nix
@@ -0,0 +1,9 @@
+import ./generic.nix {
+  major_version = "4";
+  minor_version = "09";
+  patch_version = "1";
+  sha256 = "1aq5505lpa39garky2icgfv4c7ylpx3j623cz9bsz5c466d2kqls";
+
+  # Breaks build with Clang
+  hardeningDisable = [ "strictoverflow" ];
+}
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/4.10.nix b/nixpkgs/pkgs/development/compilers/ocaml/4.10.nix
new file mode 100644
index 000000000000..955cc3bebe2a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.10.nix
@@ -0,0 +1,6 @@
+import ./generic.nix {
+  major_version = "4";
+  minor_version = "10";
+  patch_version = "0";
+  sha256 = "1dzy7lbdapcmwn1wg8k87419khi54f8hb6n314bdv7v0gfqlswrh";
+}
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/4.11.nix b/nixpkgs/pkgs/development/compilers/ocaml/4.11.nix
new file mode 100644
index 000000000000..2702a19d3187
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/4.11.nix
@@ -0,0 +1,6 @@
+import ./generic.nix {
+  major_version = "4";
+  minor_version = "11";
+  patch_version = "0+alpha2";
+  sha256 = "131ixp5kkgk9y42vrprhc2x0gpxhkapmdmb26pwkyl58vrbr8xqg";
+}
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/ber-metaocaml.nix b/nixpkgs/pkgs/development/compilers/ocaml/ber-metaocaml.nix
new file mode 100644
index 000000000000..a6ddcd8ce8f4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/ber-metaocaml.nix
@@ -0,0 +1,96 @@
+{ stdenv, fetchurl
+, ncurses
+, libX11, xorgproto, buildEnv
+}:
+
+let
+   useX11 = stdenv.isi686 || stdenv.isx86_64;
+   x11deps = [ libX11 xorgproto ];
+   inherit (stdenv.lib) optionals;
+
+   baseOcamlBranch  = "4.07";
+   baseOcamlVersion = "${baseOcamlBranch}.1";
+   metaocamlPatch   = "107";
+in
+
+stdenv.mkDerivation rec {
+  pname = "ber-metaocaml";
+  version = metaocamlPatch;
+
+  src = fetchurl {
+    url = "https://caml.inria.fr/pub/distrib/ocaml-${baseOcamlBranch}/ocaml-${baseOcamlVersion}.tar.gz";
+    sha256 = "1x4sln131mcspisr22qc304590rvg720rbl7g2i4xiymgvhkpm1a";
+  };
+
+  metaocaml = fetchurl {
+    url = "http://okmij.org/ftp/ML/ber-metaocaml-107.tar.gz";
+    sha256 = "0xy6n0yj1f53pk612zfmn49pn04bd75qa40xgmr0w0lzx6dqsfmm";
+  };
+
+  x11env = buildEnv { name = "x11env"; paths = x11deps; };
+  x11lib = "${x11env}/lib";
+  x11inc = "${x11env}/include";
+
+  prefixKey = "-prefix ";
+  configureFlags = optionals useX11
+    [ "-x11lib" x11lib
+      "-x11include" x11inc
+      "-flambda"
+    ];
+
+  dontStrip = true;
+  buildInputs = [ ncurses ] ++ optionals useX11 x11deps;
+
+  postConfigure = ''
+    tar -xvzf $metaocaml
+    cd ${pname}-${version}
+    make patch
+    cd ..
+  '';
+
+  buildPhase = ''
+    make world
+
+    make bootstrap
+    make opt.opt
+    make -i install
+    make installopt
+    mkdir -p $out/include
+    ln -sv $out/lib/ocaml/caml $out/include/caml
+    cd ${pname}-${version}
+    make all
+  '';
+
+  installPhase = ''
+    make install
+    make install.opt
+  '';
+
+  checkPhase = ''
+    cd ${pname}-${version}
+    make test
+    make test-compile
+    make test-native
+    cd ..
+  '';
+
+  passthru = {
+    nativeCompilers = true;
+  };
+
+  meta = with stdenv.lib; {
+    description     = "Multi-Stage Programming extension for OCaml";
+    homepage        = "http://okmij.org/ftp/ML/MetaOCaml.html";
+    license         = with licenses; [ /* compiler */ qpl /* library */ lgpl2 ];
+    maintainers     = with maintainers; [ thoughtpolice ];
+
+    branch          = baseOcamlBranch;
+    platforms       = with platforms; linux ++ darwin;
+    broken          = stdenv.isAarch64 || stdenv.isMips;
+
+    longDescription = ''
+      A simple extension of OCaml with the primitive type of code values, and
+      three basic multi-stage expression forms: Brackets, Escape, and Run.
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/builder.sh b/nixpkgs/pkgs/development/compilers/ocaml/builder.sh
new file mode 100644
index 000000000000..a1807682d867
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/builder.sh
@@ -0,0 +1,8 @@
+source $stdenv/setup
+
+configureFlags="-prefix $out $configureFlags"
+genericBuild
+
+#cd emacs/
+#mkdir -p $out/share/ocaml/emacs
+#make EMACSDIR=$out/share/ocaml/emacs install
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/configure-3.08.0 b/nixpkgs/pkgs/development/compilers/ocaml/configure-3.08.0
new file mode 100755
index 000000000000..9c8705855120
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/configure-3.08.0
@@ -0,0 +1,1482 @@
+#! /bin/sh
+
+#########################################################################
+#                                                                       #
+#                            Objective Caml                             #
+#                                                                       #
+#            Xavier Leroy, projet Cristal, INRIA Rocquencourt           #
+#                                                                       #
+#   Copyright 1999 Institut National de Recherche en Informatique et    #
+#   en Automatique.  All rights reserved.  This file is distributed     #
+#   under the terms of the GNU Library General Public License, with     #
+#   the special exception on linking described in file LICENSE.         #
+#                                                                       #
+#########################################################################
+
+# $Id: configure,v 1.215.2.3 2004/07/09 15:08:51 doligez Exp $
+
+configure_options="$*"
+prefix=/usr/local
+bindir=''
+libdir=''
+mandir=''
+manext=1
+host_type=unknown
+ccoption=''
+cclibs=''
+curseslibs=''
+mathlib='-lm'
+dllib=''
+x11_include_dir=''
+x11_lib_dir=''
+tk_wanted=yes
+pthread_wanted=yes
+tk_defs=''
+tk_libs=''
+tk_x11=yes
+dl_defs=''
+verbose=no
+withcurses=yes
+withsharedlibs=yes
+binutils_dir=''
+gcc_warnings="-Wall"
+
+# Try to turn internationalization off, can cause config.guess to malfunction!
+unset LANG
+unset LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES LC_MONETARY LC_NUMERIC LC_TIME 
+
+# Turn off some macOS debugging stuff, same reason
+unset RC_TRACE_ARCHIVES RC_TRACE_DYLIBS RC_TRACE_PREBINDING_DISABLED
+
+# Parse command-line arguments
+
+while : ; do
+  case "$1" in
+    "") break;;
+    -prefix|--prefix)
+        prefix=$2; shift;;
+    -bindir|--bindir)
+        bindir=$2; shift;;
+    -libdir|--libdir)
+        libdir=$2; shift;;
+    -mandir|--mandir)
+        case "$2" in
+          */man[1-9ln])
+            mandir=`echo $2 | sed -e 's|^\(.*\)/man.$|\1|'`
+            manext=`echo $2 | sed -e 's/^.*\(.\)$/\1/'`;;
+          *)
+            mandir=$2
+            manext=1;;
+        esac
+        shift;;
+    -host*|--host*)
+        host_type=$2; shift;;
+    -cc*)
+        ccoption="$2"; shift;;
+    -lib*)
+        cclibs="$2 $cclibs"; shift;;
+    -no-curses)
+        withcurses=no;;
+    -no-shared-libs)
+        withsharedlibs=no;;
+    -x11include*|--x11include*)
+        x11_include_dir=$2; shift;;
+    -x11lib*|--x11lib*)
+        x11_lib_dir=$2; shift;;
+    -with-pthread*|--with-pthread*)
+        ;; # Ignored for backward compatibility
+    -no-pthread*|--no-pthread*)
+        pthread_wanted=no;;
+    -no-tk|--no-tk)
+        tk_wanted=no;;
+    -tkdefs*|--tkdefs*)
+        tk_defs=$2; shift;;
+    -tklibs*|--tklibs*)
+        tk_libs=$2; shift;;
+    -tk-no-x11|--tk-no-x11)
+        tk_x11=no;;
+    -dldefs*|--dldefs*)
+        dl_defs="$2"; shift;;
+    -dllibs*|--dllibs*)
+        dllib="$2"; shift;;
+    -binutils*|--binutils*)
+        binutils_dir=$2; shift;;
+    -verbose|--verbose)
+        verbose=yes;;
+    *) echo "Unknown option \"$1\"." 1>&2; exit 2;;
+  esac
+  shift
+done
+
+# Sanity checks
+
+case "$prefix" in
+  /*) ;;
+   *) echo "The -prefix directory must be absolute." 1>&2; exit 2;;
+esac
+case "$bindir" in
+  /*) ;;
+  "") ;;
+   *) echo "The -bindir directory must be absolute." 1>&2; exit 2;;
+esac
+case "$libdir" in
+  /*) ;;
+  "") ;;
+   *) echo "The -libdir directory must be absolute." 1>&2; exit 2;;
+esac
+case "$mandir" in
+  /*) ;;
+  "") ;;
+   *) echo "The -mandir directory must be absolute." 1>&2; exit 2;;
+esac
+
+# Generate the files
+
+cd config/auto-aux
+rm -f s.h m.h Makefile
+touch s.h m.h Makefile
+
+# Write options to Makefile
+
+echo "# generated by ./configure $configure_options" >> Makefile
+
+# Where to install
+
+echo "PREFIX=$prefix" >> Makefile
+case "$bindir" in
+  "") echo 'BINDIR=$(PREFIX)/bin' >> Makefile
+      bindir="$prefix/bin";;
+   *) echo "BINDIR=$bindir" >> Makefile;;
+esac
+case "$libdir" in
+  "") echo 'LIBDIR=$(PREFIX)/lib/ocaml' >> Makefile
+      libdir="$prefix/lib/ocaml";;
+   *) echo "LIBDIR=$libdir" >> Makefile;;
+esac
+echo 'STUBLIBDIR=$(LIBDIR)/stublibs' >> Makefile
+case "$mandir" in
+  "") echo 'MANDIR=$(PREFIX)/man' >> Makefile
+      mandir="$prefix/man";;
+   *) echo "MANDIR=$mandir" >> Makefile;;
+esac
+echo "MANEXT=$manext" >> Makefile
+
+# Determine the system type
+
+if test "$host_type" = "unknown"; then
+  if host_type=`../gnu/config.guess`; then :; else
+    echo "Cannot guess host type"
+    echo "You must specify one with the -host option"
+    exit 2
+  fi
+fi
+if host=`../gnu/config.sub $host_type`; then :; else
+  echo "Please specify the correct host type with the -host option"
+  exit 2
+fi
+echo "Configuring for a $host ..."
+
+# Do we have gcc?
+
+if test -z "$ccoption"; then
+  if sh ./searchpath gcc; then
+    echo "gcc found"
+    cc=gcc
+  else
+    cc=cc
+  fi
+else
+  cc="$ccoption"
+fi
+
+# Check for buggy versions of GCC
+
+buggycc="no"
+
+case "$host,$cc" in
+  i[3456]86-*-*,gcc*)
+    case `$cc --version` in
+      2.7.2.1) cat <<'EOF'
+
+WARNING: you are using gcc version 2.7.2.1 on an Intel x86 processor.
+This version of gcc is known to generate incorrect code for the
+Objective Caml runtime system on some Intel x86 machines. (The symptom
+is a crash of boot/ocamlc when compiling stdlib/pervasives.mli.)
+In particular, the version of gcc 2.7.2.1 that comes with
+Linux RedHat 4.x / Intel is affected by this problem.
+Other Linux distributions might also be affected.
+If you are using one of these configurations, you are strongly advised
+to use another version of gcc, such as 2.95, which are
+known to work well with Objective Caml.
+
+Press <enter> to proceed or <interrupt> to stop.
+EOF
+        read reply;;
+      2.96*) cat <<'EOF'
+
+WARNING: you are using gcc version 2.96 on an Intel x86 processor.
+Certain patched versions of gcc 2.96 are known to generate incorrect
+code for the Objective Caml runtime system.  (The symptom is a segmentation
+violation on boot/ocamlc.)  Those incorrectly patched versions can be found
+in RedHat 7.2 and Mandrake 8.0 and 8.1; other Linux distributions
+might also be affected.  (See bug #57760 on bugzilla.redhat.com)
+
+Auto-configuration will now select gcc compiler flags that work around
+the problem.  Still, if you observe segmentation faults while running
+ocamlc or ocamlopt, you are advised to try another version of gcc,
+such as 2.95.3 or 3.2.
+
+EOF
+        buggycc="gcc.2.96";;
+
+            esac;;
+esac
+
+# Configure the bytecode compiler
+
+bytecc="$cc"
+bytecccompopts=""
+bytecclinkopts=""
+ostype="Unix"
+exe=""
+
+case "$bytecc,$host" in
+  cc,*-*-nextstep*)
+    # GNU C extensions disabled, but __GNUC__ still defined!
+    bytecccompopts="-fno-defer-pop $gcc_warnings -U__GNUC__ -posix"
+    bytecclinkopts="-posix";;
+  *,*-*-rhapsody*)
+    # Almost the same as NeXTStep
+    bytecccompopts="-fno-defer-pop $gcc_warnings -DSHRINKED_GNUC"
+    mathlib="";;
+  *,*-*-darwin*)
+    # Almost the same as rhapsody
+    bytecccompopts="-fno-defer-pop -no-cpp-precomp $gcc_warnings"
+    mathlib="";;
+  *,*-*-beos*)
+    bytecccompopts="-fno-defer-pop $gcc_warnings"
+    # No -lm library
+    mathlib="";;
+  gcc,alpha*-*-osf*)
+    bytecccompopts="-fno-defer-pop $gcc_warnings"
+    if cc="$bytecc" sh ./hasgot -mieee; then
+      bytecccompopts="-mieee $bytecccompopts";
+    fi
+    # Put code and static data in lower 4GB
+    bytecclinkopts="-Wl,-T,12000000 -Wl,-D,14000000"
+    # Tell gcc that we can use 32-bit code addresses for threaded code
+    echo "#define ARCH_CODE32" >> m.h;;
+  cc,alpha*-*-osf*)
+    bytecccompopts="-std1 -ieee";;
+  gcc,alpha*-*-linux*)
+    if cc="$bytecc" sh ./hasgot -mieee; then
+      bytecccompopts="-mieee $bytecccompopts";
+    fi;;
+  cc,mips-*-irix6*)
+    # Add -n32 flag to ensure compatibility with native-code compiler
+    bytecccompopts="-n32"
+    # Turn off warning "unused library"
+    bytecclinkopts="-n32 -Wl,-woff,84";;
+  cc*,mips-*-irix6*)
+    # (For those who want to force "cc -64")
+    # Turn off warning "unused library"
+    bytecclinkopts="-Wl,-woff,84";;
+  *,alpha*-*-unicos*)
+    # For the Cray T3E
+    bytecccompopts="-DUMK";;
+  gcc*,powerpc-*-aix4.3*)
+    # Avoid name-space pollution by requiring Unix98-conformant includes
+    bytecccompopts="-fno-defer-pop $gcc_warnings -D_XOPEN_SOURCE=500";;
+  *,powerpc-*-aix4.3*)
+    bytecccompopts="-D_XOPEN_SOURCE=500";;
+  gcc*,*-*-cygwin*)
+    bytecccompopts="-fno-defer-pop $gcc_warnings -U_WIN32"
+    exe=".exe"
+    ostype="Cygwin";;
+  gcc*,x86_64-*-linux*)
+    bytecccompopts="-fno-defer-pop $gcc_warnings"
+    # Tell gcc that we can use 32-bit code addresses for threaded code
+    echo "#define ARCH_CODE32" >> m.h;;
+  gcc*)
+    bytecccompopts="-fno-defer-pop $gcc_warnings";;
+esac
+
+# Configure compiler to use in further tests
+
+cc="$bytecc -O $bytecclinkopts"
+export cc cclibs verbose
+
+# Check C compiler
+
+sh ./runtest ansi.c
+case $? in
+  0) echo "The C compiler is ANSI-compliant.";;
+  1) echo "The C compiler $cc is not ANSI-compliant."
+     echo "You need an ANSI C compiler to build Objective Caml."
+     exit 2;;
+  *) echo "Unable to compile the test program."
+     echo "Make sure the C compiler $cc is properly installed."
+     exit 2;;
+esac
+
+# Check the sizes of data types
+
+echo "Checking the sizes of integers and pointers..."
+set `sh ./runtest sizes.c`
+case "$2,$3" in
+  4,4) echo "OK, this is a regular 32 bit architecture."
+       echo "#undef ARCH_SIXTYFOUR" >> m.h;;
+  8,8) echo "Wow! A 64 bit architecture!"
+       echo "#define ARCH_SIXTYFOUR" >> m.h;;
+  *,8) echo "Wow! A 64 bit architecture!"
+       echo "Unfortunately, Objective Caml cannot work in the case"
+       echo "sizeof(long) != sizeof(long *)."
+       echo "Objective Caml won't run on this architecture."
+       exit 2;;
+  *,*) echo "This architecture seems to be neither 32 bits nor 64 bits."
+       echo "Objective Caml won't run on this architecture."
+       exit 2;;
+    *) echo "Unable to compile the test program."
+       echo "Make sure the C compiler $cc is properly installed."
+       exit 2;;
+esac
+if test $1 != 4 && test $2 != 4 && test $4 != 4; then
+  echo "Sorry, we can't find a 32-bit integer type"
+  echo "(sizeof(short) = $4, sizeof(int) = $1, sizeof(long) = $2)"
+  echo "Objective Caml won't run on this architecture."
+  exit 2
+fi
+
+echo "#define SIZEOF_INT $1" >> m.h
+echo "#define SIZEOF_LONG $2" >> m.h
+echo "#define SIZEOF_SHORT $4" >> m.h
+
+if test $2 = 8; then
+     echo "#define ARCH_INT64_TYPE long" >> m.h
+     echo "#define ARCH_UINT64_TYPE unsigned long" >> m.h
+     echo '#define ARCH_INT64_PRINTF_FORMAT "l"' >> m.h
+     int64_native=true
+else
+  sh ./runtest longlong.c
+  case $? in
+  0) echo "64-bit \"long long\" integer type found (printf with \"%ll\")."
+     echo "#define ARCH_INT64_TYPE long long" >> m.h
+     echo "#define ARCH_UINT64_TYPE unsigned long long" >> m.h
+     echo '#define ARCH_INT64_PRINTF_FORMAT "ll"' >> m.h
+     int64_native=true;;
+  1) echo "64-bit \"long long\" integer type found (printf with \"%q\")."
+     echo "#define ARCH_INT64_TYPE long long" >> m.h
+     echo "#define ARCH_UINT64_TYPE unsigned long long" >> m.h
+     echo '#define ARCH_INT64_PRINTF_FORMAT "q"' >> m.h
+     int64_native=true;;
+  2) echo "64-bit \"long long\" integer type found (but no printf)."
+     echo "#define ARCH_INT64_TYPE long long" >> m.h
+     echo "#define ARCH_UINT64_TYPE unsigned long long" >> m.h
+     echo '#undef ARCH_INT64_PRINTF_FORMAT' >> m.h
+     int64_native=true;;
+  *) echo "No suitable 64-bit integer type found, will use software emulation."
+     echo "#undef ARCH_INT64_TYPE" >> m.h
+     echo "#undef ARCH_UINT64_TYPE" >> m.h
+     echo '#undef ARCH_INT64_PRINTF_FORMAT' >> m.h
+     int64_native=false;;
+  esac
+fi
+
+# Determine endianness
+
+sh ./runtest endian.c
+case $? in
+  0) echo "This is a big-endian architecture."
+     echo "#define ARCH_BIG_ENDIAN" >> m.h;;
+  1) echo "This is a little-endian architecture."
+     echo "#undef ARCH_BIG_ENDIAN" >> m.h;;
+  2) echo "This architecture seems to be neither big endian nor little endian."
+     echo "Objective Caml won't run on this architecture."
+     exit 2;;
+  *) echo "Something went wrong during endianness determination."
+     echo "You'll have to figure out endianness yourself"
+     echo "(option ARCH_BIG_ENDIAN in m.h).";;
+esac
+
+# Determine alignment constraints
+
+case "$host" in
+  sparc-*-*|hppa*-*-*)
+    # On Sparc V9 with certain versions of gcc, determination of double
+    # alignment is not reliable (PR#1521), hence force it.
+    # Same goes for hppa.
+    # But there's a knack (PR#2572):
+    # if we're in 64-bit mode (sizeof(long) == 8), 
+    # we must not doubleword-align floats...
+    if test $2 = 8; then
+      echo "Doubles can be word-aligned."
+      echo "#undef ARCH_ALIGN_DOUBLE" >> m.h
+    else
+      echo "Doubles must be doubleword-aligned."
+      echo "#define ARCH_ALIGN_DOUBLE" >> m.h
+    fi;;
+  *)
+    sh ./runtest dblalign.c
+    case $? in
+      0) echo "Doubles can be word-aligned."
+         echo "#undef ARCH_ALIGN_DOUBLE" >> m.h;;
+      1) echo "Doubles must be doubleword-aligned."
+         echo "#define ARCH_ALIGN_DOUBLE" >> m.h;;
+      *) echo "Something went wrong during alignment determination for doubles."
+         echo "I'm going to assume this architecture has alignment constraints over doubles."
+         echo "That's a safe bet: Objective Caml will work even if"
+         echo "this architecture has actually no alignment constraints."
+         echo "#define ARCH_ALIGN_DOUBLE" >> m.h;;
+    esac;;
+esac
+
+if $int64_native; then
+  case "$host" in
+    hppa*-*-*)
+      if test $2 = 8; then
+        echo "64-bit integers can be word-aligned."
+        echo "#undef ARCH_ALIGN_INT64" >> m.h
+      else
+        echo "64-bit integers must be doubleword-aligned."
+        echo "#define ARCH_ALIGN_INT64" >> m.h
+      fi;;
+    *)
+      sh ./runtest int64align.c
+      case $? in
+        0) echo "64-bit integers can be word-aligned."
+           echo "#undef ARCH_ALIGN_INT64" >> m.h;;
+        1) echo "64-bit integers must be doubleword-aligned."
+           echo "#define ARCH_ALIGN_INT64" >> m.h;;
+        *) echo "Something went wrong during alignment determination for 64-bit integers."
+           echo "I'm going to assume this architecture has alignment constraints."
+           echo "That's a safe bet: Objective Caml will work even if"
+           echo "this architecture has actually no alignment constraints."
+           echo "#define ARCH_ALIGN_INT64" >> m.h;;
+      esac
+  esac
+else
+  echo "#undef ARCH_ALIGN_INT64" >> m.h
+fi
+
+# Check semantics of division and modulus
+
+sh ./runtest divmod.c
+case $? in
+  0) echo "Native division and modulus have round-towards-zero semantics, will use them."
+     echo "#undef NONSTANDARD_DIV_MOD" >> m.h;;
+  1) echo "Native division and modulus do not have round-towards-zero semantics, will use software emulation."
+     echo "#define NONSTANDARD_DIV_MOD" >> m.h;;
+  *) echo "Something went wrong while checking native division and modulus, please report it."
+     echo "#define NONSTANDARD_DIV_MOD" >> m.h;;
+esac
+
+# Shared library support
+
+shared_libraries_supported=false
+dl_needs_underscore=false
+sharedcccompopts=''
+mksharedlib=''
+byteccrpath=''
+mksharedlibrpath=''
+
+if test $withsharedlibs = "yes"; then
+  case "$host" in
+    *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*)
+      sharedcccompopts="-fPIC"
+      mksharedlib="$bytecc -shared -o"
+      bytecclinkopts="$bytecclinkopts -Wl,-E"
+      byteccrpath="-Wl,-rpath,"
+      mksharedlibrpath="-Wl,-rpath,"
+      shared_libraries_supported=true;;
+    alpha*-*-osf*)
+      case "$bytecc" in
+        gcc*)
+          sharedcccompopts="-fPIC"
+          mksharedlib="$bytecc -shared -o"
+          byteccrpath="-Wl,-rpath,"
+          mksharedlibrpath="-Wl,-rpath,"
+          shared_libraries_supported=true;;
+        cc*)
+          sharedcccompopts=""
+          mksharedlib="ld -shared -expect_unresolved '*' -o"
+          byteccrpath="-Wl,-rpath,"
+          mksharedlibrpath="-rpath "
+          shared_libraries_supported=true;;
+      esac;;
+    *-*-solaris2*)
+      case "$bytecc" in
+        gcc*)
+          sharedcccompopts="-fPIC"
+          if sh ./solaris-ld; then
+            mksharedlib="$bytecc -shared -o"
+            byteccrpath="-R"
+            mksharedlibrpath="-R"
+          else
+            mksharedlib="$bytecc -shared -o"
+            bytecclinkopts="$bytecclinkopts -Wl,-E"
+            byteccrpath="-Wl,-rpath,"
+            mksharedlibrpath="-Wl,-rpath,"
+          fi
+          shared_libraries_supported=true;;
+        *)
+          sharedcccompopts="-KPIC"
+          byteccrpath="-R"
+          mksharedlibrpath="-R"
+          mksharedlib="/usr/ccs/bin/ld -G -o"
+          shared_libraries_supported=true;;
+      esac;;
+    mips*-*-irix[56]*)
+      case "$bytecc" in
+        cc*) sharedcccompopts="";;
+        gcc*) sharedcccompopts="-fPIC";;
+      esac
+      mksharedlib="ld -shared -rdata_shared -o"
+      byteccrpath="-Wl,-rpath,"
+      mksharedlibrpath="-rpath "
+      shared_libraries_supported=true;;
+    powerpc-apple-darwin*)
+      mksharedlib="cc -bundle -flat_namespace -undefined suppress -o"
+      bytecccompopts="$dl_defs $bytecccompopts"
+      #sharedcccompopts="-fnocommon"
+      dl_needs_underscore=true
+      shared_libraries_supported=true;;
+  esac
+fi
+
+# Further machine-specific hacks
+
+case "$host" in
+  ia64-*-linux*|alpha*-*-linux*|x86_64-*-linux*)
+    echo "Will use mmap() instead of malloc() for allocation of major heap chunks."
+    echo "#define USE_MMAP_INSTEAD_OF_MALLOC" >> s.h;;
+esac
+
+# Configure the native-code compiler
+
+arch=none
+model=default
+system=unknown
+
+case "$host" in
+  alpha*-*-osf*)                arch=alpha; system=digital;;
+  alpha*-*-linux*)              arch=alpha; system=linux;;
+  alpha*-*-freebsd*)            arch=alpha; system=freebsd;;
+  alpha*-*-netbsd*)             arch=alpha; system=netbsd;;
+  alpha*-*-openbsd*)            arch=alpha; system=openbsd;;
+  sparc*-*-sunos4.*)            arch=sparc; system=sunos;;
+  sparc*-*-solaris2.*)          arch=sparc; system=solaris;;
+  sparc*-*-*bsd*)               arch=sparc; system=bsd;;
+  sparc*-*-linux*)              arch=sparc; system=linux;;
+  i[3456]86-*-linux*)           arch=i386; system=linux_`sh ./runtest elf.c`;;
+  i[3456]86-*-*bsd*)            arch=i386; system=bsd_`sh ./runtest elf.c`;;
+  i[3456]86-*-nextstep*)        arch=i386; system=nextstep;;
+  i[3456]86-*-solaris*)         arch=i386; system=solaris;;
+  i[3456]86-*-beos*)            arch=i386; system=beos;;
+  i[3456]86-*-cygwin*)          arch=i386; system=cygwin;;
+  mips-*-irix6*)                arch=mips; system=irix;;
+  hppa1.1-*-hpux*)              arch=hppa; system=hpux;;
+  hppa2.0*-*-hpux*)             arch=hppa; system=hpux;;
+  hppa*-*-linux*)		arch=hppa; system=linux;;
+  powerpc-*-linux*)             arch=power; model=ppc; system=elf;;
+  powerpc-*-netbsd*)            arch=power; model=ppc; system=bsd;;
+  powerpc-*-rhapsody*)          arch=power; model=ppc; system=rhapsody;;
+  powerpc-*-darwin*)            arch=power; model=ppc; system=rhapsody;;
+  arm*-*-linux*)                arch=arm; system=linux;;
+  ia64-*-linux*)                arch=ia64; system=linux;;
+  ia64-*-freebsd*)              arch=ia64; system=freebsd;;
+  x86_64-*-linux*)              arch=amd64; system=linux;;
+  x86_64-*-freebsd*)            arch=amd64; system=freebsd;;
+  x86_64-*-openbsd*)            arch=amd64; system=openbsd;;
+esac
+
+if test -z "$ccoption"; then
+  case "$arch,$system,$cc" in
+    alpha,digital,gcc*) nativecc=cc;;
+    mips,*,gcc*) nativecc=cc;;
+    *) nativecc="$bytecc";;
+  esac
+else
+  nativecc="$ccoption"
+fi
+
+nativecccompopts=''
+nativecclinkopts=''
+nativeccrpath="$byteccrpath"
+
+case "$arch,$nativecc,$system,$host_type" in
+  alpha,cc*,digital,*) nativecccompopts=-std1;;
+  mips,cc*,irix,*)     nativecccompopts=-n32
+                       nativecclinkopts="-n32 -Wl,-woff,84";;
+  *,*,nextstep,*)      nativecccompopts="$gcc_warnings -U__GNUC__ -posix"
+                       nativecclinkopts="-posix";;
+  *,*,rhapsody,*darwin[1-5].*)
+                       nativecccompopts="$gcc_warnings -DSHRINKED_GNUC";;
+  *,*,rhapsody,*)
+                 nativecccompopts="$gcc_warnings -DDARWIN_VERSION_6 $dl_defs";;
+  *,gcc*,cygwin,*)     nativecccompopts="$gcc_warnings -U_WIN32";;
+  *,gcc*,*,*)          nativecccompopts="$gcc_warnings";;
+esac
+
+asflags=''
+aspp='$(AS)'
+asppflags=''
+asppprofflags='-DPROFILING'
+
+case "$arch,$model,$system" in
+  alpha,*,digital)  asflags='-O2'; asppflags='-O2 -DSYS_$(SYSTEM)';
+                    asppprofflags='-pg -DPROFILING';;
+  alpha,*,linux)    aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
+  alpha,*,freebsd)  aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
+  alpha,*,netbsd)   aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
+  alpha,*,openbsd)  aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
+  mips,*,irix)      asflags='-n32 -O2'; asppflags="$asflags";;
+  sparc,*,bsd)      aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
+  sparc,*,linux)    aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
+  sparc,*,*)        case "$cc" in
+                      gcc*) aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
+                         *) asppflags='-P -DSYS_$(SYSTEM)';;
+                    esac;;
+  i386,*,solaris)   aspp='/usr/ccs/bin/as'; asppflags='-P -DSYS_$(SYSTEM)';;
+  i386,*,*)         aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
+  hppa,*,*)         aspp="$cc"; asppflags='-traditional -c -DSYS_$(SYSTEM)';;
+  power,*,elf)      aspp='gcc'; asppflags='-c';;
+  power,*,bsd)      aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
+  power,*,rhapsody) ;;
+  arm,*,linux)      aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
+  ia64,*,*)         asflags=-xexplicit
+                    aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM) -Wa,-xexplicit';;
+  amd64,*,*)        aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
+esac
+
+cc_profile='-pg'
+case "$arch,$model,$system" in
+  alpha,*,digital) profiling='prof';;
+  i386,*,linux_elf) profiling='prof';;
+  i386,*,bsd_elf) profiling='prof';;
+  sparc,*,solaris)
+    profiling='prof'
+    case "$nativecc" in gcc*) ;; *) cc_profile='-xpg';; esac;;
+  amd64,*,linux) profiling='prof';;
+  *) profiling='noprof';;
+esac
+
+# Where are GNU binutils?
+
+binutils_objcopy=''
+binutils_nm=''
+
+if test "$arch" != "none"; then
+  binutils_path="${binutils_dir}:${PATH}:/usr/libexec/binutils"
+  old_IFS="$IFS"
+  IFS=':'
+  for d in ${binutils_path}; do
+    if test -z "$d"; then continue; fi
+    if test -f "$d/objcopy" && test -f "$d/nm"; then
+      echo "objcopy and nm found in $d"
+      if test `$d/objcopy --help | grep -s -c 'redefine-sym'` -eq 0; then
+        echo "$d/objcopy does not support option --redefine-sym, discarded"
+        continue;
+      fi
+      if test `$d/nm --version | grep -s -c 'GNU nm'` -eq 0; then
+        echo "$d/nm is not from GNU binutils, discarded"
+        continue;
+      fi
+      binutils_objcopy="$d/objcopy"
+      binutils_nm="$d/nm"
+      break
+    fi
+  done
+  IFS="$old_IFS"
+fi
+
+# Where is ranlib?
+
+if sh ./searchpath ranlib; then
+  echo "ranlib found"
+  echo "RANLIB=ranlib" >> Makefile
+  echo "RANLIBCMD=ranlib" >> Makefile
+else
+  echo "ranlib not used"
+  echo "RANLIB=ar rs" >> Makefile
+  echo "RANLIBCMD=" >> Makefile
+fi
+
+# Do #! scripts work?
+
+if (SHELL=/bin/sh; export SHELL; (./sharpbang || ./sharpbang2) >/dev/null); then
+  echo "#! appears to work in shell scripts"
+  case "$host" in
+    *-*-sunos*|*-*-unicos*)
+      echo "We won't use it, though, because under SunOS and Unicos it breaks"
+      echo "on pathnames longer than 30 characters"
+      echo "SHARPBANGSCRIPTS=false" >> Makefile;;
+    *-*-cygwin*)
+      echo "We won't use it, though, because of conflicts with .exe extension"
+      echo "under Cygwin"
+      echo "SHARPBANGSCRIPTS=false" >> Makefile;;
+    *)
+      echo "SHARPBANGSCRIPTS=true" >> Makefile;;
+  esac
+else
+  echo "No support for #! in shell scripts"
+  echo "SHARPBANGSCRIPTS=false" >> Makefile
+fi
+
+# Write the OS type (Unix or Cygwin)
+
+echo "#define OCAML_OS_TYPE \"$ostype\"" >> s.h
+echo "#define OCAML_STDLIB_DIR \"$libdir\"" >> s.h
+
+# Use 64-bit file offset if possible
+
+bytecccompopts="$bytecccompopts -D_FILE_OFFSET_BITS=64"
+nativecccompopts="$nativecccompopts -D_FILE_OFFSET_BITS=64"
+
+# Check the semantics of signal handlers
+
+if sh ./hasgot sigaction sigprocmask; then
+  echo "POSIX signal handling found."
+  echo "#define POSIX_SIGNALS" >> s.h
+else
+  if sh ./runtest signals.c; then
+    echo "Signals have the BSD semantics."
+    echo "#define BSD_SIGNALS" >> s.h
+  else
+    echo "Signals have the System V semantics."
+  fi
+  if sh ./hasgot sigsetmask; then
+    echo "sigsetmask() found"
+    echo "#define HAS_SIGSETMASK" >> s.h
+  fi
+fi
+
+# For the sys module
+
+if sh ./hasgot times; then
+  echo "times() found."
+  echo "#define HAS_TIMES" >> s.h
+fi
+
+# For the terminfo module
+
+if test "$withcurses" = "yes"; then
+  for libs in "" "-lcurses" "-ltermcap" "-lcurses -ltermcap" "-lncurses"; do
+    if sh ./hasgot $libs tgetent tgetstr tgetnum tputs; then
+      echo "termcap functions found (with libraries '$libs')"
+      echo "#define HAS_TERMCAP" >> s.h
+      curseslibs="${libs}"
+      break
+    fi
+  done
+fi
+
+# Configuration for the libraries
+
+otherlibraries="unix str num dynlink bigarray"
+
+# For the Unix library
+
+has_sockets=no
+if sh ./hasgot socket socketpair bind listen accept connect; then
+  echo "You have BSD sockets."
+  echo "#define HAS_SOCKETS" >> s.h
+  has_sockets=yes
+elif sh ./hasgot -lnsl -lsocket socket socketpair bind listen accept connect; then
+  echo "You have BSD sockets (with libraries '-lnsl -lsocket')"
+  cclibs="$cclibs -lnsl -lsocket"
+  echo "#define HAS_SOCKETS" >> s.h
+  has_sockets=yes
+fi
+
+if sh ./hasgot -i sys/socket.h -t socklen_t; then
+  echo "socklen_t is defined in <sys/socket.h>"
+  echo "#define HAS_SOCKLEN_T" >> s.h
+fi
+
+if sh ./hasgot inet_aton; then
+  echo "inet_aton() found."
+  echo "#define HAS_INET_ATON" >> s.h
+fi
+
+if sh ./hasgot -i sys/types.h -i sys/socket.h -i netinet/in.h \
+               -t 'struct sockaddr_in6' \
+&& sh ./hasgot getaddrinfo getnameinfo inet_pton inet_ntop; then
+  echo "IPv6 is supported."
+  echo "#define HAS_IPV6" >> s.h
+fi
+
+if sh ./hasgot -i unistd.h; then
+  echo "unistd.h found."
+  echo "#define HAS_UNISTD" >> s.h
+fi
+
+if sh ./hasgot -i sys/types.h -t off_t; then
+  echo "off_t is defined in <sys/types.h>"
+  echo "#define HAS_OFF_T" >> s.h
+fi
+
+if sh ./hasgot -i sys/types.h -i dirent.h; then
+  echo "dirent.h found."
+  echo "#define HAS_DIRENT" >> s.h
+fi
+
+if sh ./hasgot rewinddir; then
+  echo "rewinddir() found."
+  echo "#define HAS_REWINDDIR" >> s.h
+fi
+
+if sh ./hasgot lockf; then
+  echo "lockf() found."
+  echo "#define HAS_LOCKF" >> s.h
+fi
+
+if sh ./hasgot mkfifo; then
+  echo "mkfifo() found."
+  echo "#define HAS_MKFIFO" >> s.h
+fi
+
+if sh ./hasgot getcwd; then
+  echo "getcwd() found."
+  echo "#define HAS_GETCWD" >> s.h
+fi
+
+if sh ./hasgot getwd; then
+  echo "getwd() found."
+  echo "#define HAS_GETWD" >> s.h
+fi
+
+if sh ./hasgot getpriority setpriority; then
+  echo "getpriority() found."
+  echo "#define HAS_GETPRIORITY" >> s.h
+fi
+
+if sh ./hasgot -i sys/types.h -i utime.h && sh ./hasgot utime; then
+  echo "utime() found."
+  echo "#define HAS_UTIME" >> s.h
+fi
+
+if sh ./hasgot utimes; then
+  echo "utimes() found."
+  echo "#define HAS_UTIMES" >> s.h
+fi
+
+if sh ./hasgot dup2; then
+  echo "dup2() found."
+  echo "#define HAS_DUP2" >> s.h
+fi
+
+if sh ./hasgot fchmod fchown; then
+  echo "fchmod() found."
+  echo "#define HAS_FCHMOD" >> s.h
+fi
+
+if sh ./hasgot truncate ftruncate; then
+  echo "truncate() found."
+  echo "#define HAS_TRUNCATE" >> s.h
+fi
+
+select_include=''
+if sh ./hasgot -i sys/types.h -i sys/select.h; then
+  echo "sys/select.h found."
+  echo "#define HAS_SYS_SELECT_H" >> s.h
+  select_include='-i sys/select.h'
+fi
+
+has_select=no
+if sh ./hasgot select && \
+   sh ./hasgot -i sys/types.h $select_include -t fd_set ; then
+  echo "select() found."
+  echo "#define HAS_SELECT" >> s.h
+  has_select=yes
+fi
+
+if sh ./hasgot symlink readlink lstat;  then
+  echo "symlink() found."
+  echo "#define HAS_SYMLINK" >> s.h
+fi
+
+has_wait=no
+if sh ./hasgot waitpid;  then
+  echo "waitpid() found."
+  echo "#define HAS_WAITPID" >> s.h
+  has_wait=yes
+fi
+
+if sh ./hasgot wait4;  then
+  echo "wait4() found."
+  echo "#define HAS_WAIT4" >> s.h
+  has_wait=yes
+fi
+
+if sh ./hasgot -i limits.h && sh ./runtest getgroups.c; then
+  echo "getgroups() found."
+  echo "#define HAS_GETGROUPS" >> s.h
+fi
+
+if sh ./hasgot -i termios.h &&
+   sh ./hasgot tcgetattr tcsetattr tcsendbreak tcflush tcflow; then
+  echo "POSIX termios found."
+  echo "#define HAS_TERMIOS" >> s.h
+fi
+
+# Async I/O under OSF1 3.x are so buggy that the test program hangs...
+testasyncio=true
+if test -f /usr/bin/uname; then
+  case "`/usr/bin/uname -s -r`" in
+    "OSF1 V3."*) testasyncio=false;;
+  esac
+fi
+if $testasyncio && sh ./runtest async_io.c; then
+  echo "Asynchronous I/O are supported."
+  echo "#define HAS_ASYNC_IO" >> s.h
+fi
+
+has_setitimer=no
+if sh ./hasgot setitimer; then
+  echo "setitimer() found."
+  echo "#define HAS_SETITIMER" >> s.h
+  has_setitimer="yes"
+fi
+
+if sh ./hasgot gethostname; then
+  echo "gethostname() found."
+  echo "#define HAS_GETHOSTNAME" >> s.h
+fi
+
+if sh ./hasgot -i sys/utsname.h && sh ./hasgot uname; then
+  echo "uname() found."
+  echo "#define HAS_UNAME" >> s.h
+fi
+
+has_gettimeofday=no
+if sh ./hasgot gettimeofday; then
+  echo "gettimeofday() found."
+  echo "#define HAS_GETTIMEOFDAY" >> s.h
+  has_gettimeofday="yes"
+fi
+
+if sh ./hasgot mktime; then
+  echo "mktime() found."
+  echo "#define HAS_MKTIME" >> s.h
+fi
+
+case "$host" in
+  *-*-cygwin*) ;;  # setsid emulation under Cygwin breaks the debugger
+  *) if sh ./hasgot setsid; then
+       echo "setsid() found."
+       echo "#define HAS_SETSID" >> s.h
+     fi;;
+esac
+
+if sh ./hasgot putenv; then
+  echo "putenv() found."
+  echo "#define HAS_PUTENV" >> s.h
+fi
+
+if sh ./hasgot -i locale.h && sh ./hasgot setlocale; then
+  echo "setlocale() and <locale.h> found."
+  echo "#define HAS_LOCALE" >> s.h
+fi
+
+if sh ./hasgot -i mach-o/dyld.h && sh ./hasgot NSLinkModule; then
+  echo "NSLinkModule() found. Using darwin dynamic loading."
+  echo "#define HAS_NSLINKMODULE" >> s.h
+elif sh ./hasgot $dllib dlopen; then
+  echo "dlopen() found."
+elif sh ./hasgot $dllib -ldl dlopen; then
+  echo "dlopen() found in -ldl."
+  dllib="$dllib -ldl"
+else
+  shared_libraries_supported=no
+fi
+
+if $shared_libraries_supported; then
+  echo "Dynamic loading of shared libraries is supported."
+  echo "#define SUPPORT_DYNAMIC_LINKING" >> s.h
+  if $dl_needs_underscore; then
+    echo '#define DL_NEEDS_UNDERSCORE' >>s.h
+  fi
+fi
+
+if sh ./hasgot -i sys/types.h -i sys/mman.h && sh ./hasgot mmap munmap; then
+  echo "mmap() found."
+  echo "#define HAS_MMAP" >> s.h
+fi
+
+nargs=none
+for i in 5 6; do
+  if sh ./trycompile -DNUM_ARGS=${i} gethostbyname.c; then nargs=$i; break; fi
+done
+if test $nargs != "none"; then
+  echo "gethostbyname_r() found (with ${nargs} arguments)."
+  echo "#define HAS_GETHOSTBYNAME_R $nargs" >> s.h
+fi
+
+nargs=none
+for i in 7 8; do
+  if sh ./trycompile -DNUM_ARGS=${i} gethostbyaddr.c; then nargs=$i; break; fi
+done
+if test $nargs != "none"; then
+  echo "gethostbyaddr_r() found (with ${nargs} arguments)."
+  echo "#define HAS_GETHOSTBYADDR_R $nargs" >> s.h
+fi
+
+# Determine if the debugger is supported
+
+if test "$has_sockets" = "yes"; then
+  echo "Replay debugger supported."
+  debugger="ocamldebugger"
+else
+  echo "No replay debugger (missing system calls)"
+  debugger=""
+fi
+
+
+# Determine if system stack overflows can be detected
+
+case "$arch,$system" in
+  i386,linux_elf)
+    echo "System stack overflow can be detected."
+    echo "#define HAS_STACK_OVERFLOW_DETECTION" >> s.h;;
+  *)
+    echo "Cannot detect system stack overflow.";;
+esac
+
+# Determine the target architecture for the "num" library
+
+case "$host" in
+  alpha*-*-*)    bng_arch=alpha; bng_asm_level=1;;
+  i[3456]86-*-*) bng_arch=ia32
+                 if sh ./trycompile ia32sse2.c
+                 then bng_asm_level=2
+                 else bng_asm_level=1
+                 fi;;
+  mips-*-*)      bng_arch=mips; bng_asm_level=1;;
+  powerpc-*-*)   bng_arch=ppc; bng_asm_level=1;;
+  sparc*-*-*)    bng_arch=sparc; bng_asm_level=1;;
+  x86_64-*-*)    bng_arch=amd64; bng_asm_level=1;;
+  *)             bng_arch=generic; bng_asm_level=0;;
+esac
+
+echo "BNG_ARCH=$bng_arch" >> Makefile
+echo "BNG_ASM_LEVEL=$bng_asm_level" >> Makefile
+
+# Determine if the POSIX threads library is supported
+
+if test "$pthread_wanted" = "yes"; then
+  case "$host" in
+    *-*-solaris*)  pthread_link="-lpthread -lposix4";;
+    *-*-freebsd*)  pthread_link="-pthread";;
+    *-*-openbsd*)  pthread_link="-pthread";;
+    *)             pthread_link="-lpthread";;
+  esac
+  if ./hasgot -i pthread.h $pthread_link pthread_self; then
+    echo "POSIX threads library supported."
+    otherlibraries="$otherlibraries systhreads"
+    bytecccompopts="$bytecccompopts -D_REENTRANT"
+    nativecccompopts="$nativecccompopts -D_REENTRANT"
+    case "$host" in
+      *-*-freebsd*)
+          bytecccompopts="$bytecccompopts -D_THREAD_SAFE"
+          nativecccompopts="$nativecccompopts -D_THREAD_SAFE";;
+      *-*-openbsd*)
+          bytecccompopts="$bytecccompopts -pthread"
+          asppflags="$asppflags -pthread"
+          nativecccompopts="$nativecccompopts -pthread";;
+    esac
+    echo "Options for linking with POSIX threads: $pthread_link"
+    echo "PTHREAD_LINK=$pthread_link" >> Makefile
+    if sh ./hasgot $pthread_link sigwait; then
+      echo "sigwait() found"
+      echo "#define HAS_SIGWAIT" >> s.h
+    fi
+  else
+    echo "POSIX threads not found."
+    pthread_link=""
+  fi
+fi
+
+# Determine if the bytecode thread library is supported
+
+if test "$has_select" = "yes" \
+&& test "$has_setitimer" = "yes" \
+&& test "$has_gettimeofday" = "yes" \
+&& test "$has_wait" = "yes"; then
+  echo "Bytecode threads library supported."
+  otherlibraries="$otherlibraries threads"
+else
+  echo "Bytecode threads library not supported (missing system calls)"
+fi
+
+# Determine the location of X include files and libraries
+
+x11_include="not found"
+x11_link="not found"
+
+for dir in \
+    $x11_include_dir          \
+    ; \
+do
+  if test -f $dir/X11/X.h; then
+    x11_include=$dir
+    break
+  fi
+done
+
+if test "$x11_include" = "not found"; then
+  x11_try_lib_dir=''
+else
+  x11_try_lib_dir=`echo $x11_include | sed -e 's|include|lib|'`
+fi
+
+for dir in \
+    $x11_lib_dir          \
+    $x11_try_lib_dir      \
+    ; \
+do
+  if test -f $dir/libX11.a || \
+     test -f $dir/libX11.so || \
+     test -f $dir/libX11.dll.a || \
+     test -f $dir/libX11.sa; then
+    if test $dir = /usr/lib; then
+      x11_link="-lX11"
+    else
+      x11_link="-L$dir -lX11"
+      x11_libs="-L$dir"
+    fi
+    break
+  fi
+done
+
+
+if test "$x11_include" = "not found" || test "$x11_link" = "not found"
+then
+  echo "X11 not found, the \"graph\" library will not be supported."
+  x11_include=""
+else
+  echo "Location of X11 include files: $x11_include/X11"
+  echo "Options for linking with X11: $x11_link"
+  otherlibraries="$otherlibraries graph"
+  if test "$x11_include" = "/usr/include"; then
+    x11_include=""
+  else
+    x11_include="-I$x11_include"
+  fi
+  echo "X11_INCLUDES=$x11_include" >> Makefile
+  echo "X11_LINK=$x11_link" >> Makefile
+fi
+
+# See if we can compile the dbm library
+
+dbm_include="not found"
+dbm_link="not found"
+use_gdbm_ndbm=no
+
+for dir in ; do
+  if test -f $dir/ndbm.h; then
+    dbm_include=$dir
+    if sh ./hasgot dbm_open; then
+      dbm_link=""
+    elif sh ./hasgot -lndbm dbm_open; then
+      dbm_link="-lndbm"
+    elif sh ./hasgot -ldb1 dbm_open; then
+      dbm_link="-ldb1"
+    elif sh ./hasgot -lgdbm dbm_open; then
+      dbm_link="-lgdbm"
+    elif sh ./hasgot -lgdbm_compat -lgdbm dbm_open; then
+      dbm_link="-lgdbm_compat -lgdbm" 
+    fi
+    break
+  fi
+  if test -f $dir/gdbm-ndbm.h; then
+    dbm_include=$dir
+    use_gdbm_ndbm=yes
+    if sh ./hasgot -lgdbm_compat -lgdbm dbm_open; then
+      dbm_link="-lgdbm_compat -lgdbm"
+    fi
+    break   
+  fi
+done
+if test "$dbm_include" = "not found" || test "$dbm_link" = "not found"; then
+  echo "NDBM not found, the \"dbm\" library will not be supported."
+else
+  echo "NDBM found (in $dbm_include)"
+  if test "$dbm_include" = "/usr/include"; then
+    dbm_include=""
+  else
+    dbm_include="-I$dbm_include"
+  fi
+  echo "DBM_INCLUDES=$dbm_include" >> Makefile
+  echo "DBM_LINK=$dbm_link" >> Makefile
+  if test "$use_gdbm_ndbm" = "yes"; then
+    echo "#define DBM_USES_GDBM_NDBM" >> s.h
+  fi
+  otherlibraries="$otherlibraries dbm"
+fi
+
+# Look for tcl/tk
+
+echo "Configuring LablTk..."
+
+if test $tk_wanted = no; then
+  has_tk=false
+elif test $tk_x11 = no; then
+  has_tk=true
+elif test "$x11_include" = "not found" || test "$x11_link" = "not found"; then
+  echo "X11 not found."
+  has_tk=false
+else
+  tk_x11_include="$x11_include"
+  tk_x11_libs="$x11_libs -lX11"
+  has_tk=true
+fi
+
+if test $has_tk = true; then
+  tcl_version=''
+  tcl_version=`sh ./runtest $tk_defs $tk_x11_include tclversion.c`
+  if test -z "$tcl_version" && test -z "$tk_defs"; then
+    tk_defs=-I/usr/local/include
+    tcl_version=`sh ./runtest $tk_defs $tk_x11_include tclversion.c`
+  fi
+  if test -z "$tcl_version"; then
+    tk_defs="-I/usr/local/include/tcl8.2 -I/usr/local/include/tk8.2"
+    tcl_version=`sh ./runtest $tk_defs $tk_x11_include tclversion.c`
+  fi
+  if test -z "$tcl_version"; then
+    tk_defs="-I/usr/local/include/tcl8.3 -I/usr/local/include/tk8.3"
+    tcl_version=`sh ./runtest $tk_defs $tk_x11_include tclversion.c`
+  fi
+  if test -z "$tcl_version"; then
+    tk_defs="-I/usr/local/include/tcl8.4 -I/usr/local/include/tk8.4"
+    tcl_version=`sh ./runtest $tk_defs $tk_x11_include tclversion.c`
+  fi
+  if test -z "$tcl_version"; then
+    tk_defs="-I/usr/include/tcl8.2 -I/usr/include/tk8.2"
+    tcl_version=`sh ./runtest $tk_defs $tk_x11_include tclversion.c`
+  fi
+  if test -z "$tcl_version"; then
+    tk_defs="-I/usr/include/tcl8.3 -I/usr/include/tk8.3"
+    tcl_version=`sh ./runtest $tk_defs $tk_x11_include tclversion.c`
+  fi
+  if test -z "$tcl_version"; then
+    tk_defs="-I/usr/include/tcl8.4 -I/usr/include/tk8.4"
+    tcl_version=`sh ./runtest $tk_defs $tk_x11_include tclversion.c`
+  fi
+  if test -z "$tcl_version"; then
+    tk_defs="-I/sw/include"
+    tcl_version=`sh ./runtest $tk_defs $tk_x11_include tclversion.c`
+  fi
+  if test -n "$tcl_version"; then
+    echo "tcl.h version $tcl_version found with \"$tk_defs\"."
+    case $tcl_version in
+    7.5) tclmaj=7 tclmin=5 tkmaj=4 tkmin=1 ;;
+    7.6) tclmaj=7 tclmin=6 tkmaj=4 tkmin=2 ;;
+    8.0) tclmaj=8 tclmin=0 tkmaj=8 tkmin=0 ;;
+    8.1) tclmaj=8 tclmin=1 tkmaj=8 tkmin=1 ;;
+    8.2) tclmaj=8 tclmin=2 tkmaj=8 tkmin=2 ;;
+    8.3) tclmaj=8 tclmin=3 tkmaj=8 tkmin=3 ;;
+    8.4) tclmaj=8 tclmin=4 tkmaj=8 tkmin=4 ;;
+    *) echo "This version is not known."; has_tk=false ;;
+    esac
+  else
+    echo "tcl.h not found."
+    has_tk=false
+  fi
+fi
+
+if test $has_tk = true; then
+  if sh ./hasgot $tk_x11_include $tk_defs -i tk.h; then
+    echo "tk.h found."
+  else
+    echo "tk.h not found."
+    has_tk=false
+  fi
+fi
+
+tkauxlibs="$mathlib $dllib"
+tcllib=''
+tklib=''
+if test $has_tk = true; then
+  if sh ./hasgot $tk_libs $tk_x11_libs $tkauxlibs Tcl_DoOneEvent
+  then tk_libs="$tk_libs $dllib"
+  elif sh ./hasgot $tk_libs -ltcl$tclmaj.$tclmin $tkauxlibs Tcl_DoOneEvent
+  then
+    tk_libs="$tk_libs -ltk$tkmaj.$tkmin -ltcl$tclmaj.$tclmin $dllib"
+  elif sh ./hasgot $tk_libs -ltcl$tclmaj$tclmin $tkauxlibs Tcl_DoOneEvent
+  then
+    tk_libs="$tk_libs -ltk$tkmaj$tkmin -ltcl$tclmaj$tclmin $dllib"
+  elif test -z "$tk_libs" && tk_libs=-L/usr/local/lib && \
+    sh ./hasgot $tk_libs -ltcl$tclmaj.$tclmin $tkauxlibs Tcl_DoOneEvent
+  then
+    tk_libs="$tk_libs -ltk$tkmaj.$tkmin -ltcl$tclmaj.$tclmin $dllib"
+  elif sh ./hasgot $tk_libs -ltcl$tclmaj$tclmin $tkauxlibs Tcl_DoOneEvent
+  then
+    tk_libs="$tk_libs -ltk$tkmaj$tkmin -ltcl$tclmaj$tclmin $dllib"
+# elif sh ./hasgot $tk_libs -ltcl $tkauxlibs Tcl_DoOneEvent; then
+#   tk_libs="$tk_libs -ltk -ltcl"
+  elif sh ./hasgot -L/sw/lib $tk_libs -ltcl$tclmaj.$tclmin $tkauxlibs \
+                   Tcl_DoOneEvent
+  then tk_libs="-L/sw/lib -ltk$tkmaj.$tkmin -ltcl$tclmaj.$tclmin $dllib"
+  else
+    echo "Tcl library not found."
+    has_tk=false
+  fi
+fi
+if test $has_tk = true; then
+  if sh ./hasgot $tk_libs $tk_x11_libs $tkauxlibs Tk_SetGrid; then
+    echo "Tcl/Tk libraries found."
+  elif sh ./hasgot -L/sw/lib $tk_libs $tk_x11_libs $tkauxlibs Tk_SetGrid; then
+    tk_libs="-L/sw/lib $tk_libs"
+    echo "Tcl/Tk libraries found."
+  else
+    echo "Tcl library found."
+    echo "Tk library not found."
+    has_tk=false
+  fi
+fi
+
+if test $has_tk = true; then
+  if test $tk_x11 = yes; then
+    echo "TK_DEFS=$tk_defs "'$(X11_INCLUDES)' >> Makefile
+    echo "TK_LINK=$tk_libs "'$(X11_LINK)' >> Makefile
+  else
+    echo "TK_DEFS=$tk_defs" >> Makefile
+    echo "TK_LINK=$tk_libs" >> Makefile
+  fi
+  otherlibraries="$otherlibraries labltk"
+else
+  echo "Configuration failed, LablTk will not be built."
+fi
+
+# Camlp4
+
+(
+cd ../../camlp4/config
+EXE=$exe ./configure_batch -bindir "$bindir" -libdir "$libdir" -mandir "$mandir" -ocaml-top ../.. > /dev/null
+)
+
+# Final twiddling of compiler options to work around known bugs
+
+nativeccprofopts="$nativecccompopts"
+case "$buggycc" in
+  gcc.2.96)
+    bytecccompopts="$bytecccompopts -fomit-frame-pointer"
+    nativecccompopts="$nativecccompopts -fomit-frame-pointer";;
+esac
+
+# Finish generated files
+
+cclibs="$cclibs $mathlib"
+
+echo "BYTECC=$bytecc" >> Makefile
+echo "BYTECCCOMPOPTS=$bytecccompopts" >> Makefile
+echo "BYTECCLINKOPTS=$bytecclinkopts" >> Makefile
+echo "BYTECCLIBS=$cclibs $dllib $curseslibs $pthread_link" >> Makefile
+echo "BYTECCRPATH=$byteccrpath" >> Makefile
+echo "EXE=$exe" >> Makefile
+echo "SUPPORTS_SHARED_LIBRARIES=$shared_libraries_supported" >> Makefile
+echo "SHAREDCCCOMPOPTS=$sharedcccompopts" >> Makefile
+echo "MKSHAREDLIB=$mksharedlib" >> Makefile
+echo "MKSHAREDLIBRPATH=$mksharedlibrpath" >> Makefile
+echo "ARCH=$arch" >> Makefile
+echo "MODEL=$model" >> Makefile
+echo "SYSTEM=$system" >> Makefile
+echo "NATIVECC=$nativecc" >> Makefile
+echo "NATIVECCCOMPOPTS=$nativecccompopts" >> Makefile
+echo "NATIVECCPROFOPTS=$nativeccprofopts" >> Makefile
+echo "NATIVECCLINKOPTS=$nativecclinkopts" >> Makefile
+echo "NATIVECCRPATH=$nativeccrpath" >> Makefile
+echo "NATIVECCLIBS=$cclibs $dllib" >> Makefile
+echo "ASFLAGS=$asflags" >> Makefile
+echo "ASPP=$aspp" >> Makefile
+echo "ASPPFLAGS=$asppflags" >> Makefile
+echo "ASPPPROFFLAGS=$asppprofflags" >> Makefile
+echo "PROFILING=$profiling" >> Makefile
+echo "BINUTILS_OBJCOPY=$binutils_objcopy" >> Makefile
+echo "BINUTILS_NM=$binutils_nm" >> Makefile
+echo "DYNLINKOPTS=$dllib" >> Makefile
+echo "OTHERLIBRARIES=$otherlibraries" >> Makefile
+echo "DEBUGGER=$debugger" >> Makefile
+echo "CC_PROFILE=$cc_profile" >> Makefile
+
+rm -f tst hasgot.c
+rm -f ../m.h ../s.h ../Makefile
+mv m.h s.h Makefile ..
+
+# Print a summary
+
+echo
+echo "** Configuration summary **"
+echo
+echo "Directories where Objective Caml will be installed:"
+echo "        binaries.................. $bindir"
+echo "        standard library.......... $libdir"
+echo "        manual pages.............. $mandir (with extension .$manext)"
+
+echo "Configuration for the bytecode compiler:"
+echo "        C compiler used........... $bytecc"
+echo "        options for compiling..... $bytecccompopts"
+echo "        options for linking....... $bytecclinkopts $cclibs $dllib $curseslibs $pthread_link"
+if $shared_libraries_supported; then
+echo "        shared libraries are supported"
+echo "        options for compiling..... $sharedcccompopts $bytecccompopts"
+echo "        command for building...... $mksharedlib lib.so $mksharedlibrpath/a/path objs"
+else
+echo "        shared libraries not supported"
+fi
+
+echo "Configuration for the native-code compiler:"
+if test "$arch" = "none"; then
+  echo "        (not supported on this platform)"
+else
+  if test "$model" = "default"; then
+    echo "        hardware architecture..... $arch"
+  else
+    echo "        hardware architecture..... $arch ($model)"
+  fi
+  if test "$system" = "unknown"; then : ; else
+  echo "        OS variant................ $system"
+  fi
+  echo "        C compiler used........... $nativecc"
+  echo "        options for compiling..... $nativecccompopts"
+  echo "        options for linking....... $nativecclinkopts $cclibs"
+  echo "        assembler ................ \$(AS) $asflags"
+  echo "        preprocessed assembler ... $aspp $asppflags"
+  if test "$profiling" = "prof"; then
+  echo "        profiling with gprof ..... supported"
+  else
+  echo "        profiling with gprof ..... not supported"
+  fi
+  if test -n "$binutils_objcopy" && test -n "$binutils_nm"; then
+  echo "        ocamlopt -pack ........... supported"
+  else
+  echo "        ocamlopt -pack ........... not supported (no binutils)"
+  fi
+fi
+
+if test "$debugger" = "ocamldebugger"; then
+  echo "Source-level replay debugger: supported"
+else
+  echo "Source-level replay debugger: not supported"
+fi
+
+echo "Additional libraries supported:"
+echo "        $otherlibraries"
+
+echo "Configuration for the \"num\" library:"
+echo "        target architecture ...... $bng_arch (asm level $bng_asm_level)"
+
+if test "$x11_include" != "not found" && test "$x11_lib" != "not found"; then
+echo "Configuration for the \"graph\" library:"
+echo "        options for compiling .... $x11_include"
+echo "        options for linking ...... $x11_link"
+fi
+
+if test $has_tk = true; then
+echo "Configuration for the \"labltk\" library:"
+echo "        use tcl/tk version ....... $tcl_version"
+echo "        options for compiling .... $tk_defs"
+echo "        options for linking ...... $tk_libs"
+else
+echo "The \"labltk\" library: not found"
+fi
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/fix-clang-build-on-osx.diff b/nixpkgs/pkgs/development/compilers/ocaml/fix-clang-build-on-osx.diff
new file mode 100644
index 000000000000..d7d9c863858f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/fix-clang-build-on-osx.diff
@@ -0,0 +1,20 @@
+diff --git a/configure b/configure
+index d45e88f..25d872b 100755
+--- a/configure
++++ b/configure
+@@ -322,7 +322,14 @@ case "$bytecc,$target" in
+     bytecccompopts="-fno-defer-pop $gcc_warnings -DSHRINKED_GNUC"
+     mathlib="";;
+   *,*-*-darwin*)
+-    bytecccompopts="-fno-defer-pop $gcc_warnings"
++    # On recent version of OSX, gcc is a symlink to clang
++    if $bytecc --version | grep -q clang; then
++        # -fno-defer-pop is not supported by clang, and make recent
++        # versions of clang to fail
++        bytecccompopts="$gcc_warnings"
++    else
++        bytecccompopts="-fno-defer-pop $gcc_warnings"
++    fi
+     mathlib=""
+     mkexe="$mkexe -Wl,-no_compact_unwind"
+     # Tell gcc that we can use 32-bit code addresses for threaded code
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/generic.nix b/nixpkgs/pkgs/development/compilers/ocaml/generic.nix
new file mode 100644
index 000000000000..f2b61ab700da
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/generic.nix
@@ -0,0 +1,109 @@
+{ minor_version, major_version, patch_version
+, url ? null
+, sha256, ...}@args:
+let
+  versionNoPatch = "${toString major_version}.${toString minor_version}";
+  version = "${versionNoPatch}.${toString patch_version}";
+  real_url = if url == null then
+    "http://caml.inria.fr/pub/distrib/ocaml-${versionNoPatch}/ocaml-${version}.tar.xz"
+  else url;
+  safeX11 = stdenv: !(stdenv.isAarch32 || stdenv.isMips);
+in
+
+{ stdenv, fetchurl, ncurses, buildEnv
+, libX11, xorgproto, useX11 ? safeX11 stdenv && !stdenv.lib.versionAtLeast version "4.09"
+, aflSupport ? false
+, flambdaSupport ? false
+}:
+
+assert useX11 -> !stdenv.isAarch32 && !stdenv.isMips;
+assert aflSupport -> stdenv.lib.versionAtLeast version "4.05";
+assert flambdaSupport -> stdenv.lib.versionAtLeast version "4.03";
+
+let
+   useNativeCompilers = !stdenv.isMips;
+   inherit (stdenv.lib) optional optionals optionalString;
+   name = "ocaml${optionalString aflSupport "+afl"}${optionalString flambdaSupport "+flambda"}-${version}";
+in
+
+let
+  x11env = buildEnv { name = "x11env"; paths = [libX11 xorgproto]; };
+  x11lib = x11env + "/lib";
+  x11inc = x11env + "/include";
+in
+
+stdenv.mkDerivation (args // {
+
+  inherit name;
+  inherit version;
+
+  src = fetchurl {
+    url = real_url;
+    inherit sha256;
+  };
+
+  prefixKey = "-prefix ";
+  configureFlags =
+    let flags = new: old:
+      if stdenv.lib.versionAtLeast version "4.08"
+      then new else old
+    ; in
+    optionals useX11 (flags
+      [ "--x-libraries=${x11lib}" "--x-includes=${x11inc}"]
+      [ "-x11lib" x11lib "-x11include" x11inc ])
+  ++ optional aflSupport (flags "--with-afl" "-afl-instrument")
+  ++ optional flambdaSupport (flags "--enable-flambda" "-flambda")
+  ;
+
+  buildFlags = [ "world" ] ++ optionals useNativeCompilers [ "bootstrap" "world.opt" ];
+  buildInputs = optional (!stdenv.lib.versionAtLeast version "4.07") ncurses
+    ++ optionals useX11 [ libX11 xorgproto ];
+  installTargets = [ "install" ] ++ optional useNativeCompilers "installopt";
+  preConfigure = optionalString (!stdenv.lib.versionAtLeast version "4.04") ''
+    CAT=$(type -tp cat)
+    sed -e "s@/bin/cat@$CAT@" -i config/auto-aux/sharpbang
+  '';
+  postBuild = ''
+    mkdir -p $out/include
+    ln -sv $out/lib/ocaml/caml $out/include/caml
+  '';
+
+  passthru = {
+    nativeCompilers = useNativeCompilers;
+  };
+
+  meta = with stdenv.lib; {
+    homepage = "http://caml.inria.fr/ocaml";
+    branch = versionNoPatch;
+    license = with licenses; [
+      qpl /* compiler */
+      lgpl2 /* library */
+    ];
+    description = "Most popular variant of the Caml language";
+
+    longDescription =
+      ''
+        OCaml is the most popular variant of the Caml language.  From a
+        language standpoint, it extends the core Caml language with a
+        fully-fledged object-oriented layer, as well as a powerful module
+        system, all connected by a sound, polymorphic type system featuring
+        type inference.
+
+        The OCaml system is an industrial-strength implementation of this
+        language, featuring a high-performance native-code compiler (ocamlopt)
+        for 9 processor architectures (IA32, PowerPC, AMD64, Alpha, Sparc,
+        Mips, IA64, HPPA, StrongArm), as well as a bytecode compiler (ocamlc)
+        and an interactive read-eval-print loop (ocaml) for quick development
+        and portability.  The OCaml distribution includes a comprehensive
+        standard library, a replay debugger (ocamldebug), lexer (ocamllex) and
+        parser (ocamlyacc) generators, a pre-processor pretty-printer (camlp4)
+        and a documentation generator (ocamldoc).
+      '';
+
+    platforms = with platforms; linux ++ darwin;
+    broken = stdenv.isAarch64 && !stdenv.lib.versionAtLeast version "4.06";
+  };
+
+})
+
+
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/gnused-on-osx-fix.patch b/nixpkgs/pkgs/development/compilers/ocaml/gnused-on-osx-fix.patch
new file mode 100644
index 000000000000..dc2bcb869766
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/gnused-on-osx-fix.patch
@@ -0,0 +1,9 @@
+diff -Nuar ocaml-3.11.1/ocamldoc/remove_DEBUG ocaml-3.11.1-nixpkgs/ocamldoc/remove_DEBUG
+--- ocaml-3.11.1/ocamldoc/remove_DEBUG	2004-04-15 18:18:52.000000000 +0200
++++ ocaml-3.11.1-nixpkgs/ocamldoc/remove_DEBUG	2011-01-01 17:37:07.000000000 +0100
+@@ -18,4 +18,4 @@
+ # respecting the cpp # line annotation conventions
+ 
+ echo "# 1 \"$1\""
+-LC_ALL=C sed -e '/DEBUG/s/.*//' "$1"
++grep -v 'DEBUG' "$1"
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/metaocaml-3.09.nix b/nixpkgs/pkgs/development/compilers/ocaml/metaocaml-3.09.nix
new file mode 100644
index 000000000000..8459f26367e0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/metaocaml-3.09.nix
@@ -0,0 +1,34 @@
+{ stdenv, fetchurl, xlibsWrapper, ncurses }:
+
+stdenv.mkDerivation ({
+
+  pname = "metaocaml";
+  version = "3.09-alpha-30";
+
+  src = fetchurl {
+    url = "http://www.metaocaml.org/dist/old/MetaOCaml_309_alpha_030.tar.gz";
+    sha256 = "0migbn0zwfb7yb24dy7qfqi19sv3drqcv4369xi7xzpds2cs35fd";
+  };
+
+  prefixKey = "-prefix ";
+  configureFlags = ["-no-tk" "-x11lib" xlibsWrapper];
+  buildFlags = [ "world" "bootstrap" "world.opt" ];
+  buildInputs = [xlibsWrapper ncurses];
+  installTargets = "install installopt";
+  patchPhase = ''
+    CAT=$(type -tp cat)
+    sed -e "s@/bin/cat@$CAT@" -i config/auto-aux/sharpbang
+  '';
+  postBuild = ''
+    mkdir -p $out/include
+    ln -sv $out/lib/ocaml/caml $out/include/caml
+  '';
+
+  meta = {
+    homepage = "http://www.metaocaml.org/";
+    license = with stdenv.lib.licenses; [ qpl lgpl2 ];
+    description = "A compiled, type-safe, multi-stage programming language";
+    broken = true;
+  };
+
+})
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/mips64.patch b/nixpkgs/pkgs/development/compilers/ocaml/mips64.patch
new file mode 100644
index 000000000000..cdef9cafb932
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/mips64.patch
@@ -0,0 +1,240 @@
+http://caml.inria.fr/mantis/view.php?id=4849
+
+diff -bur ocaml-3.11.1/asmcomp/mips/arch.ml my_ocaml/asmcomp/mips/arch.ml
+--- asmcomp/mips/arch.ml	2002-11-29 16:03:36.000000000 +0100
++++ asmcomp/mips/arch.ml	2009-08-09 23:18:31.000000000 +0200
+@@ -35,7 +35,7 @@
+ 
+ let big_endian =
+   match Config.system with
+-    "ultrix" -> false
++    "ultrix" | "gnu" -> false
+   | "irix" -> true
+   | _ -> fatal_error "Arch_mips.big_endian"
+ 
+diff -bur ocaml-3.11.1/asmcomp/mips/emit.mlp my_ocaml/asmcomp/mips/emit.mlp
+--- asmcomp/mips/emit.mlp	2004-01-05 21:25:56.000000000 +0100
++++ asmcomp/mips/emit.mlp	2009-08-23 12:11:58.000000000 +0200
+@@ -58,7 +58,7 @@
+     !stack_offset +
+     4 * num_stack_slots.(0) + 8 * num_stack_slots.(1) +
+     (if !contains_calls then if !uses_gp then 8 else 4 else 0) in
+-  Misc.align size 16
++  Misc.align size 16	(* n32 require quadword alignment *)
+ 
+ let slot_offset loc cl =
+   match loc with
+@@ -252,7 +252,7 @@
+     | Lop(Icall_ind) ->
+         `	move	$25, {emit_reg i.arg.(0)}\n`;
+         liveregs i live_25;
+-        `	jal	{emit_reg i.arg.(0)}\n`;
++        `	jal	$25\n`; (* {emit_reg i.arg.(0)}\n; Equivalent but avoids "Warning: MIPS PIC call to register other than $25" on GNU as *)
+         `{record_frame i.live}\n`
+     | Lop(Icall_imm s) ->
+         liveregs i 0;
+@@ -269,7 +269,7 @@
+         liveregs i 0;
+         `	move	$25, {emit_reg i.arg.(0)}\n`;
+         liveregs i live_25;
+-        `	j	{emit_reg i.arg.(0)}\n`
++        `	j	$25\n`
+     | Lop(Itailcall_imm s) ->
+         if s = !function_name then begin
+           `	b	{emit_label !tailrec_entry_point}\n`
+@@ -277,11 +277,11 @@
+           let n = frame_size() in
+           if !contains_calls then
+             `	lw	$31, {emit_int(n - 4)}($sp)\n`;
++          `	la	$25, {emit_symbol s}\n`;	(* Rxd: put before gp restore *)
+           if !uses_gp then
+             `	lw	$gp, {emit_int(n - 8)}($sp)\n`;
+           if n > 0 then
+             `	addu	$sp, $sp, {emit_int n}\n`;
+-          `	la	$25, {emit_symbol s}\n`;
+           liveregs i live_25;
+           `	j	$25\n`
+         end
+@@ -305,8 +305,13 @@
+         begin match chunk with
+           Double_u ->
+             (* Destination is not 8-aligned, hence cannot use l.d *)
++            if big_endian then begin
+             `	ldl	$24, {emit_addressing addr i.arg 0}\n`;
+-            `	ldr	$24, {emit_addressing (offset_addressing addr 7) i.arg 0}\n`;
++              `	ldr	$24, {emit_addressing (offset_addressing addr 7) i.arg 0}\n`
++            end else begin
++              `	ldl	$24, {emit_addressing (offset_addressing addr 7) i.arg 0}\n`;
++              `	ldr	$24, {emit_addressing addr i.arg 0}\n`
++            end;
+             `	dmtc1	$24, {emit_reg dest}\n`
+         | Single ->
+             `	l.s	{emit_reg dest}, {emit_addressing addr i.arg 0}\n`;
+@@ -328,8 +333,13 @@
+           Double_u ->
+             (* Destination is not 8-aligned, hence cannot use l.d *)
+             `	dmfc1	$24, {emit_reg src}\n`;
++            if big_endian then begin
+             `	sdl	$24, {emit_addressing addr i.arg 1}\n`;
+             `	sdr	$24, {emit_addressing (offset_addressing addr 7) i.arg 1}\n`
++            end else begin
++              `	sdl	$24, {emit_addressing (offset_addressing addr 7) i.arg 1}\n`;
++              `	sdr	$24, {emit_addressing addr i.arg 1}\n`
++            end
+         | Single ->
+             `	cvt.s.d	$f31, {emit_reg src}\n`;
+             `	s.s	$f31, {emit_addressing addr i.arg 1}\n`
+@@ -552,6 +562,7 @@
+   (* There are really two groups of registers:
+       $sp and $30 always point to stack locations
+       $2 - $21 never point to stack locations. *)
++  if Config.system = "irix" then begin
+   `	.noalias $2,$sp;  .noalias $2,$30;  .noalias $3,$sp;  .noalias $3,$30\n`;
+   `	.noalias $4,$sp;  .noalias $4,$30;  .noalias $5,$sp;  .noalias $5,$30\n`;
+   `	.noalias $6,$sp;  .noalias $6,$30;  .noalias $7,$sp;  .noalias $7,$30\n`;
+@@ -561,7 +572,8 @@
+   `	.noalias $14,$sp; .noalias $14,$30; .noalias $15,$sp; .noalias $15,$30\n`;
+   `	.noalias $16,$sp; .noalias $16,$30; .noalias $17,$sp; .noalias $17,$30\n`;
+   `	.noalias $18,$sp; .noalias $18,$30; .noalias $19,$sp; .noalias $19,$30\n`;
+-  `	.noalias $20,$sp; .noalias $20,$30; .noalias $21,$sp; .noalias $21,$30\n\n`;
++    `	.noalias $20,$sp; .noalias $20,$30; .noalias $21,$sp; .noalias $21,$30\n\n`
++  end;
+   let lbl_begin = Compilenv.make_symbol (Some "data_begin") in
+   `	.data\n`;
+   `	.globl	{emit_symbol lbl_begin}\n`;
+diff -bur ocaml-3.11.1/asmrun/mips.s my_ocaml/asmrun/mips.s
+--- asmrun/mips.s	2004-07-13 14:18:53.000000000 +0200
++++ asmrun/mips.s	2009-08-20 09:34:36.000000000 +0200
+@@ -187,7 +187,7 @@
+         sw      $30, caml_exception_pointer
+     /* Call C function */
+         move    $25, $24
+-        jal     $24
++        jal     $25	/* Rxd: $24 replaced by $25 to avoid this "Warning: MIPS PIC call to register other than $25" ? */
+     /* Reload return address, alloc ptr, alloc limit */
+         lw      $31, 0($16)     /* caml_last_return_address */
+         lw      $22, 0($17)     /* caml_young_ptr */
+@@ -254,7 +254,7 @@
+         sw      $0, caml_last_return_address
+     /* Call the Caml code */
+         move    $25, $24
+-        jal     $24
++        jal     $25	/* Rxd: 24 replaced by 25 */
+ $104:
+     /* Pop the trap frame, restoring caml_exception_pointer */
+         lw      $24, 0($sp)
+@@ -384,3 +384,8 @@
+         .word   $104            /* return address into callback */
+         .half   -1              /* negative frame size => use callback link */
+         .half   0               /* no roots here */
++
++#if defined(SYS_linux)
++    /* Mark stack as non-executable, PR#4564 */
++        .section .note.GNU-stack,"",%progbits
++#endif
+diff -bur ocaml-3.11.1/configure my_ocaml/configure
+--- configure	2009-05-20 17:33:09.000000000 +0200
++++ configure	2009-08-23 10:55:44.000000000 +0200
+@@ -40,7 +40,7 @@
+ verbose=no
+ withcurses=yes
+ withsharedlibs=yes
+-gcc_warnings="-Wall"
++gcc_warnings="-W -Wall"
+ partialld="ld -r"
+ 
+ # Try to turn internationalization off, can cause config.guess to malfunction!
+@@ -292,6 +292,9 @@
+     # (For those who want to force "cc -64")
+     # Turn off warning "unused library"
+     bytecclinkopts="-Wl,-woff,84";;
++  gcc*,mips64el-*)
++    bytecccompopts=""
++    bytecclinkopts="-fno-defer-pop $gcc_warnings -Wl,-O1 -Wl,--as-needed";;
+   *,alpha*-*-unicos*)
+     # For the Cray T3E
+     bytecccompopts="-DUMK";;
+@@ -468,6 +471,8 @@
+         echo "64-bit integers must be doubleword-aligned."
+         echo "#define ARCH_ALIGN_INT64" >> m.h
+       fi;;
++    mips64el-*)
++    	echo "#define ARCH_ALIGN_INT64" >> m.h;;
+     *)
+       sh ./runtest int64align.c
+       case $? in
+@@ -636,6 +641,7 @@
+                                 fi;;
+   i[3456]86-*-gnu*)             arch=i386; system=gnu;;
+   mips-*-irix6*)                arch=mips; system=irix;;
++  mips*-gnu*)                   arch=mips; system=gnu;;
+   hppa1.1-*-hpux*)              arch=hppa; system=hpux;;
+   hppa2.0*-*-hpux*)             arch=hppa; system=hpux;;
+   hppa*-*-linux*)               arch=hppa; system=linux;;
+@@ -672,7 +678,7 @@
+ if test -z "$ccoption"; then
+   case "$arch,$system,$cc" in
+     alpha,digital,gcc*) nativecc=cc;;
+-    mips,*,gcc*) nativecc=cc;;
++    mips,irix,gcc*) nativecc=cc;;
+     *) nativecc="$bytecc";;
+   esac
+ else
+@@ -687,6 +693,9 @@
+   alpha,cc*,digital,*) nativecccompopts=-std1;;
+   mips,cc*,irix,*)     nativecccompopts=-n32
+                        nativecclinkopts="-n32 -Wl,-woff,84";;
++  mips,gcc*,gnu,mips64el-*)
++                       nativecccompopts="$gcc_warnings -fPIC"
++                       nativecclinkopts="--as-needed";;
+   *,*,nextstep,*)      nativecccompopts="$gcc_warnings -U__GNUC__ -posix"
+                        nativecclinkopts="-posix";;
+   *,*,rhapsody,*darwin[1-5].*)
+@@ -725,6 +734,8 @@
+                     aspp='gcc -c -Wa,-xexplicit';;
+   mips,*,irix)      as='as -n32 -O2 -nocpp -g0'
+                     aspp='as -n32 -O2';;
++  mips,*,gnu)       as='as -KPIC'
++                    aspp='gcc -c -fPIC';;	# got bus error without fPIC ?
+   power,*,elf)      as='as -u -m ppc'
+                     aspp='gcc -c';;
+   power,*,bsd)      as='as'
+@@ -756,6 +767,7 @@
+     case "$nativecc" in gcc*) ;; *) cc_profile='-xpg';; esac;;
+   amd64,*,linux) profiling='prof';;
+   amd64,*,gnu) profiling='prof';;
++  mips,*,gnu) profiling='prof';;
+   *) profiling='noprof';;
+ esac
+ 
+diff -bur ocaml-3.11.1/asmcomp/mips/proc.ml my_ocaml/asmcomp/mips/proc.ml
+--- asmcomp/mips/proc.ml	2007-10-30 13:37:16.000000000 +0100
++++ asmcomp/mips/proc.ml	2010-03-18 08:08:06.000000000 +0100
+@@ -114,7 +114,7 @@
+           incr int
+         end else begin
+           loc.(i) <- stack_slot (make_stack !ofs) ty;
+-          ofs := !ofs + size_int
++          ofs := !ofs + 8
+         end
+     | Float ->
+         if !float <= last_float then begin
+@@ -143,7 +143,7 @@
+    or float regs $f12...$f19.  Each argument "consumes" both one slot
+    in the int register file and one slot in the float register file.
+    Extra arguments are passed on stack, in a 64-bits slot, right-justified
+-   (i.e. at +4 from natural address). *)   
++   (i.e. at +4 from natural address for big endians). *)   
+ 
+ let loc_external_arguments arg =
+   let loc = Array.create (Array.length arg) Reg.dummy in
+@@ -158,7 +158,7 @@
+     end else begin
+       begin match arg.(i).typ with
+         Float -> loc.(i) <- stack_slot (Outgoing !ofs) Float
+-      | ty    -> loc.(i) <- stack_slot (Outgoing (!ofs + 4)) ty
++      | ty    -> loc.(i) <- stack_slot (Outgoing (!ofs + (if big_endian then 4 else 0))) ty
+       end;
+       ofs := !ofs + 8
+     end
+ 
diff --git a/nixpkgs/pkgs/development/compilers/ocaml/ocamlbuild.patch b/nixpkgs/pkgs/development/compilers/ocaml/ocamlbuild.patch
new file mode 100644
index 000000000000..d153fb67d419
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ocaml/ocamlbuild.patch
@@ -0,0 +1,45 @@
+Author: Vincent Laporte <Vincent.Laporte@gmail.com>
+Date:   Sun Feb 1 11:19:50 2015 +0100
+
+    ocamlbuild: use ocamlfind to discover camlp4 path
+    
+    and default to `+camlp4`
+
+diff --git a/ocamlbuild/ocaml_specific.ml b/ocamlbuild/ocaml_specific.ml
+index b902810..a73b7a5 100644
+--- a/ocamlbuild/ocaml_specific.ml
++++ b/ocamlbuild/ocaml_specific.ml
+@@ -698,15 +698,25 @@ ocaml_lib ~extern:true ~tag_name:"use_toplevel" "toplevellib";;
+ ocaml_lib ~extern:true ~dir:"+ocamldoc" "ocamldoc";;
+ ocaml_lib ~extern:true ~dir:"+ocamlbuild" ~tag_name:"use_ocamlbuild" "ocamlbuildlib";;
+ 
+-ocaml_lib ~extern:true ~dir:"+camlp4" ~tag_name:"use_camlp4" "camlp4lib";;
+-ocaml_lib ~extern:true ~dir:"+camlp4" ~tag_name:"use_old_camlp4" "camlp4";;
+-ocaml_lib ~extern:true ~dir:"+camlp4" ~tag_name:"use_camlp4_full" "camlp4fulllib";;
++let camlp4dir =
++  Findlib.(
++    try
++      if sys_command "sh -c 'ocamlfind list >/dev/null' 2>/dev/null" != 0
++      then raise (Findlib_error Cannot_run_ocamlfind);
++      (query "camlp4").location
++    with Findlib_error _ ->
++      "+camlp4"
++  );;
++
++ocaml_lib ~extern:true ~dir:camlp4dir ~tag_name:"use_camlp4" "camlp4lib";;
++ocaml_lib ~extern:true ~dir:camlp4dir ~tag_name:"use_old_camlp4" "camlp4";;
++ocaml_lib ~extern:true ~dir:camlp4dir ~tag_name:"use_camlp4_full" "camlp4fulllib";;
+ flag ["ocaml"; "compile"; "use_camlp4_full"]
+-     (S[A"-I"; A"+camlp4/Camlp4Parsers";
+-        A"-I"; A"+camlp4/Camlp4Printers";
+-        A"-I"; A"+camlp4/Camlp4Filters"]);;
+-flag ["ocaml"; "use_camlp4_bin"; "link"; "byte"] (A"+camlp4/Camlp4Bin.cmo");;
+-flag ["ocaml"; "use_camlp4_bin"; "link"; "native"] (A"+camlp4/Camlp4Bin.cmx");;
++     (S[A"-I"; A(camlp4dir^"/Camlp4Parsers");
++        A"-I"; A(camlp4dir^"/Camlp4Printers");
++        A"-I"; A(camlp4dir^"/Camlp4Filters")]);;
++flag ["ocaml"; "use_camlp4_bin"; "link"; "byte"] (A(camlp4dir^"/Camlp4Bin.cmo"));;
++flag ["ocaml"; "use_camlp4_bin"; "link"; "native"] (A(camlp4dir^"/Camlp4Bin.cmx"));;
+ 
+ flag ["ocaml"; "debug"; "compile"; "byte"] (A "-g");;
+ flag ["ocaml"; "debug"; "link"; "byte"; "program"] (A "-g");;
diff --git a/nixpkgs/pkgs/development/compilers/opa/default.nix b/nixpkgs/pkgs/development/compilers/opa/default.nix
new file mode 100644
index 000000000000..c20e0d0ef991
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/opa/default.nix
@@ -0,0 +1,74 @@
+{ stdenv, fetchFromGitHub, which, perl, jdk
+, ocamlPackages, openssl
+, coreutils, zlib, ncurses, makeWrapper
+, gcc, binutils, gnumake, nodejs
+}:
+
+stdenv.mkDerivation rec {
+  pname = "opa";
+  version = "4310";
+
+  src = fetchFromGitHub {
+    owner = "MLstate";
+    repo = "opalang";
+    rev = "a13d45af30bc955c40c4b320353fb21e4ecacbc5";
+    sha256 = "1qs91rq9xrafv2mf2v415k8lv91ab3ycz0xkpjh1mng5ca3pjlf3";
+  };
+
+  # Paths so the opa compiler code generation will use the same programs as were
+  # used to build opa.
+  codeGeneratorPaths = stdenv.lib.makeBinPath [ ocamlPackages.ocaml gcc binutils gnumake nodejs ];
+
+  preConfigure = ''
+    patchShebangs .
+    (
+    cat ./compiler/buildinfos/buildInfos.ml.pre
+    ./compiler/buildinfos/generate_buildinfos.sh . --release --version ./compiler/buildinfos/version_major.txt 
+    echo let opa_git_version = ${version}
+    echo 'let opa_git_sha = "xxxx"'
+    cat ./compiler/buildinfos/buildInfos.ml.post
+    )> ./compiler/buildinfos/buildInfos.ml
+    for p in configure tools/platform_helper.sh
+    do
+      substituteInPlace $p --replace 'IS_MAC=1' 'IS_LINUX=1'
+    done
+    export CAMLP4O=${ocamlPackages.camlp4}/bin/camlp4o
+    export CAMLP4ORF=${ocamlPackages.camlp4}/bin/camlp4orf
+  '';
+
+  prefixKey = "-prefix ";
+
+  configureFlags = [ "-ocamlfind ${ocamlPackages.findlib}/bin/ocamlfind" ];
+
+  buildInputs = [ which perl jdk openssl coreutils zlib ncurses
+    makeWrapper gcc binutils gnumake nodejs
+  ] ++ (with ocamlPackages; [
+    ocaml findlib ssl cryptokit camlzip ulex ocamlgraph camlp4
+  ]);
+
+  NIX_LDFLAGS = stdenv.lib.optionalString (!stdenv.isDarwin) "-lgcc_s";
+
+  postInstall = ''
+    # Have compiler use same tools for code generation as used to build it.
+    for p in $out/bin/opa ; do
+      wrapProgram $p --prefix PATH ":" "${codeGeneratorPaths}" ;
+    done
+
+    # Install emacs mode.
+    mkdir -p $out/share/emacs/site-lisp/opa
+    install -m 0644 -v ./tools/editors/emacs/{opa-mode.el,site-start.el} $out/share/emacs/site-lisp/opa
+  '';
+
+  meta = {
+    description = "A concise and elegant language for writing distributed web applications";
+    longDescription = ''
+      Opa is a new generation of web development platform that lets you write distributed
+      web applications using a single technology. Among the the many features of Opa are these:
+      Opa is concise, simple, concurrent, dynamically distributed, and secure.
+    '';
+    homepage = "http://opalang.org/";
+    license = stdenv.lib.licenses.gpl3;
+    maintainers = [ stdenv.lib.maintainers.kkallio ];
+    platforms = with stdenv.lib.platforms; unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/open-watcom-bin/default.nix b/nixpkgs/pkgs/development/compilers/open-watcom-bin/default.nix
new file mode 100644
index 000000000000..a9c6b221065c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/open-watcom-bin/default.nix
@@ -0,0 +1,122 @@
+{ stdenvNoCC, fetchurl, qemu, expect, writeScript, writeScriptBin, ncurses, bash, coreutils }:
+
+let
+
+  # We execute all OpenWatcom binaries in qemu-user, because otherwise
+  # some binaries (most notably the installer itself and wlib) fail to
+  # use the stat() systemcall. The failure mode is that it returns
+  # EOVERFLOW for completely legitimate requests. This seems like an
+  # incompatibility of new Linux kernels to run this ancient binary.
+  wrapLegacyBinary = writeScript "wrapLegacyBinary" ''
+    #!${bash}/bin/bash
+
+    set -eu
+
+    if [ $# -ne 2 ]; then
+       echo "Usage: $0 unwrapped-binary wrapped-binary"
+       exit 1
+    fi
+
+    IN="$(${coreutils}/bin/realpath $1)"
+    OUT="$2"
+    ARGV0="$(basename $2)"
+
+    cat > "$OUT" <<EOF
+    #!${bash}/bin/bash
+
+    TERMINFO=${ncurses}/share/terminfo TERM=vt100 exec ${qemu}/bin/qemu-i386 -0 $ARGV0 $IN "\$@"
+    EOF
+
+    chmod +x "$OUT"
+  '';
+
+  wrapInPlace = writeScriptBin "wrapInPlace" ''
+    #!${bash}/bin/bash
+
+    set -eu
+
+    if [ $# -ne 1 ]; then
+       echo "Usage: $0 unwrapped-binary"
+       exit 1
+    fi
+
+    TARGET="$1"
+
+    mv "$TARGET" "$TARGET-unwrapped"
+    chmod +x "$TARGET-unwrapped"
+
+    exec ${wrapLegacyBinary} "$TARGET-unwrapped" "$TARGET"
+  '';
+
+  # Do a scripted installation of OpenWatcom with its original installer.
+  #
+  # If maintaining this expect script turns out to be too much of a
+  # hassle, we can switch to just using `unzip' on the installer and
+  # the correct file permissions manually.
+  performInstall = writeScriptBin "performInstall" ''
+    #!${expect}/bin/expect -f
+
+    spawn [lindex $argv 0]
+
+    # Wait for button saying "I agree" with escape sequences.
+    expect "gree"
+
+    # Navigate to "I Agree!" and hit enter.
+    send "\t\t\n"
+
+    expect "Install Open Watcom"
+
+    # Where do we want to install to.
+    send "$env(out)\n"
+
+    expect "will be installed"
+
+    # Select Full Installation, Next
+    send "fn"
+
+    expect "Setup will now copy"
+
+    # Next
+    send "n"
+
+    expect "completed successfully"
+    send "\n"
+  '';
+
+in
+stdenvNoCC.mkDerivation rec {
+  pname = "open-watcom-bin";
+  version = "1.9";
+
+  src = fetchurl {
+    url = "http://ftp.openwatcom.org/install/open-watcom-c-linux-${version}";
+    sha256 = "1wzkvc6ija0cjj5mcyjng5b7hnnc5axidz030c0jh05pgvi4nj7p";
+  };
+
+  nativeBuildInputs = [ wrapInPlace performInstall ];
+
+  dontUnpack = true;
+  dontConfigure = true;
+
+  buildPhase = ''
+    cp ${src} install-bin-unwrapped
+    wrapInPlace install-bin-unwrapped
+  '';
+
+  installPhase = ''
+    performInstall ./install-bin-unwrapped
+
+    for e in $(find $out/binl -type f -executable); do
+      echo "Wrapping $e"
+      wrapInPlace "$e"
+    done
+  '';
+
+  meta = with stdenvNoCC.lib; {
+    description = "A C/C++ Compiler (binary distribution)";
+    homepage = "http://www.openwatcom.org/";
+    license = licenses.watcom;
+    platforms = [ "x86_64-linux" "i686-linux" ];
+    maintainers = [ maintainers.blitz ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/opendylan/bin.nix b/nixpkgs/pkgs/development/compilers/opendylan/bin.nix
new file mode 100644
index 000000000000..dbe7e44b1d78
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/opendylan/bin.nix
@@ -0,0 +1,42 @@
+# Binaries provided by Open Dylan to be used to bootstrap from source.
+# The binaries can also be used as is.
+{stdenv, fetchurl, patchelf, boehmgc, gnused, gcc, makeWrapper}:
+
+stdenv.mkDerivation {
+  name = "opendylan-2013.2";
+
+  src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl {
+      url = "https://opendylan.org/downloads/opendylan/2013.2/opendylan-2013.2-x86_64-linux.tar.bz2";
+      sha256 = "035brbw3hm7zrs593q4zc42yglj1gmmkw3b1r7zzlw3ks4i2lg7h";
+    }
+    else if stdenv.hostPlatform.system == "i686-linux" then fetchurl {
+      url = "https://opendylan.org/downloads/opendylan/2013.2/opendylan-2013.2-x86-linux.tar.bz2";
+      sha256 = "0c61ihvblcsjrw6ncr8x8ylhskcrqs8pajs4mg5di36cvqw12nq5";
+    }
+    else throw "platform ${stdenv.hostPlatform.system} not supported.";
+
+  nativeBuildInputs = [ patchelf boehmgc gnused makeWrapper ];
+
+  buildCommand = ''
+    mkdir -p "$out"
+    tar --strip-components=1 -xjf "$src" -C "$out"
+
+    interpreter="$(cat "$NIX_CC"/nix-support/dynamic-linker)"
+    for a in "$out"/bin/*; do 
+      patchelf --set-interpreter "$interpreter" "$a"
+      patchelf --set-rpath "$out/lib:${boehmgc.out}/lib" "$a"
+    done
+    for a in "$out"/lib/*.so; do 
+      patchelf --set-rpath "$out/lib:${boehmgc.out}/lib" "$a"
+    done
+    sed -i -e "s|\-lgc|\-L${boehmgc.out}\/lib -lgc|" $out/lib/config.jam
+    wrapProgram $out/bin/dylan-compiler --suffix PATH : ${gcc}/bin
+  '';
+
+  meta = {
+    homepage = "https://opendylan.org";
+    description = "A multi-paradigm functional and object-oriented programming language";
+    license = stdenv.lib.licenses.mit;
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/opendylan/default.nix b/nixpkgs/pkgs/development/compilers/opendylan/default.nix
new file mode 100644
index 000000000000..5abc40cc3bb5
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/opendylan/default.nix
@@ -0,0 +1,40 @@
+# Build Open Dylan from source using the binary builds to bootstrap.
+{stdenv, fetchgit, boehmgc, mps, gnused, opendylan-bootstrap, autoconf, automake, perl, makeWrapper, gcc }:
+
+stdenv.mkDerivation {
+  name = "opendylan-2016.1pre";
+
+  src = fetchgit {
+    url = "https://github.com/dylan-lang/opendylan";
+    rev = "cd9a8395586d33cc43a8611c1dc0513e69ee82dd";
+    sha256 = "00r1dm7mjy5p4hfm13vc4b6qryap40zinia3y15rhvalc3i2np4b";
+    fetchSubmodules = true;
+  };
+
+  buildInputs = (if stdenv.hostPlatform.system == "i686-linux" then [ mps ] else [ boehmgc ]) ++ [
+    opendylan-bootstrap boehmgc gnused autoconf automake perl makeWrapper
+  ];
+
+  preConfigure = if stdenv.hostPlatform.system == "i686-linux" then ''
+    mkdir -p $TMPDIR/mps
+    tar --strip-components=1 -xf ${mps.src} -C $TMPDIR/mps
+    ./autogen.sh
+  ''
+  else ''
+    ./autogen.sh
+  '';
+
+  configureFlags = [
+    (if stdenv.hostPlatform.system == "i686-linux" then "--with-mps=$(TMPDIR)/mps" else "--with-gc=${boehmgc.out}")
+  ];
+  buildPhase = "make 3-stage-bootstrap";
+
+  postInstall = "wrapProgram $out/bin/dylan-compiler --suffix PATH : ${gcc}/bin";
+
+  meta = {
+    homepage = "https://opendylan.org";
+    description = "A multi-paradigm functional and object-oriented programming language";
+    license = stdenv.lib.licenses.mit;
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/11.nix b/nixpkgs/pkgs/development/compilers/openjdk/11.nix
new file mode 100644
index 000000000000..ef496f5f7c52
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/11.nix
@@ -0,0 +1,147 @@
+{ stdenv, lib, fetchurl, bash, pkgconfig, autoconf, cpio, file, which, unzip
+, zip, perl, cups, freetype, alsaLib, libjpeg, giflib, libpng, zlib, lcms2
+, libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama
+, libXcursor, libXrandr, fontconfig, openjdk11-bootstrap
+, setJavaClassPath
+, headless ? false
+, enableJavaFX ? openjfx.meta.available, openjfx
+, enableGnome2 ? true, gtk3, gnome_vfs, glib, GConf
+}:
+
+let
+  major = "11";
+  update = ".0.6";
+  build = "ga";
+
+  openjdk = stdenv.mkDerivation rec {
+    pname = "openjdk" + lib.optionalString headless "-headless";
+    version = "${major}${update}-${build}";
+
+    src = fetchurl {
+      url = "http://hg.openjdk.java.net/jdk-updates/jdk${major}u/archive/jdk-${version}.tar.gz";
+      sha256 = "1w6n0cnz9izpjb3sc870q7a0jz85a6c7fiszymxin10cnsajkzir";
+    };
+
+    nativeBuildInputs = [ pkgconfig autoconf ];
+    buildInputs = [
+      cpio file which unzip zip perl zlib cups freetype alsaLib libjpeg giflib
+      libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst
+      libXi libXinerama libXcursor libXrandr fontconfig openjdk11-bootstrap
+    ] ++ lib.optionals (!headless && enableGnome2) [
+      gtk3 gnome_vfs GConf glib
+    ];
+
+    patches = [
+      ./fix-java-home-jdk10.patch
+      ./read-truststore-from-env-jdk10.patch
+      ./currency-date-range-jdk10.patch
+      ./increase-javadoc-heap.patch
+    ] ++ lib.optionals (!headless && enableGnome2) [
+      ./swing-use-gtk-jdk10.patch
+    ];
+
+    preConfigure = ''
+      chmod +x configure
+      substituteInPlace configure --replace /bin/bash "${bash}/bin/bash"
+    '';
+
+    configureFlags = [
+      "--with-boot-jdk=${openjdk11-bootstrap.home}"
+      "--enable-unlimited-crypto"
+      "--with-native-debug-symbols=internal"
+      "--with-libjpeg=system"
+      "--with-giflib=system"
+      "--with-libpng=system"
+      "--with-zlib=system"
+      "--with-lcms=system"
+      "--with-stdc++lib=dynamic"
+    ] ++ lib.optional stdenv.isx86_64 "--with-jvm-features=zgc"
+      ++ lib.optional headless "--enable-headless-only"
+      ++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
+
+    separateDebugInfo = true;
+
+    NIX_CFLAGS_COMPILE = "-Wno-error";
+
+    NIX_LDFLAGS = toString (lib.optionals (!headless) [
+      "-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic"
+    ] ++ lib.optionals (!headless && enableGnome2) [
+      "-lgtk-3" "-lgio-2.0" "-lgnomevfs-2" "-lgconf-2"
+    ]);
+
+    buildFlags = [ "all" ];
+
+    installPhase = ''
+      mkdir -p $out/lib
+
+      mv build/*/images/jdk $out/lib/openjdk
+
+      # Remove some broken manpages.
+      rm -rf $out/lib/openjdk/man/ja*
+
+      # Mirror some stuff in top-level.
+      mkdir -p $out/share
+      ln -s $out/lib/openjdk/include $out/include
+      ln -s $out/lib/openjdk/man $out/share/man
+
+      # jni.h expects jni_md.h to be in the header search path.
+      ln -s $out/include/linux/*_md.h $out/include/
+
+      # Remove crap from the installation.
+      rm -rf $out/lib/openjdk/demo
+      ${lib.optionalString headless ''
+        rm $out/lib/openjdk/lib/{libjsound,libfontmanager}.so
+      ''}
+
+      ln -s $out/lib/openjdk/bin $out/bin
+    '';
+
+    preFixup = ''
+      # Propagate the setJavaClassPath setup hook so that any package
+      # that depends on the JDK has $CLASSPATH set up properly.
+      mkdir -p $out/nix-support
+      #TODO or printWords?  cf https://github.com/NixOS/nixpkgs/pull/27427#issuecomment-317293040
+      echo -n "${setJavaClassPath}" > $out/nix-support/propagated-build-inputs
+
+      # Set JAVA_HOME automatically.
+      mkdir -p $out/nix-support
+      cat <<EOF > $out/nix-support/setup-hook
+      if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out/lib/openjdk; fi
+      EOF
+    '';
+
+    postFixup = ''
+      # Build the set of output library directories to rpath against
+      LIBDIRS=""
+      for output in $outputs; do
+        if [ "$output" = debug ]; then continue; fi
+        LIBDIRS="$(find $(eval echo \$$output) -name \*.so\* -exec dirname {} \+ | sort | uniq | tr '\n' ':'):$LIBDIRS"
+      done
+      # Add the local library paths to remove dependencies on the bootstrap
+      for output in $outputs; do
+        if [ "$output" = debug ]; then continue; fi
+        OUTPUTDIR=$(eval echo \$$output)
+        BINLIBS=$(find $OUTPUTDIR/bin/ -type f; find $OUTPUTDIR -name \*.so\*)
+        echo "$BINLIBS" | while read i; do
+          patchelf --set-rpath "$LIBDIRS:$(patchelf --print-rpath "$i")" "$i" || true
+          patchelf --shrink-rpath "$i" || true
+        done
+      done
+    '';
+
+    disallowedReferences = [ openjdk11-bootstrap ];
+
+    meta = with stdenv.lib; {
+      homepage = "http://openjdk.java.net/";
+      license = licenses.gpl2;
+      description = "The open-source Java Development Kit";
+      maintainers = with maintainers; [ edwtjo ];
+      platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
+    };
+
+    passthru = {
+      architecture = "";
+      home = "${openjdk}/lib/openjdk";
+    };
+  };
+in openjdk
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/12.nix b/nixpkgs/pkgs/development/compilers/openjdk/12.nix
new file mode 100644
index 000000000000..16c2fd766bce
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/12.nix
@@ -0,0 +1,155 @@
+{ stdenv, lib, fetchurl, bash, pkgconfig, autoconf, cpio, file, which, unzip
+, zip, perl, cups, freetype, alsaLib, libjpeg, giflib, libpng, zlib, lcms2
+, libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama
+, libXcursor, libXrandr, fontconfig, openjdk11
+, setJavaClassPath
+, headless ? false
+, enableJavaFX ? openjfx.meta.available, openjfx
+, enableGnome2 ? true, gtk3, gnome_vfs, glib, GConf
+}:
+
+let
+  major = "12";
+  update = ".0.2";
+  build = "ga";
+
+  openjdk = stdenv.mkDerivation rec {
+    pname = "openjdk" + lib.optionalString headless "-headless";
+    version = "${major}${update}-${build}";
+
+    src = fetchurl {
+      url = "http://hg.openjdk.java.net/jdk-updates/jdk${major}u/archive/jdk-${version}.tar.gz";
+      sha256 = "1ndlxmikyy298z7lqpr1bd0zxq7yx6xidj8y3c8mw9m9fy64h9c7";
+    };
+
+    nativeBuildInputs = [ pkgconfig autoconf ];
+    buildInputs = [
+      cpio file which unzip zip perl zlib cups freetype alsaLib libjpeg giflib
+      libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst
+      libXi libXinerama libXcursor libXrandr fontconfig openjdk11
+    ] ++ lib.optionals (!headless && enableGnome2) [
+      gtk3 gnome_vfs GConf glib
+    ];
+
+    patches = [
+      ./fix-java-home-jdk10.patch
+      ./read-truststore-from-env-jdk10.patch
+      ./currency-date-range-jdk10.patch
+      ./increase-javadoc-heap.patch
+      # -Wformat etc. are stricter in newer gccs, per
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79677
+      # so grab the work-around from
+      # https://src.fedoraproject.org/rpms/java-openjdk/pull-request/24
+      (fetchurl {
+        url = "https://src.fedoraproject.org/rpms/java-openjdk/raw/06c001c7d87f2e9fe4fedeef2d993bcd5d7afa2a/f/rh1673833-remove_removal_of_wformat_during_test_compilation.patch";
+        sha256 = "082lmc30x64x583vqq00c8y0wqih3y4r0mp1c4bqq36l22qv6b6r";
+      })
+    ] ++ lib.optionals (!headless && enableGnome2) [
+      ./swing-use-gtk-jdk10.patch
+    ];
+
+    prePatch = ''
+      chmod +x configure
+      patchShebangs --build configure
+    '';
+
+    configureFlags = [
+      "--with-boot-jdk=${openjdk11.home}"
+      "--enable-unlimited-crypto"
+      "--with-native-debug-symbols=internal"
+      "--with-libjpeg=system"
+      "--with-giflib=system"
+      "--with-libpng=system"
+      "--with-zlib=system"
+      "--with-lcms=system"
+      "--with-stdc++lib=dynamic"
+    ] ++ lib.optional stdenv.isx86_64 "--with-jvm-features=zgc"
+      ++ lib.optional headless "--enable-headless-only"
+      ++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
+
+    separateDebugInfo = true;
+
+    NIX_CFLAGS_COMPILE = [ "-Wno-error" ];
+
+    NIX_LDFLAGS = lib.optionals (!headless) [
+      "-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic"
+    ] ++ lib.optionals (!headless && enableGnome2) [
+      "-lgtk-3" "-lgio-2.0" "-lgnomevfs-2" "-lgconf-2"
+    ];
+
+    buildFlags = [ "all" ];
+
+    installPhase = ''
+      mkdir -p $out/lib
+
+      mv build/*/images/jdk $out/lib/openjdk
+
+      # Remove some broken manpages.
+      rm -rf $out/lib/openjdk/man/ja*
+
+      # Mirror some stuff in top-level.
+      mkdir -p $out/share
+      ln -s $out/lib/openjdk/include $out/include
+      ln -s $out/lib/openjdk/man $out/share/man
+
+      # jni.h expects jni_md.h to be in the header search path.
+      ln -s $out/include/linux/*_md.h $out/include/
+
+      # Remove crap from the installation.
+      rm -rf $out/lib/openjdk/demo
+      ${lib.optionalString headless ''
+        rm $out/lib/openjdk/lib/{libjsound,libfontmanager}.so
+      ''}
+
+      ln -s $out/lib/openjdk/bin $out/bin
+    '';
+
+    preFixup = ''
+      # Propagate the setJavaClassPath setup hook so that any package
+      # that depends on the JDK has $CLASSPATH set up properly.
+      mkdir -p $out/nix-support
+      #TODO or printWords?  cf https://github.com/NixOS/nixpkgs/pull/27427#issuecomment-317293040
+      echo -n "${setJavaClassPath}" > $out/nix-support/propagated-build-inputs
+
+      # Set JAVA_HOME automatically.
+      mkdir -p $out/nix-support
+      cat <<EOF > $out/nix-support/setup-hook
+      if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out/lib/openjdk; fi
+      EOF
+    '';
+
+    postFixup = ''
+      # Build the set of output library directories to rpath against
+      LIBDIRS=""
+      for output in $outputs; do
+        if [ "$output" = debug ]; then continue; fi
+        LIBDIRS="$(find $(eval echo \$$output) -name \*.so\* -exec dirname {} \+ | sort | uniq | tr '\n' ':'):$LIBDIRS"
+      done
+      # Add the local library paths to remove dependencies on the bootstrap
+      for output in $outputs; do
+        if [ "$output" = debug ]; then continue; fi
+        OUTPUTDIR=$(eval echo \$$output)
+        BINLIBS=$(find $OUTPUTDIR/bin/ -type f; find $OUTPUTDIR -name \*.so\*)
+        echo "$BINLIBS" | while read i; do
+          patchelf --set-rpath "$LIBDIRS:$(patchelf --print-rpath "$i")" "$i" || true
+          patchelf --shrink-rpath "$i" || true
+        done
+      done
+    '';
+
+    disallowedReferences = [ openjdk11 ];
+
+    meta = with stdenv.lib; {
+      homepage = "http://openjdk.java.net/";
+      license = licenses.gpl2;
+      description = "The open-source Java Development Kit";
+      maintainers = with maintainers; [ edwtjo ];
+      platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
+    };
+
+    passthru = {
+      architecture = "";
+      home = "${openjdk}/lib/openjdk";
+    };
+  };
+in openjdk
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/13.nix b/nixpkgs/pkgs/development/compilers/openjdk/13.nix
new file mode 100644
index 000000000000..b3842ba7cad2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/13.nix
@@ -0,0 +1,155 @@
+{ stdenv, lib, fetchurl, bash, pkgconfig, autoconf, cpio, file, which, unzip
+, zip, perl, cups, freetype, alsaLib, libjpeg, giflib, libpng, zlib, lcms2
+, libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama
+, libXcursor, libXrandr, fontconfig, openjdk13-bootstrap
+, setJavaClassPath
+, headless ? false
+, enableJavaFX ? openjfx.meta.available, openjfx
+, enableGnome2 ? true, gtk3, gnome_vfs, glib, GConf
+}:
+
+let
+  major = "13";
+  update = ".0.2";
+  build = "-ga";
+
+  openjdk = stdenv.mkDerivation rec {
+    pname = "openjdk" + lib.optionalString headless "-headless";
+    version = "${major}${update}${build}";
+
+    src = fetchurl {
+      url = "http://hg.openjdk.java.net/jdk-updates/jdk${major}u/archive/jdk-${version}.tar.gz";
+      sha256 = "1871ziss7ny19rw8f7bay5vznmhpqbfi4ihn3yygs06wyxhm0zmv";
+    };
+
+    nativeBuildInputs = [ pkgconfig autoconf ];
+    buildInputs = [
+      cpio file which unzip zip perl zlib cups freetype alsaLib libjpeg giflib
+      libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst
+      libXi libXinerama libXcursor libXrandr fontconfig openjdk13-bootstrap
+    ] ++ lib.optionals (!headless && enableGnome2) [
+      gtk3 gnome_vfs GConf glib
+    ];
+
+    patches = [
+      ./fix-java-home-jdk10.patch
+      ./read-truststore-from-env-jdk10.patch
+      ./currency-date-range-jdk10.patch
+      ./increase-javadoc-heap-jdk13.patch
+      # -Wformat etc. are stricter in newer gccs, per
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79677
+      # so grab the work-around from
+      # https://src.fedoraproject.org/rpms/java-openjdk/pull-request/24
+      (fetchurl {
+        url = "https://src.fedoraproject.org/rpms/java-openjdk/raw/06c001c7d87f2e9fe4fedeef2d993bcd5d7afa2a/f/rh1673833-remove_removal_of_wformat_during_test_compilation.patch";
+        sha256 = "082lmc30x64x583vqq00c8y0wqih3y4r0mp1c4bqq36l22qv6b6r";
+      })
+    ] ++ lib.optionals (!headless && enableGnome2) [
+      ./swing-use-gtk-jdk13.patch
+    ];
+
+    prePatch = ''
+      chmod +x configure
+      patchShebangs --build configure
+    '';
+
+    configureFlags = [
+      "--with-boot-jdk=${openjdk13-bootstrap.home}"
+      "--enable-unlimited-crypto"
+      "--with-native-debug-symbols=internal"
+      "--with-libjpeg=system"
+      "--with-giflib=system"
+      "--with-libpng=system"
+      "--with-zlib=system"
+      "--with-lcms=system"
+      "--with-stdc++lib=dynamic"
+    ] ++ lib.optional stdenv.isx86_64 "--with-jvm-features=zgc"
+      ++ lib.optional headless "--enable-headless-only"
+      ++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
+
+    separateDebugInfo = true;
+
+    NIX_CFLAGS_COMPILE = "-Wno-error";
+
+    NIX_LDFLAGS = toString (lib.optionals (!headless) [
+      "-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic"
+    ] ++ lib.optionals (!headless && enableGnome2) [
+      "-lgtk-3" "-lgio-2.0" "-lgnomevfs-2" "-lgconf-2"
+    ]);
+
+    buildFlags = [ "all" ];
+
+    installPhase = ''
+      mkdir -p $out/lib
+
+      mv build/*/images/jdk $out/lib/openjdk
+
+      # Remove some broken manpages.
+      rm -rf $out/lib/openjdk/man/ja*
+
+      # Mirror some stuff in top-level.
+      mkdir -p $out/share
+      ln -s $out/lib/openjdk/include $out/include
+      ln -s $out/lib/openjdk/man $out/share/man
+
+      # jni.h expects jni_md.h to be in the header search path.
+      ln -s $out/include/linux/*_md.h $out/include/
+
+      # Remove crap from the installation.
+      rm -rf $out/lib/openjdk/demo
+      ${lib.optionalString headless ''
+        rm $out/lib/openjdk/lib/{libjsound,libfontmanager}.so
+      ''}
+
+      ln -s $out/lib/openjdk/bin $out/bin
+    '';
+
+    preFixup = ''
+      # Propagate the setJavaClassPath setup hook so that any package
+      # that depends on the JDK has $CLASSPATH set up properly.
+      mkdir -p $out/nix-support
+      #TODO or printWords?  cf https://github.com/NixOS/nixpkgs/pull/27427#issuecomment-317293040
+      echo -n "${setJavaClassPath}" > $out/nix-support/propagated-build-inputs
+
+      # Set JAVA_HOME automatically.
+      mkdir -p $out/nix-support
+      cat <<EOF > $out/nix-support/setup-hook
+      if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out/lib/openjdk; fi
+      EOF
+    '';
+
+    postFixup = ''
+      # Build the set of output library directories to rpath against
+      LIBDIRS=""
+      for output in $outputs; do
+        if [ "$output" = debug ]; then continue; fi
+        LIBDIRS="$(find $(eval echo \$$output) -name \*.so\* -exec dirname {} \+ | sort | uniq | tr '\n' ':'):$LIBDIRS"
+      done
+      # Add the local library paths to remove dependencies on the bootstrap
+      for output in $outputs; do
+        if [ "$output" = debug ]; then continue; fi
+        OUTPUTDIR=$(eval echo \$$output)
+        BINLIBS=$(find $OUTPUTDIR/bin/ -type f; find $OUTPUTDIR -name \*.so\*)
+        echo "$BINLIBS" | while read i; do
+          patchelf --set-rpath "$LIBDIRS:$(patchelf --print-rpath "$i")" "$i" || true
+          patchelf --shrink-rpath "$i" || true
+        done
+      done
+    '';
+
+    disallowedReferences = [ openjdk13-bootstrap ];
+
+    meta = with stdenv.lib; {
+      homepage = "http://openjdk.java.net/";
+      license = licenses.gpl2;
+      description = "The open-source Java Development Kit";
+      maintainers = with maintainers; [ edwtjo ];
+      platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
+    };
+
+    passthru = {
+      architecture = "";
+      home = "${openjdk}/lib/openjdk";
+    };
+  };
+in openjdk
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/8.nix b/nixpkgs/pkgs/development/compilers/openjdk/8.nix
new file mode 100644
index 000000000000..828df621b6f1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/8.nix
@@ -0,0 +1,272 @@
+{ stdenv, lib, fetchurl, pkgconfig, lndir, bash, cpio, file, which, unzip, zip
+, cups, freetype, alsaLib, cacert, perl, liberation_ttf, fontconfig, zlib
+, libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama, libXcursor, libXrandr
+, libjpeg, giflib
+, openjdk8-bootstrap
+, setJavaClassPath
+, headless ? false
+, enableGnome2 ? true, gtk2, gnome_vfs, glib, GConf
+}:
+
+let
+
+  /**
+   * The JRE libraries are in directories that depend on the CPU.
+   */
+  architecture = {
+    i686-linux = "i386";
+    x86_64-linux = "amd64";
+    aarch64-linux = "aarch64";
+  }.${stdenv.system} or (throw "Unsupported platform");
+
+  update = "242";
+  build = "b08";
+  baseurl = if stdenv.isAarch64 then "https://hg.openjdk.java.net/aarch64-port/jdk8u-shenandoah"
+            else "https://hg.openjdk.java.net/jdk8u/jdk8u";
+  repover = lib.optionalString stdenv.isAarch64 "aarch64-shenandoah-"
+            + "jdk8u${update}-${build}";
+
+  jdk8 = fetchurl {
+             name = "jdk8-${repover}.tar.gz";
+             url = "${baseurl}/archive/${repover}.tar.gz";
+             sha256 = if stdenv.isAarch64 then "0qpmr267qcxhmw398zbl1axd161yxn4k4hfz1jlxlmdvg70p7h90"
+                      else "1crs4hmzmgm6fkwfq0d3xz9lph0nd33fngrqv2rz1mkkqcrjx18z";
+          };
+  langtools = fetchurl {
+             name = "langtools-${repover}.tar.gz";
+             url = "${baseurl}/langtools/archive/${repover}.tar.gz";
+             sha256 = if stdenv.isAarch64 then "1rhhi4kgmxvnyl3ic5p008p1n7zyji5nw99blm1lr5fw7ry7df24"
+                      else "1aaxd1rl7dlk4kxdivvqvripsbn0d5vny0jvjksycsm97vrfiry4";
+          };
+  hotspot = fetchurl {
+             name = "hotspot-${repover}.tar.gz";
+             url = "${baseurl}/hotspot/archive/${repover}.tar.gz";
+             sha256 = if stdenv.isAarch64 then "0lphrhjqlavd6qlkh7h4sd2bqf5gd0cchkcnvy87703fbd7gy5ii"
+                      else "18i4if16zikgda9k5bgqyx0p2104db23zlnclq512178z0p9yycb";
+          };
+  corba = fetchurl {
+             name = "corba-${repover}.tar.gz";
+             url = "${baseurl}/corba/archive/${repover}.tar.gz";
+             sha256 = if stdenv.isAarch64 then "18h0v566v420d00na6x4jrs41v4aa39byk15fi8k6dcn0dmirhvg"
+                      else "1298k8p2dsj7xc4h2ayk5nl4ssrcgncn06ysyqrmnwrb8gj8s1w4";
+          };
+  jdk = fetchurl {
+             name = "jdk-${repover}.tar.gz";
+             url = "${baseurl}/jdk/archive/${repover}.tar.gz";
+             sha256 = if stdenv.isAarch64 then "0xxy7rkj8ah263nnzkd4mg9dai5qix3l9cyilm47dig5hv7g8aq0"
+                      else "0vqlbks3cy3cnmnrnhbjkqinvp8bcy2h96xvx81cvlza4s2hszvz";
+          };
+  jaxws = fetchurl {
+             name = "jaxws-${repover}.tar.gz";
+             url = "${baseurl}/jaxws/archive/${repover}.tar.gz";
+             sha256 = if stdenv.isAarch64 then "0ajqm2l9g5w5ag5s4vl4ldpbm99pqa6d342hrzvv7psqn3zf6ar5"
+                      else "1wg9fbiz09arj0llavnzrmbhw8nx0dw8dcjkrzxw78rj1cadflzc";
+          };
+  jaxp = fetchurl {
+             name = "jaxp-${repover}.tar.gz";
+             url = "${baseurl}/jaxp/archive/${repover}.tar.gz";
+             sha256 = if stdenv.isAarch64 then "03zjh6xvza05abxz9d9j2w9xndw9n07f8lrn6dymj7f4imals831"
+                      else "1i5xrk8r8pcgnc68zrgp3hd1a1nzcm99swpmdnlb424qlg5nnrcf";
+          };
+  nashorn = fetchurl {
+             name = "nashorn-${repover}.tar.gz";
+             url = "${baseurl}/nashorn/archive/${repover}.tar.gz";
+             sha256 = if stdenv.isAarch64 then "0n809w264ndxksva9c81x0m1fsyg8c627w571f72xxxl9c1bnrmp"
+                      else "0qlxaz7sriy709vcyzz48s2v4p5h4d31my33whip018c4j5gkfqq";
+          };
+  openjdk8 = stdenv.mkDerivation {
+    pname = "openjdk" + lib.optionalString headless "-headless";
+    version = "8u${update}-${build}";
+
+    srcs = [ jdk8 langtools hotspot corba jdk jaxws jaxp nashorn ];
+    sourceRoot = ".";
+
+    outputs = [ "out" "jre" ];
+
+    nativeBuildInputs = [ pkgconfig lndir ];
+    buildInputs = [
+      cpio file which unzip zip perl openjdk8-bootstrap zlib cups freetype alsaLib
+      libjpeg giflib libX11 libICE libXext libXrender libXtst libXt libXtst
+      libXi libXinerama libXcursor libXrandr fontconfig
+    ] ++ lib.optionals (!headless && enableGnome2) [
+      gtk2 gnome_vfs GConf glib
+    ];
+
+    # move the seven other source dirs under the main jdk8u directory,
+    # with version suffixes removed, as the remainder of the build will expect
+    prePatch = ''
+      mainDir=$(find . -maxdepth 1 -name jdk8u\*);
+      find . -maxdepth 1 -name \*jdk\* -not -name jdk8u\* | awk -F- '{print $1}' | while read p; do
+        mv $p-* $mainDir/$p
+      done
+      cd $mainDir
+    '';
+
+    patches = [
+      ./fix-java-home-jdk8.patch
+      ./read-truststore-from-env-jdk8.patch
+      ./currency-date-range-jdk8.patch
+    ] ++ lib.optionals (!headless && enableGnome2) [
+      ./swing-use-gtk-jdk8.patch
+    ];
+
+    # Hotspot cares about the host(!) version otherwise
+    DISABLE_HOTSPOT_OS_VERSION_CHECK = "ok";
+
+    preConfigure = ''
+      chmod +x configure
+      substituteInPlace configure --replace /bin/bash "${bash}/bin/bash"
+      substituteInPlace hotspot/make/linux/adlc_updater --replace /bin/sh "${stdenv.shell}"
+      substituteInPlace hotspot/make/linux/makefiles/dtrace.make --replace /usr/include/sys/sdt.h "/no-such-path"
+    '';
+
+    configureFlags = [
+      "--with-boot-jdk=${openjdk8-bootstrap.home}"
+      "--with-update-version=${update}"
+      "--with-build-number=${build}"
+      "--with-milestone=fcs"
+      "--enable-unlimited-crypto"
+      "--with-native-debug-symbols=internal"
+      "--disable-freetype-bundling"
+      "--with-zlib=system"
+      "--with-giflib=system"
+      "--with-stdc++lib=dynamic"
+    ] ++ lib.optional headless "--disable-headful";
+
+    separateDebugInfo = true;
+
+    NIX_CFLAGS_COMPILE = toString ([
+      # glibc 2.24 deprecated readdir_r so we need this
+      # See https://www.mail-archive.com/openembedded-devel@lists.openembedded.org/msg49006.html
+      "-Wno-error=deprecated-declarations"
+    ] ++ lib.optionals stdenv.cc.isGNU [
+      # https://bugzilla.redhat.com/show_bug.cgi?id=1306558
+      # https://github.com/JetBrains/jdk8u/commit/eaa5e0711a43d64874111254d74893fa299d5716
+      "-fno-lifetime-dse"
+      "-fno-delete-null-pointer-checks"
+      "-std=gnu++98"
+      "-Wno-error"
+    ]);
+
+    NIX_LDFLAGS= toString (lib.optionals (!headless) [
+      "-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic"
+    ] ++ lib.optionals (!headless && enableGnome2) [
+      "-lgtk-x11-2.0" "-lgio-2.0" "-lgnomevfs-2" "-lgconf-2"
+    ]);
+
+    buildFlags = [ "all" ];
+
+    doCheck = false; # fails with "No rule to make target 'y'."
+
+    installPhase = ''
+      mkdir -p $out/lib
+
+      mv build/*/images/j2sdk-image $out/lib/openjdk
+
+      # Remove some broken manpages.
+      rm -rf $out/lib/openjdk/man/ja*
+
+      # Mirror some stuff in top-level.
+      mkdir -p $out/share
+      ln -s $out/lib/openjdk/include $out/include
+      ln -s $out/lib/openjdk/man $out/share/man
+
+      # jni.h expects jni_md.h to be in the header search path.
+      ln -s $out/include/linux/*_md.h $out/include/
+
+      # Remove crap from the installation.
+      rm -rf $out/lib/openjdk/demo $out/lib/openjdk/sample
+      ${lib.optionalString headless ''
+        rm $out/lib/openjdk/jre/lib/${architecture}/{libjsound,libjsoundalsa,libsplashscreen,libawt*,libfontmanager}.so
+        rm $out/lib/openjdk/jre/bin/policytool
+        rm $out/lib/openjdk/bin/{policytool,appletviewer}
+      ''}
+
+      # Move the JRE to a separate output
+      mkdir -p $jre/lib/openjdk
+      mv $out/lib/openjdk/jre $jre/lib/openjdk/jre
+      mkdir $out/lib/openjdk/jre
+      lndir $jre/lib/openjdk/jre $out/lib/openjdk/jre
+
+      # Make sure cmm/*.pf are not symlinks:
+      # https://youtrack.jetbrains.com/issue/IDEA-147272
+      rm -rf $out/lib/openjdk/jre/lib/cmm
+      ln -s {$jre,$out}/lib/openjdk/jre/lib/cmm
+
+      # Setup fallback fonts
+      ${lib.optionalString (!headless) ''
+        mkdir -p $jre/lib/openjdk/jre/lib/fonts
+        ln -s ${liberation_ttf}/share/fonts/truetype $jre/lib/openjdk/jre/lib/fonts/fallback
+      ''}
+
+      # Remove duplicate binaries.
+      for i in $(cd $out/lib/openjdk/bin && echo *); do
+        if [ "$i" = java ]; then continue; fi
+        if cmp -s $out/lib/openjdk/bin/$i $jre/lib/openjdk/jre/bin/$i; then
+          ln -sfn $jre/lib/openjdk/jre/bin/$i $out/lib/openjdk/bin/$i
+        fi
+      done
+
+      # Generate certificates.
+      (
+        cd $jre/lib/openjdk/jre/lib/security
+        rm cacerts
+        perl ${./generate-cacerts.pl} $jre/lib/openjdk/jre/bin/keytool ${cacert}/etc/ssl/certs/ca-bundle.crt
+      )
+
+      ln -s $out/lib/openjdk/bin $out/bin
+      ln -s $jre/lib/openjdk/jre/bin $jre/bin
+      ln -s $jre/lib/openjdk/jre $out/jre
+    '';
+
+    propagatedBuildInputs = [ setJavaClassPath ];
+
+    preFixup = ''
+      # Propagate the setJavaClassPath setup hook from the JRE so that
+      # any package that depends on the JRE has $CLASSPATH set up
+      # properly.
+      mkdir -p $jre/nix-support
+      printWords ${setJavaClassPath} > $jre/nix-support/propagated-build-inputs
+
+      # Set JAVA_HOME automatically.
+      mkdir -p $out/nix-support
+      cat <<EOF > $out/nix-support/setup-hook
+      if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out/lib/openjdk; fi
+      EOF
+    '';
+
+    postFixup = ''
+      # Build the set of output library directories to rpath against
+      LIBDIRS=""
+      for output in $outputs; do
+        if [ "$output" = debug ]; then continue; fi
+        LIBDIRS="$(find $(eval echo \$$output) -name \*.so\* -exec dirname {} \+ | sort | uniq | tr '\n' ':'):$LIBDIRS"
+      done
+      # Add the local library paths to remove dependencies on the bootstrap
+      for output in $outputs; do
+        if [ "$output" = debug ]; then continue; fi
+        OUTPUTDIR=$(eval echo \$$output)
+        BINLIBS=$(find $OUTPUTDIR/bin/ -type f; find $OUTPUTDIR -name \*.so\*)
+        echo "$BINLIBS" | while read i; do
+          patchelf --set-rpath "$LIBDIRS:$(patchelf --print-rpath "$i")" "$i" || true
+          patchelf --shrink-rpath "$i" || true
+        done
+      done
+    '';
+
+    disallowedReferences = [ openjdk8-bootstrap ];
+
+    meta = with lib; {
+      homepage = "http://openjdk.java.net/";
+      license = licenses.gpl2;
+      description = "The open-source Java Development Kit";
+      maintainers = with maintainers; [ edwtjo nequissimus ];
+      platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" ];
+    };
+
+    passthru = {
+      inherit architecture;
+      home = "${openjdk8}/lib/openjdk";
+    };
+  };
+in openjdk8
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/bootstrap.nix b/nixpkgs/pkgs/development/compilers/openjdk/bootstrap.nix
new file mode 100644
index 000000000000..e58888cc9ed8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/bootstrap.nix
@@ -0,0 +1,40 @@
+{ stdenv
+, runCommand, fetchurl, zlib
+
+, version
+}:
+
+assert stdenv.hostPlatform.libc == "glibc";
+
+let
+  fetchboot = version: arch: sha256: fetchurl {
+    name = "openjdk${version}-bootstrap-${arch}-linux.tar.xz";
+    url  = "http://tarballs.nixos.org/openjdk/2018-03-31/${version}/${arch}-linux.tar.xz";
+    inherit sha256;
+  };
+
+  src = if stdenv.hostPlatform.system == "x86_64-linux" then
+    (if version == "10"    then fetchboot "10" "x86_64" "08085fsxc1qhqiv3yi38w8lrg3vm7s0m2yvnwr1c92v019806yq2"
+    else if version == "8" then fetchboot "8"  "x86_64" "18zqx6jhm3lizn9hh6ryyqc9dz3i96pwaz8f6nxfllk70qi5gvks"
+    else throw "No bootstrap jdk for version ${version}")
+  else if stdenv.hostPlatform.system == "i686-linux" then
+    (if version == "10"    then fetchboot "10" "i686" "1blb9gyzp8gfyggxvggqgpcgfcyi00ndnnskipwgdm031qva94p7"
+    else if version == "8" then fetchboot "8"  "i686" "1yx04xh8bqz7amg12d13rw5vwa008rav59mxjw1b9s6ynkvfgqq9"
+    else throw "No bootstrap for version")
+  else throw "No bootstrap jdk for system ${stdenv.hostPlatform.system}";
+
+  bootstrap = runCommand "openjdk-bootstrap" {
+    passthru.home = "${bootstrap}/lib/openjdk";
+  } ''
+    tar xvf ${src}
+    mv openjdk-bootstrap $out
+
+    LIBDIRS="$(find $out -name \*.so\* -exec dirname {} \; | sort | uniq | tr '\n' ':')"
+
+    find "$out" -type f -print0 | while IFS= read -r -d "" elf; do
+      isELF "$elf" || continue
+      patchelf --set-interpreter $(cat "${stdenv.cc}/nix-support/dynamic-linker") "$elf" || true
+      patchelf --set-rpath "${stdenv.cc.libc}/lib:${stdenv.cc.cc.lib}/lib:${zlib}/lib:$LIBDIRS" "$elf" || true
+    done
+  '';
+in bootstrap
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/currency-date-range-jdk10.patch b/nixpkgs/pkgs/development/compilers/openjdk/currency-date-range-jdk10.patch
new file mode 100644
index 000000000000..e058eff07466
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/currency-date-range-jdk10.patch
@@ -0,0 +1,13 @@
+--- ./make/jdk/src/classes/build/tools/generatecurrencydata/GenerateCurrencyData.java
++++ ./make/jdk/src/classes/build/tools/generatecurrencydata/GenerateCurrencyData.java
+@@ -281,8 +281,8 @@
+             checkCurrencyCode(newCurrency);
+             String timeString = currencyInfo.substring(4, length - 4);
+             long time = format.parse(timeString).getTime();
+-            if (Math.abs(time - System.currentTimeMillis()) > ((long) 10) * 365 * 24 * 60 * 60 * 1000) {
+-                throw new RuntimeException("time is more than 10 years from present: " + time);
++            if (Math.abs(time - System.currentTimeMillis()) > ((long) 20) * 365 * 24 * 60 * 60 * 1000) {
++                throw new RuntimeException("time is more than 20 years from present: " + time);
+             }
+             specialCaseCutOverTimes[specialCaseCount] = time;
+             specialCaseOldCurrencies[specialCaseCount] = oldCurrency;
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/currency-date-range-jdk8.patch b/nixpkgs/pkgs/development/compilers/openjdk/currency-date-range-jdk8.patch
new file mode 100644
index 000000000000..2ff0fcc3d411
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/currency-date-range-jdk8.patch
@@ -0,0 +1,14 @@
+diff -Naur openjdk-7u65-b32-upstream/jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java openjdk-7u65-b32/jdk/make/tools/src/build/tools/generatecurrencydata/GenerateCurrencyData.java
+--- openjdk-7u65-b32-upstream/jdk/make/src/classes/build/tools/generatecurrencydata/GenerateCurrencyData.java	2014-07-17 05:42:14.000000000 -0430
++++ openjdk-7u65-b32/jdk/make/src/classes/build/tools/generatecurrencydata/GenerateCurrencyData.java	2014-12-30 10:15:50.327905933 -0430
+@@ -281,8 +281,8 @@
+             checkCurrencyCode(newCurrency);
+             String timeString = currencyInfo.substring(4, length - 4);
+             long time = format.parse(timeString).getTime();
+-            if (Math.abs(time - System.currentTimeMillis()) > ((long) 10) * 365 * 24 * 60 * 60 * 1000) {
+-                throw new RuntimeException("time is more than 10 years from present: " + time);
++            if (Math.abs(time - System.currentTimeMillis()) > ((long) 20) * 365 * 24 * 60 * 60 * 1000) {
++                throw new RuntimeException("time is more than 20 years from present: " + time);
+             }
+             specialCaseCutOverTimes[specialCaseCount] = time;
+             specialCaseOldCurrencies[specialCaseCount] = oldCurrency;
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/darwin/11.nix b/nixpkgs/pkgs/development/compilers/openjdk/darwin/11.nix
new file mode 100644
index 000000000000..0b659b95aa8b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/darwin/11.nix
@@ -0,0 +1,61 @@
+{ stdenv, fetchurl, unzip, setJavaClassPath, freetype }:
+let
+  jce-policies = fetchurl {
+    # Ugh, unversioned URLs... I hope this doesn't change often enough to cause pain before we move to a Darwin source build of OpenJDK!
+    url    = "http://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip";
+    sha256 = "0nk7m0lgcbsvldq2wbfni2pzq8h818523z912i7v8hdcij5s48c0";
+  };
+
+  jdk = stdenv.mkDerivation rec {
+    name = "zulu11.2.3-jdk11.0.1";
+
+    src = fetchurl {
+      url = "https://cdn.azul.com/zulu/bin/${name}-macosx_x64.tar.gz";
+      sha256 = "1jxnxmy79inwf3146ygry1mzv3dj6yrzqll16j7dpr91x1p3dpqy";
+      curlOpts = "-H Referer:https://www.azul.com/downloads/zulu/zulu-mac/";
+    };
+
+    buildInputs = [ unzip freetype ];
+
+    installPhase = ''
+      mkdir -p $out
+      mv * $out
+
+      unzip ${jce-policies}
+      mv -f ZuluJCEPolicies/*.jar $out/lib/security/
+
+      # jni.h expects jni_md.h to be in the header search path.
+      ln -s $out/include/darwin/*_md.h $out/include/
+
+      if [ -f $out/LICENSE ]; then
+        install -D $out/LICENSE $out/share/zulu/LICENSE
+        rm $out/LICENSE
+      fi
+    '';
+
+    preFixup = ''
+      # Propagate the setJavaClassPath setup hook from the JDK so that
+      # any package that depends on the JDK has $CLASSPATH set up
+      # properly.
+      mkdir -p $out/nix-support
+      printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
+
+      install_name_tool -change /usr/X11/lib/libfreetype.6.dylib ${freetype}/lib/libfreetype.6.dylib $out/lib/libfontmanager.dylib
+
+      # Set JAVA_HOME automatically.
+      cat <<EOF >> $out/nix-support/setup-hook
+      if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
+      EOF
+    '';
+
+    passthru = {
+      home = jdk;
+    };
+
+    meta = with stdenv.lib; {
+      license = licenses.gpl2;
+      platforms = platforms.darwin;
+    };
+
+  };
+in jdk
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/darwin/8.nix b/nixpkgs/pkgs/development/compilers/openjdk/darwin/8.nix
new file mode 100644
index 000000000000..8afaf90f9437
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/darwin/8.nix
@@ -0,0 +1,65 @@
+{ stdenv, fetchurl, unzip, setJavaClassPath, freetype }:
+let
+  jce-policies = fetchurl {
+    # Ugh, unversioned URLs... I hope this doesn't change often enough to cause pain before we move to a Darwin source build of OpenJDK!
+    url    = "http://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip";
+    sha256 = "0nk7m0lgcbsvldq2wbfni2pzq8h818523z912i7v8hdcij5s48c0";
+  };
+
+  jdk = stdenv.mkDerivation {
+    # @hlolli: Later version than 1.8.0_202 throws error when building jvmci.
+    # dyld: lazy symbol binding failed: Symbol not found: _JVM_BeforeHalt
+    # Referenced from: ../libjava.dylib Expected in: .../libjvm.dylib
+    name = "zulu1.8.0_202-8.36.0.1";
+
+    src = fetchurl {
+      url = "https://cdn.azul.com/zulu/bin/zulu8.36.0.1-ca-jdk8.0.202-macosx_x64.zip";
+      sha256 = "0s92l1wlf02vjx8dvrsla2kq7qwxnmgh325b38mgqy872016jm9p";
+      curlOpts = "-H Referer:https://www.azul.com/downloads/zulu/zulu-linux/";
+    };
+
+    buildInputs = [ unzip freetype ];
+
+    installPhase = ''
+      mkdir -p $out
+      mv * $out
+
+      unzip ${jce-policies}
+      mv -f ZuluJCEPolicies/*.jar $out/jre/lib/security/
+
+      # jni.h expects jni_md.h to be in the header search path.
+      ln -s $out/include/darwin/*_md.h $out/include/
+
+      if [ -f $out/LICENSE ]; then
+        install -D $out/LICENSE $out/share/zulu/LICENSE
+        rm $out/LICENSE
+      fi
+    '';
+
+    preFixup = ''
+      # Propagate the setJavaClassPath setup hook from the JRE so that
+      # any package that depends on the JRE has $CLASSPATH set up
+      # properly.
+      mkdir -p $out/nix-support
+      printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
+
+      install_name_tool -change /usr/X11/lib/libfreetype.6.dylib ${freetype}/lib/libfreetype.6.dylib $out/jre/lib/libfontmanager.dylib
+
+      # Set JAVA_HOME automatically.
+      cat <<EOF >> $out/nix-support/setup-hook
+      if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
+      EOF
+    '';
+
+    passthru = {
+      jre = jdk;
+      home = jdk;
+    };
+
+    meta = with stdenv.lib; {
+      license = licenses.gpl2;
+      platforms = platforms.darwin;
+    };
+
+  };
+in jdk
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/darwin/default.nix b/nixpkgs/pkgs/development/compilers/openjdk/darwin/default.nix
new file mode 100644
index 000000000000..c6498cb45302
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/darwin/default.nix
@@ -0,0 +1,61 @@
+{ stdenv, fetchurl, unzip, setJavaClassPath, freetype }:
+let
+  jce-policies = fetchurl {
+    # Ugh, unversioned URLs... I hope this doesn't change often enough to cause pain before we move to a Darwin source build of OpenJDK!
+    url    = "http://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip";
+    sha256 = "0nk7m0lgcbsvldq2wbfni2pzq8h818523z912i7v8hdcij5s48c0";
+  };
+
+  jdk = stdenv.mkDerivation rec {
+    name = "zulu14.28.21-ca-jdk14.0.1";
+
+    src = fetchurl {
+      url = "https://cdn.azul.com/zulu/bin/${name}-macosx_x64.tar.gz";
+      sha256 = "1pc0y3fxhlf42a51qbdha1fabci61yzq70kk5c1rzk0ai78d92q8";
+      curlOpts = "-H Referer:https://www.azul.com/downloads/zulu/";
+    };
+
+    buildInputs = [ unzip freetype ];
+
+    installPhase = ''
+      mkdir -p $out
+      mv * $out
+
+      unzip ${jce-policies}
+      mv -f ZuluJCEPolicies/*.jar $out/lib/security/
+
+      # jni.h expects jni_md.h to be in the header search path.
+      ln -s $out/include/darwin/*_md.h $out/include/
+
+      if [ -f $out/LICENSE ]; then
+        install -D $out/LICENSE $out/share/zulu/LICENSE
+        rm $out/LICENSE
+      fi
+    '';
+
+    preFixup = ''
+      # Propagate the setJavaClassPath setup hook from the JDK so that
+      # any package that depends on the JDK has $CLASSPATH set up
+      # properly.
+      mkdir -p $out/nix-support
+      printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
+
+      install_name_tool -change /usr/X11/lib/libfreetype.6.dylib ${freetype}/lib/libfreetype.6.dylib $out/lib/libfontmanager.dylib
+
+      # Set JAVA_HOME automatically.
+      cat <<EOF >> $out/nix-support/setup-hook
+      if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
+      EOF
+    '';
+
+    passthru = {
+      home = jdk;
+    };
+
+    meta = with stdenv.lib; {
+      license = licenses.gpl2;
+      platforms = platforms.darwin;
+    };
+
+  };
+in jdk
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/default.nix b/nixpkgs/pkgs/development/compilers/openjdk/default.nix
new file mode 100644
index 000000000000..063976d8765f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/default.nix
@@ -0,0 +1,155 @@
+{ stdenv, lib, fetchurl, bash, pkgconfig, autoconf, cpio, file, which, unzip
+, zip, perl, cups, freetype, alsaLib, libjpeg, giflib, libpng, zlib, lcms2
+, libX11, libICE, libXrender, libXext, libXt, libXtst, libXi, libXinerama
+, libXcursor, libXrandr, fontconfig, openjdk14-bootstrap
+, setJavaClassPath
+, headless ? false
+, enableJavaFX ? openjfx.meta.available, openjfx
+, enableGnome2 ? true, gtk3, gnome_vfs, glib, GConf
+}:
+
+let
+  major = "14";
+  update = ".0.1";
+  build = "-ga";
+
+  openjdk = stdenv.mkDerivation rec {
+    pname = "openjdk" + lib.optionalString headless "-headless";
+    version = "${major}${update}${build}";
+
+    src = fetchurl {
+      url = "http://hg.openjdk.java.net/jdk-updates/jdk${major}u/archive/jdk-${version}.tar.gz";
+      sha256 = "0ic7dcrzk62jc65yrshs6xlclmsha7z52bia5s2bkllw1zpmdmip";
+    };
+
+    nativeBuildInputs = [ pkgconfig autoconf ];
+    buildInputs = [
+      cpio file which unzip zip perl zlib cups freetype alsaLib libjpeg giflib
+      libpng zlib lcms2 libX11 libICE libXrender libXext libXtst libXt libXtst
+      libXi libXinerama libXcursor libXrandr fontconfig openjdk14-bootstrap
+    ] ++ lib.optionals (!headless && enableGnome2) [
+      gtk3 gnome_vfs GConf glib
+    ];
+
+    patches = [
+      ./fix-java-home-jdk10.patch
+      ./read-truststore-from-env-jdk10.patch
+      ./currency-date-range-jdk10.patch
+      ./increase-javadoc-heap-jdk13.patch
+      # -Wformat etc. are stricter in newer gccs, per
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79677
+      # so grab the work-around from
+      # https://src.fedoraproject.org/rpms/java-openjdk/pull-request/24
+      (fetchurl {
+        url = "https://src.fedoraproject.org/rpms/java-openjdk/raw/06c001c7d87f2e9fe4fedeef2d993bcd5d7afa2a/f/rh1673833-remove_removal_of_wformat_during_test_compilation.patch";
+        sha256 = "082lmc30x64x583vqq00c8y0wqih3y4r0mp1c4bqq36l22qv6b6r";
+      })
+    ] ++ lib.optionals (!headless && enableGnome2) [
+      ./swing-use-gtk-jdk13.patch
+    ];
+
+    prePatch = ''
+      chmod +x configure
+      patchShebangs --build configure
+    '';
+
+    configureFlags = [
+      "--with-boot-jdk=${openjdk14-bootstrap.home}"
+      "--enable-unlimited-crypto"
+      "--with-native-debug-symbols=internal"
+      "--with-libjpeg=system"
+      "--with-giflib=system"
+      "--with-libpng=system"
+      "--with-zlib=system"
+      "--with-lcms=system"
+      "--with-stdc++lib=dynamic"
+    ] ++ lib.optional stdenv.isx86_64 "--with-jvm-features=zgc"
+      ++ lib.optional headless "--enable-headless-only"
+      ++ lib.optional (!headless && enableJavaFX) "--with-import-modules=${openjfx}";
+
+    separateDebugInfo = true;
+
+    NIX_CFLAGS_COMPILE = "-Wno-error";
+
+    NIX_LDFLAGS = toString (lib.optionals (!headless) [
+      "-lfontconfig" "-lcups" "-lXinerama" "-lXrandr" "-lmagic"
+    ] ++ lib.optionals (!headless && enableGnome2) [
+      "-lgtk-3" "-lgio-2.0" "-lgnomevfs-2" "-lgconf-2"
+    ]);
+
+    buildFlags = [ "all" ];
+
+    installPhase = ''
+      mkdir -p $out/lib
+
+      mv build/*/images/jdk $out/lib/openjdk
+
+      # Remove some broken manpages.
+      rm -rf $out/lib/openjdk/man/ja*
+
+      # Mirror some stuff in top-level.
+      mkdir -p $out/share
+      ln -s $out/lib/openjdk/include $out/include
+      ln -s $out/lib/openjdk/man $out/share/man
+
+      # jni.h expects jni_md.h to be in the header search path.
+      ln -s $out/include/linux/*_md.h $out/include/
+
+      # Remove crap from the installation.
+      rm -rf $out/lib/openjdk/demo
+      ${lib.optionalString headless ''
+        rm $out/lib/openjdk/lib/{libjsound,libfontmanager}.so
+      ''}
+
+      ln -s $out/lib/openjdk/bin $out/bin
+    '';
+
+    preFixup = ''
+      # Propagate the setJavaClassPath setup hook so that any package
+      # that depends on the JDK has $CLASSPATH set up properly.
+      mkdir -p $out/nix-support
+      #TODO or printWords?  cf https://github.com/NixOS/nixpkgs/pull/27427#issuecomment-317293040
+      echo -n "${setJavaClassPath}" > $out/nix-support/propagated-build-inputs
+
+      # Set JAVA_HOME automatically.
+      mkdir -p $out/nix-support
+      cat <<EOF > $out/nix-support/setup-hook
+      if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out/lib/openjdk; fi
+      EOF
+    '';
+
+    postFixup = ''
+      # Build the set of output library directories to rpath against
+      LIBDIRS=""
+      for output in $outputs; do
+        if [ "$output" = debug ]; then continue; fi
+        LIBDIRS="$(find $(eval echo \$$output) -name \*.so\* -exec dirname {} \+ | sort | uniq | tr '\n' ':'):$LIBDIRS"
+      done
+      # Add the local library paths to remove dependencies on the bootstrap
+      for output in $outputs; do
+        if [ "$output" = debug ]; then continue; fi
+        OUTPUTDIR=$(eval echo \$$output)
+        BINLIBS=$(find $OUTPUTDIR/bin/ -type f; find $OUTPUTDIR -name \*.so\*)
+        echo "$BINLIBS" | while read i; do
+          patchelf --set-rpath "$LIBDIRS:$(patchelf --print-rpath "$i")" "$i" || true
+          patchelf --shrink-rpath "$i" || true
+        done
+      done
+    '';
+
+    disallowedReferences = [ openjdk14-bootstrap ];
+
+    meta = with stdenv.lib; {
+      homepage = "http://openjdk.java.net/";
+      license = licenses.gpl2;
+      description = "The open-source Java Development Kit";
+      maintainers = with maintainers; [ edwtjo ];
+      platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" "armv7l-linux" "armv6l-linux" ];
+    };
+
+    passthru = {
+      architecture = "";
+      home = "${openjdk}/lib/openjdk";
+    };
+  };
+in openjdk
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/fix-java-home-jdk10.patch b/nixpkgs/pkgs/development/compilers/openjdk/fix-java-home-jdk10.patch
new file mode 100644
index 000000000000..c037fde29722
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/fix-java-home-jdk10.patch
@@ -0,0 +1,14 @@
+--- a/src/hotspot/os/linux/os_linux.cpp	2017-07-04 23:09:02.533972226 -0400
++++ b/src/hotspot/os/linux/os_linux.cpp	2017-07-04 23:07:52.118338845 -0400
+@@ -2270,8 +2270,5 @@
+   assert(ret, "cannot locate libjvm");
+   char *rp = NULL;
+   if (ret && dli_fname[0] != '\0') {
+-    rp = os::Posix::realpath(dli_fname, buf, buflen);
+-  }
+-  if (rp == NULL) {
+-    return;
++    snprintf(buf, buflen, "%s", dli_fname);
+   }
+
+   if (Arguments::sun_java_launcher_is_altjvm()) {
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/fix-java-home-jdk8.patch b/nixpkgs/pkgs/development/compilers/openjdk/fix-java-home-jdk8.patch
new file mode 100644
index 000000000000..6189412c999c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/fix-java-home-jdk8.patch
@@ -0,0 +1,15 @@
+--- a/hotspot/src/os/linux/vm/os_linux.cpp  2015-02-04 21:14:39.000000000 +0100
++++ b/hotspot/src/os/linux/vm/os_linux.cpp  2015-05-19 16:17:29.960107613 +0200
+@@ -2304,10 +2304,8 @@
+   assert(ret, "cannot locate libjvm");
+   char *rp = NULL;
+   if (ret && dli_fname[0] != '\0') {
+-    rp = realpath(dli_fname, buf);
++    snprintf(buf, buflen, "%s", dli_fname);
+   }
+-  if (rp == NULL)
+-    return;
+
+   if (Arguments::created_by_gamma_launcher()) {
+     // Support for the gamma launcher.  Typical value for buf is
+
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/generate-cacerts.pl b/nixpkgs/pkgs/development/compilers/openjdk/generate-cacerts.pl
new file mode 100644
index 000000000000..3bdd42f7274f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/generate-cacerts.pl
@@ -0,0 +1,366 @@
+#!/usr/bin/perl
+
+# Copyright (C) 2007, 2008 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# generate-cacerts.pl generates a JKS keystore named 'cacerts' from
+# OpenSSL's certificate bundle using OpenJDK's keytool.
+
+# First extract each of OpenSSL's bundled certificates into its own
+# aliased filename.
+
+# Downloaded from http://cvs.fedoraproject.org/viewvc/rpms/ca-certificates/F-12/generate-cacerts.pl?revision=1.2
+# Check and prevention of duplicate aliases added by Vlastimil Babka <caster@gentoo.org>
+
+$file = $ARGV[1];
+open(CERTS, $file);
+@certs = <CERTS>;
+close(CERTS);
+
+$pem_file_count = 0;
+$in_cert_block = 0;
+$write_current_cert = 1;
+foreach $cert (@certs)
+{
+    if ($cert =~ /Issuer: /)
+    {
+        $_ = $cert;
+        if ($cert =~ /personal-freemail/)
+        {
+            $cert_alias = "thawtepersonalfreemailca";
+        }
+        elsif ($cert =~ /personal-basic/)
+        {
+            $cert_alias = "thawtepersonalbasicca";
+        }
+        elsif ($cert =~ /personal-premium/)
+        {
+            $cert_alias = "thawtepersonalpremiumca";
+        }
+        elsif ($cert =~ /server-certs/)
+        {
+            $cert_alias = "thawteserverca";
+        }
+        elsif ($cert =~ /premium-server/)
+        {
+            $cert_alias = "thawtepremiumserverca";
+        }
+        elsif ($cert =~ /Class 1 Public Primary Certification Authority$/)
+        {
+            $cert_alias = "verisignclass1ca";
+        }
+        elsif ($cert =~ /Class 1 Public Primary Certification Authority - G2/)
+        {
+            $cert_alias = "verisignclass1g2ca";
+        }
+        elsif ($cert =~
+               /VeriSign Class 1 Public Primary Certification Authority - G3/)
+        {
+            $cert_alias = "verisignclass1g3ca";
+        }
+        elsif ($cert =~ /Class 2 Public Primary Certification Authority$/)
+        {
+            $cert_alias = "verisignclass2ca";
+        }
+        elsif ($cert =~ /Class 2 Public Primary Certification Authority - G2/)
+        {
+            $cert_alias = "verisignclass2g2ca";
+        }
+        elsif ($cert =~
+               /VeriSign Class 2 Public Primary Certification Authority - G3/)
+        {
+            $cert_alias = "verisignclass2g3ca";
+        }
+        elsif ($cert =~ /Class 3 Public Primary Certification Authority$/)
+        {
+            $cert_alias = "verisignclass3ca";
+        }
+        # Version 1 of Class 3 Public Primary Certification Authority
+        # - G2 is added.  Version 3 is excluded.  See below.
+        elsif ($cert =~
+               /VeriSign Class 3 Public Primary Certification Authority - G3/)
+        {
+            $cert_alias = "verisignclass3g3ca";
+        }
+        elsif ($cert =~
+               /RSA Data Security.*Secure Server Certification Authority/)
+        {
+            $cert_alias = "verisignserverca";
+        }
+        elsif ($cert =~ /GTE CyberTrust Global Root/)
+        {
+            $cert_alias = "gtecybertrustglobalca";
+        }
+        elsif ($cert =~ /Baltimore CyberTrust Root/)
+        {
+            $cert_alias = "baltimorecybertrustca";
+        }
+        elsif ($cert =~ /www.entrust.net\/Client_CA_Info\/CPS/)
+        {
+            $cert_alias = "entrustclientca";
+        }
+        elsif ($cert =~ /www.entrust.net\/GCCA_CPS/)
+        {
+            $cert_alias = "entrustglobalclientca";
+        }
+        elsif ($cert =~ /www.entrust.net\/CPS_2048/)
+        {
+            $cert_alias = "entrust2048ca";
+        }
+        elsif ($cert =~ /www.entrust.net\/CPS /)
+        {
+            $cert_alias = "entrustsslca";
+        }
+        elsif ($cert =~ /www.entrust.net\/SSL_CPS/)
+        {
+            $cert_alias = "entrustgsslca";
+        }
+        elsif ($cert =~ /The Go Daddy Group/)
+        {
+            $cert_alias = "godaddyclass2ca";
+        }
+        elsif ($cert =~ /Starfield Class 2 Certification Authority/)
+        {
+            $cert_alias = "starfieldclass2ca";
+        }
+        elsif ($cert =~ /ValiCert Class 2 Policy Validation Authority/)
+        {
+            $cert_alias = "valicertclass2ca";
+        }
+        elsif ($cert =~ /GeoTrust Global CA$/)
+        {
+            $cert_alias = "geotrustglobalca";
+        }
+        elsif ($cert =~ /Equifax Secure Certificate Authority/)
+        {
+            $cert_alias = "equifaxsecureca";
+        }
+        elsif ($cert =~ /Equifax Secure eBusiness CA-1/)
+        {
+            $cert_alias = "equifaxsecureebusinessca1";
+        }
+        elsif ($cert =~ /Equifax Secure eBusiness CA-2/)
+        {
+            $cert_alias = "equifaxsecureebusinessca2";
+        }
+        elsif ($cert =~ /Equifax Secure Global eBusiness CA-1/)
+        {
+            $cert_alias = "equifaxsecureglobalebusinessca1";
+        }
+        elsif ($cert =~ /Sonera Class1 CA/)
+        {
+            $cert_alias = "soneraclass1ca";
+        }
+        elsif ($cert =~ /Sonera Class2 CA/)
+        {
+            $cert_alias = "soneraclass2ca";
+        }
+        elsif ($cert =~ /AAA Certificate Services/)
+        {
+            $cert_alias = "comodoaaaca";
+        }
+        elsif ($cert =~ /AddTrust Class 1 CA Root/)
+        {
+            $cert_alias = "addtrustclass1ca";
+        }
+        elsif ($cert =~ /AddTrust External CA Root/)
+        {
+            $cert_alias = "addtrustexternalca";
+        }
+        elsif ($cert =~ /AddTrust Qualified CA Root/)
+        {
+            $cert_alias = "addtrustqualifiedca";
+        }
+        elsif ($cert =~ /UTN-USERFirst-Hardware/)
+        {
+            $cert_alias = "utnuserfirsthardwareca";
+        }
+        elsif ($cert =~ /UTN-USERFirst-Client Authentication and Email/)
+        {
+            $cert_alias = "utnuserfirstclientauthemailca";
+        }
+        elsif ($cert =~ /UTN - DATACorp SGC/)
+        {
+            $cert_alias = "utndatacorpsgcca";
+        }
+        elsif ($cert =~ /UTN-USERFirst-Object/)
+        {
+            $cert_alias = "utnuserfirstobjectca";
+        }
+        elsif ($cert =~ /America Online Root Certification Authority 1/)
+        {
+            $cert_alias = "aolrootca1";
+        }
+        elsif ($cert =~ /DigiCert Assured ID Root CA/)
+        {
+            $cert_alias = "digicertassuredidrootca";
+        }
+        elsif ($cert =~ /DigiCert Global Root CA/)
+        {
+            $cert_alias = "digicertglobalrootca";
+        }
+        elsif ($cert =~ /DigiCert High Assurance EV Root CA/)
+        {
+            $cert_alias = "digicerthighassuranceevrootca";
+        }
+        elsif ($cert =~ /GlobalSign Root CA$/)
+        {
+            $cert_alias = "globalsignca";
+        }
+        elsif ($cert =~ /GlobalSign Root CA - R2/)
+        {
+            $cert_alias = "globalsignr2ca";
+        }
+        elsif ($cert =~ /Elektronik.*Kas.*2005/)
+        {
+            $cert_alias = "extra-elektronikkas2005";
+        }
+        elsif ($cert =~ /Elektronik/)
+        {
+            $cert_alias = "extra-elektronik2005";
+        }
+        # Mozilla does not provide these certificates:
+        #   baltimorecodesigningca
+        #   gtecybertrust5ca
+        #   trustcenterclass2caii
+        #   trustcenterclass4caii
+        #   trustcenteruniversalcai
+        else
+        {
+            # Generate an alias using the OU and CN attributes of the
+            # Issuer field if both are present, otherwise use only the
+            # CN attribute.  The Issuer field must have either the OU
+            # or the CN attribute.
+            $_ = $cert;
+            if ($cert =~ /OU=/)
+            {
+                s/Issuer:.*?OU=//;
+                # Remove other occurrences of OU=.
+                s/OU=.*CN=//;
+                # Remove CN= if there were not other occurrences of OU=.
+                s/CN=//;
+                s/\/emailAddress.*//;
+                s/Certificate Authority/ca/g;
+                s/Certification Authority/ca/g;
+            }
+            elsif ($cert =~ /CN=/)
+            {
+                s/Issuer:.*CN=//;
+                s/\/emailAddress.*//;
+                s/Certificate Authority/ca/g;
+                s/Certification Authority/ca/g;
+            }
+            s/\W//g;
+            tr/A-Z/a-z/;
+            $cert_alias = "extra-$_";
+
+        }
+        while (-e "$cert_alias.pem")
+        {
+            $cert_alias = "$cert_alias" . "_";
+        }
+    }
+    # When it attempts to parse:
+    #
+    # Class 3 Public Primary Certification Authority - G2, Version 3
+    #
+    # keytool says:
+    #
+    # #2: ObjectId: 1.3.6.1.5.5.7.1.1 Criticality=false
+    # Unparseable AuthorityInfoAccess extension due to
+    # java.io.IOException: Invalid encoding of URI
+    #
+    # If we do not exclude this file
+    # openjdk/jdk/test/lib/security/cacerts/VerifyCACerts.java fails
+    # on this cert, printing:
+    #
+    # Couldn't verify: java.security.SignatureException: Signature
+    # does not match.
+    #
+    elsif ($cert =~
+           /A6:0F:34:C8:62:6C:81:F6:8B:F7:7D:A9:F6:67:58:8A:90:3F:7D:36/)
+    {
+        $write_current_cert = 0;
+        $pem_file_count--;
+    }
+    elsif ($cert eq "-----BEGIN CERTIFICATE-----\n")
+    {
+        $_ = $cert;
+        s/\W//g;
+        tr/A-Z/a-z/;
+        $cert_alias = "extra-$_";
+        while (-e "$cert_alias.pem")
+        {
+            $cert_alias = "$cert_alias" . "_";
+        }
+        if ($in_cert_block != 0)
+        {
+            die "$file is malformed.";
+        }
+        $in_cert_block = 1;
+        if ($write_current_cert == 1)
+        {
+            $pem_file_count++;
+            if (-e "$cert_alias.pem")
+            {
+                print "$cert_alias";
+                die "already exists"
+            }
+            open(PEM, ">$cert_alias.pem");
+            print PEM $cert;
+        }
+    }
+    elsif ($cert eq "-----END CERTIFICATE-----\n")
+    {
+        $in_cert_block = 0;
+        if ($write_current_cert == 1)
+        {
+            print PEM $cert;
+            close(PEM);
+        }
+        $write_current_cert = 1
+    }
+    else
+    {
+        if ($in_cert_block == 1 && $write_current_cert == 1)
+        {
+            print PEM $cert;
+        }
+    }
+}
+
+# Check that the correct number of .pem files were produced.
+@pem_files = <*.pem>;
+if (@pem_files != $pem_file_count)
+{
+    print "$pem_file_count";
+    die "Number of .pem files produced does not match".
+        " number of certs read from $file.";
+}
+
+# Now store each cert in the 'cacerts' file using keytool.
+$certs_written_count = 0;
+foreach $pem_file (@pem_files)
+{
+    system "$ARGV[0] -noprompt -import".
+        " -alias `basename $pem_file .pem`".
+        " -keystore cacerts -storepass 'changeit' -file $pem_file";
+    unlink($pem_file);
+    $certs_written_count++;
+}
+
+# Check that the correct number of certs were added to the keystore.
+if ($certs_written_count != $pem_file_count)
+{
+    die "Number of certs added to keystore does not match".
+        " number of certs read from $file.";
+}
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/increase-javadoc-heap-jdk13.patch b/nixpkgs/pkgs/development/compilers/openjdk/increase-javadoc-heap-jdk13.patch
new file mode 100644
index 000000000000..6e48db6ac3b9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/increase-javadoc-heap-jdk13.patch
@@ -0,0 +1,12 @@
+diff -uw -r a/make/Docs.gmk b/make/Docs.gmk
+--- a/make/Docs.gmk	2019-10-09 08:05:43.107349180 -0400
++++ b/make/Docs.gmk	2019-10-09 08:09:29.330118790 -0400
+@@ -277,7 +277,7 @@
+   $1_ALL_MODULES := $$(sort $$($1_MODULES) $$($1_INDIRECT_EXPORTS))
+ 
+   $1_JAVA_ARGS := -Dextlink.spec.version=$$(VERSION_SPECIFICATION) \
+-	-Djspec.version=$$(VERSION_SPECIFICATION)
++	-Djspec.version=$$(VERSION_SPECIFICATION) -Xmx1G
+ 
+   ifeq ($$(ENABLE_FULL_DOCS), true)
+     # Tell the ModuleGraph taglet to generate html links to soon-to-be-created
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/increase-javadoc-heap.patch b/nixpkgs/pkgs/development/compilers/openjdk/increase-javadoc-heap.patch
new file mode 100644
index 000000000000..6a1b253f9132
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/increase-javadoc-heap.patch
@@ -0,0 +1,12 @@
+--- a/make/Docs.gmk       2019-07-24 13:07:37.013405090 -0400
++++ b/make/Docs.gmk       2019-07-24 13:07:28.406550535 -0400
+@@ -274,7 +274,7 @@
+   $1_INDIRECT_EXPORTS := $$(call FindTransitiveIndirectDepsForModules, $$($1_MODULES))
+   $1_ALL_MODULES := $$(sort $$($1_MODULES) $$($1_INDIRECT_EXPORTS))
+ 
+-  $1_JAVA_ARGS := -Dextlink.spec.version=$$(VERSION_SPECIFICATION)
++  $1_JAVA_ARGS := -Dextlink.spec.version=$$(VERSION_SPECIFICATION) -Xmx1G
+ 
+   ifeq ($$(ENABLE_FULL_DOCS), true)
+     # Tell the ModuleGraph taglet to generate html links to soon-to-be-created
+
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/make-bootstrap.nix b/nixpkgs/pkgs/development/compilers/openjdk/make-bootstrap.nix
new file mode 100644
index 000000000000..aac54417e2a8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/make-bootstrap.nix
@@ -0,0 +1,31 @@
+{ runCommand, openjdk, nukeReferences }:
+
+runCommand "${openjdk.name}-bootstrap.tar.xz" {} ''
+  mkdir -pv openjdk-bootstrap/lib
+
+  # Do a deep copy of the openjdk
+  cp -vrL ${openjdk.home} openjdk-bootstrap/lib
+
+  # Includes are needed for building the native jvm
+  cp -vrL ${openjdk}/include openjdk-bootstrap
+
+  # The binaries are actually stored in the openjdk lib
+  ln -sv lib/openjdk/bin openjdk-bootstrap/bin
+  find . -name libjli.so
+  (cd openjdk-bootstrap/lib; find . -name libjli.so -exec ln -sfv {} libjli.so \;)
+
+  chmod -R +w openjdk-bootstrap
+
+  # Remove components we don't need
+  find openjdk-bootstrap -name \*.diz -exec rm {} \;
+  find openjdk-bootstrap -name \*.ttf -exec rm {} \;
+  find openjdk-bootstrap -name \*.gif -exec rm {} \;
+  find openjdk-bootstrap -name src.zip -exec rm {} \;
+  rm -rf openjdk-bootstrap/lib/openjdk/jre/bin
+
+  # Remove all of the references to the native nix store
+  find openjdk-bootstrap -print0 | xargs -0 ${nukeReferences}/bin/nuke-refs
+
+  # Create the output tarball
+  tar cv openjdk-bootstrap | xz > $out
+''
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/openjfx/11.nix b/nixpkgs/pkgs/development/compilers/openjdk/openjfx/11.nix
new file mode 100644
index 000000000000..adb564f7cfee
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/openjfx/11.nix
@@ -0,0 +1,113 @@
+{ stdenv, lib, fetchurl, writeText, gradleGen, pkgconfig, perl, cmake
+, gperf, gtk2, gtk3, libXtst, libXxf86vm, glib, alsaLib, ffmpeg_3, python, ruby
+, openjdk11-bootstrap }:
+
+let
+  major = "11";
+  update = ".0.3";
+  build = "1";
+  repover = "${major}${update}+${build}";
+  gradle_ = (gradleGen.override {
+    java = openjdk11-bootstrap;
+  }).gradle_4_10;
+
+  makePackage = args: stdenv.mkDerivation ({
+    version = "${major}${update}-${build}";
+
+    src = fetchurl {
+      url = "https://hg.openjdk.java.net/openjfx/${major}/rt/archive/${repover}.tar.gz";
+      sha256 = "1h7qsylr7rnwnbimqjyn3whszp9kv4h3gpicsrb3mradxc9yv194";
+    };
+
+    buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsaLib ffmpeg_3 ];
+    nativeBuildInputs = [ gradle_ perl pkgconfig cmake gperf python ruby ];
+
+    dontUseCmakeConfigure = true;
+
+    config = writeText "gradle.properties" (''
+      CONF = Release
+      JDK_HOME = ${openjdk11-bootstrap.home}
+    '' + args.gradleProperties or "");
+
+    #avoids errors about deprecation of GTypeDebugFlags, GTimeVal, etc.
+    NIX_CFLAGS_COMPILE = [ "-DGLIB_DISABLE_DEPRECATION_WARNINGS" ];
+
+    buildPhase = ''
+      runHook preBuild
+
+      export GRADLE_USER_HOME=$(mktemp -d)
+      ln -s $config gradle.properties
+      export NIX_CFLAGS_COMPILE="$(pkg-config --cflags glib-2.0) $NIX_CFLAGS_COMPILE"
+      gradle --no-daemon $gradleFlags sdk
+
+      runHook postBuild
+    '';
+  } // args);
+
+  # Fake build to pre-download deps into fixed-output derivation.
+  # We run nearly full build because I see no other way to download everything that's needed.
+  # Anyone who knows a better way?
+  deps = makePackage {
+    pname = "openjfx-deps";
+
+    # perl code mavenizes pathes (com.squareup.okio/okio/1.13.0/a9283170b7305c8d92d25aff02a6ab7e45d06cbe/okio-1.13.0.jar -> com/squareup/okio/okio/1.13.0/okio-1.13.0.jar)
+    installPhase = ''
+      find $GRADLE_USER_HOME -type f -regex '.*/modules.*\.\(jar\|pom\)' \
+        | perl -pe 's#(.*/([^/]+)/([^/]+)/([^/]+)/[0-9a-f]{30,40}/([^/\s]+))$# ($x = $2) =~ tr|\.|/|; "install -Dm444 $1 \$out/$x/$3/$4/$5" #e' \
+        | sh
+      rm -rf $out/tmp
+    '';
+
+    outputHashAlgo = "sha256";
+    outputHashMode = "recursive";
+    # Downloaded AWT jars differ by platform.
+    outputHash = {
+      i686-linux = "0mjlyf6jvbis7nrm5d394sjv4hjw6k3753hr1nwdxk8skwc3ry08";
+      x86_64-linux = "0d4msxswdav1xsfkpr0qd3xgqkcbxzf47v1zdy5jmg5w4bs6a78a";
+    }.${stdenv.system} or (throw "Unsupported platform");
+  };
+
+in makePackage {
+  pname = "openjfx-modular-sdk";
+
+  gradleProperties = ''
+    COMPILE_MEDIA = true
+    COMPILE_WEBKIT = true
+  '';
+
+  preBuild = ''
+    swtJar="$(find ${deps} -name org.eclipse.swt\*.jar)"
+    substituteInPlace build.gradle \
+      --replace 'mavenCentral()' 'mavenLocal(); maven { url uri("${deps}") }' \
+      --replace 'name: SWT_FILE_NAME' "files('$swtJar')"
+  '';
+
+  installPhase = ''
+    cp -r build/modular-sdk $out
+  '';
+
+  # glib-2.62 deprecations
+  NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS";
+
+  stripDebugList = [ "." ];
+
+  postFixup = ''
+    # Remove references to bootstrap.
+    find "$out" -name \*.so | while read lib; do
+      new_refs="$(patchelf --print-rpath "$lib" | sed -E 's,:?${openjdk11-bootstrap}[^:]*,,')"
+      patchelf --set-rpath "$new_refs" "$lib"
+    done
+  '';
+
+  disallowedReferences = [ openjdk11-bootstrap ];
+
+  passthru.deps = deps;
+
+  meta = with stdenv.lib; {
+    homepage = "http://openjdk.java.net/projects/openjfx/";
+    license = licenses.gpl2;
+    description = "The next-generation Java client toolkit.";
+    maintainers = with maintainers; [ abbradar ];
+    platforms = [ "i686-linux" "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/openjfx/14.nix b/nixpkgs/pkgs/development/compilers/openjdk/openjfx/14.nix
new file mode 100644
index 000000000000..04bb1fa56274
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/openjfx/14.nix
@@ -0,0 +1,115 @@
+{ stdenv, lib, fetchFromGitHub, writeText, openjdk11_headless, gradleGen
+, pkgconfig, perl, cmake, gperf, gtk2, gtk3, libXtst, libXxf86vm, glib, alsaLib
+, ffmpeg_3, python, ruby }:
+
+let
+  major = "14";
+  update = "";
+  build = "-ga";
+  repover = "${major}${update}${build}";
+  gradle_ = (gradleGen.override {
+    java = openjdk11_headless;
+  }).gradle_5_6;
+
+  makePackage = args: stdenv.mkDerivation ({
+    version = "${major}${update}${build}";
+
+    src = fetchFromGitHub {
+      owner = "openjdk";
+      repo = "jfx";
+      rev = repover;
+      sha256 = "16aj15xksc266gv3y42m0g277pfvp71901lrngndcnpr7i2zshnr";
+    };
+
+    buildInputs = [ gtk2 gtk3 libXtst libXxf86vm glib alsaLib ffmpeg_3 ];
+    nativeBuildInputs = [ gradle_ perl pkgconfig cmake gperf python ruby ];
+
+    dontUseCmakeConfigure = true;
+
+    config = writeText "gradle.properties" (''
+      CONF = Release
+      JDK_HOME = ${openjdk11_headless.home}
+    '' + args.gradleProperties or "");
+
+    #avoids errors about deprecation of GTypeDebugFlags, GTimeVal, etc.
+    NIX_CFLAGS_COMPILE = [ "-DGLIB_DISABLE_DEPRECATION_WARNINGS" ];
+
+    buildPhase = ''
+      runHook preBuild
+
+      export GRADLE_USER_HOME=$(mktemp -d)
+      ln -s $config gradle.properties
+      export NIX_CFLAGS_COMPILE="$(pkg-config --cflags glib-2.0) $NIX_CFLAGS_COMPILE"
+      gradle --no-daemon $gradleFlags sdk
+
+      runHook postBuild
+    '';
+  } // args);
+
+  # Fake build to pre-download deps into fixed-output derivation.
+  # We run nearly full build because I see no other way to download everything that's needed.
+  # Anyone who knows a better way?
+  deps = makePackage {
+    pname = "openjfx-deps";
+
+    # perl code mavenizes pathes (com.squareup.okio/okio/1.13.0/a9283170b7305c8d92d25aff02a6ab7e45d06cbe/okio-1.13.0.jar -> com/squareup/okio/okio/1.13.0/okio-1.13.0.jar)
+    installPhase = ''
+      find $GRADLE_USER_HOME -type f -regex '.*/modules.*\.\(jar\|pom\)' \
+        | perl -pe 's#(.*/([^/]+)/([^/]+)/([^/]+)/[0-9a-f]{30,40}/([^/\s]+))$# ($x = $2) =~ tr|\.|/|; "install -Dm444 $1 \$out/$x/$3/$4/$5" #e' \
+        | sh
+      rm -rf $out/tmp
+    '';
+
+    outputHashAlgo = "sha256";
+    outputHashMode = "recursive";
+    # Downloaded AWT jars differ by platform.
+    outputHash = {
+      x86_64-linux = "077zss95iq6iskx7ghz1c57ymydpzj0wm7r1pkznw99l9xwvdmqi";
+      i686-linux = "03gglr2sh77cyg16qw9g45ji33dg7i93s5s30hz3mh420g112qa0";
+    }.${stdenv.system} or (throw "Unsupported platform");
+  };
+
+in makePackage {
+  pname = "openjfx-modular-sdk";
+
+  gradleProperties = ''
+    COMPILE_MEDIA = true
+    COMPILE_WEBKIT = true
+  '';
+
+  preBuild = ''
+    swtJar="$(find ${deps} -name org.eclipse.swt\*.jar)"
+    substituteInPlace build.gradle \
+      --replace 'mavenCentral()' 'mavenLocal(); maven { url uri("${deps}") }' \
+      --replace 'name: SWT_FILE_NAME' "files('$swtJar')"
+  '';
+
+  installPhase = ''
+    cp -r build/modular-sdk $out
+  '';
+
+  # glib-2.62 deprecations
+  NIX_CFLAGS_COMPILE = "-DGLIB_DISABLE_DEPRECATION_WARNINGS";
+
+  stripDebugList = [ "." ];
+
+  postFixup = ''
+    # Remove references to bootstrap.
+    find "$out" -name \*.so | while read lib; do
+      new_refs="$(patchelf --print-rpath "$lib" | sed -E 's,:?${openjdk11_headless}[^:]*,,')"
+      patchelf --set-rpath "$new_refs" "$lib"
+    done
+  '';
+
+  disallowedReferences = [ openjdk11_headless ];
+
+  passthru.deps = deps;
+
+  meta = with stdenv.lib; {
+    homepage = "http://openjdk.java.net/projects/openjfx/";
+    license = licenses.gpl2;
+    description = "The next-generation Java client toolkit.";
+    maintainers = with maintainers; [ abbradar ];
+    platforms = [ "i686-linux" "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/read-truststore-from-env-jdk10.patch b/nixpkgs/pkgs/development/compilers/openjdk/read-truststore-from-env-jdk10.patch
new file mode 100644
index 000000000000..6203064f5c06
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/read-truststore-from-env-jdk10.patch
@@ -0,0 +1,30 @@
+--- a/src/java.base/share/classes/sun/security/ssl/TrustStoreManager.java	2017-06-26 21:48:25.000000000 -0400
++++ b/src/java.base/share/classes/sun/security/ssl/TrustStoreManager.java	2017-07-05 20:45:57.491295030 -0400
+@@ -71,6 +71,7 @@
+      *
+      * The preference of the default trusted KeyStore is:
+      *    javax.net.ssl.trustStore
++     *    system environment variable JAVAX_NET_SSL_TRUSTSTORE
+      *    jssecacerts
+      *    cacerts
+      */
+@@ -132,7 +133,8 @@
+                 public TrustStoreDescriptor run() {
+                     // Get the system properties for trust store.
+                     String storePropName = System.getProperty(
+-                            "javax.net.ssl.trustStore", jsseDefaultStore);
++                            "javax.net.ssl.trustStore",
++                            System.getenv("JAVAX_NET_SSL_TRUSTSTORE"));
+                     String storePropType = System.getProperty(
+                             "javax.net.ssl.trustStoreType",
+                             KeyStore.getDefaultType());
+@@ -144,6 +146,9 @@
+                     String temporaryName = "";
+                     File temporaryFile = null;
+                     long temporaryTime = 0L;
++                    if (storePropName == null) {
++                        storePropName = jsseDefaultStore;
++                    }
+                     if (!"NONE".equals(storePropName)) {
+                         String[] fileNames =
+                                 new String[] {storePropName, defaultStore};
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/read-truststore-from-env-jdk8.patch b/nixpkgs/pkgs/development/compilers/openjdk/read-truststore-from-env-jdk8.patch
new file mode 100644
index 000000000000..08cf554a18fe
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/read-truststore-from-env-jdk8.patch
@@ -0,0 +1,30 @@
+--- a/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java	2017-06-26 21:48:25.000000000 -0400
++++ b/jdk/src/share/classes/sun/security/ssl/TrustStoreManager.java	2017-07-05 20:45:57.491295030 -0400
+@@ -71,6 +71,7 @@
+      *
+      * The preference of the default trusted KeyStore is:
+      *    javax.net.ssl.trustStore
++     *    system environment variable JAVAX_NET_SSL_TRUSTSTORE
+      *    jssecacerts
+      *    cacerts
+      */
+@@ -132,7 +133,8 @@
+                 public TrustStoreDescriptor run() {
+                     // Get the system properties for trust store.
+                     String storePropName = System.getProperty(
+-                            "javax.net.ssl.trustStore", jsseDefaultStore);
++                            "javax.net.ssl.trustStore",
++                            System.getenv("JAVAX_NET_SSL_TRUSTSTORE"));
+                     String storePropType = System.getProperty(
+                             "javax.net.ssl.trustStoreType",
+                             KeyStore.getDefaultType());
+@@ -144,6 +146,9 @@
+                     String temporaryName = "";
+                     File temporaryFile = null;
+                     long temporaryTime = 0L;
++                    if (storePropName == null) {
++                        storePropName = jsseDefaultStore;
++                    }
+                     if (!"NONE".equals(storePropName)) {
+                         String[] fileNames =
+                                 new String[] {storePropName, defaultStore};
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/swing-use-gtk-jdk10.patch b/nixpkgs/pkgs/development/compilers/openjdk/swing-use-gtk-jdk10.patch
new file mode 100644
index 000000000000..b9258c500db4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/swing-use-gtk-jdk10.patch
@@ -0,0 +1,24 @@
+--- a/src/java.desktop/share/classes/javax/swing/UIManager.java
++++ b/src/java.desktop/share/classes/javax/swing/UIManager.java
+@@ -607,11 +607,9 @@
+         if (osType == OSInfo.OSType.WINDOWS) {
+             return "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
+         } else {
+-            String desktop = AccessController.doPrivileged(new GetPropertyAction("sun.desktop"));
+             Toolkit toolkit = Toolkit.getDefaultToolkit();
+-            if ("gnome".equals(desktop) &&
+-                    toolkit instanceof SunToolkit &&
+-                    ((SunToolkit) toolkit).isNativeGTKAvailable()) {
++            if (toolkit instanceof SunToolkit &&
++                    ((SunToolkit) toolkit).isNativeGTKAvailable()) {
+                 // May be set on Linux and Solaris boxs.
+                 return "com.sun.java.swing.plaf.gtk.GTKLookAndFeel";
+             }
+@@ -1341,7 +1339,7 @@
+             lafName = (String) lafData.remove("defaultlaf");
+         }
+         if (lafName == null) {
+-            lafName = getCrossPlatformLookAndFeelClassName();
++            lafName = getSystemLookAndFeelClassName();
+         }
+         lafName = swingProps.getProperty(defaultLAFKey, lafName);
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/swing-use-gtk-jdk13.patch b/nixpkgs/pkgs/development/compilers/openjdk/swing-use-gtk-jdk13.patch
new file mode 100644
index 000000000000..8a1b9b6149bb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/swing-use-gtk-jdk13.patch
@@ -0,0 +1,22 @@
+--- a/src/java.desktop/share/classes/javax/swing/UIManager.java	2019-08-08 01:05:04.000000000 -0400
++++ b/src/java.desktop/share/classes/javax/swing/UIManager.java	2019-10-09 08:20:31.791606748 -0400
+@@ -660,9 +660,8 @@
+             Toolkit toolkit = Toolkit.getDefaultToolkit();
+             if (toolkit instanceof SunToolkit) {
+                 SunToolkit suntk = (SunToolkit)toolkit;
+-                String desktop = suntk.getDesktop();
+                 boolean gtkAvailable = suntk.isNativeGTKAvailable();
+-                if ("gnome".equals(desktop) && gtkAvailable) {
++                if (gtkAvailable) {
+                     return "com.sun.java.swing.plaf.gtk.GTKLookAndFeel";
+                 }
+             }
+@@ -1397,7 +1396,7 @@
+             lafName = lafData.remove("defaultlaf");
+         }
+         if (lafName == null) {
+-            lafName = getCrossPlatformLookAndFeelClassName();
++            lafName = getSystemLookAndFeelClassName();
+         }
+         lafName = swingProps.getProperty(defaultLAFKey, lafName);
+ 
diff --git a/nixpkgs/pkgs/development/compilers/openjdk/swing-use-gtk-jdk8.patch b/nixpkgs/pkgs/development/compilers/openjdk/swing-use-gtk-jdk8.patch
new file mode 100644
index 000000000000..9538aade6726
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openjdk/swing-use-gtk-jdk8.patch
@@ -0,0 +1,26 @@
+diff -ru3 a/jdk/src/share/classes/javax/swing/UIManager.java b/jdk/src/share/classes/javax/swing/UIManager.java
+--- a/jdk/src/share/classes/javax/swing/UIManager.java	2016-07-26 00:41:37.000000000 +0300
++++ b/jdk/src/share/classes/javax/swing/UIManager.java	2016-10-02 22:46:01.890071761 +0300
+@@ -607,11 +607,9 @@
+         if (osType == OSInfo.OSType.WINDOWS) {
+             return "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
+         } else {
+-            String desktop = AccessController.doPrivileged(new GetPropertyAction("sun.desktop"));
+             Toolkit toolkit = Toolkit.getDefaultToolkit();
+-            if ("gnome".equals(desktop) &&
+-                    toolkit instanceof SunToolkit &&
+-                    ((SunToolkit) toolkit).isNativeGTKAvailable()) {
++            if (toolkit instanceof SunToolkit &&
++                    ((SunToolkit) toolkit).isNativeGTKAvailable()) {
+                 // May be set on Linux and Solaris boxs.
+                 return "com.sun.java.swing.plaf.gtk.GTKLookAndFeel";
+             }
+@@ -1341,7 +1339,7 @@
+             lafName = (String) lafData.remove("defaultlaf");
+         }
+         if (lafName == null) {
+-            lafName = getCrossPlatformLookAndFeelClassName();
++            lafName = getSystemLookAndFeelClassName();
+         }
+         lafName = swingProps.getProperty(defaultLAFKey, lafName);
+ 
diff --git a/nixpkgs/pkgs/development/compilers/openspin/default.nix b/nixpkgs/pkgs/development/compilers/openspin/default.nix
new file mode 100644
index 000000000000..fe10f43abd5e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/openspin/default.nix
@@ -0,0 +1,26 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation {
+  pname = "openspin";
+  version = "unstable-2018-10-02";
+
+  src = fetchFromGitHub {
+    owner = "parallaxinc";
+    repo = "OpenSpin";
+    rev = "f3a587ed3e4f6a50b3c8d2022bbec5676afecedb";
+    sha256 = "1knkbzdanb60cwp7mggymkhd0167lh2sb1c00d1vhw7s0s1rj96n";
+  };
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mv build/openspin $out/bin/openspin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Compiler for SPIN/PASM languages for Parallax Propeller MCU";
+    homepage = "https://github.com/parallaxinc/OpenSpin";
+    license = licenses.mit;
+    maintainers = [ maintainers.redvers ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/oraclejdk/dlj-bundle-builder.sh b/nixpkgs/pkgs/development/compilers/oraclejdk/dlj-bundle-builder.sh
new file mode 100644
index 000000000000..459bfce50988
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/oraclejdk/dlj-bundle-builder.sh
@@ -0,0 +1,60 @@
+source $stdenv/setup
+
+echo "Unpacking distribution"
+unzip ${src} || true
+
+# set the dynamic linker of unpack200, necessary for construct script
+echo "patching unpack200"
+patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "" */bin/unpack200
+
+echo "constructing JDK and JRE installations"
+if test -z "$installjdk"; then
+  sh ${construct} . tmp-linux-jdk tmp-linux-jre
+  mkdir -p $out
+  cp -R tmp-linux-jre/* $out
+else
+  sh ${construct} . $out tmp-linux-jre
+fi
+
+echo "removing files at top level of installation"
+for file in $out/*
+do
+  if test -f $file ; then
+    rm $file
+  fi
+done
+rm -rf $out/docs
+
+# construct the rpath
+rpath=
+for i in $libraries; do
+    rpath=$rpath${rpath:+:}$i/lib
+done
+
+if test -z "$installjdk"; then
+  jrePath=$out
+else
+  jrePath=$out/jre
+fi
+
+if test -n "$jce"; then
+  unzip $jce
+  cp -v jce/*.jar $jrePath/lib/security
+fi
+
+rpath=$rpath${rpath:+:}$jrePath/lib/$architecture/jli
+
+# set all the dynamic linkers
+find $out -type f -perm -0100 \
+    -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+    --set-rpath "$rpath" {} \;
+
+find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
+
+if test -z "$pluginSupport"; then
+    rm -f $out/bin/javaws
+fi
+
+mkdir $jrePath/lib/$architecture/plugins
+ln -s $jrePath/lib/$architecture/libnpjp2.so $jrePath/lib/$architecture/plugins
+
diff --git a/nixpkgs/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix b/nixpkgs/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
new file mode 100644
index 000000000000..78fff4a59fba
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
@@ -0,0 +1,192 @@
+{ productVersion
+, patchVersion
+, sha256
+, jceName
+, sha256JCE
+}:
+
+{ swingSupport ? true
+, stdenv
+, requireFile
+, makeWrapper
+, unzip
+, file
+, xorg ? null
+, installjdk ? true
+, pluginSupport ? true
+, installjce ? false
+, config
+, glib
+, libxml2
+, libav_0_8
+, ffmpeg_3
+, libxslt
+, libGL
+, freetype
+, fontconfig
+, gtk2
+, pango
+, cairo
+, alsaLib
+, atk
+, gdk-pixbuf
+, setJavaClassPath
+}:
+
+assert swingSupport -> xorg != null;
+
+let
+
+  /**
+   * The JRE libraries are in directories that depend on the CPU.
+   */
+  architecture = {
+    i686-linux    = "i386";
+    x86_64-linux  = "amd64";
+    armv7l-linux  = "arm";
+    aarch64-linux = "aarch64";
+  }.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
+
+  jce =
+    if installjce then
+      requireFile {
+        name = jceName;
+        url = "http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html";
+        sha256 = sha256JCE;
+      }
+    else
+      "";
+
+  rSubPaths = [
+    "lib/${architecture}/jli"
+    "lib/${architecture}/server"
+    "lib/${architecture}/xawt"
+    "lib/${architecture}"
+  ];
+
+in
+
+let result = stdenv.mkDerivation rec {
+  pname = if installjdk then "oraclejdk" else "oraclejre";
+  version = "${productVersion}u${patchVersion}";
+
+  src =
+    let
+      platformName = {
+        i686-linux    = "linux-i586";
+        x86_64-linux  = "linux-x64";
+        armv7l-linux  = "linux-arm32-vfp-hflt";
+        aarch64-linux = "linux-arm64-vfp-hflt";
+      }.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
+    in requireFile {
+      name = "jdk-${productVersion}u${patchVersion}-${platformName}.tar.gz";
+      url = "http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html";
+      sha256 = sha256.${stdenv.hostPlatform.system};
+    };
+
+  nativeBuildInputs = [ file ]
+    ++ stdenv.lib.optional installjce unzip;
+
+  buildInputs = [ makeWrapper ];
+
+  # See: https://github.com/NixOS/patchelf/issues/10
+  dontStrip = 1;
+
+  installPhase = ''
+    cd ..
+
+    if test -z "$installjdk"; then
+      mv $sourceRoot/jre $out
+    else
+      mv $sourceRoot $out
+    fi
+
+    shopt -s extglob
+    for file in $out/!(*src.zip)
+    do
+      if test -f $file ; then
+        rm $file
+      fi
+    done
+
+    if test -n "$installjdk"; then
+      for file in $out/jre/*
+      do
+        if test -f $file ; then
+          rm $file
+        fi
+      done
+    fi
+
+    if test -z "$installjdk"; then
+      jrePath=$out
+    else
+      jrePath=$out/jre
+    fi
+
+    if test -n "${jce}"; then
+      unzip ${jce}
+      cp -v UnlimitedJCEPolicy*/*.jar $jrePath/lib/security
+    fi
+
+    if test -z "$pluginSupport"; then
+      rm -f $out/bin/javaws
+      if test -n "$installjdk"; then
+        rm -f $out/jre/bin/javaws
+      fi
+    fi
+
+    mkdir $jrePath/lib/${architecture}/plugins
+    ln -s $jrePath/lib/${architecture}/libnpjp2.so $jrePath/lib/${architecture}/plugins
+
+    mkdir -p $out/nix-support
+    printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
+
+    # Set JAVA_HOME automatically.
+    cat <<EOF >> $out/nix-support/setup-hook
+    if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
+    EOF
+  '';
+
+  postFixup = ''
+    rpath+="''${rpath:+:}${stdenv.lib.concatStringsSep ":" (map (a: "$jrePath/${a}") rSubPaths)}"
+
+    # set all the dynamic linkers
+    find $out -type f -perm -0100 \
+        -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+        --set-rpath "$rpath" {} \;
+
+    find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
+
+    # Oracle Java Mission Control needs to know where libgtk-x11 and related is
+    if test -n "$installjdk" -a -x $out/bin/jmc; then
+      wrapProgram "$out/bin/jmc" \
+          --suffix-each LD_LIBRARY_PATH ':' "$rpath"
+    fi
+  '';
+
+  inherit installjdk pluginSupport;
+
+  /**
+   * libXt is only needed on amd64
+   */
+  libraries =
+    [stdenv.cc.libc glib libxml2 libav_0_8 ffmpeg_3 libxslt libGL xorg.libXxf86vm alsaLib fontconfig freetype pango gtk2 cairo gdk-pixbuf atk] ++
+    (if swingSupport then [xorg.libX11 xorg.libXext xorg.libXtst xorg.libXi xorg.libXp xorg.libXt xorg.libXrender stdenv.cc.cc] else []);
+
+  rpath = stdenv.lib.strings.makeLibraryPath libraries;
+
+  passthru.mozillaPlugin = if installjdk then "/jre/lib/${architecture}/plugins" else "/lib/${architecture}/plugins";
+
+  passthru.jre = result; # FIXME: use multiple outputs or return actual JRE package
+
+  passthru.home = result;
+
+  passthru.architecture = architecture;
+
+  meta = with stdenv.lib; {
+    license = licenses.unfree;
+    platforms = [ "i686-linux" "x86_64-linux" "armv7l-linux" "aarch64-linux" ]; # some inherit jre.meta.platforms
+  };
+
+}; in result
diff --git a/nixpkgs/pkgs/development/compilers/oraclejdk/jdk8-linux.nix b/nixpkgs/pkgs/development/compilers/oraclejdk/jdk8-linux.nix
new file mode 100644
index 000000000000..3c4a2b7850f1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/oraclejdk/jdk8-linux.nix
@@ -0,0 +1,10 @@
+import ./jdk-linux-base.nix {
+  productVersion = "8";
+  patchVersion = "251";
+  sha256.i686-linux = "0c6d25c09459e435570204f1a22a1cb765ce5d62c5bced92c9a9546b7be337f2";
+  sha256.x86_64-linux = "777a8d689e863275a647ae52cb30fd90022a3af268f34fc5b9867ce32f1b374e";
+  sha256.armv7l-linux = "f1b0c979e1b61ec52ebd5e1d0b754d7681d8623b09ac90c69718a553ef9b0cd1";
+  sha256.aarch64-linux = "58baeaab7da97dd5a6b02ad2dcd77c14b3b6ba014029ee67dbc2bd5f0fa98d1b";
+  jceName = "jce_policy-8.zip";
+  sha256JCE = "0n8b6b8qmwb14lllk2lk1q1ahd3za9fnjigz5xn65mpg48whl0pk";
+}
diff --git a/nixpkgs/pkgs/development/compilers/orc/default.nix b/nixpkgs/pkgs/development/compilers/orc/default.nix
new file mode 100644
index 000000000000..34e79945f612
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/orc/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchurl }:
+
+stdenv.mkDerivation rec {
+  name = "orc-0.4.29";
+
+  src = fetchurl {
+    url = "https://gstreamer.freedesktop.org/src/orc/${name}.tar.xz";
+    sha256 = "1cisbbn69p9c8vikn0nin14q0zscby5m8cyvzxyw2pjb2kwh32ag";
+  };
+
+  outputs = [ "out" "dev" ];
+  outputBin = "dev"; # compilation tools
+
+  postInstall = ''
+    sed "/^toolsdir=/ctoolsdir=$dev/bin" -i "$dev"/lib/pkgconfig/orc*.pc
+  '';
+
+  # i686   https://gitlab.freedesktop.org/gstreamer/orc/issues/18
+  # armv7l https://gitlab.freedesktop.org/gstreamer/orc/issues/9
+  doCheck = (!stdenv.hostPlatform.isi686 && !stdenv.hostPlatform.isAarch32);
+
+  meta = with stdenv.lib; {
+    description = "The Oil Runtime Compiler";
+    homepage = "https://gstreamer.freedesktop.org/projects/orc.html";
+    # The source code implementing the Marsenne Twister algorithm is licensed
+    # under the 3-clause BSD license. The rest is 2-clause BSD license.
+    license = with licenses; [ bsd3 bsd2 ];
+    platforms = platforms.unix;
+    maintainers = [ ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/osl/default.nix b/nixpkgs/pkgs/development/compilers/osl/default.nix
new file mode 100644
index 000000000000..e9ca1bf35b88
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/osl/default.nix
@@ -0,0 +1,39 @@
+{ clangStdenv, stdenv, fetchFromGitHub, cmake, zlib, openexr,
+openimageio, llvm, boost165, flex, bison, partio, pugixml,
+utillinux, python
+}:
+
+let boost_static = boost165.override { enableStatic = true; };
+in clangStdenv.mkDerivation rec {
+  # In theory this could use GCC + Clang rather than just Clang,
+  # but https://github.com/NixOS/nixpkgs/issues/29877 stops this
+  name = "openshadinglanguage-${version}";
+  version = "1.10.9";
+
+  src = fetchFromGitHub {
+    owner = "imageworks";
+    repo = "OpenShadingLanguage";
+    rev = "Release-1.10.9";
+    sha256 = "1dwf10f2fpxc55pymwkapql20nc462mq61hv21c527994c2qp1ll";
+  };
+
+  cmakeFlags = [ "-DUSE_BOOST_WAVE=ON" "-DENABLERTTI=ON" ];
+  enableParallelBuilding = true;
+
+  preConfigure = '' patchShebangs src/liboslexec/serialize-bc.bash '';
+  
+  buildInputs = [
+     cmake zlib openexr openimageio llvm
+     boost_static flex bison partio pugixml
+     utillinux # needed just for hexdump
+     python # CMake doesn't check this?
+  ];
+  # TODO: How important is partio? CMake doesn't seem to find it
+  meta = with stdenv.lib; {
+    description = "Advanced shading language for production GI renderers";
+    homepage = "http://opensource.imageworks.com/?p=osl";
+    maintainers = with maintainers; [ hodapp ];
+    license = licenses.bsd3;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/owl-lisp/default.nix b/nixpkgs/pkgs/development/compilers/owl-lisp/default.nix
new file mode 100644
index 000000000000..80ea9eb4c0b8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/owl-lisp/default.nix
@@ -0,0 +1,31 @@
+{ stdenv, fetchFromGitLab, coreutils, which }:
+
+stdenv.mkDerivation rec {
+  pname = "owl-lisp";
+  version = "0.1.19";
+
+  src = fetchFromGitLab {
+    owner  = "owl-lisp";
+    repo   = "owl";
+    rev    = "v${version}";
+    sha256 = "1bgjd2gkr5risfcc401rlr5fc82gwm4r2gpp9gzkg9h64acivkjx";
+  };
+
+  nativeBuildInputs = [ which ];
+
+  prePatch = ''
+    substituteInPlace Makefile \
+      --replace /usr $out
+  '';
+
+  # tests are run as part of the compilation process
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    description = "A functional Scheme for world domination";
+    homepage    = "https://gitlab.com/owl-lisp/owl";
+    license     = licenses.mit;
+    maintainers = with maintainers; [ peterhoeg ];
+    platforms   = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/pakcs/curry-base.nix b/nixpkgs/pkgs/development/compilers/pakcs/curry-base.nix
new file mode 100644
index 000000000000..b34a2146383c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/pakcs/curry-base.nix
@@ -0,0 +1,16 @@
+{ mkDerivation, base, Cabal, containers, directory, extra, filepath
+, mtl, parsec, pretty, stdenv, time, transformers
+}:
+mkDerivation {
+  pname = "curry-base";
+  version = "1.1.0";
+  src = ./.;
+  libraryHaskellDepends = [
+    base containers directory extra filepath mtl parsec pretty time
+    transformers
+  ];
+  testHaskellDepends = [ base Cabal filepath mtl ];
+  homepage = "http://curry-language.org";
+  description = "Functions for manipulating Curry programs";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/nixpkgs/pkgs/development/compilers/pakcs/curry-frontend.nix b/nixpkgs/pkgs/development/compilers/pakcs/curry-frontend.nix
new file mode 100644
index 000000000000..b169578c7c38
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/pakcs/curry-frontend.nix
@@ -0,0 +1,26 @@
+{ mkDerivation, base, bytestring, Cabal, containers, curry-base
+, directory, extra, file-embed, filepath, mtl, network-uri, pretty
+, process, set-extra, stdenv, template-haskell, transformers
+}:
+mkDerivation {
+  pname = "curry-frontend";
+  version = "1.0.4";
+  src = ./.;
+  isLibrary = true;
+  isExecutable = true;
+  enableSeparateDataOutput = true;
+  libraryHaskellDepends = [
+    base bytestring containers curry-base directory extra file-embed
+    filepath mtl network-uri pretty process set-extra template-haskell
+    transformers
+  ];
+  executableHaskellDepends = [
+    base bytestring containers curry-base directory extra file-embed
+    filepath mtl network-uri pretty process set-extra template-haskell
+    transformers
+  ];
+  testHaskellDepends = [ base Cabal curry-base filepath ];
+  homepage = "http://curry-language.org";
+  description = "Compile the functional logic language Curry to several intermediate formats";
+  license = stdenv.lib.licenses.bsd3;
+}
diff --git a/nixpkgs/pkgs/development/compilers/pakcs/default.nix b/nixpkgs/pkgs/development/compilers/pakcs/default.nix
new file mode 100644
index 000000000000..0183039b11d8
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/pakcs/default.nix
@@ -0,0 +1,99 @@
+{ stdenv, fetchurl, makeWrapper
+, haskellPackages, haskell
+, which, swiProlog, rlwrap, tk
+, curl, git, unzip, gnutar, coreutils, sqlite }:
+
+let
+  name = "pakcs-2.2.0";
+
+  # Don't switch to development release without a reason, because its
+  # source updates without version bump. Prefer current release instead.
+  src = fetchurl {
+    url = "https://www.informatik.uni-kiel.de/~pakcs/download/${name}-src.tar.gz";
+    sha256 = "0c0a6cp9lwha5i90kv9ya2zi1ggnvkf4gwjfzbffgwwa77s2wz2l";
+  };
+
+  curry-frontend = (haskellPackages.override {
+    overrides = self: super: {
+      curry-base = haskell.lib.overrideCabal (super.callPackage ./curry-base.nix {}) (drv: {
+        inherit src;
+        postUnpack = "sourceRoot+=/frontend/curry-base";
+      });
+      curry-frontend = haskell.lib.overrideCabal (super.callPackage ./curry-frontend.nix {}) (drv: {
+        inherit src;
+        postUnpack = "sourceRoot+=/frontend/curry-frontend";
+      });
+    };
+  }).curry-frontend;
+in stdenv.mkDerivation {
+  inherit name src;
+
+  buildInputs = [ swiProlog ];
+  nativeBuildInputs = [ which makeWrapper ];
+
+  makeFlags = [
+    "CURRYFRONTEND=${curry-frontend}/bin/curry-frontend"
+    "DISTPKGINSTALL=yes"
+    # Not needed, just to make script pass
+    "CURRYTOOLSDIR=0"
+    "CURRYLIBSDIR=0"
+  ];
+
+  preConfigure = ''
+    # Since we can't expand $out in `makeFlags`
+    #makeFlags="$makeFlags PAKCSINSTALLDIR=$out/pakcs"
+
+    for file in currytools/cpm/src/CPM/Repository.curry \
+                currytools/cpm/src/CPM/Repository/CacheDB.curry \
+                scripts/compile-all-libs.sh \
+                scripts/cleancurry.sh \
+                examples/test.sh testsuite/test.sh lib/test.sh; do
+        substituteInPlace $file --replace "/bin/rm" "rm"
+    done
+  '' ;
+
+  # cypm new: EXISTENCE ERROR: source_sink
+  # "/tmp/nix-build-pakcs-2.0.2.drv-0/pakcs-2.0.2/currytools/cpm/templates/LICENSE"
+  # does not exist
+  buildPhase = ''
+    mkdir -p $out/pakcs
+    cp -r * $out/pakcs
+    (cd $out/pakcs ; make -j$NIX_BUILD_CORES $makeFlags)
+  '';
+
+  installPhase = ''
+    ln -s $out/pakcs/bin $out
+
+    mkdir -p $out/share/emacs/site-lisp
+    ln -s $out/pakcs/tools/emacs $out/share/emacs/site-lisp/curry-pakcs
+
+    wrapProgram $out/pakcs/bin/pakcs \
+      --prefix PATH ":" "${rlwrap}/bin" \
+      --prefix PATH ":" "${tk}/bin"
+
+    # List of dependencies from currytools/cpm/src/CPM/Main.curry
+    wrapProgram $out/pakcs/bin/cypm \
+      --prefix PATH ":" "${stdenv.lib.makeBinPath [ curl git unzip gnutar coreutils sqlite ]}"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "http://www.informatik.uni-kiel.de/~pakcs/";
+    description = "An implementation of the multi-paradigm declarative language Curry";
+    license = licenses.bsd3;
+
+    longDescription = ''
+      PAKCS is an implementation of the multi-paradigm declarative language
+      Curry jointly developed by the Portland State University, the Aachen
+      University of Technology, and the University of Kiel. Although this is
+      not a highly optimized implementation but based on a high-level
+      compilation of Curry programs into Prolog programs, it is not a toy
+      implementation but has been used for a variety of applications (e.g.,
+      graphical programming environments, an object-oriented front-end for
+      Curry, partial evaluators, database applications, HTML programming
+      with dynamic web pages, prototyping embedded systems).
+    '';
+
+    maintainers = with maintainers; [ kkallio gnidorah ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/pforth/default.nix b/nixpkgs/pkgs/development/compilers/pforth/default.nix
new file mode 100644
index 000000000000..c13d28c6a3bb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/pforth/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation {
+  version = "28";
+  pname = "pforth";
+  src = fetchFromGitHub {
+    owner = "philburk";
+    repo = "pforth";
+    rev = "9190005e32c6151b76ac707b30eeb4d5d9dd1d36";
+    sha256 = "0k3pmcgybsnwrxy75piyb2420r8d4ij190606js32j99062glr3x";
+  };
+
+  makeFlags = [ "SRCDIR=." ];
+  makefile = "build/unix/Makefile";
+
+  installPhase = ''
+    install -Dm755 pforth_standalone $out/bin/pforth
+  '';
+
+
+  meta = {
+    description = "Portable ANSI style Forth written in ANSI C";
+    homepage = "http://www.softsynth.com/pforth/";
+    license = stdenv.lib.licenses.publicDomain;
+    platforms = stdenv.lib.platforms.unix;
+    maintainers = with stdenv.lib.maintainers; [ yrashk ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/picat/default.nix b/nixpkgs/pkgs/development/compilers/picat/default.nix
new file mode 100644
index 000000000000..91e29a740c2f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/picat/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchurl, zlib }:
+
+stdenv.mkDerivation {
+  pname = "picat";
+  version = "2.8-2";
+
+  src = fetchurl {
+    url = "http://picat-lang.org/download/picat28_src.tar.gz";
+    sha256 = "10hf2fxxbpq28gi39icr8c9wafdiy9ddfkk6l4rx7kkqyrdi7n85";
+  };
+
+  buildInputs = [ zlib ];
+
+  ARCH = if stdenv.hostPlatform.system == "i686-linux" then "linux32"
+         else if stdenv.hostPlatform.system == "x86_64-linux" then "linux64"
+         else throw "Unsupported system";
+
+  hardeningDisable = [ "format" ];
+
+  buildPhase = ''
+    cd emu
+    make -f Makefile.$ARCH
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp picat $out/bin/picat
+  '';
+
+  meta = {
+    description = "Logic-based programming langage";
+    longDescription = ''
+      Picat is a simple, and yet powerful, logic-based multi-paradigm
+      programming language aimed for general-purpose applications.
+    '';
+    homepage = "http://picat-lang.org/";
+    license = stdenv.lib.licenses.mpl20;
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.earldouglas ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/polyml/5.6.nix b/nixpkgs/pkgs/development/compilers/polyml/5.6.nix
new file mode 100644
index 000000000000..714adfb0e4cb
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/polyml/5.6.nix
@@ -0,0 +1,34 @@
+{stdenv, fetchurl, autoreconfHook}:
+
+let
+  version = "5.6";
+in
+
+stdenv.mkDerivation {
+  pname = "polyml";
+  inherit version;
+
+  prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
+    substituteInPlace configure.ac --replace stdc++ c++
+  '';
+
+  buildInputs = stdenv.lib.optional stdenv.isDarwin autoreconfHook;
+
+  src = fetchurl {
+    url = "mirror://sourceforge/polyml/polyml.${version}.tar.gz";
+    sha256 = "05d6l2a5m9jf32a8kahwg2p2ph4x9rjf1nsl83331q3gwn5bkmr0";
+  };
+
+  meta = {
+    description = "Standard ML compiler and interpreter";
+    longDescription = ''
+      Poly/ML is a full implementation of Standard ML.
+    '';
+    homepage = "https://www.polyml.org/";
+    license = stdenv.lib.licenses.lgpl21;
+    platforms = with stdenv.lib.platforms; linux;
+    maintainers = [ #Add your name here!
+      stdenv.lib.maintainers.maggesi
+    ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/polyml/5.7-new-libffi-FFI_SYSV.patch b/nixpkgs/pkgs/development/compilers/polyml/5.7-new-libffi-FFI_SYSV.patch
new file mode 100644
index 000000000000..c5c9846300f1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/polyml/5.7-new-libffi-FFI_SYSV.patch
@@ -0,0 +1,34 @@
+For 5.7 the copyright header is different.
+
+From ad32de7f181acaffaba78d5c3d9e5aa6b84a741c Mon Sep 17 00:00:00 2001
+From: David Matthews <dm@prolingua.co.uk>
+Date: Sun, 7 Apr 2019 13:41:33 +0100
+Subject: [PATCH] Remove FFI_SYSV from abi table for X86/64 Unix.  It appears
+ that this has been removed in upstream versions of libffi and causes problems
+ when building using the system libffi.
+
+---
+ libpolyml/polyffi.cpp | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/libpolyml/polyffi.cpp b/libpolyml/polyffi.cpp
+index 5424dd84..3dc9cc7c 100644
+--- a/libpolyml/polyffi.cpp
++++ b/libpolyml/polyffi.cpp
+@@ -1,7 +1,7 @@
+ /*
+     Title:  New Foreign Function Interface
+
+-    Copyright (c) 2015  David C.J. Matthews
++    Copyright (c) 2015, 2019  David C.J. Matthews
+
+     This library is free software; you can redistribute it and/or
+     modify it under the terms of the GNU Lesser General Public
+@@ -109,7 +109,6 @@ static struct _abiTable { const char *abiName; ffi_abi abiCode; } abiTable[] =
+ #elif defined(X86_WIN64)
+     {"win64", FFI_WIN64},
+ #elif defined(X86_ANY)
+-    {"sysv", FFI_SYSV},
+     {"unix64", FFI_UNIX64},
+ #endif
+     { "default", FFI_DEFAULT_ABI}
diff --git a/nixpkgs/pkgs/development/compilers/polyml/5.7.nix b/nixpkgs/pkgs/development/compilers/polyml/5.7.nix
new file mode 100644
index 000000000000..ce8c033e4bed
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/polyml/5.7.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchFromGitHub, autoreconfHook, gmp, libffi }:
+
+stdenv.mkDerivation rec {
+  pname = "polyml";
+  version = "5.7.1";
+
+  prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
+    substituteInPlace configure.ac --replace stdc++ c++
+  '';
+
+  patches = [ ./5.7-new-libffi-FFI_SYSV.patch ];
+
+  buildInputs = [ libffi gmp ];
+
+  nativeBuildInputs = stdenv.lib.optional stdenv.isDarwin autoreconfHook;
+
+  configureFlags = [
+    "--enable-shared"
+    "--with-system-libffi"
+    "--with-gmp"
+  ];
+
+  src = fetchFromGitHub {
+    owner = "polyml";
+    repo = "polyml";
+    rev = "v${version}";
+    sha256 = "0j0wv3ijfrjkfngy7dswm4k1dchk3jak9chl5735dl8yrl8mq755";
+  };
+
+  meta = with stdenv.lib; {
+    description = "Standard ML compiler and interpreter";
+    longDescription = ''
+      Poly/ML is a full implementation of Standard ML.
+    '';
+    homepage = "https://www.polyml.org/";
+    license = licenses.lgpl21;
+    platforms = with platforms; (linux ++ darwin);
+    maintainers = with maintainers; [ maggesi ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/polyml/default.nix b/nixpkgs/pkgs/development/compilers/polyml/default.nix
new file mode 100644
index 000000000000..657673465375
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/polyml/default.nix
@@ -0,0 +1,46 @@
+{ stdenv, fetchFromGitHub, fetchpatch, autoreconfHook, gmp, libffi }:
+
+stdenv.mkDerivation rec {
+  pname = "polyml";
+  version = "5.8";
+
+  prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
+    substituteInPlace configure.ac --replace stdc++ c++
+  '';
+
+  patches = [
+    (fetchpatch {
+      name = "new-libffi-FFI_SYSV.patch";
+      url = "https://github.com/polyml/polyml/commit/ad32de7f181acaffaba78d5c3d9e5aa6b84a741c.patch";
+      sha256 = "007q3r2h9kfh3c1nv0dyhipmak44q468ab9bwnz4kk4a2dq76n8v";
+    })
+  ];
+
+  buildInputs = [ libffi gmp ];
+
+  nativeBuildInputs = stdenv.lib.optional stdenv.isDarwin autoreconfHook;
+
+  configureFlags = [
+    "--enable-shared"
+    "--with-system-libffi"
+    "--with-gmp"
+  ];
+
+  src = fetchFromGitHub {
+    owner = "polyml";
+    repo = "polyml";
+    rev = "v${version}";
+    sha256 = "1s7q77bivppxa4vd7gxjj5dbh66qnirfxnkzh1ql69rfx1c057n3";
+  };
+
+  meta = with stdenv.lib; {
+    description = "Standard ML compiler and interpreter";
+    longDescription = ''
+      Poly/ML is a full implementation of Standard ML.
+    '';
+    homepage = "https://www.polyml.org/";
+    license = licenses.lgpl21;
+    platforms = with platforms; (linux ++ darwin);
+    maintainers = with maintainers; [ maggesi kovirobi ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/ponyc/default.nix b/nixpkgs/pkgs/development/compilers/ponyc/default.nix
new file mode 100644
index 000000000000..e48e454a0a40
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ponyc/default.nix
@@ -0,0 +1,85 @@
+{ stdenv, fetchFromGitHub, llvm, makeWrapper, pcre2, coreutils, which, libressl, libxml2,
+  cc ? stdenv.cc, lto ? !stdenv.isDarwin }:
+
+stdenv.mkDerivation ( rec {
+  pname = "ponyc";
+  version = "0.33.2";
+
+  src = fetchFromGitHub {
+    owner = "ponylang";
+    repo = pname;
+    rev = version;
+    sha256 = "0jcdr1r3g8sm3q9fcc87d6x98fg581n6hb90hz7r08mzn4bwvysw";
+  };
+
+  buildInputs = [ llvm makeWrapper which libxml2 ];
+  propagatedBuildInputs = [ cc ];
+
+  # Disable problematic networking tests
+  patches = [ ./disable-tests.patch ];
+
+  preBuild = ''
+    # Fix tests
+    substituteInPlace packages/process/_test.pony \
+        --replace '"/bin/' '"${coreutils}/bin/'
+    substituteInPlace packages/process/_test.pony \
+        --replace '=/bin' "${coreutils}/bin"
+
+    # Disabling the stdlib tests
+    substituteInPlace Makefile-ponyc \
+        --replace 'test-ci: all check-version test-core test-stdlib-debug test-stdlib' 'test-ci: all check-version test-core'
+
+    # Remove impure system refs
+    substituteInPlace src/libponyc/pkg/package.c \
+        --replace "/usr/local/lib" "" \
+        --replace "/opt/local/lib" ""
+
+    for file in `grep -irl '/usr/local/opt/libressl/lib' ./*`; do
+      substituteInPlace $file  --replace '/usr/local/opt/libressl/lib' "${stdenv.lib.getLib libressl}/lib"
+    done
+
+    export LLVM_CONFIG=${llvm}/bin/llvm-config
+  '' + stdenv.lib.optionalString ((!stdenv.isDarwin) && (!cc.isClang) && lto) ''
+    export LTO_PLUGIN=`find ${cc.cc}/ -name liblto_plugin.so`
+  '' + stdenv.lib.optionalString ((!stdenv.isDarwin) && (cc.isClang) && lto) ''
+    export LTO_PLUGIN=`find ${cc.cc}/ -name LLVMgold.so`
+  '';
+
+  makeFlags = [ "config=release" ] ++ stdenv.lib.optionals stdenv.isDarwin [ "bits=64" ]
+              ++ stdenv.lib.optionals (stdenv.isDarwin && (!lto)) [ "lto=no" ];
+
+  enableParallelBuilding = true;
+
+  doCheck = true;
+
+  checkTarget = "test-ci";
+
+  NIX_CFLAGS_COMPILE = [ "-Wno-error=redundant-move" ];
+
+  preCheck = ''
+    export PONYPATH="$out/lib:${stdenv.lib.makeLibraryPath [ pcre2 libressl ]}"
+  '';
+
+  installPhase = ''
+    make config=release prefix=$out ''
+    + stdenv.lib.optionalString stdenv.isDarwin '' bits=64 ''
+    + stdenv.lib.optionalString (stdenv.isDarwin && (!lto)) '' lto=no ''
+    + '' install
+
+    wrapProgram $out/bin/ponyc \
+      --prefix PATH ":" "${stdenv.cc}/bin" \
+      --set-default CC "$CC" \
+      --prefix PONYPATH : "${stdenv.lib.makeLibraryPath [ pcre2 libressl (placeholder "out") ]}"
+  '';
+
+  # Stripping breaks linking for ponyc
+  dontStrip = true;
+
+  meta = with stdenv.lib; {
+    description = "Pony is an Object-oriented, actor-model, capabilities-secure, high performance programming language";
+    homepage = "https://www.ponylang.org";
+    license = licenses.bsd2;
+    maintainers = with maintainers; [ doublec kamilchm patternspandemic ];
+    platforms = [ "x86_64-linux" "x86_64-darwin" ];
+  };
+})
diff --git a/nixpkgs/pkgs/development/compilers/ponyc/disable-tests.patch b/nixpkgs/pkgs/development/compilers/ponyc/disable-tests.patch
new file mode 100644
index 000000000000..f8c996137af9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ponyc/disable-tests.patch
@@ -0,0 +1,14 @@
+diff --git a/packages/net/_test.pony b/packages/net/_test.pony
+index baf29e7..b63f368 100644
+--- a/packages/net/_test.pony
++++ b/packages/net/_test.pony
+@@ -5,9 +5,6 @@ actor Main is TestList
+   new make() => None
+ 
+   fun tag tests(test: PonyTest) =>
+-    ifdef not osx then
+-      test(_TestBroadcast)
+-    end
+     test(_TestTCPWritev)
+     test(_TestTCPExpect)
+     test(_TestTCPMute)
diff --git a/nixpkgs/pkgs/development/compilers/ponyc/pony-stable.nix b/nixpkgs/pkgs/development/compilers/ponyc/pony-stable.nix
new file mode 100644
index 000000000000..0a526023902f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/ponyc/pony-stable.nix
@@ -0,0 +1,25 @@
+{stdenv, fetchFromGitHub, ponyc }:
+
+stdenv.mkDerivation rec {
+  pname = "pony-stable";
+  version = "0.2.2";
+
+  src = fetchFromGitHub {
+    owner = "ponylang";
+    repo = "pony-stable";
+    rev = version;
+    sha256 = "0nzvsqvl315brp3yb4j5kl82xnkmib4jk416jjc7yrz4k3jgr278";
+  };
+
+  buildInputs = [ ponyc ];
+
+  installFlags = [ "prefix=${placeholder "out"}" "install" ];
+
+  meta = {
+    description = "A simple dependency manager for the Pony language.";
+    homepage = "https://www.ponylang.org";
+    license = stdenv.lib.licenses.bsd2;
+    maintainers = with stdenv.lib.maintainers; [ dipinhora kamilchm patternspandemic ];
+    platforms = stdenv.lib.platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/purescript/psc-package/default.nix b/nixpkgs/pkgs/development/compilers/purescript/psc-package/default.nix
new file mode 100644
index 000000000000..0bebd5d2f50d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/purescript/psc-package/default.nix
@@ -0,0 +1,61 @@
+# Based on https://github.com/justinwoo/easy-purescript-nix/blob/master/psc-package-simple.nix
+{ stdenv, lib, fetchurl, gmp, zlib, libiconv, darwin, installShellFiles }:
+
+let
+  dynamic-linker = stdenv.cc.bintools.dynamicLinker;
+
+in
+stdenv.mkDerivation rec {
+  pname = "psc-package-simple";
+
+  version = "0.6.2";
+
+  src = if stdenv.isDarwin
+  then fetchurl {
+    url = "https://github.com/purescript/psc-package/releases/download/v0.6.2/macos.tar.gz";
+    sha256 = "17dh3bc5b6ahfyx0pi6n9qnrhsyi83qdynnca6k1kamxwjimpcq1";
+  }
+  else fetchurl {
+    url = "https://github.com/purescript/psc-package/releases/download/v0.6.2/linux64.tar.gz";
+    sha256 = "1zvay9q3xj6yd76w6qyb9la4jaj9zvpf4dp78xcznfqbnbhm1a54";
+  };
+
+  buildInputs = [ gmp zlib ];
+  nativeBuildInputs = [ installShellFiles ];
+
+  libPath = lib.makeLibraryPath buildInputs;
+
+  dontStrip = true;
+
+  installPhase = ''
+    mkdir -p $out/bin
+
+    PSC_PACKAGE=$out/bin/psc-package
+
+    install -D -m555 -T psc-package $PSC_PACKAGE
+    chmod u+w $PSC_PACKAGE
+  '' + lib.optionalString stdenv.isDarwin ''
+    install_name_tool \
+      -change /usr/lib/libSystem.B.dylib ${darwin.Libsystem}/lib/libSystem.B.dylib \
+      -change /usr/lib/libiconv.2.dylib ${libiconv}/libiconv.2.dylib \
+      $PSC_PACKAGE
+  '' + lib.optionalString (!stdenv.isDarwin) ''
+    patchelf --interpreter ${dynamic-linker} --set-rpath ${libPath} $PSC_PACKAGE
+  '' + ''
+    chmod u-w $PSC_PACKAGE
+
+    $PSC_PACKAGE --bash-completion-script $PSC_PACKAGE > psc-package.bash
+    $PSC_PACKAGE --fish-completion-script $PSC_PACKAGE > psc-package.fish
+    $PSC_PACKAGE --zsh-completion-script $PSC_PACKAGE > _psc-package
+    installShellCompletion \
+      psc-package.{bash,fish} \
+      --zsh _psc-package
+  '';
+
+  meta = with lib; {
+    description = "A package manager for PureScript based on package sets";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ Profpatsch ];
+    platforms = [ "x86_64-darwin" "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/purescript/purescript/default.nix b/nixpkgs/pkgs/development/compilers/purescript/purescript/default.nix
new file mode 100644
index 000000000000..8a7fb96723a7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/purescript/purescript/default.nix
@@ -0,0 +1,65 @@
+{ stdenv, pkgs, fetchurl, zlib, gmp, ncurses5, lib }:
+
+# from justinwoo/easy-purescript-nix
+# https://github.com/justinwoo/easy-purescript-nix/blob/d383972c82620a712ead4033db14110497bc2c9c/purs.nix
+
+let
+  dynamic-linker = stdenv.cc.bintools.dynamicLinker;
+
+  patchelf = libPath :
+    if stdenv.isDarwin
+      then ""
+      else
+        ''
+          chmod u+w $PURS
+          patchelf --interpreter ${dynamic-linker} --set-rpath ${libPath} $PURS
+          chmod u-w $PURS
+        '';
+
+in stdenv.mkDerivation rec {
+  pname = "purescript";
+  version = "0.13.8";
+
+  src =
+    if stdenv.isDarwin
+    then
+    fetchurl {
+      url = "https://github.com/${pname}/${pname}/releases/download/v${version}/macos.tar.gz";
+      sha256 = "058w8w24g7xbdkn5l97jfj9dcg81vkfh3w8112anj982lynk6391";
+    }
+    else
+    fetchurl {
+      url = "https://github.com/${pname}/${pname}/releases/download/v${version}/linux64.tar.gz";
+      sha256 = "01xb9sl6rmg02ypdrv4n0mkzmdr5y9rajcdmg9c3j46q7z6q9mxy";
+    };
+
+
+  buildInputs = [ zlib
+                  gmp
+                  ncurses5 ];
+  libPath = lib.makeLibraryPath buildInputs;
+  dontStrip = true;
+
+  installPhase = ''
+    mkdir -p $out/bin
+    PURS="$out/bin/purs"
+
+    install -D -m555 -T purs $PURS
+    ${patchelf libPath}
+
+    mkdir -p $out/etc/bash_completion.d/
+    $PURS --bash-completion-script $PURS > $out/etc/bash_completion.d/purs-completion.bash
+  '';
+
+  passthru.tests = {
+    minimal-module = pkgs.callPackage ./test-minimal-module {};
+  };
+
+  meta = with stdenv.lib; {
+    description = "A strongly-typed functional programming language that compiles to JavaScript";
+    homepage = "https://www.purescript.org/";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ justinwoo mbbx6spp cdepillabout ];
+    platforms = [ "x86_64-linux" "x86_64-darwin" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/purescript/purescript/test-minimal-module/Main.js b/nixpkgs/pkgs/development/compilers/purescript/purescript/test-minimal-module/Main.js
new file mode 100644
index 000000000000..a3547e206b7c
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/purescript/purescript/test-minimal-module/Main.js
@@ -0,0 +1,8 @@
+"use strict"
+
+exports.log = function (s) {
+    return function () {
+        console.log(s);
+        return {};
+    };
+};
diff --git a/nixpkgs/pkgs/development/compilers/purescript/purescript/test-minimal-module/Main.purs b/nixpkgs/pkgs/development/compilers/purescript/purescript/test-minimal-module/Main.purs
new file mode 100644
index 000000000000..8bf5a23f3469
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/purescript/purescript/test-minimal-module/Main.purs
@@ -0,0 +1,9 @@
+module Main where
+
+foreign import data Effect :: Type -> Type
+data Unit = Unit
+
+foreign import log :: String -> Effect Unit
+
+main :: Effect Unit
+main = log "hello world"
diff --git a/nixpkgs/pkgs/development/compilers/purescript/purescript/test-minimal-module/default.nix b/nixpkgs/pkgs/development/compilers/purescript/purescript/test-minimal-module/default.nix
new file mode 100644
index 000000000000..5f01298960cd
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/purescript/purescript/test-minimal-module/default.nix
@@ -0,0 +1,11 @@
+{ runCommand, purescript, nodejs }:
+
+runCommand "purescript-test-minimal-module" {} ''
+  ${purescript}/bin/purs compile -o ./output ${./.}/Main.purs
+
+  echo 'require("./output/Main/index.js").main()' > node.js
+
+  ${nodejs}/bin/node node.js | grep "hello world" || echo "did not output hello world"
+
+  touch $out
+''
diff --git a/nixpkgs/pkgs/development/compilers/qbe/default.nix b/nixpkgs/pkgs/development/compilers/qbe/default.nix
new file mode 100644
index 000000000000..8926fced482d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/qbe/default.nix
@@ -0,0 +1,22 @@
+{ stdenv, fetchgit }:
+
+stdenv.mkDerivation {
+  pname = "qbe";
+  version = "unstable-2019-07-11";
+
+  src = fetchgit {
+    url = "git://c9x.me/qbe.git";
+    rev = "7bf08ff50729037c8820b26d085905175b5593c8";
+    sha256 = "0w1yack5ky6x6lbw8vn6swsy8s90n6ny0jpkw0866ja677z7qz34";
+  };
+
+  makeFlags = [ "PREFIX=$(out)" ];
+  meta = with stdenv.lib; {
+    homepage = "https://c9x.me/compile/";
+    description = "A small compiler backend written in C";
+    maintainers = with maintainers; [ fgaz ];
+    license = licenses.mit;
+    platforms = platforms.all;
+  };
+}
+
diff --git a/nixpkgs/pkgs/development/compilers/rasm/default.nix b/nixpkgs/pkgs/development/compilers/rasm/default.nix
new file mode 100644
index 000000000000..ced0855597c1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rasm/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl, unzip }:
+
+stdenv.mkDerivation rec {
+  pname = "rasm";
+  version = "0.117";
+
+  src = fetchurl {
+    url = "www.roudoudou.com/export/cpc/rasm/${pname}_v0117_src.zip";
+    sha256 = "1hwily4cfays59qm7qd1ax48i7cpbxhs5l9mfpyn7m2lxsfqrl3z";
+  };
+
+  sourceRoot = ".";
+
+  nativeBuildInputs = [ unzip ];
+
+  buildPhase = ''
+      # according to official documentation
+      cc rasm_v*.c -O2 -lm -lrt -march=native -o rasm
+  '';
+
+  installPhase = ''
+    install -Dt $out/bin rasm
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "http://www.roudoudou.com/rasm/";
+    description = "Z80 assembler";
+    # use -n option to display all licenses
+    license = licenses.mit; # expat version
+    maintainers = [ maintainers.genesis ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/reason/default.nix b/nixpkgs/pkgs/development/compilers/reason/default.nix
new file mode 100644
index 000000000000..5c452d692538
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/reason/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, makeWrapper, fetchFromGitHub, ocaml, findlib, dune
+, fix, menhir, merlin-extend, ppx_tools_versioned, utop, cppo
+}:
+
+stdenv.mkDerivation rec {
+  name = "ocaml${ocaml.version}-reason-${version}";
+  version = "3.6.0";
+
+  src = fetchFromGitHub {
+    owner = "facebook";
+    repo = "reason";
+    rev = "2860cc274b1b5b76a71d0e5190bf67a133d6f809";
+    sha256 = "05wcg0gfln85spjfgsij818h2sp4y6s8bvdcwmzv0r8jblr8402b";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  propagatedBuildInputs = [ menhir merlin-extend ppx_tools_versioned ];
+
+  buildInputs = [ ocaml findlib dune cppo fix utop menhir ];
+
+  buildFlags = [ "build" ]; # do not "make tests" before reason lib is installed
+
+  inherit (dune) installPhase;
+
+  postInstall = ''
+    wrapProgram $out/bin/rtop \
+      --prefix PATH : "${utop}/bin" \
+      --prefix CAML_LD_LIBRARY_PATH : "$CAML_LD_LIBRARY_PATH" \
+      --prefix OCAMLPATH : "$OCAMLPATH:$OCAMLFIND_DESTDIR"
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://reasonml.github.io/";
+    description = "Facebook's friendly syntax to OCaml";
+    license = licenses.mit;
+    inherit (ocaml.meta) platforms;
+    maintainers = [ maintainers.volth ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/rgbds/default.nix b/nixpkgs/pkgs/development/compilers/rgbds/default.nix
new file mode 100644
index 000000000000..6fc21a0ffd10
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rgbds/default.nix
@@ -0,0 +1,36 @@
+{stdenv, fetchFromGitHub, bison, flex, pkg-config, libpng}:
+
+# TODO: byacc is the recommended parser generator but due to https://github.com/rednex/rgbds/issues/333
+# it does not work for the moment. We should switch back to byacc as soon as the fix is integrated
+# in a published version.
+
+stdenv.mkDerivation rec {
+  pname = "rgbds";
+  version = "0.4.0";
+  src = fetchFromGitHub {
+    owner = "rednex";
+    repo = "rgbds";
+    rev = "v${version}";
+    sha256 = "15680964nlsa83nqgxk7knxajn98lddz2hg6jnn8ffmnms5wdam7";
+  };
+  nativeBuildInputs = [ bison flex pkg-config libpng ];
+  installFlags = [ "PREFIX=\${out}" ];
+
+  meta = with stdenv.lib; {
+    homepage = "https://rednex.github.io/rgbds/";
+    description = "A free assembler/linker package for the Game Boy and Game Boy Color";
+    license = licenses.mit;
+    longDescription =
+      ''RGBDS (Rednex Game Boy Development System) is a free assembler/linker package for the Game Boy and Game Boy Color. It consists of:
+
+          - rgbasm (assembler)
+          - rgblink (linker)
+          - rgbfix (checksum/header fixer)
+          - rgbgfx (PNG‐to‐Game Boy graphics converter)
+
+        This is a fork of the original RGBDS which aims to make the programs more like other UNIX tools.
+      '';
+    maintainers = with maintainers; [ matthewbauer ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/rust/0001-Allow-getting-no_std-from-the-config-file.patch b/nixpkgs/pkgs/development/compilers/rust/0001-Allow-getting-no_std-from-the-config-file.patch
new file mode 100644
index 000000000000..0b9359221a78
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/0001-Allow-getting-no_std-from-the-config-file.patch
@@ -0,0 +1,52 @@
+From 036c87c82793f1da9f98445e8e27462cc19bbe0a Mon Sep 17 00:00:00 2001
+From: John Ericson <John.Ericson@Obsidian.Systems>
+Date: Sat, 22 Feb 2020 14:38:38 -0500
+Subject: [PATCH] Allow getting `no_std` from the config file
+
+Currently, it is only set correctly in the sanity checking implicit
+default fallback code. Having a config file at all will for force
+`no_std = false`.
+---
+ src/bootstrap/config.rs | 3 +++
+ src/bootstrap/sanity.rs | 4 +---
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
+index 110c8b844d5..83a6934d477 100644
+--- a/src/bootstrap/config.rs
++++ b/src/bootstrap/config.rs
+@@ -350,6 +350,7 @@ struct TomlTarget {
+     musl_root: Option<String>,
+     wasi_root: Option<String>,
+     qemu_rootfs: Option<String>,
++    no_std: Option<bool>,
+ }
+ 
+ impl Config {
+@@ -610,6 +611,8 @@ impl Config {
+                 target.musl_root = cfg.musl_root.clone().map(PathBuf::from);
+                 target.wasi_root = cfg.wasi_root.clone().map(PathBuf::from);
+                 target.qemu_rootfs = cfg.qemu_rootfs.clone().map(PathBuf::from);
++                target.no_std
++                    = cfg.no_std.unwrap_or(triple.contains("-none-") || triple.contains("nvptx"));
+ 
+                 config.target_config.insert(INTERNER.intern_string(triple.clone()), target);
+             }
+diff --git a/src/bootstrap/sanity.rs b/src/bootstrap/sanity.rs
+index 8ff7056e628..76e721ed8e3 100644
+--- a/src/bootstrap/sanity.rs
++++ b/src/bootstrap/sanity.rs
+@@ -194,9 +194,7 @@ pub fn check(build: &mut Build) {
+ 
+         if target.contains("-none-") || target.contains("nvptx") {
+             if build.no_std(*target).is_none() {
+-                let target = build.config.target_config.entry(target.clone()).or_default();
+-
+-                target.no_std = true;
++                build.config.target_config.entry(target.clone()).or_default();
+             }
+ 
+             if build.no_std(*target) == Some(false) {
+-- 
+2.24.1
+
diff --git a/nixpkgs/pkgs/development/compilers/rust/1_42.nix b/nixpkgs/pkgs/development/compilers/rust/1_42.nix
new file mode 100644
index 000000000000..8717aaf76a23
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/1_42.nix
@@ -0,0 +1,44 @@
+# New rust versions should first go to staging.
+# Things to check after updating:
+# 1. Rustc should produce rust binaries on x86_64-linux, aarch64-linux and x86_64-darwin:
+#    i.e. nix-shell -p fd or @GrahamcOfBorg build fd on github
+#    This testing can be also done by other volunteers as part of the pull
+#    request review, in case platforms cannot be covered.
+# 2. The LLVM version used for building should match with rust upstream.
+# 3. Firefox and Thunderbird should still build on x86_64-linux.
+
+{ stdenv, lib
+, buildPackages
+, newScope, callPackage
+, CoreFoundation, Security
+, llvmPackages_5
+, pkgsBuildTarget, pkgsBuildBuild
+} @ args:
+
+import ./default.nix {
+  rustcVersion = "1.42.0";
+  rustcSha256 = "0x9lxs82may6c0iln0b908cxyn1cv7h03n5cmbx3j1bas4qzks6j";
+
+  # Note: the version MUST be one version prior to the version we're
+  # building
+  bootstrapVersion = "1.41.0";
+
+  # fetch hashes by running `print-hashes.sh 1.42.0`
+  bootstrapHashes = {
+    i686-unknown-linux-gnu = "a93a34f9cf3d35de2496352cb615b42b792eb09db3149b3a278efd2c58fa7897";
+    x86_64-unknown-linux-gnu = "343ba8ef7397eab7b3bb2382e5e4cb08835a87bff5c8074382c0b6930a41948b";
+    arm-unknown-linux-gnueabihf = "d0b33fcc97eeb96d716b30573c7e66affdf9077ecdecb30df2498b49f8284047";
+    armv7-unknown-linux-gnueabihf = "3c8e787fb4f4f304a065e78c38010f0b5722d809f9dafb0e904084bf0f54f7be";
+    aarch64-unknown-linux-gnu = "79ddfb5e2563d0ee09a567fbbe121a2aed3c3bc61255b2787f2dd42183a10f27";
+    i686-apple-darwin = "628134b3fbaf5c0e7a25bd9a2b8d25f6e68bb256c8b04a3332ec979f5a1cd339";
+    x86_64-apple-darwin = "b6504003ab70b11f278e0243a43ba9d6bf75e8ad6819b4058a2b6e3991cc8d7a";
+  };
+
+  selectRustPackage = pkgs: pkgs.rust_1_42;
+
+  rustcPatches = [
+    ./0001-Allow-getting-no_std-from-the-config-file.patch
+  ];
+}
+
+(builtins.removeAttrs args [ "fetchpatch" ])
diff --git a/nixpkgs/pkgs/development/compilers/rust/1_43.nix b/nixpkgs/pkgs/development/compilers/rust/1_43.nix
new file mode 100644
index 000000000000..a1a9d17fcd55
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/1_43.nix
@@ -0,0 +1,42 @@
+# New rust versions should first go to staging.
+# Things to check after updating:
+# 1. Rustc should produce rust binaries on x86_64-linux, aarch64-linux and x86_64-darwin:
+#    i.e. nix-shell -p fd or @GrahamcOfBorg build fd on github
+#    This testing can be also done by other volunteers as part of the pull
+#    request review, in case platforms cannot be covered.
+# 2. The LLVM version used for building should match with rust upstream.
+# 3. Firefox and Thunderbird should still build on x86_64-linux.
+
+{ stdenv, lib
+, buildPackages
+, newScope, callPackage
+, CoreFoundation, Security
+, llvmPackages_5
+, pkgsBuildTarget, pkgsBuildBuild
+} @ args:
+
+import ./default.nix {
+  rustcVersion = "1.43.0";
+  rustcSha256 = "18akhk0wz1my6y9vhardriy2ysc482z0fnjdcgs9gy59kmnarxkm";
+
+  # Note: the version MUST be one version prior to the version we're
+  # building
+  bootstrapVersion = "1.42.0";
+
+  # fetch hashes by running `print-hashes.sh 1.43.0`
+  bootstrapHashes = {
+    i686-unknown-linux-gnu = "1c89c12c8fc1a45dcbcb9ee2e21cc634b8453f1d4cdd658269263de686aab4e4";
+    x86_64-unknown-linux-gnu = "7d1e07ad9c8a33d8d039def7c0a131c5917aa3ea0af3d0cc399c6faf7b789052";
+    arm-unknown-linux-gnueabihf = "6cf776b910d08fb0d1f88be94464e7b20a50f9d8b2ec6372c3c385aec0b70e7a";
+    armv7-unknown-linux-gnueabihf = "a36e7f2bd148e325a7b8e7131b4226266cf522b1a2b12d585dad9c38ef68f4d9";
+    aarch64-unknown-linux-gnu = "fdd39f856a062af265012861949ff6654e2b7103be034d046bec84ebe46e8d2d";
+    x86_64-apple-darwin = "db1055c46e0d54b99da05e88c71fea21b3897e74a4f5ff9390e934f3f050c0a8";
+  };
+
+  selectRustPackage = pkgs: pkgs.rust_1_43;
+
+  rustcPatches = [
+  ];
+}
+
+(builtins.removeAttrs args [ "fetchpatch" ])
diff --git a/nixpkgs/pkgs/development/compilers/rust/binary.nix b/nixpkgs/pkgs/development/compilers/rust/binary.nix
new file mode 100644
index 000000000000..9ae7e51e5fef
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/binary.nix
@@ -0,0 +1,102 @@
+{ stdenv, makeWrapper, bash, curl, darwin
+, version
+, src
+, platform
+, versionType
+}:
+
+let
+  inherit (stdenv.lib) optionalString;
+  inherit (darwin.apple_sdk.frameworks) Security;
+
+  bootstrapping = versionType == "bootstrap";
+
+  installComponents
+    = "rustc,rust-std-${platform}"
+    + (optionalString bootstrapping ",cargo")
+    ;
+in
+
+rec {
+  rustc = stdenv.mkDerivation {
+    name = "rustc-${versionType}-${version}";
+
+    inherit version;
+    inherit src;
+
+    meta = with stdenv.lib; {
+      homepage = "http://www.rust-lang.org/";
+      description = "A safe, concurrent, practical language";
+      maintainers = with maintainers; [ qknight ];
+      license = [ licenses.mit licenses.asl20 ];
+    };
+
+    buildInputs = [ bash ]
+      ++ stdenv.lib.optional stdenv.isDarwin Security;
+
+    postPatch = ''
+      patchShebangs .
+    '';
+
+    installPhase = ''
+      ./install.sh --prefix=$out \
+        --components=${installComponents}
+
+      ${optionalString (stdenv.isLinux && bootstrapping) ''
+        patchelf \
+          --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+          "$out/bin/rustc"
+        patchelf \
+          --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+          "$out/bin/rustdoc"
+        patchelf \
+          --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+          "$out/bin/cargo"
+      ''}
+
+      # Do NOT, I repeat, DO NOT use `wrapProgram` on $out/bin/rustc
+      # (or similar) here. It causes strange effects where rustc loads
+      # the wrong libraries in a bootstrap-build causing failures that
+      # are very hard to track down. For details, see
+      # https://github.com/rust-lang/rust/issues/34722#issuecomment-232164943
+    '';
+
+    setupHooks = ./setup-hook.sh;
+  };
+
+  cargo = stdenv.mkDerivation {
+    name = "cargo-${versionType}-${version}";
+
+    inherit version;
+    inherit src;
+
+    meta = with stdenv.lib; {
+      homepage = "http://www.rust-lang.org/";
+      description = "A safe, concurrent, practical language";
+      maintainers = with maintainers; [ qknight ];
+      license = [ licenses.mit licenses.asl20 ];
+    };
+
+    buildInputs = [ makeWrapper bash ]
+      ++ stdenv.lib.optional stdenv.isDarwin Security;
+
+    postPatch = ''
+      patchShebangs .
+    '';
+
+    installPhase = ''
+      patchShebangs ./install.sh
+      ./install.sh --prefix=$out \
+        --components=cargo
+
+      ${optionalString (stdenv.isLinux && bootstrapping) ''
+        patchelf \
+          --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
+          "$out/bin/cargo"
+      ''}
+
+      wrapProgram "$out/bin/cargo" \
+        --suffix PATH : "${rustc}/bin"
+    '';
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/rust/bootstrap.nix b/nixpkgs/pkgs/development/compilers/rust/bootstrap.nix
new file mode 100644
index 000000000000..7c0b46d55931
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/bootstrap.nix
@@ -0,0 +1,14 @@
+{ stdenv, fetchurl, rust, callPackage, version, hashes }:
+
+let
+  platform = rust.toRustTarget stdenv.hostPlatform;
+
+  src = fetchurl {
+     url = "https://static.rust-lang.org/dist/rust-${version}-${platform}.tar.gz";
+     sha256 = hashes.${platform} or (throw "missing bootstrap url for platform ${platform}");
+  };
+
+in callPackage ./binary.nix
+  { inherit version src platform;
+    versionType = "bootstrap";
+  }
diff --git a/nixpkgs/pkgs/development/compilers/rust/cargo.nix b/nixpkgs/pkgs/development/compilers/rust/cargo.nix
new file mode 100644
index 000000000000..dfea7f6c8ef6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/cargo.nix
@@ -0,0 +1,59 @@
+{ stdenv, file, curl, pkgconfig, python3, openssl, cmake, zlib
+, installShellFiles, makeWrapper, libiconv, cacert, rustPlatform, rustc
+, CoreFoundation, Security
+}:
+
+rustPlatform.buildRustPackage {
+  name = "cargo-${rustc.version}";
+  inherit (rustc) version src;
+
+  # the rust source tarball already has all the dependencies vendored, no need to fetch them again
+  cargoVendorDir = "vendor";
+  buildAndTestSubdir = "src/tools/cargo";
+
+  passthru.rustc = rustc;
+
+  # changes hash of vendor directory otherwise
+  dontUpdateAutotoolsGnuConfigScripts = true;
+
+  nativeBuildInputs = [ pkgconfig cmake installShellFiles makeWrapper ];
+  buildInputs = [ cacert file curl python3 openssl zlib ]
+    ++ stdenv.lib.optionals stdenv.isDarwin [ CoreFoundation Security libiconv ];
+
+  # cargo uses git-rs which is made for a version of libgit2 from recent master that
+  # is not compatible with the current version in nixpkgs.
+  #LIBGIT2_SYS_USE_PKG_CONFIG = 1;
+
+  # fixes: the cargo feature `edition` requires a nightly version of Cargo, but this is the `stable` channel
+  RUSTC_BOOTSTRAP = 1;
+
+  postInstall = ''
+    # NOTE: We override the `http.cainfo` option usually specified in
+    # `.cargo/config`. This is an issue when users want to specify
+    # their own certificate chain as environment variables take
+    # precedence
+    wrapProgram "$out/bin/cargo" \
+      --suffix PATH : "${rustc}/bin" \
+      --set CARGO_HTTP_CAINFO "${cacert}/etc/ssl/certs/ca-bundle.crt" \
+      --set SSL_CERT_FILE "${cacert}/etc/ssl/certs/ca-bundle.crt"
+
+    installManPage src/tools/cargo/src/etc/man/*
+  '';
+
+  checkPhase = ''
+    # Disable cross compilation tests
+    export CFG_DISABLE_CROSS_TESTS=1
+    cargo test
+  '';
+
+  # Disable check phase as there are failures (4 tests fail)
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    homepage = "https://crates.io";
+    description = "Downloads your Rust project's dependencies and builds your project";
+    maintainers = with maintainers; [ retrry ];
+    license = [ licenses.mit licenses.asl20 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/rust/clippy.nix b/nixpkgs/pkgs/development/compilers/rust/clippy.nix
new file mode 100644
index 000000000000..0546ad9bac1a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/clippy.nix
@@ -0,0 +1,34 @@
+{ stdenv, lib, rustPlatform, rustc, Security, patchelf }:
+rustPlatform.buildRustPackage {
+  name = "clippy-${rustc.version}";
+  inherit (rustc) version src;
+
+  # the rust source tarball already has all the dependencies vendored, no need to fetch them again
+  cargoVendorDir = "vendor";
+  buildAndTestSubdir = "src/tools/clippy";
+
+  # changes hash of vendor directory otherwise
+  dontUpdateAutotoolsGnuConfigScripts = true;
+
+  buildInputs = [ rustc rustc.llvm ] ++ stdenv.lib.optionals stdenv.isDarwin [ Security ];
+
+  # fixes: error: the option `Z` is only accepted on the nightly compiler
+  RUSTC_BOOTSTRAP = 1;
+
+  # Without disabling the test the build fails with:
+  # error: failed to run custom build command for `rustc_llvm v0.0.0
+  #   (/private/tmp/nix-build-clippy-1.36.0.drv-0/rustc-1.36.0-src/src/librustc_llvm)
+  doCheck = false;
+
+  preFixup = stdenv.lib.optionalString stdenv.isDarwin ''
+    install_name_tool -add_rpath "${rustc}/lib" $out/bin/clippy-driver
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://rust-lang.github.io/rust-clippy/";
+    description = "A bunch of lints to catch common mistakes and improve your Rust code";
+    maintainers = with maintainers; [ basvandijk ];
+    license = with licenses; [ mit asl20 ];
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/rust/default.nix b/nixpkgs/pkgs/development/compilers/rust/default.nix
new file mode 100644
index 000000000000..d08b63dd643f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/default.nix
@@ -0,0 +1,98 @@
+{ rustcVersion
+, rustcSha256
+, enableRustcDev ? true
+, bootstrapVersion
+, bootstrapHashes
+, selectRustPackage
+, rustcPatches ? []
+}:
+{ stdenv, lib
+, buildPackages
+, newScope, callPackage
+, CoreFoundation, Security
+, llvmPackages_5
+, pkgsBuildTarget, pkgsBuildBuild
+}: rec {
+  toRustTarget = platform: with platform.parsed; let
+    cpu_ = {
+      "armv7a" = "armv7";
+      "armv7l" = "armv7";
+      "armv6l" = "arm";
+    }.${cpu.name} or platform.rustc.arch or cpu.name;
+  in platform.rustc.config
+    or "${cpu_}-${vendor.name}-${kernel.name}${lib.optionalString (abi.name != "unknown") "-${abi.name}"}";
+
+  makeRustPlatform = { rustc, cargo, ... }: rec {
+    rust = {
+      inherit rustc cargo;
+    };
+
+    fetchCargoTarball = buildPackages.callPackage ../../../build-support/rust/fetchCargoTarball.nix {
+      inherit cargo;
+    };
+
+    buildRustPackage = callPackage ../../../build-support/rust {
+      inherit rustc cargo fetchCargoTarball;
+    };
+
+    rustcSrc = callPackage ./rust-src.nix {
+      inherit rustc;
+    };
+  };
+
+  # This just contains tools for now. But it would conceivably contain
+  # libraries too, say if we picked some default/recommended versions from
+  # `cratesIO` to build by Hydra and/or try to prefer/bias in Cargo.lock for
+  # all vendored Carnix-generated nix.
+  #
+  # In the end game, rustc, the rust standard library (`core`, `std`, etc.),
+  # and cargo would themselves be built with `buildRustCreate` like
+  # everything else. Tools and `build.rs` and procedural macro dependencies
+  # would be taken from `buildRustPackages` (and `bootstrapRustPackages` for
+  # anything provided prebuilt or their build-time dependencies to break
+  # cycles / purify builds). In this way, nixpkgs would be in control of all
+  # bootstrapping.
+  packages = {
+    prebuilt = callPackage ./bootstrap.nix {
+      version = bootstrapVersion;
+      hashes = bootstrapHashes;
+    };
+    stable = lib.makeScope newScope (self: let
+      # Like `buildRustPackages`, but may also contain prebuilt binaries to
+      # break cycle. Just like `bootstrapTools` for nixpkgs as a whole,
+      # nothing in the final package set should refer to this.
+      bootstrapRustPackages = self.buildRustPackages.overrideScope' (_: _:
+        lib.optionalAttrs (stdenv.buildPlatform == stdenv.hostPlatform)
+          (selectRustPackage buildPackages).packages.prebuilt);
+      bootRustPlatform = makeRustPlatform bootstrapRustPackages;
+    in {
+      # Packages suitable for build-time, e.g. `build.rs`-type stuff.
+      buildRustPackages = (selectRustPackage buildPackages).packages.stable;
+      # Analogous to stdenv
+      rustPlatform = makeRustPlatform self.buildRustPackages;
+      rustc = self.callPackage ./rustc.nix ({
+        version = rustcVersion;
+        sha256 = rustcSha256;
+        inherit enableRustcDev;
+
+        patches = rustcPatches;
+
+        # Use boot package set to break cycle
+        rustPlatform = bootRustPlatform;
+      } // lib.optionalAttrs (stdenv.cc.isClang && stdenv.hostPlatform == stdenv.buildPlatform) {
+        stdenv = llvmPackages_5.stdenv;
+        pkgsBuildBuild = pkgsBuildBuild // { targetPackages.stdenv = llvmPackages_5.stdenv; };
+        pkgsBuildHost = pkgsBuildBuild // { targetPackages.stdenv = llvmPackages_5.stdenv; };
+        pkgsBuildTarget = pkgsBuildTarget // { targetPackages.stdenv = llvmPackages_5.stdenv; };
+      });
+      rustfmt = self.callPackage ./rustfmt.nix { inherit Security; };
+      cargo = self.callPackage ./cargo.nix {
+        # Use boot package set to break cycle
+        rustPlatform = bootRustPlatform;
+        inherit CoreFoundation Security;
+      };
+      clippy = self.callPackage ./clippy.nix { inherit Security; };
+      rls = self.callPackage ./rls { inherit CoreFoundation Security; };
+    });
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/rust/print-hashes.sh b/nixpkgs/pkgs/development/compilers/rust/print-hashes.sh
new file mode 100755
index 000000000000..957011fad376
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/print-hashes.sh
@@ -0,0 +1,38 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+# All rust-related downloads can be found at
+# https://static.rust-lang.org/dist/index.html.  To find the date on
+# which a particular thing was last updated, look for the *-date.txt
+# file, e.g.
+# https://static.rust-lang.org/dist/channel-rust-beta-date.txt
+
+PLATFORMS=(
+  i686-unknown-linux-gnu
+  x86_64-unknown-linux-gnu
+  arm-unknown-linux-gnueabihf
+  armv7-unknown-linux-gnueabihf
+  aarch64-unknown-linux-gnu
+  x86_64-apple-darwin
+)
+BASEURL=https://static.rust-lang.org/dist
+VERSION=${1:-}
+DATE=${2:-}
+
+if [[ -z $VERSION ]]
+then
+    echo "No version supplied"
+    exit -1
+fi
+
+if [[ -n $DATE ]]
+then
+    BASEURL=$BASEURL/$DATE
+fi
+
+for PLATFORM in "${PLATFORMS[@]}"
+do
+    URL="$BASEURL/rust-$VERSION-$PLATFORM.tar.gz.sha256"
+    SHA256=$(curl -sSfL $URL | cut -d ' ' -f 1)
+    echo "$PLATFORM = \"$SHA256\";"
+done
diff --git a/nixpkgs/pkgs/development/compilers/rust/rls/default.nix b/nixpkgs/pkgs/development/compilers/rust/rls/default.nix
new file mode 100644
index 000000000000..63a3c96a8f92
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/rls/default.nix
@@ -0,0 +1,49 @@
+{ stdenv, makeWrapper, fetchFromGitHub, rustPlatform
+, openssh, openssl, pkgconfig, cmake, zlib, curl, libiconv
+, CoreFoundation, Security }:
+
+rustPlatform.buildRustPackage {
+  pname = "rls";
+  inherit (rustPlatform.rust.rustc) src version;
+
+  # changes hash of vendor directory otherwise
+  dontUpdateAutotoolsGnuConfigScripts = true;
+
+  cargoVendorDir = "vendor";
+  buildAndTestSubdir = "src/tools/rls";
+
+  preBuild = ''
+    # client tests are flaky
+    rm tests/client.rs
+  '';
+
+  # a nightly compiler is required unless we use this cheat code.
+  RUSTC_BOOTSTRAP=1;
+
+  # rls-rustc links to rustc_private crates
+  CARGO_BUILD_RUSTFLAGS = if stdenv.isDarwin then "-C rpath" else null;
+
+  nativeBuildInputs = [ pkgconfig cmake ];
+  buildInputs = [ openssh openssl curl zlib libiconv makeWrapper rustPlatform.rust.rustc.llvm ]
+    ++ (stdenv.lib.optionals stdenv.isDarwin [ CoreFoundation Security ]);
+
+  doCheck = true;
+
+  doInstallCheck = true;
+  installCheckPhase = ''
+    $out/bin/rls --version
+  '';
+
+  RUST_SRC_PATH = rustPlatform.rustcSrc;
+  postInstall = ''
+    wrapProgram $out/bin/rls --set-default RUST_SRC_PATH ${rustPlatform.rustcSrc}
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Rust Language Server - provides information about Rust programs to IDEs and other tools";
+    homepage = "https://github.com/rust-lang/rls/";
+    license = with licenses; [ asl20 /* or */ mit ];
+    maintainers = with maintainers; [ symphorien ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/rust/rust-src.nix b/nixpkgs/pkgs/development/compilers/rust/rust-src.nix
new file mode 100644
index 000000000000..8977fb84caf7
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/rust-src.nix
@@ -0,0 +1,11 @@
+{ stdenv, rustc }:
+
+stdenv.mkDerivation {
+  name = "rust-src";
+  src = rustc.src;
+  phases = [ "unpackPhase" "installPhase" ];
+  installPhase = ''
+    mv src $out
+    rm -rf $out/{ci,doc,etc,grammar,llvm-project,llvm-emscripten,rtstartup,rustllvm,test,tools,vendor,stdarch}
+  '';
+}
diff --git a/nixpkgs/pkgs/development/compilers/rust/rustc.nix b/nixpkgs/pkgs/development/compilers/rust/rustc.nix
new file mode 100644
index 000000000000..40de5f61e034
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/rustc.nix
@@ -0,0 +1,170 @@
+{ stdenv, removeReferencesTo, pkgsBuildBuild, pkgsBuildHost, pkgsBuildTarget
+, fetchurl, file, python3
+, llvm_9, darwin, cmake, rust, rustPlatform
+, pkgconfig, openssl
+, which, libffi
+, withBundledLLVM ? false
+, enableRustcDev ? true
+, version
+, sha256
+, patches ? []
+}:
+
+let
+  inherit (stdenv.lib) optionals optional optionalString;
+  inherit (darwin.apple_sdk.frameworks) Security;
+
+  llvmSharedForBuild = pkgsBuildBuild.llvm_9.override { enableSharedLibraries = true; };
+  llvmSharedForHost = pkgsBuildHost.llvm_9.override { enableSharedLibraries = true; };
+  llvmSharedForTarget = pkgsBuildTarget.llvm_9.override { enableSharedLibraries = true; };
+
+  # For use at runtime
+  llvmShared = llvm_9.override { enableSharedLibraries = true; };
+in stdenv.mkDerivation rec {
+  pname = "rustc";
+  inherit version;
+
+  src = fetchurl {
+    url = "https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz";
+    inherit sha256;
+  };
+
+  __darwinAllowLocalNetworking = true;
+
+  # rustc complains about modified source files otherwise
+  dontUpdateAutotoolsGnuConfigScripts = true;
+
+  # Running the default `strip -S` command on Darwin corrupts the
+  # .rlib files in "lib/".
+  #
+  # See https://github.com/NixOS/nixpkgs/pull/34227
+  #
+  # Running `strip -S` when cross compiling can harm the cross rlibs.
+  # See: https://github.com/NixOS/nixpkgs/pull/56540#issuecomment-471624656
+  stripDebugList = [ "bin" ];
+
+  NIX_LDFLAGS = toString (
+       # when linking stage1 libstd: cc: undefined reference to `__cxa_begin_catch'
+       optional (stdenv.isLinux && !withBundledLLVM) "--push-state --as-needed -lstdc++ --pop-state"
+    ++ optional (stdenv.isDarwin && !withBundledLLVM) "-lc++"
+    ++ optional stdenv.isDarwin "-rpath ${llvmSharedForHost}/lib");
+
+  # Increase codegen units to introduce parallelism within the compiler.
+  RUSTFLAGS = "-Ccodegen-units=10";
+
+  # We need rust to build rust. If we don't provide it, configure will try to download it.
+  # Reference: https://github.com/rust-lang/rust/blob/master/src/bootstrap/configure.py
+  configureFlags = let
+    setBuild  = "--set=target.${rust.toRustTarget stdenv.buildPlatform}";
+    setHost   = "--set=target.${rust.toRustTarget stdenv.hostPlatform}";
+    setTarget = "--set=target.${rust.toRustTarget stdenv.targetPlatform}";
+    ccForBuild  = "${pkgsBuildBuild.targetPackages.stdenv.cc}/bin/${pkgsBuildBuild.targetPackages.stdenv.cc.targetPrefix}cc";
+    cxxForBuild = "${pkgsBuildBuild.targetPackages.stdenv.cc}/bin/${pkgsBuildBuild.targetPackages.stdenv.cc.targetPrefix}c++";
+    ccForHost  = "${pkgsBuildHost.targetPackages.stdenv.cc}/bin/${pkgsBuildHost.targetPackages.stdenv.cc.targetPrefix}cc";
+    cxxForHost = "${pkgsBuildHost.targetPackages.stdenv.cc}/bin/${pkgsBuildHost.targetPackages.stdenv.cc.targetPrefix}c++";
+    ccForTarget  = "${pkgsBuildTarget.targetPackages.stdenv.cc}/bin/${pkgsBuildTarget.targetPackages.stdenv.cc.targetPrefix}cc";
+    cxxForTarget = "${pkgsBuildTarget.targetPackages.stdenv.cc}/bin/${pkgsBuildTarget.targetPackages.stdenv.cc.targetPrefix}c++";
+  in [
+    "--release-channel=stable"
+    "--set=build.rustc=${rustPlatform.rust.rustc}/bin/rustc"
+    "--set=build.cargo=${rustPlatform.rust.cargo}/bin/cargo"
+    "--enable-rpath"
+    "--enable-vendor"
+    "--build=${rust.toRustTarget stdenv.buildPlatform}"
+    "--host=${rust.toRustTarget stdenv.hostPlatform}"
+    "--target=${rust.toRustTarget stdenv.targetPlatform}"
+
+    "${setBuild}.cc=${ccForBuild}"
+    "${setHost}.cc=${ccForHost}"
+    "${setTarget}.cc=${ccForTarget}"
+
+    "${setBuild}.linker=${ccForBuild}"
+    "${setHost}.linker=${ccForHost}"
+    "${setTarget}.linker=${ccForTarget}"
+
+    "${setBuild}.cxx=${cxxForBuild}"
+    "${setHost}.cxx=${cxxForHost}"
+    "${setTarget}.cxx=${cxxForTarget}"
+  ] ++ optionals (!withBundledLLVM) [
+    "--enable-llvm-link-shared"
+    "${setBuild}.llvm-config=${llvmSharedForBuild}/bin/llvm-config"
+    "${setHost}.llvm-config=${llvmSharedForHost}/bin/llvm-config"
+    "${setTarget}.llvm-config=${llvmSharedForTarget}/bin/llvm-config"
+  ] ++ optionals stdenv.isLinux [
+    "--enable-profiler" # build libprofiler_builtins
+  ];
+
+  # The bootstrap.py will generated a Makefile that then executes the build.
+  # The BOOTSTRAP_ARGS used by this Makefile must include all flags to pass
+  # to the bootstrap builder.
+  postConfigure = ''
+    substituteInPlace Makefile \
+      --replace 'BOOTSTRAP_ARGS :=' 'BOOTSTRAP_ARGS := --jobs $(NIX_BUILD_CORES)'
+  '';
+
+  # the rust build system complains that nix alters the checksums
+  dontFixLibtool = true;
+
+  inherit patches;
+
+  postPatch = ''
+    patchShebangs src/etc
+
+    ${optionalString (!withBundledLLVM) ''rm -rf src/llvm''}
+
+    # Fix the configure script to not require curl as we won't use it
+    sed -i configure \
+      -e '/probe_need CFG_CURL curl/d'
+
+    # Useful debugging parameter
+    # export VERBOSE=1
+  '';
+
+  # rustc unfortunately needs cmake to compile llvm-rt but doesn't
+  # use it for the normal build. This disables cmake in Nix.
+  dontUseCmakeConfigure = true;
+
+  nativeBuildInputs = [
+    file python3 rustPlatform.rust.rustc cmake
+    which libffi removeReferencesTo pkgconfig
+  ];
+
+  buildInputs = [ openssl ]
+    ++ optional stdenv.isDarwin Security
+    ++ optional (!withBundledLLVM) llvmShared;
+
+  outputs = [ "out" "man" "doc" ];
+  setOutputFlags = false;
+
+  postInstall = stdenv.lib.optionalString enableRustcDev ''
+    # install rustc-dev components. Necessary to build rls, clippy...
+    python x.py dist rustc-dev
+    tar xf build/dist/rustc-dev*tar.gz
+    cp -r rustc-dev*/rustc-dev*/lib/* $out/lib/
+
+  '' + ''
+    # remove references to llvm-config in lib/rustlib/x86_64-unknown-linux-gnu/codegen-backends/librustc_codegen_llvm-llvm.so
+    # and thus a transitive dependency on ncurses
+    find $out/lib -name "*.so" -type f -exec remove-references-to -t ${llvmShared} '{}' '+'
+  '';
+
+  configurePlatforms = [];
+
+  # https://github.com/NixOS/nixpkgs/pull/21742#issuecomment-272305764
+  # https://github.com/rust-lang/rust/issues/30181
+  # enableParallelBuilding = false;
+
+  setupHooks = ./setup-hook.sh;
+
+  requiredSystemFeatures = [ "big-parallel" ];
+
+  passthru.llvm = llvmShared;
+
+  meta = with stdenv.lib; {
+    homepage = "https://www.rust-lang.org/";
+    description = "A safe, concurrent, practical language";
+    maintainers = with maintainers; [ madjar cstrahan globin havvy ];
+    license = [ licenses.mit licenses.asl20 ];
+    platforms = platforms.linux ++ platforms.darwin;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/rust/rustfmt.nix b/nixpkgs/pkgs/development/compilers/rust/rustfmt.nix
new file mode 100644
index 000000000000..66a18f40ad42
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/rustfmt.nix
@@ -0,0 +1,26 @@
+{ stdenv, rustPlatform, Security }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "rustfmt";
+  inherit (rustPlatform.rust.rustc) version src;
+
+  # the rust source tarball already has all the dependencies vendored, no need to fetch them again
+  cargoVendorDir = "vendor";
+  buildAndTestSubdir = "src/tools/rustfmt";
+
+  # changes hash of vendor directory otherwise
+  dontUpdateAutotoolsGnuConfigScripts = true;
+
+  buildInputs = stdenv.lib.optional stdenv.isDarwin Security;
+
+  # As of 1.0.0 and rustc 1.30 rustfmt requires a nightly compiler
+  RUSTC_BOOTSTRAP = 1;
+
+  meta = with stdenv.lib; {
+    description = "A tool for formatting Rust code according to style guidelines";
+    homepage = "https://github.com/rust-lang-nursery/rustfmt";
+    license = with licenses; [ mit asl20 ];
+    maintainers = with maintainers; [ globin basvandijk ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/rust/setup-hook.sh b/nixpkgs/pkgs/development/compilers/rust/setup-hook.sh
new file mode 100644
index 000000000000..5d4eb642fec0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/rust/setup-hook.sh
@@ -0,0 +1,4 @@
+# Fix 'failed to open: /homeless-shelter/.cargo/.package-cache' in rust 1.36.
+if [[ -z ${IN_NIX_SHELL-} && -z ${CARGO_HOME-} ]]; then
+    export CARGO_HOME=$TMPDIR
+fi
diff --git a/nixpkgs/pkgs/development/compilers/sagittarius-scheme/default.nix b/nixpkgs/pkgs/development/compilers/sagittarius-scheme/default.nix
new file mode 100644
index 000000000000..4b1358b72472
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/sagittarius-scheme/default.nix
@@ -0,0 +1,58 @@
+{ stdenv
+, fetchurl
+, cmake
+, pkgconfig
+, libffi
+, boehmgc
+, openssl
+, zlib
+, odbcSupport ? true
+, libiodbc
+}:
+
+let platformLdLibraryPath = if stdenv.isDarwin then "DYLD_FALLBACK_LIBRARY_PATH"
+                            else if (stdenv.isLinux or stdenv.isBSD) then "LD_LIBRARY_PATH"
+                            else throw "unsupported platform";
+in
+stdenv.mkDerivation rec {
+  pname = "sagittarius-scheme";
+  version = "0.9.6";
+  src = fetchurl {
+    url = "https://bitbucket.org/ktakashi/${pname}/downloads/sagittarius-${version}.tar.gz";
+    sha256 = "03nvvvfd4gdlvq244zpnikxxajp6w8jj3ymw4bcq83x7zilb2imr";
+  };
+  preBuild = ''
+           # since we lack rpath during build, need to explicitly add build path
+           # to LD_LIBRARY_PATH so we can load libsagittarius.so as required to
+           # build extensions
+           export ${platformLdLibraryPath}="$(pwd)/build"
+           '';
+  nativeBuildInputs = [ pkgconfig cmake ];
+
+  buildInputs = [ libffi boehmgc openssl zlib ] ++ stdenv.lib.optional odbcSupport libiodbc;
+
+  meta = with stdenv.lib; {
+    description = "An R6RS/R7RS Scheme system";
+    longDescription = ''
+      Sagittarius Scheme is a free Scheme implementation supporting
+      R6RS/R7RS specification.
+
+      Features:
+
+      -  Builtin CLOS.
+      -  Common Lisp like reader macro.
+      -  Cryptographic libraries.
+      -  Customisable cipher and hash algorithm.
+      -  Custom codec mechanism.
+      -  CL like keyword lambda syntax (taken from Gauche).
+      -  Constant definition form. (define-constant form).
+      -  Builtin regular expression
+      -  mostly works O(n)
+      -  Replaceable reader
+    '';
+    homepage = "https://bitbucket.org/ktakashi/sagittarius-scheme";
+    license = licenses.bsd2;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ abbe ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/sbcl/2.0.0.nix b/nixpkgs/pkgs/development/compilers/sbcl/2.0.0.nix
new file mode 100644
index 000000000000..6df98a9a60ea
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/sbcl/2.0.0.nix
@@ -0,0 +1,114 @@
+{ stdenv, fetchurl, writeText, sbclBootstrap
+, sbclBootstrapHost ? "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit"
+, threadSupport ? (stdenv.isi686 || stdenv.isx86_64 || "aarch64-linux" == stdenv.hostPlatform.system)
+, disableImmobileSpace ? false
+  # Meant for sbcl used for creating binaries portable to non-NixOS via save-lisp-and-die.
+  # Note that the created binaries still need `patchelf --set-interpreter ...`
+  # to get rid of ${glibc} dependency.
+, purgeNixReferences ? false
+, texinfo
+}:
+
+stdenv.mkDerivation rec {
+  pname = "sbcl";
+  version = "2.0.0";
+
+  src = fetchurl {
+    url    = "mirror://sourceforge/project/sbcl/sbcl/${version}/${pname}-${version}-source.tar.bz2";
+    sha256 = "1krgd69cirp4ili2pfsh1a0mfvq722jbknlvmf17qhsxh1b94dlh";
+  };
+
+  buildInputs = [texinfo];
+
+  patchPhase = ''
+    echo '"${version}.nixos"' > version.lisp-expr
+
+    pwd
+
+    # SBCL checks whether files are up-to-date in many places..
+    # Unfortunately, same timestamp is not good enough
+    sed -e 's@> x y@>= x y@' -i contrib/sb-aclrepl/repl.lisp
+    #sed -e '/(date)/i((= date 2208988801) 2208988800)' -i contrib/asdf/asdf.lisp
+    sed -i src/cold/slam.lisp -e \
+      '/file-write-date input/a)'
+    sed -i src/cold/slam.lisp -e \
+      '/file-write-date output/i(or (and (= 2208988801 (file-write-date output)) (= 2208988801 (file-write-date input)))'
+    sed -i src/code/target-load.lisp -e \
+      '/date defaulted-fasl/a)'
+    sed -i src/code/target-load.lisp -e \
+      '/date defaulted-source/i(or (and (= 2208988801 (file-write-date defaulted-source-truename)) (= 2208988801 (file-write-date defaulted-fasl-truename)))'
+
+    # Fix the tests
+    sed -e '5,$d' -i contrib/sb-bsd-sockets/tests.lisp
+    sed -e '5,$d' -i contrib/sb-simple-streams/*test*.lisp
+
+    # Use whatever `cc` the stdenv provides
+    substituteInPlace src/runtime/Config.x86-64-darwin --replace gcc cc
+
+    substituteInPlace src/runtime/Config.x86-64-darwin \
+      --replace mmacosx-version-min=10.4 mmacosx-version-min=10.5
+  ''
+  + (if purgeNixReferences
+    then
+      # This is the default location to look for the core; by default in $out/lib/sbcl
+      ''
+        sed 's@^\(#define SBCL_HOME\) .*$@\1 "/no-such-path"@' \
+          -i src/runtime/runtime.c
+      ''
+    else
+      # Fix software version retrieval
+      ''
+        sed -e "s@/bin/uname@$(command -v uname)@g" -i src/code/*-os.lisp \
+          src/code/run-program.lisp
+      ''
+    );
+
+
+  preBuild = ''
+    export INSTALL_ROOT=$out
+    mkdir -p test-home
+    export HOME=$PWD/test-home
+  '';
+
+  enableFeatures = with stdenv.lib;
+    optional threadSupport "sb-thread" ++
+    optional stdenv.isAarch32 "arm";
+
+  disableFeatures = with stdenv.lib;
+    optional (!threadSupport) "sb-thread" ++
+    optionals disableImmobileSpace [ "immobile-space" "immobile-code" "compact-instance-header" ];
+
+  buildPhase = ''
+    sh make.sh --prefix=$out --xc-host="${sbclBootstrapHost}" ${
+                  stdenv.lib.concatStringsSep " "
+                    (builtins.map (x: "--with-${x}") enableFeatures ++
+                     builtins.map (x: "--without-${x}") disableFeatures)
+                }
+    (cd doc/manual ; make info)
+  '';
+
+  installPhase = ''
+    INSTALL_ROOT=$out sh install.sh
+  ''
+  + stdenv.lib.optionalString (!purgeNixReferences) ''
+    cp -r src $out/lib/sbcl
+    cp -r contrib $out/lib/sbcl
+    cat >$out/lib/sbcl/sbclrc <<EOF
+     (setf (logical-pathname-translations "SYS")
+       '(("SYS:SRC;**;*.*.*" #P"$out/lib/sbcl/src/**/*.*")
+         ("SYS:CONTRIB;**;*.*.*" #P"$out/lib/sbcl/contrib/**/*.*")))
+    EOF
+  '';
+
+  setupHook = stdenv.lib.optional purgeNixReferences (writeText "setupHook.sh" ''
+    addEnvHooks "$targetOffset" _setSbclHome
+    _setSbclHome() {
+      export SBCL_HOME='@out@/lib/sbcl/'
+    }
+  '');
+
+  meta = sbclBootstrap.meta // {
+    inherit version;
+    updateWalker = true;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/sbcl/bootstrap.nix b/nixpkgs/pkgs/development/compilers/sbcl/bootstrap.nix
new file mode 100644
index 000000000000..81afe64ed537
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/sbcl/bootstrap.nix
@@ -0,0 +1,79 @@
+{ stdenv, fetchurl, makeWrapper }:
+
+let
+  options = rec {
+    x86_64-darwin = {
+      version = "1.2.11";
+      system = "x86-64-darwin";
+      sha256 = "0lh4gpvi8hl6g6b9321g5pwh8sk3218i7h4lx7p3vd9z0cf3lz85";
+    };
+    x86_64-linux = {
+      version = "1.3.16";
+      system = "x86-64-linux";
+      sha256 = "0sq2dylwwyqfwkbdvcgqwz3vay9v895zpb0fyzsiwy31d1x9pr2s";
+    };
+    i686-linux = {
+      version = "1.2.7";
+      system = "x86-linux";
+      sha256 = "07f3bz4br280qvn85i088vpzj9wcz8wmwrf665ypqx181pz2ai3j";
+    };
+    aarch64-linux = {
+      version = "1.3.16";
+      system = "arm64-linux";
+      sha256 = "0q1brz9c49xgdljzfx8rpxxnlwhadxkcy5kg0mcd9wnxygind1cl";
+    };
+    armv7l-linux = {
+      version = "1.2.14";
+      system = "armhf-linux";
+      sha256 = "0sp5445rbvms6qvzhld0kwwvydw51vq5iaf4kdqsf2d9jvaz3yx5";
+    };
+    armv6l-linux = armv7l-linux;
+    x86_64-freebsd = {
+      version = "1.2.7";
+      system = "x86-64-freebsd";
+      sha256 = "14k42xiqd2rrim4pd5k5pjcrpkac09qnpynha8j1v4jngrvmw7y6";
+    };
+    x86_64-solaris = {
+      version = "1.2.7";
+      system = "x86-64-solaris";
+      sha256 = "05c12fmac4ha72k1ckl6i780rckd7jh4g5s5hiic7fjxnf1kx8d0";
+    };
+  };
+  cfg = options.${stdenv.hostPlatform.system};
+in
+assert builtins.hasAttr stdenv.hostPlatform.system options;
+stdenv.mkDerivation rec {
+  pname = "sbcl-bootstrap";
+  version = cfg.version;
+
+  src = fetchurl {
+    url = "mirror://sourceforge/project/sbcl/sbcl/${version}/sbcl-${version}-${cfg.system}-binary.tar.bz2";
+    sha256 = cfg.sha256;
+  };
+
+  buildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp -p src/runtime/sbcl $out/bin
+
+    mkdir -p $out/share/sbcl
+    cp -p src/runtime/sbcl $out/share/sbcl
+    cp -p output/sbcl.core $out/share/sbcl
+    mkdir -p $out/bin
+    makeWrapper $out/share/sbcl/sbcl $out/bin/sbcl \
+      --add-flags "--core $out/share/sbcl/sbcl.core"
+  '';
+
+  postFixup = stdenv.lib.optionalString (!stdenv.isAarch32 && stdenv.isLinux) ''
+    patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $out/share/sbcl/sbcl
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Lisp compiler";
+    homepage = "http://www.sbcl.org";
+    license = licenses.publicDomain; # and FreeBSD
+    maintainers = [maintainers.raskin maintainers.tohl];
+    platforms = attrNames options;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/sbcl/default.nix b/nixpkgs/pkgs/development/compilers/sbcl/default.nix
new file mode 100644
index 000000000000..d4a00f57b6a4
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/sbcl/default.nix
@@ -0,0 +1,114 @@
+{ stdenv, fetchurl, writeText, sbclBootstrap
+, sbclBootstrapHost ? "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit"
+, threadSupport ? (stdenv.isi686 || stdenv.isx86_64 || "aarch64-linux" == stdenv.hostPlatform.system)
+, disableImmobileSpace ? false
+  # Meant for sbcl used for creating binaries portable to non-NixOS via save-lisp-and-die.
+  # Note that the created binaries still need `patchelf --set-interpreter ...`
+  # to get rid of ${glibc} dependency.
+, purgeNixReferences ? false
+, texinfo
+}:
+
+stdenv.mkDerivation rec {
+  pname = "sbcl";
+  version = "2.0.2";
+
+  src = fetchurl {
+    url    = "mirror://sourceforge/project/sbcl/sbcl/${version}/${pname}-${version}-source.tar.bz2";
+    sha256 = "07pyzdjnhcpqwvr3rrk4i18maqdywbq1qj93fnpx1h4b7dp08r28";
+  };
+
+  buildInputs = [texinfo];
+
+  patchPhase = ''
+    echo '"${version}.nixos"' > version.lisp-expr
+
+    pwd
+
+    # SBCL checks whether files are up-to-date in many places..
+    # Unfortunately, same timestamp is not good enough
+    sed -e 's@> x y@>= x y@' -i contrib/sb-aclrepl/repl.lisp
+    #sed -e '/(date)/i((= date 2208988801) 2208988800)' -i contrib/asdf/asdf.lisp
+    sed -i src/cold/slam.lisp -e \
+      '/file-write-date input/a)'
+    sed -i src/cold/slam.lisp -e \
+      '/file-write-date output/i(or (and (= 2208988801 (file-write-date output)) (= 2208988801 (file-write-date input)))'
+    sed -i src/code/target-load.lisp -e \
+      '/date defaulted-fasl/a)'
+    sed -i src/code/target-load.lisp -e \
+      '/date defaulted-source/i(or (and (= 2208988801 (file-write-date defaulted-source-truename)) (= 2208988801 (file-write-date defaulted-fasl-truename)))'
+
+    # Fix the tests
+    sed -e '5,$d' -i contrib/sb-bsd-sockets/tests.lisp
+    sed -e '5,$d' -i contrib/sb-simple-streams/*test*.lisp
+
+    # Use whatever `cc` the stdenv provides
+    substituteInPlace src/runtime/Config.x86-64-darwin --replace gcc cc
+
+    substituteInPlace src/runtime/Config.x86-64-darwin \
+      --replace mmacosx-version-min=10.4 mmacosx-version-min=10.5
+  ''
+  + (if purgeNixReferences
+    then
+      # This is the default location to look for the core; by default in $out/lib/sbcl
+      ''
+        sed 's@^\(#define SBCL_HOME\) .*$@\1 "/no-such-path"@' \
+          -i src/runtime/runtime.c
+      ''
+    else
+      # Fix software version retrieval
+      ''
+        sed -e "s@/bin/uname@$(command -v uname)@g" -i src/code/*-os.lisp \
+          src/code/run-program.lisp
+      ''
+    );
+
+
+  preBuild = ''
+    export INSTALL_ROOT=$out
+    mkdir -p test-home
+    export HOME=$PWD/test-home
+  '';
+
+  enableFeatures = with stdenv.lib;
+    optional threadSupport "sb-thread" ++
+    optional stdenv.isAarch32 "arm";
+
+  disableFeatures = with stdenv.lib;
+    optional (!threadSupport) "sb-thread" ++
+    optionals disableImmobileSpace [ "immobile-space" "immobile-code" "compact-instance-header" ];
+
+  buildPhase = ''
+    sh make.sh --prefix=$out --xc-host="${sbclBootstrapHost}" ${
+                  stdenv.lib.concatStringsSep " "
+                    (builtins.map (x: "--with-${x}") enableFeatures ++
+                     builtins.map (x: "--without-${x}") disableFeatures)
+                }
+    (cd doc/manual ; make info)
+  '';
+
+  installPhase = ''
+    INSTALL_ROOT=$out sh install.sh
+  ''
+  + stdenv.lib.optionalString (!purgeNixReferences) ''
+    cp -r src $out/lib/sbcl
+    cp -r contrib $out/lib/sbcl
+    cat >$out/lib/sbcl/sbclrc <<EOF
+     (setf (logical-pathname-translations "SYS")
+       '(("SYS:SRC;**;*.*.*" #P"$out/lib/sbcl/src/**/*.*")
+         ("SYS:CONTRIB;**;*.*.*" #P"$out/lib/sbcl/contrib/**/*.*")))
+    EOF
+  '';
+
+  setupHook = stdenv.lib.optional purgeNixReferences (writeText "setupHook.sh" ''
+    addEnvHooks "$targetOffset" _setSbclHome
+    _setSbclHome() {
+      export SBCL_HOME='@out@/lib/sbcl/'
+    }
+  '');
+
+  meta = sbclBootstrap.meta // {
+    inherit version;
+    updateWalker = true;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/scala/2.10.nix b/nixpkgs/pkgs/development/compilers/scala/2.10.nix
new file mode 100644
index 000000000000..d41442afaf13
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/scala/2.10.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchurl, makeWrapper, jre, gnugrep, coreutils }:
+
+stdenv.mkDerivation rec {
+  name = "scala-2.10.7";
+
+  src = fetchurl {
+    url = "https://www.scala-lang.org/files/archive/${name}.tgz";
+    sha256 = "04gi55lzgrhsb78qw8jmnccqim92rw6898knw0a7gfzn2sci30wj";
+  };
+
+  propagatedBuildInputs = [ jre ] ;
+  buildInputs = [ makeWrapper ] ;
+
+  installPhase = ''
+    mkdir -p $out
+    rm bin/*.bat
+    mv * $out
+
+    for p in $(ls $out/bin/) ; do
+      wrapProgram $out/bin/$p \
+        --prefix PATH ":" ${coreutils}/bin \
+        --prefix PATH ":" ${gnugrep}/bin \
+        --prefix PATH ":" ${jre}/bin \
+        --set JAVA_HOME ${jre}
+    done
+  '';
+
+  meta = {
+    description = "A general purpose programming language";
+    longDescription = ''
+      Scala is a general purpose programming language designed to express
+      common programming patterns in a concise, elegant, and type-safe way.
+      It smoothly integrates features of object-oriented and functional
+      languages, enabling Java and other programmers to be more productive.
+      Code sizes are typically reduced by a factor of two to three when
+      compared to an equivalent Java application.
+    '';
+    homepage = "https://www.scala-lang.org/";
+    license = stdenv.lib.licenses.bsd3;
+    platforms = stdenv.lib.platforms.all;
+    branch = "2.10";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/scala/2.11.nix b/nixpkgs/pkgs/development/compilers/scala/2.11.nix
new file mode 100644
index 000000000000..d8fcd3f9a88f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/scala/2.11.nix
@@ -0,0 +1,48 @@
+{ stdenv, fetchurl, makeWrapper, jre, gnugrep, coreutils }:
+
+stdenv.mkDerivation rec {
+  name = "scala-2.11.12";
+
+  src = fetchurl {
+    url = "https://www.scala-lang.org/files/archive/${name}.tgz";
+    sha256 = "1a4nc4qp9dm4rps47j92hlmxxqskv67qbdmjqc5zd94wd4rps7di";
+  };
+
+  propagatedBuildInputs = [ jre ] ;
+  buildInputs = [ makeWrapper ] ;
+
+  installPhase = ''
+    mkdir -p $out
+    rm "bin/"*.bat
+    mv * $out
+
+    # put docs in correct subdirectory
+    mkdir -p $out/share/doc
+    mv $out/doc $out/share/doc/${name}
+    mv $out/man $out/share/man
+
+    for p in $(ls $out/bin/) ; do
+      wrapProgram $out/bin/$p \
+        --prefix PATH ":" ${coreutils}/bin \
+        --prefix PATH ":" ${gnugrep}/bin \
+        --prefix PATH ":" ${jre}/bin \
+        --set JAVA_HOME ${jre}
+    done
+  '';
+
+  meta = {
+    description = "General purpose programming language";
+    longDescription = ''
+      Scala is a general purpose programming language designed to express
+      common programming patterns in a concise, elegant, and type-safe way.
+      It smoothly integrates features of object-oriented and functional
+      languages, enabling Java and other programmers to be more productive.
+      Code sizes are typically reduced by a factor of two to three when
+      compared to an equivalent Java application.
+    '';
+    homepage = "https://www.scala-lang.org/";
+    license = stdenv.lib.licenses.bsd3;
+    platforms = stdenv.lib.platforms.all;
+    branch = "2.11";
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/scala/2.12.nix b/nixpkgs/pkgs/development/compilers/scala/2.12.nix
new file mode 100644
index 000000000000..4c9d57624f72
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/scala/2.12.nix
@@ -0,0 +1,47 @@
+{ stdenv, fetchurl, makeWrapper, jre, gnugrep, coreutils }:
+
+stdenv.mkDerivation rec {
+  name = "scala-2.12.10";
+
+  src = fetchurl {
+    url = "https://www.scala-lang.org/files/archive/${name}.tgz";
+    sha256 = "0sk5n3ir5zkgr8jayq5pn4l87ia5zmjr2zzwchgxkv8g62ivs4iv";
+  };
+
+  propagatedBuildInputs = [ jre ] ;
+  buildInputs = [ makeWrapper ] ;
+
+  installPhase = ''
+    mkdir -p $out
+    rm "bin/"*.bat
+    mv * $out
+
+    # put docs in correct subdirectory
+    mkdir -p $out/share/doc
+    mv $out/doc $out/share/doc/scala
+    mv $out/{LICENSE,NOTICE} $out/share/doc/scala
+
+    for p in $(ls $out/bin/) ; do
+      wrapProgram $out/bin/$p \
+        --prefix PATH ":" ${coreutils}/bin \
+        --prefix PATH ":" ${gnugrep}/bin \
+        --prefix PATH ":" ${jre}/bin \
+        --set JAVA_HOME ${jre}
+    done
+  '';
+
+  meta = {
+    description = "General purpose programming language";
+    longDescription = ''
+      Scala is a general purpose programming language designed to express
+      common programming patterns in a concise, elegant, and type-safe way.
+      It smoothly integrates features of object-oriented and functional
+      languages, enabling Java and other programmers to be more productive.
+      Code sizes are typically reduced by a factor of two to three when
+      compared to an equivalent Java application.
+    '';
+    homepage = "https://www.scala-lang.org/";
+    license = stdenv.lib.licenses.bsd3;
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/scala/2.13.nix b/nixpkgs/pkgs/development/compilers/scala/2.13.nix
new file mode 100644
index 000000000000..04086321bef1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/scala/2.13.nix
@@ -0,0 +1,47 @@
+{ stdenv, fetchurl, makeWrapper, jre, gnugrep, coreutils }:
+
+stdenv.mkDerivation rec {
+  name = "scala-2.13.2";
+
+  src = fetchurl {
+    url = "https://www.scala-lang.org/files/archive/${name}.tgz";
+    sha256 = "1gvdxwlhgjmn8i5a8kcp19700rscjq9ylb35p8vj7nqys94zjkap";
+  };
+
+  propagatedBuildInputs = [ jre ] ;
+  buildInputs = [ makeWrapper ] ;
+
+  installPhase = ''
+    mkdir -p $out
+    rm "bin/"*.bat
+    mv * $out
+
+    # put docs in correct subdirectory
+    mkdir -p $out/share/doc
+    mv $out/doc $out/share/doc/scala
+    mv $out/{LICENSE,NOTICE} $out/share/doc/scala
+
+    for p in $(ls $out/bin/) ; do
+      wrapProgram $out/bin/$p \
+        --prefix PATH ":" ${coreutils}/bin \
+        --prefix PATH ":" ${gnugrep}/bin \
+        --prefix PATH ":" ${jre}/bin \
+        --set JAVA_HOME ${jre}
+    done
+  '';
+
+  meta = {
+    description = "General purpose programming language";
+    longDescription = ''
+      Scala is a general purpose programming language designed to express
+      common programming patterns in a concise, elegant, and type-safe way.
+      It smoothly integrates features of object-oriented and functional
+      languages, enabling Java and other programmers to be more productive.
+      Code sizes are typically reduced by a factor of two to three when
+      compared to an equivalent Java application.
+    '';
+    homepage = "https://www.scala-lang.org/";
+    license = stdenv.lib.licenses.bsd3;
+    platforms = stdenv.lib.platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/scala/dotty-bare.nix b/nixpkgs/pkgs/development/compilers/scala/dotty-bare.nix
new file mode 100644
index 000000000000..d3f126052f5d
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/scala/dotty-bare.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchurl, makeWrapper, jre, ncurses }:
+
+stdenv.mkDerivation rec {
+  version = "0.23.0-RC1";
+  pname = "dotty-bare";
+
+  src = fetchurl {
+    url = "https://github.com/lampepfl/dotty/releases/download/${version}/dotty-${version}.tar.gz";
+    sha256 = "0c64dw2qp8mhgsll8viqaiy34wq1ablkbc4bi813a1r4nqg57sv0";
+  };
+
+  propagatedBuildInputs = [ jre ncurses.dev ] ;
+  buildInputs = [ makeWrapper ] ;
+
+  installPhase = ''
+    mkdir -p $out
+    mv * $out
+  '';
+
+  fixupPhase = ''
+        bin_files=$(find $out/bin -type f ! -name common)
+        for f in $bin_files ; do
+          wrapProgram $f --set JAVA_HOME ${jre} --prefix PATH : '${ncurses.dev}/bin'
+        done
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Research platform for new language concepts and compiler technologies for Scala.";
+    longDescription = ''
+       Dotty is a platform to try out new language concepts and compiler technologies for Scala.
+       The focus is mainly on simplification. We remove extraneous syntax (e.g. no XML literals),
+       and try to boil down Scala’s types into a smaller set of more fundamental constructs.
+       The theory behind these constructs is researched in DOT, a calculus for dependent object types.
+    '';
+    homepage = "http://dotty.epfl.ch/";
+    license = licenses.bsd3;
+    platforms = platforms.all;
+    maintainers = [maintainers.karolchmist maintainers.virusdave];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/scala/dotty.nix b/nixpkgs/pkgs/development/compilers/scala/dotty.nix
new file mode 100644
index 000000000000..7bc7fa3d4c24
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/scala/dotty.nix
@@ -0,0 +1,22 @@
+{ stdenv, fetchurl, makeWrapper, jre, callPackage }:
+
+let
+  dotty-bare = callPackage ./dotty-bare.nix {
+    inherit stdenv fetchurl makeWrapper jre;
+  };
+in
+
+stdenv.mkDerivation {
+  name = "dotty-${dotty-bare.version}";
+
+  dontUnpack = true;
+
+  installPhase = ''
+    mkdir -p $out/bin
+    ln -s ${dotty-bare}/bin/dotc $out/bin/dotc
+    ln -s ${dotty-bare}/bin/dotd $out/bin/dotd
+    ln -s ${dotty-bare}/bin/dotr $out/bin/dotr
+  '';
+
+  inherit (dotty-bare) meta;
+}
diff --git a/nixpkgs/pkgs/development/compilers/sdcc/default.nix b/nixpkgs/pkgs/development/compilers/sdcc/default.nix
new file mode 100644
index 000000000000..3d3d43a55e50
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/sdcc/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchurl, autoconf, bison, boost, flex, texinfo, zlib, gputils ? null
+, excludePorts ? [] }:
+
+with stdenv.lib;
+
+let
+  # choices: mcs51 z80 z180 r2k r3ka gbz80 tlcs90 ds390 ds400 pic14 pic16 hc08 s08 stm8
+  excludedPorts = excludePorts ++ (optionals (gputils == null) [ "pic14" "pic16" ]);
+in
+
+stdenv.mkDerivation rec {
+  pname = "sdcc";
+  version = "4.0.0";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/sdcc/sdcc-src-${version}.tar.bz2";
+    sha256 = "042fxw5mnsfhpc0z9lxfsw88kdkm32pwrxacp88kj2n2dy0814a8";
+  };
+
+  buildInputs = [ autoconf bison boost flex gputils texinfo zlib ];
+
+  configureFlags = map (f: "--disable-${f}-port") excludedPorts;
+
+  meta = {
+    description = "Small Device C Compiler";
+    longDescription = ''
+      SDCC is a retargettable, optimizing ANSI - C compiler suite that targets
+      the Intel MCS51 based microprocessors (8031, 8032, 8051, 8052, etc.), Maxim
+      (formerly Dallas) DS80C390 variants, Freescale (formerly Motorola) HC08 based
+      (hc08, s08) and Zilog Z80 based MCUs (z80, z180, gbz80, Rabbit 2000/3000,
+      Rabbit 3000A). Work is in progress on supporting the Microchip PIC16 and
+      PIC18 targets. It can be retargeted for other microprocessors.
+    '';
+    homepage = "http://sdcc.sourceforge.net/";
+    license = with licenses; if (gputils == null) then gpl2 else unfreeRedistributable;
+    maintainers = with maintainers; [ bjornfor yorickvp ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/seexpr/default.nix b/nixpkgs/pkgs/development/compilers/seexpr/default.nix
new file mode 100644
index 000000000000..580fc3b761db
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/seexpr/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchFromGitHub, cmake, libpng, zlib, qt4,
+bison, flex, libGLU, pythonPackages
+}:
+
+stdenv.mkDerivation {
+  pname = "seexpr";
+  version = "2.11";
+  src = fetchFromGitHub {
+    owner  = "wdas";
+    repo   = "SeExpr";
+    rev    = "v2.11";
+    sha256 = "0a44k56jf6dl36fwgg4zpc252wq5lf9cblg74mp73k82hxw439l4";
+  };
+
+  buildInputs = [ cmake libGLU libpng zlib qt4 pythonPackages.pyqt4 bison flex ];
+  meta = with stdenv.lib; {
+    description = "Embeddable expression evaluation engine from Disney Animation";
+    homepage = "https://www.disneyanimation.com/technology/seexpr.html";
+    maintainers = with maintainers; [ hodapp ];
+    license = licenses.asl20;
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/serpent/default.nix b/nixpkgs/pkgs/development/compilers/serpent/default.nix
new file mode 100644
index 000000000000..2459127f425a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/serpent/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchFromGitHub, ... }:
+
+stdenv.mkDerivation {
+  pname = "serpent";
+
+  # I can't find any version numbers, so we're just using the date
+  # of the last commit.
+  version = "2016-03-05";
+
+  src = fetchFromGitHub {
+    owner = "ethereum";
+    repo = "serpent";
+    rev = "51ee60857fe53c871fa916ef66fc1b4255bb9433";
+    sha256 = "1bns9wgn5i1ahj19qx7v1wwdy8ca3q3pigxwznm5nywsw7s7lqxs";
+  };
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mv serpent $out/bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Compiler for the Serpent language for Ethereum";
+    longDescription = ''
+      Serpent is one of the high-level programming languages used to
+      write Ethereum contracts. The language, as suggested by its name,
+      is designed to be very similar to Python; it is intended to be
+      maximally clean and simple, combining many of the efficiency
+      benefits of a low-level language with ease-of-use in programming
+      style, and at the same time adding special domain-specific
+      features for contract programming.
+    '';
+    homepage = "https://github.com/ethereum/wiki/wiki/Serpent";
+    license = with licenses; [ wtfpl ];
+    maintainers = with maintainers; [ chris-martin ];
+    platforms = with platforms; linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/shaderc/default.nix b/nixpkgs/pkgs/development/compilers/shaderc/default.nix
new file mode 100644
index 000000000000..e7308973d5c6
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/shaderc/default.nix
@@ -0,0 +1,58 @@
+{ stdenv, fetchFromGitHub, cmake, python3 }:
+# Like many google projects, shaderc doesn't gracefully support separately compiled dependencies, so we can't easily use
+# the versions of glslang and spirv-tools used by vulkan-loader. Exact revisions are taken from
+# https://github.com/google/shaderc/blob/known-good/known_good.json
+
+# Future work: extract and fetch all revisions automatically based on a revision of shaderc's known-good branch.
+let
+  glslang = fetchFromGitHub {
+    owner = "KhronosGroup";
+    repo = "glslang";
+    rev = "3ed344dd784ecbbc5855e613786f3a1238823e56";
+    sha256 = "00s2arfvw78d9k9fmangqlkvkmkpqzrin3g91vfab4wr8srb09dx";
+  };
+  spirv-tools = fetchFromGitHub {
+    owner = "KhronosGroup";
+    repo = "SPIRV-Tools";
+    rev = "323a81fc5e30e43a04e5e22af4cba98ca2a161e6";
+    sha256 = "1kwyh95l02w3v1ra55c836wayzw8d0m14ab7wf0ynhhyp3k2p9hv";
+  };
+  spirv-headers = fetchFromGitHub {
+    owner = "KhronosGroup";
+    repo = "SPIRV-Headers";
+    rev = "204cd131c42b90d129073719f2766293ce35c081";
+    sha256 = "1gp0mlbfccqnalaix97jxsa5i337xyzyr55wgssapy56p0q04wv2";
+  };
+in stdenv.mkDerivation rec {
+  pname = "shaderc";
+  version = "2019.1";
+
+  outputs = [ "out" "lib" "bin" "dev" "static" ];
+
+  src = fetchFromGitHub {
+    owner = "google";
+    repo = "shaderc";
+    rev = "v${version}";
+    sha256 = "0x514rpignnb4vvl7wmijfakqc59986knjw3dh1zx0ah42xa7x37";
+  };
+
+  patchPhase = ''
+    cp -r --no-preserve=mode ${glslang} third_party/glslang
+    cp -r --no-preserve=mode ${spirv-tools} third_party/spirv-tools
+    ln -s ${spirv-headers} third_party/spirv-tools/external/spirv-headers
+  '';
+
+  nativeBuildInputs = [ cmake python3 ];
+
+  postInstall = ''
+    moveToOutput "lib/*.a" $static
+  '';
+
+  cmakeFlags = [ "-DSHADERC_SKIP_TESTS=ON" ];
+
+  meta = with stdenv.lib; {
+    inherit (src.meta) homepage;
+    description = "A collection of tools, libraries and tests for shader compilation.";
+    license = [ licenses.asl20 ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/smlnj/bootstrap.nix b/nixpkgs/pkgs/development/compilers/smlnj/bootstrap.nix
new file mode 100644
index 000000000000..55d96266ac97
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/smlnj/bootstrap.nix
@@ -0,0 +1,43 @@
+{ stdenv, fetchurl, cpio, rsync, xar, makeWrapper }:
+
+stdenv.mkDerivation rec {
+  pname = "smlnj-bootstrap";
+
+  version = "110.91";
+
+  src = fetchurl {
+    url = "http://smlnj.cs.uchicago.edu/dist/working/${version}/smlnj-x86-${version}.pkg";
+    sha256 = "12jn50h5jz0ac1vzld2mb94p1dyc8h0mk0hip2wj5xqk1dbzwxl4";
+  };
+
+  buildInputs = [ cpio rsync makeWrapper ];
+
+  unpackPhase = ''
+    ${xar}/bin/xar -xf $src
+    cd smlnj.pkg
+  '';
+
+  buildPhase = ''
+    cat Payload | gunzip -dc | cpio -i
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    rsync -av bin/ $out/bin/
+
+    mkdir -p $out/lib
+    rsync -av lib/ $out/lib/
+  '';
+
+  postInstall = ''
+    wrapProgram "$out/bin/sml" --set "SMLNJ_HOME" "$out"
+  '';
+
+  meta = {
+    description = "Compiler for the Standard ML '97 programming language";
+    homepage    = "http://www.smlnj.org";
+    license     = stdenv.lib.licenses.free;
+    platforms   = stdenv.lib.platforms.darwin;
+    maintainers = [ stdenv.lib.maintainers.jwiegley ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/smlnj/default.nix b/nixpkgs/pkgs/development/compilers/smlnj/default.nix
new file mode 100644
index 000000000000..18562bc487aa
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/smlnj/default.nix
@@ -0,0 +1,89 @@
+{ stdenv, fetchurl }:
+let
+  version = "110.95";
+  baseurl = "http://smlnj.cs.uchicago.edu/dist/working/${version}";
+
+  isArch64 = stdenv.system == "x86_64-linux";
+
+  arch = if isArch64
+    then "64"
+    else "32";
+
+  boot32 = { url = "${baseurl}/boot.x86-unix.tgz";
+             sha256 = "07bcrvjphyin1ygjbymcqhd1mbfk4hff82wmxcllh77lr28l5dxf"; };
+  boot64 = { url = "${baseurl}/boot.amd64-unix.tgz";
+             sha256 = "1zn96a83kb6bn6228yfjsvb58m2qxw9k4j3qz0p9c8za479w4ch6"; };
+
+  bootBinary = if isArch64
+               then boot64
+               else boot32;
+
+  sources = map fetchurl [
+    bootBinary
+    { url = "${baseurl}/config.tgz";              sha256 = "09srqxkxl86iaz6l6dz83c1apsac0pxpfq6b74i6l0nfl261jibw"; }
+    { url = "${baseurl}/cm.tgz";                  sha256 = "0gh8inrb07z597axw8qipwyx52m8nac5d5r0rvgzvdnnjg9nr9zy"; }
+    { url = "${baseurl}/compiler.tgz";            sha256 = "1kk6jwzyc261l5nii3n8rwccmgvcj1mg5fgycfsfsiyyy1v8xfx7"; }
+    { url = "${baseurl}/runtime.tgz";             sha256 = "17i069h5cv411sgzx3ynlf4v3wlrxiba9bwy1b0x0cyhs879kppc"; }
+    { url = "${baseurl}/system.tgz";              sha256 = "0s8ij3wfxpjrmrwxrgrirfxjj8vkda6l32j88al5q1ic3ncwc58s"; }
+    { url = "${baseurl}/MLRISC.tgz";              sha256 = "1v2d3gjxrcgc95x5glqcw0nfp13aapkcw03fyi70m3k1yc61izmz"; }
+    { url = "${baseurl}/smlnj-lib.tgz";           sha256 = "04i11ki8v9s7yz3lg6b0djhi03zzkzav0b5cr81ypxlkmf4hh6bp"; }
+    { url = "${baseurl}/old-basis.tgz";           sha256 = "1ryqpy0n7c9gd995ndmjvaci74f95nr8n1jjgm28yd1sn7hnavhi"; }
+    { url = "${baseurl}/ckit.tgz";                sha256 = "18mcs3j8c5gq9cmck7r175am60blaznqmhzyir622yfc8fpw1map"; }
+    { url = "${baseurl}/nlffi.tgz";               sha256 = "16mrl5aqbgsgljxa3z8kj5max9drddml34bq7rn1i78594jfvkwk"; }
+    { url = "${baseurl}/cml.tgz";                 sha256 = "00x784nv1pi6534k3vva26i9qx84cvw242vgwbs5020zkm6gvrmn"; }
+    { url = "${baseurl}/eXene.tgz";               sha256 = "143825h36v6z77kwvrvpszgwnhmjs3yldb18i9z4lwkqfb4kn7f7"; }
+    { url = "${baseurl}/ml-lpt.tgz";              sha256 = "17ly9h9ry8r94dx6lkas6w2cxknwkpma4z9pj8rgzmd3w6qm7j1z"; }
+    { url = "${baseurl}/ml-lex.tgz";              sha256 = "1ja3l2kiq17754c58mwdiqi25f7ax0cji2wk0vq4872iwwxc22px"; }
+    { url = "${baseurl}/ml-yacc.tgz";             sha256 = "1m48nkwvw87yg39sjihlw8na5m34bzz3d4zpfbjaj2f75fkjy3jf"; }
+    { url = "${baseurl}/ml-burg.tgz";             sha256 = "13nbvbah7bn8gjm4gi41m412vpl69wd6d3x3wzbb6xpia9vm4z4j"; }
+    { url = "${baseurl}/pgraph.tgz";              sha256 = "1aizkl8avz01kx221xy5z7a1a1b5xqn2hrk66wr8d0iav2nh5c98"; }
+    { url = "${baseurl}/trace-debug-profile.tgz"; sha256 = "1c80xgck9sb2rm554nfg4f5mpjkdbrwkcx88pj120056225l10vx"; }
+    { url = "${baseurl}/heap2asm.tgz";            sha256 = "1n68drd7as5dy20ccfvgd9cmnhfpfvz7g3f0gc8kpaqaz3vpy36g"; }
+    { url = "${baseurl}/smlnj-c.tgz";             sha256 = "1b6svh2kk5211rq73fdwx3sf80d2rshf0dmkkrq5mw4852nzqz3p"; }
+    { url = "${baseurl}/doc.tgz";                 sha256 = "021yzhy9maypq4ahz0d0qpr601spndg583fn9mapv6rl42kwhjq6"; }
+    { url = "${baseurl}/asdl.tgz";                sha256 = "0nqavqcbidwnphbbwjrxhpy8glbyad51wy0cpqimbsw3sgns0zkd"; }
+  ];
+in stdenv.mkDerivation {
+  pname = "smlnj";
+  inherit version;
+
+  inherit sources;
+
+  patchPhase = ''
+    sed -i '/PATH=/d' config/_arch-n-opsys base/runtime/config/gen-posix-names.sh
+    echo SRCARCHIVEURL="file:/$TMP" > config/srcarchiveurl
+    patch --verbose config/_heap2exec ${./heap2exec.diff}
+  '';
+
+  unpackPhase = ''
+    for s in $sources; do
+      b=$(basename $s)
+      cp $s ''${b#*-}
+    done
+    unpackFile config.tgz
+    mkdir base
+    ./config/unpack $TMP runtime
+  '';
+
+  buildPhase = ''
+    ./config/install.sh -default ${arch}
+  '';
+
+  installPhase = ''
+    mkdir -pv $out
+    cp -rv bin lib $out
+
+    cd $out/bin
+    for i in *; do
+      sed -i "2iSMLNJ_HOME=$out/" $i
+    done
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Standard ML of New Jersey, a compiler";
+    homepage    = "http://smlnj.org";
+    license     = licenses.bsd3;
+    platforms   = [ "x86_64-linux" "i686-linux" ];
+    maintainers = with maintainers; [ thoughtpolice ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/smlnj/heap2exec.diff b/nixpkgs/pkgs/development/compilers/smlnj/heap2exec.diff
new file mode 100644
index 000000000000..ef21a8e7f072
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/smlnj/heap2exec.diff
@@ -0,0 +1,9 @@
+@@ -35,7 +35,7 @@
+     BIN_DIR=${SMLNJ_HOME}/bin
+ fi
+ 
+-ARCH_N_OPSYS=`"$BIN_DIR/.arch-n-opsys $SIZE_OPT"`
++ARCH_N_OPSYS=`$BIN_DIR/.arch-n-opsys $SIZE_OPT`
+ if [ "$?" != "0" ]; then
+ 	die "unable to determine architecture/operating system"
+ fi
diff --git a/nixpkgs/pkgs/development/compilers/solc/default.nix b/nixpkgs/pkgs/development/compilers/solc/default.nix
new file mode 100644
index 000000000000..ac4bc324868a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/solc/default.nix
@@ -0,0 +1,74 @@
+{ stdenv, fetchzip, boost, cmake, ncurses, python3, coreutils
+, z3Support ? true, z3 ? null, cvc4Support ? true, cvc4 ? null
+, cln ? null, gmp ? null
+}:
+
+assert z3Support -> z3 != null && stdenv.lib.versionAtLeast z3.version "4.6.0";
+assert cvc4Support -> cvc4 != null && cln != null && gmp != null;
+
+let
+  jsoncppURL = "https://github.com/open-source-parsers/jsoncpp/archive/1.9.2.tar.gz";
+  jsoncpp = fetchzip {
+    url = jsoncppURL;
+    sha256 = "037d1b1qdmn3rksmn1j71j26bv4hkjv7sn7da261k853xb5899sg";
+  };
+in
+stdenv.mkDerivation rec {
+
+  pname = "solc";
+  version = "0.6.8";
+
+  # upstream suggests avoid using archive generated by github
+  src = fetchzip {
+    url = "https://github.com/ethereum/solidity/releases/download/v${version}/solidity_${version}.tar.gz";
+    sha256 = "1nxds6c10hjqjjk893qw2yljws57li0xigbf3ih85y8y6d587ph0";
+  };
+
+  postPatch = ''
+    substituteInPlace cmake/jsoncpp.cmake \
+      --replace "${jsoncppURL}" ${jsoncpp}
+  '';
+
+  cmakeFlags = [
+    "-DBoost_USE_STATIC_LIBS=OFF"
+  ] ++ stdenv.lib.optionals (!z3Support) [
+    "-DUSE_Z3=OFF"
+  ] ++ stdenv.lib.optionals (!cvc4Support) [
+    "-DUSE_CVC4=OFF"
+  ];
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [ boost ]
+    ++ stdenv.lib.optionals z3Support [ z3 ]
+    ++ stdenv.lib.optionals cvc4Support [ cvc4 cln gmp ];
+  checkInputs = [ ncurses python3 ];
+
+  # Test fails on darwin for unclear reason
+  doCheck = stdenv.hostPlatform.isLinux;
+
+  checkPhase = ''
+    while IFS= read -r -d ''' dir
+    do
+      LD_LIBRARY_PATH=$LD_LIBRARY_PATH''${LD_LIBRARY_PATH:+:}$(pwd)/$dir
+      export LD_LIBRARY_PATH
+    done <   <(find . -type d -print0)
+
+    pushd ..
+    # IPC tests need aleth avaliable, so we disable it
+    sed -i "s/IPC_ENABLED=true/IPC_ENABLED=false\nIPC_FLAGS=\"--no-ipc\"/" ./scripts/tests.sh
+    for i in ./scripts/*.sh ./scripts/*.py ./test/*.sh; do
+      patchShebangs "$i"
+    done
+    TERM=xterm ./scripts/tests.sh
+    popd
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Compiler for Ethereum smart contract language Solidity";
+    homepage = "https://github.com/ethereum/solidity";
+    license = licenses.gpl3;
+    platforms = with platforms; linux ++ darwin;
+    maintainers = with maintainers; [ dbrock akru lionello sifmelcara ];
+    inherit version;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/souffle/default.nix b/nixpkgs/pkgs/development/compilers/souffle/default.nix
new file mode 100644
index 000000000000..00d1a2f79600
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/souffle/default.nix
@@ -0,0 +1,53 @@
+{ stdenv, fetchFromGitHub
+, perl, ncurses, zlib, sqlite, libffi
+, autoreconfHook, mcpp, bison, flex, doxygen, graphviz
+, makeWrapper
+}:
+
+
+let
+  toolsPath = stdenv.lib.makeBinPath [ mcpp ];
+in
+stdenv.mkDerivation rec {
+  pname = "souffle";
+  version = "1.7.1";
+
+  src = fetchFromGitHub {
+    owner  = "souffle-lang";
+    repo   = "souffle";
+    rev    = version;
+    sha256 = "0px8kh5875q2iyza4ylpa6vxpy6qxg0qvn2idk1j6dcdf5pdryph";
+  };
+
+  nativeBuildInputs = [ autoreconfHook bison flex mcpp doxygen graphviz makeWrapper perl ];
+  buildInputs = [ ncurses zlib sqlite libffi ];
+
+  # these propagated inputs are needed for the compiled Souffle mode to work,
+  # since generated compiler code uses them. TODO: maybe write a g++ wrapper
+  # that adds these so we can keep the propagated inputs clean?
+  propagatedBuildInputs = [ ncurses zlib sqlite libffi ];
+
+  # see 565a8e73e80a1bedbb6cc037209c39d631fc393f and parent commits upstream for
+  # Wno-error fixes
+  patchPhase = ''
+    substituteInPlace ./src/Makefile.am \
+      --replace '-Werror' '-Werror -Wno-error=deprecated -Wno-error=other'
+
+    substituteInPlace configure.ac \
+      --replace "m4_esyscmd([git describe --tags --always | tr -d '\n'])" "${version}"
+  '';
+
+  postInstall = ''
+    wrapProgram "$out/bin/souffle" --prefix PATH : "${toolsPath}"
+  '';
+
+  outputs = [ "out" ];
+
+  meta = with stdenv.lib; {
+    description = "A translator of declarative Datalog programs into the C++ language";
+    homepage    = "https://souffle-lang.github.io/";
+    platforms   = platforms.unix;
+    maintainers = with maintainers; [ thoughtpolice copumpkin wchresta ];
+    license     = licenses.upl;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/spirv-llvm-translator/default.nix b/nixpkgs/pkgs/development/compilers/spirv-llvm-translator/default.nix
new file mode 100644
index 000000000000..73af5f0c9852
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/spirv-llvm-translator/default.nix
@@ -0,0 +1,38 @@
+{ stdenv
+, fetchFromGitHub
+, cmake
+
+, lit
+, llvm_8
+}:
+
+stdenv.mkDerivation rec {
+  pname = "SPIRV-LLVM-Translator";
+  version = "8.0.1-2";
+
+  src = fetchFromGitHub {
+    owner = "KhronosGroup";
+    repo = "SPIRV-LLVM-Translator";
+    rev = "v${version}";
+    sha256 = "0hxalc3fkliqs61hpr97phbm3qsx4b8vgnlg30aimzr6aas403r5";
+  };
+
+  nativeBuildInputs = [ cmake ];
+
+  buildInputs = [ llvm_8 ];
+
+  checkInputs = [ lit ];
+
+  cmakeFlags = [ "-DLLVM_INCLUDE_TESTS=ON" ];
+
+  # FIXME: CMake tries to run "/llvm-lit" which of course doesn't exist
+  doCheck = false;
+
+  meta = with stdenv.lib; {
+    homepage    = "https://github.com/KhronosGroup/SPIRV-LLVM-Translator";
+    description = "A tool and a library for bi-directional translation between SPIR-V and LLVM IR";
+    license     = licenses.ncsa;
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ gloaming ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/squeak/default.nix b/nixpkgs/pkgs/development/compilers/squeak/default.nix
new file mode 100644
index 000000000000..4687ce86a90a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/squeak/default.nix
@@ -0,0 +1,47 @@
+{ stdenv, fetchurl, cmake, coreutils, dbus, freetype, glib, gnused
+, libpthreadstubs, pango, pkgconfig, libpulseaudio, which }:
+
+stdenv.mkDerivation rec {
+  pname = "squeak";
+  version = "4.10.2.2614";
+
+  src = fetchurl {
+    sha256 = "0bpwbnpy2sb4gylchfx50sha70z36bwgdxraym4vrr93l8pd3dix";
+    url = "http://squeakvm.org/unix/release/Squeak-${version}-src.tar.gz";
+  };
+
+  buildInputs = [ coreutils dbus freetype glib gnused libpthreadstubs
+    pango libpulseaudio which ];
+  nativeBuildInputs = [ cmake pkgconfig ];
+
+  postPatch = ''
+    for i in squeak.in squeak.sh.in; do
+      substituteInPlace unix/cmake/$i --replace "PATH=" \
+        "PATH=${stdenv.lib.makeBinPath [ coreutils gnused which ]} #"
+    done
+  '';
+
+  configurePhase = ''
+    unix/cmake/configure --prefix=$out --enable-mpg-{mmx,pthreads}
+  '';
+
+  enableParallelBuilding = true;
+
+  hardeningDisable = [ "format" ];
+
+  meta = with stdenv.lib; {
+    description = "Smalltalk programming language and environment";
+    longDescription = ''
+      Squeak is a full-featured implementation of the Smalltalk programming
+      language and environment based on (and largely compatible with) the
+      original Smalltalk-80 system. Squeak has very powerful 2- and 3-D
+      graphics, sound, video, MIDI, animation and other multimedia
+      capabilities. It also includes a customisable framework for creating
+      dynamic HTTP servers and interactively extensible Web sites.
+    '';
+    homepage = "http://squeakvm.org/";
+    downloadPage = "http://squeakvm.org/unix/index.html";
+    license = with licenses; [ asl20 mit ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/stalin/default.nix b/nixpkgs/pkgs/development/compilers/stalin/default.nix
new file mode 100644
index 000000000000..430bc251b4bd
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/stalin/default.nix
@@ -0,0 +1,45 @@
+{ fetchurl, stdenv, ncompress, libX11 }:
+
+stdenv.mkDerivation rec {
+  name = "stalin-0.11";
+
+  src = fetchurl {
+    url = "ftp://ftp.ecn.purdue.edu/qobi/stalin.tar.Z";
+    sha256 = "0lz8riccpigdixwf6dswwva6s4kxaz3dzxhkqhcxgwmffy30vw8s";
+  };
+
+  buildInputs = [ ncompress libX11 ];
+
+  buildPhase = '' ./build '';
+
+  installPhase = ''
+    mkdir -p "$out/bin"
+    cp stalin "$out/bin"
+
+    mkdir -p "$out/man/man1"
+    cp stalin.1 "$out/man/man1"
+
+    mkdir -p "$out/share/emacs/site-lisp"
+    cp stalin.el "$out/share/emacs/site-lisp"
+
+    mkdir -p "$out/doc/${name}"
+    cp README "$out/doc/${name}"
+
+    mkdir -p "$out/share/${name}/include"
+    cp "include/"* "$out/share/${name}/include"
+
+    substituteInPlace "$out/bin/stalin" \
+      --replace "$PWD/include/stalin" "$out/share/${name}/include/stalin"
+    substituteInPlace "$out/bin/stalin" \
+      --replace "$PWD/include" "$out/share/${name}/include"
+  '';
+
+  meta = {
+    homepage = "http://www.ece.purdue.edu/~qobi/software.html";
+    license = stdenv.lib.licenses.gpl2Plus;
+    description = "Stalin, an optimizing Scheme compiler";
+
+    maintainers = [ ];
+    platforms = ["i686-linux"];  # doesn't want to work on 64-bit platforms
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/swi-prolog/default.nix b/nixpkgs/pkgs/development/compilers/swi-prolog/default.nix
new file mode 100644
index 000000000000..0140bb401118
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swi-prolog/default.nix
@@ -0,0 +1,54 @@
+{ stdenv, fetchFromGitHub, jdk, gmp, readline, openssl, unixODBC, zlib
+, libarchive, db, pcre, libedit, libossp_uuid, libXpm
+, libSM, libXt, freetype, pkgconfig, fontconfig
+, cmake, libyaml, Security
+, libjpeg, libX11, libXext, libXft, libXinerama
+, extraLibraries ? [ jdk unixODBC libXpm libSM libXt freetype fontconfig ]
+, extraPacks     ? []
+, withGui ? false
+}:
+
+let
+  version = "8.1.15";
+  packInstall = swiplPath: pack:
+    ''${swiplPath}/bin/swipl -g "pack_install(${pack}, [package_directory(\"${swiplPath}/lib/swipl/pack\"), silent(true), interactive(false)])." -t "halt."
+    '';
+in
+stdenv.mkDerivation {
+  pname = "swi-prolog";
+  inherit version;
+
+  src = fetchFromGitHub {
+    owner = "SWI-Prolog";
+    repo = "swipl-devel";
+    rev = "V${version}";
+    sha256 = "0czbrscx2s4079nmwvipp9cnwfny16m3fpnp823llm7wyljchgvq";
+    fetchSubmodules = true;
+  };
+
+  nativeBuildInputs = [ cmake pkgconfig ];
+
+  buildInputs = [ gmp readline openssl
+    libarchive libyaml db pcre libedit libossp_uuid
+    zlib ]
+  ++ stdenv.lib.optionals (withGui && !stdenv.isDarwin) [ libXpm libX11 libXext libXft libXinerama libjpeg ]
+  ++ extraLibraries
+  ++ stdenv.lib.optional stdenv.isDarwin Security;
+
+  hardeningDisable = [ "format" ];
+
+  cmakeFlags = [ "-DSWIPL_INSTALL_IN_LIB=ON" ];
+
+  postInstall = builtins.concatStringsSep "\n"
+  ( builtins.map (packInstall "$out") extraPacks
+  );
+
+  meta = {
+    homepage = "https://www.swi-prolog.org";
+    description = "A Prolog compiler and interpreter";
+    license = stdenv.lib.licenses.bsd2;
+
+    platforms = stdenv.lib.platforms.linux ++ stdenv.lib.optionals (!withGui) stdenv.lib.platforms.darwin;
+    maintainers = [ stdenv.lib.maintainers.meditans ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/swift/default.nix b/nixpkgs/pkgs/development/compilers/swift/default.nix
new file mode 100644
index 000000000000..0cd1f704421e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/default.nix
@@ -0,0 +1,328 @@
+{ stdenv
+, cmake
+, coreutils
+, glibc
+, which
+, perl
+, libedit
+, ninja
+, pkgconfig
+, sqlite
+, swig
+, bash
+, libxml2
+, clang
+, python
+, ncurses
+, libuuid
+, libbsd
+, icu
+, autoconf
+, libtool
+, automake
+, libblocksruntime
+, curl
+, rsync
+, git
+, libgit2
+, fetchFromGitHub
+, fetchpatch
+, findutils
+, makeWrapper
+, gnumake
+, file
+}:
+
+let
+  version = "5.1.1";
+
+  fetch = { repo, sha256, fetchSubmodules ? false }:
+    fetchFromGitHub {
+      owner = "apple";
+      inherit repo sha256 fetchSubmodules;
+      rev = "swift-${version}-RELEASE";
+      name = "${repo}-${version}-src";
+    };
+
+  sources = {
+    llvm = fetch {
+      repo = "swift-llvm";
+      sha256 = "00ldd9dby6fl6nk3z17148fvb7g9x4jkn1afx26y51v8rwgm1i7f";
+    };
+    compilerrt = fetch {
+      repo = "swift-compiler-rt";
+      sha256 = "1431f74l0n2dxn728qp65nc6hivx88fax1wzfrnrv19y77br05wj";
+    };
+    clang = fetch {
+      repo = "swift-clang";
+      sha256 = "0n7k6nvzgqp6h6bfqcmna484w90db3zv4sh5rdh89wxyhdz6rk4v";
+    };
+    clangtools = fetch {
+      repo = "swift-clang-tools-extra";
+      sha256 = "0snp2rpd60z239pr7fxpkj332rkdjhg63adqvqdkjsbrxcqqcgqa";
+    };
+    indexstore = fetch {
+      repo = "indexstore-db";
+      sha256 = "1gwkqkdmpd5hn7555dpdkys0z50yh00hjry2886h6rx7avh5p05n";
+    };
+    sourcekit = fetch {
+      repo = "sourcekit-lsp";
+      sha256 = "0k84ssr1k7grbvpk81rr21ii8csnixn9dp0cga98h6i1gshn8ml4";
+    };
+    cmark = fetch {
+      repo = "swift-cmark";
+      sha256 = "079smm79hbwr06bvghd2sb86b8gpkprnzlyj9kh95jy38xhlhdnj";
+    };
+    lldb = fetch {
+      repo = "swift-lldb";
+      sha256 = "0j787475f0nlmvxqblkhn3yrvn9qhcb2jcijwijxwq95ar2jdygs";
+    };
+    llbuild = fetch {
+      repo = "swift-llbuild";
+      sha256 = "1n2s5isxyl6b6ya617gdzjbw68shbvd52vsfqc1256rk4g448v8b";
+    };
+    pm = fetch {
+      repo = "swift-package-manager";
+      sha256 = "1a49jmag5mpld9zr96g8a773334mrz1c4nyw38gf4p6sckf4jp29";
+    };
+    xctest = fetch {
+      repo = "swift-corelibs-xctest";
+      sha256 = "0rxy9sq7i0s0kxfkz0hvdp8zyb40h31f7g4m0kry36qk82gzzh89";
+    };
+    foundation = fetch {
+      repo = "swift-corelibs-foundation";
+      sha256 = "1iiiijsnys0r3hjcj1jlkn3yszzi7hwb2041cnm5z306nl9sybzp";
+    };
+    libdispatch = fetch {
+      repo = "swift-corelibs-libdispatch";
+      sha256 = "0laqsizsikyjhrzn0rghvxd8afg4yav7cbghvnf7ywk9wc6kpkmn";
+      fetchSubmodules = true;
+    };
+    swift = fetch {
+      repo = "swift";
+      sha256 = "0m4r1gzrnn0s1c7haqq9dlmvpqxbgbkbdfmq6qaph869wcmvdkvy";
+    };
+  };
+
+  devInputs = [
+    curl
+    glibc
+    icu
+    libblocksruntime
+    libbsd
+    libedit
+    libuuid
+    libxml2
+    ncurses
+    sqlite
+    swig
+  ];
+
+  cmakeFlags = [
+    "-DGLIBC_INCLUDE_PATH=${stdenv.cc.libc.dev}/include"
+    "-DC_INCLUDE_DIRS=${stdenv.lib.makeSearchPathOutput "dev" "include" devInputs}:${libxml2.dev}/include/libxml2"
+    "-DGCC_INSTALL_PREFIX=${clang.cc.gcc}"
+  ];
+
+in
+stdenv.mkDerivation {
+  name = "swift-${version}";
+
+  nativeBuildInputs = [
+    autoconf
+    automake
+    bash
+    cmake
+    coreutils
+    findutils
+    gnumake
+    libtool
+    makeWrapper
+    ninja
+    perl
+    pkgconfig
+    python
+    rsync
+    which
+  ];
+  buildInputs = devInputs ++ [
+    clang
+  ];
+
+  # TODO: Revisit what's propagated and how
+  propagatedBuildInputs = [
+    libgit2
+    python
+  ];
+  propagatedUserEnvPkgs = [ git pkgconfig ];
+
+  hardeningDisable = [ "format" ]; # for LLDB
+
+  unpackPhase = ''
+    mkdir src
+    cd src
+    export SWIFT_SOURCE_ROOT=$PWD
+
+    cp -r ${sources.llvm} llvm
+    cp -r ${sources.compilerrt} compiler-rt
+    cp -r ${sources.clang} clang
+    cp -r ${sources.clangtools} clang-tools-extra
+    cp -r ${sources.indexstore} indexstore-db
+    cp -r ${sources.sourcekit} sourcekit-lsp
+    cp -r ${sources.cmark} cmark
+    cp -r ${sources.lldb} lldb
+    cp -r ${sources.llbuild} llbuild
+    cp -r ${sources.pm} swiftpm
+    cp -r ${sources.xctest} swift-corelibs-xctest
+    cp -r ${sources.foundation} swift-corelibs-foundation
+    cp -r ${sources.libdispatch} swift-corelibs-libdispatch
+    cp -r ${sources.swift} swift
+
+    chmod -R u+w .
+  '';
+
+  patchPhase = ''
+    # Just patch all the things for now, we can focus this later
+    patchShebangs $SWIFT_SOURCE_ROOT
+
+    # TODO eliminate use of env.
+    find -type f -print0 | xargs -0 sed -i \
+      -e 's|/usr/bin/env|${coreutils}/bin/env|g' \
+      -e 's|/usr/bin/make|${gnumake}/bin/make|g' \
+      -e 's|/bin/mkdir|${coreutils}/bin/mkdir|g' \
+      -e 's|/bin/cp|${coreutils}/bin/cp|g' \
+      -e 's|/usr/bin/file|${file}/bin/file|g'
+
+    substituteInPlace swift/stdlib/public/Platform/CMakeLists.txt \
+      --replace '/usr/include' "${stdenv.cc.libc.dev}/include"
+    substituteInPlace swift/utils/build-script-impl \
+      --replace '/usr/include/c++' "${clang.cc.gcc}/include/c++"
+    patch -p1 -d swift -i ${./patches/glibc-arch-headers.patch}
+    patch -p1 -d swift -i ${./patches/0001-build-presets-linux-don-t-require-using-Ninja.patch}
+    patch -p1 -d swift -i ${./patches/0002-build-presets-linux-allow-custom-install-prefix.patch}
+    patch -p1 -d swift -i ${./patches/0003-build-presets-linux-don-t-build-extra-libs.patch}
+    patch -p1 -d swift -i ${./patches/0004-build-presets-linux-plumb-extra-cmake-options.patch}
+
+    sed -i swift/utils/build-presets.ini \
+      -e 's/^test-installable-package$/# \0/' \
+      -e 's/^test$/# \0/' \
+      -e 's/^validation-test$/# \0/' \
+      -e 's/^long-test$/# \0/' \
+      -e 's/^stress-test$/# \0/' \
+      -e 's/^test-optimized$/# \0/' \
+      \
+      -e 's/^swift-install-components=autolink.*$/\0;editor-integration/'
+
+    substituteInPlace clang/lib/Driver/ToolChains/Linux.cpp \
+      --replace 'SysRoot + "/lib' '"${glibc}/lib" "'
+    substituteInPlace clang/lib/Driver/ToolChains/Linux.cpp \
+      --replace 'SysRoot + "/usr/lib' '"${glibc}/lib" "'
+    patch -p1 -d clang -i ${./patches/llvm-toolchain-dir.patch}
+    patch -p1 -d clang -i ${./purity.patch}
+
+    # Workaround hardcoded dep on "libcurses" (vs "libncurses"):
+    sed -i 's/curses/ncurses/' llbuild/*/*/CMakeLists.txt
+    # uuid.h is not part of glibc, but of libuuid
+    sed -i 's|''${GLIBC_INCLUDE_PATH}/uuid/uuid.h|${libuuid.dev}/include/uuid/uuid.h|' swift/stdlib/public/Platform/glibc.modulemap.gyb
+
+    # Compatibility with glibc 2.30
+    # Adapted from https://github.com/apple/swift-package-manager/pull/2408
+    patch -p1 -d swiftpm -i ${./patches/swift-package-manager-glibc-2.30.patch}
+    # https://github.com/apple/swift/pull/27288
+    patch -p1 -d swift -i ${fetchpatch {
+      url = "https://github.com/apple/swift/commit/f968f4282d53f487b29cf456415df46f9adf8748.patch";
+      sha256 = "1aa7l66wlgip63i4r0zvi9072392bnj03s4cn12p706hbpq0k37c";
+    }}
+
+    PREFIX=''${out/#\/}
+    substituteInPlace indexstore-db/Utilities/build-script-helper.py \
+      --replace usr "$PREFIX"
+    substituteInPlace sourcekit-lsp/Utilities/build-script-helper.py \
+      --replace usr "$PREFIX"
+    substituteInPlace swift-corelibs-xctest/build_script.py \
+      --replace usr "$PREFIX"
+  '';
+
+  configurePhase = ''
+    cd ..
+
+    mkdir build install
+    export SWIFT_BUILD_ROOT=$PWD/build
+    export SWIFT_INSTALL_DIR=$PWD/install
+
+    export INSTALLABLE_PACKAGE=$PWD/swift.tar.gz
+    export NIX_ENFORCE_PURITY=
+
+    cd $SWIFT_BUILD_ROOT
+  '';
+
+  buildPhase = ''
+    # gcc-6.4.0/include/c++/6.4.0/cstdlib:75:15: fatal error: 'stdlib.h' file not found
+    export NIX_CFLAGS_COMPILE="$( echo ${clang.default_cxx_stdlib_compile} ) $NIX_CFLAGS_COMPILE"
+    # During the Swift build, a full local LLVM build is performed and the resulting clang is invoked.
+    # This compiler is not using the Nix wrappers, so it needs some help to find things.
+    export NIX_LDFLAGS_BEFORE="-rpath ${clang.cc.gcc.lib}/lib -L${clang.cc.gcc.lib}/lib $NIX_LDFLAGS_BEFORE"
+    # However, we want to use the wrapped compiler whenever possible.
+    export CC="${clang}/bin/clang"
+
+    # fix for https://bugs.llvm.org/show_bug.cgi?id=39743
+    # see also https://forums.swift.org/t/18138/15
+    export CCC_OVERRIDE_OPTIONS="#x-fmodules s/-fmodules-cache-path.*//"
+
+    $SWIFT_SOURCE_ROOT/swift/utils/build-script \
+      --preset=buildbot_linux \
+      installable_package=$INSTALLABLE_PACKAGE \
+      install_prefix=$out \
+      install_destdir=$SWIFT_INSTALL_DIR \
+      extra_cmake_options="${stdenv.lib.concatStringsSep "," cmakeFlags}"
+  '';
+
+  doCheck = true;
+
+  checkInputs = [ file ];
+
+  checkPhase = ''
+    # FIXME: disable non-working tests
+    rm $SWIFT_SOURCE_ROOT/swift/test/Driver/static-stdlib-linux.swift  # static linkage of libatomic.a complains about missing PIC
+    rm $SWIFT_SOURCE_ROOT/swift/validation-test/Python/build_swift.swift  # install_prefix not passed properly
+
+    # match the swift wrapper in the install phase
+    export LIBRARY_PATH=${icu}/lib:${libuuid.out}/lib
+
+    checkTarget=check-swift-all
+    ninjaFlags='-C buildbot_linux/swift-${stdenv.hostPlatform.parsed.kernel.name}-${stdenv.hostPlatform.parsed.cpu.name}'
+    ninjaCheckPhase
+  '';
+
+  installPhase = ''
+    mkdir -p $out
+
+    # Extract the generated tarball into the store
+    tar xf $INSTALLABLE_PACKAGE -C $out --strip-components=3 ''${out/#\/}
+    find $out -type d -empty -delete
+
+    # fix installation weirdness, also present in Apple’s official tarballs
+    mv $out/local/include/indexstore $out/include
+    rmdir $out/local/include $out/local
+    rm -r $out/bin/sdk-module-lists $out/bin/swift-api-checker.py
+
+    wrapProgram $out/bin/swift \
+      --suffix C_INCLUDE_PATH : $out/lib/swift/clang/include \
+      --suffix CPLUS_INCLUDE_PATH : $out/lib/swift/clang/include \
+      --suffix LIBRARY_PATH : ${icu}/lib:${libuuid.out}/lib
+  '';
+
+  # Hack to avoid build and install directories in RPATHs.
+  preFixup = ''rm -rf $SWIFT_BUILD_ROOT $SWIFT_INSTALL_DIR'';
+
+  meta = with stdenv.lib; {
+    description = "The Swift Programming Language";
+    homepage = "https://github.com/apple/swift";
+    maintainers = with maintainers; [ dtzWill ];
+    license = licenses.asl20;
+    # Swift doesn't support 32bit Linux, unknown on other platforms.
+    platforms = platforms.linux;
+    badPlatforms = platforms.i686;
+    broken = stdenv.isAarch64; # 2018-09-04, never built on Hydra
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/swift/patches/0001-build-presets-linux-don-t-require-using-Ninja.patch b/nixpkgs/pkgs/development/compilers/swift/patches/0001-build-presets-linux-don-t-require-using-Ninja.patch
new file mode 100644
index 000000000000..60b2996b3405
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/patches/0001-build-presets-linux-don-t-require-using-Ninja.patch
@@ -0,0 +1,13 @@
+Don't build Ninja, we use our own.
+
+--- a/utils/build-presets.ini
++++ b/utils/build-presets.ini
+@@ -745,7 +745,7 @@ swiftpm
+ 
+ dash-dash
+ 
+-build-ninja
++# build-ninja
+ install-swift
+ install-lldb
+ install-llbuild
diff --git a/nixpkgs/pkgs/development/compilers/swift/patches/0002-build-presets-linux-allow-custom-install-prefix.patch b/nixpkgs/pkgs/development/compilers/swift/patches/0002-build-presets-linux-allow-custom-install-prefix.patch
new file mode 100644
index 000000000000..5ca6bf1354dc
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/patches/0002-build-presets-linux-allow-custom-install-prefix.patch
@@ -0,0 +1,13 @@
+allow custom install prefix
+
+--- a/utils/build-presets.ini	2019-04-11 14:51:40.060259462 +0200
++++ b/utils/build-presets.ini	2019-04-11 15:16:17.471137969 +0200
+@@ -752,7 +752,7 @@
+ install-swiftpm
+ install-xctest
+ install-libicu
+-install-prefix=/usr
++install-prefix=%(install_prefix)s
+ install-libcxx
+ install-sourcekit-lsp
+ build-swift-static-stdlib
diff --git a/nixpkgs/pkgs/development/compilers/swift/patches/0003-build-presets-linux-don-t-build-extra-libs.patch b/nixpkgs/pkgs/development/compilers/swift/patches/0003-build-presets-linux-don-t-build-extra-libs.patch
new file mode 100644
index 000000000000..0a66af9e5137
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/patches/0003-build-presets-linux-don-t-build-extra-libs.patch
@@ -0,0 +1,23 @@
+Disable targets, where we use Nix packages.
+
+--- a/utils/build-presets.ini	2019-04-11 15:19:57.845178834 +0200
++++ b/utils/build-presets.ini	2019-04-11 15:27:42.041297057 +0200
+@@ -740,8 +740,6 @@
+ llbuild
+ swiftpm
+ xctest
+-libicu
+-libcxx
+ 
+ dash-dash
+ 
+@@ -751,9 +749,7 @@
+ install-llbuild
+ install-swiftpm
+ install-xctest
+-install-libicu
+ install-prefix=%(install_prefix)s
+-install-libcxx
+ install-sourcekit-lsp
+ build-swift-static-stdlib
+ build-swift-static-sdk-overlay
diff --git a/nixpkgs/pkgs/development/compilers/swift/patches/0004-build-presets-linux-plumb-extra-cmake-options.patch b/nixpkgs/pkgs/development/compilers/swift/patches/0004-build-presets-linux-plumb-extra-cmake-options.patch
new file mode 100644
index 000000000000..304b53a1dbf1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/patches/0004-build-presets-linux-plumb-extra-cmake-options.patch
@@ -0,0 +1,13 @@
+plumb extra-cmake-options
+
+--- a/utils/build-presets.ini
++++ b/utils/build-presets.ini
+@@ -766,6 +766,8 @@ install-destdir=%(install_destdir)s
+ # Path to the .tar.gz package we would create.
+ installable-package=%(installable_package)s
+ 
++extra-cmake-options=%(extra_cmake_options)s
++
+ [preset: buildbot_linux]
+ mixin-preset=mixin_linux_installation
+ build-subdir=buildbot_linux
diff --git a/nixpkgs/pkgs/development/compilers/swift/patches/glibc-arch-headers.patch b/nixpkgs/pkgs/development/compilers/swift/patches/glibc-arch-headers.patch
new file mode 100644
index 000000000000..c05db5208012
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/patches/glibc-arch-headers.patch
@@ -0,0 +1,13 @@
+The Nix glibc headers do not use include/x86_64-linux-gnu subdirectories.
+
+--- swift/stdlib/public/Platform/CMakeLists.txt	2019-04-09 20:14:44.493801403 +0200
++++ swift/stdlib/public/Platform/CMakeLists.txt	2019-04-09 20:14:44.577800593 +0200
+@@ -77,7 +77,7 @@
+     endif()
+ 
+     set(GLIBC_INCLUDE_PATH "${GLIBC_SYSROOT_RELATIVE_INCLUDE_PATH}")
+-    set(GLIBC_ARCH_INCLUDE_PATH "${GLIBC_SYSROOT_RELATIVE_ARCH_INCLUDE_PATH}")
++    set(GLIBC_ARCH_INCLUDE_PATH "${GLIBC_SYSROOT_RELATIVE_INCLUDE_PATH}")
+ 
+     if(NOT "${SWIFT_SDK_${sdk}_ARCH_${arch}_PATH}" STREQUAL "/" AND NOT "${sdk}" STREQUAL "ANDROID")
+       set(GLIBC_INCLUDE_PATH "${SWIFT_SDK_${sdk}_ARCH_${arch}_PATH}${GLIBC_INCLUDE_PATH}")
diff --git a/nixpkgs/pkgs/development/compilers/swift/patches/llvm-toolchain-dir.patch b/nixpkgs/pkgs/development/compilers/swift/patches/llvm-toolchain-dir.patch
new file mode 100644
index 000000000000..c22b5c820c85
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/patches/llvm-toolchain-dir.patch
@@ -0,0 +1,24 @@
+Use the Nix include dirs and gcc runtime dir, when no sysroot is configured.
+
+--- clang/lib/Driver/ToolChains/Linux.cpp	2018-10-05 18:01:15.731109551 +0200
++++ clang/lib/Driver/ToolChains/Linux.cpp	2018-10-05 18:00:27.959509924 +0200
+@@ -665,7 +665,7 @@
+ 
+   // Check for configure-time C include directories.
+   StringRef CIncludeDirs(C_INCLUDE_DIRS);
+-  if (CIncludeDirs != "") {
++  if (CIncludeDirs != "" && (SysRoot.empty() || SysRoot == "/")) {
+     SmallVector<StringRef, 5> dirs;
+     CIncludeDirs.split(dirs, ":");
+     for (StringRef dir : dirs) {
+--- clang/lib/Driver/ToolChains/Gnu.cpp	2019-10-26 09:49:27.003752743 +0200
++++ clang/lib/Driver/ToolChains/Gnu.cpp	2019-10-26 09:50:49.067236497 +0200
+@@ -1743,7 +1743,7 @@
+   // If we have a SysRoot, ignore GCC_INSTALL_PREFIX.
+   // GCC_INSTALL_PREFIX specifies the gcc installation for the default
+   // sysroot and is likely not valid with a different sysroot.
+-  if (!SysRoot.empty())
++  if (!(SysRoot.empty() || SysRoot == "/"))
+     return "";
+ 
+   return GCC_INSTALL_PREFIX;
diff --git a/nixpkgs/pkgs/development/compilers/swift/patches/swift-package-manager-glibc-2.30.patch b/nixpkgs/pkgs/development/compilers/swift/patches/swift-package-manager-glibc-2.30.patch
new file mode 100644
index 000000000000..14ef38497645
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/patches/swift-package-manager-glibc-2.30.patch
@@ -0,0 +1,25 @@
+diff --git a/Sources/Basic/Process.swift b/Sources/Basic/Process.swift
+index f388c769..8f208691 100644
+--- a/Sources/Basic/Process.swift
++++ b/Sources/Basic/Process.swift
+@@ -322,7 +322,10 @@ public final class Process: ObjectIdentifierProtocol {
+         defer { posix_spawn_file_actions_destroy(&fileActions) }
+ 
+         // Workaround for https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=89e435f3559c53084498e9baad22172b64429362
+-        let devNull = strdup("/dev/null")
++        // Change allowing for newer version of glibc
++        guard let devNull = strdup("/dev/null") else {
++            throw SystemError.posix_spawn(0, arguments)
++        }
+         defer { free(devNull) }
+         // Open /dev/null as stdin.
+         posix_spawn_file_actions_addopen(&fileActions, 0, devNull, O_RDONLY, 0)
+@@ -348,7 +351,7 @@ public final class Process: ObjectIdentifierProtocol {
+ 
+         let argv = CStringArray(arguments)
+         let env = CStringArray(environment.map({ "\($0.0)=\($0.1)" }))
+-        let rv = posix_spawnp(&processID, argv.cArray[0], &fileActions, &attributes, argv.cArray, env.cArray)
++        let rv = posix_spawnp(&processID, argv.cArray[0]!, &fileActions, &attributes, argv.cArray, env.cArray)
+ 
+         guard rv == 0 else {
+             throw SystemError.posix_spawn(rv, arguments)
diff --git a/nixpkgs/pkgs/development/compilers/swift/purity.patch b/nixpkgs/pkgs/development/compilers/swift/purity.patch
new file mode 100644
index 000000000000..4133e89c2830
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/swift/purity.patch
@@ -0,0 +1,18 @@
+"purity" patch for 5.0
+
+--- a/lib/Driver/ToolChains/Gnu.cpp
++++ b/lib/Driver/ToolChains/Gnu.cpp
+@@ -402,13 +402,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
+   if (!Args.hasArg(options::OPT_static)) {
+     if (Args.hasArg(options::OPT_rdynamic))
+       CmdArgs.push_back("-export-dynamic");
+-
+-    if (!Args.hasArg(options::OPT_shared)) {
+-      const std::string Loader =
+-          D.DyldPrefix + ToolChain.getDynamicLinker(Args);
+-      CmdArgs.push_back("-dynamic-linker");
+-      CmdArgs.push_back(Args.MakeArgString(Loader));
+-    }
+   }
+ 
+   CmdArgs.push_back("-o");
diff --git a/nixpkgs/pkgs/development/compilers/terra/default.nix b/nixpkgs/pkgs/development/compilers/terra/default.nix
new file mode 100644
index 000000000000..e8478828c1b0
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/terra/default.nix
@@ -0,0 +1,68 @@
+{ stdenv, fetchurl, fetchFromGitHub
+, llvmPackages, ncurses, lua
+}:
+
+let
+  luajitArchive = "LuaJIT-2.0.5.tar.gz";
+  luajitSrc = fetchurl {
+    url    = "http://luajit.org/download/${luajitArchive}";
+    sha256 = "0yg9q4q6v028bgh85317ykc9whgxgysp76qzaqgq55y6jy11yjw7";
+  };
+in
+stdenv.mkDerivation rec {
+  pname = "terra";
+  version = "1.0.0pre1175_${builtins.substring 0 7 src.rev}";
+
+  src = fetchFromGitHub {
+    owner  = "zdevito";
+    repo   = "terra";
+    rev    = "ef6a75ffee15a30f3c74f4e6943851cfbc0fec3d";
+    sha256 = "0aky17vbv3d9zng34hp17p9zb00dbzwhvzsdjzrrqvk9lmyvix0s";
+  };
+
+  nativeBuildInputs = [ lua ];
+  buildInputs = with llvmPackages; [ llvm clang-unwrapped ncurses ];
+
+  doCheck = true;
+  enableParallelBuilding = true;
+  hardeningDisable = [ "fortify" ];
+  outputs = [ "bin" "dev" "out" "static" ];
+
+  patches = [ ./nix-cflags.patch ];
+  postPatch = ''
+    substituteInPlace Makefile \
+      --replace '-lcurses' '-lncurses'
+
+    substituteInPlace src/terralib.lua \
+      --subst-var-by NIX_LIBC_INCLUDE ${stdenv.lib.getDev stdenv.cc.libc}/include
+  '';
+
+  preBuild = ''
+    cat >Makefile.inc<<EOF
+    CLANG = ${stdenv.lib.getBin llvmPackages.clang-unwrapped}/bin/clang
+    LLVM_CONFIG = ${stdenv.lib.getBin llvmPackages.llvm}/bin/llvm-config
+    EOF
+
+    mkdir -p build
+    cp ${luajitSrc} build/${luajitArchive}
+  '';
+
+  checkPhase = "(cd tests && ../terra run)";
+
+  installPhase = ''
+    install -Dm755 -t $bin/bin release/bin/terra
+    install -Dm755 -t $out/lib release/lib/terra${stdenv.hostPlatform.extensions.sharedLibrary}
+    install -Dm644 -t $static/lib release/lib/libterra.a
+
+    mkdir -pv $dev/include
+    cp -rv release/include/terra $dev/include
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A low-level counterpart to Lua";
+    homepage    = "http://terralang.org/";
+    platforms   = platforms.x86_64;
+    maintainers = with maintainers; [ jb55 thoughtpolice ];
+    license     = licenses.mit;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/terra/nix-cflags.patch b/nixpkgs/pkgs/development/compilers/terra/nix-cflags.patch
new file mode 100644
index 000000000000..339ae23cef65
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/terra/nix-cflags.patch
@@ -0,0 +1,22 @@
+diff --git a/src/terralib.lua b/src/terralib.lua
+index 351238d..e638c90 100644
+--- a/src/terralib.lua
++++ b/src/terralib.lua
+@@ -3395,6 +3395,17 @@ function terra.includecstring(code,cargs,target)
+     	args:insert("-internal-isystem")
+     	args:insert(path)
+     end
++
++    -- NOTE(aseipp): include relevant Nix header files
++    args:insert("-isystem")
++    args:insert("@NIX_LIBC_INCLUDE@")
++
++    local nix_cflags = os.getenv('NIX_CFLAGS_COMPILE')
++    if nix_cflags ~= nil then
++        for w in nix_cflags:gmatch("%S+") do
++          args:insert(w)
++        end
++    end
+     
+     if cargs then
+         args:insertall(cargs)
diff --git a/nixpkgs/pkgs/development/compilers/teyjus/default.nix b/nixpkgs/pkgs/development/compilers/teyjus/default.nix
new file mode 100644
index 000000000000..6768d0c1cbed
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/teyjus/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchurl, omake, ocaml, flex, bison }:
+
+let
+  version = "2.1";
+in
+
+stdenv.mkDerivation {
+  pname = "teyjus";
+  inherit version;
+
+  src = fetchurl {
+    url = "https://github.com/teyjus/teyjus/archive/v${version}.tar.gz";
+    sha256 = "0393wpg8v1vvarqy2xh4fdmrwlrl6jaj960kql7cq79mb9p3m269";
+  };
+
+  patches = [ ./fix-lex-to-flex.patch ];
+
+  buildInputs = [ omake ocaml flex bison ];
+
+  hardeningDisable = [ "format" ];
+
+  buildPhase = "omake all";
+
+  checkPhase = "omake check";
+
+  installPhase = "mkdir -p $out/bin && cp tj* $out/bin";
+
+  meta = with stdenv.lib; {
+    description = "An efficient implementation of the Lambda Prolog language";
+    homepage = "https://github.com/teyjus/teyjus";
+    license = stdenv.lib.licenses.gpl3;
+    maintainers = [ maintainers.bcdarwin ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/teyjus/fix-lex-to-flex.patch b/nixpkgs/pkgs/development/compilers/teyjus/fix-lex-to-flex.patch
new file mode 100644
index 000000000000..fa82d80633ad
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/teyjus/fix-lex-to-flex.patch
@@ -0,0 +1,25 @@
+diff --git a/source/OMakefile b/source/OMakefile
+index e6bd37e..1bbc0a8 100644
+--- a/source/OMakefile
++++ b/source/OMakefile
+@@ -184,6 +184,12 @@ DEP_MAIN = $(FNT)/dependfront
+ PAR_MAIN = $(FNT)/parsefront

+ 

+ ############################################################

++# Nixpkgs specific changes

++#

++

++LEX = flex

++

++############################################################

+ # Platform specific changes

+ #

+ 

+@@ -194,7 +200,6 @@ if $(mem $(SYSNAME), Linux)
+ 

+ if $(mem $(OSTYPE), Cygwin Win32)

+     YACC = bison -by

+-    LEX = flex

+     CC = i686-pc-mingw32-gcc

+     INC_C[] += $(INC)/byteswap $(INC)/search

+     export

diff --git a/nixpkgs/pkgs/development/compilers/tinycc/default.nix b/nixpkgs/pkgs/development/compilers/tinycc/default.nix
new file mode 100644
index 000000000000..03e8be7053a2
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/tinycc/default.nix
@@ -0,0 +1,83 @@
+{ stdenv, lib, fetchFromRepoOrCz, perl, texinfo }:
+with lib;
+
+stdenv.mkDerivation rec {
+  pname = "tcc";
+  version = "0.9.27";
+  upstreamVersion = "release_${concatStringsSep "_" (builtins.splitVersion version)}";
+
+  src = fetchFromRepoOrCz {
+    repo = "tinycc";
+    rev = upstreamVersion;
+    sha256 = "12mm1lqywz0akr2yb2axjfbw8lwv57nh395vzsk534riz03ml977";
+  };
+
+  nativeBuildInputs = [ perl texinfo ];
+
+  hardeningDisable = [ "fortify" ];
+
+  enableParallelBuilding = true;
+
+  postPatch = ''
+    substituteInPlace "texi2pod.pl" \
+      --replace "/usr/bin/perl" "${perl}/bin/perl"
+  '';
+
+  preConfigure = ''
+    echo ${version} > VERSION
+
+    configureFlagsArray+=("--cc=cc")
+    configureFlagsArray+=("--elfinterp=$(< $NIX_CC/nix-support/dynamic-linker)")
+    configureFlagsArray+=("--crtprefix=${getLib stdenv.cc.libc}/lib")
+    configureFlagsArray+=("--sysincludepaths=${getDev stdenv.cc.libc}/include:{B}/include")
+    configureFlagsArray+=("--libpaths=${getLib stdenv.cc.libc}/lib")
+  '';
+
+  postFixup = ''
+    cat >libtcc.pc <<EOF
+    Name: libtcc
+    Description: Tiny C compiler backend
+    Version: ${version}
+    Libs: -L$out/lib -Wl,--rpath $out/lib -ltcc -ldl
+    Cflags: -I$out/include
+    EOF
+    install -Dt $out/lib/pkgconfig libtcc.pc -m 444
+  '';
+
+  doCheck = true;
+  checkTarget = "test";
+
+  meta = {
+    description = "Small, fast, and embeddable C compiler and interpreter";
+
+    longDescription = ''
+      TinyCC (aka TCC) is a small but hyper fast C compiler.  Unlike
+      other C compilers, it is meant to be self-sufficient: you do not
+      need an external assembler or linker because TCC does that for
+      you.
+
+      TCC compiles so fast that even for big projects Makefiles may not
+      be necessary.
+
+      TCC not only supports ANSI C, but also most of the new ISO C99
+      standard and many GNU C extensions.
+
+      TCC can also be used to make C scripts, i.e. pieces of C source
+      that you run as a Perl or Python script.  Compilation is so fast
+      that your script will be as fast as if it was an executable.
+
+      TCC can also automatically generate memory and bound checks while
+      allowing all C pointers operations.  TCC can do these checks even
+      if non patched libraries are used.
+
+      With libtcc, you can use TCC as a backend for dynamic code
+      generation.
+    '';
+
+    homepage = "http://www.tinycc.org/";
+    license = licenses.mit;
+
+    platforms = [ "x86_64-linux" ];
+    maintainers = [ maintainers.joachifm ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/tinygo/default.nix b/nixpkgs/pkgs/development/compilers/tinygo/default.nix
new file mode 100644
index 000000000000..b3176cac78a3
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/tinygo/default.nix
@@ -0,0 +1,49 @@
+{ lib, buildGoModule, fetchFromGitHub, llvm, clang-unwrapped, lld, avrgcc
+, avrdude, openocd, gcc-arm-embedded, makeWrapper, fetchurl }:
+
+let main = ./main.go;
+    gomod = ./go.mod;
+in
+buildGoModule rec {
+  pname = "tinygo";
+  version = "0.13.1";
+
+  src = fetchFromGitHub {
+    owner = "tinygo-org";
+    repo = "tinygo";
+    rev = "v${version}";
+    sha256 = "0das5z5y2x1970yi9c4yssxvwrrjhdmsj495q0r5mb02amvc954v";
+  };
+ 
+  overrideModAttrs = (_: {
+      patches = [];
+      preBuild = ''
+      rm -rf *
+      cp ${main} main.go
+      cp ${gomod} go.mod
+      '';
+  });
+
+  preBuild = "cp ${gomod} go.mod";
+
+  vendorSha256 = "19194dlzpl6zzw2gqybma5pwip71rw8z937f104k6c158qzzgy62";
+  enableParallelBuilding = true;
+  subPackages = [ "." ];
+  buildInputs = [ llvm clang-unwrapped makeWrapper ];
+  propagatedBuildInputs = [ lld avrgcc avrdude openocd gcc-arm-embedded ];
+
+  postInstall = ''
+    mkdir -p $out/share/tinygo
+    cp -a lib src targets $out/share/tinygo
+    wrapProgram $out/bin/tinygo --prefix "TINYGOROOT" : "$out/share/tinygo"
+    ln -sf $out/bin $out/share/tinygo
+  '';
+
+  meta = with lib; {
+    homepage = "https://tinygo.org/";
+    description = "Go compiler for small places";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ chiiruno ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/tinygo/go.mod b/nixpkgs/pkgs/development/compilers/tinygo/go.mod
new file mode 100644
index 000000000000..f01b38d3e512
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/tinygo/go.mod
@@ -0,0 +1,13 @@
+module github.com/tinygo-org/tinygo
+
+go 1.14
+
+require (
+	github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2
+	github.com/google/shlex v0.0.0-20181106134648-c34317bd91bf
+	github.com/marcinbor85/gohex v0.0.0-20180128172054-7a43cd876e46
+	go.bug.st/serial v1.0.0
+	golang.org/x/tools v0.0.0-20200512001501-aaeff5de670a
+	google.golang.org/appengine v1.4.0
+	tinygo.org/x/go-llvm v0.0.0-20200401165421-8d120882fc7a
+)
diff --git a/nixpkgs/pkgs/development/compilers/tinygo/main.go b/nixpkgs/pkgs/development/compilers/tinygo/main.go
new file mode 100644
index 000000000000..050cf8afe39f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/tinygo/main.go
@@ -0,0 +1,18 @@
+package main
+
+import (
+	"fmt"
+
+	_ "github.com/blakesmith/ar"
+	_ "github.com/google/shlex"
+	_ "github.com/marcinbor85/gohex"
+	_ "go.bug.st/serial"
+	_ "golang.org/x/tools/go/ast/astutil"
+	_ "golang.org/x/tools/go/ssa"
+	_ "google.golang.org/appengine"
+	_ "tinygo.org/x/go-llvm"
+)
+
+func main() {
+	fmt.Println("vim-go")
+}
diff --git a/nixpkgs/pkgs/development/compilers/unison/default.nix b/nixpkgs/pkgs/development/compilers/unison/default.nix
new file mode 100644
index 000000000000..c17f85b4936a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/unison/default.nix
@@ -0,0 +1,41 @@
+{ stdenv, fetchurl, autoPatchelfHook
+, ncurses5, zlib, gmp
+}:
+
+stdenv.mkDerivation rec {
+  pname = "unison-code-manager";
+  milestone_id = "M1l";
+  version = "1.0.${milestone_id}-alpha";
+
+  src = if (stdenv.isDarwin) then
+    fetchurl {
+      url = "https://github.com/unisonweb/unison/releases/download/release/${milestone_id}/unison-osx.tar.gz";
+      sha256 = "0qbxakrp3p3k3k8a1m2g24ivs3c8j5rj7ij84i7k548505rva9qr";
+    }
+  else
+    fetchurl {
+      url = "https://github.com/unisonweb/unison/releases/download/release/${milestone_id}/unison-linux64.tar.gz";
+      sha256 = "152yzv7j4nyp228ngzbhki9fid1xdqrjvl1rwxc05wq30jwwqx0x";
+    };
+
+  # The tarball is just the prebuilt binary, in the archive root.
+  sourceRoot = ".";
+  dontBuild = true;
+  dontConfigure = true;
+
+  nativeBuildInputs = stdenv.lib.optional (!stdenv.isDarwin) autoPatchelfHook;
+  buildInputs = stdenv.lib.optionals (!stdenv.isDarwin) [ ncurses5 zlib gmp ];
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mv ucm $out/bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Modern, statically-typed purely functional language";
+    homepage = "https://unisonweb.org/";
+    license = with licenses; [ mit bsd3 ];
+    maintainers = [ maintainers.virusdave ];
+    platforms = [ "x86_64-darwin" "x86_64-linux" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/urn/default.nix b/nixpkgs/pkgs/development/compilers/urn/default.nix
new file mode 100644
index 000000000000..812792a125ea
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/urn/default.nix
@@ -0,0 +1,61 @@
+{ stdenv, fetchFromGitLab, buildEnv, makeWrapper, lua, luajit, readline
+, useLuaJit ? false
+, extraLibraries ? []
+}:
+
+let
+  version = "0.7.2";
+  # Build a sort of "union package" with all the native dependencies we
+  # have: Lua (or LuaJIT), readline, etc. Then, we can depend on this
+  # and refer to ${urn-rt} instead of ${lua}, ${readline}, etc.
+  urn-rt = buildEnv {
+    name = "urn-rt-${version}";
+    ignoreCollisions = true;
+    paths = if useLuaJit then
+              [ luajit readline ]
+            else
+              [ lua ];
+  };
+
+  inherit (stdenv.lib) optionalString concatMapStringsSep;
+in
+
+stdenv.mkDerivation {
+  name = "urn-${optionalString (extraLibraries != []) "with-libraries-"}${version}";
+
+  src = fetchFromGitLab {
+    owner = "urn";
+    repo = "urn";
+    rev = "v${version}";
+    sha256 = "0nclr3d8ap0y5cg36i7g4ggdqci6m5q27y9f26b57km8p266kcpy";
+  };
+
+  buildInputs = [ makeWrapper ];
+  # Any packages that depend on the compiler have a transitive
+  # dependency on the Urn runtime support.
+  propagatedBuildInputs = [ urn-rt ];
+
+  makeFlags = ["-B"];
+
+  installPhase = ''
+    mkdir -p $out/bin $out/lib
+    install -m 0755 bin/urn.lua $out/bin/urn
+    cp -r lib $out/lib/urn
+    wrapProgram $out/bin/urn \
+      --add-flags "-i $out/lib/urn --prelude $out/lib/urn/prelude.lisp" \
+      --add-flags "${concatMapStringsSep " " (x: "-i ${x.libraryPath}") extraLibraries}" \
+      --prefix PATH : ${urn-rt}/bin/ \
+      --prefix LD_LIBRARY_PATH : ${urn-rt}/lib/
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://urn-lang.com";
+    description = "Yet another Lisp variant which compiles to Lua";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ CrazedProgrammer ];
+  };
+
+  passthru = {
+    inherit urn-rt;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/urweb/default.nix b/nixpkgs/pkgs/development/compilers/urweb/default.nix
new file mode 100644
index 000000000000..ac324167f97b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/urweb/default.nix
@@ -0,0 +1,46 @@
+{ stdenv, fetchurl, file, openssl, mlton
+, libmysqlclient, postgresql, sqlite, gcc, icu
+}:
+
+stdenv.mkDerivation rec {
+  pname = "urweb";
+  version = "20200209";
+
+  src = fetchurl {
+    url = "https://github.com/urweb/urweb/releases/download/${version}/${pname}-${version}.tar.gz";
+    sha256 = "0qh6wcxfk5kf735i5gqwnkdirnnmqhnnpkfz96gz144dgz2i0c5c";
+  };
+
+  buildInputs = [ openssl mlton libmysqlclient postgresql sqlite icu ];
+
+  prePatch = ''
+    sed -e 's@/usr/bin/file@${file}/bin/file@g' -i configure
+  '';
+
+  configureFlags = [ "--with-openssl=${openssl.dev}" ];
+
+  preConfigure = ''
+    export PGHEADER="${postgresql}/include/libpq-fe.h";
+    export MSHEADER="${libmysqlclient}/include/mysql/mysql.h";
+    export SQHEADER="${sqlite.dev}/include/sqlite3.h";
+    export ICU_INCLUDES="-I${icu.dev}/include";
+
+    export CC="${gcc}/bin/gcc";
+    export CCARGS="-I$out/include \
+                   -L${openssl.out}/lib \
+                   -L${libmysqlclient}/lib \
+                   -L${postgresql.lib}/lib \
+                   -L${sqlite.out}/lib";
+  '';
+
+  # Be sure to keep the statically linked libraries
+  dontDisableStatic = true;
+
+  meta = {
+    description = "Advanced purely-functional web programming language";
+    homepage    = "http://www.impredicative.com/ur/";
+    license     = stdenv.lib.licenses.bsd3;
+    platforms   = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
+    maintainers = [ stdenv.lib.maintainers.thoughtpolice stdenv.lib.maintainers.sheganinans ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/vala/default.nix b/nixpkgs/pkgs/development/compilers/vala/default.nix
new file mode 100644
index 000000000000..6afc14688aec
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/vala/default.nix
@@ -0,0 +1,131 @@
+{ stdenv, lib, fetchurl, fetchpatch, pkgconfig, flex, bison, libxslt, autoconf, autoreconfHook
+, graphviz, glib, libiconv, libintl, libtool, expat, substituteAll
+}:
+
+let
+  generic = lib.makeOverridable ({
+    version, sha256,
+    extraNativeBuildInputs ? [],
+    extraBuildInputs ? [],
+    withGraphviz ? false
+  }:
+  let
+    # Patches from the openembedded-core project to build vala without graphviz
+    # support. We need to apply an additional patch to allow building when the
+    # header file isn't available at all, but that patch (./gvc-compat.patch)
+    # can be shared between all versions of Vala so far.
+    graphvizPatch =
+      let
+        fp = { commit, sha256 }: fetchpatch {
+          url = "https://github.com/openembedded/openembedded-core/raw/${commit}/meta/recipes-devtools/vala/vala/disable-graphviz.patch";
+          inherit sha256;
+        };
+
+      in {
+
+        # NOTE: the openembedded-core project doesn't have a patch for 0.40.12
+        # We've fixed the single merge conflict in the following patch.
+        #     0.40.12: https://github.com/openembedded/openembedded-core/raw/8553c52f174af4c8c433c543f806f5ed5c1ec48c/meta/recipes-devtools/vala/vala/disable-graphviz.patch
+        "0.40" = ./disable-graphviz-0.40.12.patch;
+
+        # NOTE: the openembedded-core project doesn't have a patch for 0.44.1
+        # We've reverted the addition of the "--disable-valadoc" option
+        # and then applied the following patch.
+        #     0.42.4: https://github.com/openembedded/openembedded-core/raw/f2b4f9ec6f44dced7f88df849cca68961419eeb8/meta/recipes-devtools/vala/vala/disable-graphviz.patch
+        "0.44" = ./disable-graphviz-0.44.3.patch;
+
+        "0.46" = ./disable-graphviz-0.46.1.patch;
+
+        "0.48" = ./disable-graphviz-0.46.1.patch;
+
+      }.${lib.versions.majorMinor version} or (throw "no graphviz patch for this version of vala");
+
+    disableGraphviz = lib.versionAtLeast version "0.38" && !withGraphviz;
+
+  in stdenv.mkDerivation rec {
+    pname = "vala";
+    inherit version;
+
+    setupHook = substituteAll {
+      src = ./setup-hook.sh;
+      apiVersion = lib.versions.majorMinor version;
+    };
+
+    src = fetchurl {
+      url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
+      inherit sha256;
+    };
+
+    postPatch = ''
+      patchShebangs tests
+    '';
+
+    # If we're disabling graphviz, apply the patches and corresponding
+    # configure flag. We also need to override the path to the valac compiler
+    # so that it can be used to regenerate documentation.
+    patches        = lib.optionals disableGraphviz [ graphvizPatch ./gvc-compat.patch ];
+    configureFlags = lib.optional  disableGraphviz "--disable-graphviz";
+    preBuild       = lib.optional  disableGraphviz "buildFlagsArray+=(\"VALAC=$(pwd)/compiler/valac\")";
+
+    outputs = [ "out" "devdoc" ];
+
+    nativeBuildInputs = [
+      pkgconfig flex bison libxslt
+    ] ++ lib.optional (stdenv.isDarwin && (lib.versionAtLeast version "0.38")) expat
+      ++ lib.optional disableGraphviz autoreconfHook # if we changed our ./configure script, need to reconfigure
+      ++ extraNativeBuildInputs;
+
+    buildInputs = [
+      glib libiconv libintl
+    ] ++ lib.optional (lib.versionAtLeast version "0.38" && withGraphviz) graphviz
+      ++ extraBuildInputs;
+
+    enableParallelBuilding = true;
+
+    doCheck = false; # fails, requires dbus daemon
+
+    # Wait for PR #59372
+    # passthru = {
+    #  updateScript = gnome3.updateScript {
+    #    attrPath = "${pname}_${lib.versions.major version}_${lib.versions.minor version}";
+    #    packageName = pname;
+    #  };
+    # };
+
+    meta = with stdenv.lib; {
+      description = "Compiler for GObject type system";
+      homepage = "https://wiki.gnome.org/Projects/Vala";
+      license = licenses.lgpl21Plus;
+      platforms = platforms.unix;
+      maintainers = with maintainers; [ antono jtojnar lethalman peterhoeg worldofpeace ];
+    };
+  });
+
+in rec {
+  vala_0_36 = generic {
+    version = "0.36.20";
+    sha256 = "19v7zjhr9yxkh9lxg46n9gjr0lb7j6v0xqfhrdvgz18xhj3hm5my";
+  };
+
+  vala_0_40 = generic {
+    version = "0.40.18";
+    sha256 = "1f7cdkjdysg4dcri1wbzdddm46amk2s48jkwb5ghpdvhjb4l5j2m";
+  };
+
+  vala_0_44 = generic {
+    version = "0.44.11";
+    sha256 = "06spdvm9q9k4riq1d2fxkyc8d88bcv460v360465iy1lnj3z9x2s";
+  };
+
+  vala_0_46 = generic {
+    version = "0.46.5";
+    sha256 = "07fv895sp9wq74b20qig7hic0r4ynrr5pfaqba02r44xb794fy0s";
+  };
+
+  vala_0_48 = generic {
+    version = "0.48.1";
+    sha256 = "1m3igqlryj1161ymksy7666v7mp9l6gy0yfi4cvgd3wh1963jmzb";
+  };
+
+  vala = vala_0_48;
+}
diff --git a/nixpkgs/pkgs/development/compilers/vala/disable-graphviz-0.40.12.patch b/nixpkgs/pkgs/development/compilers/vala/disable-graphviz-0.40.12.patch
new file mode 100644
index 000000000000..fdc1eabf513e
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/vala/disable-graphviz-0.40.12.patch
@@ -0,0 +1,208 @@
+diff --git i/configure.ac w/configure.ac
+index 694ffd200..915062053 100644
+--- i/configure.ac
++++ w/configure.ac
+@@ -112,34 +112,38 @@ PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
+ AC_SUBST(GMODULE_CFLAGS)
+ AC_SUBST(GMODULE_LIBS)
+ 
+-PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
+-AC_MSG_CHECKING([for CGRAPH])
+-cgraph_tmp_LIBADD="$LIBADD"
+-cgraph_tmp_CFLAGS="$CFLAGS"
+-LIBADD="$LIBADD $LIBGVC_LIBS"
+-CFLAGS="$CFLAGS $LIBGVC_CFLAGS"
+-AC_RUN_IFELSE(
+-	[AC_LANG_SOURCE([
+-		#include <gvc.h>
+-
+-		int main(void) {
+-			#ifdef WITH_CGRAPH
+-				return 0;
+-			#else
+-				return -1;
+-			#endif
+-		}
+-	])], [
+-		AC_MSG_RESULT([yes])
+-		VALAFLAGS="$VALAFLAGS -D WITH_CGRAPH"
+-		have_cgraph=yes
+-	], [
+-		AC_MSG_RESULT([no])
+-		have_cgraph=no
+-	]
+-)
+-LIBADD="$cgraph_tmp_LIBADD"
+-CFLAGS="$cgraph_tmp_CFLAGS"
++AC_ARG_ENABLE(graphviz, AS_HELP_STRING([--disable-graphviz], [Disable graphviz usage for valadoc]), enable_graphviz=$enableval, enable_graphviz=yes)
++if test x$enable_graphviz = xyes; then
++	PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
++	AC_MSG_CHECKING([for CGRAPH])
++	VALAFLAGS="$VALAFLAGS -D HAVE_GRAPHVIZ"
++	cgraph_tmp_LIBADD="$LIBADD"
++	cgraph_tmp_CFLAGS="$CFLAGS"
++	LIBADD="$LIBADD $LIBGVC_LIBS"
++	CFLAGS="$CFLAGS $LIBGVC_CFLAGS"
++	AC_RUN_IFELSE(
++		[AC_LANG_SOURCE([
++			#include <gvc.h>
++			int main(void) {
++				#ifdef WITH_CGRAPH
++					return 0;
++				#else
++					return -1;
++				#endif
++			}
++		])], [
++			AC_MSG_RESULT([yes])
++			VALAFLAGS="$VALAFLAGS -D WITH_CGRAPH"
++			have_cgraph=yes
++		], [
++			AC_MSG_RESULT([no])
++			have_cgraph=no
++		]
++	)
++	LIBADD="$cgraph_tmp_LIBADD"
++	CFLAGS="$cgraph_tmp_CFLAGS"
++fi
++AM_CONDITIONAL(ENABLE_GRAPHVIZ, test x$enable_graphviz = xyes)
+ AM_CONDITIONAL(HAVE_CGRAPH, test "$have_cgraph" = "yes")
+ 
+ AC_PATH_PROG([XSLTPROC], [xsltproc], :)
+diff --git i/libvaladoc/Makefile.am w/libvaladoc/Makefile.am
+index f3f790e76..3c5dc4c80 100644
+--- i/libvaladoc/Makefile.am
++++ w/libvaladoc/Makefile.am
+@@ -128,10 +128,6 @@ libvaladoc_la_VALASOURCES = \
+ 	content/tablerow.vala \
+ 	content/taglet.vala \
+ 	content/text.vala \
+-	charts/chart.vala \
+-	charts/chartfactory.vala \
+-	charts/hierarchychart.vala \
+-	charts/simplechartfactory.vala \
+ 	parser/manyrule.vala \
+ 	parser/oneofrule.vala \
+ 	parser/optionalrule.vala \
+@@ -158,13 +154,24 @@ libvaladoc_la_VALASOURCES = \
+ 	highlighter/codetoken.vala \
+ 	highlighter/highlighter.vala \
+ 	html/basicdoclet.vala \
+-	html/htmlchartfactory.vala \
+ 	html/linkhelper.vala \
+ 	html/cssclassresolver.vala \
+ 	html/htmlmarkupwriter.vala \
+ 	html/htmlrenderer.vala \
+ 	$(NULL)
+ 
++if ENABLE_GRAPHVIZ
++libvaladoc_la_VALASOURCES += \
++	charts/chart.vala \
++	charts/chartfactory.vala \
++	charts/hierarchychart.vala \
++	charts/simplechartfactory.vala \
++	html/htmlchartfactory.vala \
++	$(NULL)
++
++LIBGVC_PKG = --vapidir $(top_srcdir)/vapi --pkg libgvc
++endif
++
+ libvaladoc@PACKAGE_SUFFIX@_la_SOURCES = \
+ 	libvaladoc.vala.stamp \
+ 	$(libvaladoc_la_VALASOURCES:.vala=.c) \
+@@ -184,11 +191,11 @@ libvaladoc.vala.stamp: $(libvaladoc_la_VALASOURCES)
+ 		--library valadoc \
+ 		--vapi valadoc@PACKAGE_SUFFIX@.vapi \
+ 		--vapidir $(top_srcdir)/vapi --pkg gmodule-2.0 \
+-		--vapidir $(top_srcdir)/vapi --pkg libgvc \
+ 		--vapidir $(top_srcdir)/gee --pkg gee \
+ 		--vapidir $(top_srcdir)/vala --pkg vala \
+ 		--vapidir $(top_srcdir)/ccode --pkg ccode \
+ 		--vapidir $(top_srcdir)/codegen --pkg codegen \
++		$(LIBGVC_PKG) \
+ 		--pkg config \
+ 		$(filter %.vala %.c,$^)
+ 	touch $@
+@@ -217,6 +224,9 @@ nodist_pkgconfig_DATA = valadoc@PACKAGE_SUFFIX@.pc
+ 
+ valadoc@PACKAGE_SUFFIX@.pc: valadoc.pc
+ 	cp $< $@
++if !ENABLE_GRAPHVIZ
++	sed -i "s/libgvc //g" $@
++endif
+ 
+ vapidir = $(datadir)/vala/vapi
+ dist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.vapi
+@@ -224,6 +234,9 @@ nodist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.deps
+ 
+ valadoc@PACKAGE_SUFFIX@.deps: valadoc.deps
+ 	cp $< $@
++if !ENABLE_GRAPHVIZ
++	sed -i "s/libgvc//g" $@
++endif
+ 
+ EXTRA_DIST = \
+ 	$(libvaladoc_la_VALASOURCES) \
+diff --git i/libvaladoc/html/basicdoclet.vala w/libvaladoc/html/basicdoclet.vala
+index 192e488cd..ec0960222 100644
+--- i/libvaladoc/html/basicdoclet.vala
++++ w/libvaladoc/html/basicdoclet.vala
+@@ -46,7 +46,11 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
+ 	protected HtmlRenderer _renderer;
+ 	protected Html.MarkupWriter writer;
+ 	protected Html.CssClassResolver cssresolver;
++#if HAVE_GRAPHVIZ
+ 	protected Charts.Factory image_factory;
++#else
++	protected void* image_factory;
++#endif
+ 	protected ErrorReporter reporter;
+ 	protected string package_list_link = "../index.html";
+ 
+@@ -120,7 +124,9 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
+ 		this.linker = new LinkHelper ();
+ 
+ 		_renderer = new HtmlRenderer (settings, this.linker, this.cssresolver);
++#if HAVE_GRAPHVIZ
+ 		this.image_factory = new SimpleChartFactory (settings, linker);
++#endif
+ 	}
+ 
+ 
+@@ -1026,6 +1032,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
+ 	}
+ 
+ 	protected void write_image_block (Api.Node element) {
++#if HAVE_GRAPHVIZ
+ 		if (element is Class || element is Interface || element is Struct) {
+ 			unowned string format = (settings.use_svg_images ? "svg" : "png");
+ 			var chart = new Charts.Hierarchy (image_factory, element);
+@@ -1045,6 +1052,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
+ 									   this.get_img_path_html (element, format)});
+ 			writer.add_usemap (chart);
+ 		}
++#endif
+ 	}
+ 
+ 	public void write_namespace_content (Namespace node, Api.Node? parent) {
+diff --git i/libvaladoc/html/htmlmarkupwriter.vala w/libvaladoc/html/htmlmarkupwriter.vala
+index dcc4dad76..cf9c860b8 100644
+--- i/libvaladoc/html/htmlmarkupwriter.vala
++++ w/libvaladoc/html/htmlmarkupwriter.vala
+@@ -51,12 +51,16 @@ public class Valadoc.Html.MarkupWriter : Valadoc.MarkupWriter {
+ 		}
+ 	}
+ 
++#if HAVE_GRAPHVIZ
+ 	public MarkupWriter add_usemap (Charts.Chart chart) {
+ 		string? buf = (string?) chart.write_buffer ("cmapx");
+ 		if (buf != null) {
+ 			raw_text ("\n");
+ 			raw_text ((!) buf);
+ 		}
++#else
++	public MarkupWriter add_usemap (void* chart) {
++#endif
+ 
+ 		return this;
+ 	}
diff --git a/nixpkgs/pkgs/development/compilers/vala/disable-graphviz-0.44.3.patch b/nixpkgs/pkgs/development/compilers/vala/disable-graphviz-0.44.3.patch
new file mode 100644
index 000000000000..fc971c26492b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/vala/disable-graphviz-0.44.3.patch
@@ -0,0 +1,261 @@
+diff --git a/Makefile.am b/Makefile.am
+index f70234759..b3d6c3833 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -13,19 +13,9 @@ SUBDIRS = \
+ 	doc \
+ 	gobject-introspection \
+ 	vapigen \
+-	$(NULL)
+-
+-if ENABLE_VALADOC
+-SUBDIRS += \
+ 	libvaladoc \
+ 	valadoc \
+ 	$(NULL)
+-endif
+-
+-DISTCHECK_CONFIGURE_FLAGS = \
+-	--enable-valadoc \
+-	--enable-unversioned \
+-	$(NULL)
+
+ if ENABLE_UNVERSIONED
+ aclocaldir = $(datadir)/aclocal
+diff --git a/configure.ac b/configure.ac
+index 504db13aa..622397747 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -157,10 +157,11 @@ AC_SUBST(GMODULE_CFLAGS)
+ AC_SUBST(GMODULE_LIBS)
+
+ AC_ARG_WITH(cgraph, AS_HELP_STRING([--with-cgraph], [Required flag for cross-compilation to define capability of graphviz]), [], with_cgraph=check)
+-AC_ARG_ENABLE(valadoc, AS_HELP_STRING([--disable-valadoc], [Disable valadoc]), enable_valadoc=$enableval, enable_valadoc=yes)
+-if test x$enable_valadoc = xyes; then
++AC_ARG_ENABLE(graphviz, AS_HELP_STRING([--disable-graphviz], [Disable graphviz usage for valadoc]), enable_graphviz=$enableval, enable_graphviz=yes)
++if test x$enable_graphviz = xyes; then
+ 	PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
+ 	AC_MSG_CHECKING([for CGRAPH])
++	VALAFLAGS="$VALAFLAGS -D HAVE_GRAPHVIZ"
+ 	cgraph_tmp_LIBADD="$LIBADD"
+ 	cgraph_tmp_CFLAGS="$CFLAGS"
+ 	LIBADD="$LIBADD $LIBGVC_LIBS"
+@@ -198,8 +199,8 @@ if test x$enable_valadoc = xyes; then
+ 	LIBADD="$cgraph_tmp_LIBADD"
+ 	CFLAGS="$cgraph_tmp_CFLAGS"
+ fi
++AM_CONDITIONAL(ENABLE_GRAPHVIZ, test x$enable_graphviz = xyes)
+ AM_CONDITIONAL(HAVE_CGRAPH, test "$have_cgraph" = "yes")
+-AM_CONDITIONAL(ENABLE_VALADOC, test x$enable_valadoc = xyes)
+
+ AC_PATH_PROG([XSLTPROC], [xsltproc], :)
+ AM_CONDITIONAL(HAVE_XSLTPROC, test "$XSLTPROC" != :)
+diff --git a/doc/Makefile.am b/doc/Makefile.am
+index d2684a0e0..b343c7c10 100644
+--- a/doc/Makefile.am
++++ b/doc/Makefile.am
+@@ -6,16 +6,11 @@ SUBDIRS = \
+
+ dist_man_MANS = \
+ 	valac.1 \
++	valadoc.1 \
+ 	vala-gen-introspect.1 \
+ 	vapigen.1 \
+ 	$(NULL)
+
+-if ENABLE_VALADOC
+-dist_man_MANS += \
+-	valadoc.1 \
+-	$(NULL)
+-endif
+-
+ EXTRA_DIST = \
+ 	valac.h2m \
+ 	valadoc.h2m \
+@@ -24,11 +19,7 @@ EXTRA_DIST = \
+ 	$(NULL)
+
+ if HAVE_HELP2MAN
+-if ENABLE_VALADOC
+ manpages: valac.1 valadoc.1 vala-gen-introspect.1 vapigen.1
+-else
+-manpages: valac.1 vala-gen-introspect.1 vapigen.1
+-endif
+ 	@rm $^
+ 	$(MAKE) $(AM_MAKEFLAGS) $^
+
+@@ -37,13 +28,11 @@ valac.1:
+ 		--include $(srcdir)/valac.h2m \
+ 		--libtool --no-info \
+ 		--output=$@
+-if ENABLE_VALADOC
+ valadoc.1:
+ 	$(HELP2MAN) $(top_builddir)/valadoc/valadoc \
+ 		--include $(srcdir)/valadoc.h2m \
+ 		--libtool --no-info \
+ 		--output=$@
+-endif
+ vala-gen-introspect.1:
+ 	$(HELP2MAN) $(top_builddir)/gobject-introspection/gen-introspect \
+ 		--include $(srcdir)/vala-gen-introspect.h2m \
+@@ -60,15 +49,12 @@ endif
+ if ENABLE_UNVERSIONED
+ install-data-hook:
+ 	cd $(DESTDIR)$(man1dir) && $(LN_S) -f valac@PACKAGE_SUFFIX@.1 valac.1
+-if ENABLE_VALADOC
+ 	cd $(DESTDIR)$(man1dir) && $(LN_S) -f valadoc@PACKAGE_SUFFIX@.1 valadoc.1
+-endif
+ 	cd $(DESTDIR)$(man1dir) && $(LN_S) -f vala-gen-introspect@PACKAGE_SUFFIX@.1 vala-gen-introspect.1
+ 	cd $(DESTDIR)$(man1dir) && $(LN_S) -f vapigen@PACKAGE_SUFFIX@.1 vapigen.1
+ endif
+
+
+-if ENABLE_VALADOC
+ COMMON_VALADOCFLAGS = \
+ 	--force \
+ 	--verbose \
+@@ -150,7 +136,6 @@ internal-apis/valadoc: $(valadoc_VALASOURCES) internal-apis/codegen
+ 	@touch $@
+
+ internal-api-docs: internal-apis/gee internal-apis/vala internal-apis/ccode internal-apis/codegen internal-apis/valadoc
+-endif
+
+ clean-local:
+ 	rm -rf $(builddir)/internal-apis
+diff --git a/libvaladoc/Makefile.am b/libvaladoc/Makefile.am
+index 7456fb836..107338e91 100644
+--- a/libvaladoc/Makefile.am
++++ b/libvaladoc/Makefile.am
+@@ -119,10 +119,6 @@ libvaladoc_la_VALASOURCES = \
+ 	content/tablerow.vala \
+ 	content/taglet.vala \
+ 	content/text.vala \
+-	charts/chart.vala \
+-	charts/chartfactory.vala \
+-	charts/hierarchychart.vala \
+-	charts/simplechartfactory.vala \
+ 	parser/manyrule.vala \
+ 	parser/oneofrule.vala \
+ 	parser/optionalrule.vala \
+@@ -149,13 +145,24 @@ libvaladoc_la_VALASOURCES = \
+ 	highlighter/codetoken.vala \
+ 	highlighter/highlighter.vala \
+ 	html/basicdoclet.vala \
+-	html/htmlchartfactory.vala \
+ 	html/linkhelper.vala \
+ 	html/cssclassresolver.vala \
+ 	html/htmlmarkupwriter.vala \
+ 	html/htmlrenderer.vala \
+ 	$(NULL)
+
++if ENABLE_GRAPHVIZ
++libvaladoc_la_VALASOURCES += \
++	charts/chart.vala \
++	charts/chartfactory.vala \
++	charts/hierarchychart.vala \
++	charts/simplechartfactory.vala \
++	html/htmlchartfactory.vala \
++	$(NULL)
++
++LIBGVC_PKG = --vapidir $(top_srcdir)/vapi --pkg libgvc
++endif
++
+ libvaladoc@PACKAGE_SUFFIX@_la_SOURCES = \
+ 	libvaladoc.vala.stamp \
+ 	$(libvaladoc_la_VALASOURCES:.vala=.c) \
+@@ -175,11 +182,11 @@ libvaladoc.vala.stamp: $(libvaladoc_la_VALASOURCES)
+ 		--library valadoc \
+ 		--vapi valadoc@PACKAGE_SUFFIX@.vapi \
+ 		--vapidir $(top_srcdir)/vapi --pkg gmodule-2.0 \
+-		--vapidir $(top_srcdir)/vapi --pkg libgvc \
+ 		--vapidir $(top_srcdir)/gee --pkg gee \
+ 		--vapidir $(top_srcdir)/vala --pkg vala \
+ 		--vapidir $(top_srcdir)/ccode --pkg ccode \
+ 		--vapidir $(top_srcdir)/codegen --pkg codegen \
++		$(LIBGVC_PKG) \
+ 		--pkg config \
+ 		$(filter %.vala %.c,$^)
+ 	touch $@
+@@ -207,6 +214,9 @@ nodist_pkgconfig_DATA = valadoc@PACKAGE_SUFFIX@.pc
+
+ valadoc@PACKAGE_SUFFIX@.pc: valadoc.pc
+ 	cp $< $@
++if !ENABLE_GRAPHVIZ
++	sed -i "s/libgvc //g" $@
++endif
+
+ vapidir = $(datadir)/vala/vapi
+ dist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.vapi
+@@ -214,6 +224,9 @@ nodist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.deps
+
+ valadoc@PACKAGE_SUFFIX@.deps: valadoc.deps
+ 	cp $< $@
++if !ENABLE_GRAPHVIZ
++	sed -i "s/libgvc//g" $@
++endif
+
+ EXTRA_DIST = \
+ 	$(libvaladoc_la_VALASOURCES) \
+diff --git a/libvaladoc/html/basicdoclet.vala b/libvaladoc/html/basicdoclet.vala
+index 46578c28f..f6ce7097c 100644
+--- a/libvaladoc/html/basicdoclet.vala
++++ b/libvaladoc/html/basicdoclet.vala
+@@ -46,7 +46,11 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
+ 	protected HtmlRenderer _renderer;
+ 	protected Html.MarkupWriter writer;
+ 	protected Html.CssClassResolver cssresolver;
++#if HAVE_GRAPHVIZ
+ 	protected Charts.Factory image_factory;
++#else
++	protected void* image_factory;
++#endif
+ 	protected ErrorReporter reporter;
+ 	protected string package_list_link = "../index.html";
+
+@@ -120,7 +124,9 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
+ 		this.linker = new LinkHelper ();
+
+ 		_renderer = new HtmlRenderer (settings, this.linker, this.cssresolver);
++#if HAVE_GRAPHVIZ
+ 		this.image_factory = new SimpleChartFactory (settings, linker);
++#endif
+ 	}
+
+
+@@ -1025,6 +1031,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
+ 	}
+
+ 	protected void write_image_block (Api.Node element) {
++#if HAVE_GRAPHVIZ
+ 		if (element is Class || element is Interface || element is Struct) {
+ 			unowned string format = (settings.use_svg_images ? "svg" : "png");
+ 			var chart = new Charts.Hierarchy (image_factory, element);
+@@ -1044,6 +1051,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
+ 									   this.get_img_path_html (element, format)});
+ 			writer.add_usemap (chart);
+ 		}
++#endif
+ 	}
+
+ 	public void write_namespace_content (Namespace node, Api.Node? parent) {
+diff --git a/libvaladoc/html/htmlmarkupwriter.vala b/libvaladoc/html/htmlmarkupwriter.vala
+index 5aa4afdea..e79b0b8f5 100644
+--- a/libvaladoc/html/htmlmarkupwriter.vala
++++ b/libvaladoc/html/htmlmarkupwriter.vala
+@@ -51,12 +51,16 @@ public class Valadoc.Html.MarkupWriter : Valadoc.MarkupWriter {
+ 		}
+ 	}
+
++#if HAVE_GRAPHVIZ
+ 	public unowned MarkupWriter add_usemap (Charts.Chart chart) {
+ 		string? buf = (string?) chart.write_buffer ("cmapx");
+ 		if (buf != null) {
+ 			raw_text ("\n");
+ 			raw_text ((!) buf);
+ 		}
++#else
++	public unowned MarkupWriter add_usemap (void* chart) {
++#endif
+
+ 		return this;
+ 	}
diff --git a/nixpkgs/pkgs/development/compilers/vala/disable-graphviz-0.46.1.patch b/nixpkgs/pkgs/development/compilers/vala/disable-graphviz-0.46.1.patch
new file mode 100644
index 000000000000..8c3e54b6a959
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/vala/disable-graphviz-0.46.1.patch
@@ -0,0 +1,261 @@
+diff --git a/Makefile.am b/Makefile.am
+index f70234759..b3d6c3833 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -13,19 +13,9 @@ SUBDIRS = \
+ 	doc \
+ 	gobject-introspection \
+ 	vapigen \
+-	$(NULL)
+-
+-if ENABLE_VALADOC
+-SUBDIRS += \
+ 	libvaladoc \
+ 	valadoc \
+ 	$(NULL)
+-endif
+-
+-DISTCHECK_CONFIGURE_FLAGS = \
+-	--enable-valadoc \
+-	--enable-unversioned \
+-	$(NULL)
+ 
+ if ENABLE_UNVERSIONED
+ aclocaldir = $(datadir)/aclocal
+diff --git a/configure.ac b/configure.ac
+index 6de326bbb..91f159b16 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -160,10 +160,11 @@ AC_SUBST(GMODULE_CFLAGS)
+ AC_SUBST(GMODULE_LIBS)
+ 
+ AC_ARG_WITH(cgraph, AS_HELP_STRING([--with-cgraph], [Required flag for cross-compilation to define capability of graphviz]), [], with_cgraph=check)
+-AC_ARG_ENABLE(valadoc, AS_HELP_STRING([--disable-valadoc], [Disable valadoc]), enable_valadoc=$enableval, enable_valadoc=yes)
+-if test x$enable_valadoc = xyes; then
++AC_ARG_ENABLE(graphviz, AS_HELP_STRING([--disable-graphviz], [Disable graphviz usage for valadoc]), enable_graphviz=$enableval, enable_graphviz=yes)
++if test x$enable_graphviz = xyes; then
+ 	PKG_CHECK_MODULES(LIBGVC, libgvc >= $LIBGVC_REQUIRED)
+ 	AC_MSG_CHECKING([for CGRAPH])
++	VALAFLAGS="$VALAFLAGS -D HAVE_GRAPHVIZ"
+ 	cgraph_tmp_LIBADD="$LIBADD"
+ 	cgraph_tmp_CFLAGS="$CFLAGS"
+ 	LIBADD="$LIBADD $LIBGVC_LIBS"
+@@ -201,8 +202,8 @@ if test x$enable_valadoc = xyes; then
+ 	LIBADD="$cgraph_tmp_LIBADD"
+ 	CFLAGS="$cgraph_tmp_CFLAGS"
+ fi
++AM_CONDITIONAL(ENABLE_GRAPHVIZ, test x$enable_graphviz = xyes)
+ AM_CONDITIONAL(HAVE_CGRAPH, test "$have_cgraph" = "yes")
+-AM_CONDITIONAL(ENABLE_VALADOC, test x$enable_valadoc = xyes)
+ 
+ AC_PATH_PROG([XSLTPROC], [xsltproc], :)
+ AM_CONDITIONAL(HAVE_XSLTPROC, test "$XSLTPROC" != :)
+diff --git a/doc/Makefile.am b/doc/Makefile.am
+index d2684a0e0..b343c7c10 100644
+--- a/doc/Makefile.am
++++ b/doc/Makefile.am
+@@ -6,16 +6,11 @@ SUBDIRS = \
+ 
+ dist_man_MANS = \
+ 	valac.1 \
++	valadoc.1 \
+ 	vala-gen-introspect.1 \
+ 	vapigen.1 \
+ 	$(NULL)
+ 
+-if ENABLE_VALADOC
+-dist_man_MANS += \
+-	valadoc.1 \
+-	$(NULL)
+-endif
+-
+ EXTRA_DIST = \
+ 	valac.h2m \
+ 	valadoc.h2m \
+@@ -24,11 +19,7 @@ EXTRA_DIST = \
+ 	$(NULL)
+ 
+ if HAVE_HELP2MAN
+-if ENABLE_VALADOC
+ manpages: valac.1 valadoc.1 vala-gen-introspect.1 vapigen.1
+-else
+-manpages: valac.1 vala-gen-introspect.1 vapigen.1
+-endif
+ 	@rm $^
+ 	$(MAKE) $(AM_MAKEFLAGS) $^
+ 
+@@ -37,13 +28,11 @@ valac.1:
+ 		--include $(srcdir)/valac.h2m \
+ 		--libtool --no-info \
+ 		--output=$@
+-if ENABLE_VALADOC
+ valadoc.1:
+ 	$(HELP2MAN) $(top_builddir)/valadoc/valadoc \
+ 		--include $(srcdir)/valadoc.h2m \
+ 		--libtool --no-info \
+ 		--output=$@
+-endif
+ vala-gen-introspect.1:
+ 	$(HELP2MAN) $(top_builddir)/gobject-introspection/gen-introspect \
+ 		--include $(srcdir)/vala-gen-introspect.h2m \
+@@ -60,15 +49,12 @@ endif
+ if ENABLE_UNVERSIONED
+ install-data-hook:
+ 	cd $(DESTDIR)$(man1dir) && $(LN_S) -f valac@PACKAGE_SUFFIX@.1 valac.1
+-if ENABLE_VALADOC
+ 	cd $(DESTDIR)$(man1dir) && $(LN_S) -f valadoc@PACKAGE_SUFFIX@.1 valadoc.1
+-endif
+ 	cd $(DESTDIR)$(man1dir) && $(LN_S) -f vala-gen-introspect@PACKAGE_SUFFIX@.1 vala-gen-introspect.1
+ 	cd $(DESTDIR)$(man1dir) && $(LN_S) -f vapigen@PACKAGE_SUFFIX@.1 vapigen.1
+ endif
+ 
+ 
+-if ENABLE_VALADOC
+ COMMON_VALADOCFLAGS = \
+ 	--force \
+ 	--verbose \
+@@ -150,7 +136,6 @@ internal-apis/valadoc: $(valadoc_VALASOURCES) internal-apis/codegen
+ 	@touch $@
+ 
+ internal-api-docs: internal-apis/gee internal-apis/vala internal-apis/ccode internal-apis/codegen internal-apis/valadoc
+-endif
+ 
+ clean-local:
+ 	rm -rf $(builddir)/internal-apis
+diff --git a/libvaladoc/Makefile.am b/libvaladoc/Makefile.am
+index 8a3924b54..81fde9ac8 100644
+--- a/libvaladoc/Makefile.am
++++ b/libvaladoc/Makefile.am
+@@ -119,10 +119,6 @@ libvaladoc_la_VALASOURCES = \
+ 	content/tablerow.vala \
+ 	content/taglet.vala \
+ 	content/text.vala \
+-	charts/chart.vala \
+-	charts/chartfactory.vala \
+-	charts/hierarchychart.vala \
+-	charts/simplechartfactory.vala \
+ 	parser/manyrule.vala \
+ 	parser/oneofrule.vala \
+ 	parser/optionalrule.vala \
+@@ -149,13 +145,24 @@ libvaladoc_la_VALASOURCES = \
+ 	highlighter/codetoken.vala \
+ 	highlighter/highlighter.vala \
+ 	html/basicdoclet.vala \
+-	html/htmlchartfactory.vala \
+ 	html/linkhelper.vala \
+ 	html/cssclassresolver.vala \
+ 	html/htmlmarkupwriter.vala \
+ 	html/htmlrenderer.vala \
+ 	$(NULL)
+ 
++if ENABLE_GRAPHVIZ
++libvaladoc_la_VALASOURCES += \
++	charts/chart.vala \
++	charts/chartfactory.vala \
++	charts/hierarchychart.vala \
++	charts/simplechartfactory.vala \
++	html/htmlchartfactory.vala \
++	$(NULL)
++
++LIBGVC_PKG = --vapidir $(top_srcdir)/vapi --pkg libgvc
++endif
++
+ libvaladoc@PACKAGE_SUFFIX@_la_SOURCES = \
+ 	libvaladoc.vala.stamp \
+ 	$(libvaladoc_la_VALASOURCES:.vala=.c) \
+@@ -175,11 +182,11 @@ libvaladoc.vala.stamp: $(libvaladoc_la_VALASOURCES)
+ 		--library valadoc \
+ 		--vapi valadoc@PACKAGE_SUFFIX@.vapi \
+ 		--vapidir $(top_srcdir)/vapi --pkg gmodule-2.0 \
+-		--vapidir $(top_srcdir)/vapi --pkg libgvc \
+ 		--vapidir $(top_srcdir)/gee --pkg gee \
+ 		--vapidir $(top_srcdir)/vala --pkg vala \
+ 		--vapidir $(top_srcdir)/ccode --pkg ccode \
+ 		--vapidir $(top_srcdir)/codegen --pkg codegen \
++		$(LIBGVC_PKG) \
+ 		--pkg config \
+ 		$(filter %.vala %.c,$^)
+ 	touch $@
+@@ -207,6 +214,9 @@ nodist_pkgconfig_DATA = valadoc@PACKAGE_SUFFIX@.pc
+ 
+ valadoc@PACKAGE_SUFFIX@.pc: valadoc.pc
+ 	cp $< $@
++if !ENABLE_GRAPHVIZ
++	sed -i "s/libgvc //g" $@
++endif
+ 
+ vapidir = $(datadir)/vala/vapi
+ dist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.vapi
+@@ -214,6 +224,9 @@ nodist_vapi_DATA = valadoc@PACKAGE_SUFFIX@.deps
+ 
+ valadoc@PACKAGE_SUFFIX@.deps: valadoc.deps
+ 	cp $< $@
++if !ENABLE_GRAPHVIZ
++	sed -i "s/libgvc//g" $@
++endif
+ 
+ EXTRA_DIST = \
+ 	$(libvaladoc_la_VALASOURCES) \
+diff --git a/libvaladoc/html/basicdoclet.vala b/libvaladoc/html/basicdoclet.vala
+index 46578c28f..f6ce7097c 100644
+--- a/libvaladoc/html/basicdoclet.vala
++++ b/libvaladoc/html/basicdoclet.vala
+@@ -46,7 +46,11 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
+ 	protected HtmlRenderer _renderer;
+ 	protected Html.MarkupWriter writer;
+ 	protected Html.CssClassResolver cssresolver;
++#if HAVE_GRAPHVIZ
+ 	protected Charts.Factory image_factory;
++#else
++	protected void* image_factory;
++#endif
+ 	protected ErrorReporter reporter;
+ 	protected string package_list_link = "../index.html";
+ 
+@@ -120,7 +124,9 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
+ 		this.linker = new LinkHelper ();
+ 
+ 		_renderer = new HtmlRenderer (settings, this.linker, this.cssresolver);
++#if HAVE_GRAPHVIZ
+ 		this.image_factory = new SimpleChartFactory (settings, linker);
++#endif
+ 	}
+ 
+ 
+@@ -1025,6 +1031,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
+ 	}
+ 
+ 	protected void write_image_block (Api.Node element) {
++#if HAVE_GRAPHVIZ
+ 		if (element is Class || element is Interface || element is Struct) {
+ 			unowned string format = (settings.use_svg_images ? "svg" : "png");
+ 			var chart = new Charts.Hierarchy (image_factory, element);
+@@ -1044,6 +1051,7 @@ public abstract class Valadoc.Html.BasicDoclet : Api.Visitor, Doclet {
+ 									   this.get_img_path_html (element, format)});
+ 			writer.add_usemap (chart);
+ 		}
++#endif
+ 	}
+ 
+ 	public void write_namespace_content (Namespace node, Api.Node? parent) {
+diff --git a/libvaladoc/html/htmlmarkupwriter.vala b/libvaladoc/html/htmlmarkupwriter.vala
+index 5aa4afdea..e79b0b8f5 100644
+--- a/libvaladoc/html/htmlmarkupwriter.vala
++++ b/libvaladoc/html/htmlmarkupwriter.vala
+@@ -51,12 +51,16 @@ public class Valadoc.Html.MarkupWriter : Valadoc.MarkupWriter {
+ 		}
+ 	}
+ 
++#if HAVE_GRAPHVIZ
+ 	public unowned MarkupWriter add_usemap (Charts.Chart chart) {
+ 		string? buf = (string?) chart.write_buffer ("cmapx");
+ 		if (buf != null) {
+ 			raw_text ("\n");
+ 			raw_text ((!) buf);
+ 		}
++#else
++	public unowned MarkupWriter add_usemap (void* chart) {
++#endif
+ 
+ 		return this;
+ 	}
diff --git a/nixpkgs/pkgs/development/compilers/vala/gvc-compat.patch b/nixpkgs/pkgs/development/compilers/vala/gvc-compat.patch
new file mode 100644
index 000000000000..8c0d25098f14
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/vala/gvc-compat.patch
@@ -0,0 +1,19 @@
+diff --git i/libvaladoc/Makefile.am w/libvaladoc/Makefile.am
+index 8dc398cf1..a5d8a45b4 100644
+--- i/libvaladoc/Makefile.am
++++ w/libvaladoc/Makefile.am
+@@ -176,9 +176,13 @@ endif
+ libvaladoc@PACKAGE_SUFFIX@_la_SOURCES = \
+ 	libvaladoc.vala.stamp \
+ 	$(libvaladoc_la_VALASOURCES:.vala=.c) \
+-	gvc-compat.c \
+ 	$(NULL)
+ 
++if ENABLE_GRAPHVIZ
++libvaladoc@PACKAGE_SUFFIX@_la_SOURCES += \
++	gvc-compat.c
++endif
++
+ valadoc@PACKAGE_SUFFIX@.vapi valadoc.h: libvaladoc.vala.stamp
+ libvaladoc.vala.stamp: $(libvaladoc_la_VALASOURCES)
+ 	$(VALA_V)$(VALAC) \
diff --git a/nixpkgs/pkgs/development/compilers/vala/setup-hook.sh b/nixpkgs/pkgs/development/compilers/vala/setup-hook.sh
new file mode 100644
index 000000000000..8252143e998b
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/vala/setup-hook.sh
@@ -0,0 +1,15 @@
+make_vala_find_vapi_files() {
+    # XDG_DATA_DIRS: required for finding .vapi files
+    if [ -d "$1/share/vala/vapi" -o -d "$1/share/vala-@apiVersion@/vapi" ]; then
+      addToSearchPath XDG_DATA_DIRS $1/share
+    fi
+}
+
+addEnvHooks "$hostOffset" make_vala_find_vapi_files
+
+_multioutMoveVapiDirs() {
+  moveToOutput share/vala/vapi "${!outputDev}"
+  moveToOutput share/vala-@apiVersion@/vapi "${!outputDev}"
+}
+
+preFixupHooks+=(_multioutMoveVapiDirs)
diff --git a/nixpkgs/pkgs/development/compilers/vlang/default.nix b/nixpkgs/pkgs/development/compilers/vlang/default.nix
new file mode 100644
index 000000000000..fba11a06a6e9
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/vlang/default.nix
@@ -0,0 +1,55 @@
+{ stdenv, fetchFromGitHub, glfw, freetype, openssl, upx ? null }:
+
+assert stdenv.hostPlatform.isUnix -> upx != null;
+
+stdenv.mkDerivation rec {
+  pname = "vlang";
+  version = "0.1.21";
+
+  src = fetchFromGitHub {
+    owner = "vlang";
+    repo = "v";
+    rev = version;
+    sha256 = "0npd7a7nhd6r9mr99naib9scqk30209hz18nxif27284ckjbl4fk";
+  };
+
+  # V compiler source translated to C for bootstrap.
+  # Use matching v.c release commit for now, 0.1.21 release is not available.
+  vc = fetchFromGitHub {
+    owner = "vlang";
+    repo = "vc";
+    rev = "950a90b6acaebad1c6ddec5486fc54307e38a9cd";
+    sha256 = "1dh5l2m207rip1xj677hvbp067inw28n70ddz5wxzfpmaim63c0l";
+  };
+
+  enableParallelBuilding = true;
+  propagatedBuildInputs = [ glfw freetype openssl ]
+    ++ stdenv.lib.optional stdenv.hostPlatform.isUnix upx;
+
+  buildPhase = ''
+    runHook preBuild
+    cc -std=gnu11 $CFLAGS -w -o v $vc/v.c -lm $LDFLAGS
+    ./v -prod -cflags `$CFLAGS` -o v compiler
+    # Exclude thirdparty/vschannel as it is windows-specific.
+    find thirdparty -path thirdparty/vschannel -prune -o -type f -name "*.c" -execdir cc -std=gnu11 $CFLAGS -w -c {} $LDFLAGS ';'
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    mkdir -p $out/{bin,lib,share}
+    cp -r examples $out/share
+    cp -r {vlib,thirdparty} $out/lib
+    cp v $out/lib
+    ln -s $out/lib/v $out/bin/v
+    runHook postInstall
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "https://vlang.io/";
+    description = "Simple, fast, safe, compiled language for developing maintainable software";
+    license = licenses.mit;
+    maintainers = with maintainers; [ chiiruno ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/wcc/default.nix b/nixpkgs/pkgs/development/compilers/wcc/default.nix
new file mode 100644
index 000000000000..b6030da49d3f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/wcc/default.nix
@@ -0,0 +1,51 @@
+{ stdenv, fetchFromGitHub, capstone, libbfd, libelf, libiberty, readline }:
+
+stdenv.mkDerivation {
+  pname = "wcc-unstable";
+  version = "2018-04-05";
+
+  src = fetchFromGitHub {
+    owner = "endrazine";
+    repo = "wcc";
+    rev = "f141963ff193d7e1931d41acde36d20d7221e74f";
+    sha256 = "1f0w869x0176n5nsq7m70r344gv5qvfmk7b58syc0jls8ghmjvb4";
+    fetchSubmodules = true;
+  };
+
+  buildInputs = [ capstone libbfd libelf libiberty readline ];
+
+  postPatch = ''
+    sed -i src/wsh/include/libwitch/wsh.h src/wsh/scripts/INDEX \
+      -e "s#/usr/share/wcc#$out/share/wcc#"
+
+    sed -i -e '/stropts.h>/d' src/wsh/include/libwitch/wsh.h
+  '';
+
+  installFlags = [ "DESTDIR=$(out)" ];
+
+  preInstall = ''
+    mkdir -p $out/usr/bin
+  '';
+
+  postInstall = ''
+    mv $out/usr/* $out
+    rmdir $out/usr
+    mkdir -p $out/share/man/man1
+    cp doc/manpages/*.1 $out/share/man/man1/
+  '';
+
+  preFixup = ''
+    # Let patchShebangs rewrite shebangs with wsh.
+    PATH+=:$out/bin
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/endrazine/wcc";
+    description = "Witchcraft compiler collection: tools to convert and script ELF files";
+    license = licenses.mit;
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ orivej ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/wla-dx/default.nix b/nixpkgs/pkgs/development/compilers/wla-dx/default.nix
new file mode 100644
index 000000000000..f50d9e0598b1
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/wla-dx/default.nix
@@ -0,0 +1,28 @@
+{stdenv, fetchFromGitHub, cmake}:
+
+stdenv.mkDerivation rec {
+  pname = "wla-dx";
+  version = "9.8";
+
+  src = fetchFromGitHub {
+    owner = "vhelin";
+    repo = "wla-dx";
+    rev = "v${version}-fix";
+    sha256 = "1dsxhy19nif983lr20vxl099giwzgmzqyh7ass705hkphmwagcv6";
+  };
+
+  installPhase = ''
+    mkdir -p $out/bin
+    install binaries/* $out/bin
+  '';
+
+  nativeBuildInputs = [ cmake ];
+
+  meta = with stdenv.lib; {
+    homepage = "http://www.villehelin.com/wla.html";
+    description = "Yet Another GB-Z80/Z80/6502/65C02/6510/65816/HUC6280/SPC-700 Multi Platform Cross Assembler Package";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ matthewbauer ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/x11basic/default.nix b/nixpkgs/pkgs/development/compilers/x11basic/default.nix
new file mode 100644
index 000000000000..cc4788e3ce03
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/x11basic/default.nix
@@ -0,0 +1,47 @@
+{ stdenv, fetchFromGitHub
+, automake, autoconf, readline
+, libX11, bluez, SDL2
+}:
+
+stdenv.mkDerivation rec {
+  pname = "X11basic";
+  version = "1.27";
+
+  src = fetchFromGitHub {
+    owner = "kollokollo";
+    repo = pname;
+    rev = version;
+    sha256 = "1hpxzdqnjl1fiwgs2vrjg4kxm29c7pqwk3g1m4p5pm4x33a3d1q2";
+  };
+
+  buildInputs = [
+    autoconf automake readline libX11 SDL2 bluez
+  ];
+
+  preConfigure = "cd src;autoconf";
+
+  configureFlags = [
+    "--with-bluetooth"
+    "--with-usb"
+    "--with-readline"
+    "--with-sdl"
+    "--with-x"
+    "--enable-cryptography"
+  ];
+
+  preInstall = ''
+    touch x11basic.{eps,svg}
+    mkdir -p $out/{bin,lib}
+    mkdir -p $out/share/{applications,icons/hicolor/scalable/apps}
+    cp -r ../examples $out/share/.
+  '';
+
+  meta = with stdenv.lib; {
+    homepage = "http://x11-basic.sourceforge.net/";
+    description = "A Basic interpreter and compiler with graphics capabilities.";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ edwtjo ];
+    platforms = platforms.unix;
+  };
+
+}
diff --git a/nixpkgs/pkgs/development/compilers/yap/default.nix b/nixpkgs/pkgs/development/compilers/yap/default.nix
new file mode 100644
index 000000000000..100fb236c838
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/yap/default.nix
@@ -0,0 +1,27 @@
+{ stdenv, fetchurl, readline, gmp, zlib }:
+
+stdenv.mkDerivation rec {
+  version = "6.3.3";
+  pname = "yap";
+
+  src = fetchurl {
+    url = "https://www.dcc.fc.up.pt/~vsc/Yap/${pname}-${version}.tar.gz";
+    sha256 = "0y7sjwimadqsvgx9daz28c9mxcx9n1znxklih9xg16k6n54v9qxf";
+  };
+
+  buildInputs = [ readline gmp zlib ];
+
+  configureFlags = [ "--enable-tabling=yes" ];
+
+  NIX_CFLAGS_COMPILE = "-fpermissive";
+
+  meta = {
+    homepage = "http://www.dcc.fc.up.pt/~vsc/Yap/";
+    description = "A ISO-compatible high-performance Prolog compiler";
+    license = stdenv.lib.licenses.artistic2;
+
+    maintainers = [ stdenv.lib.maintainers.peti ];
+    platforms = stdenv.lib.platforms.linux;
+    broken = !stdenv.is64bit;   # the linux 32 bit build fails.
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/yasm/default.nix b/nixpkgs/pkgs/development/compilers/yasm/default.nix
new file mode 100644
index 000000000000..923a11c1466a
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/yasm/default.nix
@@ -0,0 +1,17 @@
+{stdenv, fetchurl}:
+
+stdenv.mkDerivation rec {
+  name = "yasm-1.3.0";
+
+  src = fetchurl {
+    url = "https://www.tortall.net/projects/yasm/releases/${name}.tar.gz";
+    sha256 = "0gv0slmm0qpq91za3v2v9glff3il594x5xsrbgab7xcmnh0ndkix";
+  };
+
+  meta = with stdenv.lib; {
+    homepage = "http://www.tortall.net/projects/yasm/";
+    description = "Complete rewrite of the NASM assembler";
+    license = licenses.bsd2;
+    platforms = platforms.unix;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/yosys/default.nix b/nixpkgs/pkgs/development/compilers/yosys/default.nix
new file mode 100644
index 000000000000..09e51e4c6471
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/yosys/default.nix
@@ -0,0 +1,83 @@
+{ stdenv
+, abc-verifier
+, bash
+, bison
+, fetchFromGitHub
+, flex
+, libffi
+, pkgconfig
+, protobuf
+, python3
+, readline
+, tcl
+, verilog
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname   = "yosys";
+  version = "2020.06.16";
+
+  src = fetchFromGitHub {
+    owner  = "YosysHQ";
+    repo   = "yosys";
+    rev    = "39ba90a8b84d740b670a9f1df5148b824d441c63";
+    sha256 = "1ncscbhyq4f07d28l32j37y5d84vyqxfx0fbzhb7nzfhplk8hh0s";
+  };
+
+  enableParallelBuilding = true;
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ tcl readline libffi python3 bison flex protobuf zlib ];
+
+  makeFlags = [ "ENABLE_PROTOBUF=1" "PREFIX=${placeholder "out"}"];
+
+  patchPhase = ''
+    substituteInPlace ./Makefile \
+      --replace 'CXX = clang' "" \
+      --replace 'LD = clang++' 'LD = $(CXX)' \
+      --replace 'CXX = gcc' "" \
+      --replace 'LD = gcc' 'LD = $(CXX)' \
+      --replace 'ABCMKARGS = CC="$(CXX)" CXX="$(CXX)"' 'ABCMKARGS =' \
+      --replace 'echo UNKNOWN' 'echo ${builtins.substring 0 10 src.rev}'
+    substituteInPlace ./misc/yosys-config.in \
+      --replace '/bin/bash' '${bash}/bin/bash'
+    patchShebangs tests
+  '';
+
+  preBuild = let
+    shortAbcRev = builtins.substring 0 7 abc-verifier.rev;
+  in ''
+    chmod -R u+w .
+    make config-${if stdenv.cc.isClang or false then "clang" else "gcc"}
+    echo 'ABCEXTERNAL = ${abc-verifier}/bin/abc' >> Makefile.conf
+
+    # we have to do this ourselves for some reason...
+    (cd misc && ${protobuf}/bin/protoc --cpp_out ../backends/protobuf/ ./yosys.proto)
+
+    if ! grep -q "ABCREV = ${shortAbcRev}" Makefile; then
+      echo "yosys isn't compatible with the provided abc (${shortAbcRev}), failing."
+      exit 1
+    fi
+  '';
+
+  doCheck = true;
+  checkInputs = [ verilog ];
+
+  # Internally, yosys knows to use the specified hardcoded ABCEXTERNAL binary.
+  # But other tools (like mcy or symbiyosys) can't know how yosys was built, so
+  # they just assume that 'yosys-abc' is available -- but it's not installed
+  # when using ABCEXTERNAL
+  #
+  # add a symlink to fake things so that both variants work the same way.
+  postInstall = ''
+    ln -sfv ${abc-verifier}/bin/abc $out/bin/yosys-abc
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Open RTL synthesis framework and tools";
+    homepage    = "http://www.clifford.at/yosys/";
+    license     = licenses.isc;
+    platforms   = platforms.all;
+    maintainers = with maintainers; [ shell thoughtpolice emily ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/z88dk/default.nix b/nixpkgs/pkgs/development/compilers/z88dk/default.nix
new file mode 100644
index 000000000000..a76e57a08078
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/z88dk/default.nix
@@ -0,0 +1,59 @@
+{ fetchFromGitHub, stdenv, makeWrapper, unzip, libxml2, m4, uthash, which }:
+
+stdenv.mkDerivation rec {
+  pname = "z88dk-unstable";
+  version = "2020-01-27";
+
+  src = fetchFromGitHub {
+    owner = "z88dk";
+    repo  = "z88dk";
+    rev = "efdd07c2e2229cac7cfef97ec01f478004846e39";
+    sha256 = "0jcks5ygp256lmzmllffp4yb38cxjgdyqnnimkj4s65095cfasyb";
+    fetchSubmodules = true;
+  };
+
+  postPatch = ''
+    # we dont rely on build.sh :
+    export PATH="$PWD/bin:$PATH" # needed to have zcc in testsuite
+    export ZCCCFG=$PWD/lib/config/
+    # we don't want to build zsdcc since it required network (svn)
+    # we test in checkPhase
+    substituteInPlace Makefile \
+      --replace 'testsuite bin/z88dk-lib$(EXESUFFIX)' 'bin/z88dk-lib$(EXESUFFIX)'\
+      --replace 'ALL_EXT = bin/zsdcc$(EXESUFFIX)' 'ALL_EXT ='
+  '';
+
+  checkPhase = ''
+    make testsuite
+  '';
+  #failed on Issue_1105_function_pointer_calls
+  doCheck = stdenv.hostPlatform.system != "aarch64-linux";
+
+  #_FORTIFY_SOURCE requires compiling with optimization (-O)
+  NIX_CFLAGS_COMPILE = "-O";
+
+  short_rev = builtins.substring 0 7 src.rev;
+  makeFlags = [
+    "git_rev=${short_rev}"
+    "version=${version}"
+    "prefix=$(out)"
+    "git_count=0"
+  ];
+
+  nativeBuildInputs = [ which makeWrapper unzip ];
+  buildInputs = [ libxml2 m4 uthash ];
+
+  preInstall = ''
+    mkdir -p $out/{bin,share}
+  '';
+
+  installTargets = [ "libs" "install" ];
+
+  meta = with stdenv.lib; {
+    homepage    = "https://www.z88dk.org";
+    description = "z80 Development Kit";
+    license     = licenses.clArtistic;
+    maintainers = [ maintainers.genesis ];
+    platforms = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/zasm/default.nix b/nixpkgs/pkgs/development/compilers/zasm/default.nix
new file mode 100644
index 000000000000..174092496bab
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zasm/default.nix
@@ -0,0 +1,44 @@
+{ fetchFromGitHub, zlib, stdenv }:
+let
+  libs-src = fetchFromGitHub {
+    owner = "megatokio";
+    repo = "Libraries";
+    rev = "97ea480051b106e83a086dd42583dfd3e9d458a1";
+    sha256 = "1kqmjb9660mnb0r18s1grrrisx6b73ijsinlyr97vz6992jd5dzh";
+  };
+in
+stdenv.mkDerivation {
+  pname = "zasm";
+  version = "4.2.6";
+  src = fetchFromGitHub {
+    owner = "megatokio";
+    repo = "zasm";
+    rev = "f1424add17a5514895a598d6b5e3982579961519";
+    sha256 = "1kqnqdqp2bfsazs6vfx2aiqanxxagn8plx8g6rc11vmr8yqnnpks";
+  };
+
+  buildInputs = [ zlib ];
+
+  configurePhase = ''
+    ln -sf ${libs-src} Libraries
+  '';
+
+  buildPhase = ''
+    cd Linux
+    make
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin
+    mv zasm $out/bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Z80 / 8080 assembler (for unix-style OS)";
+    homepage = "https://k1.spdns.de/Develop/Projects/zasm/Distributions/";
+    license = licenses.bsd2;
+    maintainers = [ maintainers.turbomack ];
+    platforms = platforms.linux;
+    badPlatforms = platforms.aarch64;
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/zig/default.nix b/nixpkgs/pkgs/development/compilers/zig/default.nix
new file mode 100644
index 000000000000..20ce0b5ff5ee
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zig/default.nix
@@ -0,0 +1,50 @@
+{ stdenv, fetchFromGitHub, cmake, llvmPackages, libxml2, zlib, substituteAll }:
+
+llvmPackages.stdenv.mkDerivation rec {
+  version = "0.6.0";
+  pname = "zig";
+
+  src = fetchFromGitHub {
+    owner = "ziglang";
+    repo = pname;
+    rev = version;
+    sha256 = "13dwm2zpscn4n0p5x8ggs9n7mwmq9cgip383i3qqphg7m3pkls8z";
+  };
+
+  nativeBuildInputs = [ cmake ];
+  buildInputs = [
+    llvmPackages.clang-unwrapped
+    llvmPackages.llvm
+    llvmPackages.lld
+    libxml2
+    zlib
+  ];
+
+  patches = [
+    (substituteAll {
+        src = ./llvm10_polly.patch;
+        llvm_extras = "-Wl,${llvmPackages.llvm}/lib/LLVMPolly.so";
+    })
+  ];
+
+  preBuild = ''
+    export HOME=$TMPDIR;
+  '';
+
+  checkPhase = ''
+    runHook preCheck
+    ./zig test $src/test/stage1/behavior.zig
+    runHook postCheck
+  '';
+
+  doCheck = true;
+
+  meta = with stdenv.lib; {
+    description =
+      "General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software";
+    homepage = "https://ziglang.org/";
+    license = licenses.mit;
+    platforms = platforms.unix;
+    maintainers = [ maintainers.andrewrk ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/zig/llvm10_polly.patch b/nixpkgs/pkgs/development/compilers/zig/llvm10_polly.patch
new file mode 100644
index 000000000000..72449c35d91f
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zig/llvm10_polly.patch
@@ -0,0 +1,10 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 97608cddf..e451c0711 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -369,4 +369,5 @@ target_link_libraries(zig_cpp LINK_PUBLIC
+     ${CLANG_LIBRARIES}
+     ${LLD_LIBRARIES}
+     ${LLVM_LIBRARIES}
++    @llvm_extras@
+ )
diff --git a/nixpkgs/pkgs/development/compilers/zulu/8.nix b/nixpkgs/pkgs/development/compilers/zulu/8.nix
new file mode 100644
index 000000000000..e48fee0a6a59
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zulu/8.nix
@@ -0,0 +1,82 @@
+{ stdenv, lib, fetchurl, unzip, makeWrapper, setJavaClassPath
+, zulu, glib, libxml2, libav_0_8, ffmpeg_3, libxslt, libGL, alsaLib
+, fontconfig, freetype, gnome2, cairo, gdk-pixbuf, atk, xorg
+, swingSupport ? true }:
+
+let
+  version = "8.28.0.1";
+  openjdk = "8.0.163";
+
+  sha256_linux = "1z8s3a948nvv92wybnhkyr27ipibcy45k0zv5h5gp37ynd91df45";
+  sha256_darwin = "0i0prjijsgg0yyycplpp9rlfl428126rqz7bb31pchrhi6jhk699";
+
+  platform = if stdenv.isDarwin then "macosx" else "linux";
+  hash = if stdenv.isDarwin then sha256_darwin else sha256_linux;
+  extension = if stdenv.isDarwin then "zip" else "tar.gz";
+
+  libraries = [
+    stdenv.cc.libc glib libxml2 libav_0_8 ffmpeg_3 libxslt libGL
+    xorg.libXxf86vm alsaLib fontconfig freetype gnome2.pango
+    gnome2.gtk cairo gdk-pixbuf atk
+  ] ++ (lib.optionals swingSupport (with xorg; [
+    xorg.libX11 xorg.libXext xorg.libXtst xorg.libXi xorg.libXp
+    xorg.libXt xorg.libXrender stdenv.cc.cc
+  ]));
+
+in stdenv.mkDerivation {
+  inherit version openjdk platform hash extension;
+
+  pname = "zulu";
+
+  src = fetchurl {
+    url = "https://cdn.azul.com/zulu/bin/zulu${version}-jdk${openjdk}-${platform}_x64.${extension}";
+    sha256 = hash;
+  };
+
+  buildInputs = [ makeWrapper ] ++ lib.optional stdenv.isDarwin unzip;
+
+  installPhase = ''
+    mkdir -p $out
+    cp -r ./* "$out/"
+
+    jrePath="$out/jre"
+
+    rpath=$rpath''${rpath:+:}$jrePath/lib/amd64/jli
+    rpath=$rpath''${rpath:+:}$jrePath/lib/amd64/server
+    rpath=$rpath''${rpath:+:}$jrePath/lib/amd64/xawt
+    rpath=$rpath''${rpath:+:}$jrePath/lib/amd64
+
+    # set all the dynamic linkers
+    find $out -type f -perm -0100 \
+        -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+        --set-rpath "$rpath" {} \;
+
+    find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
+
+    mkdir -p $out/nix-support
+    printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
+
+    # Set JAVA_HOME automatically.
+    cat <<EOF >> $out/nix-support/setup-hook
+    if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
+    EOF
+  '';
+
+  rpath = stdenv.lib.strings.makeLibraryPath libraries;
+
+  passthru = {
+    home = zulu;
+  };
+
+  meta = with stdenv.lib; {
+    homepage = "https://www.azul.com/products/zulu/";
+    license = licenses.gpl2;
+    description = "Certified builds of OpenJDK";
+    longDescription = ''
+      Certified builds of OpenJDK that can be deployed across multiple
+      operating systems, containers, hypervisors and Cloud platforms.
+    '';
+    maintainers = with maintainers; [ nequissimus fpletz ];
+    platforms = [ "x86_64-linux" "x86_64-darwin" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/zulu/default.nix b/nixpkgs/pkgs/development/compilers/zulu/default.nix
new file mode 100644
index 000000000000..bfaa4c777b32
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zulu/default.nix
@@ -0,0 +1,79 @@
+{ stdenv, lib, fetchurl, unzip, makeWrapper, setJavaClassPath
+, zulu, glib, libxml2, libav_0_8, ffmpeg_3, libxslt, libGL, alsaLib
+, fontconfig, freetype, gnome2, cairo, gdk-pixbuf, atk, xorg, zlib
+, swingSupport ? true }:
+
+let
+  version = "10.1+11";
+  openjdk = "10";
+
+  sha256_linux = "0g51n2zc7inal29n5ly3mrrfj15c7vl87zb6b2r1q67n4mnbrgm8";
+  sha256_darwin = "1c5ib136nv6gz7ij31mg15nhzrl6zr7kp8spm17zwm1ib82bc73y";
+
+  platform = if stdenv.isDarwin then "macosx" else "linux";
+  hash = if stdenv.isDarwin then sha256_darwin else sha256_linux;
+  extension = if stdenv.isDarwin then "zip" else "tar.gz";
+
+  libraries = [
+    stdenv.cc.libc glib libxml2 libav_0_8 ffmpeg_3 libxslt libGL
+    xorg.libXxf86vm alsaLib fontconfig freetype gnome2.pango
+    gnome2.gtk cairo gdk-pixbuf atk zlib
+  ] ++ (lib.optionals swingSupport (with xorg; [
+    xorg.libX11 xorg.libXext xorg.libXtst xorg.libXi xorg.libXp
+    xorg.libXt xorg.libXrender stdenv.cc.cc
+  ]));
+
+in stdenv.mkDerivation {
+  inherit version openjdk platform hash extension;
+
+  pname = "zulu";
+
+  src = fetchurl {
+    url = "https://cdn.azul.com/zulu/bin/zulu${version}-jdk${openjdk}-${platform}_x64.${extension}";
+    sha256 = hash;
+  };
+
+  buildInputs = [ makeWrapper ] ++ lib.optional stdenv.isDarwin unzip;
+
+  installPhase = ''
+    mkdir -p $out
+    cp -r ./* "$out/"
+
+    rpath=$rpath''${rpath:+:}$out/lib/jli
+    rpath=$rpath''${rpath:+:}$out/lib/server
+    rpath=$rpath''${rpath:+:}$out/lib
+
+    # set all the dynamic linkers
+    find $out -type f -perm -0100 \
+        -exec patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
+        --set-rpath "$rpath" {} \;
+
+    find $out -name "*.so" -exec patchelf --set-rpath "$rpath" {} \;
+
+    mkdir -p $out/nix-support
+    printWords ${setJavaClassPath} > $out/nix-support/propagated-build-inputs
+
+    # Set JAVA_HOME automatically.
+    cat <<EOF >> $out/nix-support/setup-hook
+    if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi
+    EOF
+  '';
+
+  rpath = stdenv.lib.strings.makeLibraryPath libraries;
+
+  passthru = {
+    home = zulu;
+  };
+
+  meta = with stdenv.lib; {
+    homepage = "https://www.azul.com/products/zulu/";
+    license = licenses.gpl2;
+    description = "Certified builds of OpenJDK";
+    longDescription = ''
+      Certified builds of OpenJDK that can be deployed across multiple
+      operating systems, containers, hypervisors and Cloud platforms.
+    '';
+    maintainers = with maintainers; [ nequissimus fpletz ];
+    platforms = [ "x86_64-linux" "x86_64-darwin" ];
+  };
+}
diff --git a/nixpkgs/pkgs/development/compilers/zz/default.nix b/nixpkgs/pkgs/development/compilers/zz/default.nix
new file mode 100644
index 000000000000..273873c88017
--- /dev/null
+++ b/nixpkgs/pkgs/development/compilers/zz/default.nix
@@ -0,0 +1,28 @@
+{ lib, rustPlatform, fetchFromGitHub, makeWrapper, z3 }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "zz";
+  version = "0.1";
+
+  src = fetchFromGitHub {
+    owner = "aep";
+    repo = "zz";
+    rev = version;
+    sha256 = "0kqrfm2r9wn0p2c3lcprsy03p9qhrwjs990va8qi59jp704l84ad";
+  };
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  cargoSha256 = "0yllcqxyyhwr9h0z8q84l0ms8x6jrqhpg79ik4xng6h5yf4ab0pq";
+
+  postInstall = ''
+    wrapProgram $out/bin/zz --prefix PATH ":" "${lib.getBin z3}/bin"
+  '';
+
+  meta = with lib; {
+    description = "πŸΊπŸ™ ZetZ a zymbolic verifier and tranzpiler to bare metal C";
+    homepage = "https://github.com/aep/zz";
+    license = licenses.mit;
+    maintainers = [ maintainers.marsam ];
+  };
+}